drm/verisilicon: hdmi: Add audio_init feature 01/294601/2
authorHoegeun Kwon <hoegeun.kwon@samsung.com>
Wed, 21 Jun 2023 06:47:35 +0000 (15:47 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Fri, 23 Jun 2023 01:07:34 +0000 (10:07 +0900)
Add hdmi_audio_init to use audio in hdmi driver.

Change-Id: If878ee4ee4a1665d91a34ef4f5c5f6d2ab60840e
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
drivers/gpu/drm/verisilicon/starfive_hdmi.c
drivers/gpu/drm/verisilicon/starfive_hdmi.h

index 720e06f..ccd307b 100644 (file)
@@ -852,6 +852,10 @@ static int starfive_hdmi_bind(struct device *dev, struct device *master,
        if (ret < 0)
                goto err_cleanup_hdmi;
 
+       ret = starfive_hdmi_audio_init(hdmi);
+       if (ret)
+               dev_err(dev, "failed to audio init\n");
+
        pm_runtime_use_autosuspend(&pdev->dev);
        pm_runtime_set_autosuspend_delay(&pdev->dev, 500);
        pm_runtime_enable(&pdev->dev);
index d151c61..28c0747 100644 (file)
@@ -293,4 +293,10 @@ struct starfive_hdmi {
        const struct post_pll_config    *post_cfg;
 };
 
+int starfive_hdmi_audio_init(struct starfive_hdmi *hdmi);
+inline u8 hdmi_readb(struct starfive_hdmi *hdmi, u16 offset);
+inline void hdmi_writeb(struct starfive_hdmi *hdmi, u16 offset, u32 val);
+inline void hdmi_modb(struct starfive_hdmi *hdmi, u16 offset,
+                            u32 msk, u32 val);
+
 #endif /* __STARFIVE_HDMI_H__ */