Signed-off-by: Rafał Miłecki <zajec5@xxxxxxxxx> --- V2: fix typo and add extra \n --- drivers/gpu/drm/radeon/evergreen_hdmi.c | 14 ++++++++++++++ drivers/gpu/drm/radeon/radeon_display.c | 6 ++++++ 2 files changed, 20 insertions(+) diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c index 4fdecc2..8b64bf1 100644 --- a/drivers/gpu/drm/radeon/evergreen_hdmi.c +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c @@ -143,6 +143,13 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode WREG32(HDMI_GC + offset, 0); /* unset HDMI_GC_AVMUTE */ + /* + * At this point fglrx reads following regs: + * DCE41: 0x49c + * DCE5: 0x480 0x484 0x488 + * Is that something audio related? + */ + err = drm_hdmi_avi_infoframe_from_display_mode(&frame, mode); if (err < 0) { DRM_ERROR("failed to setup AVI infoframe: %zd\n", err); @@ -158,6 +165,13 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode evergreen_hdmi_update_avi_infoframe(encoder, buffer, sizeof(buffer)); evergreen_hdmi_update_ACR(encoder, mode->clock); + /* + * At this point fglrx changes following regs: + * DCE41: 0x7a70 + * DCE5: 0x7a70 and 0x64ec + * Is that something audio related? + */ + /* it's unknown what these bits do excatly, but it's indeed quite useful for debugging */ WREG32(AFMT_RAMP_CONTROL0 + offset, 0x00FFFFFF); WREG32(AFMT_RAMP_CONTROL1 + offset, 0x007FFFFF); diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index e38fd55..376c4e4 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -1261,6 +1261,12 @@ static void radeon_afmt_init(struct radeon_device *rdev) rdev->mode_info.afmt[1]->offset = EVERGREEN_CRTC1_REGISTER_OFFSET; rdev->mode_info.afmt[1]->id = 1; } + + /* + * According to the comments above we should use !DCE41 || DCE5 + * condition, however there isn't any DCE5 that is DCE41, so + * DCE5 check is not needed. + */ if (!ASIC_IS_DCE41(rdev)) { rdev->mode_info.afmt[2] = kzalloc(sizeof(struct radeon_afmt), GFP_KERNEL); if (rdev->mode_info.afmt[2]) { -- 1.7.10.4 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel