Re: [PATCH 3/6] drm/i915: Fix overlay colorkey for 30bpp and 8bpp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Ville Syrjala (2019-10-28 11:30:33)
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> As with the video sprites the colorkey is always specified
> as 8bpc.

> For 10bpc primary plane formats we just ignore the
> two lsbs of each component.

Sensible.

> For C8 we'll replicate the same
> key to each chanel, which is what the hardware wants.

Gray, ok.

> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/display/intel_overlay.c | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_overlay.c b/drivers/gpu/drm/i915/display/intel_overlay.c
> index 848ce07a8ec2..23829374f751 100644
> --- a/drivers/gpu/drm/i915/display/intel_overlay.c
> +++ b/drivers/gpu/drm/i915/display/intel_overlay.c
> @@ -101,12 +101,15 @@
>  #define CLK_RGB24_MASK         0x0
>  #define CLK_RGB16_MASK         0x070307
>  #define CLK_RGB15_MASK         0x070707
> -#define CLK_RGB8I_MASK         0xffffff
>  
> +#define RGB30_TO_COLORKEY(c) \
> +       (((c & 0x3FC00000) >> 6) | ((c & 0x000FF000) >> 4) | ((c & 0x000003FC) >> 2))
             0x00ff00000               0x0000ff00                0x000000ff

Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux