Skip to content

drm/dp: Introduce AUX channel infrastructure

Thierry Reding dri-devel intel-gfx linux-tegra 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest5 patches 0 repliesNew
  2. v44 of 5 patches 3 repliesSuperseded

Changes in v5 from the cover letter

- export DPCD helpers so that they are available in modules
- keep MOT set between I2C messages (as suggested by Ville)
- reshuffle some comments to where the fit better
- return -EPROTO on short reads in DPCD helpers
- relicense Tegra driver under GPL v2 for consistency

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5drm/dp: Add AUX channel infrastructuredrivers/gpu/drm/drm_dp_helper.c include/drm/drm_dp_helper.h+189 -00 replies
2/5drm/dp: Add drm_dp_dpcd_read_link_status()drivers/gpu/drm/drm_dp_helper.c include/drm/drm_dp_helper.h+19 -00 replies
3/5drm/dp: Add DisplayPort link helpersdrivers/gpu/drm/drm_dp_helper.c include/drm/drm_dp_helper.h+114 -00 replies
4/5drm/dp: Allow registering AUX channels as I2C bussesdrivers/gpu/drm/drm_dp_helper.c include/drm/drm_dp_helper.h+191 -70 replies
5/5drm/tegra: Add eDP supportDocumentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt drivers/gpu/drm/tegra/Makefile drivers/gpu/drm/tegra/dc.h +7 more+2077 -20 replies

Reviews trailers per patch

4 of 5 patches have a Reviewed-by or Acked-by.

PatchAlex DeucherJani Nikula
1/5R-b R-b
2/5R-b R-b
3/5R-b R-b
4/5R-b R-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/5] drm/dp: Introduce AUX channel infrastructure

From: Thierry Reding <[email protected]>

Hi,

This small series introduces some infrastructure to support AUX channels in a generic way. Drivers make use of it by embedding and filling in a struct drm_dp_aux. Various helpers can then be used to for example read from or write to the DPCD.

Patch 1 adds the basic infrastructure as well as a couple of helpers to access the DPCD.

The helper introduced in patch 2 can be used to obtain the link status as expected by various existing DP helpers.

More convenience helpers are added in patch 3, which can come in handy during DP initialization.

An AUX channel can also be used to implement I2C-over-AUX and patch 4 implements an I2C adapter that can be used with the DRM EDID helpers.

Finally the Tegra eDP support in patch 5 shows how drivers can make use of this new infrastructure.

Changes in v5:
- export DPCD helpers so that they are available in modules
- keep MOT set between I2C messages (as suggested by Ville)
- reshuffle some comments to where the fit better
- return -EPROTO on short reads in DPCD helpers
- relicense Tegra driver under GPL v2 for consistency

Changes in v4:
- fix a couple of typos in comments

Changes in v3:
- address comments by Jani Nikula:
- keep debug and error messages in AUX helpers
- read/write back-to-back registers in chunks
- separate link power up and configuration
- do not power up for DPCD prior to 1.1
- sleep after power up as per the spec
- return number of bytes transferred
- factor out some common code
- reorder function arguments
- fix typo in comment
- address comments by Daniel Vetter:
- embed i2c_adapter within struct drm_dp_aux
- describe error codes

Changes in v2:
- reimplement I2C-over-AUX functionality to get rid of the additional layer
- extract retry logic from existing drivers
- add more kerneldoc comments

Thierry

Thierry Reding (5):
drm/dp: Add AUX channel infrastructure drm/dp: Add drm_dp_dpcd_read_link_status() drm/dp: Add DisplayPort link helpers drm/dp: Allow registering AUX channels as I2C busses drm/tegra: Add eDP support

 .../bindings/gpu/nvidia,tegra20-host1x.txt         |   42 +
 drivers/gpu/drm/drm_dp_helper.c                    |  395 +++++++
 drivers/gpu/drm/tegra/Makefile                     |    2 +
 drivers/gpu/drm/tegra/dc.h                         |    1 +
 drivers/gpu/drm/tegra/dpaux.c                      |  544 ++++++++++
 drivers/gpu/drm/tegra/dpaux.h                      |   73 ++
 drivers/gpu/drm/tegra/drm.c                        |   19 +-
 drivers/gpu/drm/tegra/drm.h                        |   20 +
 drivers/gpu/drm/tegra/output.c                     |    8 +
 drivers/gpu/drm/tegra/sor.c                        | 1092 ++++++++++++++++++++
 drivers/gpu/drm/tegra/sor.h                        |  278 +++++
 include/drm/drm_dp_helper.h                        |  111 ++
 12 files changed, 2583 insertions(+), 2 deletions(-)
 create mode 100644 drivers/gpu/drm/tegra/dpaux.c
 create mode 100644 drivers/gpu/drm/tegra/dpaux.h
 create mode 100644 drivers/gpu/drm/tegra/sor.c
 create mode 100644 drivers/gpu/drm/tegra/sor.h
Signature · 1 line
1.8.4.2