From: Thomas Zimmermann <tzimmermann@suse.de>
To: Maarten Lankhorst <dev@lankhorst.se>, dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/modeset: Handle tiled displays in pan_display_atomic.
Date: Mon, 20 Jan 2025 12:39:43 +0100 [thread overview]
Message-ID: <22a7b9e0-3835-4b18-97ba-dc64d08dc5ca@suse.de> (raw)
In-Reply-To: <20250116142825.3933-1-dev@lankhorst.se>
Hi
Am 16.01.25 um 15:28 schrieb Maarten Lankhorst:
> Tiled displays have a different x/y offset to begin with. Instead of
> attempting to remember this, just apply a delta instead.
>
> Hope this works..
As far as I understand the tile code, this makes sense.
>
> Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> drivers/gpu/drm/drm_fb_helper.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index c9008113111ba..fb3614a7ba44b 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -1354,14 +1354,14 @@ int drm_fb_helper_set_par(struct fb_info *info)
> }
> EXPORT_SYMBOL(drm_fb_helper_set_par);
>
> -static void pan_set(struct drm_fb_helper *fb_helper, int x, int y)
> +static void pan_set(struct drm_fb_helper *fb_helper, int dx, int dy)
> {
> struct drm_mode_set *mode_set;
>
> mutex_lock(&fb_helper->client.modeset_mutex);
> drm_client_for_each_modeset(mode_set, &fb_helper->client) {
> - mode_set->x = x;
> - mode_set->y = y;
> + mode_set->x += dx;
> + mode_set->y += dy;
> }
> mutex_unlock(&fb_helper->client.modeset_mutex);
> }
> @@ -1370,16 +1370,18 @@ static int pan_display_atomic(struct fb_var_screeninfo *var,
> struct fb_info *info)
> {
> struct drm_fb_helper *fb_helper = info->par;
> - int ret;
> + int ret, dx, dy;
>
> - pan_set(fb_helper, var->xoffset, var->yoffset);
> + dx = var->xoffset - info->var.xoffset;
> + dy = var->yoffset - info->var.yoffset;
> + pan_set(fb_helper, dx, dy);
>
> ret = drm_client_modeset_commit_locked(&fb_helper->client);
> if (!ret) {
> info->var.xoffset = var->xoffset;
> info->var.yoffset = var->yoffset;
> } else
> - pan_set(fb_helper, info->var.xoffset, info->var.yoffset);
> + pan_set(fb_helper, -dx, -dy);
>
> return ret;
> }
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
prev parent reply other threads:[~2025-01-20 11:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-16 14:28 [PATCH 1/2] drm/modeset: Handle tiled displays in pan_display_atomic Maarten Lankhorst
2025-01-16 14:28 ` [PATCH 2/2] drm/client: Handle tiled displays better Maarten Lankhorst
2025-01-20 11:40 ` Thomas Zimmermann
2025-01-16 20:30 ` ✓ CI.Patch_applied: success for series starting with [1/2] drm/modeset: Handle tiled displays in pan_display_atomic Patchwork
2025-01-16 20:31 ` ✓ CI.checkpatch: " Patchwork
2025-01-16 20:32 ` ✓ CI.KUnit: " Patchwork
2025-01-16 20:50 ` ✓ CI.Build: " Patchwork
2025-01-16 20:52 ` ✓ CI.Hooks: " Patchwork
2025-01-16 20:54 ` ✓ CI.checksparse: " Patchwork
2025-01-16 21:19 ` ✓ Xe.CI.BAT: " Patchwork
2025-01-17 1:34 ` ✗ Xe.CI.Full: failure " Patchwork
2025-01-20 11:39 ` Thomas Zimmermann [this message]
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=22a7b9e0-3835-4b18-97ba-dc64d08dc5ca@suse.de \
--to=tzimmermann@suse.de \
--cc=dev@lankhorst.se \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@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