diff mbox series

[3/4] drm/meson: Enable DRM InfoFrame support on GXL, GXM and G12A

Message ID VI1PR03MB4206A326130A81DCBAA62CE8AC1C0@VI1PR03MB4206.eurprd03.prod.outlook.com (mailing list archive)
State New, archived
Headers show
Series drm/bridge: dw-hdmi: Add support for HDR metadata | expand

Commit Message

Jonas Karlman May 26, 2019, 9:20 p.m. UTC
This patch enables Dynamic Range and Mastering InfoFrame on GXL, GXM and G12A.

Cc: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
 drivers/gpu/drm/meson/meson_dw_hdmi.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Neil Armstrong June 5, 2019, 12:55 p.m. UTC | #1
On 26/05/2019 23:20, Jonas Karlman wrote:
> This patch enables Dynamic Range and Mastering InfoFrame on GXL, GXM and G12A.
> 
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
> ---
>  drivers/gpu/drm/meson/meson_dw_hdmi.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
> index df3f9ddd2234..f7761e698c03 100644
> --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
> +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
> @@ -966,6 +966,11 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master,
>  	dw_plat_data->input_bus_format = MEDIA_BUS_FMT_YUV8_1X24;
>  	dw_plat_data->input_bus_encoding = V4L2_YCBCR_ENC_709;
>  
> +	if (dw_hdmi_is_compatible(meson_dw_hdmi, "amlogic,meson-gxl-dw-hdmi") ||
> +	    dw_hdmi_is_compatible(meson_dw_hdmi, "amlogic,meson-gxm-dw-hdmi") ||
> +	    dw_hdmi_is_compatible(meson_dw_hdmi, "amlogic,meson-g12a-dw-hdmi"))
> +		dw_plat_data->drm_infoframe = true;
> +
>  	platform_set_drvdata(pdev, meson_dw_hdmi);
>  
>  	meson_dw_hdmi->hdmi = dw_hdmi_bind(pdev, encoder,
> 

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Andrzej Hajda June 24, 2019, 2:59 p.m. UTC | #2
On 26.05.2019 23:20, Jonas Karlman wrote:
> This patch enables Dynamic Range and Mastering InfoFrame on GXL, GXM and G12A.
>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
> ---
>  drivers/gpu/drm/meson/meson_dw_hdmi.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
> index df3f9ddd2234..f7761e698c03 100644
> --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
> +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
> @@ -966,6 +966,11 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master,
>  	dw_plat_data->input_bus_format = MEDIA_BUS_FMT_YUV8_1X24;
>  	dw_plat_data->input_bus_encoding = V4L2_YCBCR_ENC_709;
>  
> +	if (dw_hdmi_is_compatible(meson_dw_hdmi, "amlogic,meson-gxl-dw-hdmi") ||
> +	    dw_hdmi_is_compatible(meson_dw_hdmi, "amlogic,meson-gxm-dw-hdmi") ||
> +	    dw_hdmi_is_compatible(meson_dw_hdmi, "amlogic,meson-g12a-dw-hdmi"))
> +		dw_plat_data->drm_infoframe = true;
> +


I see it follows meson_dw_hdmi.c practices, but maybe it is time to drop
it and just add flag to meson_dw_hdmi_data, IMO the whole
dw_hdmi_is_compatible function should be removed

and replaced with fields/flags in meson_dw_hdmi_data - this is what
of_device_id.data field was created for.


Regards

Andrzej


>  	platform_set_drvdata(pdev, meson_dw_hdmi);
>  
>  	meson_dw_hdmi->hdmi = dw_hdmi_bind(pdev, encoder,
Neil Armstrong June 26, 2019, 9:16 a.m. UTC | #3
On 24/06/2019 16:59, Andrzej Hajda wrote:
> On 26.05.2019 23:20, Jonas Karlman wrote:
>> This patch enables Dynamic Range and Mastering InfoFrame on GXL, GXM and G12A.
>>
>> Cc: Neil Armstrong <narmstrong@baylibre.com>
>> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
>> ---
>>  drivers/gpu/drm/meson/meson_dw_hdmi.c | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
>> index df3f9ddd2234..f7761e698c03 100644
>> --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
>> +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
>> @@ -966,6 +966,11 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master,
>>  	dw_plat_data->input_bus_format = MEDIA_BUS_FMT_YUV8_1X24;
>>  	dw_plat_data->input_bus_encoding = V4L2_YCBCR_ENC_709;
>>  
>> +	if (dw_hdmi_is_compatible(meson_dw_hdmi, "amlogic,meson-gxl-dw-hdmi") ||
>> +	    dw_hdmi_is_compatible(meson_dw_hdmi, "amlogic,meson-gxm-dw-hdmi") ||
>> +	    dw_hdmi_is_compatible(meson_dw_hdmi, "amlogic,meson-g12a-dw-hdmi"))
>> +		dw_plat_data->drm_infoframe = true;
>> +
> 
> 
> I see it follows meson_dw_hdmi.c practices, but maybe it is time to drop
> it and just add flag to meson_dw_hdmi_data, IMO the whole
> dw_hdmi_is_compatible function should be removed
> 
> and replaced with fields/flags in meson_dw_hdmi_data - this is what
> of_device_id.data field was created for.

It's in our cleanup process, this will pushed shortly, but in the meantime it
can be left as-is until cleanup is pushed, I'll sort it manually if both
happens in the same time.

Neil

> 
> 
> Regards
> 
> Andrzej
> 
> 
>>  	platform_set_drvdata(pdev, meson_dw_hdmi);
>>  
>>  	meson_dw_hdmi->hdmi = dw_hdmi_bind(pdev, encoder,
> 
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
index df3f9ddd2234..f7761e698c03 100644
--- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
+++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
@@ -966,6 +966,11 @@  static int meson_dw_hdmi_bind(struct device *dev, struct device *master,
 	dw_plat_data->input_bus_format = MEDIA_BUS_FMT_YUV8_1X24;
 	dw_plat_data->input_bus_encoding = V4L2_YCBCR_ENC_709;
 
+	if (dw_hdmi_is_compatible(meson_dw_hdmi, "amlogic,meson-gxl-dw-hdmi") ||
+	    dw_hdmi_is_compatible(meson_dw_hdmi, "amlogic,meson-gxm-dw-hdmi") ||
+	    dw_hdmi_is_compatible(meson_dw_hdmi, "amlogic,meson-g12a-dw-hdmi"))
+		dw_plat_data->drm_infoframe = true;
+
 	platform_set_drvdata(pdev, meson_dw_hdmi);
 
 	meson_dw_hdmi->hdmi = dw_hdmi_bind(pdev, encoder,