Re: [PATCH] nouveau/dispnv50: add cursor size/pitch checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]<

 



On Friday, February 5th, 2021 at 6:34 PM, Ilia Mirkin <imirkin@xxxxxxxxxxxx> 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
Nouveau@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/nouveau



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux