[PATCH v5 01/26] drm: sun4i: de2/de3: Change CSC argument
Dmitry Baryshkov
dmitry.baryshkov at linaro.org
Sat Oct 19 07:11:03 PDT 2024
On Sun, Sep 29, 2024 at 10:04:33PM +1300, Ryan Walklin wrote:
> From: Jernej Skrabec <jernej.skrabec at gmail.com>
>
> Currently, CSC module takes care only for converting YUV to RGB.
> However, DE3 is more suited to work in YUV color space. Change CSC mode
> argument to format type to be more neutral. New argument only tells
> layer format type and doesn't imply output type.
>
> This commit doesn't make any functional change.
>
> Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
> Signed-off-by: Ryan Walklin <ryan at testtoast.com>
> Reviewed-by: Andre Przywara <andre.przywara at arm.com>
> ---
> drivers/gpu/drm/sun4i/sun8i_csc.c | 22 +++++++++++-----------
> drivers/gpu/drm/sun4i/sun8i_csc.h | 10 +++++-----
> drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 16 ++++++++--------
> 3 files changed, 24 insertions(+), 24 deletions(-)
>
> void sun8i_csc_enable_ccsc(struct sun8i_mixer *mixer, int layer, bool enable)
> diff --git a/drivers/gpu/drm/sun4i/sun8i_csc.h b/drivers/gpu/drm/sun4i/sun8i_csc.h
> index 828b86fd0cabb..7322770f39f03 100644
> --- a/drivers/gpu/drm/sun4i/sun8i_csc.h
> +++ b/drivers/gpu/drm/sun4i/sun8i_csc.h
> @@ -22,14 +22,14 @@ struct sun8i_mixer;
>
> #define SUN8I_CSC_CTRL_EN BIT(0)
>
> -enum sun8i_csc_mode {
> - SUN8I_CSC_MODE_OFF,
> - SUN8I_CSC_MODE_YUV2RGB,
> - SUN8I_CSC_MODE_YVU2RGB,
> +enum format_type {
enum sun8i_format_type, unless there is a strong reason to name it
otherwise.
> + FORMAT_TYPE_RGB,
> + FORMAT_TYPE_YUV,
> + FORMAT_TYPE_YVU,
> };
>
> void sun8i_csc_set_ccsc_coefficients(struct sun8i_mixer *mixer, int layer,
> - enum sun8i_csc_mode mode,
> + enum format_type fmt_type,
> enum drm_color_encoding encoding,
> enum drm_color_range range);
> void sun8i_csc_enable_ccsc(struct sun8i_mixer *mixer, int layer, bool enable);
>
--
With best wishes
Dmitry
More information about the linux-arm-kernel
mailing list