[PATCH 2/3][SRU][K] drm/mgag200: Add FB_DAMAGE_CLIPS support
AceLan Kao
acelan.kao at canonical.com
Tue Nov 8 04:26:33 UTC 2022
From: Jocelyn Falempe <jfalempe at redhat.com>
BugLink: https://launchpad.net/bugs/1995573
The driver does support damage clips, but doesn't advertise it.
So when running gnome/wayland on Matrox hardware, the full frame is
copied to the slow Matrox memory, which leads to very poor performances.
Add drm_plane_enable_fb_damage_clips() to advertise this capability to
userspace.
With this patch, gnome/wayland becomes usable on Matrox GPU.
Suggested-by: Jonas Ã…dahl <jadahl at gmail.com>
Signed-off-by: Jocelyn Falempe <jfalempe at redhat.com>
Reviewed-by: Lyude Paul <lyude at redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann at suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20220504134026.283417-2-jfalempe@redhat.com
(cherry picked from commit 3064debaf55e1bc8f191871ca5f82697ef4c0951)
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao at canonical.com>
---
drivers/gpu/drm/mgag200/mgag200_mode.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
index 9134be52c9a7..59f850f296ee 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -1137,6 +1137,8 @@ int mgag200_modeset_init(struct mga_device *mdev)
return ret;
}
+ drm_plane_enable_fb_damage_clips(&pipe->plane);
+
/* FIXME: legacy gamma tables; convert to CRTC state */
drm_mode_crtc_set_gamma_size(&pipe->crtc, MGAG200_LUT_SIZE);
--
2.34.1
More information about the kernel-team
mailing list