On Wed, Oct 08, 2025 at 02:04:08PM +0200, Maxime Ripard wrote:
> The MSM mdp5 driver relies on a drm_private_obj, that is initialized by
> allocating and initializing a state, and then passing it to
> drm_private_obj_init.
> 
> Since we're gradually moving away from that pattern to the more
> established one relying on a reset implementation, let's migrate this
> instance to the new pattern.
> 
> Signed-off-by: Maxime Ripard <[email protected]>
> 
> ---
> 
> Cc: Rob Clark <[email protected]>
> Cc: Dmitry Baryshkov <[email protected]>
> Cc: Abhinav Kumar <[email protected]>
> Cc: Jessica Zhang <[email protected]>
> Cc: Sean Paul <[email protected]>
> Cc: Marijn Suijten <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> ---
>  drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 31 ++++++++++++++++++++++---------
>  1 file changed, 22 insertions(+), 9 deletions(-)
> 
>  
>  static int mdp5_global_obj_init(struct mdp5_kms *mdp5_kms)

static void (up to you). Or just inline it.

>  {
> -     struct mdp5_global_state *state;
> -
> -     state = kzalloc(sizeof(*state), GFP_KERNEL);
> -     if (!state)
> -             return -ENOMEM;
> -
> -     state->mdp5_kms = mdp5_kms;
> -
>       drm_atomic_private_obj_init(mdp5_kms->dev, &mdp5_kms->glob_state,
> -                                 &state->base,
> +                                 NULL,
>                                   &mdp5_global_state_funcs);
>       return 0;
>  }
>  
>  static void mdp5_enable_commit(struct msm_kms *kms)
> 
> -- 
> 2.51.0
> 

-- 
With best wishes
Dmitry

Reply via email to