[Intel-gfx] [PATCH] drm/i915/display: Bitwise or the conversion colour specifier together

Jani Nikula jani.nikula at intel.com
Wed Dec 23 10:51:58 UTC 2020


On Wed, 23 Dec 2020, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> drivers/gpu/drm/i915/display/intel_dp.c:6922 intel_dp_update_420() warn: should this be a bitwise op?
> drivers/gpu/drm/i915/display/intel_dp.c:6922 intel_dp_update_420() warn: should this be a bitwise op?
> drivers/gpu/drm/i915/display/intel_dp.c:6923 intel_dp_update_420() warn: should this be a bitwise op?
>
> Inside drm_dp_downstream_rgb_to_ycbcr_conversion(), that paramter
> 'color_spc' is used as return port_cap[3] & color_spc, implying that it
> is indeed a mask and not a boolean value.

So this one belongs in topic/dp-hdmi-2.1-pcon branch.

Purely based on the context this is the right thing to do, so:

Reviewed-by: Jani Nikula <jani.nikula at intel.com>

Ankit, please test the patch in case it uncovers some other
issues. It'll impact the RGB to YCbCr conversion.

BR,
Jani.


>
> Fixes: 522508b665df ("drm/i915/display: Let PCON convert from RGB to YCbCr if it can")
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Uma Shankar <uma.shankar at intel.com>
> Cc: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
> Cc: Jani Nikula <jani.nikula at intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 8b4b2ea52859..157a850a83a7 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -6918,8 +6918,8 @@ intel_dp_update_420(struct intel_dp *intel_dp)
>  							intel_dp->downstream_ports);
>  	rgb_to_ycbcr = drm_dp_downstream_rgb_to_ycbcr_conversion(intel_dp->dpcd,
>  								 intel_dp->downstream_ports,
> -								 DP_DS_HDMI_BT601_RGB_YCBCR_CONV ||
> -								 DP_DS_HDMI_BT709_RGB_YCBCR_CONV ||
> +								 DP_DS_HDMI_BT601_RGB_YCBCR_CONV |
> +								 DP_DS_HDMI_BT709_RGB_YCBCR_CONV |
>  								 DP_DS_HDMI_BT2020_RGB_YCBCR_CONV);
>  
>  	if (INTEL_GEN(i915) >= 11) {

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list