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: Fri, 06 Jan 2012 12:43:20 -0800 Message-ID: <86y5tktvdj.fsf@sumi.keithp.com> References: <86wr98mqw3.fsf@sumi.keithp.com> <86obukmkdq.fsf@sumi.keithp.com> <86zke3l5fj.fsf@sumi.keithp.com> <20120104181257.GI8004@phenom.ffwll.local> <86fwfulwge.fsf@sumi.keithp.com> <20120105112908.GB3831@phenom.ffwll.local> <86y5tm8807.fsf@sumi.keithp.com> <20120105165947.GG3831@phenom.ffwll.local> <86k4558yh4.fsf@sumi.keithp.com> <86hb098k1d.fsf@sumi.keithp.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1228281748==" Return-path: Received: from keithp.com (home.keithp.com [63.227.221.253]) by gabe.freedesktop.org (Postfix) with ESMTP id CE9F59ECA9 for ; Fri, 6 Jan 2012 12:43:24 -0800 (PST) In-Reply-To: <86hb098k1d.fsf@sumi.keithp.com> 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: Daniel Vetter , intel-gfx List-Id: intel-gfx@lists.freedesktop.org --===============1228281748== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable On Thu, 05 Jan 2012 21:41:34 -0800, Keith Packard wrote: > I talked with Eric about this and we decided that the whole splitting > out of the i/o functions just doesn't make any sense. That makes this > series very similar to Daniel's patches, so I'll rebase my bug fixes on > top of those changes and send out a (shorter) series tomorrow. And here's an updated version of my patches built on top of Daniel's: The following changes since commit d06d2756a21a0c666f167ae9e4f13ef5f07f67d9: acpi/video: Don't restore backlight to 0 at boot time (2012-01-06 11:10:2= 5 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux forcewake-spin= lock Daniel Vetter (1): drm/i915: protect force_wake_(get|put) with the gt_lock Daniel's patch (v3) Keith Packard (3): drm/i915: Move reset forcewake processing to gen6_do_reset This moves the forcewake code inside gen6_do_reset, at the same time it changes from unconditionally calling __gen6_gt_force_wake_get to using dev_priv->display.force_wake_get. That could be broken out as a separate patch -- it's just a bug. drm/i915: Hold gt_lock during reset drm/i915: Hold gt_lock across forcewake register reads These two patches eliminate a race between chip reset and other read operations. By holding the gt_lock during all read operations, as well as across reset, we can ensure that forcewake is active for all register reads. Otherwise, right after chip reset, forcewake can be inactive, but the internal forcewake_count may be non-zero. As a nice side-effect, this eliminates taking the gt_lock twice during all register reads. Please take a look and see if these are all reasonable additions to the original patch and when it's ready, I'll push the whole sequence to drm-intel-fixes. =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIVAwUBTwdc6DYtFsjWk68qAQg+iw//UMwGpwVSwx6OB/CmK3T2nt+pPIMgxujN AZyA5smL74CM7xqzQkzREZLsF72XJl/HPHvlLEKtwGRPr53zHG+dk0+Gd9kvAmzt JQzQodG2VAiH22TVrCtz8Qzir6pf0nTmfxZL+htSGtEPj/zZ93ckiOE1LoJfu3zI srmmeKA+963K7MUqgIXE8IE81ls32wAue0q/GaNJKl8n9BK3OBc4U8nfUcq/HR0E N2GNDFc2/K+fQUJ3CE2aXGvlBYqTJEG5199/eKB/28bxLZ8DTFglijZH//MTK6Wz uOgU5JdqdKaSdgLsxNZe1s1L5Gnpqap5MVXVch5bX0HVAoTn56TiWDfKfbOJrWIF 6VutWaVwg2gbQ2cCUCPoSdslWmJYz9DThYnJ037uerz8r3q7q1Jhflw8B7ykenWS kB8DxiaoMwofas3TDglSy1tlQ2sanRoQYW+vyO6NOtgMeQpfm8+DPyI6Dpk1Io0+ pRmDutdhuKKGGNQAx+Xh/rQfowdS3cZGIQPq5/fNeAOjKqYXqdE4RNHbD2yL9lFf rfwXJp4xA0UABcVBgNaMnbzvIPIAAdvwftbI66tsN9nXrA1GSjPPk/ajg07JciYl i0ddmxp8xwaYGokxbpkw6cF9yXUvLHQXpxQSduKAdtvpgYn436jKJxDFEHAv3qMN ZZ5S5m1dufg= =70Tb -----END PGP SIGNATURE----- --=-=-=-- --===============1228281748== 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 --===============1228281748==--