]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/i915: introduce INTEL_DISPLAY_ENABLED()
authorJani Nikula <jani.nikula@intel.com>
Fri, 13 Sep 2019 10:04:07 +0000 (13:04 +0300)
committerJani Nikula <jani.nikula@intel.com>
Mon, 16 Sep 2019 07:20:05 +0000 (10:20 +0300)
commita2b69ea4d26d1077b00924ff34e46b28d997aae2
treebce636781689c57d60cb2b9b436cbe7a6c40108b
parent2f7155629c9dd4d4ed0c2ec95a8982c84882b9e2
drm/i915: introduce INTEL_DISPLAY_ENABLED()

Prepare for making a distinction between not having display and having
disabled display. Add INTEL_DISPLAY_ENABLED() and use it where
HAS_DISPLAY() is used after intel_device_info_runtime_init(). This is
initially duplication, as disabling display still leads to ->pipe_mask =
0 and HAS_DISPLAY() being false.

Note that ever since i915.display_disable was introduced, it has not
affected PCH detection even if it uses HAS_DISPLAY(), as display disable
happens after that.

Since INTEL_DISPLAY_ENABLED() will not make sense unless HAS_DISPLAY()
is true, include a warning for catching misuses making decisions on
INTEL_DISPLAY_ENABLED() when HAS_DISPLAY() is false.

v2: Remove INTEL_DISPLAY_ENABLED() check from intel_detect_pch() (Chris)

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190913100407.30991-1-jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_bios.c
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_fbdev.c
drivers/gpu/drm/i915/display/intel_gmbus.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h