Commit Graph

80 Commits

Author SHA1 Message Date
Alban Bedel ea44739db3 drm/panel: simple: add support for InnoLux N156BGE-L21 panel
This panel is used by the Medcom Wide and supported by the
simple-panel driver.

Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-07-22 09:10:53 +02:00
Thierry Reding 9d90ce5c10 drm/panel: s6e8aa0: Use static inline for upcasting
Use a static inline function for upcasting a struct drm_panel to the
driver-specific structure. The advantage over using a macro is that it
gives us additional type checking.

Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-07-22 09:06:48 +02:00
Thierry Reding 3c523d7d38 drm/dsi: Use peripheral's channel for DCS commands
When executing DCS commands, use the channel associated with the DSI
peripheral rather than one explicitly specified in the function call.
Devices shouldn't be able to step on each others' toes like this.

Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-07-22 09:06:32 +02:00
Thierry Reding 371c359f83 drm/dsi: Make mipi_dsi_dcs_write() return ssize_t
This function returns the value of the struct mipi_dsi_host_ops'
.transfer() so make sure the return types are consistent.

Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-07-22 09:06:16 +02:00
Boris BREZILLON 102932b0e4 drm/panel: add support for Foxlink FL500WVR00-A0T panel
This panel is used by Atmel's SAMA5D3 Evaluation Kits (sama5d3xek) and
supported by the simple-panel driver.

Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-07-15 12:40:19 +02:00
Alexandre Courbot 5e4cc27862 drm/panel: Set non-continuous clock flag on supporting panels
The LG LD070WX3-SL01 and Panasonic VVX10F004B00 are DSI support
non-continuous clock mode. Set the MIPI_DSI_CLOCK_NON_CONTINUOUS
to their definition so host drivers become aware of this capability.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-07-14 10:25:40 +02:00
Russell King 50d5ed3992 drm/panel: make DRM_PANEL_LD9040 depend on SPI
Rather than DRM_PANEL_LD9040 selecting SPI, which then results in an
increase in the probability of Kconf reporting circular dependencies
(we're one "select" away from that right now), make this depend on
SPI instead.  This is akin to having some driver select DRM.

Having some drivers depend on a subsystem, and other drivers select a
subsystem is a recipe for circular dependencies, and there's really no
need for it.

The potential circular dependency (which can be caused today by the
addition of selecting DRM_PANEL from DRM_IMX_LDB) is:

  symbol DMADEVICES is selected by SAMSUNG_DMADEV
  symbol SAMSUNG_DMADEV is selected by S3C64XX_PL080
  symbol S3C64XX_PL080 is selected by SPI_S3C64XX
  symbol SPI_S3C64XX depends on SPI
  symbol SPI is selected by DRM_PANEL_LD9040
  symbol DRM_PANEL_LD9040 depends on DRM_PANEL
  symbol DRM_PANEL is selected by DRM_IMX_LDB
  symbol DRM_IMX_LDB depends on MFD_SYSCON
  symbol MFD_SYSCON is selected by POWER_RESET_KEYSTONE
  symbol POWER_RESET_KEYSTONE depends on POWER_SUPPLY
  symbol POWER_SUPPLY is selected by HID_SONY
  symbol HID_SONY depends on NEW_LEDS
  symbol NEW_LEDS is selected by BACKLIGHT_ADP8860
  symbol BACKLIGHT_ADP8860 depends on BACKLIGHT_CLASS_DEVICE
  symbol BACKLIGHT_CLASS_DEVICE is selected by FB_MX3
  symbol FB_MX3 depends on MX3_IPU
  symbol MX3_IPU depends on DMADEVICES

Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-07-14 10:24:58 +02:00
Russell King 937ca28445 drm/panel: consolidate unnecessary explicit dependencies
DRM_PANEL_LD9040 and DRM_PANEL_S6E8AA0 both explicitly depended on
DRM_PANEL && DRM, whereas DRM_PANEL_SIMPLE relies upon the dependency
on the menu.

We do not need to use explicit dependencies if we make the menu depend
on DRM_PANEL && DRM - this will implicitly make each entry in the menu
depend on DRM_PANEL && DRM without this needing to be explicitly stated
against every entry.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-07-14 10:24:57 +02:00
Stéphane Marchesin a333f7ad1d drm/panel: simple - Add AUO B133XTN01 panel support
This panel is used by nyan-big and can be supported by the simple-panel
driver.

Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
[treding@nvidia.com: add device tree binding document]
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-06-09 12:17:21 +02:00
Thierry Reding d02fd93e2c drm/panel: simple - Disable panel on shutdown
When a device is shut down, disable the panel to make sure the display
backlight doesn't stay lit.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-06-05 16:46:40 +02:00
Stefan Agner 26ab006579 drm/panel: add support for EDT ET057090DHU panel
This panel is sold by Toradex for Colibri T20/T30 and Apalis T30
evaluation kits.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-06-05 16:46:40 +02:00
Philipp Zabel fff5de45ef drm/panel: Add support for EDT ETM0700G0DH6 and ET070080DH6 panels
The EDT ETM0700G0DH6 and ET070080DH6 are 7" 800x480 panels,
which can be supported by the simple panel driver.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-06-05 16:46:39 +02:00
Andrzej Hajda dbd751eed8 drm/panel: ld9040: add power control sequence
Some ld9040 panels do not start without providing power control sequence
during initialization. The patch fixes the driver by providing such
sequence for all panels.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-06-05 16:46:39 +02:00
Dan Carpenter 9c911962f9 drm/panel: s6e8aa0: silence array overflow warning
Smatch complains that we are reading beyond the end of the array here:

	drivers/gpu/drm/panel/panel-s6e8aa0.c:852 s6e8aa0_read_mtp_id()
	warn: buffer overflow 's6e8aa0_variants' 4 <= 4

We set the error code, so it's not harmful but it looks like a return
was intended here so lets add that and silence the warning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-06-05 16:46:39 +02:00
Dave Airlie 243b930f8b drm/panel: Changes for v3.15-rc1
Add support for a couple more simple panels. A few cleanups to the
 simple panel driver are also included (gpiod interface conversion,
 removal of redundant call to regulator_disable()).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTPlsYAAoJEN0jrNd/PrOhYLUP/AhNzYjs8Aj/B7wYUKwsjY5v
 Kt3pci/dkCJnsrORH/CRLQiHN96LiH6h07vxoN1zia5viompnso3PtDln9Rl9rny
 V463crFhwjtDwvotob7UWzk5JSvJU12Wea3Q1pvRo/GZnjBgKDqmzq5zReXzUrw8
 Pw1vqNs1o+cZVO+1JVobn3VnwqPPMNi1lCfd1igyDcn+hSnrrLh8MlI3fC5ji4O5
 iLOT2U+4CD+MYICDKyrW27kUA62HYyi0eGtlDJVOThjVBvQaUqYuz/czfbvZw0xG
 U2rarUI+l4AhecP2AuAbkHrdQK2mIGRTC7S+GvCCH2eGqG9FNs3Z+rTEpg4kPIBl
 fsfdvOrkJNPfHHH3rZEbrz5ahyRJMFMgMoJrNRcnUu0Vn3BsiPBO8GMMf8jiGqbJ
 meT8d7x5Ln00egIrdx/17VJkLGZf4PO7mnWL5O76n+7CTfcrWI0xwMfwiKzURIlU
 LT1oY/VrJuJLmKVE7Z5yR+bFM1Ee4oxB3Uc13o7Qn3f+Bv4/lzZJJhc13hloXuIZ
 Nb81KL3KrD02KcgqhXhgbw9nZcdwnAvEqup+D6vJ+vaJzFGy3/GVKVZ0KAi7NGml
 rsGUpKDmtQMiAAy1bVV1zDMo5pX3fr1c7pry+dljkVOAC/KIDWcYt244y81ud3i1
 WJvAxR+PkY4mpWq5zvy5
 =6Tqg
 -----END PGP SIGNATURE-----

Merge tag 'drm/panel/for-3.15-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next

drm/panel: Changes for v3.15-rc1

Add support for a couple more simple panels. A few cleanups to the
simple panel driver are also included (gpiod interface conversion,
removal of redundant call to regulator_disable()).

* tag 'drm/panel/for-3.15-rc1' of git://anongit.freedesktop.org/tegra/linux:
  drm/panel: add support for LG LD070WX3-SL01 panel
  drm/panel: add support for LG LH500WX1-SD03 panel
  drm/panel: simple: Allow DSI panels to provide mode flags
  drm/panel: simple: Allow GPIO accesses to sleep
  drm/panel: remove redundant regulator_disable()
  drm/panel: use gpiod interface for enable GPIO
  drm/panel: Add LG 12.9" LCD panel
  MAINTAINERS: Add entry for DRM panel drivers

Conflicts:
	MAINTAINERS
2014-04-05 16:12:27 +10:00
Andrzej Hajda 02051ca063 drm/panel: add S6E8AA0 driver
The patch adds MIPI-DSI based S6E8AA0 AMOLED LCD panel driver.
Driver uses mipi_dsi bus to communicate with panel and exposes drm_panel
interface.

v2
- added bus error handling,
- set maxmimum DSI packet size on init,
- removed unsupported brightness drm_panel callbacks,
- minor improvements

v3
- switched to gpiod framework,
- minor fixes in error handling

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-04-04 21:24:49 +09:00
Andrzej Hajda ff21993776 drm/panel: add ld9040 driver
The patch adds LD9040 parallel RGB panel driver with SPI control interface.
The driver uses drm_panel framework.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-04-04 21:24:48 +09:00
Alexandre Courbot 712ac1ba63 drm/panel: add support for LG LD070WX3-SL01 panel
This panel is used by Tegra Note 7 and supported by the simple-panel
driver.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:06:40 +02:00
Alexandre Courbot 499ce85af9 drm/panel: add support for LG LH500WX1-SD03 panel
This panel is used by the NVIDIA SHIELD and supported by the
simple-panel driver.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:06:40 +02:00
Thierry Reding 462658b8b3 drm/panel: simple: Allow DSI panels to provide mode flags
In order to differentiate between the different video modes (burst vs.
non-burst, sync pulses vs. sync events) supported by peripherals, pass
the flags that specify this mode in the panel description to the DSI
peripheral device when probed.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:06:39 +02:00
Thierry Reding 15c1a919ae drm/panel: simple: Allow GPIO accesses to sleep
The enable GPIO for panels may be provided by GPIO expanders on slow
busses (such as I2C), and therefore toggling the GPIO may sleep. Since
these accesses don't happen in interrupt context, use the *_cansleep()
variants of the GPIO API.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:06:39 +02:00
Alexandre Courbot 887eb66e3a drm/panel: remove redundant regulator_disable()
regulator_disable() is already performed by panel_simple_disable(),
which is called by panel_simple_remove().

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:06:38 +02:00
Alexandre Courbot cfdf0549f8 drm/panel: use gpiod interface for enable GPIO
Use the new GPIO descriptor interface to handle the panel's enable GPIO.
This considerably simplifies the code.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
[treding@nvidia.com: rework to improve readability]
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:06:38 +02:00
Thierry Reding ec7c565383 drm/panel: Add LG 12.9" LCD panel
The LP129QE LCD has an LED backlight and a display resolution of
2560x1700 pixels.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04 09:06:34 +02:00
Stephen Warren 70bf6878a8 drm/panel: update EDID BLOB in panel_simple_get_modes()
This stashes away the EDID data so that the sysfs per-connector file
"edid" can display it. Without this change, the "edid" file is always
empty.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-14 16:02:02 +01:00
Stephen Warren 4c9307577e drm/panel: Add support for Chunghwa CLAA101WA01A panel
The Chunghwa CLAA101WA01A is a 10.1" 1366x768 panel, which can be
supported by the simple panel driver.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-08 16:13:57 +01:00
Marc Dietrich 6d54e3d275 drm/panel: Add support for Samsung LTN101NT05 panel
The Samsung LNT101NT05 10.1" WXVGA panel can be supported by the simple panel
driver.

Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-08 16:12:33 +01:00
Thierry Reding 210fcd9d9c drm/panel: Add support for Panasonic VVX10F004B0
The Panasonic VVX10F004B0 is a 10.1" WUXGA TFT LCD panel connected using
four DSI lanes.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2013-12-17 18:09:58 +01:00
Thierry Reding 280921de72 drm/panel: Add simple panel support
Add a driver for simple panels. Such panels can have a regulator that
provides the supply voltage and a separate GPIO to enable the panel.
Optionally the panels can have a backlight associated with them so it
can be enabled or disabled according to the panel's power management
mode.

Support is added for two panels: An AU Optronics 10.1" WSVGA and a
Chunghwa Picture Tubes 10.1" WXGA panel.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2013-12-17 18:09:51 +01:00
Thierry Reding aead40ea0b drm: Add panel support
Add a very simple framework to register and lookup panels. Panel drivers
can initialize a DRM panel and register it with the framework, allowing
them to be retrieved and used by display drivers. Currently only support
for DPMS and obtaining panel modes is provided. However it should be
sufficient to enable a large number of panels. The framework should also
be easily extensible to support more sophisticated kinds of panels such
as DSI.

The framework hasn't been tied into the DRM core, even though it should
be easily possible to do so if that's what we want. In the current
implementation, display drivers can simple make use of it to retrieve a
panel, obtain its modes and control its DPMS mode.

Note that this is currently only tested on systems that boot from a
device tree. No glue code has been written yet for systems that use
platform data, but it should be easy to add.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2013-12-17 18:09:46 +01:00