diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-09-24 21:26:26 (GMT) |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-11-01 16:43:13 (GMT) |
commit | 6214bb748783e65466d864c992770c07293ee820 (patch) | |
tree | 2f63bfa38089f3cbcd366430003fe9c830e97ec9 /drivers/gpu/drm/radeon/rs600.c | |
parent | 134b480f4b92654b9590fad6c9374c7dc6722375 (diff) | |
download | linux-fsl-qoriq-6214bb748783e65466d864c992770c07293ee820.tar.xz |
drm/radeon: add a connector property for dither
Allows you to enable dither in the display hardware
when the monitor supports lower a lower bpc than the
current framebuffer format.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/rs600.c')
-rw-r--r-- | drivers/gpu/drm/radeon/rs600.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c index df01aa3..76cc8d3 100644 --- a/drivers/gpu/drm/radeon/rs600.c +++ b/drivers/gpu/drm/radeon/rs600.c @@ -161,10 +161,13 @@ void avivo_program_fmt(struct drm_encoder *encoder) struct drm_connector *connector = radeon_get_connector_for_encoder(encoder); int bpc = 0; u32 tmp = 0; - bool dither = false; + enum radeon_connector_dither dither = RADEON_FMT_DITHER_DISABLE; - if (connector) + if (connector) { + struct radeon_connector *radeon_connector = to_radeon_connector(connector); bpc = radeon_get_monitor_bpc(connector); + dither = radeon_connector->dither; + } /* LVDS FMT is set up by atom */ if (radeon_encoder->devices & ATOM_DEVICE_LCD_SUPPORT) @@ -175,14 +178,14 @@ void avivo_program_fmt(struct drm_encoder *encoder) switch (bpc) { case 6: - if (dither) + if (dither == RADEON_FMT_DITHER_ENABLE) /* XXX sort out optimal dither settings */ tmp |= AVIVO_TMDS_BIT_DEPTH_CONTROL_SPATIAL_DITHER_EN; else tmp |= AVIVO_TMDS_BIT_DEPTH_CONTROL_TRUNCATE_EN; break; case 8: - if (dither) + if (dither == RADEON_FMT_DITHER_ENABLE) /* XXX sort out optimal dither settings */ tmp |= (AVIVO_TMDS_BIT_DEPTH_CONTROL_SPATIAL_DITHER_EN | AVIVO_TMDS_BIT_DEPTH_CONTROL_SPATIAL_DITHER_DEPTH); |