drm/i915: Fix enabled_planes bitmask
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 5 Mar 2021 15:36:05 +0000 (17:36 +0200)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 23 Mar 2021 12:27:03 +0000 (08:27 -0400)
commitff2628ed95e42d5245119eed3c1f669db9222285
treec0ee964e8b1ca3d988dfdc037d162c9bcf0fc837
parentab03631087f5c296030dd86265ea02dcdacc6802
drm/i915: Fix enabled_planes bitmask

The enabled_planes bitmask was supposed to track logically enabled
planes (ie. fb!=NULL and crtc!=NULL), but instead we end up putting
even disabled planes into the bitmask since
intel_plane_atomic_check_with_state() only takes the early exit
if the plane was disabled and stays disabled. I think I misread
the early said codepath to exit whenever the plane is logically
disabled, which is not true.

So let's fix this up properly and set the bit only when the plane
actually is logically enabled.

Cc: Manasi Navare <manasi.d.navare@intel.com>
Fixes: ee42ec19ca2e ("drm/i915: Track logically enabled planes for hw state")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210305153610.12177-2-ville.syrjala@linux.intel.com
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
(cherry picked from commit 97bc7ffa1b1e9a8672e0a8e9a96680b0c3717427)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/display/intel_atomic_plane.c