From: Jesse Barnes Subject: Re: [PATCH 3/5] drm/i915/pch: Fix thinko in DPLL disable Date: Wed, 12 Oct 2011 15:03:11 -0700 Message-ID: <20111012150311.48748669@jbarnes-desktop> References: <1318012726-30158-1-git-send-email-ajax@redhat.com> <1318012726-30158-4-git-send-email-ajax@redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0501917872==" Return-path: Received: from oproxy3-pub.bluehost.com (oproxy3-pub.bluehost.com [69.89.21.8]) by gabe.freedesktop.org (Postfix) with SMTP id EF5F79E8CE for ; Wed, 12 Oct 2011 15:03:18 -0700 (PDT) In-Reply-To: <1318012726-30158-4-git-send-email-ajax@redhat.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: Adam Jackson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============0501917872== Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/6sp6x8KPzTa/ELJswg7.VLl"; protocol="application/pgp-signature" --Sig_/6sp6x8KPzTa/ELJswg7.VLl Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 7 Oct 2011 14:38:44 -0400 Adam Jackson wrote: > For transcoder A, we would never clear the DPLL[AB] select bit. If the > firmware had set us up on DPLLB, the effect would be to attempt to use > DPLLB for both pipes A and B, which would probably be bad. >=20 > Signed-off-by: Adam Jackson > --- > drivers/gpu/drm/i915/intel_display.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) >=20 > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/= intel_display.c > index 9edf363..67dbe22 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -3051,7 +3051,7 @@ static void ironlake_crtc_disable(struct drm_crtc *= crtc) > temp =3D I915_READ(PCH_DPLL_SEL); > switch (pipe) { > case 0: > - temp &=3D ~(TRANSA_DPLL_ENABLE | TRANSA_DPLLA_SEL); > + temp &=3D ~(TRANSA_DPLL_ENABLE | TRANSA_DPLLB_SEL); > break; > case 1: > temp &=3D ~(TRANSB_DPLL_ENABLE | TRANSB_DPLLB_SEL); I think this might be even better (goes with the 3 pipe patches)? --=20 Jesse Barnes, Intel Open Source Technology Center =46rom 159f6191ed19c0d39f986c1bcbd4652d40525108 Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Wed, 12 Oct 2011 15:01:33 -0700 Subject: [PATCH] drm/i915: fix transcoder PLL select masking Transcoder A will always use PLL A and transcoder B will use PLL B. But transcoder C could use either, so always mask the select bits off before or'ing in a new value. Reported-by: Adam Jackson Signed-off-by: Jesse Barnes --- drivers/gpu/drm/i915/intel_display.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/in= tel_display.c index 91f0855..77fc268 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -2902,8 +2902,10 @@ static void ironlake_pch_enable(struct drm_crtc *crt= c) temp |=3D (TRANSA_DPLL_ENABLE | TRANSA_DPLLA_SEL); else if (pipe =3D=3D 1 && (temp & TRANSB_DPLL_ENABLE) =3D=3D 0) temp |=3D (TRANSB_DPLL_ENABLE | TRANSB_DPLLB_SEL); - else if (pipe =3D=3D 2 && (temp & TRANSC_DPLL_ENABLE) =3D=3D 0) + else if (pipe =3D=3D 2 && (temp & TRANSC_DPLL_ENABLE) =3D=3D 0) { + temp &=3D ~(TRANSC_DPLLB_SEL); temp |=3D (TRANSC_DPLL_ENABLE | transc_sel); + } I915_WRITE(PCH_DPLL_SEL, temp); } =20 @@ -3069,10 +3071,10 @@ static void ironlake_crtc_disable(struct drm_crtc *= crtc) temp =3D I915_READ(PCH_DPLL_SEL); switch (pipe) { case 0: - temp &=3D ~(TRANSA_DPLL_ENABLE | TRANSA_DPLLA_SEL); + temp &=3D ~TRANSA_DPLL_ENABLE; break; case 1: - temp &=3D ~(TRANSB_DPLL_ENABLE | TRANSB_DPLLB_SEL); + temp &=3D ~TRANSB_DPLL_ENABLE; break; case 2: /* C shares PLL A or B */ @@ -5540,6 +5542,7 @@ static int ironlake_crtc_mode_set(struct drm_crtc *cr= tc, temp |=3D TRANSB_DPLL_ENABLE | TRANSB_DPLLB_SEL; break; case 2: + temp &=3D ~(TRANSC_DPLLB_SEL); temp |=3D TRANSC_DPLL_ENABLE | transc_sel; break; default: --=20 1.7.4.1 --Sig_/6sp6x8KPzTa/ELJswg7.VLl Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJOlg6fAAoJEIEoDkX4Qk9hAqwP/1gi9X/82wxFQJu5kUoN96H7 pQtpmO4Im1ctfYa1AtQuMObDvJ44Cjlr0ZybeRi5Vyd7PJgpfaUfgOwJvb4QdiyF im5wdBS1XYLZkjk8hDq0GjQj1G6aLup9DvGxHgNFCm2q+QNIIB13FOhsSSQCIMzH 0aXdge8P0LLxwvl9wq55kwllmZp3NNIkex9/m1piluHjyALpYRWPU2FlY4LwRxfp R5v9LVg2yib1+wjGVR7bfE5W82cPAsH1eKIjPnZTXVj1mvGETaxvGaAO1FNZVOQ8 wobPGRPdPM3Hr/7XMvx2VSrsX6KtkQMncZuRaOYURgLIGXFbeTPgxsvxV2eqJuxa qzQHx+7mOt3ceuTLwAJvAXkj/aq753wzI5dDBf76b+phOB18S+7+E150wQOkWufR 1Y5idqpxjsB8KOqs1q0r3s+3MaEzxf8Enb1iQ2Q3oUSk3UKBkjSu9VdjbzxphlcM ARZzI4p6GNOCwUnFE4ZXehOJRKYcxG0O9zQc1stNiYyqTZFQdHUjACjPFXvGv9SZ hip/tltsCWHcq0UvCGk8jBfyb61HVzHmIwwXq83pZObM9Y/3e5PT4fSMIXskmRAf /YiU6UTpO+OrLGYaaf8uw8D/j9znhEetk71rJuDwCEJuiU4wWqkkUVftYZSmykHo HOn7D6NfLIvYq8Zdc+rR =p1U4 -----END PGP SIGNATURE----- --Sig_/6sp6x8KPzTa/ELJswg7.VLl-- --===============0501917872== 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 --===============0501917872==--