]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau: fix duplication of nv50_head_atom struct
authorPeteris Rudzusiks <peteris.rudzusiks@gmail.com>
Sat, 11 May 2019 17:08:31 +0000 (19:08 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 14 May 2019 06:58:06 +0000 (16:58 +1000)
commitbcfe80906f681ead48710c928f7a44d191566a9d
tree8c5edbd46294971f5900b1426c2f9ead2a63a52e
parente59b67b35d90728c09b9a36a739cff31ec565265
drm/nouveau: fix duplication of nv50_head_atom struct

nv50_head_atomic_duplicate_state() makes a copy of nv50_head_atom
struct. This patch adds copying of struct member named "or", which
previously was left uninitialized in the duplicated structure.

Due to this bug, incorrect nhsync and nvsync values were sometimes used.
In my particular case, that lead to a mismatch between the output
resolution of the graphics device (GeForce GT 630 OEM) and the reported
input signal resolution on the display. xrandr reported 1680x1050, but
the display reported 1280x1024. As a result of this mismatch, the output
on the display looked like it was cropped (only part of the output was
actually visible on the display).

git bisect pointed to commit 2f03e0662259 ("drm/nouveau/kms/nv50: handle
SetControlOutputResource from head"), which added the member "or" to
nv50_head_atom structure, but forgot to copy it in
nv50_head_atomic_duplicate_state().

Fixes: 2f03e0662259 ("drm/nouveau/kms/nv50: handle SetControlOutputResource from head")
Signed-off-by: Peteris Rudzusiks <peteris.rudzusiks@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/dispnv50/head.c