Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/ast: Support cursor buffers objects in I/O memory

Copy the ARGB4444 cursor buffer to system memory if it is located in
I/O memory. While this cannot happen with ast's native GEM objects, an
imported buffer object might be on the external device's I/O memory.

If the cursor buffer is located in system memory continue to use it
directly.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>>
Link: https://patch.msgid.link/20251126094626.41985-3-tzimmermann@suse.de

+14 -1
+14 -1
drivers/gpu/drm/ast/ast_cursor.c
··· 191 191 192 192 switch (fb->format->format) { 193 193 case DRM_FORMAT_ARGB4444: 194 - argb4444 = shadow_plane_state->data[0].vaddr; 194 + if (shadow_plane_state->data[0].is_iomem) { 195 + struct iosys_map argb4444_dst[DRM_FORMAT_MAX_PLANES] = { 196 + IOSYS_MAP_INIT_VADDR(ast_cursor_plane->argb4444), 197 + }; 198 + unsigned int argb4444_dst_pitch[DRM_FORMAT_MAX_PLANES] = { 199 + AST_HWC_PITCH, 200 + }; 201 + 202 + drm_fb_memcpy(argb4444_dst, argb4444_dst_pitch, 203 + shadow_plane_state->data, fb, clip); 204 + argb4444 = argb4444_dst[0].vaddr; 205 + } else { 206 + argb4444 = shadow_plane_state->data[0].vaddr; 207 + } 195 208 break; 196 209 case DRM_FORMAT_ARGB8888: 197 210 {