]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/display/psr: Use drm damage helpers to calculate plane damaged area
authorJosé Roberto de Souza <jose.souza@intel.com>
Tue, 14 Sep 2021 21:25:06 +0000 (14:25 -0700)
committerJosé Roberto de Souza <jose.souza@intel.com>
Fri, 17 Sep 2021 17:58:48 +0000 (10:58 -0700)
commit2dc78a8227d55374f111ef3e6bd8bae04df242f2
tree156a0d3f8baedf4b23af4fc0c2678b77f33cb31c
parent34af35f03b66679a2ba190b89fb3b9643ac927a9
drm/i915/display/psr: Use drm damage helpers to calculate plane damaged area

drm_atomic_helper_damage_iter_init() + drm_atomic_for_each_plane_damage()
returns the full plane area in case no damaged area was set by
userspace or it was discarted by driver.

This is important to fix the rendering of userspace applications that
does frontbuffer rendering and notify driver about dirty areas but do
not set any dirty clips.

With this we don't need to worry about to check and mark the whole
area as damaged in page flips.

Another important change here is the move of
drm_atomic_add_affected_planes() call, it needs to called late
otherwise the area of all the planes would be added to pipe_clip and
not saving power.

Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210914212507.177511-4-jose.souza@intel.com
drivers/gpu/drm/i915/display/intel_psr.c