From: Thomas Zimmermann Date: Wed, 26 Feb 2025 17:03:12 +0000 (+0100) Subject: drm/mipi-dbi: Test for imported buffers with drm_gem_is_imported() X-Git-Tag: v6.15-rc1~120^2~13^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0695d8fc113a03facfee55930f5906ab4461fd4d;p=thirdparty%2Flinux.git drm/mipi-dbi: Test for imported buffers with drm_gem_is_imported() Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. Signed-off-by: Thomas Zimmermann Reviewed-by: Anusha Srivatsa Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20250226172457.217725-10-tzimmermann@suse.de --- diff --git a/drivers/gpu/drm/drm_mipi_dbi.c b/drivers/gpu/drm/drm_mipi_dbi.c index 34bca75675766..89e05a5bed1de 100644 --- a/drivers/gpu/drm/drm_mipi_dbi.c +++ b/drivers/gpu/drm/drm_mipi_dbi.c @@ -218,7 +218,7 @@ int mipi_dbi_buf_copy(void *dst, struct iosys_map *src, struct drm_framebuffer * switch (fb->format->format) { case DRM_FORMAT_RGB565: if (swap) - drm_fb_swab(&dst_map, NULL, src, fb, clip, !gem->import_attach, + drm_fb_swab(&dst_map, NULL, src, fb, clip, !drm_gem_is_imported(gem), fmtcnv_state); else drm_fb_memcpy(&dst_map, NULL, src, fb, clip);