[PATCH 14/18] drm/vc4: hdmi: Change CSC callback prototype
Thomas Zimmermann
tzimmermann at suse.de
Wed Apr 14 13:56:37 UTC 2021
Am 17.03.21 um 16:43 schrieb Maxime Ripard:
> In order to support the YUV output, we'll need the atomic state to know
> what is the state of the associated property in the CSC setup callback.
>
> Let's change the prototype of that callback to allow us to access it.
>
> Signed-off-by: Maxime Ripard <maxime at cerno.tech>
> ---
> drivers/gpu/drm/vc4/vc4_hdmi.c | 4 +++-
> drivers/gpu/drm/vc4/vc4_hdmi.h | 1 +
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
> index 9614de7303b8..56b5654c820f 100644
> --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
> +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
> @@ -490,6 +490,7 @@ static void vc4_hdmi_bridge_post_crtc_powerdown(struct drm_bridge *bridge,
> }
>
> static void vc4_hdmi_csc_setup(struct vc4_hdmi *vc4_hdmi,
> + struct drm_atomic_state *state,
With the line length updated to 100 characters, this might just fit onto
the previous line. Anyway
Acked-by: Thomas Zimmermann <tzimmermann at suse.de>
> const struct drm_display_mode *mode)
> {
> u32 csc_ctl;
> @@ -570,6 +571,7 @@ static void vc5_hdmi_set_csc_coeffs(struct vc4_hdmi
*vc4_hdmi,
> }
>
> static void vc5_hdmi_csc_setup(struct vc4_hdmi *vc4_hdmi,
> + struct drm_atomic_state *state,
> const struct drm_display_mode *mode)
> {
> u32 csc_ctl = VC5_MT_CP_CSC_CTL_ENABLE | VC4_SET_FIELD(VC4_HD_CSC_CTL_MODE_CUSTOM,
> @@ -860,7 +862,7 @@ static void vc4_hdmi_bridge_pre_crtc_enable(struct drm_bridge *bridge,
> struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder);
>
> if (vc4_hdmi->variant->csc_setup)
> - vc4_hdmi->variant->csc_setup(vc4_hdmi, mode);
> + vc4_hdmi->variant->csc_setup(vc4_hdmi, state, mode);
>
> HDMI_WRITE(HDMI_FIFO_CTL, VC4_HDMI_FIFO_CTL_MASTER_SLAVE_N);
> }
> diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.h b/drivers/gpu/drm/vc4/vc4_hdmi.h
> index d03c849d6ea0..cf5e58a08eb4 100644
> --- a/drivers/gpu/drm/vc4/vc4_hdmi.h
> +++ b/drivers/gpu/drm/vc4/vc4_hdmi.h
> @@ -78,6 +78,7 @@ struct vc4_hdmi_variant {
>
> /* Callback to enable / disable the CSC */
> void (*csc_setup)(struct vc4_hdmi *vc4_hdmi,
> + struct drm_atomic_state *state,
> const struct drm_display_mode *mode);
>
> /* Callback to configure the video timings in the HDMI block */
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20210414/5b7c2900/attachment.sig>
More information about the dri-devel
mailing list