All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: "Lu, Han" <han.lu@intel.com>, Takashi Iwai <tiwai@suse.de>
Cc: "Yang, Libin" <libin.yang@intel.com>,
	"Vetter, Daniel" <daniel.vetter@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH-V3 1/2] drm/i915/audio: add codec wakeup override enabled/disable callback
Date: Mon, 04 May 2015 10:49:15 +0300	[thread overview]
Message-ID: <87oam09404.fsf@intel.com> (raw)
In-Reply-To: <B51200AC81AB024499A3C2C9A1BB90A83A7AC9@SHSMSX101.ccr.corp.intel.com>

On Mon, 04 May 2015, "Lu, Han" <han.lu@intel.com> wrote:
> Hi Takashi,
>
> Our target is to apply the patches into intel-drm-nightly tree, It
> will be great if you can help merge the patches into your
> tree. However I get a negative test result on BYT platform auto test,
> I'll confirm if it's caused by my patches, so please do not merge now
> and I'll give you feedback ASAP. Thanks.

The automated test failure looks like noise from the test system, can be
ignored.

> Is it OK to merge both patches onto Takashi's tree? In case you may
> would like to merge the patches also, I'm not sure if there will be
> conflict or something...

I think it's okay to merge through Takashi's tree.

However drm-intel-nightly (a mashup of all our branches and some others)
currently doesn't incorporate Takashi's for-next branch because of
[1]. We can add it back once that gets resolved.

BR,
Jani.


[1] http://mid.gmane.org/87fv7i9bgu.fsf@intel.com



>
> BR,
> Han Lu
>
>> -----Original Message-----
>> From: Takashi Iwai [mailto:tiwai@suse.de]
>> Sent: Thursday, April 30, 2015 10:21 PM
>> To: Lu, Han
>> Cc: Vetter, Daniel; Nikula, Jani; Yang, Libin; Lin, Mengdong; intel-
>> gfx@lists.freedesktop.org
>> Subject: Re: [PATCH-V3 1/2] drm/i915/audio: add codec wakeup override
>> enabled/disable callback
>> 
>> At Wed, 29 Apr 2015 17:49:25 +0800,
>> han.lu@intel.com wrote:
>> >
>> > From: "Lu, Han" <han.lu@intel.com>
>> >
>> > Add support for enabling codec wakeup override signal to allow
>> > re-enumeration of the controller on SKL after resume from low power
>> state.
>> >
>> > v3 by Jani: Simplify to only support toggling the appropriate chicken bit.
>> >
>> > Signed-off-by: Lu, Han <han.lu@intel.com>
>> > Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> 
>> The patch series look OK to me.
>> But who will merge these?
>> 
>> I can merge these two patches to a branch so that it can be shared between
>> sound and i915 trees.  Of course, only when I get ack about the first patch.
>> 
>> 
>> thanks,
>> 
>> Takashi
>> 
>> >
>> > diff --git a/drivers/gpu/drm/i915/i915_reg.h
>> > b/drivers/gpu/drm/i915/i915_reg.h index 36805b6..435c372 100644
>> > --- a/drivers/gpu/drm/i915/i915_reg.h
>> > +++ b/drivers/gpu/drm/i915/i915_reg.h
>> > @@ -6881,6 +6881,9 @@ enum skl_disp_power_wells {
>> >  #define   AUDIO_CP_READY(trans)		((1 << 1) << ((trans) * 4))
>> >  #define   AUDIO_ELD_VALID(trans)	((1 << 0) << ((trans) * 4))
>> >
>> > +#define HSW_AUD_CHICKENBIT			0x65f10
>> > +#define   SKL_AUD_CODEC_WAKE_SIGNAL		(1 << 15)
>> > +
>> >  /* HSW Power Wells */
>> >  #define HSW_PWR_WELL_BIOS			0x45400 /* CTL1 */
>> >  #define HSW_PWR_WELL_DRIVER			0x45404 /* CTL2 */
>> > diff --git a/drivers/gpu/drm/i915/intel_audio.c
>> > b/drivers/gpu/drm/i915/intel_audio.c
>> > index f72e93a..ceb2328 100644
>> > --- a/drivers/gpu/drm/i915/intel_audio.c
>> > +++ b/drivers/gpu/drm/i915/intel_audio.c
>> > @@ -474,6 +474,32 @@ static void
>> i915_audio_component_put_power(struct device *dev)
>> >  	intel_display_power_put(dev_to_i915(dev),
>> POWER_DOMAIN_AUDIO);  }
>> >
>> > +static void i915_audio_component_codec_wake_override(struct device
>> *dev,
>> > +						     bool enable)
>> > +{
>> > +	struct drm_i915_private *dev_priv = dev_to_i915(dev);
>> > +	u32 tmp;
>> > +
>> > +	if (!IS_SKYLAKE(dev_priv))
>> > +		return;
>> > +
>> > +	/*
>> > +	 * Enable/disable generating the codec wake signal, overriding the
>> > +	 * internal logic to generate the codec wake to controller.
>> > +	 */
>> > +	tmp = I915_READ(HSW_AUD_CHICKENBIT);
>> > +	tmp &= ~SKL_AUD_CODEC_WAKE_SIGNAL;
>> > +	I915_WRITE(HSW_AUD_CHICKENBIT, tmp);
>> > +	usleep_range(1000, 1500);
>> > +
>> > +	if (enable) {
>> > +		tmp = I915_READ(HSW_AUD_CHICKENBIT);
>> > +		tmp |= SKL_AUD_CODEC_WAKE_SIGNAL;
>> > +		I915_WRITE(HSW_AUD_CHICKENBIT, tmp);
>> > +		usleep_range(1000, 1500);
>> > +	}
>> > +}
>> > +
>> >  /* Get CDCLK in kHz  */
>> >  static int i915_audio_component_get_cdclk_freq(struct device *dev)  {
>> > @@ -495,6 +521,7 @@ static const struct i915_audio_component_ops
>> i915_audio_component_ops = {
>> >  	.owner		= THIS_MODULE,
>> >  	.get_power	= i915_audio_component_get_power,
>> >  	.put_power	= i915_audio_component_put_power,
>> > +	.codec_wake_override =
>> i915_audio_component_codec_wake_override,
>> >  	.get_cdclk_freq	= i915_audio_component_get_cdclk_freq,
>> >  };
>> >
>> > diff --git a/include/drm/i915_component.h
>> > b/include/drm/i915_component.h index 3e2f22e..c9a8b64 100644
>> > --- a/include/drm/i915_component.h
>> > +++ b/include/drm/i915_component.h
>> > @@ -31,6 +31,7 @@ struct i915_audio_component {
>> >  		struct module *owner;
>> >  		void (*get_power)(struct device *);
>> >  		void (*put_power)(struct device *);
>> > +		void (*codec_wake_override)(struct device *, bool enable);
>> >  		int (*get_cdclk_freq)(struct device *);
>> >  	} *ops;
>> >  };
>> > --
>> > 1.9.1
>> >

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-05-04  7:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-29  9:49 [PATCH-V3 1/2] drm/i915/audio: add codec wakeup override enabled/disable callback han.lu
2015-04-29  9:49 ` [PATCH-V3 2/2] ALSA:hda - reset display codec when power on han.lu
2015-04-30 18:29   ` shuang.he
2015-04-30 14:21 ` [PATCH-V3 1/2] drm/i915/audio: add codec wakeup override enabled/disable callback Takashi Iwai
2015-05-04  0:32   ` Lu, Han
2015-05-04  7:49     ` Jani Nikula [this message]
2015-05-04  7:51       ` Yang, Libin
2015-05-04 12:28       ` Takashi Iwai

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=87oam09404.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=daniel.vetter@intel.com \
    --cc=han.lu@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=libin.yang@intel.com \
    --cc=tiwai@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.