Skip to contentSkip to conversation

drm/tegra: Obtain head number from DT

PATCH New Thierry Reding 1 participant 1 message Jan 15, 2014

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

PATCH 1/1 drm/tegra: Obtain head number from DT

The head number of a given display controller is fixed in hardware and required to program outputs appropriately. Relying on the driver probe order to determine this number will not work, since that could yield a situation where the second head was probed first and would be assigned head number 0 instead of 1.

By explicitly specifying the head number in the device tree, it is no longer necessary to rely on these assumptions. As a fallback, if the property isn't available, derive the head number from the display controller node's position in the device tree. That's somewhat more reliable than the previous default but not a proper solution.

---
Changes in v2:
- if the nvidia,head property isn't present, find the position of the display controller within the DT and derive the head number from it

 .../bindings/gpu/nvidia,tegra20-host1x.txt         |  3 ++
 drivers/gpu/drm/tegra/dc.c                         | 41 ++++++++++++++++++++--
 2 files changed, 42 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt +3 -0
index 9e9008f8fa32..efaeec8961b6 100644
@@ -118,6 +118,9 @@ of the following host1x client modules:
     See ../reset/reset.txt for details.
   - reset-names: Must include the following entries:
     - dc
+  - nvidia,head: The number of the display controller head. This is used to
+    setup the various types of output to receive video data from the given
+    head.
 
   Each display controller node has a child node, named "rgb", that represents
   the RGB output associated with the controller. It can take the following
drivers/gpu/drm/tegra/dc.c +39 -2

59 lines not on this page · raw message

Signature · 1 line
1.8.4.2