From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keith Packard Subject: Re: [PATCH 06/43] drm/i915: protect force_wake_(get|put) with the gt_lock Date: Tue, 03 Jan 2012 15:33:37 -0800 Message-ID: <86obukmkdq.fsf@sumi.keithp.com> References: <1323867460-5486-1-git-send-email-daniel.vetter@ffwll.ch> <1323867460-5486-6-git-send-email-daniel.vetter@ffwll.ch> <86zke4mxg2.fsf@sumi.keithp.com> <86wr98mqw3.fsf@sumi.keithp.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0868841380==" Return-path: Received: from keithp.com (home.keithp.com [63.227.221.253]) by gabe.freedesktop.org (Postfix) with ESMTP id 3EBD59F6B7 for ; Tue, 3 Jan 2012 15:32:01 -0800 (PST) In-Reply-To: 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: Daniel Vetter Cc: intel-gfx List-Id: intel-gfx@lists.freedesktop.org --===============0868841380== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable On Tue, 3 Jan 2012 22:49:52 +0100, Daniel Vetter w= rote: > Nope, current hangcheck blows up, and we have an i-g-t testcase for it > (which the commit msg clearly states). There are also numerous bug > reports where a dying gpu results in tons of > WARN_ON(!mutex_locked(dev->struct_mutex)) noise in dmesg (which drowns > out the gpu hang warning). The locking change fixes this. Ah, ok, that makes sense. Of course, hangcheck *could* have just taken struct_mutex were it run in a suitable context. > The patch adds the required locking to i915_reset. No, the spinlock protects the forcewake_count access and not the actual register access, which leaves all kinds of potential for races in threads not also holding struct_mutex while accessing registers. If you want a spinlock to protect the register access, it must surround the whole operation. =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIVAwUBTwOQUTYtFsjWk68qAQgFNxAAn185w5XPEgkXvVQTWl8KraxplA1eCCgJ 2hXeopxxx2FffRrp96tLq/pWOLMsK7LinWQcvxNLSo7fRwuSgsT6qifjr/5M5nfH NSPBVTDq/MSKiu26tfsEGk9zafpa0BTPuvgZxBWhhR6/q7aEYLInMmbAndV6Vhit 5Uj3Es1u++2HhakuSt7MDsaGxARLL1Zoh4L1KZkgoJmpZy+X4suX1thkpw0MpjxW LBtLCl5NocDVplZkFjI7ZYNTgn3paFARPwqTO7VkmxRr9nML0+l+JRN3R43oI44v er8alMNnm09oQu8fLDbUJTcJ5dkgfBR+z8BZRWsb2WYWPLwQpXtj5ykY2Igx7m2N 3CnpkIkU3xpI5XT0gxtyzS2RyERZw/a23MIQKnjf7MxbZ/92x3Dg7GO6+9dXfosf QTAfRFrkR3gDbIQ10Wpc88WmeqxC9ZkjiyGx4h41cZvGLEdatJNsq/vCWCXNLgnS dwcPV2ReAtVfwblloT20dnndfTBhuClCGeVUAI7vAt6QHtXpUtGklemPt+x6a1I7 pL3L2fhKPJLs0DwG+nFsXib2V5FBk8LaE6FaectAWiu40LVEnlSnoz/KP0+S+eV5 QRxbm+ScH9mLbkbHLKRxfSd72qytywbSU56IfhfNpiERpxIxrLcokQtcX5WvUz9m hluDKNOyZno= =wR1L -----END PGP SIGNATURE----- --=-=-=-- --===============0868841380== 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 --===============0868841380==--