This patch enables Dynamic Range and Mastering InfoFrame on H6.

Cc: Maxime Ripard <maxime.rip...@bootlin.com>
Cc: Jernej Skrabec <jernej.skra...@siol.net>
Signed-off-by: Jonas Karlman <jo...@kwiboo.se>
---
 drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c | 2 ++
 drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c 
b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
index 39d8509d96a0..b80164dd8ad8 100644
--- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
+++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c
@@ -189,6 +189,7 @@ static int sun8i_dw_hdmi_bind(struct device *dev, struct 
device *master,
        sun8i_hdmi_phy_init(hdmi->phy);
 
        plat_data->mode_valid = hdmi->quirks->mode_valid;
+       plat_data->drm_infoframe = hdmi->quirks->drm_infoframe;
        sun8i_hdmi_phy_set_ops(hdmi->phy, plat_data);
 
        platform_set_drvdata(pdev, hdmi);
@@ -255,6 +256,7 @@ static const struct sun8i_dw_hdmi_quirks sun8i_a83t_quirks 
= {
 
 static const struct sun8i_dw_hdmi_quirks sun50i_h6_quirks = {
        .mode_valid = sun8i_dw_hdmi_mode_valid_h6,
+       .drm_infoframe = true,
 };
 
 static const struct of_device_id sun8i_dw_hdmi_dt_ids[] = {
diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h 
b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h
index 720c5aa8adc1..2a0ec08ee236 100644
--- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h
+++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h
@@ -178,6 +178,7 @@ struct sun8i_dw_hdmi_quirks {
        enum drm_mode_status (*mode_valid)(struct drm_connector *connector,
                                           const struct drm_display_mode *mode);
        unsigned int set_rate : 1;
+       unsigned int drm_infoframe : 1;
 };
 
 struct sun8i_dw_hdmi {
-- 
2.17.1

Reply via email to