]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vc4: hdmi: Fix register offset with longer CEC messages
authorDom Cobley <popcornmix@gmail.com>
Mon, 11 Jan 2021 14:22:57 +0000 (15:22 +0100)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 9 Feb 2021 16:14:10 +0000 (17:14 +0100)
commitb2376e38694f721ca146db7a863b7020e1e8eee1
tree91368448d1a3990c1f40bb9d575e1f8a7a0622a8
parentc13d7b64bcb79731e1e22c1cc63fe9f9e019983a
drm/vc4: hdmi: Fix register offset with longer CEC messages

The code prior to 4a942fcd77b5 ("drm/vc4: hdmi: Implement a register
layout abstraction") was relying on the fact that the register offset
was incremented by 4 for each readl call. That worked since the register
width is 4 bytes.

However, since that commit the HDMI_READ macro is now taking an enum,
and the offset doesn't increment by 4 but 1 now. Divide the index by 4
to fix this.

Fixes: 4a942fcd77b5 ("drm/vc4: hdmi: Implement a register layout abstraction")
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Tested-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Link: https://patchwork.freedesktop.org/patch/msgid/20210111142309.193441-4-maxime@cerno.tech
(cherry picked from commit e9c9481f373eb7344f9e973eb28fc6e9d0f46485)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
drivers/gpu/drm/vc4/vc4_hdmi.c