]> 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)
committerMaxime Ripard <maxime@cerno.tech>
Thu, 28 Jan 2021 09:27:26 +0000 (10:27 +0100)
commit722c4aa9c2b2b8ccc0fe002e4c0cf3246766551e
tree6f8af58099c85d8fff606ade29d1a9821428c662
parent36527fc0c10802664b613dd487e9a75f4dd33a5c
drm/vc4: hdmi: Fix register offset with longer CEC messages

The code prior to 080d752665c7 ("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: 080d752665c7 ("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
drivers/gpu/drm/vc4/vc4_hdmi.c