drm/radeon/kms: properly handle mode id with native mode changes
drm modes are objects with indentifiers. Make sure to preserve the mode id when copying mode params. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
committed by
Dave Airlie
parent
39deb2d675
commit
fb06ca8f8c
@@ -175,11 +175,13 @@ void radeon_rmx_mode_fixup(struct drm_encoder *encoder,
|
||||
|
||||
if (mode->hdisplay < native_mode->hdisplay ||
|
||||
mode->vdisplay < native_mode->vdisplay) {
|
||||
int mode_id = adjusted_mode->base.id;
|
||||
*adjusted_mode = *native_mode;
|
||||
if (!ASIC_IS_AVIVO(rdev)) {
|
||||
adjusted_mode->hdisplay = mode->hdisplay;
|
||||
adjusted_mode->vdisplay = mode->vdisplay;
|
||||
}
|
||||
adjusted_mode->base.id = mode_id;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user