Thomas Zimmermann <tzimmerm...@suse.de> writes:

Hello Thomas,

> The plane-state type struct drm_sysfb_plane_state will store the
> helper for blitting to the scanout buffer.
>
> Signed-off-by: Thomas Zimmermann <tzimmerm...@suse.de>
> ---

Looks good to me. I've just a minor comment, but feel free to ignore it.

Reviewed-by: Javier Martinez Canillas <javi...@redhat.com>

> +
> +struct drm_plane_state *drm_sysfb_plane_atomic_duplicate_state(struct 
> drm_plane *plane)
> +{
> +     struct drm_device *dev = plane->dev;
> +     struct drm_plane_state *plane_state = plane->state;
> +     struct drm_sysfb_plane_state *new_sysfb_plane_state;

IMO the code is easier to read if you add an additonal variable, e.g:

        struct drm_shadow_plane_state *new_shadow_plane_state;
> +
> +     if (drm_WARN_ON(dev, !plane_state))
> +             return NULL;
> +
> +     new_sysfb_plane_state = kzalloc(sizeof(*new_sysfb_plane_state), 
> GFP_KERNEL);
> +     if (!new_sysfb_plane_state)
> +             return NULL;
> +
> +     sysfb_plane_state = to_drm_sysfb_plane_state(plane_state);
        new_shadow_plane_state = &new_sysfb_plane_state->base;

        __drm_gem_duplicate_shadow_plane_state(plane, new_shadow_plane_state);

        return &new_shadow_plane_state->base;

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat

Reply via email to