OSDN Git Service

drm/dp: Add AUX channel infrastructure
authorThierry Reding <treding@nvidia.com>
Thu, 28 Nov 2013 10:31:00 +0000 (11:31 +0100)
committerThierry Reding <treding@nvidia.com>
Wed, 26 Feb 2014 16:21:32 +0000 (17:21 +0100)
commitc197db75ff5c1d4f015c7668a3715e230a5d7e27
tree9ba1ee03f90e51548bb4c1d9533b81e87fa04539
parent38dbfb59d1175ef458d006556061adeaa8751b72
drm/dp: Add AUX channel infrastructure

This is a superset of the current i2c_dp_aux bus functionality and can
be used to transfer native AUX in addition to I2C-over-AUX messages.

Helpers are provided to read and write the DPCD, either blockwise or
byte-wise. Many of the existing helpers for DisplayPort take a copy of a
portion of the DPCD and operate on that, without a way to write data
back to the DPCD (e.g. for configuration of the link).

Subsequent patches will build upon this infrastructure to provide common
functionality in a generic way.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
Changes in v5:
- move comments partially to struct drm_dp_aux_msg in header file
- return -EPROTO on short reads in DPCD helpers

Changes in v4:
- fix a typo in a comment

Changes in v3:
- reorder drm_dp_dpcd_writeb() arguments to be more intuitive
- return number of bytes transferred in drm_dp_dpcd_write()
- factor out drm_dp_dpcd_access()
- describe error codes
drivers/gpu/drm/drm_dp_helper.c
include/drm/drm_dp_helper.h