From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH] drm/fb: don't call driver set_config if display isn't panned
Date: Tue, 15 Nov 2011 10:27:35 -0800 [thread overview]
Message-ID: <20111115102735.7f21fb4d@jbarnes-desktop> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 996 bytes --]
This is just a minor optimization to the fb panning code. In debugging
some other issues, I noticed a lot of no-op calls to the set_config
routine with all the same parameters and tracked down the source to the
fb helper pan routine.
So add an additional check for actual panning relative to the current
crtc config to avoid unnecessary set_config calls.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index f7c6854..4dd81f3 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -739,7 +739,8 @@ int drm_fb_helper_pan_display(struct fb_var_screeninfo *var,
modeset->x = var->xoffset;
modeset->y = var->yoffset;
- if (modeset->num_connectors) {
+ if (((modeset->x != crtc->x) || (modeset->y != crtc->y)) &&
+ modeset->num_connectors) {
ret = crtc->funcs->set_config(modeset);
if (!ret) {
info->var.xoffset = var->xoffset;
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
reply other threads:[~2011-11-15 18:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20111115102735.7f21fb4d@jbarnes-desktop \
--to=jbarnes@virtuousgeek.org \
--cc=dri-devel@lists.freedesktop.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox