drm/radeon: enable display scaling on all connectors (v2)
Subsystems (2)
PATCH 1/2 drm/radeon: enable display scaling on all connectors (v2)
This enables the display scaler on all connectors for r5xx and newer asics. Previously we only enabled the scaler for fixed mode displays (eDP or LVDS) since they have to use the scaler to support non-native modes. Most other displays are multi-sync or have a built in scaler to support non-native modes. The default scaling mode for non-fixed displays is none which will use the scaler in the monitor. Note that we do not populate any fake modes like we do for fixed displays so it will only use the modes in the edid. For other modes, you'll need to populate them manually.
bug:
https://bugs.freedesktop.org/show_bug.cgi?id=80868
v2: properly handle scaling with no modes defined
--- drivers/gpu/drm/radeon/atombios_encoders.c | 10 +-- drivers/gpu/drm/radeon/radeon_connectors.c | 106 ++++++++++++++++++++++++----- 2 files changed, 95 insertions(+), 21 deletions(-)
drivers/gpu/drm/radeon/atombios_encoders.c +5 -5
@@ -327,12 +327,10 @@ static bool radeon_atom_mode_fixup(struct drm_encoder *encoder, && (mode->crtc_vsync_start < (mode->crtc_vdisplay + 2))) adjusted_mode->crtc_vsync_start = adjusted_mode->crtc_vdisplay + 2; -/* get the native mode for LVDS */ -if (radeon_encoder->active_device & (ATOM_DEVICE_LCD_SUPPORT )) +/* get the native mode for scaling */ +if (radeon_encoder->active_device & (ATOM_DEVICE_LCD_SUPPORT )) {radeon_panel_mode_fixup (encoder, adjusted_mode); - -/* get the native mode for TV */ -if (radeon_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT )) { + }else if (radeon_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT )) {struct radeon_encoder_atom_dac *tv_dac = radeon_encoder->enc_priv;if (tv_dac) { if (tv_dac->tv_std == TV_STD_NTSC ||
@@ -342,6 +340,8 @@ static bool radeon_atom_mode_fixup(struct drm_encoder *encoder,else radeon_atom_get_tv_timings (rdev,1 , adjusted_mode); } + }else if (radeon_encoder->rmx_type !=RMX_OFF ) { +radeon_panel_mode_fixup (encoder, adjusted_mode); } if (ASIC_IS_DCE3(rdev) &&
drivers/gpu/drm/radeon/radeon_connectors.c +90 -16
196 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 2/2 drm/radeon: consolidate vga and dvi get_modes functions (v2)
They are identical.
v2: rebase
--- drivers/gpu/drm/radeon/radeon_connectors.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-)
drivers/gpu/drm/radeon/radeon_connectors.c +1 -13
@@ -1051,18 +1051,6 @@ static const struct drm_connector_funcs radeon_tv_connector_funcs = { .set_property = radeon_connector_set_property, }; -static int radeon_dvi_get_modes (struct drm_connector *connector) -{ -struct radeon_connector *radeon_connector =to_radeon_connector (connector); -int ret; - - ret =radeon_ddc_get_modes (radeon_connector); - -radeon_get_native_mode (connector); - -return ret; -} -static bool radeon_check_hpd_status_unchanged (struct drm_connector *connector) {struct drm_device *dev = connector->dev;
@@ -1365,7 +1353,7 @@ static int radeon_dvi_mode_valid(struct drm_connector *connector, }static const struct drm_connector_helper_funcs radeon_dvi_connector_helper_funcs = { - .get_modes = radeon_dvi_get_modes, + .get_modes = radeon_vga_get_modes, .mode_valid = radeon_dvi_mode_valid, .best_encoder = radeon_dvi_encoder, };
Signature · 1 line
1.8.3.1