From: Keith Packard Subject: Re: [PATCH 06/43] drm/i915: protect force_wake_(get|put) with the gt_lock Date: Wed, 04 Jan 2012 09:54:08 -0800 Message-ID: <86zke3l5fj.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> <86obukmkdq.fsf@sumi.keithp.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1142490853==" Return-path: Received: from keithp.com (home.keithp.com [63.227.221.253]) by gabe.freedesktop.org (Postfix) with ESMTP id A48719ED9F for ; Wed, 4 Jan 2012 09:54:11 -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 --===============1142490853== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable On Wed, 4 Jan 2012 18:11:18 +0100, Daniel Vetter w= rote: > Ah, I think I see you're concern: Between the time we reset the gpu > and the time we fix up the forcewake state somebody might sneak in and > see an inconstency between our tracking and the actual hw state, hence > reading garbage. Correct? Indeed. Plus, holding the spinlock across the whole operation also means only taking it once, rather than twice. Spinlocks aren't free. If we change the locking from struct_mutex to the spinlock, we should actually make it work, independent of what access we have today. =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIVAwUBTwSSQDYtFsjWk68qAQj9/BAAxOoeS0AKyJDSXcYLrGBhEHbLAOeK94j+ s4qpDm3cw/t5J1senCKe5dj/bNqQ7+9e8TykcKlk4KWGVHhTPN3kekPnD/sIzzxB 41kApAP4TQQkWd8+oH8upUXHobdSseCu1vJgbQZX068V+rvl8nP5F1rsBimpOLBV i4OnSL3fYvK9JazIPgXsLDB0c+hDcrU39bxABxjX6onljmZGh3+lSrfH+YbdIlo1 5eSPIQfr5j7lG5VzgLDQ2FtPdlwznIC6V4vz6F7NTducValvz3jp+IkrqT590wqq K6+2/1kTHI+DXpzSulpevLFRS1Mf429hDzh9JdnEzjJeQ5g++IM4RXFBtBgh1oS7 Us9hU597d2AyjxJOTbMy3kjSRfWJyrq4ZnINHajFLJib0uClZhcRESvW7xRBkSK3 bdSeQxyB/lvWlU6/0uthYzR9zft7/8P7/zuyBA3xtwXLg/UdGSlSJHdcasqjEy25 z9d0nalTvzN62fy+beuulLgpQ7099o9ceKgouAgAROgttWPt/adbio+JWKixRReu NrL0Q9gHGIJRYUXzY6eUF9WtBHEZwYr2SLWG8Q915EyWvnn5Y7fvzrr1nGvaMYqQ oJSUstkRdBRKZRXwemj4juyUp52nEedGC+3TpoG5+CIRNoHW9J3T8ZcNd8dLON+2 IE8e2UVsmOw= =sA20 -----END PGP SIGNATURE----- --=-=-=-- --===============1142490853== 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 --===============1142490853==--