[Intel-gfx] [PATCH v2 3/9] drm/plane-helper: Add drm_plane_helper_check_state()

Daniel Kurtz djkurtz at chromium.org
Mon Aug 8 07:29:24 UTC 2016


Hi Ville,

Two fixes inline...

On Wed, Jul 27, 2016 at 1:34 AM, <ville.syrjala at linux.intel.com> wrote:
>
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Add a version of drm_plane_helper_check_update() which takes a plane
> state instead of having the caller pass in everything.
>
> And to reduce code duplication, let's reimplement
> drm_plane_helper_check_update() in terms of the new function, by
> having a tempororary plane state on the stack.
>
> v2: Add a note that the functions modifies the state (Chris)
>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

[snip...]

> +int drm_plane_helper_check_update(struct drm_plane *plane,
> +                                 struct drm_crtc *crtc,
> +                                 struct drm_framebuffer *fb,
> +                                 struct drm_rect *src,
> +                                 struct drm_rect *dst,
> +                                 const struct drm_rect *clip,
> +                                 unsigned int rotation,
> +                                 int min_scale,
> +                                 int max_scale,
> +                                 bool can_position,
> +                                 bool can_update_disabled,
> +                                 bool *visible)
> +{
> +       struct drm_plane_state state = {
> +               .plane = plane,
> +               .crtc = crtc,
> +               .fb = fb,
> +               .src_x = src->x1,
> +               .src_y = src->x2,

This should be:
src->y1

> +               .src_w = drm_rect_width(src),
> +               .src_h = drm_rect_height(src),
> +               .crtc_x = dst->x1,
> +               .crtc_y = dst->x2,

And this should be:
dst->y1

Thanks,
-Dan


More information about the dri-devel mailing list