From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Menzel Subject: Re: [PATCH 3/3] drm/i915: userspace interface to the forcewake Date: Thu, 14 Apr 2011 21:56:02 +0200 Message-ID: <1302810962.2522.5.camel@mattotaupa> References: <1302804827-11597-1-git-send-email-ben@bwidawsk.net> <1302804827-11597-6-git-send-email-ben@bwidawsk.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1208856748==" Return-path: Received: from mail.gw90.de (mail.gw90.de [188.40.100.199]) by gabe.freedesktop.org (Postfix) with ESMTP id AA9AA9E7BE for ; Thu, 14 Apr 2011 12:56:07 -0700 (PDT) Received: from f053041005.adsl.alicedsl.de ([78.53.41.5] helo=[192.168.178.21]) by mail.gw90.de with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1QASeO-0000tv-Rk for intel-gfx@lists.freedesktop.org; Thu, 14 Apr 2011 19:56:24 +0000 In-Reply-To: <1302804827-11597-6-git-send-email-ben@bwidawsk.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============1208856748== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-hnNBNi0MQfcT4W1KN+Az" --=-hnNBNi0MQfcT4W1KN+Az Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Ben, Am Donnerstag, den 14.04.2011, 11:13 -0700 schrieb Ben Widawsky: > userspace to the forcewake reference count via debugfs. >=20 > v2: > use new spin_locks instead of struct_mutex in my opinion these remarks should not go into the commit message. Reading the commit log the reader is not interested in what patch iteration some change was introduced. > Signed-off-by: Ben Widawsky > --- Reviewing patches the comment, what changed in what iteration, is useful though. So it should go after the `---` and be followed by a `---`, so that `git am` ignores it. commit message =20 S-o-b: Joe User --- v2: changed foo --- diff > drivers/gpu/drm/i915/i915_debugfs.c | 77 +++++++++++++++++++++++++++++= ++++++ > 1 files changed, 77 insertions(+), 0 deletions(-) >=20 > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i= 915_debugfs.c > index cc3818f..fed41b9 100644 > --- a/drivers/gpu/drm/i915/i915_debugfs.c > +++ b/drivers/gpu/drm/i915/i915_debugfs.c > @@ -1181,6 +1181,17 @@ static int i915_gem_framebuffer_info(struct seq_fi= le *m, void *data) > return 0; > } > =20 > +static int i915_gen6_forcewake_count_info(struct seq_file *m, void *data= ) > +{ > + struct drm_info_node *node =3D (struct drm_info_node *) m->private; > + struct drm_device *dev =3D node->minor->dev; > + struct drm_i915_private *dev_priv =3D dev->dev_private; > + > + seq_printf(m, "forcewake count =3D %d\n", dev_priv->forcewake_count); > + > + return 0; > +} > + > static int > i915_wedged_open(struct inode *inode, > struct file *filp) > @@ -1283,6 +1294,65 @@ static int i915_wedged_create(struct dentry *root,= struct drm_minor *minor) > return drm_add_fake_info_node(minor, ent, &i915_wedged_fops); > } > =20 > +static int i915_forcewake_open(struct inode *inode, struct file *file) > +{ > + struct drm_device *dev =3D inode->i_private; > + struct drm_i915_private *dev_priv =3D dev->dev_private; > + > + if (!IS_GEN6(dev)) > + return 0; > + > + /* > + * Paranoid people might say that it's bad that we can potentially hang > + * userspace spinning on this lock. However, if we cannot acquire this > + * lock it means that almost certainly the driver has hung, is not > + * unload-able, and the GPU is not resettable. Therefore hanging here i= s > + * probably a minor inconvenience not to be seen my almost every user. s/my/by/ [=E2=80=A6] Thanks, Paul --=-hnNBNi0MQfcT4W1KN+Az 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) iEYEABECAAYFAk2nUUEACgkQPX1aK2wOHViGTACfRYZzNubXYzSreFRGAAf6A/HN ZdYAnjSLxCNuht0puSOi02irzVGBgq47 =mS6R -----END PGP SIGNATURE----- --=-hnNBNi0MQfcT4W1KN+Az-- --===============1208856748== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============1208856748==--