diff options
author | Slava Grigorev <slava.grigorev@amd.com> | 2014-12-05 17:59:56 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-01-22 10:42:10 -0500 |
commit | 96ea7afbc256ce7e2b2446909f52dab357942c3c (patch) | |
tree | 5fb9182a64808b71c271d99dfec4a622a8ee2508 /drivers/gpu/drm/radeon/r600_hdmi.c | |
parent | a85d682a6578a3bd02c95afb4ef527fa0897bb69 (diff) | |
download | lwn-96ea7afbc256ce7e2b2446909f52dab357942c3c.tar.gz lwn-96ea7afbc256ce7e2b2446909f52dab357942c3c.zip |
radeon/audio: consolidate update_avi_infoframe() functions
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r600_hdmi.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r600_hdmi.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c index 30580d1a14f0..53ee7ad9612c 100644 --- a/drivers/gpu/drm/radeon/r600_hdmi.c +++ b/drivers/gpu/drm/radeon/r600_hdmi.c @@ -285,16 +285,10 @@ void r600_hdmi_update_ACR(struct drm_encoder *encoder, uint32_t clock) /* * build a HDMI Video Info Frame */ -void r600_hdmi_update_avi_infoframe(struct drm_encoder *encoder, void *buffer, - size_t size) +void r600_update_avi_infoframe(struct radeon_device *rdev, u32 offset, + unsigned char *buffer, size_t size) { - struct drm_device *dev = encoder->dev; - struct radeon_device *rdev = dev->dev_private; - struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); - struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; - uint32_t offset = dig->afmt->offset; uint8_t *frame = buffer + 3; - uint8_t *header = buffer; WREG32(HDMI0_AVI_INFO0 + offset, frame[0x0] | (frame[0x1] << 8) | (frame[0x2] << 16) | (frame[0x3] << 24)); @@ -303,7 +297,7 @@ void r600_hdmi_update_avi_infoframe(struct drm_encoder *encoder, void *buffer, WREG32(HDMI0_AVI_INFO2 + offset, frame[0x8] | (frame[0x9] << 8) | (frame[0xA] << 16) | (frame[0xB] << 24)); WREG32(HDMI0_AVI_INFO3 + offset, - frame[0xC] | (frame[0xD] << 8) | (header[1] << 24)); + frame[0xC] | (frame[0xD] << 8) | (buffer[1] << 24)); } /* @@ -486,7 +480,7 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mod return; } - r600_hdmi_update_avi_infoframe(encoder, buffer, sizeof(buffer)); + radeon_update_avi_infoframe(encoder, buffer, sizeof(buffer)); /* fglrx duplicates INFOFRAME_CONTROL0 & INFOFRAME_CONTROL1 ops here */ |