diff mbox series

drm/i915/dp: Fix a logical vs bitwise OR bug

Message ID YAkaBa22zvbXKd4E@mwanda (mailing list archive)
State New, archived
Headers show
Series drm/i915/dp: Fix a logical vs bitwise OR bug | expand

Commit Message

Dan Carpenter Jan. 21, 2021, 6:07 a.m. UTC
This was supposed to be | instead of ||.

Fixes: 522508b665df ("drm/i915/display: Let PCON convert from RGB to YCbCr if it can")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jani Nikula Jan. 21, 2021, 9:12 a.m. UTC | #1
On Thu, 21 Jan 2021, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> This was supposed to be | instead of ||.
>
> Fixes: 522508b665df ("drm/i915/display: Let PCON convert from RGB to YCbCr if it can")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Thanks, but we already have the fix [1] for this that I thought was
pushed by now [2].

Chris?


BR,
Jani.


[1] http://lore.kernel.org/r/20201223103917.14687-1-chris@chris-wilson.co.uk
[2] http://lore.kernel.org/r/161069893278.19482.3803444937046587332@build.alporthouse.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 8a00e609085f..9c6f427b2703 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -6955,8 +6955,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) {
Chris Wilson Jan. 21, 2021, 9:19 a.m. UTC | #2
Quoting Jani Nikula (2021-01-21 09:12:27)
> On Thu, 21 Jan 2021, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> > This was supposed to be | instead of ||.
> >
> > Fixes: 522508b665df ("drm/i915/display: Let PCON convert from RGB to YCbCr if it can")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> Thanks, but we already have the fix [1] for this that I thought was
> pushed by now [2].
> 
> Chris?

6b20b734bbf1 ("drm/i915/display: Bitwise or the conversion colour specifier together")
in
  remotes/drm-intel/drm-intel-next
  remotes/drm-intel/for-linux-next
should be visible.
-Chris
Jani Nikula Jan. 21, 2021, 10:09 a.m. UTC | #3
On Thu, 21 Jan 2021, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting Jani Nikula (2021-01-21 09:12:27)
>> On Thu, 21 Jan 2021, Dan Carpenter <dan.carpenter@oracle.com> wrote:
>> > This was supposed to be | instead of ||.
>> >
>> > Fixes: 522508b665df ("drm/i915/display: Let PCON convert from RGB to YCbCr if it can")
>> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>> 
>> Thanks, but we already have the fix [1] for this that I thought was
>> pushed by now [2].
>> 
>> Chris?
>
> 6b20b734bbf1 ("drm/i915/display: Bitwise or the conversion colour specifier together")
> in
>   remotes/drm-intel/drm-intel-next
>   remotes/drm-intel/for-linux-next
> should be visible.

Oh, it totally is. Where's my brown paper bag when I need it?

BR,
Jani.
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 8a00e609085f..9c6f427b2703 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -6955,8 +6955,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) {