[PATCH 3/8] drm/vc4: kms: Move HVS state helpers around

Thomas Zimmermann tzimmermann at suse.de
Thu Nov 19 09:26:32 UTC 2020


I'd merge this into the patch that introduces the function.

Am 13.11.20 um 16:29 schrieb Maxime Ripard:
> We're going to use those helpers in functions higher in that file, let's
> move it around.
> 
> Signed-off-by: Maxime Ripard <maxime at cerno.tech>
> ---
>   drivers/gpu/drm/vc4/vc4_kms.c | 26 +++++++++++++-------------
>   1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
> index 7ef164afa9e2..d6712924681e 100644
> --- a/drivers/gpu/drm/vc4/vc4_kms.c
> +++ b/drivers/gpu/drm/vc4/vc4_kms.c
> @@ -182,6 +182,19 @@ vc4_ctm_commit(struct vc4_dev *vc4, struct drm_atomic_state *state)
>   		  VC4_SET_FIELD(ctm_state->fifo, SCALER_OLEDOFFS_DISPFIFO));
>   }
>   
> +static struct vc4_hvs_state *
> +vc4_hvs_get_global_state(struct drm_atomic_state *state)
> +{
> +	struct vc4_dev *vc4 = to_vc4_dev(state->dev);
> +	struct drm_private_state *priv_state;
> +
> +	priv_state = drm_atomic_get_private_obj_state(state, &vc4->hvs_channels);
> +	if (IS_ERR(priv_state))
> +		return ERR_CAST(priv_state);
> +
> +	return to_vc4_hvs_state(priv_state);
> +}
> +
>   static void vc4_hvs_pv_muxing_commit(struct vc4_dev *vc4,
>   				     struct drm_atomic_state *state)
>   {
> @@ -730,19 +743,6 @@ static int vc4_hvs_channels_obj_init(struct vc4_dev *vc4)
>   	return drmm_add_action_or_reset(&vc4->base, vc4_hvs_channels_obj_fini, NULL);
>   }
>   
> -static struct vc4_hvs_state *
> -vc4_hvs_get_global_state(struct drm_atomic_state *state)
> -{
> -	struct vc4_dev *vc4 = to_vc4_dev(state->dev);
> -	struct drm_private_state *priv_state;
> -
> -	priv_state = drm_atomic_get_private_obj_state(state, &vc4->hvs_channels);
> -	if (IS_ERR(priv_state))
> -		return ERR_CAST(priv_state);
> -
> -	return to_vc4_hvs_state(priv_state);
> -}
> -
>   /*
>    * The BCM2711 HVS has up to 7 output connected to the pixelvalves and
>    * the TXP (and therefore all the CRTCs found on that platform).
> 

-- 
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_0x680DC11D530B7A23.asc
Type: application/pgp-keys
Size: 7435 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20201119/89643f15/attachment.key>
-------------- 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/20201119/89643f15/attachment.sig>


More information about the dri-devel mailing list