summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/DocBook/drm.tmpl6
-rw-r--r--drivers/gpu/drm/drm_dp_helper.c21
-rw-r--r--include/drm/drm_dp_helper.h8
3 files changed, 35 insertions, 0 deletions
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl
index cb8024e62dfc..4ee2304f82f9 100644
--- a/Documentation/DocBook/drm.tmpl
+++ b/Documentation/DocBook/drm.tmpl
@@ -2105,6 +2105,12 @@ void intel_crt_init(struct drm_device *dev)
2105!Pdrivers/gpu/drm/drm_fb_helper.c fbdev helpers 2105!Pdrivers/gpu/drm/drm_fb_helper.c fbdev helpers
2106!Edrivers/gpu/drm/drm_fb_helper.c 2106!Edrivers/gpu/drm/drm_fb_helper.c
2107 </sect2> 2107 </sect2>
2108 <sect2>
2109 <title>Display Port Helper Functions Reference</title>
2110!Pdrivers/gpu/drm/drm_dp_helper.c dp helpers
2111!Iinclude/drm/drm_dp_helper.h
2112!Edrivers/gpu/drm/drm_dp_helper.c
2113 </sect2>
2108 </sect1> 2114 </sect1>
2109 2115
2110 <!-- Internals: vertical blanking --> 2116 <!-- Internals: vertical blanking -->
diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index 3c4cccd0d753..89e196627160 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -30,6 +30,15 @@
30#include <drm/drm_dp_helper.h> 30#include <drm/drm_dp_helper.h>
31#include <drm/drmP.h> 31#include <drm/drmP.h>
32 32
33/**
34 * DOC: dp helpers
35 *
36 * These functions contain some common logic and helpers at various abstraction
37 * levels to deal with Display Port sink devices and related things like DP aux
38 * channel transfers, EDID reading over DP aux channels, decoding certain DPCD
39 * blocks, ...
40 */
41
33/* Run a single AUX_CH I2C transaction, writing/reading data as necessary */ 42/* Run a single AUX_CH I2C transaction, writing/reading data as necessary */
34static int 43static int
35i2c_algo_dp_aux_transaction(struct i2c_adapter *adapter, int mode, 44i2c_algo_dp_aux_transaction(struct i2c_adapter *adapter, int mode,
@@ -193,6 +202,18 @@ i2c_dp_aux_prepare_bus(struct i2c_adapter *adapter)
193 return 0; 202 return 0;
194} 203}
195 204
205/**
206 * i2c_dp_aux_add_bus() - register an i2c adapter using the aux ch helper
207 * @adapter: i2c adapter to register
208 *
209 * This registers an i2c adapater that uses dp aux channel as it's underlaying
210 * transport. The driver needs to fill out the &i2c_algo_dp_aux_data structure
211 * and store it in the algo_data member of the @adapter argument. This will be
212 * used by the i2c over dp aux algorithm to drive the hardware.
213 *
214 * RETURNS:
215 * 0 on success, -ERRNO on failure.
216 */
196int 217int
197i2c_dp_aux_add_bus(struct i2c_adapter *adapter) 218i2c_dp_aux_add_bus(struct i2c_adapter *adapter)
198{ 219{
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index c09d36741c94..e8e1417af3d9 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -312,6 +312,14 @@
312#define MODE_I2C_READ 4 312#define MODE_I2C_READ 4
313#define MODE_I2C_STOP 8 313#define MODE_I2C_STOP 8
314 314
315/**
316 * struct i2c_algo_dp_aux_data - driver interface structure for i2c over dp
317 * aux algorithm
318 * @running: set by the algo indicating whether an i2c is ongoing or whether
319 * the i2c bus is quiescent
320 * @address: i2c target address for the currently ongoing transfer
321 * @aux_ch: driver callback to transfer a single byte of the i2c payload
322 */
315struct i2c_algo_dp_aux_data { 323struct i2c_algo_dp_aux_data {
316 bool running; 324 bool running;
317 u16 address; 325 u16 address;