diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2016-11-08 10:12:09 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2016-11-15 09:45:33 +0100 |
commit | ff996e72a0a1503005b76d0869a46b3a712f327a (patch) | |
tree | 8e4616d9579cb046b221babefb2edeef40545827 /drivers/gpu/drm/qxl | |
parent | 9e3b317839298abc0ab796a691f8449a16792398 (diff) | |
download | talos-obmc-linux-ff996e72a0a1503005b76d0869a46b3a712f327a.tar.gz talos-obmc-linux-ff996e72a0a1503005b76d0869a46b3a712f327a.zip |
qxl: Allow resolution which are not multiple of 8
The use of drm_cvt_mode() in qxl_add_monitors_config_modes() means that
the resolutions we are going to present to user-space are going to be
rounded down to a multiple of 8. In the QXL arbitrary resolution case,
this is not useful.
This commit forces the actual width/height that was requested by the
client in the drm_display_mode structure rather than keeping the
rounded version.
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Message-id: 20161108091209.25568-8-cfergeau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/qxl')
-rw-r--r-- | drivers/gpu/drm/qxl/qxl_display.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index eaea0d87cc94..4b5eab8a47b3 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -199,6 +199,9 @@ static int qxl_add_monitors_config_modes(struct drm_connector *connector, mode = drm_cvt_mode(dev, head->width, head->height, 60, false, false, false); mode->type |= DRM_MODE_TYPE_PREFERRED; + mode->hdisplay = head->width; + mode->vdisplay = head->height; + drm_mode_set_name(mode); *pwidth = head->width; *pheight = head->height; drm_mode_probed_add(connector, mode); |