All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jocelyn Falempe <jfalempe@redhat.com>
To: dri-devel@lists.freedesktop.org, lyude@redhat.com, tzimmermann@suse.de
Cc: Jocelyn Falempe <jfalempe@redhat.com>, michel@daenzer.net
Subject: [PATCH v2 1/3] mgag200: Add FB_DAMAGE_CLIPS support
Date: Wed,  4 May 2022 15:40:24 +0200	[thread overview]
Message-ID: <20220504134026.283417-2-jfalempe@redhat.com> (raw)
In-Reply-To: <20220504134026.283417-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>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 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-05-04 13:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04 13:40 [PATCH v2 0/3] mgag200: Improve damage handling Jocelyn Falempe
2022-05-04 13:40 ` Jocelyn Falempe [this message]
2022-05-04 13:40 ` [PATCH v2 2/3] mgag200: Optimize damage clips Jocelyn Falempe
2022-05-04 13:40 ` [PATCH v2 3/3] mgag200: Warn once if trying to set start address on broken hardware Jocelyn Falempe
2022-05-04 14:53   ` Thomas Zimmermann
2022-05-04 14:59 ` [PATCH v2 0/3] mgag200: Improve damage handling Thomas Zimmermann
2022-05-04 16:09   ` Jocelyn Falempe
2022-05-16 13:12   ` Jocelyn Falempe

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=20220504134026.283417-2-jfalempe@redhat.com \
    --to=jfalempe@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=lyude@redhat.com \
    --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.