]> www.infradead.org Git - nvme.git/commit
drm/i915: Use vblank worker to unpin old legacy cursor fb safely
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 22 May 2024 05:33:40 +0000 (07:33 +0200)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Mon, 24 Jun 2024 16:03:18 +0000 (18:03 +0200)
commitbb8624de096340daec29137f56ea711fbcdea450
tree4c405647b27d5122199afa4deabdde72e24e6a88
parent12f84e8793af19357e2270b24b9e8d453bb3a1f2
drm/i915: Use vblank worker to unpin old legacy cursor fb safely

The cursor hardware only does sync updates, and thus the hardware
will be scanning out from the old fb until the next start of vblank.
So in order to make the legacy cursor fastpath actually safe we
should not unpin the old fb until we're sure the hardware has
ceased accessing it. The simplest approach is to just use a vblank
work here to do the delayed unpin.

Not 100% sure it's a good idea to put this onto the same high
priority vblank worker as eg. our timing critical gamma updates.
But let's keep it simple for now, and it we later discover that
this is causing problems we can think about adding a lower
priority worker for such things.

This patch is slightly reworked by Maarten

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240522053341.137592-3-maarten.lankhorst@linux.intel.com
drivers/gpu/drm/i915/display/intel_cursor.c
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_display_types.h