[PATCH 6.2 0340/1001] drm/ast: Init iosys_map pointer as I/O memory for damage handling

Greg Kroah-Hartman gregkh at linuxfoundation.org
Tue Mar 7 16:51:52 UTC 2023


From: Thomas Zimmermann <tzimmermann at suse.de>

[ Upstream commit b1def7fadfa544bd2467581ce40b659583eb7e79 ]

Ast hardware scans out the primary plane from video memory, which
is in I/O-memory space. Hence init the damage handler's iosys_map
pointer as I/O memory.

Not all platforms support accessing I/O memory as system memory,
although it's usually not a problem in ast's x86-based systems.

The error report is at [1].

Reported-by: kernel test robot <lkp at intel.com>
Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe at redhat.com>
Fixes: f2fa5a99ca81 ("drm/ast: Convert ast to SHMEM")
Cc: Thomas Zimmermann <tzimmermann at suse.de>
Cc: Jocelyn Falempe <jfalempe at redhat.com>
Cc: Dave Airlie <airlied at redhat.com>
Cc: dri-devel at lists.freedesktop.org
Link: https://lore.kernel.org/lkml/202212170111.eInM0unS-lkp@intel.com/T/#u # 1
Link: https://patchwork.freedesktop.org/patch/msgid/20221216193005.30280-1-tzimmermann@suse.de
Signed-off-by: Sasha Levin <sashal at kernel.org>
---
 drivers/gpu/drm/ast/ast_mode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index 66a4a41c3fe94..d314b9e7c05f9 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -636,7 +636,7 @@ static void ast_handle_damage(struct ast_plane *ast_plane, struct iosys_map *src
 			      struct drm_framebuffer *fb,
 			      const struct drm_rect *clip)
 {
-	struct iosys_map dst = IOSYS_MAP_INIT_VADDR(ast_plane->vaddr);
+	struct iosys_map dst = IOSYS_MAP_INIT_VADDR_IOMEM(ast_plane->vaddr);
 
 	iosys_map_incr(&dst, drm_fb_clip_offset(fb->pitches[0], fb->format, clip));
 	drm_fb_memcpy(&dst, fb->pitches, src, fb, clip);
-- 
2.39.2





More information about the dri-devel mailing list