diff options
author | Louis-Francis Ratté-Boulianne <lfrb@collabora.com> | 2018-03-29 01:07:26 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2018-04-02 14:58:57 -0400 |
commit | f580116f3c89b3c086655cbd441f84e50115ea78 (patch) | |
tree | de1136a7861ff3a4f09d27761248772d977f1008 | |
parent | ce7d5087cfe1d2df756d93b7f567b3c0b0a7f6a8 (diff) |
modesetting: Fix reported size when using atomic modesetting
The framebuffer can include multiple CRTCs in multi-monitors
setup. So we shouldn't use the buffer size but the CRTC size
instead. Rotated displays are shadowed, so we don't need to
worry about it there.
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Tested-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
-rw-r--r-- | hw/xfree86/drivers/modesetting/drmmode_display.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 09eec0814..e23893883 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -562,15 +562,15 @@ drmmode_crtc_set_fb(xf86CrtcPtr crtc, DisplayModePtr mode, uint32_t fb_id, ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_SRC_X, x << 16); ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_SRC_Y, y << 16); ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_SRC_W, - drmmode->front_bo.width << 16); + crtc->mode.HDisplay << 16); ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_SRC_H, - drmmode->front_bo.height << 16); + crtc->mode.VDisplay << 16); ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_CRTC_X, 0); ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_CRTC_Y, 0); ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_CRTC_W, - drmmode->front_bo.width); + crtc->mode.HDisplay); ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_CRTC_H, - drmmode->front_bo.height); + crtc->mode.VDisplay); if (ret == 0) ret = drmModeAtomicCommit(ms->fd, req, flags, data); |