summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vc4/vc4_hdmi.h
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2020-09-03 11:01:19 +0300
committerMaxime Ripard <maxime@cerno.tech>2020-09-07 19:05:33 +0300
commit47c167b757638e747717ab7e5d7e8803c446d943 (patch)
tree59913406a0fd1ae4ac2e68c02fa978a97113b4dc /drivers/gpu/drm/vc4/vc4_hdmi.h
parent66bf1c30e0e5bcc9d6965157a8581f36577c45a4 (diff)
downloadlinux-47c167b757638e747717ab7e5d7e8803c446d943.tar.xz
drm/vc4: hdmi: Retrieve the vc4_hdmi at unbind using our device
The unbind function needs to retrieve a vc4_hdmi structure pointer through the struct device that we're given since we want to support multiple HDMI controllers. However, our optional ASoC support doesn't make that trivial since it will overwrite the device drvdata if we use it, but obviously won't if we don't use it. Let's make sure the fields are at the proper offset to be able to cast between the snd_soc_card structure and the vc4_hdmi structure transparently so we can support both cases. Signed-off-by: Maxime Ripard <maxime@cerno.tech> Tested-by: Chanwoo Choi <cw00.choi@samsung.com> Tested-by: Hoegeun Kwon <hoegeun.kwon@samsung.com> Tested-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/717082cba06b5c06280f26c56c08aee512365ed3.1599120059.git-series.maxime@cerno.tech
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_hdmi.h')
-rw-r--r--drivers/gpu/drm/vc4/vc4_hdmi.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.h b/drivers/gpu/drm/vc4/vc4_hdmi.h
index 749a807cd1f3..d43462789450 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.h
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.h
@@ -53,13 +53,13 @@ struct vc4_hdmi_audio {
/* General HDMI hardware state. */
struct vc4_hdmi {
+ struct vc4_hdmi_audio audio;
+
struct platform_device *pdev;
struct vc4_hdmi_encoder encoder;
struct vc4_hdmi_connector connector;
- struct vc4_hdmi_audio audio;
-
struct i2c_adapter *ddc;
void __iomem *hdmicore_regs;
void __iomem *hd_regs;