From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher James Halse Rogers Subject: Re: [PATCH 3/3] drm: Factor-out drm_emit_vblank_event code. Date: Wed, 27 Apr 2011 18:48:34 +1000 Message-ID: <1303894114.15750.3.camel@Ed> References: <1303884659-739-1-git-send-email-christopher.halse.rogers@canonical.com> <1303884659-739-3-git-send-email-christopher.halse.rogers@canonical.com> <1303893377.5633.128.camel@thor.local> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0318382974==" Return-path: Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by gabe.freedesktop.org (Postfix) with ESMTP id 24C449E759 for ; Wed, 27 Apr 2011 01:48:44 -0700 (PDT) In-Reply-To: <1303893377.5633.128.camel@thor.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Michel =?ISO-8859-1?Q?D=E4nzer?= Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0318382974== Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-pgPn2+Ra0kl5SHgIDeTI" --=-pgPn2+Ra0kl5SHgIDeTI Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2011-04-27 at 10:36 +0200, Michel D=C3=A4nzer wrote: > On Mit, 2011-04-27 at 16:10 +1000, christopher.halse.rogers@canonical.com= wrote: > > From: Christopher James Halse Rogers > >=20 > > Signed-off-by: Christopher James Halse Rogers > > --- > > drivers/gpu/drm/drm_irq.c | 39 ++++++++++++++++---------------------= -- > > 1 files changed, 16 insertions(+), 23 deletions(-) > >=20 > > diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c > > index 72407fa..485714b 100644 > > --- a/drivers/gpu/drm/drm_irq.c > > +++ b/drivers/gpu/drm/drm_irq.c > > @@ -930,6 +930,18 @@ void drm_vblank_put(struct drm_device *dev, int cr= tc) > > } > > EXPORT_SYMBOL(drm_vblank_put); > > =20 > > +static void drm_emit_vblank_event (struct drm_pending_vblank_event *e, > > + unsigned int seq, struct timeval *now) > > +{ > > + e->event.sequence =3D seq; > > + e->event.tv_sec =3D now->tv_sec; > > + e->event.tv_usec =3D now->tv_usec; > > + list_move_tail(&e->base.link, &e->base.file_priv->event_list); > > + wake_up_interruptible(&e->base.file_priv->event_wait); > > + trace_drm_vblank_event_delivered(e->base.pid, e->pipe, > > + e->event.sequence); > > +} > > + > > void drm_vblank_off(struct drm_device *dev, int crtc) > > { > > struct drm_pending_vblank_event *e, *t; > > @@ -950,14 +962,8 @@ void drm_vblank_off(struct drm_device *dev, int cr= tc) > > wanted %d, current %d\n", > > e->event.sequence, seq); > > =20 > > - e->event.sequence =3D seq; > > - e->event.tv_sec =3D now.tv_sec; > > - e->event.tv_usec =3D now.tv_usec; > > drm_vblank_put(dev, e->pipe); > > - list_move_tail(&e->base.link, &e->base.file_priv->event_list); > > - wake_up_interruptible(&e->base.file_priv->event_wait); > > - trace_drm_vblank_event_delivered(e->base.pid, e->pipe, > > - e->event.sequence); > > + drm_emit_vblank_event(e, seq, &now); > > } >=20 > Makes sense, but shouldn't the drm_vblank_put() calls move into > drm_emit_vblank_event() as well? Possibly. I felt that dropping the vblank reference was a conceptually distinct action from emitting the vblank event, which is why I left it out. I'd be happy enough to have it as a part of drm_emit_vblank_event, though. --=-pgPn2+Ra0kl5SHgIDeTI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAABCAAGBQJNt9hiAAoJEBUHnPSAqAygl+UIAK88EMUT3/ImIbCM/79bwtH9 DD9GNTWg7y+x7CYfM4U6Engy8sMlRcjwlarL1obm8W9Ax/nt06ZNIyyI/Tq/N6M7 bZgci9aOjgGge2POSEF3uNf3ro8rZqjXVfu02JPbxPTmvwpMWe4FtZseFmnGPaBq I8z0cD97g9whOBFecp+m2DsVzOSxtmMmEh3azi8CQW8eqYxl06fzfTW+geauNF05 YMTiz1vWA4A/71rDsTFuMm4sf7KVl8Sbyxo2IXYgvF3MgF/XgaRU7QdmVikaJTRg 184QTcuC1qZOYk0AM7fGEFxnhhYJ71YzhfTZ30LF3WT+PwVg9qJTED1eEuSpubA= =WiZ1 -----END PGP SIGNATURE----- --=-pgPn2+Ra0kl5SHgIDeTI-- --===============0318382974== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0318382974==--