[PATCH v16 08/23] compositor-drm: Use plane_coords_for_view for cursor
daniel at fooishbar.org
Fri Jul 6 14:15:24 UTC 2018
On Fri, 6 Jul 2018 at 14:14, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> On Thu, 5 Jul 2018 18:16:35 +0100 Daniel Stone <daniels at collabora.com> wrote:
> > Use the new helper to populate the cursor state as well, with some
> > special-case handling to account for how we always upload a full-size
> > BO.
> > As this now fully takes care of buffer transformations, HiDPI client
> > cursors work, and we also clip the cursor plane completely to CRTC
> > bounds.
> > Signed-off-by: Daniel Stone <daniels at collabora.com>
> > Reported-by: Derek Foreman <derekf at osg.samsung.com>
> > Tested-by: Emre Ucan <eucan at de.adit-jv.com>
> > Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/118
> > ---
> > libweston/compositor-drm.c | 68 ++++++++++++++++++--------------------
> > 1 file changed, 32 insertions(+), 36 deletions(-)
> The subject should say plane_state_coords_for_view.
Er ... quite.
> > @@ -2857,18 +2857,16 @@ cursor_bo_update(struct drm_backend *b, struct gbm_bo *bo,
> > assert(buffer && buffer->shm_buffer);
> > assert(buffer->shm_buffer == wl_shm_buffer_get(buffer->resource));
> > - assert(ev->surface->width <= b->cursor_width);
> > - assert(ev->surface->height <= b->cursor_height);
> Rather than removing these asserts, it would be better to fix them to
> use buffer size. It would catch overflowing buf.
> An assert to ensure bytes-per-pixel is the hardcoded four below would
> be a nice addition.
Thanks, I've included these (apart from the bpp assertion, which I'll
send as a follow-on), as well as all your other suggested fixups (as
discussed on IRC), and pushed up to 'compositor-drm: Support modifiers
for drm_fb' as those four patches already had R-b.
I've force-pushed the remainder of the series, rebased on top of what
I've just pushed, to the wip/2018-07/atomic-v16 branch.
Thanks a lot for the very speedy review!
More information about the wayland-devel