Hi, This third version of the series reworks some aspects of DSI and panel support. There is now a DSI bus type, which can be used to instantiate devices that represent DSI peripherals and register controllers as DSI hosts. This is currently somewhat DT-centric, but all hardware that I have access to boots from DT, so I couldn't test any other code anyway and decided to leave that up until someone actually needs it. Patch 1 adds the DSI bus type, which provides functions to instantiate DSI peripherals as devices that can be tied into Linux' driver model. Similarly a DSI host can be created (or embedded within the private structure of a DSI controller driver), which DSI peripherals can talk to. It also exposes a DSI driver, which is essentially a very think wrapper around the standard struct device_driver and allows to easily match DSI drivers to DSI devices (again, only DT-style matching is supported so far). Patch 2 adds the DRM panel framework. Not much has changed since the previous version. Mostly smaller fixes and a way to control the panel brightness, which would usually be tied to a struct backlight_device but doesn't necessarily have to be, so I provided separate accessors that can be used by drivers as they see fit. Patch 3 implements the simple panel driver. The most notable changes since v2 are that the brightness accessors are now implemented if a backlight device is associated with the panel. Furthermore the driver now supports DSI devices using the new DSI infrastructure, which at the same time sharing most of the code with the platform driver for panels not connected via a bus, such as dumb RGB/LVDS panels. An implementation of the panel support for Tegra is provided in patch 4. Due to how DSI devices are instantiated (namely as children of the DSI controller after it has been probed), panels are now hotpluggable at runtime. This sounds less scary than it actually is. It merely means that the code can deal with a panel not being present at probe time (which will never be the case for DSI). Depending on load order the panel might become available only until rather late, and there is code to deal with that as well (by leveraging the hotplug detection mechanism in DRM). I haven't been able to produce this case yet, so that that code path is currently untested, but it should work... Furthermore this patch exposes a "brightness" property to userspace that can be used to control the backlight associated with a panel. The aim is to provide a standard way for userspace to access the correct backlight and not rely on some heuristic to determine the correct sysfs path to use for backlight control. Patch 5 implements a driver for the MIPI pad calibration hardware found on Tegra SoCs. It isn't very relevant to the DSI patches but is included here for the sake of completeness. The DSI host implementation for Tegra SoCs is provided in patch 6. That contains some code to configure the MIPI D-PHY which might be useful in other drivers, but I've kept it in the Tegra driver for now. It is nicely split into separate files so would be easy to move out if needed. Patch 7 contains a work-in-progress implementation of DSI command mode for Tegra. This isn't cleaned up yet and contains various hacks to make it work. Also when run while the controller is in video mode and sending image data, the switch back to video mode after the message has been transferred doesn't work properly and causes the display to no longer work. When run before switching to video mode, however, this seems to work properly. Things like short writes respond with the proper trigger message and such. The goal for this was to be able to identify panels using their device descriptor block (DDB). Unfortunately the display panel that I have reads back only zeros (the framing of the messages looks correct, though), so I somewhat lost interest in making this work correctly. Eventually I could envision turning this into something much bigger. If for instance somebody has access to a panel from which a proper DDB can be read, generic helpers could be written around this and panels probed not via DT but also directly by matching against the supplier and other data found in the DDB. In the meantime I'll try to find out if I can get access to such hardware so that I can finish this up properly. Thierry Thierry Reding (7): drm: Add DSI bus infrastructure drm: Add panel support drm/panel: Add simple panel support drm/tegra: Implement panel support gpu: host1x: Add MIPI pad calibration support drm/tegra: Add DSI support WIP: drm/tegra: Implement DSI transfers .../bindings/gpu/nvidia,tegra20-host1x.txt | 16 + .../bindings/misc/nvidia,tegra114-mipi.txt | 37 + .../devicetree/bindings/panel/auo,b101aw03.txt | 7 + .../bindings/panel/chunghwa,claa101wb03.txt | 7 + .../bindings/panel/panasonic,vvx10f004b00.txt | 7 + .../devicetree/bindings/panel/simple-panel.txt | 21 + drivers/gpu/drm/Kconfig | 6 + drivers/gpu/drm/Makefile | 4 + drivers/gpu/drm/drm_dsi.c | 306 ++++++ drivers/gpu/drm/drm_panel.c | 100 ++ drivers/gpu/drm/panel/Kconfig | 20 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-simple.c | 467 +++++++++ drivers/gpu/drm/tegra/Kconfig | 2 + drivers/gpu/drm/tegra/Makefile | 2 + drivers/gpu/drm/tegra/dc.h | 2 + drivers/gpu/drm/tegra/drm.c | 10 +- drivers/gpu/drm/tegra/drm.h | 5 + drivers/gpu/drm/tegra/dsi.c | 1087 ++++++++++++++++++++ drivers/gpu/drm/tegra/dsi.h | 134 +++ drivers/gpu/drm/tegra/mipi-phy.c | 137 +++ drivers/gpu/drm/tegra/mipi-phy.h | 65 ++ drivers/gpu/drm/tegra/output.c | 95 +- drivers/gpu/host1x/Makefile | 1 + drivers/gpu/host1x/dev.c | 17 +- drivers/gpu/host1x/dev.h | 2 + drivers/gpu/host1x/mipi.c | 272 +++++ include/drm/drm_dsi.h | 206 ++++ include/drm/drm_panel.h | 114 ++ include/linux/host1x.h | 6 + 30 files changed, 3147 insertions(+), 9 deletions(-) create mode 100644 Documentation/devicetree/bindings/misc/nvidia,tegra114-mipi.txt create mode 100644 Documentation/devicetree/bindings/panel/auo,b101aw03.txt create mode 100644 Documentation/devicetree/bindings/panel/chunghwa,claa101wb03.txt create mode 100644 Documentation/devicetree/bindings/panel/panasonic,vvx10f004b00.txt create mode 100644 Documentation/devicetree/bindings/panel/simple-panel.txt create mode 100644 drivers/gpu/drm/drm_dsi.c create mode 100644 drivers/gpu/drm/drm_panel.c create mode 100644 drivers/gpu/drm/panel/Kconfig create mode 100644 drivers/gpu/drm/panel/Makefile create mode 100644 drivers/gpu/drm/panel/panel-simple.c create mode 100644 drivers/gpu/drm/tegra/dsi.c create mode 100644 drivers/gpu/drm/tegra/dsi.h create mode 100644 drivers/gpu/drm/tegra/mipi-phy.c create mode 100644 drivers/gpu/drm/tegra/mipi-phy.h create mode 100644 drivers/gpu/host1x/mipi.c create mode 100644 include/drm/drm_dsi.h create mode 100644 include/drm/drm_panel.h -- 1.8.4.2 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel