]> git.baikalelectronics.ru Git - kernel.git/commit
drm/radeon: fix AVI infoframe generation
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 7 Jun 2013 14:41:03 +0000 (10:41 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 12 Jun 2013 12:17:22 +0000 (08:17 -0400)
commit6bf0e8162a506f104beee5edc5c861972dd529a1
tree25914ac597d259cddbec64336bf7745e9b239ed0
parent042677e0e1ca232514d95e2b1e41239b1826b899
drm/radeon: fix AVI infoframe generation

- remove adding 2 to checksum, this is incorrect.

This was incorrectly introduced in:
307db265570ff051faef46b47c7bf7dfb8276d29
http://lists.freedesktop.org/archives/dri-devel/2011-December/017717.html
However, the off by 2 was due to adding the version twice.
From the examples in the URL above:

[Rafał Miłecki][RV620] fglrx:
0x7454: 00 A8 5E 79     R600_HDMI_VIDEOINFOFRAME_0
0x7458: 00 28 00 10     R600_HDMI_VIDEOINFOFRAME_1
0x745C: 00 48 00 28     R600_HDMI_VIDEOINFOFRAME_2
0x7460: 02 00 00 48     R600_HDMI_VIDEOINFOFRAME_3
===================
(0x82 + 0x2 + 0xD) + 0x1F8 = 0x289
-0x289 = 0x77

However, the payload sum is not 0x1f8, it's 0x1f6.
00 + A8 + 5E + 00 +
00 + 28 + 00 + 10 +
00 + 48 + 00 + 28 +
00 + 48 =
0x1f6

Bits 25:24 of HDMI_VIDEOINFOFRAME_3 are the packet version, not part
of the payload.  So the total would be:
(0x82 + 0x2 + 0xD) + 0x1f6 = 0x287
-0x287 = 0x79

- properly emit the AVI infoframe version.  This was not being
emitted previous which is probably what caused the issue above.

This should fix blank screen when HDMI audio is enabled on
certain monitors.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Cc: Rafał Miłecki <zajec5@gmail.com>
drivers/gpu/drm/radeon/evergreen_hdmi.c
drivers/gpu/drm/radeon/r600_hdmi.c