nouveau.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Simon Ser <contact@emersion.fr>
To: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: nouveau <nouveau@lists.freedesktop.org>, Ben Skeggs <bskeggs@redhat.com>
Subject: Re: [Nouveau] [PATCH v3] nouveau/dispnv50: add cursor pitch check
Date: Fri, 05 Feb 2021 22:38:58 +0000	[thread overview]
Message-ID: <ZSeE7alpbURtGHRCp2H1qh--KizDqMiVO_97OPJqnd9OfBEbiVatIR87ltr6WllVeSrTsz4-KoS0PXNzCGg9_WSj2F6SM0l0t-tPcuxFf48=@emersion.fr> (raw)
In-Reply-To: <CAKb7Uvi0qV7MMRQ6kDw_aNtcVjcQj7zZ=TNLxxQhta9fRJ0vCA@mail.gmail.com>

On Friday, February 5th, 2021 at 11:36 PM, Ilia Mirkin <imirkin@alum.mit.edu> wrote:

> > --- a/drivers/gpu/drm/nouveau/dispnv50/curs507a.c
> > +++ b/drivers/gpu/drm/nouveau/dispnv50/curs507a.c
> > @@ -30,6 +30,7 @@
> >
> >  #include <drm/drm_atomic_helper.h>
> >  #include <drm/drm_plane_helper.h>
> > +#include <drm/drm_fourcc.h>
>
> Why is this needed?

This is needed for the definition of struct drm_format_info.

> >  bool
> >  curs507a_space(struct nv50_wndw *wndw)
> > @@ -99,6 +100,8 @@ curs507a_acquire(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw,
> >                  struct nv50_head_atom *asyh)
> >  {
> >         struct nv50_head *head = nv50_head(asyw->state.crtc);
> > +       struct nouveau_drm *drm = nouveau_drm(head->base.base.dev);
> > +       struct drm_framebuffer *fb = asyw->state.fb;
> >         int ret;
> >
> >         ret = drm_atomic_helper_check_plane_state(&asyw->state, &asyh->state,
> > @@ -109,14 +112,36 @@ curs507a_acquire(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw,
> >         if (ret || !asyh->curs.visible)
> >                 return ret;
> >
> > -       if (asyw->image.w != asyw->image.h)
> > +       if (asyw->image.w != asyw->image.h) {
> > +               NV_ATOMIC(drm,
> > +                         "Invalid cursor image size: width (%d) must match height (%d)\n",
> > +                         asyw->image.w, asyw->image.h);
>
> Maybe keep with the style of the other NV_ATOMIC's, e.g. include %s:
> at the beginning with wndw->plane.name as the value?

Good idea.
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

      parent reply	other threads:[~2021-02-05 22:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05 22:24 [Nouveau] [PATCH v3] nouveau/dispnv50: add cursor pitch check Simon Ser
2021-02-05 22:36 ` Ilia Mirkin
2021-02-05 22:38   ` Lyude Paul
2021-02-05 22:38   ` Simon Ser [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='ZSeE7alpbURtGHRCp2H1qh--KizDqMiVO_97OPJqnd9OfBEbiVatIR87ltr6WllVeSrTsz4-KoS0PXNzCGg9_WSj2F6SM0l0t-tPcuxFf48=@emersion.fr' \
    --to=contact@emersion.fr \
    --cc=bskeggs@redhat.com \
    --cc=imirkin@alum.mit.edu \
    --cc=nouveau@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).