Commit 3d1890ef authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/kms/nv50-: fix panel scaling

Under certain circumstances, encoder atomic_check() can be entered
without adjusted_mode having been reset to the same as mode, which
confuses the scaling logic and can lead to a misprogrammed display.

Fix this by checking against the user-provided mode directly.

Link: https://bugs.freedesktop.org/show_bug.cgi?id=108615
Link: https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau/issues/464Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent ae5769d4
...@@ -326,9 +326,9 @@ nv50_outp_atomic_check_view(struct drm_encoder *encoder, ...@@ -326,9 +326,9 @@ nv50_outp_atomic_check_view(struct drm_encoder *encoder,
* same size as the native one (e.g. different * same size as the native one (e.g. different
* refresh rate) * refresh rate)
*/ */
if (adjusted_mode->hdisplay == native_mode->hdisplay && if (mode->hdisplay == native_mode->hdisplay &&
adjusted_mode->vdisplay == native_mode->vdisplay && mode->vdisplay == native_mode->vdisplay &&
adjusted_mode->type & DRM_MODE_TYPE_DRIVER) mode->type & DRM_MODE_TYPE_DRIVER)
break; break;
mode = native_mode; mode = native_mode;
asyc->scaler.full = true; asyc->scaler.full = true;
......
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