diff mbox

[RFC/RFT,3/4] drm/bridge: dw-hdmi: Enable CSC even for DVI

Message ID 1484656294-6140-4-git-send-email-narmstrong@baylibre.com (mailing list archive)
State RFC
Headers show

Commit Message

Neil Armstrong Jan. 17, 2017, 12:31 p.m. UTC
If the input pixel format is not RGB, the CSC must be enabled in order to
provide valid pixel to DVI sinks.
This patch removes the hdmi only dependency on the CSC enabling.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 drivers/gpu/drm/bridge/dw-hdmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Laurent Pinchart Jan. 17, 2017, 2:40 p.m. UTC | #1
Hi Neil,

Thank you for the patch.

On Tuesday 17 Jan 2017 13:31:33 Neil Armstrong wrote:
> If the input pixel format is not RGB, the CSC must be enabled in order to
> provide valid pixel to DVI sinks.
> This patch removes the hdmi only dependency on the CSC enabling.
> 
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/gpu/drm/bridge/dw-hdmi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/dw-hdmi.c
> b/drivers/gpu/drm/bridge/dw-hdmi.c index 923e250..8a6a183 100644
> --- a/drivers/gpu/drm/bridge/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/dw-hdmi.c
> @@ -1331,8 +1331,8 @@ static void dw_hdmi_enable_video_path(struct dw_hdmi
> *hdmi) hdmi_writeb(hdmi, clkdis, HDMI_MC_CLKDIS);
>  	}
> 
> -	/* Enable color space conversion if needed (for HDMI sinks only). */
> -	if (hdmi->sink_is_hdmi && is_color_space_conversion(hdmi))
> +	/* Enable color space conversion if needed */
> +	if (is_color_space_conversion(hdmi))
>  		hdmi_writeb(hdmi, 
HDMI_MC_FLOWCTRL_FEED_THROUGH_OFF_CSC_IN_PATH,
>  			    HDMI_MC_FLOWCTRL);
>  	else
Jose Abreu Jan. 18, 2017, 10:22 a.m. UTC | #2
Hi Neil,


On 17-01-2017 12:31, Neil Armstrong wrote:
> If the input pixel format is not RGB, the CSC must be enabled in order to
> provide valid pixel to DVI sinks.
> This patch removes the hdmi only dependency on the CSC enabling.
>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>

I was going to say that you should make sure the output
colorspace is RGB or else DVI will fail to work, but I just
noticed the output colorspace is fixed in the code to RGB.
Though, that may change in the future.

Reviewed-by: Jose Abreu <joabreu@synopsys.com>

Best regards,
Jose Miguel Abreu

> ---
>  drivers/gpu/drm/bridge/dw-hdmi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/dw-hdmi.c b/drivers/gpu/drm/bridge/dw-hdmi.c
> index 923e250..8a6a183 100644
> --- a/drivers/gpu/drm/bridge/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/dw-hdmi.c
> @@ -1331,8 +1331,8 @@ static void dw_hdmi_enable_video_path(struct dw_hdmi *hdmi)
>  		hdmi_writeb(hdmi, clkdis, HDMI_MC_CLKDIS);
>  	}
>  
> -	/* Enable color space conversion if needed (for HDMI sinks only). */
> -	if (hdmi->sink_is_hdmi && is_color_space_conversion(hdmi))
> +	/* Enable color space conversion if needed */
> +	if (is_color_space_conversion(hdmi))
>  		hdmi_writeb(hdmi, HDMI_MC_FLOWCTRL_FEED_THROUGH_OFF_CSC_IN_PATH,
>  			    HDMI_MC_FLOWCTRL);
>  	else
Neil Armstrong Jan. 18, 2017, 11:15 a.m. UTC | #3
Hi jose,

On 01/18/2017 11:22 AM, Jose Abreu wrote:
> Hi Neil,
> 
> 
> On 17-01-2017 12:31, Neil Armstrong wrote:
>> If the input pixel format is not RGB, the CSC must be enabled in order to
>> provide valid pixel to DVI sinks.
>> This patch removes the hdmi only dependency on the CSC enabling.
>>
>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> 
> I was going to say that you should make sure the output
> colorspace is RGB or else DVI will fail to work, but I just
> noticed the output colorspace is fixed in the code to RGB.
> Though, that may change in the future.

Thanks for the review,
It would certainly need to enforce RGB output colorspace when in DVI mode.

Neil

> 
> Reviewed-by: Jose Abreu <joabreu@synopsys.com>
> 
> Best regards,
> Jose Miguel Abreu
> 
>> ---
>>  drivers/gpu/drm/bridge/dw-hdmi.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/dw-hdmi.c b/drivers/gpu/drm/bridge/dw-hdmi.c
>> index 923e250..8a6a183 100644
>> --- a/drivers/gpu/drm/bridge/dw-hdmi.c
>> +++ b/drivers/gpu/drm/bridge/dw-hdmi.c
>> @@ -1331,8 +1331,8 @@ static void dw_hdmi_enable_video_path(struct dw_hdmi *hdmi)
>>  		hdmi_writeb(hdmi, clkdis, HDMI_MC_CLKDIS);
>>  	}
>>  
>> -	/* Enable color space conversion if needed (for HDMI sinks only). */
>> -	if (hdmi->sink_is_hdmi && is_color_space_conversion(hdmi))
>> +	/* Enable color space conversion if needed */
>> +	if (is_color_space_conversion(hdmi))
>>  		hdmi_writeb(hdmi, HDMI_MC_FLOWCTRL_FEED_THROUGH_OFF_CSC_IN_PATH,
>>  			    HDMI_MC_FLOWCTRL);
>>  	else
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/bridge/dw-hdmi.c b/drivers/gpu/drm/bridge/dw-hdmi.c
index 923e250..8a6a183 100644
--- a/drivers/gpu/drm/bridge/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/dw-hdmi.c
@@ -1331,8 +1331,8 @@  static void dw_hdmi_enable_video_path(struct dw_hdmi *hdmi)
 		hdmi_writeb(hdmi, clkdis, HDMI_MC_CLKDIS);
 	}
 
-	/* Enable color space conversion if needed (for HDMI sinks only). */
-	if (hdmi->sink_is_hdmi && is_color_space_conversion(hdmi))
+	/* Enable color space conversion if needed */
+	if (is_color_space_conversion(hdmi))
 		hdmi_writeb(hdmi, HDMI_MC_FLOWCTRL_FEED_THROUGH_OFF_CSC_IN_PATH,
 			    HDMI_MC_FLOWCTRL);
 	else