drm/i915: Handle dma fences in dirtyfb callback
authorJouni Högander <jouni.hogander@intel.com>
Fri, 1 Sep 2023 09:35:00 +0000 (12:35 +0300)
committerJouni Högander <jouni.hogander@intel.com>
Mon, 4 Sep 2023 09:05:19 +0000 (12:05 +0300)
commit1bb2af547a4bc2e053b398573d8ec7c3bf5ce69e
treebb329f67db21542ae76b7a568743547cb66c090a
parent40320844ca8bda4def0f04d2bd8c2022c867ed86
drm/i915: Handle dma fences in dirtyfb callback

Take into account dma fences in dirtyfb callback. If there is no
unsignaled dma fences perform flush immediately. If there are
unsignaled dma fences perform invalidate and add callback which will
queue flush when the fence gets signaled.

v4:
 - Move invalidate before callback is added
v3:
 - Check frontbuffer bits before adding any fence fb
 - Flush only when adding fence cb succeeds
v2: Use dma_resv_get_singleton

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/20230901093500.3463046-5-jouni.hogander@intel.com
drivers/gpu/drm/i915/display/intel_fb.c