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

Ville Syrjälä ville.syrjala at linux.intel.com
Mon Aug 8 07:44:11 UTC 2016


On Mon, Aug 08, 2016 at 03:29:24PM +0800, Daniel Kurtz wrote:
> 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

Whoops. Copypaste fail, or something. Thanks for catching those.

-- 
Ville Syrjälä
Intel OTC


More information about the Intel-gfx mailing list