All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jocelyn Falempe <jfalempe@redhat.com>
To: dri-devel@lists.freedesktop.org
Cc: Jocelyn Falempe <jfalempe@redhat.com>,
	michel@daenzer.net, tzimmermann@suse.de
Subject: [PATCH 1/4] mgag200: Add FB_DAMAGE_CLIPS support
Date: Tue, 26 Apr 2022 18:41:05 +0200	[thread overview]
Message-ID: <20220426164108.1051295-2-jfalempe@redhat.com> (raw)
In-Reply-To: <20220426164108.1051295-1-jfalempe@redhat.com>

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@gmail.com>
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.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 6e18d3bbd720..cff2e76f3fa0 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -1107,6 +1107,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.35.1


  reply	other threads:[~2022-04-26 16:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26 16:41 [PATCH 0/4] mgag200: Improve damage handling Jocelyn Falempe
2022-04-26 16:41 ` Jocelyn Falempe [this message]
2022-05-04  9:58   ` [PATCH 1/4] mgag200: Add FB_DAMAGE_CLIPS support Thomas Zimmermann
2022-04-26 16:41 ` [PATCH 2/4] mgag200: Optimize damage clips Jocelyn Falempe
2022-05-04 10:04   ` Thomas Zimmermann
2022-05-04 11:56     ` Jocelyn Falempe
2022-04-26 16:41 ` [PATCH 3/4] mgag200: remove unused flag Jocelyn Falempe
2022-05-04 10:12   ` Thomas Zimmermann
2022-05-04 11:59     ` Jocelyn Falempe
2022-04-26 16:41 ` [PATCH 4/4] mgag200: remove mgag200_probe_vram() Jocelyn Falempe
2022-05-04 10:16   ` Thomas Zimmermann
2022-05-04 12:11     ` Jocelyn Falempe
2022-04-26 21:10 ` [PATCH 0/4] mgag200: Improve damage handling Lyude Paul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220426164108.1051295-2-jfalempe@redhat.com \
    --to=jfalempe@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=michel@daenzer.net \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.