[Intel-gfx] [PATCH 4/5] drm/DP: Export drm_dp_dpcd_access() DP helper function
Egbert Eich
eich at suse.de
Mon Nov 24 18:16:26 CET 2014
It may be required to wrap the generic DP DPCD transfer function to
perfrom certain operations before of after this function is called.
Signed-off-by: Egbert Eich <eich at suse.de>
---
drivers/gpu/drm/drm_dp_helper.c | 3 ++-
include/drm/drm_dp_helper.h | 4 ++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index f17ac01..2a731e6 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -171,7 +171,7 @@ EXPORT_SYMBOL(drm_dp_bw_code_to_link_rate);
* Both native and I2C-over-AUX transactions are supported.
*/
-static int drm_dp_dpcd_access(struct drm_dp_aux *aux, u8 request,
+int drm_dp_dpcd_access(struct drm_dp_aux *aux, u8 request,
unsigned int offset, void *buffer, size_t size)
{
struct drm_dp_aux_msg msg;
@@ -220,6 +220,7 @@ static int drm_dp_dpcd_access(struct drm_dp_aux *aux, u8 request,
DRM_DEBUG_KMS("too many retries, giving up\n");
return -EIO;
}
+EXPORT_SYMBOL(drm_dp_dpcd_access);
/**
* drm_dp_dpcd_read() - read a series of bytes from the DPCD
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index 0103b7f..ad04f64 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -405,6 +405,8 @@
#define MODE_I2C_READ 4
#define MODE_I2C_STOP 8
+struct drm_dp_aux;
+
#define DP_LINK_STATUS_SIZE 6
bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
int lane_count);
@@ -423,6 +425,8 @@ void drm_dp_link_train_channel_eq_delay(const u8 dpcd[DP_RECEIVER_CAP_SIZE]);
u8 drm_dp_link_rate_to_bw_code(int link_rate);
int drm_dp_bw_code_to_link_rate(u8 link_bw);
+int drm_dp_dpcd_access(struct drm_dp_aux *aux, u8 request,
+ unsigned int offset, void *buffer, size_t size);
int drm_dp_i2c_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs,
int num);
--
1.8.4.5
More information about the Intel-gfx
mailing list