drm/i915/psr: Add proper handling for disabling sel fetch for planes
authorJouni Högander <jouni.hogander@intel.com>
Mon, 20 Nov 2023 08:26:06 +0000 (10:26 +0200)
committerJouni Högander <jouni.hogander@intel.com>
Mon, 27 Nov 2023 05:36:25 +0000 (07:36 +0200)
commita4f477e6ac171ccdea38556437493c3c5222bbe5
tree831d8859611f9e49890eccd793fefcc5e945efed
parentb1f5279b5981f9ed851163ee661692f42397982f
drm/i915/psr: Add proper handling for disabling sel fetch for planes

Currently we are enabling selective fetch for all planes that are visible.
This is suboptimal as we might be fetching for memory for planes that are
not part of selective update.

Fix this by adding proper handling for disabling plane selective fetch:
If plane previously part of selective update is now not part of update:
Add it into updated planes and let the plane configuration to disable
selective fetch for it.

v3: Checkpatch warnings fixed
v2:
  - Add setting sel_fetch_area->y1/y2 to -1
  - Remove setting again local sel_fetch_area variable

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231120082606.3156488-3-jouni.hogander@intel.com
drivers/gpu/drm/i915/display/intel_cursor.c
drivers/gpu/drm/i915/display/intel_psr.c
drivers/gpu/drm/i915/display/skl_universal_plane.c