Commit f580116f authored by Louis-Francis Ratté-Boulianne's avatar Louis-Francis Ratté-Boulianne Committed by Adam Jackson

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's avatarLouis-Francis Ratté-Boulianne <lfrb@collabora.com>
Tested-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
Reviewed-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
parent ce7d5087
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment