drm/radeon/kms: use drm_mode directly for panel modes
This reduces the number of mode format conversions needed and makes native panel mode support cleaner. 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
5a9bcacc0a
commit
de2103e452
@@ -761,7 +761,7 @@ bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
|
||||
radeon_crtc->rmx_type = radeon_encoder->rmx_type;
|
||||
memcpy(&radeon_crtc->native_mode,
|
||||
&radeon_encoder->native_mode,
|
||||
sizeof(struct radeon_native_mode));
|
||||
sizeof(struct drm_display_mode));
|
||||
first = false;
|
||||
} else {
|
||||
if (radeon_crtc->rmx_type != radeon_encoder->rmx_type) {
|
||||
@@ -779,10 +779,10 @@ bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
|
||||
if (radeon_crtc->rmx_type != RMX_OFF) {
|
||||
fixed20_12 a, b;
|
||||
a.full = rfixed_const(crtc->mode.vdisplay);
|
||||
b.full = rfixed_const(radeon_crtc->native_mode.panel_xres);
|
||||
b.full = rfixed_const(radeon_crtc->native_mode.hdisplay);
|
||||
radeon_crtc->vsc.full = rfixed_div(a, b);
|
||||
a.full = rfixed_const(crtc->mode.hdisplay);
|
||||
b.full = rfixed_const(radeon_crtc->native_mode.panel_yres);
|
||||
b.full = rfixed_const(radeon_crtc->native_mode.vdisplay);
|
||||
radeon_crtc->hsc.full = rfixed_div(a, b);
|
||||
} else {
|
||||
radeon_crtc->vsc.full = rfixed_const(1);
|
||||
|
Reference in New Issue
Block a user