drm/fb_dma: Add generic get_scanout_buffer() for drm_panic
authorJocelyn Falempe <jfalempe@redhat.com>
Tue, 9 Apr 2024 16:30:44 +0000 (18:30 +0200)
committerJocelyn Falempe <jfalempe@redhat.com>
Mon, 15 Apr 2024 14:13:20 +0000 (16:13 +0200)
commit879b3b6511fe92b1b93dfc543961347289a8aeaa
tree17cf603917ac9f2b6d1b103ee51665dfb7c93187
parent813ca3aa8fecaca9cf81f831d2e036d997ac3ee7
drm/fb_dma: Add generic get_scanout_buffer() for drm_panic

This was initialy done for imx6, but should work on most drivers
using drm_fb_dma_helper.

v8:
 * Replace get_scanout_buffer() logic with drm_panic_set_buffer()
   (Thomas Zimmermann)

v9:
 * go back to get_scanout_buffer()
 * move get_scanout_buffer() to plane helper functions

v12:
 * Rename drm_panic_gem_get_scanout_buffer to drm_fb_dma_get_scanout_buffer
   (Thomas Zimmermann)
 * Remove the #ifdef CONFIG_DRM_PANIC, and build it unconditionnaly, as
   it's a small function. (Thomas Zimmermann)

Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240409163432.352518-6-jfalempe@redhat.com
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_fb_dma_helper.c
include/drm/drm_fb_dma_helper.h