diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/evergreen_hdmi.c')
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen_hdmi.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c index 9fc22ee40f96..e32fd2cbc368 100644 --- a/drivers/gpu/drm/radeon/evergreen_hdmi.c +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c | |||
@@ -219,3 +219,20 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode | |||
219 | WREG32(AFMT_RAMP_CONTROL2 + offset, 0x00000001); | 219 | WREG32(AFMT_RAMP_CONTROL2 + offset, 0x00000001); |
220 | WREG32(AFMT_RAMP_CONTROL3 + offset, 0x00000001); | 220 | WREG32(AFMT_RAMP_CONTROL3 + offset, 0x00000001); |
221 | } | 221 | } |
222 | |||
223 | void evergreen_hdmi_enable(struct drm_encoder *encoder, bool enable) | ||
224 | { | ||
225 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | ||
226 | struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; | ||
227 | |||
228 | /* Silent, r600_hdmi_enable will raise WARN for us */ | ||
229 | if (enable && dig->afmt->enabled) | ||
230 | return; | ||
231 | if (!enable && !dig->afmt->enabled) | ||
232 | return; | ||
233 | |||
234 | dig->afmt->enabled = enable; | ||
235 | |||
236 | DRM_DEBUG("%sabling HDMI interface @ 0x%04X for encoder 0x%x\n", | ||
237 | enable ? "En" : "Dis", dig->afmt->offset, radeon_encoder->encoder_id); | ||
238 | } | ||