]> git.itanic.dy.fi Git - linux-stable/commit
drm/i915/display: Handle frontbuffer rendering when PSR2 selective fetch is enabled
authorJosé Roberto de Souza <jose.souza@intel.com>
Thu, 30 Sep 2021 00:14:04 +0000 (17:14 -0700)
committerJosé Roberto de Souza <jose.souza@intel.com>
Thu, 30 Sep 2021 22:04:44 +0000 (15:04 -0700)
commit34ac6b651f39e63da8d0ae0edd2db32fbb1bc02c
tree98732b472c86e0ef1fa6de098331764df5b701aa
parent5da579cff38d64d024c1b99bafa3347c0d5fc107
drm/i915/display: Handle frontbuffer rendering when PSR2 selective fetch is enabled

When PSR2 selective fetch is enabled writes to CURSURFLIVE alone do
not causes the panel to be updated when doing frontbuffer rendering.

From what I was able to figure from experiments the writes to
CURSURFLIVE takes PSR2 from deep sleep but panel is not updated
because PSR2_MAN_TRK_CTL has no start and end region set.

As we don't have the dirt area from current flush and invalidate API
and even if we did userspace could do several draws to frontbuffer and
we would need a way to append all the damaged areas of all the draws
that need to be part of next frame.

So here only programing PSR2_MAN_TRK_CTL to do a single full frame
fetch.

It is a safe approach as if scanout is in the visible area
the single full frame will only be visible for hardware in the next
frame because of the double buffering, and if scanout is in vblank
area it will be draw in the current frame.

No need to disable PSR and wait a few miliseconds to enable it again.

Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210930001409.254817-4-jose.souza@intel.com
drivers/gpu/drm/i915/display/intel_psr.c