mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
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
This commit is contained in:
parent
1e759ed22a
commit
ef4ed8621a
|
|
@ -191,7 +191,20 @@ static const u8 *ast_cursor_plane_get_argb4444(struct ast_cursor_plane *ast_curs
|
|||
|
||||
switch (fb->format->format) {
|
||||
case DRM_FORMAT_ARGB4444:
|
||||
argb4444 = shadow_plane_state->data[0].vaddr;
|
||||
if (shadow_plane_state->data[0].is_iomem) {
|
||||
struct iosys_map argb4444_dst[DRM_FORMAT_MAX_PLANES] = {
|
||||
IOSYS_MAP_INIT_VADDR(ast_cursor_plane->argb4444),
|
||||
};
|
||||
unsigned int argb4444_dst_pitch[DRM_FORMAT_MAX_PLANES] = {
|
||||
AST_HWC_PITCH,
|
||||
};
|
||||
|
||||
drm_fb_memcpy(argb4444_dst, argb4444_dst_pitch,
|
||||
shadow_plane_state->data, fb, clip);
|
||||
argb4444 = argb4444_dst[0].vaddr;
|
||||
} else {
|
||||
argb4444 = shadow_plane_state->data[0].vaddr;
|
||||
}
|
||||
break;
|
||||
case DRM_FORMAT_ARGB8888:
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user