On Tue, 4 Apr 2017 17:54:39 +0100 Daniel Stone <[email protected]> wrote:
> Retain drm_plane tracking objects for all actual DRM planes when using > universal planes, not just overlay planes. Rename uses of 'sprite' to > 'plane' to make it clear that it can now be any kind of plane, not just > an overlay/sprite. > > These are currently unused. > > Differential Revision: https://phabricator.freedesktop.org/D1496 > > Signed-off-by: Daniel Stone <[email protected]> > --- > libweston/compositor-drm.c | 74 > +++++++++++++++++++++++++--------------------- > 1 file changed, 41 insertions(+), 33 deletions(-) > > diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c > index 04491da6..afc36fda 100644 > --- a/libweston/compositor-drm.c > +++ b/libweston/compositor-drm.c > @@ -173,7 +173,7 @@ struct drm_backend { > int min_height, max_height; > int no_addfb2; > > - struct wl_list sprite_list; > + struct wl_list plane_list; > int sprites_are_broken; > int sprites_hidden; > > @@ -1188,7 +1188,7 @@ drm_output_repaint(struct weston_output *output_base, > struct drm_output *output = to_drm_output(output_base); > struct drm_backend *backend = > to_drm_backend(output->base.compositor); > - struct drm_plane *s; > + struct drm_plane *p; > struct drm_mode *mode; > int ret = 0; Ah, this is where the rest of the renames come in. Nice. > > @@ -1238,26 +1238,31 @@ drm_output_repaint(struct weston_output *output_base, > /* > * Now, update all the sprite surfaces > */ > - wl_list_for_each(s, &backend->sprite_list, link) { > + wl_list_for_each(p, &backend->plane_list, link) { > uint32_t flags = 0, fb_id = 0; > drmVBlank vbl = { > .request.type = DRM_VBLANK_RELATIVE | DRM_VBLANK_EVENT, > .request.sequence = 1, > }; > > - if ((!s->fb_current && !s->fb_pending) || > - !drm_plane_crtc_supported(output, s)) > + if (p->type != WDRM_PLANE_TYPE_OVERLAY) > + continue; > + > + /* XXX: Set output much earlier, so we don't attempt to place > + * planes on entirely the wrong output. */ The comment comes back! > + if ((!p->fb_current && !p->fb_pending) || > + !drm_plane_crtc_supported(output, p)) > continue; > > - if (s->fb_pending && !backend->sprites_hidden) > - fb_id = s->fb_pending->fb_id; > + if (p->fb_pending && !backend->sprites_hidden) > + fb_id = p->fb_pending->fb_id; > > - ret = drmModeSetPlane(backend->drm.fd, s->plane_id, > + ret = drmModeSetPlane(backend->drm.fd, p->plane_id, > output->crtc_id, fb_id, flags, > - s->dest_x, s->dest_y, > - s->dest_w, s->dest_h, > - s->src_x, s->src_y, > - s->src_w, s->src_h); > + p->dest_x, p->dest_y, > + p->dest_w, p->dest_h, > + p->src_x, p->src_y, > + p->src_w, p->src_h); Reviewed-by: Pekka Paalanen <[email protected]> Thanks, pq
pgp2nQRyGglX1.pgp
Description: OpenPGP digital signature
_______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
