From: Guneshwor Singh <guneshwor.o.singh@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>,
intel-gfx@lists.freedesktop.org,
Sanyog Kale <sanyog.r.kale@intel.com>
Subject: Re: [PATCH] drm/i915/cnl: Enable Audio Pin Buffer.
Date: Thu, 8 Feb 2018 10:25:08 +0530 [thread overview]
Message-ID: <20180208045508.GE27120@g2> (raw)
In-Reply-To: <87y3k4gvua.fsf@rdvivi-vienna.i-did-not-set--mail-host-address--so-tickle-me>
Hi Rodrigo,
On Wed, Feb 07, 2018 at 04:37:33PM -0800, Rodrigo Vivi wrote:
> Rodrigo Vivi <rodrigo.vivi@intel.com> writes:
>
> > Starting on CNL, we need to enable Audio Pin Buffer.
>
> Ok... I forgot to include ICL on this now.
> But first let's check if this is working on CNL and later I sent a v5.
>
This does not work on CNL. With this, the vendor id response is
0xffffffff.
I am not sure though why/how the below works fine:
(commented out disable sequence)
if (IS_CANNONLAKE(dev_priv)) {
tmp = I915_READ(AUDIO_PIN_BUF_CTL);
if (enable)
tmp |= AUDIO_PIN_BUF_ENABLE;
/*
else
tmp &= ~AUDIO_PIN_BUF_ENABLE;
*/
I915_WRITE(AUDIO_PIN_BUF_CTL, tmp);
> On top of that for CNL and ICL audio needs to know when we are
> switching cdclk. But for this work I'd like to hear from audio
> if they need a new hook for notification or what.
>
> And I will wait the work on audio start first before attempt
> to implement any new hook on our side.
>
> Thanks,
> Rodrigo.
>
> >
> > v4: Throw the exclusive hook and everything else away
> > and add set/unset bit along with codec awake.
> >
> > Based on few spec links that I was checking recently
> > I now believe that on CNL we also need to keep the codec
> > awake chicken bit along with PG2 enable and also add
> > this extra pin buffer enable.
> >
> > BSpec: 18057
> > BSpec: 21352
> > BSpec: 19621
> >
> > Cc: Jani Nikula <jani.nikula@intel.com>
> > Cc: Sanyog Kale <sanyog.r.kale@intel.com>
> > Cc: Guneshwor Singh <guneshwor.o.singh@intel.com>
> > Cc: Abhay Kumar <abhay.kumar@intel.com>
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_reg.h | 3 +++
> > drivers/gpu/drm/i915/intel_audio.c | 11 ++++++++++-
> > 2 files changed, 13 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> > index 65ba10ad1fe5..768e784ea241 100644
> > --- a/drivers/gpu/drm/i915/i915_reg.h
> > +++ b/drivers/gpu/drm/i915/i915_reg.h
> > @@ -8424,6 +8424,9 @@ enum {
> > #define HSW_AUD_CHICKENBIT _MMIO(0x65f10)
> > #define SKL_AUD_CODEC_WAKE_SIGNAL (1 << 15)
> >
> > +#define AUDIO_PIN_BUF_CTL _MMIO(0x48414)
> > +#define AUDIO_PIN_BUF_ENABLE (1 << 31)
> > +
> > /* HSW Power Wells */
> > #define _HSW_PWR_WELL_CTL1 0x45400
> > #define _HSW_PWR_WELL_CTL2 0x45404
> > diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
> > index 522d54fecb53..34f18322c9bd 100644
> > --- a/drivers/gpu/drm/i915/intel_audio.c
> > +++ b/drivers/gpu/drm/i915/intel_audio.c
> > @@ -729,11 +729,20 @@ static void i915_audio_component_codec_wake_override(struct device *kdev,
> > struct drm_i915_private *dev_priv = kdev_to_i915(kdev);
> > u32 tmp;
> >
> > - if (!IS_GEN9_BC(dev_priv))
> > + if (!IS_GEN9_BC(dev_priv) && !IS_CANNONLAKE(dev_priv))
> > return;
> >
> > i915_audio_component_get_power(kdev);
> >
> > + if (IS_CANNONLAKE(dev_priv)) {
> > + tmp = I915_READ(AUDIO_PIN_BUF_CTL);
> > + if (enable)
> > + tmp |= AUDIO_PIN_BUF_ENABLE;
> > + else
> > + tmp &= ~AUDIO_PIN_BUF_ENABLE;
> > + I915_WRITE(AUDIO_PIN_BUF_CTL, tmp);
> > + }
> > +
> > /*
> > * Enable/disable generating the codec wake signal, overriding the
> > * internal logic to generate the codec wake to controller.
> > --
> > 2.13.6
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-02-08 4:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-08 0:31 [PATCH] drm/i915/cnl: Enable Audio Pin Buffer Rodrigo Vivi
2018-02-08 0:37 ` Rodrigo Vivi
2018-02-08 4:55 ` Guneshwor Singh [this message]
2018-02-08 0:51 ` ✓ Fi.CI.BAT: success for drm/i915/cnl: Enable Audio Pin Buffer. (rev2) Patchwork
2018-02-08 7:46 ` ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2017-07-06 21:03 [PATCH] drm/i915/cnl: Enable Audio Pin Buffer Rodrigo Vivi
2017-08-16 23:46 ` Pandiyan, Dhinakaran
2017-08-17 3:56 ` Sanyog Kale
2017-08-17 18:55 ` Vivi, Rodrigo
2017-08-17 19:08 ` Pandiyan, Dhinakaran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180208045508.GE27120@g2 \
--to=guneshwor.o.singh@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=sanyog.r.kale@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox