]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Iterate over pipes and skip the disabled one
authorAnshuman Gupta <anshuman.gupta@intel.com>
Mon, 24 Feb 2020 12:39:58 +0000 (18:09 +0530)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 26 Feb 2020 14:14:35 +0000 (16:14 +0200)
commit336273e40661af3aaeebfc4f779ade78230da64d
tree92912f9a87bf4f5c1861fe4b0eaba5e3b7827ef8
parenta3b56f7189254e22cd007b657a470d2991cdd9b6
drm/i915: Iterate over pipes and skip the disabled one

It should not be assumed that a disabled display pipe will be
always last the pipe.
for_each_pipe() should iterate over I915_MAX_PIPES and check
for the disabled pipe and skip that pipe so that it should not
initialize the intel crtc for any disabled pipes.

Due to changes in for_each_pipe() macro, it requires to handle
the below compilation error.
"suggest explicit braces to avoid ambiguous ‘else’
[-Werror=dangling-else]"

v2:
- Cosmetic changes, removed unwanted parentheses. [Ville]

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200224124004.26712-2-anshuman.gupta@intel.com
drivers/gpu/drm/i915/display/intel_display.h
drivers/gpu/drm/i915/i915_irq.c