public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/i915: add kerneldoc for i915_audio_component
@ 2015-10-01  9:01 libin.yang
  2015-10-01  9:01 ` [PATCH 2/3] drm/i915: DocBook add i915_component.h support libin.yang
  2015-10-01  9:01 ` [PATCH 3/3] drm/i915: add DOC for i915_component libin.yang
  0 siblings, 2 replies; 6+ messages in thread
From: libin.yang @ 2015-10-01  9:01 UTC (permalink / raw)
  To: intel-gfx, daniel.vetter, jani.nikula, ville.syrjala

From: Libin Yang <libin.yang@intel.com>

Add the kerneldoc for i915_audio_component in i915_component.h

Signed-off-by: Libin Yang <libin.yang@intel.com>
---
 include/drm/i915_component.h | 65 ++++++++++++++++++++++++++------------------
 1 file changed, 38 insertions(+), 27 deletions(-)

diff --git a/include/drm/i915_component.h b/include/drm/i915_component.h
index 89dc7d6..30d89e0 100644
--- a/include/drm/i915_component.h
+++ b/include/drm/i915_component.h
@@ -30,38 +30,49 @@
  */
 #define MAX_PORTS 5
 
-struct i915_audio_component {
-	struct device *dev;
+/**
+ * struct i915_audio_component_ops - callbacks defined in gfx driver
+ * @owner: the module owner
+ * @get_power: get the POWER_DOMAIN_AUDIO power well
+ * @put_power: put the POWER_DOMAIN_AUDIO power well
+ * @codec_wake_override: Enable/Disable generating the codec wake signal
+ * @get_cdclk_freq: get the Core Display Clock in KHz
+ * @sync_audio_rate: set n/cts based on the sample rate
+ */
+struct i915_audio_component_ops {
+	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 *);
+	int (*sync_audio_rate)(struct device *, int port, int rate);
+};
+
+struct i915_audio_component_audio_ops {
+	void *audio_ptr;
 	/**
-	 * @aud_sample_rate: the array of audio sample rate per port
+	 * Call from i915 driver, notifying the HDA driver that
+	 * pin sense and/or ELD information has changed.
+	 * @audio_ptr:		HDA driver object
+	 * @port:	Which port has changed (PORTA / PORTB / PORTC etc)
 	 */
+	void (*pin_eld_notify)(void *audio_ptr, int port);
+};
+
+/**
+ * struct i915_audio_component - used for audio video interaction
+ * @dev: the device from gfx driver
+ * @aud_sample_rate: the array of audio sample rate per port
+ * @ops: callback for audio driver calling
+ * @audio_ops: Call from i915 driver
+ */
+struct i915_audio_component {
+	struct device *dev;
 	int aud_sample_rate[MAX_PORTS];
 
-	const struct i915_audio_component_ops {
-		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 *);
-		/**
-		 * @sync_audio_rate: set n/cts based on the sample rate
-		 *
-		 * Called from audio driver. After audio driver sets the
-		 * sample rate, it will call this function to set n/cts
-		 */
-		int (*sync_audio_rate)(struct device *, int port, int rate);
-	} *ops;
+	const struct i915_audio_component_ops *ops;
 
-	const struct i915_audio_component_audio_ops {
-		void *audio_ptr;
-		/**
-		 * Call from i915 driver, notifying the HDA driver that
-		 * pin sense and/or ELD information has changed.
-		 * @audio_ptr:		HDA driver object
-		 * @port:		Which port has changed (PORTA / PORTB / PORTC etc)
-		 */
-		void (*pin_eld_notify)(void *audio_ptr, int port);
-	} *audio_ops;
+	const struct i915_audio_component_audio_ops *audio_ops;
 };
 
 #endif /* _I915_COMPONENT_H_ */
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] drm/i915: DocBook add i915_component.h support
  2015-10-01  9:01 [PATCH 1/3] drm/i915: add kerneldoc for i915_audio_component libin.yang
@ 2015-10-01  9:01 ` libin.yang
  2015-10-01  9:01 ` [PATCH 3/3] drm/i915: add DOC for i915_component libin.yang
  1 sibling, 0 replies; 6+ messages in thread
From: libin.yang @ 2015-10-01  9:01 UTC (permalink / raw)
  To: intel-gfx, daniel.vetter, jani.nikula, ville.syrjala

From: Libin Yang <libin.yang@intel.com>

Add the item of i915_component.h in DocBook

Signed-off-by: Libin Yang <libin.yang@intel.com>
---
 Documentation/DocBook/drm.tmpl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl
index 4096781..9896f3d 100644
--- a/Documentation/DocBook/drm.tmpl
+++ b/Documentation/DocBook/drm.tmpl
@@ -3989,6 +3989,7 @@ int num_ioctls;</synopsis>
 	<title>High Definition Audio</title>
 !Pdrivers/gpu/drm/i915/intel_audio.c High Definition Audio over HDMI and Display Port
 !Idrivers/gpu/drm/i915/intel_audio.c
+!Iinclude/drm/i915_component.h
       </sect2>
       <sect2>
 	<title>Panel Self Refresh PSR (PSR/SRD)</title>
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] drm/i915: add DOC for i915_component
  2015-10-01  9:01 [PATCH 1/3] drm/i915: add kerneldoc for i915_audio_component libin.yang
  2015-10-01  9:01 ` [PATCH 2/3] drm/i915: DocBook add i915_component.h support libin.yang
@ 2015-10-01  9:01 ` libin.yang
  2015-10-07  7:47   ` Yang, Libin
  1 sibling, 1 reply; 6+ messages in thread
From: libin.yang @ 2015-10-01  9:01 UTC (permalink / raw)
  To: intel-gfx, daniel.vetter, jani.nikula, ville.syrjala

From: Libin Yang <libin.yang@intel.com>

Add the DOC for i915_component.h. Explain the struct
i915_audio_component_ops and struct i915_audio_component_audio_ops
usage.

Signed-off-by: Libin Yang <libin.yang@intel.com>
---
 drivers/gpu/drm/i915/intel_audio.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
index 72d696b..56c2f54 100644
--- a/drivers/gpu/drm/i915/intel_audio.c
+++ b/drivers/gpu/drm/i915/intel_audio.c
@@ -50,6 +50,11 @@
  * co-operation between the graphics and audio drivers is handled via audio
  * related registers. (The notable exception is the power management, not
  * covered here.)
+ *
+ * The struct i915_audio_component is used to interact between the graphics
+ * and audio drivers. The struct i915_audio_component_ops *ops in it is
+ * defined in graphics driver and called in audio driver. The
+ * struct i915_audio_component_audio_ops *audio_ops is called from i915 driver.
  */
 
 static const struct {
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/3] drm/i915: add DOC for i915_component
  2015-10-01  9:01 ` [PATCH 3/3] drm/i915: add DOC for i915_component libin.yang
@ 2015-10-07  7:47   ` Yang, Libin
  2015-10-07 13:39     ` Daniel Vetter
  0 siblings, 1 reply; 6+ messages in thread
From: Yang, Libin @ 2015-10-07  7:47 UTC (permalink / raw)
  To: intel-gfx@lists.freedesktop.org, daniel.vetter@ffwll.ch,
	jani.nikula@linux.intel.com, ville.syrjala@linux.intel.com

Hi all,

Any comments? Thanks.

Regards,
Libin

> -----Original Message-----
> From: Yang, Libin
> Sent: Thursday, October 01, 2015 5:01 PM
> To: intel-gfx@lists.freedesktop.org; daniel.vetter@ffwll.ch;
> jani.nikula@linux.intel.com; ville.syrjala@linux.intel.com
> Cc: Yang, Libin
> Subject: [PATCH 3/3] drm/i915: add DOC for i915_component
> 
> From: Libin Yang <libin.yang@intel.com>
> 
> Add the DOC for i915_component.h. Explain the struct
> i915_audio_component_ops and struct
> i915_audio_component_audio_ops
> usage.
> 
> Signed-off-by: Libin Yang <libin.yang@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_audio.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_audio.c
> b/drivers/gpu/drm/i915/intel_audio.c
> index 72d696b..56c2f54 100644
> --- a/drivers/gpu/drm/i915/intel_audio.c
> +++ b/drivers/gpu/drm/i915/intel_audio.c
> @@ -50,6 +50,11 @@
>   * co-operation between the graphics and audio drivers is handled via
> audio
>   * related registers. (The notable exception is the power management,
> not
>   * covered here.)
> + *
> + * The struct i915_audio_component is used to interact between the
> graphics
> + * and audio drivers. The struct i915_audio_component_ops *ops in it
> is
> + * defined in graphics driver and called in audio driver. The
> + * struct i915_audio_component_audio_ops *audio_ops is called
> from i915 driver.
>   */
> 
>  static const struct {
> --
> 1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/3] drm/i915: add DOC for i915_component
  2015-10-07  7:47   ` Yang, Libin
@ 2015-10-07 13:39     ` Daniel Vetter
  2015-10-08  1:06       ` Yang, Libin
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2015-10-07 13:39 UTC (permalink / raw)
  To: Yang, Libin; +Cc: daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org

On Wed, Oct 07, 2015 at 07:47:09AM +0000, Yang, Libin wrote:
> Hi all,
> 
> Any comments? Thanks.

Was simply held up with some merge ordering troubles, I had to wait for
Takashi to apply the last patch so I could do a backmerge. And then I
forget about your patch series, thanks a lot for the reminder.

I applied them to dinq, with patches 2&3 squashed together.

Thanks, Daniel

> 
> Regards,
> Libin
> 
> > -----Original Message-----
> > From: Yang, Libin
> > Sent: Thursday, October 01, 2015 5:01 PM
> > To: intel-gfx@lists.freedesktop.org; daniel.vetter@ffwll.ch;
> > jani.nikula@linux.intel.com; ville.syrjala@linux.intel.com
> > Cc: Yang, Libin
> > Subject: [PATCH 3/3] drm/i915: add DOC for i915_component
> > 
> > From: Libin Yang <libin.yang@intel.com>
> > 
> > Add the DOC for i915_component.h. Explain the struct
> > i915_audio_component_ops and struct
> > i915_audio_component_audio_ops
> > usage.
> > 
> > Signed-off-by: Libin Yang <libin.yang@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_audio.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_audio.c
> > b/drivers/gpu/drm/i915/intel_audio.c
> > index 72d696b..56c2f54 100644
> > --- a/drivers/gpu/drm/i915/intel_audio.c
> > +++ b/drivers/gpu/drm/i915/intel_audio.c
> > @@ -50,6 +50,11 @@
> >   * co-operation between the graphics and audio drivers is handled via
> > audio
> >   * related registers. (The notable exception is the power management,
> > not
> >   * covered here.)
> > + *
> > + * The struct i915_audio_component is used to interact between the
> > graphics
> > + * and audio drivers. The struct i915_audio_component_ops *ops in it
> > is
> > + * defined in graphics driver and called in audio driver. The
> > + * struct i915_audio_component_audio_ops *audio_ops is called
> > from i915 driver.
> >   */
> > 
> >  static const struct {
> > --
> > 1.9.1
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/3] drm/i915: add DOC for i915_component
  2015-10-07 13:39     ` Daniel Vetter
@ 2015-10-08  1:06       ` Yang, Libin
  0 siblings, 0 replies; 6+ messages in thread
From: Yang, Libin @ 2015-10-08  1:06 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org

Hi Daniel,

> -----Original Message-----
> From: Daniel Vetter [mailto:daniel.vetter@ffwll.ch] On Behalf Of
> Daniel Vetter
> Sent: Wednesday, October 07, 2015 9:39 PM
> To: Yang, Libin
> Cc: intel-gfx@lists.freedesktop.org; daniel.vetter@ffwll.ch;
> jani.nikula@linux.intel.com; ville.syrjala@linux.intel.com
> Subject: Re: [PATCH 3/3] drm/i915: add DOC for i915_component
> 
> On Wed, Oct 07, 2015 at 07:47:09AM +0000, Yang, Libin wrote:
> > Hi all,
> >
> > Any comments? Thanks.
> 
> Was simply held up with some merge ordering troubles, I had to wait
> for
> Takashi to apply the last patch so I could do a backmerge. And then I
> forget about your patch series, thanks a lot for the reminder.
> 
> I applied them to dinq, with patches 2&3 squashed together.

Get it .

Thanks,
Libin

> 
> Thanks, Daniel
> 
> >
> > Regards,
> > Libin
> >
> > > -----Original Message-----
> > > From: Yang, Libin
> > > Sent: Thursday, October 01, 2015 5:01 PM
> > > To: intel-gfx@lists.freedesktop.org; daniel.vetter@ffwll.ch;
> > > jani.nikula@linux.intel.com; ville.syrjala@linux.intel.com
> > > Cc: Yang, Libin
> > > Subject: [PATCH 3/3] drm/i915: add DOC for i915_component
> > >
> > > From: Libin Yang <libin.yang@intel.com>
> > >
> > > Add the DOC for i915_component.h. Explain the struct
> > > i915_audio_component_ops and struct
> > > i915_audio_component_audio_ops
> > > usage.
> > >
> > > Signed-off-by: Libin Yang <libin.yang@intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/intel_audio.c | 5 +++++
> > >  1 file changed, 5 insertions(+)
> > >
> > > diff --git a/drivers/gpu/drm/i915/intel_audio.c
> > > b/drivers/gpu/drm/i915/intel_audio.c
> > > index 72d696b..56c2f54 100644
> > > --- a/drivers/gpu/drm/i915/intel_audio.c
> > > +++ b/drivers/gpu/drm/i915/intel_audio.c
> > > @@ -50,6 +50,11 @@
> > >   * co-operation between the graphics and audio drivers is handled
> via
> > > audio
> > >   * related registers. (The notable exception is the power
> management,
> > > not
> > >   * covered here.)
> > > + *
> > > + * The struct i915_audio_component is used to interact between
> the
> > > graphics
> > > + * and audio drivers. The struct i915_audio_component_ops *ops
> in it
> > > is
> > > + * defined in graphics driver and called in audio driver. The
> > > + * struct i915_audio_component_audio_ops *audio_ops is called
> > > from i915 driver.
> > >   */
> > >
> > >  static const struct {
> > > --
> > > 1.9.1
> >
> 
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-10-08  1:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-01  9:01 [PATCH 1/3] drm/i915: add kerneldoc for i915_audio_component libin.yang
2015-10-01  9:01 ` [PATCH 2/3] drm/i915: DocBook add i915_component.h support libin.yang
2015-10-01  9:01 ` [PATCH 3/3] drm/i915: add DOC for i915_component libin.yang
2015-10-07  7:47   ` Yang, Libin
2015-10-07 13:39     ` Daniel Vetter
2015-10-08  1:06       ` Yang, Libin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox