On Tue, 28 Jul 2015 15:59:17 +0200 Jean-Francois Moine moinejf@free.fr wrote:
Using hdmi_avi_infoframe_pack() to create the AVI infoframe calculates the checksum of the frame and breaks the second calculation which is done in tda998x_write_if(). Then the HDMI AVI frame is wrong and the display device does not handle correctly the video frames.
Fixes: 8c7a075da9f7980c ("use drm_hdmi_avi_infoframe_from_display_mode()") Signed-off-by: Jean-Francois Moine moinejf@free.fr
v2: add the Fixes: tag
drivers/gpu/drm/i2c/tda998x_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index fe1599d..424228b 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -606,8 +606,6 @@ static void tda998x_write_if(struct tda998x_priv *priv, uint8_t bit, uint16_t addr, uint8_t *buf, size_t size) {
- buf[PB(0)] = tda998x_cksum(buf, size);
- reg_clear(priv, REG_DIP_IF_FLAGS, bit); reg_write_range(priv, addr, buf, size); reg_set(priv, REG_DIP_IF_FLAGS, bit);
@@ -627,6 +625,8 @@ tda998x_write_aif(struct tda998x_priv *priv, struct tda998x_encoder_params *p) buf[PB(4)] = p->audio_frame[4]; buf[PB(5)] = p->audio_frame[5] & 0xf8; /* DM_INH + LSV */
- buf[PB(0)] = tda998x_cksum(buf, sizeof(buf));
- tda998x_write_if(priv, DIP_IF_FLAGS_IF4, REG_IF4_HB0, buf, sizeof(buf));
}
Ping!
On Tue, Aug 04, 2015 at 08:05:57AM +0200, Jean-Francois Moine wrote:
On Tue, 28 Jul 2015 15:59:17 +0200 Jean-Francois Moine moinejf@free.fr wrote:
Using hdmi_avi_infoframe_pack() to create the AVI infoframe calculates the checksum of the frame and breaks the second calculation which is done in tda998x_write_if(). Then the HDMI AVI frame is wrong and the display device does not handle correctly the video frames.
Fixes: 8c7a075da9f7980c ("use drm_hdmi_avi_infoframe_from_display_mode()") Signed-off-by: Jean-Francois Moine moinejf@free.fr
Ping!
I applied the patch a while back (July 17th to be exact) and in the queue to be sent - I'll update the commit message prior to doing that. Thanks.
On Wed, Aug 05, 2015 at 12:01:53AM +0100, Russell King - ARM Linux wrote:
On Tue, Aug 04, 2015 at 08:05:57AM +0200, Jean-Francois Moine wrote:
On Tue, 28 Jul 2015 15:59:17 +0200 Jean-Francois Moine moinejf@free.fr wrote:
Using hdmi_avi_infoframe_pack() to create the AVI infoframe calculates the checksum of the frame and breaks the second calculation which is done in tda998x_write_if(). Then the HDMI AVI frame is wrong and the display device does not handle correctly the video frames.
Fixes: 8c7a075da9f7980c ("use drm_hdmi_avi_infoframe_from_display_mode()") Signed-off-by: Jean-Francois Moine moinejf@free.fr
Ping!
I applied the patch a while back (July 17th to be exact) and in the queue to be sent - I'll update the commit message prior to doing that. Thanks.
I've been able to get my hands on an AV amp, and I was hoping to use that to validate things like the info frames. Having investigated today, while I'm able to get information from it, it's not as complete as I'd like - for example, it gives me for the AVI:
82 02 0D 12 28 08 1F 00 00 00 00 00 00 00 00 00
which is the CEA-861-D AVI, not the HDMI AVI (it's missing the checksum between bytes 2 and 3). Even more unfortunate is that it accepts the transmitted AVI frame whether or not the checksum is valid. However, the AV amp reports that it sends the AVI frame onto the TV with a correct checksum:
82 02 0D 0E 12 28 08 1F ...
What this means is that I now have a way to read the various control packets on HDMI, but not with their checksums, and no way to validate whether the checksums are correct.
dri-devel@lists.freedesktop.org