Skip to contentSkip to conversation

drm/i915: add kerneldoc for i915_audio_component

PATCH In review [email protected] 2 participants 6 messages Oct 1, 2015 – Oct 8, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 drm/i915: add kerneldoc for i915_audio_component

From: Libin Yang <[email protected]>

Add the kerneldoc for i915_audio_component in i915_component.h

---
 include/drm/i915_component.h | 65 ++++++++++++++++++++++++++------------------
 1 file changed, 38 insertions(+), 27 deletions(-)
include/drm/i915_component.h +38 -27
index 89dc7d6..30d89e0 100644
@@ -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_ */
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 2/3 drm/i915: DocBook add i915_component.h support

From: Libin Yang <[email protected]>

Add the item of i915_component.h in DocBook

---
 Documentation/DocBook/drm.tmpl | 1 +
 1 file changed, 1 insertion(+)
Documentation/DocBook/drm.tmpl +1 -0
index 4096781..9896f3d 100644
@@ -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>
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

PATCH 3/3 drm/i915: add DOC for i915_component

In reply to [email protected]

From: Libin Yang <[email protected]>

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

---
 drivers/gpu/drm/i915/intel_audio.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_audio.c +5 -0
index 72d696b..56c2f54 100644
@@ -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 {
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

Re: [PATCH 3/3] drm/i915: add DOC for i915_component

Hi all,

Any comments? Thanks.

Regards,
Libin

Quoted 41 lines

-----Original Message-----
From: Yang, Libin
Sent: Thursday, October 01, 2015 5:01 PM
To: [email protected]; [email protected]; [email protected]; [email protected]
Cc: Yang, Libin
Subject: [PATCH 3/3] drm/i915: add DOC for i915_component

From: Libin Yang <[email protected]>

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

---
 drivers/gpu/drm/i915/intel_audio.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_audio.c +0 -0
index 72d696b..56c2f54 100644
@@ -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.
*/

Quoted 3 lines

static const struct {
--
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

Re: [PATCH 3/3] drm/i915: add DOC for i915_component

Quoted 3 lines · Libin

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

Quoted 49 lines

Regards,
Libin

Quoted 44 lines

-----Original Message-----
From: Yang, Libin
Sent: Thursday, October 01, 2015 5:01 PM
To: [email protected]; [email protected]; [email protected]; [email protected]
Cc: Yang, Libin
Subject: [PATCH 3/3] drm/i915: add DOC for i915_component

From: Libin Yang <[email protected]>

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

---
 drivers/gpu/drm/i915/intel_audio.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_audio.c +0 -0
index 72d696b..56c2f54 100644
@@ -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

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw

Re: [PATCH 3/3] drm/i915: add DOC for i915_component

Hi Daniel,

Quoted 12 lines

-----Original Message-----
From: Daniel Vetter [mailto:[email protected]] On Behalf Of Daniel Vetter
Sent: Wednesday, October 07, 2015 9:39 PM
To: Yang, Libin
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 3/3] drm/i915: add DOC for i915_component

Quoted 2 lines · Libin

Hi all,

Quoted 8 lines
Quoted 1 line

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

Quoted 57 lines

Thanks, Daniel

Quoted 24 lines

Regards,
Libin

Quoted 20 lines

-----Original Message-----
From: Yang, Libin
Sent: Thursday, October 01, 2015 5:01 PM
To: [email protected]; [email protected]; [email protected]; [email protected]
Cc: Yang, Libin
Subject: [PATCH 3/3] drm/i915: add DOC for i915_component

From: Libin Yang <[email protected]>

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

---
 drivers/gpu/drm/i915/intel_audio.c | 5 +++++
 1 file changed, 5 insertions(+)
Quoted 7 lines

drivers/gpu/drm/i915/intel_audio.c line 50

Quoted 7 lines
drivers/gpu/drm/i915/intel_audio.c +0 -0
index 72d696b..56c2f54 100644
@@ -50,6 +50,11 @@
  * co-operation between the graphics and audio drivers is handled

via

Quoted 2 lines
Quoted 2 lines

audio
* related registers. (The notable exception is the power

management,

Quoted 4 lines
Quoted 4 lines

not
* covered here.)
+ *
+ * The struct i915_audio_component is used to interact between

the

Quoted 2 lines
Quoted 2 lines

graphics
+ * and audio drivers. The struct i915_audio_component_ops *ops

in it

Quoted 10 lines
Quoted 9 lines

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

Quoted 4 lines

--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx