dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Sean Paul <seanpaul@chromium.org>
To: Mark Yacoub <markyacoub@chromium.org>
Cc: "Michel Dänzer" <michel@daenzer.net>,
	"Maling list - DRI developers" <dri-devel@lists.freedesktop.org>,
	abhinavk@codeaurora.org, "Rob Clark" <robdclark@chromium.org>,
	"Dave Airlie" <airlied@linux.ie>,
	"Mark Yacoub" <markyacoub@google.com>
Subject: Re: [PATCH v2] drm: Copy drm_wait_vblank to user before returning
Date: Tue, 17 Aug 2021 13:59:13 -0400	[thread overview]
Message-ID: <CAOw6vbKJ3QhdVQ5dhE7M75hF5j5QaXNwxkys4+qPdDh9tU3Dcg@mail.gmail.com> (raw)
In-Reply-To: <CAJUqKUp6zrioRy4aK_ySM+1EMWfZqX1P-_u2RGsGB9PCBXLSAQ@mail.gmail.com>

On Fri, Aug 13, 2021 at 11:48 AM Mark Yacoub <markyacoub@chromium.org> wrote:
>
> Thanks for your review Michel!
> @MAINTAINER, could you please strip the Change-Id when applying.
> Thanks!

Applied to drm-misc-fixes with the Change-Id removed.

Thank you for your patch!

Sean

>
> On Fri, Aug 13, 2021 at 3:33 AM Michel Dänzer <michel@daenzer.net> wrote:
> >
> > On 2021-08-12 9:49 p.m., Mark Yacoub wrote:
> > > From: Mark Yacoub <markyacoub@google.com>
> > >
> > > [Why]
> > > Userspace should get back a copy of drm_wait_vblank that's been modified
> > > even when drm_wait_vblank_ioctl returns a failure.
> > >
> > > Rationale:
> > > drm_wait_vblank_ioctl modifies the request and expects the user to read
> > > it back. When the type is RELATIVE, it modifies it to ABSOLUTE and updates
> > > the sequence to become current_vblank_count + sequence (which was
> > > RELATIVE), but now it became ABSOLUTE.
> > > drmWaitVBlank (in libdrm) expects this to be the case as it modifies
> > > the request to be Absolute so it expects the sequence to would have been
> > > updated.
> > >
> > > The change is in compat_drm_wait_vblank, which is called by
> > > drm_compat_ioctl. This change of copying the data back regardless of the
> > > return number makes it en par with drm_ioctl, which always copies the
> > > data before returning.
> > >
> > > [How]
> > > Return from the function after everything has been copied to user.
> > >
> > > Fixes: IGT:kms_flip::modeset-vs-vblank-race-interruptible
> > > Tested on ChromeOS Trogdor(msm)
> > >
> > > Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
> > > Change-Id: I98da279a5f1329c66a9d1e06b88d40b247b51313
> >
> > With the Gerrit Change-Id removed,
> >
> > Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
> >
> >
> > --
> > Earthling Michel Dänzer               |               https://redhat.com
> > Libre software enthusiast             |             Mesa and X developer

      reply	other threads:[~2021-08-17 17:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 17:55 [PATCH] drm: Copy drm_wait_vblank request and copy_to_user before return Mark Yacoub
2021-08-12  9:26 ` Michel Dänzer
2021-08-12 19:51   ` Mark Yacoub
2021-08-12 19:49 ` [PATCH v2] drm: Copy drm_wait_vblank to user before returning Mark Yacoub
2021-08-13  7:32   ` Michel Dänzer
2021-08-13 15:48     ` Mark Yacoub
2021-08-17 17:59       ` Sean Paul [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=CAOw6vbKJ3QhdVQ5dhE7M75hF5j5QaXNwxkys4+qPdDh9tU3Dcg@mail.gmail.com \
    --to=seanpaul@chromium.org \
    --cc=abhinavk@codeaurora.org \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=markyacoub@chromium.org \
    --cc=markyacoub@google.com \
    --cc=michel@daenzer.net \
    --cc=robdclark@chromium.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).