On Friday, February 5th, 2021 at 6:34 PM, Ilia Mirkin <[email protected]> 
wrote:

> > +       if (asyw->image.pitch[0] != asyw->image.w * 4) {
>
> Rather than hard-coding to 4, make this look at the format (or cpp,
> which should be available somewhere too I think). (Yeah, currently we
> only expose RGBA8, but we should also be doing RGB5A1.)

Makes sense.

> > +               drm_dbg_atomic(dev,
> > +                              "Invalid cursor image pitch: image must be 
> > packed (pitch = %d, width = %d)",
> > +                              asyw->image.pitch[0], asyw->image.w);
> > +               return -EINVAL;
> > +       }
> >
> >         ret = head->func->curs_layout(head, asyw, asyh);
>
> And this will fail due to the width/height not being supported, right?

Oh right, this function will perform size checks, and is better than the one
I added above because it actually checks that the combination is supported.
Will remove the one above in v2.

Thanks for the comments!
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

Reply via email to