From: sashiko-bot@kernel.org
To: "Dillon Amburgey" <dillona@gmail.com>
Cc: dri-devel@lists.freedesktop.org,
"Eugenio Perez" <eperezma@redhat.com>,
virtualization@lists.linux.dev,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH v3 5/5] drm/qxl: pack dumb heads from their plane source rectangles
Date: Sat, 26 Sep 2026 16:45:27 +0000 [thread overview]
Message-ID: <20260926164528.10A6B1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260926163123.39217-6-dillona@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] drm/qxl: hardcoded horizontal monitors_config breaks vertical multi-monitor layouts
--
commit 8c2ba11a8cac6cfc531b9cc6ef9a78703db0c342
Author: Dillon Amburgey <dillona@gmail.com>
drm/qxl: pack dumb heads from their plane source rectangles
This commit sizes packed heads from their plane source rectangles and
copies only those rectangles to their packed origins. It intercepts DirtyFB
clips with every matching plane source and applies horizontal and vertical
offsets to map modesets and dirty updates identically.
> diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
> --- a/drivers/gpu/drm/qxl/qxl_display.c
> +++ b/drivers/gpu/drm/qxl/qxl_display.c
> @@ -369,8 +369,10 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc,
> head.y = crtc->y;
> if (qdev->monitors_config->count < i + 1)
> qdev->monitors_config->count = i + 1;
> - if (to_qxl_plane_state(crtc->primary->state)->shadow)
> - head.x += to_qxl_plane_state(crtc->primary->state)->x;
> + if (to_qxl_plane_state(crtc->primary->state)->shadow) {
> + head.x = to_qxl_plane_state(crtc->primary->state)->x;
> + head.y = 0;
> + }
[Severity: High]
Does overwriting head.x with the shadow buffer's horizontal offset and
explicitly zeroing head.y here discard the guest's actual vertical layout
information?
If a user configures a multi-monitor layout in the guest that is not purely
side-by-side (like a vertical or custom arrangement), it appears
qxl_crtc_update_monitors_config() will override the layout data sent to the
SPICE client. Could this break the SPICE client's window placement and
destroy absolute mouse input mapping on secondary monitors, since the
client's coordinate space would no longer match the guest's?
[ ... ]
> @@ -847,9 +877,8 @@ static int qxl_prepare_shadow(struct drm_plane *plane,
> other = to_qxl_plane_state(ps);
> if (ps == new_state)
> qps->x = surf.width;
> - bo = gem_to_qxl_bo(ps->fb->obj[0]);
> - surf.width += bo->surf.width;
> - surf.height = max_t(u32, surf.height, bo->surf.height);
> + surf.width += ps->src_w >> 16;
> + surf.height = max_t(u32, surf.height, ps->src_h >> 16);
[Severity: High]
Does accumulating surf.width here in qxl_prepare_shadow() force all CRTCs
to be packed horizontally in the shadow buffer?
It seems this horizontal packing might be what necessitates overriding the
layout coordinates in qxl_crtc_update_monitors_config() above.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260926163123.39217-1-dillona@gmail.com?part=5
prev parent reply other threads:[~2026-09-26 16:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-26 16:31 [PATCH v3 0/5] drm/qxl: fix shared-primary lifetime and source packing Dillon Amburgey
2026-09-26 16:31 ` [PATCH v3 1/5] drm/qxl: unpin the framebuffer when plane preparation fails Dillon Amburgey
2026-09-26 16:38 ` sashiko-bot
2026-09-26 16:31 ` [PATCH v3 2/5] drm/qxl: wait for pending commits before applying DirtyFB Dillon Amburgey
2026-09-26 16:39 ` sashiko-bot
2026-09-26 16:31 ` [PATCH v3 3/5] drm/qxl: clear the monitor configuration for disabled head zero Dillon Amburgey
2026-09-26 16:39 ` sashiko-bot
2026-09-26 16:31 ` [PATCH v3 4/5] drm/qxl: own packed primary shadows in atomic plane state Dillon Amburgey
2026-09-26 16:41 ` sashiko-bot
2026-09-26 16:31 ` [PATCH v3 5/5] drm/qxl: pack dumb heads from their plane source rectangles Dillon Amburgey
2026-09-26 16:45 ` sashiko-bot [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=20260926164528.10A6B1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dillona@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=eperezma@redhat.com \
--cc=mst@redhat.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=virtualization@lists.linux.dev \
/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