Add DSI display support for Exynos based boards
Subsystems (6)
v2 cover Add DSI display support for Exynos based boards
Hi,
This patchset adds drivers and bindings to the following devices:
- Exynos DSI master,
- S6E8AA0 DSI panel,
- TC358764 DSI/LVDS bridge,
- HV070WSA-100 LVDS panel.
It adds also display support in DTS files for the following boards:
- Exynos4210/Trats,
- Exynos4412/Trats2,
- Exynos5250/Arndale.
Things worth mentioning:
1. I have implemented DSI/LVDS bridge using drm_panel framework, ie. the driver exposes drm_panel interface on DSI side, and interact with panels on LVDS side using drm_panel framework. This approach seems to me simpler and more natural than using drm_bridge.
2. I have used video interface bindings to make link between bridge and LVDS panel. Other places where such links can be created are:
a) link between DSI master and slave, I wonder if it is always neccessary, DSI bus is also video bus,
b) link between FIMD(display controller) and DSI Master, currently Exynos DRM framework uses driver's hardcoded links, converting it to video interface bindings should be done (if required) by separate patches.
The patchset is based on Sean's Paul Exynos refactor patches v4 [1]. To work properly porch calculation should be fixed according to my comment [2].
It is the 2nd iteration of the patches, main changes:
- based on v4 refactor patches,
- added arndale related stuff.
Other changes are described in individual patches.
[1] http://permalink.gmane.org/gmane.comp.video.dri.devel/99264
[2] http://permalink.gmane.org/gmane.comp.video.dri.devel/99826
Regards
Andrzej
Andrzej Hajda (21):
drm_mipi_dsi: add flags to DSI messages
drm/exynos: delay fbdev initialization until an output is connected exynos/dsim: add DT bindings
drm/exynos: add DSIM driver
panel/s6e8aa0: add DT bindings
drm/panel: add S6E8AA0 driver
panel/tc358764: add DT bindings
drm/panel: add TC358764 driver
panel/simple: add video interface DT bindings panel/hv070wsa-100: add DT bindings
drm/panel: add support for BOE HV070WSA-100 panel to simple-panel
ARM: dts: exynos4: add MIPI DSI Master node
ARM: dts: exynos4210-trats: add panel node
ARM: dts: exynos4412-trats2: add panel node
ARM: dts: exynos5250: add mipi-phy node
ARM: dts: exynos5250: add display power domain node
ARM: dts: exynos5250: add DSI node
ARM: dts: exynos5250-arndale: add display regulators
ARM: dts: exynos5250-arndale: add dsi and panel nodes
ARM: dts: exynos4210-trats: enable exynos/fimd node
ARM: dts: exynos4412-trats2: enable exynos/fimd node
.../devicetree/bindings/panel/boe,hv070wsa-100.txt | 7 + .../devicetree/bindings/panel/samsung,s6e8aa0.txt | 51 + .../devicetree/bindings/panel/simple-panel.txt | 6 + .../devicetree/bindings/panel/toshiba,tc358764.txt | 41 + .../devicetree/bindings/video/exynos_dsim.txt | 53 + arch/arm/boot/dts/exynos4.dtsi | 14 + arch/arm/boot/dts/exynos4210-trats.dts | 42 + arch/arm/boot/dts/exynos4412-trats2.dts | 51 + arch/arm/boot/dts/exynos5250-arndale.dts | 63 + arch/arm/boot/dts/exynos5250.dtsi | 25 + drivers/gpu/drm/exynos/Kconfig | 9 + drivers/gpu/drm/exynos/Makefile | 1 + drivers/gpu/drm/exynos/exynos_drm_drv.c | 26 +- drivers/gpu/drm/exynos/exynos_drm_drv.h | 1 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1402 ++++++++++++++++++++ drivers/gpu/drm/exynos/exynos_drm_fb.c | 3 + drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 4 +- drivers/gpu/drm/panel/Kconfig | 14 + drivers/gpu/drm/panel/Makefile | 2 + drivers/gpu/drm/panel/panel-s6e8aa0.c | 1064 +++++++++++++++ drivers/gpu/drm/panel/panel-simple.c | 25 + drivers/gpu/drm/panel/panel-tc358764.c | 505 +++++++ include/drm/drm_mipi_dsi.h | 6 + 23 files changed, 3402 insertions(+), 13 deletions(-) create mode 100644 Documentation/devicetree/bindings/panel/boe,hv070wsa-100.txt create mode 100644 Documentation/devicetree/bindings/panel/samsung,s6e8aa0.txt create mode 100644 Documentation/devicetree/bindings/panel/toshiba,tc358764.txt create mode 100644 Documentation/devicetree/bindings/video/exynos_dsim.txt create mode 100644 drivers/gpu/drm/exynos/exynos_drm_dsi.c create mode 100644 drivers/gpu/drm/panel/panel-s6e8aa0.c create mode 100644 drivers/gpu/drm/panel/panel-tc358764.c
Signature · 1 line
1.8.3.2
RFC PATCH v2 1/21 drm_mipi_dsi: add flags to DSI messages
This patch adds flags field to mipi_dsi_msg structure and two flags:
- MIPI_DSI_MSG_REQ_ACK - request ACK from peripheral for given message,
- MIPI_DSI_MSG_USE_LPM - use Low Power Mode to transmit message. The first flag is usually helpful during DSI diagnostic, the second flag is required by some peripherals during configuration phase.
--- include/drm/drm_mipi_dsi.h | 6 ++++++ 1 file changed, 6 insertions(+)
include/drm/drm_mipi_dsi.h +6 -0
@@ -17,6 +17,11 @@struct mipi_dsi_host ;struct mipi_dsi_device ; +/* request ACK from peripheral */ +#define MIPI_DSI_MSG_REQ_ACK BIT(0) +/* use Low Power Mode to transmit message */ +#define MIPI_DSI_MSG_USE_LPM BIT(1) +/** * struct mipi_dsi_msg - read/write DSI buffer * @channel: virtual channel id
@@ -29,6 +34,7 @@ struct mipi_dsi_device;struct mipi_dsi_msg {u8 channel;u8 type; +u16 flags;size_t tx_len;const void *tx_buf;
Signature · 1 line
1.8.3.2
RFC PATCH v2 2/21 drm/exynos: delay fbdev initialization until an output is connected
In reply to Andrzej HajdaIn case fbdev is initialized before any output is connected, fb resolution defaults to 1024x768. After that any output with bigger resolution is ignored and fbdev is not displayed. The patch postpones fbdev initialization to avoid such situation.
--- drivers/gpu/drm/exynos/exynos_drm_drv.c | 12 ------------ drivers/gpu/drm/exynos/exynos_drm_fb.c | 3 +++ drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 4 +++- 3 files changed, 6 insertions(+), 13 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_drv.c +0 -12
@@ -109,24 +109,12 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags)/* setup possible_clones. */ exynos_drm_encoder_setup (dev); -/* -* create and configure fb helper and also exynos specific -* fbdev object. -*/ - ret =exynos_drm_fbdev_init (dev); -if (ret) { -DRM_ERROR ("failed to initialize drm fbdev\n" ); - goto err_drm_device; - } - drm_vblank_offdelay =VBLANK_OFF_DELAY ;platform_set_drvdata (dev->platformdev, dev);return 0 ; -err_drm_device: -exynos_drm_device_unregister (dev); err_vblank:drm_vblank_cleanup (dev); err_display_cleanup:
drivers/gpu/drm/exynos/exynos_drm_fb.c +3 -0
@@ -20,6 +20,7 @@#include "exynos_drm_drv.h" #include "exynos_drm_fb.h" +#include "exynos_drm_fbdev.h" #include "exynos_drm_gem.h" #include "exynos_drm_iommu.h" #include "exynos_drm_crtc.h"
@@ -300,6 +301,8 @@ static void exynos_drm_output_poll_changed(struct drm_device *dev)if (fb_helper)drm_fb_helper_hotplug_event (fb_helper); +else +exynos_drm_fbdev_init (dev); }static const struct drm_mode_config_funcs exynos_drm_mode_config_funcs = {
drivers/gpu/drm/exynos/exynos_drm_fbdev.c +3 -1
@@ -249,8 +249,10 @@ int exynos_drm_fbdev_init(struct drm_device *dev)return 0 ; fbdev =kzalloc (sizeof (*fbdev),GFP_KERNEL ); -if (!fbdev) +if (!fbdev) { +DRM_ERROR ("failed to allocate fbdev.\n" );return -ENOMEM ; + } private->fb_helper = helper = &fbdev->drm_fb_helper; helper->funcs = &exynos_drm_fb_helper_funcs;
Signature · 1 line
1.8.3.2
Re: [RFC PATCH v2 02/21] drm/exynos: delay fbdev initialization until an output is connected
+cc Inki Dae
Looks like you missed CCing Exynos DRM maintainers.
Quoted 7 lines · Andrzej Hajda
In case fbdev is initialized before any output is connected, fb resolution defaults to 1024x768. After that any output with bigger resolution is ignored and fbdev is not displayed. The patch postpones fbdev initialization to avoid such situation.
Signed-off-by Andrzej Hajda <[email protected]>---
[snip]
drivers/gpu/drm/exynos/exynos_drm_fbdev.c int exynos_drm_fbdev_init(struct drm_device *dev) · line 253
Quoted 12 lines
static const struct
drm_mode_config_funcsexynos_drm_mode_config_funcs= {drivers/gpu/drm/exynos/exynos_drm_fbdev.c +2
-1@@ -249,8 +249,10 @@ int exynos_drm_fbdev_init(struct drm_device *dev)return 0 ; fbdev =kzalloc (sizeof (*fbdev),GFP_KERNEL ); -if (!fbdev) +if (!fbdev) { +DRM_ERROR ("failed to allocate fbdev.\n" );
This message is not needed as kzalloc gives oom message.
Quoted 2 lines
drivers/gpu/drm/exynos/exynos_drm_fbdev.c +1
-0return -ENOMEM ; + }
Signature · 2 lines
With warm regards, Sachin
RFC PATCH v2 3/21 exynos/dsim: add DT bindings
In reply to Andrzej HajdaThe patch adds DT bindings for Exynos DSI Master. DSIM follows rules for DSI bus host bindings [1].
Properties describes its resources: memory, interrupt, clocks, phy, regulators and frequencies of clocks.
[1]: Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt
---
v2
- added burst and esc clock frequency properties
- add samsung prefix to all frequency props
--- .../devicetree/bindings/video/exynos_dsim.txt | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/exynos_dsim.txt
Documentation/devicetree/bindings/video/exynos_dsim.txt new file +53 -0
@@ -0,0 +1,53 @@ +Exynos MIPI DSI Master + +Required properties: + - compatible: "samsung,exynos4210-mipi-dsi" + - reg: physical base address and length of the registers set for the device + - interrupts: should contain DSI interrupt + - clocks: list of clock specifiers, must contain an entry for each required + entry in clock-names + - clock-names: should include "bus_clk"and "pll_clk" entries + - phys: list of phy specifiers, must contain an entry for each required + entry in phy-names + - phy-names: should include "dsim" entry + - vddcore-supply: MIPI DSIM Core voltage supply (e.g. 1.1V) + - vddio-supply: MIPI DSIM I/O and PLL voltage supply (e.g. 1.8V) + - samsung,pll-clock-frequency: specifies frequency of the "pll_clk" clock + - samsung,burst-clock-frequency: specifies DSI frequency in high-speed burst + mode + - samsung,esc-clock-frequency: specifies DSI frequency in escape mode + - #address-cells, #size-cells: should be set respectively to <1> and <0> + according to DSI host bindings (see MIPI DSI bindings [1]) + +Optional properties: + - samsung,power-domain: a phandle to DSIM power domain node + +Child nodes: + Should contain DSI peripheral nodes (see DSI bindings [1]) + +[1]: Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt + +Example: + + dsi@11C80000 { + compatible = "samsung,exynos4210-mipi-dsi"; + reg = <0x11C80000 0x10000>; + interrupts = <0 79 0>; + clocks = <&clock 286>, <&clock 143>; + clock-names = "bus_clk", "pll_clk"; + phys = <&mipi_phy 1>; + phy-names = "dsim"; + vddcore-supply = <&vusb_reg>; + vddio-supply = <&vmipi_reg>; + samsung,power-domain = <&pd_lcd0>; + #address-cells = <1>; + #size-cells = <0>; + samsung,pll-clock-frequency = <24000000>; + samsung,burst-clock-frequency = <500000000>; + samsung,esc-clock-frequency = <20000000>; + + panel@0 { + reg = <0>; + ... + }; + };
Signature · 1 line
1.8.3.2
Inki Dae
maintainerRe: [RFC PATCH v2 03/21] exynos/dsim: add DT bindings
2014-02-12 20:31 GMT+09:00 Andrzej Hajda <[email protected]>:
Quoted 60 lines
The patch adds DT bindings for Exynos DSI Master. DSIM follows rules for DSI bus host bindings [1].
Properties describes its resources: memory, interrupt, clocks, phy, regulators and frequencies of clocks.[1]:
Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txtSigned-off-by Andrzej Hajda <[email protected]>---
v2
- added burst and esc clock frequency properties
- add samsung prefix to all frequency props--- .../devicetree/bindings/video/exynos_dsim.txt | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/exynos_dsim.txtDocumentation/devicetree/bindings/video/exynos_dsim.txt new file +37
-0@@ -0,0 +1,53 @@ +Exynos MIPI DSI Master + +Required properties: + - compatible: "samsung,exynos4210-mipi-dsi" + - reg: physical base address and length of the registers set for the device + - interrupts: should contain DSI interrupt + - clocks: list of clock specifiers, must contain an entry for each required + entry in clock-names + - clock-names: should include "bus_clk"and "pll_clk" entries + - phys: list of phy specifiers, must contain an entry for each required + entry in phy-names + - phy-names: should include "dsim" entry + - vddcore-supply: MIPI DSIM Core voltage supply (e.g. 1.1V) + - vddio-supply: MIPI DSIM I/O and PLL voltage supply (e.g. 1.8V) + - samsung,pll-clock-frequency: specifies frequency of the "pll_clk" clock + - samsung,burst-clock-frequency: specifies DSI frequency in high-speed burst + mode + - samsung,esc-clock-frequency: specifies DSI frequency in escape mode + - #address-cells, #size-cells: should be set respectively to <1> and <0> + according to DSI host bindings (see MIPI DSI bindings [1]) + +Optional properties: + - samsung,power-domain: a phandle to DSIM power domain node + +Child nodes: + Should contain DSI peripheral nodes (see DSI bindings [1]) + +[1]: Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt + +Example: + + dsi@11C80000 { + compatible = "samsung,exynos4210-mipi-dsi"; + reg = <0x11C80000 0x10000>; + interrupts = <0 79 0>; + clocks = <&clock 286>, <&clock 143>; + clock-names = "bus_clk", "pll_clk";
Documentation/devicetree/bindings/video/exynos_dsim.txt line 47
Quoted 10 lines
Documentation/devicetree/bindings/video/exynos_dsim.txt new file +10
-0+ phys = <&mipi_phy 1>; + phy-names = "dsim"; + vddcore-supply = <&vusb_reg>; + vddio-supply = <&vmipi_reg>; + samsung,power-domain = <&pd_lcd0>; + #address-cells = <1>; + #size-cells = <0>; + samsung,pll-clock-frequency = <24000000>; + samsung,burst-clock-frequency = <500000000>; + samsung,esc-clock-frequency = <20000000>;
Isn't a property indicating cpu or video mode needed for the future even though now DSI driver doesn't support CPU interface yet? Which mode is used would depend on machine.
Quoted 13 lines
Documentation/devicetree/bindings/video/exynos_dsim.txt new file +6
-1+ + panel@0 { + reg = <0>; + ... + }; + }; --1.8.3.2
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [RFC PATCH v2 03/21] exynos/dsim: add DT bindings
Quoted 66 lines · Inki Dae
2014-02-12 20:31 GMT+09:00 Andrzej Hajda <[email protected]>:
Quoted 65 lines
The patch adds DT bindings for Exynos DSI Master. DSIM follows rules for DSI bus host bindings [1].
Properties describes its resources: memory, interrupt, clocks, phy, regulators and frequencies of clocks.[1]:
Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txtSigned-off-by Andrzej Hajda <[email protected]>---
v2
- added burst and esc clock frequency properties
- add samsung prefix to all frequency props--- .../devicetree/bindings/video/exynos_dsim.txt | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/exynos_dsim.txtDocumentation/devicetree/bindings/video/exynos_dsim.txt new file +42
-0@@ -0,0 +1,53 @@ +Exynos MIPI DSI Master + +Required properties: + - compatible: "samsung,exynos4210-mipi-dsi" + - reg: physical base address and length of the registers set for the device + - interrupts: should contain DSI interrupt + - clocks: list of clock specifiers, must contain an entry for each required + entry in clock-names + - clock-names: should include "bus_clk"and "pll_clk" entries + - phys: list of phy specifiers, must contain an entry for each required + entry in phy-names + - phy-names: should include "dsim" entry + - vddcore-supply: MIPI DSIM Core voltage supply (e.g. 1.1V) + - vddio-supply: MIPI DSIM I/O and PLL voltage supply (e.g. 1.8V) + - samsung,pll-clock-frequency: specifies frequency of the "pll_clk" clock + - samsung,burst-clock-frequency: specifies DSI frequency in high-speed burst + mode + - samsung,esc-clock-frequency: specifies DSI frequency in escape mode + - #address-cells, #size-cells: should be set respectively to <1> and <0> + according to DSI host bindings (see MIPI DSI bindings [1]) + +Optional properties: + - samsung,power-domain: a phandle to DSIM power domain node + +Child nodes: + Should contain DSI peripheral nodes (see DSI bindings [1]) + +[1]: Documentation/devicetree/bindings/mipi/dsi/mipi-dsi-bus.txt + +Example: + + dsi@11C80000 { + compatible = "samsung,exynos4210-mipi-dsi"; + reg = <0x11C80000 0x10000>; + interrupts = <0 79 0>; + clocks = <&clock 286>, <&clock 143>; + clock-names = "bus_clk", "pll_clk"; + phys = <&mipi_phy 1>; + phy-names = "dsim"; + vddcore-supply = <&vusb_reg>; + vddio-supply = <&vmipi_reg>; + samsung,power-domain = <&pd_lcd0>;
Quoted 8 lines
Documentation/devicetree/bindings/video/exynos_dsim.txt line 47
Quoted 5 lines
Documentation/devicetree/bindings/video/exynos_dsim.txt new file +5
-0+ #address-cells = <1>; + #size-cells = <0>; + samsung,pll-clock-frequency = <24000000>; + samsung,burst-clock-frequency = <500000000>; + samsung,esc-clock-frequency = <20000000>;Isn't a property indicating cpu or video mode needed for the future even though now DSI driver doesn't support CPU interface yet? Which mode is used would depend on machine.
Mode is determined by panel, ie. by dsi slave.
Regards
Andrzej
Quoted 14 lines
Quoted 14 lines
Documentation/devicetree/bindings/video/exynos_dsim.txt new file +6
-1+ + panel@0 { + reg = <0>; + ... + }; + }; --1.8.3.2
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
RFC PATCH v2 4/21 drm/exynos: add DSIM driver
In reply to Andrzej HajdaThe patch adds driver for Exynos DSI master (DSIM). It is a platform driver which is registered as exynos_drm_display sub-driver of exynos_drm framework and implements DRM encoder/connector pair.
It is also MIPI-DSI host driver and provides DSI bus for panels. It interacts with its panel(s) using drm_panel framework.
---
v2
- add support for DSI message flags,
- add support for new DT properties,
- remove brightness DRM property,
- corrected PM handlers,
- minor fixes/improvements
--- drivers/gpu/drm/exynos/Kconfig | 9 + drivers/gpu/drm/exynos/Makefile | 1 + drivers/gpu/drm/exynos/exynos_drm_drv.c | 14 + drivers/gpu/drm/exynos/exynos_drm_drv.h | 1 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1402 +++++++++++++++++++++++++++++++ 5 files changed, 1427 insertions(+) create mode 100644 drivers/gpu/drm/exynos/exynos_drm_dsi.c
drivers/gpu/drm/exynos/Kconfig +9 -0
@@ -31,6 +31,15 @@ config DRM_EXYNOS_FIMD help Choose this option if you want to use Exynos FIMD for DRM. +config DRM_EXYNOS_DSI + bool "EXYNOS DRM MIPI-DSI driver support" + depends on DRM_EXYNOS + select DRM_MIPI_DSI + select DRM_PANEL + default n + help + This enables support for Exynos MIPI-DSI device. + config DRM_EXYNOS_DP bool "EXYNOS DRM DP driver support" depends on DRM_EXYNOS && ARCH_EXYNOS
drivers/gpu/drm/exynos/Makefile +1 -0
@@ -11,6 +11,7 @@ exynosdrm-y := exynos_drm_drv.o exynos_drm_encoder.o \ exynosdrm-$(CONFIG_DRM_EXYNOS_IOMMU) += exynos_drm_iommu.o exynosdrm-$(CONFIG_DRM_EXYNOS_DMABUF) += exynos_drm_dmabuf.o exynosdrm-$(CONFIG_DRM_EXYNOS_FIMD) += exynos_drm_fimd.o +exynosdrm-$(CONFIG_DRM_EXYNOS_DSI) += exynos_drm_dsi.o exynosdrm-$(CONFIG_DRM_EXYNOS_DP) += exynos_dp_core.o exynos_dp_reg.o exynosdrm-$(CONFIG_DRM_EXYNOS_HDMI) += exynos_hdmi.o exynos_mixer.o exynosdrm-$(CONFIG_DRM_EXYNOS_VIDI) += exynos_drm_vidi.o
drivers/gpu/drm/exynos/exynos_drm_drv.c +14 -0
@@ -444,6 +444,12 @@ static int __init exynos_drm_init(void) goto out_dp;#endif +#ifdef CONFIG_DRM_EXYNOS_DSI + ret =platform_driver_register (&dsi_driver); +if (ret <0 ) + goto out_dsi; +#endif +#ifdef CONFIG_DRM_EXYNOS_FIMD ret =platform_driver_register (&fimd_driver);if (ret <0 )
@@ -559,6 +565,10 @@ out_hdmi:platform_driver_unregister (&fimd_driver); out_fimd:#endif +#ifdef CONFIG_DRM_EXYNOS_DSI +platform_driver_unregister (&dsi_driver); +out_dsi: +#endif #ifdef CONFIG_DRM_EXYNOS_DP platform_driver_unregister (&dp_driver); out_dp:
@@ -606,6 +616,10 @@ static void __exit exynos_drm_exit(void)platform_driver_unregister (&fimd_driver);#endif +#ifdef CONFIG_DRM_EXYNOS_DSI +platform_driver_unregister (&dsi_driver); +#endif +#ifdef CONFIG_DRM_EXYNOS_DP platform_driver_unregister (&dp_driver);#endif
drivers/gpu/drm/exynos/exynos_drm_drv.h +1 -0
@@ -362,6 +362,7 @@ int exynos_platform_device_ipp_register(void);void exynos_platform_device_ipp_unregister (void );extern struct platform_driver dp_driver; +extern struct platform_driver dsi_driver;extern struct platform_driver fimd_driver;extern struct platform_driver hdmi_driver;extern struct platform_driver mixer_driver;
drivers/gpu/drm/exynos/exynos_drm_dsi.c new file +1402 -0
1,402 lines not on this page · raw message
Signature · 1 line
1.8.3.2
RFC PATCH v2 5/21 panel/s6e8aa0: add DT bindings
In reply to Andrzej HajdaThe patch adds bindings for s6e8aa0 panel.
Bindings describes panel resources, boot delays,
display timings, orientation and physical size.
---
v2
- removed samsung prefix from panel physical size props,
- renamed file to follow convention of panel bindings
--- .../devicetree/bindings/panel/samsung,s6e8aa0.txt | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 Documentation/devicetree/bindings/panel/samsung,s6e8aa0.txt
Documentation/devicetree/bindings/panel/samsung,s6e8aa0.txt new file +51 -0
@@ -0,0 +1,51 @@ +Samsung S6E8AA0 AMOLED LCD 5.3 inch panel + +Required properties: + - compatible: "samsung,s6e8aa0" + - reg: the virtual channel number of a DSI peripheral + - vdd3-supply: core voltage supply + - vci-supply: voltage supply for analog circuits + - reset-gpio: a GPIO spec for the reset pin + - display-timings: timings for the connected panel as described by [1] + +Optional properties: + - power-on-delay: delay after turning regulators on [ms] + - reset-delay: delay after reset sequence [ms] + - init-delay: delay after initialization sequence [ms] + - panel-width-mm: physical panel width [mm] + - panel-height-mm: physical panel height [mm] + - flip-horizontal: boolean to flip image horizontally + - flip-vertical: boolean to flip image vertically + +[1]: Documentation/devicetree/bindings/video/display-timing.txt + +Example: + + panel { + compatible = "samsung,s6e8aa0"; + reg = <0>; + vdd3-supply = <&vcclcd_reg>; + vci-supply = <&vlcd_reg>; + reset-gpio = <&gpy4 5 0>; + power-on-delay= <50>; + reset-delay = <100>; + init-delay = <100>; + panel-width-mm = <58>; + panel-height-mm = <103>; + flip-horizontal; + flip-vertical; + + display-timings { + timing0: timing-0 { + clock-frequency = <57153600>; + hactive = <720>; + vactive = <1280>; + hfront-porch = <5>; + hback-porch = <5>; + hsync-len = <5>; + vfront-porch = <13>; + vback-porch = <1>; + vsync-len = <2>; + }; + }; + };
Signature · 1 line
1.8.3.2
RFC PATCH v2 6/21 drm/panel: add S6E8AA0 driver
In reply to Andrzej HajdaThe 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
--- drivers/gpu/drm/panel/Kconfig | 7 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-s6e8aa0.c | 1064 +++++++++++++++++++++++++++++++++ 3 files changed, 1072 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-s6e8aa0.c
drivers/gpu/drm/panel/Kconfig +7 -0
@@ -16,4 +16,11 @@ config DRM_PANEL_SIMPLE that it can be automatically turned off when the panel goes into a low power state. +config DRM_PANEL_S6E8AA0 + tristate "S6E8AA0 DSI video mode panel" + depends on DRM && DRM_PANEL + depends on OF + select DRM_MIPI_DSI + select VIDEOMODE_HELPERS + endmenu
drivers/gpu/drm/panel/Makefile +1 -0
@@ -1 +1,2 @@ obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o +obj-$(CONFIG_DRM_PANEL_S6E8AA0) += panel-s6e8aa0.o
drivers/gpu/drm/panel/panel-s6e8aa0.c new file +1064 -0
1,064 lines not on this page · raw message
Signature · 1 line
1.8.3.2
RFC PATCH v2 7/21 panel/tc358764: add DT bindings
In reply to Andrzej HajdaThe patch add bindings to Toshiba DSI/LVDS bridge TC358764. Bindings describes power supplies, reset gpio and video interfaces.
--- .../devicetree/bindings/panel/toshiba,tc358764.txt | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/panel/toshiba,tc358764.txt
Documentation/devicetree/bindings/panel/toshiba,tc358764.txt new file +41 -0
@@ -0,0 +1,41 @@ +TC358764 MIPI-DSI to LVDS panel bridge + +Required properties: + - compatible: "toshiba,tc358764" + - reg: the virtual channel number of a DSI peripheral + - vddc-supply: core voltage supply + - vddio-supply: I/O voltage supply + - vddmipi-supply: MIPI voltage supply + - vddlvds133-supply: LVDS1 3.3V voltage supply + - vddlvds112-supply: LVDS1 1.2V voltage supply + - reset-gpio: a GPIO spec for the reset pin + +The device node can contain zero to two 'port' child nodes, each with one child +'endpoint' node, according to the bindings defined in [1]. +The following are properties specific to those nodes. + +port: + - reg: (required) can be 0 for DSI port or 1 for LVDS port; + +[1]: Documentation/devicetree/bindings/media/video-interfaces.txt + +Example: + + bridge@0 { + reg = <0>; + compatible = "toshiba,tc358764"; + vddc-supply = <&vcc_1v2_reg>; + vddio-supply = <&vcc_1v8_reg>; + vddmipi-supply = <&vcc_1v2_reg>; + vddlvds133-supply = <&vcc_3v3_reg>; + vddlvds112-supply = <&vcc_1v2_reg>; + reset-gpio = <&gpd1 6 1>; + #address-cells = <1>; + #size-cells = <0>; + port@1 { + reg = <1>; + lvds_ep: endpoint { + remote-endpoint = <&panel_ep>; + }; + }; + };
Signature · 1 line
1.8.3.2
A message that is not in the archive (sent off-list or not yet received): 1392204688-4591-1-git-send-email-a.hajda-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org
RFC PATCH v2 8/21 drm/panel: add TC358764 driver
The patch adds driver for Toshiba DSI/LVDS TC358764 bridge. Driver registers itself as mipi_dsi_driver. It is exposed to the system via drm_panel interface, it uses also drm_panel framework to interact with LVDS panel connected to it.
Driver supports only DT bindings.
--- drivers/gpu/drm/panel/Kconfig | 7 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-tc358764.c | 505 +++++++++++++++++++++++++++++++++ 3 files changed, 513 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-tc358764.c
drivers/gpu/drm/panel/Kconfig +7 -0
@@ -23,4 +23,11 @@ config DRM_PANEL_S6E8AA0 select DRM_MIPI_DSI select VIDEOMODE_HELPERS +config DRM_PANEL_TC358764 + tristate "TC358764 DSI/LVDS bridge" + depends on DRM && DRM_PANEL + depends on OF + select DRM_MIPI_DSI + select VIDEOMODE_HELPERS + endmenu
drivers/gpu/drm/panel/Makefile +1 -0
@@ -1,2 +1,3 @@ obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o obj-$(CONFIG_DRM_PANEL_S6E8AA0) += panel-s6e8aa0.o +obj-$(CONFIG_DRM_PANEL_TC358764) += panel-tc358764.o
drivers/gpu/drm/panel/panel-tc358764.c new file +505 -0
505 lines not on this page · raw message
Signature · 6 lines
1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Inki Dae
maintainerRe: [RFC PATCH v2 08/21] drm/panel: add TC358764 driver
2014-02-12 20:31 GMT+09:00 Andrzej Hajda <[email protected]>:
Quoted 59 lines
The patch adds driver for Toshiba DSI/LVDS TC358764 bridge. Driver registers itself as
mipi_dsi_driver. It is exposed to the system viadrm_panelinterface, it uses alsodrm_panelframework to interact with LVDS panel connected to it.
Driver supports only DT bindings.Signed-off-by Andrzej Hajda <[email protected]>--- drivers/gpu/drm/panel/Kconfig | 7 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-tc358764.c | 505 +++++++++++++++++++++++++++++++++ 3 files changed, 513 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-tc358764.cdrivers/gpu/drm/panel/Kconfig +7
-0@@ -23,4 +23,11 @@ config DRM_PANEL_S6E8AA0 select DRM_MIPI_DSI select VIDEOMODE_HELPERS +config DRM_PANEL_TC358764 + tristate "TC358764 DSI/LVDS bridge" + depends on DRM && DRM_PANEL + depends on OF + select DRM_MIPI_DSI + select VIDEOMODE_HELPERS + endmenudrivers/gpu/drm/panel/Makefile +1
-0@@ -1,2 +1,3 @@ obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o obj-$(CONFIG_DRM_PANEL_S6E8AA0) += panel-s6e8aa0.o +obj-$(CONFIG_DRM_PANEL_TC358764) += panel-tc358764.odrivers/gpu/drm/panel/panel-tc358764.c new file +15
-0@@ -0,0 +1,505 @@ +/* +* TC358764 MIPI-DSI to LVDS bridge panel driver. +* +* Copyright (c) 2013 Samsung Electronics Co., Ltd +* +* Andrzej Hajda <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#include <drm/drmP.h> +#include <drm/drm_mipi_dsi.h> +#include <drm/drm_panel.h>
...
Quoted 80 lines
drivers/gpu/drm/panel/panel-tc358764.c new file +80
-0+/* of_* functions will be removed after acceptance of of_graph patches */ +static struct device_node * +of_get_child_by_name_reg (struct device_node *parent,const char *name,u32 reg) +{ +struct device_node *np; + +for_each_child_of_node (parent, np) { +u32 r; + +if (!np->name ||of_node_cmp (np->name, name)) +continue ; + +if (of_property_read_u32 (np,"reg" , &r) <0 ) + r =0 ; + +if (reg == r) +break ; + } + +return np; +} + +static struct device_node *of_graph_get_port_by_reg (struct device_node *parent, +u32 reg) +{ +struct device_node *ports, *port; + + ports =of_get_child_by_name (parent,"ports" ); +if (ports) { + port =of_get_child_by_name_reg (ports,"port" , reg); +of_node_put (ports); + }else { + port =of_get_child_by_name_reg (parent,"port" , reg); + } +return port; +} + +static struct device_node * +of_graph_get_endpoint_by_reg (struct device_node *port,u32 reg) +{ +return of_get_child_by_name_reg (port,"endpoint" , reg); +} + +static struct device_node * +of_graph_get_remote_port_parent (const struct device_node *node) +{ +struct device_node *np; +unsigned int depth; + +/* Get remote endpoint node. */ + np =of_parse_phandle (node,"remote-endpoint" ,0 ); + +/* Walk 3 levels up only if there is 'ports' node. */ +for (depth =3 ; depth && np; depth--) { + np =of_get_next_parent (np); +if (depth ==2 &&of_node_cmp (np->name,"ports" )) +break ; + } +return np; +} + +static struct device_node *tc358764_of_find_panel_node (struct device *dev) +{ +struct device_node *np, *ep; + + np =of_graph_get_port_by_reg (dev->of_node,1 ); +if (!np) +return NULL ; + + ep =of_graph_get_endpoint_by_reg (np,0 ); +of_node_put (np); +if (!ep) +return NULL ; + + np =of_graph_get_remote_port_parent (ep); +of_node_put (ep); + +return np; +} +
drivers/gpu/drm/panel/panel-tc358764.c line 391
Quoted 10 lines
drivers/gpu/drm/panel/panel-tc358764.c new file +10
-0+static int tc358764_parse_dt (struct tc358764 *ctx) +{ +struct device *dev = ctx->dev; +struct device_node *np = dev->of_node; +struct device_node *lvds; + + ctx->reset_gpio =of_get_named_gpio (np,"reset-gpio" ,0 ); +if (ctx->reset_gpio <0 ) { +dev_err (dev,"no reset GPIO pin provided\n" ); +//return ctx->reset_gpio;
Seem like your mistake.
drivers/gpu/drm/panel/panel-tc358764.c line 394
Quoted 3 lines
drivers/gpu/drm/panel/panel-tc358764.c new file +3
-0+ } + + lvds =tc358764_of_find_panel_node (ctx->dev);
Isn't lvds device_node object of real lcd panel device, hv070wsa-100? it seems like more meaningful to use panel instead of lvds.
drivers/gpu/drm/panel/panel-tc358764.c line 402
Quoted 8 lines
drivers/gpu/drm/panel/panel-tc358764.c new file +8
-0+if (!lvds) { +dev_err (dev,"cannot find panel node\n" ); +return -EINVAL ; + } + ctx->panel =of_drm_find_panel (lvds); +if (!ctx->panel) { +dev_info (dev,"panel not registered\n" ); +return -EPROBE_DEFER ;
That is what I concerned. This driver uses deferred probe feature because real LCD panel driver couldn't be probed yet at this moment. That isn't reasonable to me. There would be a better way than this one.
Quoted 30 lines
drivers/gpu/drm/panel/panel-tc358764.c new file +30
-0+ } + +return 0 ; +} + +static int tc358764_configure_regulators (struct tc358764 *ctx) +{ +int i, ret; + +for (i =0 ; i <ARRAY_SIZE (ctx->supplies); ++i) + ctx->supplies[i].supply = tc358764_supplies[i]; + + ret =devm_regulator_bulk_get (ctx->dev,ARRAY_SIZE (ctx->supplies), + ctx->supplies); +if (ret <0 ) +dev_info (ctx->dev,"failed to get regulators: %d\n" , ret); + +return ret; +} + +static int tc358764_probe (struct mipi_dsi_device *dsi) +{ +struct device *dev = &dsi->dev; +struct tc358764 *ctx; +int ret; + + ctx =devm_kzalloc (dev,sizeof (struct tc358764 ),GFP_KERNEL ); +if (!ctx) { +dev_err (dev,"failed to allocate tc358764 structure.\n" ); +return -ENOMEM ;
drivers/gpu/drm/panel/panel-tc358764.c line 442
Quoted 10 lines
drivers/gpu/drm/panel/panel-tc358764.c new file +10
-0+ } + +mipi_dsi_set_drvdata (dsi, ctx); + + ctx->dev = dev; + + dsi->lanes =4 ; + dsi->format =MIPI_DSI_FMT_RGB888 ; + dsi->mode_flags =MIPI_DSI_MODE_VIDEO |MIPI_DSI_MODE_VIDEO_BURST + |MIPI_DSI_MODE_VIDEO_AUTO_VERT ;
Is it right for the pixel format, mode type and lane count are fixed? I think these could be changed according to LCD type and its resolution.
Quoted 70 lines
drivers/gpu/drm/panel/panel-tc358764.c new file +63
-1+ + ret =tc358764_parse_dt (ctx); +if (ret <0 ) +return ret; + + ret =tc358764_configure_regulators (ctx); +if (ret <0 ) +return ret; + + ret =devm_gpio_request_one (dev, ctx->reset_gpio,GPIOF_DIR_OUT , +"TC358764_RESET" ); +if (ret <0 ) { +dev_info (dev,"failed to request reset gpio\n" ); +return ret; + } + +drm_panel_init (&ctx->bridge); + ctx->bridge.dev = dev; + ctx->bridge.funcs = &tc358764_drm_funcs; + + ret =drm_panel_add (&ctx->bridge); +if (ret <0 ) +return ret; + + ret =mipi_dsi_attach (dsi); +if (ret <0 ) +drm_panel_remove (&ctx->bridge); + +return ret; +} + +static int tc358764_remove (struct mipi_dsi_device *dsi) +{ +struct tc358764 *ctx =mipi_dsi_get_drvdata (dsi); + +tc358764_poweroff (ctx); + +mipi_dsi_detach (dsi); +drm_panel_remove (&ctx->bridge); + +return 0 ; +} + +static struct of_device_id tc358764_of_match[] = { + { .compatible ="toshiba,tc358764" }, + { } +}; +MODULE_DEVICE_TABLE (of, tc358764_of_match); + +static struct mipi_dsi_driver tc358764_driver = { + .probe = tc358764_probe, + .remove = tc358764_remove, + .driver = { + .name ="panel_tc358764" , + .owner =THIS_MODULE , + .of_match_table = tc358764_of_match, + }, +}; +module_mipi_dsi_driver (tc358764_driver); + +MODULE_AUTHOR ("Andrzej Hajda <[email protected]>" ); +MODULE_DESCRIPTION ("MIPI-DSI based Driver for TC358764 DSI/LVDS Bridge" ); +MODULE_LICENSE ("GPL v2" ); --1.8.3.2
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [RFC PATCH v2 08/21] drm/panel: add TC358764 driver
Hi Inki,
Thanks for the review.
Quoted 144 lines · Inki Dae
2014-02-12 20:31 GMT+09:00 Andrzej Hajda <[email protected]>:
Quoted 59 lines
The patch adds driver for Toshiba DSI/LVDS TC358764 bridge. Driver registers itself as
mipi_dsi_driver. It is exposed to the system viadrm_panelinterface, it uses alsodrm_panelframework to interact with LVDS panel connected to it.
Driver supports only DT bindings.Signed-off-by Andrzej Hajda <[email protected]>--- drivers/gpu/drm/panel/Kconfig | 7 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-tc358764.c | 505 +++++++++++++++++++++++++++++++++ 3 files changed, 513 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-tc358764.cdrivers/gpu/drm/panel/Kconfig +7
-0@@ -23,4 +23,11 @@ config DRM_PANEL_S6E8AA0 select DRM_MIPI_DSI select VIDEOMODE_HELPERS +config DRM_PANEL_TC358764 + tristate "TC358764 DSI/LVDS bridge" + depends on DRM && DRM_PANEL + depends on OF + select DRM_MIPI_DSI + select VIDEOMODE_HELPERS + endmenudrivers/gpu/drm/panel/Makefile +1
-0@@ -1,2 +1,3 @@ obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o obj-$(CONFIG_DRM_PANEL_S6E8AA0) += panel-s6e8aa0.o +obj-$(CONFIG_DRM_PANEL_TC358764) += panel-tc358764.odrivers/gpu/drm/panel/panel-tc358764.c new file +15
-0@@ -0,0 +1,505 @@ +/* +* TC358764 MIPI-DSI to LVDS bridge panel driver. +* +* Copyright (c) 2013 Samsung Electronics Co., Ltd +* +* Andrzej Hajda <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#include <drm/drmP.h> +#include <drm/drm_mipi_dsi.h> +#include <drm/drm_panel.h> ...
Quoted 83 lines
drivers/gpu/drm/panel/panel-tc358764.c new file +83
-0+/* of_* functions will be removed after acceptance of of_graph patches */ +static struct device_node * +of_get_child_by_name_reg (struct device_node *parent,const char *name,u32 reg) +{ +struct device_node *np; + +for_each_child_of_node (parent, np) { +u32 r; + +if (!np->name ||of_node_cmp (np->name, name)) +continue ; + +if (of_property_read_u32 (np,"reg" , &r) <0 ) + r =0 ; + +if (reg == r) +break ; + } + +return np; +} + +static struct device_node *of_graph_get_port_by_reg (struct device_node *parent, +u32 reg) +{ +struct device_node *ports, *port; + + ports =of_get_child_by_name (parent,"ports" ); +if (ports) { + port =of_get_child_by_name_reg (ports,"port" , reg); +of_node_put (ports); + }else { + port =of_get_child_by_name_reg (parent,"port" , reg); + } +return port; +} + +static struct device_node * +of_graph_get_endpoint_by_reg (struct device_node *port,u32 reg) +{ +return of_get_child_by_name_reg (port,"endpoint" , reg); +} + +static struct device_node * +of_graph_get_remote_port_parent (const struct device_node *node) +{ +struct device_node *np; +unsigned int depth; + +/* Get remote endpoint node. */ + np =of_parse_phandle (node,"remote-endpoint" ,0 ); + +/* Walk 3 levels up only if there is 'ports' node. */ +for (depth =3 ; depth && np; depth--) { + np =of_get_next_parent (np); +if (depth ==2 &&of_node_cmp (np->name,"ports" )) +break ; + } +return np; +} + +static struct device_node *tc358764_of_find_panel_node (struct device *dev) +{ +struct device_node *np, *ep; + + np =of_graph_get_port_by_reg (dev->of_node,1 ); +if (!np) +return NULL ; + + ep =of_graph_get_endpoint_by_reg (np,0 ); +of_node_put (np); +if (!ep) +return NULL ; + + np =of_graph_get_remote_port_parent (ep); +of_node_put (ep); + +return np; +} + +static int tc358764_parse_dt (struct tc358764 *ctx) +{ +struct device *dev = ctx->dev;
Quoted 8 lines
drivers/gpu/drm/panel/panel-tc358764.c line 391
Quoted 7 lines
drivers/gpu/drm/panel/panel-tc358764.c new file +7
-0+struct device_node *np = dev->of_node; +struct device_node *lvds; + + ctx->reset_gpio =of_get_named_gpio (np,"reset-gpio" ,0 ); +if (ctx->reset_gpio <0 ) { +dev_err (dev,"no reset GPIO pin provided\n" ); +//return ctx->reset_gpio; Seem like your mistake.
Thanks, it should not be commented, it sneaked out somehow.
Quoted 6 lines
drivers/gpu/drm/panel/panel-tc358764.c line 394
Quoted 4 lines
drivers/gpu/drm/panel/panel-tc358764.c new file +3
-0+ } + + lvds =tc358764_of_find_panel_node (ctx->dev);Isn't lvds
device_nodeobject of real lcd panel device, hv070wsa-100? it seems like more meaningful to use panel instead of lvds.
Yes I will change it.
Quoted 9 lines
drivers/gpu/drm/panel/panel-tc358764.c line 402
Quoted 9 lines
drivers/gpu/drm/panel/panel-tc358764.c new file +8
-0+if (!lvds) { +dev_err (dev,"cannot find panel node\n" ); +return -EINVAL ; + } + ctx->panel =of_drm_find_panel (lvds); +if (!ctx->panel) { +dev_info (dev,"panel not registered\n" ); +return -EPROBE_DEFER ;
Quoted 4 lines
That is what I concerned. This driver uses deferred probe feature because real LCD panel driver couldn't be probed yet at this moment. That isn't reasonable to me. There would be a better way than this one.
I think it can be avoided using your super-node patches.
Anyway deferred probe is used anyway, the bridge and the panel can use other resources like regulators, clocks which can be also not yet present during probe.
Quoted 36 lines
Quoted 36 lines
drivers/gpu/drm/panel/panel-tc358764.c new file +35
-0+ } + +return 0 ; +} + +static int tc358764_configure_regulators (struct tc358764 *ctx) +{ +int i, ret; + +for (i =0 ; i <ARRAY_SIZE (ctx->supplies); ++i) + ctx->supplies[i].supply = tc358764_supplies[i]; + + ret =devm_regulator_bulk_get (ctx->dev,ARRAY_SIZE (ctx->supplies), + ctx->supplies); +if (ret <0 ) +dev_info (ctx->dev,"failed to get regulators: %d\n" , ret); + +return ret; +} + +static int tc358764_probe (struct mipi_dsi_device *dsi) +{ +struct device *dev = &dsi->dev; +struct tc358764 *ctx; +int ret; + + ctx =devm_kzalloc (dev,sizeof (struct tc358764 ),GFP_KERNEL ); +if (!ctx) { +dev_err (dev,"failed to allocate tc358764 structure.\n" ); +return -ENOMEM ; + } + +mipi_dsi_set_drvdata (dsi, ctx); + + ctx->dev = dev;
Quoted 8 lines
drivers/gpu/drm/panel/panel-tc358764.c line 442
Quoted 5 lines
drivers/gpu/drm/panel/panel-tc358764.c new file +5
-0+ + dsi->lanes =4 ; + dsi->format =MIPI_DSI_FMT_RGB888 ; + dsi->mode_flags =MIPI_DSI_MODE_VIDEO |MIPI_DSI_MODE_VIDEO_BURST + |MIPI_DSI_MODE_VIDEO_AUTO_VERT ;Is it right for the pixel format, mode type and lane count are fixed? I think these could be changed according to LCD type and its resolution.
I have no access to tc358764 datasheet so I can only guess that some parameters are determined by LCD but the bridge is also capable to perform some conversions.
I set parameters here as sane defaults. If there will be other use cases than arndale it can be extended in the future.
Regards
Andrzej
Quoted 71 lines
Quoted 71 lines
drivers/gpu/drm/panel/panel-tc358764.c new file +63
-1+ + ret =tc358764_parse_dt (ctx); +if (ret <0 ) +return ret; + + ret =tc358764_configure_regulators (ctx); +if (ret <0 ) +return ret; + + ret =devm_gpio_request_one (dev, ctx->reset_gpio,GPIOF_DIR_OUT , +"TC358764_RESET" ); +if (ret <0 ) { +dev_info (dev,"failed to request reset gpio\n" ); +return ret; + } + +drm_panel_init (&ctx->bridge); + ctx->bridge.dev = dev; + ctx->bridge.funcs = &tc358764_drm_funcs; + + ret =drm_panel_add (&ctx->bridge); +if (ret <0 ) +return ret; + + ret =mipi_dsi_attach (dsi); +if (ret <0 ) +drm_panel_remove (&ctx->bridge); + +return ret; +} + +static int tc358764_remove (struct mipi_dsi_device *dsi) +{ +struct tc358764 *ctx =mipi_dsi_get_drvdata (dsi); + +tc358764_poweroff (ctx); + +mipi_dsi_detach (dsi); +drm_panel_remove (&ctx->bridge); + +return 0 ; +} + +static struct of_device_id tc358764_of_match[] = { + { .compatible ="toshiba,tc358764" }, + { } +}; +MODULE_DEVICE_TABLE (of, tc358764_of_match); + +static struct mipi_dsi_driver tc358764_driver = { + .probe = tc358764_probe, + .remove = tc358764_remove, + .driver = { + .name ="panel_tc358764" , + .owner =THIS_MODULE , + .of_match_table = tc358764_of_match, + }, +}; +module_mipi_dsi_driver (tc358764_driver); + +MODULE_AUTHOR ("Andrzej Hajda <[email protected]>" ); +MODULE_DESCRIPTION ("MIPI-DSI based Driver for TC358764 DSI/LVDS Bridge" ); +MODULE_LICENSE ("GPL v2" ); --1.8.3.2
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
RFC PATCH v2 9/21 panel/simple: add video interface DT bindings
In reply to a message not in the archiveThe bindings allow to create explicit link between devices providing video signal and the panel.
--- Documentation/devicetree/bindings/panel/simple-panel.txt | 6 ++++++ 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/panel/simple-panel.txt +6 -0
@@ -8,6 +8,12 @@ Optional properties: - enable-gpios: GPIO pin to enable or disable the panel - backlight: phandle of the backlight device attached to the panel +The device node can contain one 'port' child node with one child +'endpoint' node, according to the bindings defined in [1]. This +node should describe panel's video bus. + +[1]: Documentation/devicetree/bindings/media/video-interfaces.txt + Example: panel: panel {
Signature · 6 lines
1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
RFC PATCH v2 12/21 ARM: dts: exynos4: add MIPI DSI Master node
In reply to a message not in the archiveThis is a common part of DSI node for all Exynos4 boards.
--- arch/arm/boot/dts/exynos4.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/exynos4.dtsi +14 -0
@@ -104,6 +104,20 @@ reg = <0x10010000 0x400>; }; + dsi_0: dsi@11C80000 { + compatible = "samsung,exynos4210-mipi-dsi"; + reg = <0x11C80000 0x10000>; + interrupts = <0 79 0>; + samsung,power-domain = <&pd_lcd0>; + phys = <&mipi_phy 1>; + phy-names = "dsim"; + clocks = <&clock 286>, <&clock 143>; + clock-names = "bus_clk", "pll_clk"; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + camera { compatible = "samsung,fimc", "simple-bus"; status = "disabled";
Signature · 6 lines
1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
RFC PATCH v2 20/21 ARM: dts: exynos4210-trats: enable exynos/fimd node
In reply to a message not in the archiveThe patch changes fimd node status to OK.
--- arch/arm/boot/dts/exynos4210-trats.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/exynos4210-trats.dts +4 -0
@@ -391,6 +391,10 @@ }; }; + fimd@11c00000 { + status = "okay"; + }; + camera { pinctrl-names = "default"; pinctrl-0 = <>;
Signature · 6 lines
1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
RFC PATCH v2 21/21 ARM: dts: exynos4412-trats2: enable exynos/fimd node
In reply to a message not in the archiveThe patch changes fimd node status to OK.
--- arch/arm/boot/dts/exynos4412-trats2.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/exynos4412-trats2.dts +4 -0
@@ -545,6 +545,10 @@ }; }; + fimd@11c00000 { + status = "okay"; + }; + camera { pinctrl-0 = <&cam_port_b_clk_active>; pinctrl-names = "default";
Signature · 6 lines
1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
RFC PATCH v2 10/21 panel/hv070wsa-100: add DT bindings
In reply to Andrzej HajdaThe patch adds bindings to BOE HV070-WSA WSVGA panel. Bindings are compatible with simple panel bindings.
--- Documentation/devicetree/bindings/panel/boe,hv070wsa-100.txt | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Documentation/devicetree/bindings/panel/boe,hv070wsa-100.txt
Documentation/devicetree/bindings/panel/boe,hv070wsa-100.txt new file +7 -0
@@ -0,0 +1,7 @@ +BOE HV070WSA-100 7.01" WSVGA TFT LCD panel + +Required properties: +- compatible: should be "boe,hv070wsa-100" + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory.
Signature · 1 line
1.8.3.2
RFC PATCH v2 11/21 drm/panel: add support for BOE HV070WSA-100 panel to simple-panel
In reply to Andrzej HajdaThe patch adds support for BOE HV070WSA-100 WSVGA 7.01 inch panel in panel-simple driver. The panel is used in Exynos5250-arndale boards.
--- drivers/gpu/drm/panel/panel-simple.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
drivers/gpu/drm/panel/panel-simple.c +25 -0
@@ -338,6 +338,28 @@ static const struct panel_desc chunghwa_claa101wb01 = { }, }; +static const struct drm_display_mode boe_hv070wsa_mode = { + .clock =40800 , + .hdisplay =1024 , + .hsync_start =1024 +90 , + .hsync_end =1024 +90 +90 , + .htotal =1024 +90 +90 +90 , + .vdisplay =600 , + .vsync_start =600 +3 , + .vsync_end =600 +3 +4 , + .vtotal =600 +3 +4 +3 , + .vrefresh =60 , +}; + +static const struct panel_desc boe_hv070wsa = { + .modes = &boe_hv070wsa_mode, + .num_modes =1 , + .size = { + .width =154 , + .height =90 , + }, +}; +static const struct of_device_id platform_of_match[] = { { .compatible ="auo,b101aw03" ,
@@ -346,6 +368,9 @@ static const struct of_device_id platform_of_match[] = { .compatible = "chunghwa,claa101wb01", .data = &chunghwa_claa101wb01 }, { + .compatible = "boe,hv070wsa-100", + .data = &boe_hv070wsa + }, { .compatible = "simple-panel", }, {/* sentinel */
Signature · 1 line
1.8.3.2
RFC PATCH v2 13/21 ARM: dts: exynos4210-trats: add panel node
In reply to Andrzej HajdaThe patch adds s6e8aa0 panel node for trats.
It adds also trats specific properties for DSI.
--- arch/arm/boot/dts/exynos4210-trats.dts | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)
arch/arm/boot/dts/exynos4210-trats.dts +38 -0
@@ -353,6 +353,44 @@ }; }; + dsi_0: dsi@11C80000 { + vddcore-supply = <&vusb_reg>; + vddio-supply = <&vmipi_reg>; + samsung,pll-clock-frequency = <24000000>; + samsung,burst-clock-frequency = <500000000>; + samsung,esc-clock-frequency = <20000000>; + status = "okay"; + + panel@0 { + reg = <0>; + compatible = "samsung,s6e8aa0"; + vdd3-supply = <&vcclcd_reg>; + vci-supply = <&vlcd_reg>; + reset-gpio = <&gpy4 5 0>; + power-on-delay= <50>; + reset-delay = <100>; + init-delay = <100>; + flip-horizontal; + flip-vertical; + panel-width-mm = <58>; + panel-height-mm = <103>; + + display-timings { + timing-0 { + clock-frequency = <57153600>; + hactive = <720>; + vactive = <1280>; + hfront-porch = <5>; + hback-porch = <5>; + hsync-len = <5>; + vfront-porch = <13>; + vback-porch = <1>; + vsync-len = <2>; + }; + }; + }; + }; + camera { pinctrl-names = "default"; pinctrl-0 = <>;
Signature · 1 line
1.8.3.2
RFC PATCH v2 14/21 ARM: dts: exynos4412-trats2: add panel node
In reply to Andrzej HajdaThe patch adds s6e8aa0 panel node for trats2.
It adds also trats2 specific properties for DSI
and regulator required by panel.
--- arch/arm/boot/dts/exynos4412-trats2.dts | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+)
arch/arm/boot/dts/exynos4412-trats2.dts +47 -0
@@ -442,6 +442,15 @@ }; }; + lcd_vdd3_reg: voltage-regulator@1 { + compatible = "regulator-fixed"; + regulator-name = "LCD_VDD_2.2V"; + regulator-min-microvolt = <2200000>; + regulator-max-microvolt = <2200000>; + gpio = <&gpc0 1 0>; + enable-active-high; + }; + sdhci@12510000 { bus-width = <8>; non-removable;
@@ -498,6 +507,44 @@ }; }; + dsi_0: dsi@11C80000 { + vddcore-supply = <&ldo8_reg>; + vddio-supply = <&ldo10_reg>; + samsung,pll-clock-frequency = <24000000>; + samsung,burst-clock-frequency = <500000000>; + samsung,esc-clock-frequency = <20000000>; + status = "okay"; + + panel@0 { + compatible = "samsung,s6e8aa0"; + reg = <0>; + vdd3-supply = <&lcd_vdd3_reg>; + vci-supply = <&ldo25_reg>; + reset-gpio = <&gpy4 5 0>; + power-on-delay= <50>; + reset-delay = <100>; + init-delay = <100>; + flip-horizontal; + flip-vertical; + panel-width-mm = <58>; + panel-height-mm = <103>; + + display-timings { + timing-0 { + clock-frequency = <0>; + hactive = <720>; + vactive = <1280>; + hfront-porch = <5>; + hback-porch = <5>; + hsync-len = <5>; + vfront-porch = <13>; + vback-porch = <1>; + vsync-len = <2>; + }; + }; + }; + }; + camera { pinctrl-0 = <&cam_port_b_clk_active>; pinctrl-names = "default";
Signature · 1 line
1.8.3.2
Re: [RFC PATCH v2 14/21] ARM: dts: exynos4412-trats2: add panel node
Quoted 44 lines · Andrzej Hajda
The patch adds s6e8aa0 panel node for trats2.
It adds also trats2 specific properties for DSI
and regulator required by panel.Signed-off-by Andrzej Hajda <[email protected]>--- arch/arm/boot/dts/exynos4412-trats2.dts | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+)arch/arm/boot/dts/exynos4412-trats2.dts +20
-0@@ -442,6 +442,15 @@ }; }; + lcd_vdd3_reg: voltage-regulator@1 { + compatible = "regulator-fixed"; + regulator-name = "LCD_VDD_2.2V"; + regulator-min-microvolt = <2200000>; + regulator-max-microvolt = <2200000>; + gpio = <&gpc0 1 0>; + enable-active-high; + }; + sdhci@12510000 { bus-width = <8>; non-removable;@@ -498,6 +507,44 @@ }; }; + dsi_0: dsi@11C80000 { + vddcore-supply = <&ldo8_reg>; + vddio-supply = <&ldo10_reg>; + samsung,pll-clock-frequency = <24000000>; + samsung,burst-clock-frequency = <500000000>; + samsung,esc-clock-frequency = <20000000>; + status = "okay"; + + panel@0 { + compatible = "samsung,s6e8aa0"; + reg = <0>;
arch/arm/boot/dts/exynos4412-trats2.dts line 530
Quoted 10 lines
arch/arm/boot/dts/exynos4412-trats2.dts +10
-0+ vdd3-supply = <&lcd_vdd3_reg>; + vci-supply = <&ldo25_reg>; + reset-gpio = <&gpy4 5 0>; + power-on-delay= <50>; + reset-delay = <100>; + init-delay = <100>; + flip-horizontal; + flip-vertical; + panel-width-mm = <58>; + panel-height-mm = <103>;
I have the same comment here as for the bridge chip: I would specify the video ports/endpoints between DSI master and the panel, even if you don't use them at the moment.
Tomi
Re: [RFC PATCH v2 14/21] ARM: dts: exynos4412-trats2: add panel node
Quoted 7 lines · Tomi Valkeinen
I have the same comment here as for the bridge chip: I would specify the video ports/endpoints between DSI master and the panel, even if you don't use them at the moment.
Tomi
I have sent my answer in bridge chip subthread.
Regards
Andrzej
RFC PATCH v2 15/21 ARM: dts: exynos5250: add mipi-phy node
In reply to Andrzej HajdaThe patch adds phy node, required by MIPI devices.
--- arch/arm/boot/dts/exynos5250.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/exynos5250.dtsi +6 -0
@@ -68,6 +68,12 @@ }; }; + mipi_phy: video-phy@10040710 { + compatible = "samsung,s5pv210-mipi-video-phy"; + reg = <0x10040710 8>; + #phy-cells = <1>; + }; + pd_gsc: gsc-power-domain@10044000 { compatible = "samsung,exynos4210-pd"; reg = <0x10044000 0x20>;
Signature · 1 line
1.8.3.2
RFC PATCH v2 16/21 ARM: dts: exynos5250: add display power domain node
In reply to Andrzej HajdaThe patch adds power domain for display subsystem.
--- arch/arm/boot/dts/exynos5250.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/boot/dts/exynos5250.dtsi +5 -0
@@ -84,6 +84,11 @@ reg = <0x10044040 0x20>; }; + pd_disp: mfc-power-domain@100440a0 { + compatible = "samsung,exynos4210-pd"; + reg = <0x100440a0 0x20>; + }; + clock: clock-controller@10010000 { compatible = "samsung,exynos5250-clock"; reg = <0x10010000 0x30000>;
Signature · 1 line
1.8.3.2
Re: [RFC PATCH v2 16/21] ARM: dts: exynos5250: add display power domain node
Hi Andrzej,
Quoted 12 lines · Andrzej Hajda
The patch adds power domain for display subsystem.
Signed-off-by Andrzej Hajda <[email protected]>--- arch/arm/boot/dts/exynos5250.dtsi | 5 +++++ 1 file changed, 5 insertions(+)arch/arm/boot/dts/exynos5250.dtsi +0
-0
arch/arm/boot/dts/exynos5250.dtsi line 87
Quoted 4 lines
arch/arm/boot/dts/exynos5250.dtsi +1
-0@@ -84,6 +84,11 @@ reg = <0x10044040 0x20>; }; + pd_disp: mfc-power-domain@100440a0 {
Looks like a typo here.
Signature · 2 lines
With warm regards, Sachin
Re: [RFC PATCH v2 16/21] ARM: dts: exynos5250: add display power domain node
On 02/12/2014 12:51 PM, Sachin Kamat wrote:
Hi Sachin,
Quoted 18 lines
Hi Andrzej,
Quoted 15 lines · Andrzej Hajda
The patch adds power domain for display subsystem.
Signed-off-by Andrzej Hajda <[email protected]>--- arch/arm/boot/dts/exynos5250.dtsi | 5 +++++ 1 file changed, 5 insertions(+)arch/arm/boot/dts/exynos5250.dtsi +0
-0@@ -84,6 +84,11 @@ reg = <0x10044040 0x20>; };
Quoted 3 lines
arch/arm/boot/dts/exynos5250.dtsi line 87
Quoted 1 line
arch/arm/boot/dts/exynos5250.dtsi +1
-0+ pd_disp: mfc-power-domain@100440a0 {Looks like a typo here.
Fortunately it is harmless, but thanks for pointing it out. Will be fixed.
Regards
Andrzej
RFC PATCH v2 17/21 ARM: dts: exynos5250: add DSI node
In reply to Andrzej HajdaThe patch adds common part of DSI node for Exynos5250 platforms.
--- arch/arm/boot/dts/exynos5250.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/exynos5250.dtsi +14 -0
@@ -656,6 +656,20 @@ phy-names = "dp"; }; + dsi_0: dsi@14500000 { + compatible = "samsung,exynos4210-mipi-dsi"; + reg = <0x14500000 0x10000>; + interrupts = <0 82 0>; + samsung,power-domain = <&pd_disp>; + phys = <&mipi_phy 3>; + phy-names = "dsim"; + clocks = <&clock 341>, <&clock 134>; + clock-names = "bus_clk", "pll_clk"; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + fimd@14400000 { clocks = <&clock 133>, <&clock 339>; clock-names = "sclk_fimd", "fimd";
Signature · 1 line
1.8.3.2
RFC PATCH v2 18/21 ARM: dts: exynos5250-arndale: add display regulators
In reply to Andrzej HajdaThe patch adds fixed regulators used by DSI/LVDS bridge and panel. Regulators are named according to schematics.
--- arch/arm/boot/dts/exynos5250-arndale.dts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
arch/arm/boot/dts/exynos5250-arndale.dts +24 -0
@@ -525,6 +525,30 @@ reg = <2>; regulator-name = "hdmi-en"; }; + + vcc_1v2_reg: regulator@3 { + compatible = "regulator-fixed"; + reg = <3>; + regulator-name = "VCC_1V2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + vcc_1v8_reg: regulator@4 { + compatible = "regulator-fixed"; + reg = <4>; + regulator-name = "VCC_1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + vcc_3v3_reg: regulator@5 { + compatible = "regulator-fixed"; + reg = <5>; + regulator-name = "VCC_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; }; fixed-rate-clocks {
Signature · 1 line
1.8.3.2
RFC PATCH v2 19/21 ARM: dts: exynos5250-arndale: add dsi and panel nodes
In reply to Andrzej HajdaThe patch adds bridge and panel nodes.
It adds also DSI properties specific for arndale board.
--- arch/arm/boot/dts/exynos5250-arndale.dts | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+)
arch/arm/boot/dts/exynos5250-arndale.dts +39 -0
@@ -584,6 +584,45 @@ }; }; + panel: panel { + compatible = "boe,hv070wsa-100"; + power-supply = <&vcc_3v3_reg>; + enable-gpios = <&gpd1 3 0>; + port { + panel_ep: endpoint { + remote-endpoint = <&bridge_out_ep>; + }; + }; + }; + + dsi_0: dsi@14500000 { + vddcore-supply = <&ldo8_reg>; + vddio-supply = <&ldo10_reg>; + samsung,pll-clock-frequency = <24000000>; + samsung,burst-clock-frequency = <320000000>; + samsung,esc-clock-frequency = <10000000>; + status = "okay"; + + bridge@0 { + reg = <0>; + compatible = "toshiba,tc358764"; + vddc-supply = <&vcc_1v2_reg>; + vddio-supply = <&vcc_1v8_reg>; + vddmipi-supply = <&vcc_1v2_reg>; + vddlvds133-supply = <&vcc_3v3_reg>; + vddlvds112-supply = <&vcc_1v2_reg>; + reset-gpio = <&gpd1 6 1>; + #address-cells = <1>; + #size-cells = <0>; + port@1 { + reg = <1>; + bridge_out_ep: endpoint { + remote-endpoint = <&panel_ep>; + }; + }; + }; + }; + fimd: fimd@14400000 { status = "okay"; };
Signature · 1 line
1.8.3.2
Re: [RFC PATCH v2 19/21] ARM: dts: exynos5250-arndale: add dsi and panel nodes
Quoted 44 lines · Andrzej Hajda
The patch adds bridge and panel nodes.
It adds also DSI properties specific for arndale board.Signed-off-by Andrzej Hajda <[email protected]>--- arch/arm/boot/dts/exynos5250-arndale.dts | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+)arch/arm/boot/dts/exynos5250-arndale.dts +28
-0@@ -584,6 +584,45 @@ }; }; + panel: panel { + compatible = "boe,hv070wsa-100"; + power-supply = <&vcc_3v3_reg>; + enable-gpios = <&gpd1 3 0>; + port { + panel_ep: endpoint { + remote-endpoint = <&bridge_out_ep>; + }; + }; + }; + + dsi_0: dsi@14500000 { + vddcore-supply = <&ldo8_reg>; + vddio-supply = <&ldo10_reg>; + samsung,pll-clock-frequency = <24000000>; + samsung,burst-clock-frequency = <320000000>; + samsung,esc-clock-frequency = <10000000>; + status = "okay"; + + bridge@0 { + reg = <0>; + compatible = "toshiba,tc358764"; + vddc-supply = <&vcc_1v2_reg>; + vddio-supply = <&vcc_1v8_reg>; + vddmipi-supply = <&vcc_1v2_reg>; + vddlvds133-supply = <&vcc_3v3_reg>; + vddlvds112-supply = <&vcc_1v2_reg>; + reset-gpio = <&gpd1 6 1>;
arch/arm/boot/dts/exynos5250-arndale.dts line 624
Quoted 10 lines
arch/arm/boot/dts/exynos5250-arndale.dts +10
-0+ #address-cells = <1>; + #size-cells = <0>; + port@1 { + reg = <1>; + bridge_out_ep: endpoint { + remote-endpoint = <&panel_ep>; + }; + }; + }; + };
Compared to what I've done on OMAP, you don't seem to specify the video inputs for the tc358764 at all. In this case it's obvious, as the chip is a child of the DSI master. But the chip could as well be controlled via i2c, and so be placed as a child of the i2c nodes.
So even if the driver doesn't use it, maybe it would be more future proof to have both input and output endpoints for the tc358764?
Tomi
Re: [RFC PATCH v2 19/21] ARM: dts: exynos5250-arndale: add dsi and panel nodes
Quoted 7 lines · Tomi Valkeinen
Compared to what I've done on OMAP, you don't seem to specify the video inputs for the tc358764 at all. In this case it's obvious, as the chip is a child of the DSI master. But the chip could as well be controlled via i2c, and so be placed as a child of the i2c nodes.
So even if the driver doesn't use it, maybe it would be more future proof to have both input and output endpoints for the tc358764?
Oh, and one addition: how me and Laurent see the DSI case (and other similar ones), the child/parent relationship gives the control bus path, and the video ports give the video data path.
So both are always needed. A DSI panel may be controlled via DSI, i2c, spi, but the video path will always go from DSI master to the panel.
Or, as a theoretical panel, you could have a DSI controlled panel, being a child of the DSI master, but the video data would come via, say, parallel RGB. You can actually do that with some panels/encoders, even if the concept is silly.
Tomi
Re: [RFC PATCH v2 19/21] ARM: dts: exynos5250-arndale: add dsi and panel nodes
Quoted 7 lines · Tomi Valkeinen
Quoted 5 lines · Tomi Valkeinen
Compared to what I've done on OMAP, you don't seem to specify the video inputs for the tc358764 at all. In this case it's obvious, as the chip is a child of the DSI master. But the chip could as well be controlled via i2c, and so be placed as a child of the i2c nodes.
Quoted 8 lines
Quoted 2 lines
So even if the driver doesn't use it, maybe it would be more future proof to have both input and output endpoints for the tc358764?
Oh, and one addition: how me and Laurent see the DSI case (and other similar ones), the child/parent relationship gives the control bus path, and the video ports give the video data path.
So both are always needed. A DSI panel may be controlled via DSI, i2c, spi, but the video path will always go from DSI master to the panel.
I have made video path binding optional, in case of video bus if the specific video path is not present driver uses the bus it is connected to.
In case DSI panel is controlled via different bus the path should be specified
explicitly.
I have no strong feelings against making this binding required but as you have
stated above "in this case it's obvious" and for me quite redundant.
What is the gain in specifying explicitly video paths in such cases?
Quoted 4 lines
Or, as a theoretical panel, you could have a DSI controlled panel, being a child of the DSI master, but the video data would come via, say, parallel RGB. You can actually do that with some panels/encoders, even if the concept is silly.
In this case explicit binding will work also.
Regards
Andrzej
Re: [RFC PATCH v2 19/21] ARM: dts: exynos5250-arndale: add dsi and panel nodes
Quoted 10 lines · Andrzej Hajda
I have made video path binding optional, in case of video bus if the specific video path is not present driver uses the bus it is connected to.
In case DSI panel is controlled via different bus the path should be specified
explicitly.I have no strong feelings against making this binding required but as you have
stated above "in this case it's obvious" and for me quite redundant.
Yes, it's a good point. I didn't realize they were optional, I thought they were not defined at all. I hadn't even thought that they could be optional, I guess because in my uses there's always a reason to have them. Even for a simple DSI command mode panel, I have information in the DSI master's endpoint:
dsi {
...
dsi1_out_ep: endpoint {
remote-endpoint = <&lcd0_in>;
lanes = <0 1 2 3 4 5>;
};
};which forces to use an endpoint in the panel also.
And, actually, I think in your case also you would need an endpoint for the dsi master, if you wanted to support multiple endpoints. You currently have, for example, PLL clock freq as the DSI master's property, but it should really be a property of the DSI master's endpoint.
I.e. if you have two DSI panels connected to the same DSI master, in a way that only one can be enabled at a time (there would probably be a mux to select where the DSI lanes go, we have that on some development boards), you could well need different clock frequencies for the panels.
Quoted 1 line
What is the gain in specifying explicitly video paths in such cases?
- Until we (everyone interested in this) have thought about it fully and agreed that video paths in cases like this are optional, you would be safer to specify them explicitly. That way your bindings are valid in either case.
- Uniformity. If in most cases we need to specify the video paths, either because the control path is different than the data path, or because there is need for endpoint specific information, having video paths as optional for some specific cases may needlessly complicate the code.
Tomi
Inki Dae
maintainerRe: [RFC PATCH v2 19/21] ARM: dts: exynos5250-arndale: add dsi and panel nodes
In reply to Andrzej HajdaSorry for interrupting,
2014-03-04 21:00 GMT+09:00 Andrzej Hajda <[email protected]>:
Quoted 14 lines · Tomi Valkeinen
Quoted 13 lines · Tomi Valkeinen
Quoted 8 lines
Compared to what I've done on OMAP, you don't seem to specify the video inputs for the tc358764 at all. In this case it's obvious, as the chip is a child of the DSI master. But the chip could as well be controlled via i2c, and so be placed as a child of the i2c nodes.
So even if the driver doesn't use it, maybe it would be more future proof to have both input and output endpoints for the tc358764?
Oh, and one addition: how me and Laurent see the DSI case (and other similar ones), the child/parent relationship gives the control bus path, and the video ports give the video data path.
Quoted 5 lines
Quoted 2 lines
So both are always needed. A DSI panel may be controlled via DSI, i2c, spi, but the video path will always go from DSI master to the panel.
I have made video path binding optional, in case of video bus if the specific video path is not present driver uses the bus it is connected to.
You mean the case that video path isn't wrote in dt file for some machine? If so, shouldn't we always write video patch in the dt file correctly? I'm not sure the optional binding is needed because which bus and which panel are used depends on machine.
And If I understood correctly the video interfaces document, it seems that you don't deal with the document.
The below is simple dt binding I think in case that video path goes from MIPI-DSI to LVDS bridge, and then from LVDS bridge to LCD Panel,
panel {
...
port {
...
panel_0: endpoint {
remote-endpoint=<&lvds_1>;
};
};
};lvds {
...
port@1 {
...
lvds_0: endpoint {
remote-endpoint=<&dsi_0>;
};
};
port@2 {
...
lvds_1: endpoint {
remote-endpoint=<&panel_0>;
};
};
};dsi {
...
port {
dsi_0: endpoint {
remote-endpoint=<&lvds_0>;
};
};
};panel and lvds node could be a child of other masters, maybe i2c or spi.
Thanks,
Inki Dae
Quoted 25 lines
In case DSI panel is controlled via different bus the path should be specified
explicitly.I have no strong feelings against making this binding required but as you have
stated above "in this case it's obvious" and for me quite redundant.What is the gain in specifying explicitly video paths in such cases?
Quoted 4 lines
Or, as a theoretical panel, you could have a DSI controlled panel, being a child of the DSI master, but the video data would come via, say, parallel RGB. You can actually do that with some panels/encoders, even if the concept is silly.
In this case explicit binding will work also.
Regards
Andrzej_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [RFC PATCH v2 19/21] ARM: dts: exynos5250-arndale: add dsi and panel nodes
Quoted 23 lines · Inki Dae
Sorry for interrupting,
2014-03-04 21:00 GMT+09:00 Andrzej Hajda <[email protected]>:
Quoted 14 lines · Tomi Valkeinen
Quoted 13 lines · Tomi Valkeinen
Quoted 8 lines
Compared to what I've done on OMAP, you don't seem to specify the video inputs for the tc358764 at all. In this case it's obvious, as the chip is a child of the DSI master. But the chip could as well be controlled via i2c, and so be placed as a child of the i2c nodes.
So even if the driver doesn't use it, maybe it would be more future proof to have both input and output endpoints for the tc358764?
Oh, and one addition: how me and Laurent see the DSI case (and other similar ones), the child/parent relationship gives the control bus path, and the video ports give the video data path.
Quoted 5 lines
Quoted 2 lines
So both are always needed. A DSI panel may be controlled via DSI, i2c, spi, but the video path will always go from DSI master to the panel.
I have made video path binding optional, in case of video bus if the specific video path is not present driver uses the bus it is connected to.
Quoted 7 lines
You mean the case that video path isn't wrote in dt file for some machine? If so, shouldn't we always write video patch in the dt file correctly? I'm not sure the optional binding is needed because which bus and which panel are used depends on machine.
And If I understood correctly the video interfaces document, it seems that you don't deal with the document.
I have followed the document, I have even specified it in bridge bindings. I have just made those bindings optional in case control bus is the same as video bus - DSI master/slave case.
Quoted 30 lines
The below is simple dt binding I think in case that video path goes from MIPI-DSI to LVDS bridge, and then from LVDS bridge to LCD Panel,
panel { ... port { ... panel_0: endpoint { remote-endpoint=<&lvds_1>; }; }; };lvds { ... port@1 { ... lvds_0: endpoint { remote-endpoint=<&dsi_0>; }; }; port@2 { ... lvds_1: endpoint { remote-endpoint=<&panel_0>; }; }; };
Quoted 9 lines
dsi {
...
port {
dsi_0: endpoint {
remote-endpoint=<&lvds_0>;
};
};
};I think we should even extend the bindings to fimd:
dsi {
port@0 {
dsi_0: endpoint {
remote-endpoint=<&fimd_0>;
}
}
port@1 {
dsi_1: endpoint {
remote-endpoint=<&lvds_0>;
}
}
}fimd {
port@0 {
fimd_0: endpoint {
remote-endpoint=<&dsi_0>;
}
}
}Quoted 1 line
panel and lvds node could be a child of other masters, maybe i2c or spi.
As I mentioned earlier, in such cases bindings should be specified explicitly.
My proposition of omitting obvious bindings was made to simplify a bit dts files,
but as I stated earlier it is not something I want to die for :)
Regards
Andrzej
Re: [RFC PATCH v2 19/21] ARM: dts: exynos5250-arndale: add dsi and panel nodes
Quoted 14 lines · Andrzej Hajda
I think we should even extend the bindings to fimd:
dsi { port@0 { dsi_0: endpoint { remote-endpoint=<&fimd_0>; } } port@1 { dsi_1: endpoint { remote-endpoint=<&lvds_0>; } } }
Quoted 7 lines
fimd {
port@0 {
fimd_0: endpoint {
remote-endpoint=<&dsi_0>;
}
}
}If both fimd and dsi are SoC components, I don't see any strict need for that. I think the ports/endpoints are only important when dealing with external components, which can be used on any platform. For SoC internal components you can have relevant data directly in the drivers, as it is fixed (for that SoC).
Of course, if using ports for SoC internal components makes things easier for you, I don't see any problems with it either.
For OMAP, the SoC's display blocks are all inside one bigger DSS "container", so I have not seen need to represent the connections between the internal components in the DT data.
If the display components were truly independent IPs on the SoC, then using ports might make things easier.
Tomi
Re: [RFC PATCH v2 19/21] ARM: dts: exynos5250-arndale: add dsi and panel nodes
Quoted 23 lines · Tomi Valkeinen
Quoted 14 lines · Andrzej Hajda
I think we should even extend the bindings to fimd:
dsi { port@0 { dsi_0: endpoint { remote-endpoint=<&fimd_0>; } } port@1 { dsi_1: endpoint { remote-endpoint=<&lvds_0>; } } }Quoted 7 lines
fimd { port@0 { fimd_0: endpoint { remote-endpoint=<&dsi_0>; } } }
Quoted 8 lines
If both fimd and dsi are SoC components, I don't see any strict need for that. I think the ports/endpoints are only important when dealing with external components, which can be used on any platform. For SoC internal components you can have relevant data directly in the drivers, as it is fixed (for that SoC).
Of course, if using ports for SoC internal components makes things easier for you, I don't see any problems with it either.
There are many possible connections from FIMD, some of them:
FIMD ---> RGB panel, external
FIMD ---> DSI, on SoC
FIMD ---> eDP, on SoC
FIMD ---> ImageEnhacer, on SoC
In the first case port should be created.
In other cases connection could be determined by presence/absence of specific nodes, so in fact the port can be optional, almost like in my proposal :)
Quoted 4 lines
For OMAP, the SoC's display blocks are all inside one bigger DSS "container", so I have not seen need to represent the connections between the internal components in the DT data.
How do you deal with situation when IPs in SoC can be connected in different ways ?
Andrzej
Quoted 6 lines
If the display components were truly independent IPs on the SoC, then using ports might make things easier.
Tomi
Re: [RFC PATCH v2 19/21] ARM: dts: exynos5250-arndale: add dsi and panel nodes
Quoted 30 lines · Andrzej Hajda
Quoted 29 lines · Tomi Valkeinen
Quoted 14 lines · Andrzej Hajda
I think we should even extend the bindings to fimd:
dsi { port@0 { dsi_0: endpoint { remote-endpoint=<&fimd_0>; } } port@1 { dsi_1: endpoint { remote-endpoint=<&lvds_0>; } } }Quoted 7 lines
fimd { port@0 { fimd_0: endpoint { remote-endpoint=<&dsi_0>; } } }If both fimd and dsi are SoC components, I don't see any strict need for that. I think the ports/endpoints are only important when dealing with external components, which can be used on any platform. For SoC internal components you can have relevant data directly in the drivers, as it is fixed (for that SoC).
Quoted 7 lines
Quoted 2 lines
Of course, if using ports for SoC internal components makes things easier for you, I don't see any problems with it either.
There are many possible connections from FIMD, some of them:
FIMD ---> RGB panel, external
FIMD ---> DSI, on SoC
FIMD ---> eDP, on SoC
FIMD ---> ImageEnhacer, on SoC
This sounds similar to OMAP, at least roughly.
Quoted 4 lines
In the first case port should be created.
In other cases connection could be determined by presence/absence of specific nodes, so in fact the port can be optional, almost like in my proposal :)
Well, I think not.
In the external encoder case, the ports are there, and they are used. You just didn't specify them, and thus make the driver deduce them from the DT.
In the FIMD case, if the the RGB port is needed, you need to specify it in the DT data, and it's used. If you only need, say, DSI, the RGB port is not used and thus it doesn't need to be present in the DT data.
It's fine to leave the port definition out if it is not used at all.
Quoted 5 lines
Quoted 3 lines
For OMAP, the SoC's display blocks are all inside one bigger DSS "container", so I have not seen need to represent the connections between the internal components in the DT data.
How do you deal with situation when IPs in SoC can be connected in different ways ?
Basically so that (using exynos terms) if, say DSI panel is to be enabled, the DSI panel driver will reserve the DSI master for itself, and the DSI master will reserve the FIMD for itself, presuming FIMD has not already been reserved. When the DSI panel is disabled, FIMD is freed.
Tomi
Re: [RFC PATCH v2 19/21] ARM: dts: exynos5250-arndale: add dsi and panel nodes
On 03/07/2014 02:28 PM, Tomi Valkeinen wrote:
(...)
Quoted 17 lines
There are many possible connections from FIMD, some of them:
FIMD ---> RGB panel, external
FIMD ---> DSI, on SoC
FIMD ---> eDP, on SoC
FIMD ---> ImageEnhacer, on SoC
This sounds similar to OMAP, at least roughly.Quoted 4 lines
In the first case port should be created.
In other cases connection could be determined by presence/absence of specific nodes, so in fact the port can be optional, almost like in my proposal :)Well, I think not.
In the external encoder case, the ports are there, and they are used. You just didn't specify them, and thus make the driver deduce them from the DT.
Quoted 5 lines
In the FIMD case, if the the RGB port is needed, you need to specify it in the DT data, and it's used. If you only need, say, DSI, the RGB port is not used and thus it doesn't need to be present in the DT data.
It's fine to leave the port definition out if it is not used at all.
On Exynos, DSI is in fact RGB/DSI encoder (or I80/DSI). DSI and RGB pins are connected to the same FIMD output. So from FIMD point of view RGB port is used in both cases.
Quoted 14 lines
Quoted 6 lines
Quoted 4 lines
For OMAP, the SoC's display blocks are all inside one bigger DSS "container", so I have not seen need to represent the connections between the internal components in the DT data.
How do you deal with situation when IPs in SoC can be connected in different ways ?
Basically so that (using exynos terms) if, say DSI panel is to be enabled, the DSI panel driver will reserve the DSI master for itself, and the DSI master will reserve the FIMD for itself, presuming FIMD has not already been reserved. When the DSI panel is disabled, FIMD is freed.
Tomi
Re: [RFC PATCH v2 19/21] ARM: dts: exynos5250-arndale: add dsi and panel nodes
Quoted 19 lines · Andrzej Hajda
On 03/07/2014 02:28 PM, Tomi Valkeinen wrote:
(...)Quoted 17 lines
There are many possible connections from FIMD, some of them:
FIMD ---> RGB panel, external
FIMD ---> DSI, on SoC
FIMD ---> eDP, on SoC
FIMD ---> ImageEnhacer, on SoC
This sounds similar to OMAP, at least roughly.Quoted 4 lines
In the first case port should be created.
In other cases connection could be determined by presence/absence of specific nodes, so in fact the port can be optional, almost like in my proposal :)Well, I think not.
In the external encoder case, the ports are there, and they are used. You just didn't specify them, and thus make the driver deduce them from the DT.
Quoted 8 lines
Quoted 5 lines
In the FIMD case, if the the RGB port is needed, you need to specify it in the DT data, and it's used. If you only need, say, DSI, the RGB port is not used and thus it doesn't need to be present in the DT data.
It's fine to leave the port definition out if it is not used at all.
On Exynos, DSI is in fact RGB/DSI encoder (or I80/DSI). DSI and RGB pins are connected to the same FIMD output. So from FIMD point of view RGB port is used in both cases.
I guessed as much, as it's the same on OMAP.
But I think it's still fine to have a port only for RGB panel. For the RGB panel, you have pins on the SoC to which the RGB data goes to. The RGB port in DT represents these pins. You don't have pins for the FIMD->DSI case.
But as I said, it's fine to use ports for internal connections also if it works for you.
I still don't like the idea of having the port as optional in DT for cases where the port comes from the parent device. Sure, it removes some lines from the DT, but I think it makes it more confusing. Especially as I think it's a very rare case where you could use that optional format, as usually you will have some properties in the endpoint node.
Tomi
Inki Dae
maintainerHi Andrzej,
Thanks for your contributions.
2014-02-12 20:31 GMT+09:00 Andrzej Hajda <[email protected]>:
Quoted 13 lines
Hi,
This patchset adds drivers and bindings to the following devices:
- Exynos DSI master,
- S6E8AA0 DSI panel,
- TC358764 DSI/LVDS bridge,
- HV070WSA-100 LVDS panel.It adds also display support in DTS files for the following boards:
- Exynos4210/Trats,
- Exynos4412/Trats2,
- Exynos5250/Arndale.
Quoted 6 lines
Things worth mentioning:
1. I have implemented DSI/LVDS bridge using
drm_panelframework, ie. the driver exposesdrm_panelinterface on DSI side, and interact with panels on LVDS side usingdrm_panelframework. This approach seems to me simpler and more natural than usingdrm_bridge.
Can you give me more details about why you think better to use panel framework than using drm_bridge? "Simpler" and "more natural" are ambiguous to me.
Using same drm_panel framework for LDVS bridge and real panel drivers isn't reasonable to me as now because drm_panel framework would be for real panel device even if the use of drm_panel framework looks like suitable to LVDS bridge driver. I thought Sean's way, ptn3460 driver using drm_bride stuff, is good enough, and that would be why drm_bridge exists and why drm_encoder has drm_bridge.
And I'm finding more generic way, how to handle LVDS bridge using super node so that LVDS bridge driver isn't embedded to connector drivers such as eDP and MIPI-DSI, and dt binding of LVDS bridge can be done at top level of Exynos drm. Once the binding is done, encoder of display bus driver will have drm_bridge object of LVDS bridge driver so that display bus driver can handle LVDS bridge driver.
Will review your patch series soon.
Thanks,
Inki Dae
Quoted 86 lines
2. I have used video interface bindings to make link between bridge and LVDS panel. Other places where such links can be created are:
a) link between DSI master and slave, I wonder if it is always neccessary, DSI bus is also video bus,
b) link between FIMD(display controller) and DSI Master, currently Exynos DRM framework uses driver's hardcoded links, converting it to video interface bindings should be done (if required) by separate patches.The patchset is based on Sean's Paul Exynos refactor patches v4 [1]. To work properly porch calculation should be fixed according to my comment [2].
It is the 2nd iteration of the patches, main changes:
- based on v4 refactor patches,
- added arndale related stuff.
Other changes are described in individual patches.[1] http://permalink.gmane.org/gmane.comp.video.dri.devel/99264
[2] http://permalink.gmane.org/gmane.comp.video.dri.devel/99826Regards
AndrzejAndrzej Hajda (21):
drm_mipi_dsi: add flags to DSI messages
drm/exynos: delay fbdev initialization until an output is connected exynos/dsim: add DT bindings
drm/exynos: add DSIM driver
panel/s6e8aa0: add DT bindings
drm/panel: add S6E8AA0 driver
panel/tc358764: add DT bindings
drm/panel: add TC358764 driver
panel/simple: add video interface DT bindings panel/hv070wsa-100: add DT bindings
drm/panel: add support for BOE HV070WSA-100 panel to simple-panel
ARM: dts: exynos4: add MIPI DSI Master node
ARM: dts: exynos4210-trats: add panel node
ARM: dts: exynos4412-trats2: add panel node
ARM: dts: exynos5250: add mipi-phy node
ARM: dts: exynos5250: add display power domain node
ARM: dts: exynos5250: add DSI node
ARM: dts: exynos5250-arndale: add display regulators
ARM: dts: exynos5250-arndale: add dsi and panel nodes
ARM: dts: exynos4210-trats: enable exynos/fimd node
ARM: dts: exynos4412-trats2: enable exynos/fimd node.../devicetree/bindings/panel/boe,hv070wsa-100.txt | 7 + .../devicetree/bindings/panel/samsung,s6e8aa0.txt | 51 + .../devicetree/bindings/panel/simple-panel.txt | 6 + .../devicetree/bindings/panel/toshiba,tc358764.txt | 41 + .../devicetree/bindings/video/exynos_dsim.txt | 53 + arch/arm/boot/dts/exynos4.dtsi | 14 + arch/arm/boot/dts/exynos4210-trats.dts | 42 + arch/arm/boot/dts/exynos4412-trats2.dts | 51 + arch/arm/boot/dts/exynos5250-arndale.dts | 63 + arch/arm/boot/dts/exynos5250.dtsi | 25 + drivers/gpu/drm/exynos/Kconfig | 9 + drivers/gpu/drm/exynos/Makefile | 1 + drivers/gpu/drm/exynos/exynos_drm_drv.c | 26 +- drivers/gpu/drm/exynos/exynos_drm_drv.h | 1 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1402 ++++++++++++++++++++ drivers/gpu/drm/exynos/exynos_drm_fb.c | 3 + drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 4 +- drivers/gpu/drm/panel/Kconfig | 14 + drivers/gpu/drm/panel/Makefile | 2 + drivers/gpu/drm/panel/panel-s6e8aa0.c | 1064 +++++++++++++++ drivers/gpu/drm/panel/panel-simple.c | 25 + drivers/gpu/drm/panel/panel-tc358764.c | 505 +++++++ include/drm/drm_mipi_dsi.h | 6 + 23 files changed, 3402 insertions(+), 13 deletions(-) create mode 100644 Documentation/devicetree/bindings/panel/boe,hv070wsa-100.txt create mode 100644 Documentation/devicetree/bindings/panel/samsung,s6e8aa0.txt create mode 100644 Documentation/devicetree/bindings/panel/toshiba,tc358764.txt create mode 100644 Documentation/devicetree/bindings/video/exynos_dsim.txt create mode 100644 drivers/gpu/drm/exynos/exynos_drm_dsi.c create mode 100644 drivers/gpu/drm/panel/panel-s6e8aa0.c create mode 100644 drivers/gpu/drm/panel/panel-tc358764.c--
1.8.3.2_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 20 lines · Inki Dae
Hi Andrzej,
Thanks for your contributions.
2014-02-12 20:31 GMT+09:00 Andrzej Hajda <[email protected]>:
Quoted 15 lines
Hi,
This patchset adds drivers and bindings to the following devices:
- Exynos DSI master,
- S6E8AA0 DSI panel,
- TC358764 DSI/LVDS bridge,
- HV070WSA-100 LVDS panel.It adds also display support in DTS files for the following boards:
- Exynos4210/Trats,
- Exynos4412/Trats2,
- Exynos5250/Arndale.Things worth mentioning:
Quoted 7 lines
Quoted 4 lines
1. I have implemented DSI/LVDS bridge using
drm_panelframework, ie. the driver exposesdrm_panelinterface on DSI side, and interact with panels on LVDS side usingdrm_panelframework. This approach seems to me simpler and more natural than usingdrm_bridge.Can you give me more details about why you think better to use panel framework than using
drm_bridge? "Simpler" and "more natural" are ambiguous to me.
In this particular case DSI master expects on the other end any device having DSI slave interface, it could be panel or bridge. So it seems natural that both types of slave devices should expose the same interface also on programming level.
Another problem with drm_bridge is that it is not scalable - if some manufacturer will decide to add another block between the bridge and the panel there is no drm component which can be used for it. Using drm_panel the way I have used in toshiba bridge makes scalability possible,
it will be only a matter of adding a driver for new block and making proper links in device tree, I see no easy way of doing it with drm_bridge approach.
Quoted 8 lines
Using same
drm_panelframework for LDVS bridge and real panel drivers isn't reasonable to me as now becausedrm_panelframework would be for real panel device even if the use ofdrm_panelframework looks like suitable to LVDS bridge driver. I thought Sean's way, ptn3460 driver usingdrm_bridestuff, is good enough, and that would be whydrm_bridgeexists and whydrm_encoderhasdrm_bridge.
Quoted 6 lines
And I'm finding more generic way, how to handle LVDS bridge using super node so that LVDS bridge driver isn't embedded to connector drivers such as eDP and MIPI-DSI, and dt binding of LVDS bridge can be done at top level of Exynos drm. Once the binding is done, encoder of display bus driver will have
drm_bridgeobject of LVDS bridge driver so that display bus driver can handle LVDS bridge driver.
Could you explain what you mean by "dt binding of LVDS bridge can be done at top level of Exynos drm" ? How it will look like if there will be more bridges, one for DSI, one for HDMI, etc... What if there will be two
bridges in one chain. How it will cope with video pipeline bindings?
Quoted 2 lines
Will review your patch series soon.
Thanks in advance.
Regards
Andrzej
Inki Dae
maintainer2014-03-07 19:00 GMT+09:00 Andrzej Hajda <[email protected]>:
Quoted 28 lines · Inki Dae
Quoted 20 lines
Hi Andrzej,
Thanks for your contributions.
2014-02-12 20:31 GMT+09:00 Andrzej Hajda <[email protected]>:
Quoted 15 lines
Hi,
This patchset adds drivers and bindings to the following devices:
- Exynos DSI master,
- S6E8AA0 DSI panel,
- TC358764 DSI/LVDS bridge,
- HV070WSA-100 LVDS panel.It adds also display support in DTS files for the following boards:
- Exynos4210/Trats,
- Exynos4412/Trats2,
- Exynos5250/Arndale.Things worth mentioning:
Quoted 7 lines
Quoted 4 lines
1. I have implemented DSI/LVDS bridge using
drm_panelframework, ie. the driver exposesdrm_panelinterface on DSI side, and interact with panels on LVDS side usingdrm_panelframework. This approach seems to me simpler and more natural than usingdrm_bridge.Can you give me more details about why you think better to use panel framework than using
drm_bridge? "Simpler" and "more natural" are ambiguous to me.
Quoted 12 lines
In this particular case DSI master expects on the other end any device having DSI slave interface, it could be panel or bridge. So it seems natural that both types of slave devices should expose the same interface also on programming level.
Another problem withdrm_bridgeis that it is not scalable - if some manufacturer will decide to add another block between the bridge and the panel there is no drm component which can be used for it. Usingdrm_panelthe way I have used in toshiba bridge makes scalability possible,
it will be only a matter of adding a driver for new block and making proper links in device tree, I see no easy way of doing it withdrm_bridgeapproach.
Now drm_bridge may not cover all hardware. However drm_bridge has already been merged to mainline so I think we need to use drm_bridge somehow instead of using other one, and also we could extend drm_bridge if needed. It would be definitely impossible for a new framework to cover all hardware because there may be other hardware not appeared yet. That is what we are doing for mainline until now.
Quoted 16 lines
Quoted 10 lines
Using same
drm_panelframework for LDVS bridge and real panel drivers isn't reasonable to me as now becausedrm_panelframework would be for real panel device even if the use ofdrm_panelframework looks like suitable to LVDS bridge driver. I thought Sean's way, ptn3460 driver usingdrm_bridestuff, is good enough, and that would be whydrm_bridgeexists and whydrm_encoderhasdrm_bridge.Quoted 6 lines
And I'm finding more generic way, how to handle LVDS bridge using super node so that LVDS bridge driver isn't embedded to connector drivers such as eDP and MIPI-DSI, and dt binding of LVDS bridge can be done at top level of Exynos drm. Once the binding is done, encoder of display bus driver will have
drm_bridgeobject of LVDS bridge driver so that display bus driver can handle LVDS bridge driver.
Quoted 5 lines
Could you explain what you mean by "dt binding of LVDS bridge can be done at top level of Exynos drm" ? How it will look like if there will be more bridges, one for DSI, one for HDMI, etc... What if there will be two
bridges in one chain. How it will cope with video pipeline bindings?
it was just my idea so I have no implementation about it yet.
My idea is that crtc and encoder are binded at top level of Exynos drm as is. And for bridge support, the only difference is, in case that encoder driver has bridge, the dt binding of the encoder driver is done once last one between encoder and bridge driver is binded. It would mean that bridge driver can use driver model and it doesn't need to concern about probe order issue.
For this, encoder driver with bridge, MIPI-DSI or eDP, would need to use component interfaces specific to Exynos drm. As a result, once the dt bindings of crtc and encoder are completed at top level, encoder driver has its own drm_bridge for bridge, and dt binding you proposed could be used without any change, and drm_panel could also be used only for real lcd panel driver.
And below is a block diagram I think,
DRM KMS
/ | \
/ | \
crtc encoder connector
| / \ |
| / \ |
| | drm_bridge drm_panel
| | | |
| | | |
FIMD MIPI-DSI LVDS bridge Panel
Thanks,
Inki Dae
Quoted 11 lines
Quoted 2 lines
Will review your patch series soon.
Thanks in advance.
Regards
Andrzej_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 42 lines · Inki Dae
2014-03-07 19:00 GMT+09:00 Andrzej Hajda <[email protected]>:
Quoted 28 lines · Inki Dae
Quoted 20 lines
Hi Andrzej,
Thanks for your contributions.
2014-02-12 20:31 GMT+09:00 Andrzej Hajda <[email protected]>:
Quoted 15 lines
Hi,
This patchset adds drivers and bindings to the following devices:
- Exynos DSI master,
- S6E8AA0 DSI panel,
- TC358764 DSI/LVDS bridge,
- HV070WSA-100 LVDS panel.It adds also display support in DTS files for the following boards:
- Exynos4210/Trats,
- Exynos4412/Trats2,
- Exynos5250/Arndale.Things worth mentioning:
Quoted 7 lines
Quoted 4 lines
1. I have implemented DSI/LVDS bridge using
drm_panelframework, ie. the driver exposesdrm_panelinterface on DSI side, and interact with panels on LVDS side usingdrm_panelframework. This approach seems to me simpler and more natural than usingdrm_bridge.Can you give me more details about why you think better to use panel framework than using
drm_bridge? "Simpler" and "more natural" are ambiguous to me.Quoted 12 lines
In this particular case DSI master expects on the other end any device having DSI slave interface, it could be panel or bridge. So it seems natural that both types of slave devices should expose the same interface also on programming level.
Another problem withdrm_bridgeis that it is not scalable - if some manufacturer will decide to add another block between the bridge and the panel there is no drm component which can be used for it. Usingdrm_panelthe way I have used in toshiba bridge makes scalability possible,
it will be only a matter of adding a driver for new block and making proper links in device tree, I see no easy way of doing it withdrm_bridgeapproach.
Quoted 7 lines
Now
drm_bridgemay not cover all hardware. Howeverdrm_bridgehas already been merged to mainline so I think we need to usedrm_bridgesomehow instead of using other one, and also we could extenddrm_bridgeif needed. It would be definitely impossible for a new framework to cover all hardware because there may be other hardware not appeared yet. That is what we are doing for mainline until now.
Well, maybe drm_bridge has been merged, but so has been drm_panel. Moreover, merged code is not carved in stone, if there is a better option that could replace it, users of it can be converted to the new approach and the old one can be removed.
As I believe Andrzej has demonstrated, drm_panel framework is clearly superior over drm_bridge and I can't think of any good reason why it couldn't become more generic and replace drm_bridge. Of course it can be renamed then to something more generic appropriately.
Quoted 40 lines
Quoted 16 lines
Quoted 10 lines
Using same
drm_panelframework for LDVS bridge and real panel drivers isn't reasonable to me as now becausedrm_panelframework would be for real panel device even if the use ofdrm_panelframework looks like suitable to LVDS bridge driver. I thought Sean's way, ptn3460 driver usingdrm_bridestuff, is good enough, and that would be whydrm_bridgeexists and whydrm_encoderhasdrm_bridge.Quoted 6 lines
And I'm finding more generic way, how to handle LVDS bridge using super node so that LVDS bridge driver isn't embedded to connector drivers such as eDP and MIPI-DSI, and dt binding of LVDS bridge can be done at top level of Exynos drm. Once the binding is done, encoder of display bus driver will have
drm_bridgeobject of LVDS bridge driver so that display bus driver can handle LVDS bridge driver.Quoted 5 lines
Could you explain what you mean by "dt binding of LVDS bridge can be done at top level of Exynos drm" ? How it will look like if there will be more bridges, one for DSI, one for HDMI, etc... What if there will be two
bridges in one chain. How it will cope with video pipeline bindings?it was just my idea so I have no implementation about it yet.
My idea is that crtc and encoder are binded at top level of Exynos drm as is. And for bridge support, the only difference is, in case that encoder driver has bridge, the dt binding of the encoder driver is done once last one between encoder and bridge driver is binded. It would mean that bridge driver can use driver model and it doesn't need to concern about probe order issue.
For this, encoder driver with bridge, MIPI-DSI or eDP, would need to use component interfaces specific to Exynos drm. As a result, once the dt bindings of crtc and encoder are completed at top level, encoder driver has its own
drm_bridgefor bridge, and dt binding you proposed could be used without any change, anddrm_panelcould also be used only for real lcd panel driver.And below is a block diagram I think,
Quoted 11 lines
DRM KMS
/ | \
/ | \
crtc encoder connector
| / \ |
| / \ |
| |drm_bridgedrm_panel
| | | |
| | | |
FIMD MIPI-DSI LVDS bridge Panel
Hmm, this doesn't seem to be complete. Several bridges can be chained together. Also I believe "Panel" and "drm_panel" on your diagram should be basically the same. This leads to obvious conclusion that drm_bridge and drm_panel should be merged and Andrzej has shown an example (and IMHO good) way to do it, as drm_panel already provides a significant amount of existing infrastructure.
Best regards,
Tomasz
Inki Dae
maintainer2014-03-12 20:16 GMT+09:00 Tomasz Figa <[email protected]>:
Quoted 123 lines · Inki Dae
Quoted 49 lines
2014-03-07 19:00 GMT+09:00 Andrzej Hajda <[email protected]>:
Quoted 33 lines · Inki Dae
Quoted 22 lines
Hi Andrzej,
Thanks for your contributions.
2014-02-12 20:31 GMT+09:00 Andrzej Hajda <[email protected]>:
Quoted 16 lines
Hi,
This patchset adds drivers and bindings to the following devices:
- Exynos DSI master,
- S6E8AA0 DSI panel,
- TC358764 DSI/LVDS bridge,
- HV070WSA-100 LVDS panel.It adds also display support in DTS files for the following boards:
- Exynos4210/Trats,
- Exynos4412/Trats2,
- Exynos5250/Arndale.Things worth mentioning:
Quoted 8 lines
Quoted 4 lines
1. I have implemented DSI/LVDS bridge using
drm_panelframework, ie. the driver exposesdrm_panelinterface on DSI side, and interact with panels on LVDS side usingdrm_panelframework. This approach seems to me simpler and more natural than usingdrm_bridge.Can you give me more details about why you think better to use panel framework than using
drm_bridge? "Simpler" and "more natural" are ambiguous to me.Quoted 12 lines
In this particular case DSI master expects on the other end any device having DSI slave interface, it could be panel or bridge. So it seems natural that both types of slave devices should expose the same interface also on programming level.
Another problem withdrm_bridgeis that it is not scalable - if some manufacturer will decide to add another block between the bridge and the panel there is no drm component which can be used for it. Usingdrm_panelthe way I have used in toshiba bridge makes scalability possible,
it will be only a matter of adding a driver for new block and making proper links in device tree, I see no easy way of doing it withdrm_bridgeapproach.Quoted 7 lines
Now
drm_bridgemay not cover all hardware. Howeverdrm_bridgehas already been merged to mainline so I think we need to usedrm_bridgesomehow instead of using other one, and also we could extenddrm_bridgeif needed. It would be definitely impossible for a new framework to cover all hardware because there may be other hardware not appeared yet. That is what we are doing for mainline until now.Well, maybe
drm_bridgehas been merged, but so has beendrm_panel. Moreover, merged code is not carved in stone, if there is a better option that could replace it, users of it can be converted to the new approach and the old one can be removed.As I believe Andrzej has demonstrated,
drm_panelframework is clearly superior overdrm_bridgeand I can't think of any good reason why it couldn't become more generic and replacedrm_bridge. Of course it can be renamed then to something more generic appropriately.Quoted 42 lines
Quoted 17 lines
Quoted 10 lines
Using same
drm_panelframework for LDVS bridge and real panel drivers isn't reasonable to me as now becausedrm_panelframework would be for real panel device even if the use ofdrm_panelframework looks like suitable to LVDS bridge driver. I thought Sean's way, ptn3460 driver usingdrm_bridestuff, is good enough, and that would be whydrm_bridgeexists and whydrm_encoderhasdrm_bridge.Quoted 6 lines
And I'm finding more generic way, how to handle LVDS bridge using super node so that LVDS bridge driver isn't embedded to connector drivers such as eDP and MIPI-DSI, and dt binding of LVDS bridge can be done at top level of Exynos drm. Once the binding is done, encoder of display bus driver will have
drm_bridgeobject of LVDS bridge driver so that display bus driver can handle LVDS bridge driver.Quoted 5 lines
Could you explain what you mean by "dt binding of LVDS bridge can be done at top level of Exynos drm" ? How it will look like if there will be more bridges, one for DSI, one for HDMI, etc... What if there will be two
bridges in one chain. How it will cope with video pipeline bindings?it was just my idea so I have no implementation about it yet.
My idea is that crtc and encoder are binded at top level of Exynos drm as is. And for bridge support, the only difference is, in case that encoder driver has bridge, the dt binding of the encoder driver is done once last one between encoder and bridge driver is binded. It would mean that bridge driver can use driver model and it doesn't need to concern about probe order issue.
For this, encoder driver with bridge, MIPI-DSI or eDP, would need to use component interfaces specific to Exynos drm. As a result, once the dt bindings of crtc and encoder are completed at top level, encoder driver has its own
drm_bridgefor bridge, and dt binding you proposed could be used without any change, anddrm_panelcould also be used only for real lcd panel driver.And below is a block diagram I think,
Quoted 11 lines
DRM KMS
/ | \
/ | \
crtc encoder connector
| / \ |
| / \ |
| |drm_bridgedrm_panel
| | | |
| | | |
FIMD MIPI-DSI LVDS bridge Panel
Quoted 7 lines
Hmm, this doesn't seem to be complete. Several bridges can be chained together. Also I believe "Panel" and "
drm_panel" on your diagram should be basically the same. This leads to obvious conclusion thatdrm_bridgeanddrm_panelshould be merged and Andrzej has shown an example (and IMHO good) way to do it, asdrm_panelalready provides a significant amount of existing infrastructure.
Not opposite to using drm_panel framework. What I disagree is to implement encoder/connector to crtc driver, and to use drm_panel framework for bridge device.
I tend to believe that obvious fact is that crtc driver, fimd, is not proper place that encoder and connector should be implemented. Is there other SoC using such way? I think other SoC guys had ever agonized about same issue.
And I'm not sure that how several bridges can be chained together so can you show me the real case, real hardware? If there is my missing something and we cannot really cover such hardware support with drm_bridge framework, I think we could consider to use drm_panel framework instead of drm_bridge. And maybe, we may need opinions from other maintainers.
Thanks,
Inki Dae
Quoted 7 lines
Best regards,
Tomasz_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 118 lines · Inki Dae
2014-03-12 20:16 GMT+09:00 Tomasz Figa <[email protected]>:
Quoted 110 lines · Inki Dae
Quoted 42 lines
2014-03-07 19:00 GMT+09:00 Andrzej Hajda <[email protected]>:
Quoted 28 lines · Inki Dae
Quoted 20 lines
Hi Andrzej,
Thanks for your contributions.
2014-02-12 20:31 GMT+09:00 Andrzej Hajda <[email protected]>:
Quoted 15 lines
Hi,
This patchset adds drivers and bindings to the following devices:
- Exynos DSI master,
- S6E8AA0 DSI panel,
- TC358764 DSI/LVDS bridge,
- HV070WSA-100 LVDS panel.It adds also display support in DTS files for the following boards:
- Exynos4210/Trats,
- Exynos4412/Trats2,
- Exynos5250/Arndale.Things worth mentioning:
Quoted 7 lines
Quoted 4 lines
1. I have implemented DSI/LVDS bridge using
drm_panelframework, ie. the driver exposesdrm_panelinterface on DSI side, and interact with panels on LVDS side usingdrm_panelframework. This approach seems to me simpler and more natural than usingdrm_bridge.Can you give me more details about why you think better to use panel framework than using
drm_bridge? "Simpler" and "more natural" are ambiguous to me.Quoted 12 lines
In this particular case DSI master expects on the other end any device having DSI slave interface, it could be panel or bridge. So it seems natural that both types of slave devices should expose the same interface also on programming level.
Another problem withdrm_bridgeis that it is not scalable - if some manufacturer will decide to add another block between the bridge and the panel there is no drm component which can be used for it. Usingdrm_panelthe way I have used in toshiba bridge makes scalability possible,
it will be only a matter of adding a driver for new block and making proper links in device tree, I see no easy way of doing it withdrm_bridgeapproach.Quoted 7 lines
Now
drm_bridgemay not cover all hardware. Howeverdrm_bridgehas already been merged to mainline so I think we need to usedrm_bridgesomehow instead of using other one, and also we could extenddrm_bridgeif needed. It would be definitely impossible for a new framework to cover all hardware because there may be other hardware not appeared yet. That is what we are doing for mainline until now.Well, maybe
drm_bridgehas been merged, but so has beendrm_panel. Moreover, merged code is not carved in stone, if there is a better option that could replace it, users of it can be converted to the new approach and the old one can be removed.As I believe Andrzej has demonstrated,
drm_panelframework is clearly superior overdrm_bridgeand I can't think of any good reason why it couldn't become more generic and replacedrm_bridge. Of course it can be renamed then to something more generic appropriately.Quoted 38 lines
Quoted 14 lines
Quoted 8 lines
Using same
drm_panelframework for LDVS bridge and real panel drivers isn't reasonable to me as now becausedrm_panelframework would be for real panel device even if the use ofdrm_panelframework looks like suitable to LVDS bridge driver. I thought Sean's way, ptn3460 driver usingdrm_bridestuff, is good enough, and that would be whydrm_bridgeexists and whydrm_encoderhasdrm_bridge.Quoted 6 lines
And I'm finding more generic way, how to handle LVDS bridge using super node so that LVDS bridge driver isn't embedded to connector drivers such as eDP and MIPI-DSI, and dt binding of LVDS bridge can be done at top level of Exynos drm. Once the binding is done, encoder of display bus driver will have
drm_bridgeobject of LVDS bridge driver so that display bus driver can handle LVDS bridge driver.Quoted 5 lines
Could you explain what you mean by "dt binding of LVDS bridge can be done at top level of Exynos drm" ? How it will look like if there will be more bridges, one for DSI, one for HDMI, etc... What if there will be two
bridges in one chain. How it will cope with video pipeline bindings?it was just my idea so I have no implementation about it yet.
My idea is that crtc and encoder are binded at top level of Exynos drm as is. And for bridge support, the only difference is, in case that encoder driver has bridge, the dt binding of the encoder driver is done once last one between encoder and bridge driver is binded. It would mean that bridge driver can use driver model and it doesn't need to concern about probe order issue.
For this, encoder driver with bridge, MIPI-DSI or eDP, would need to use component interfaces specific to Exynos drm. As a result, once the dt bindings of crtc and encoder are completed at top level, encoder driver has its own
drm_bridgefor bridge, and dt binding you proposed could be used without any change, anddrm_panelcould also be used only for real lcd panel driver.And below is a block diagram I think,
Quoted 11 lines
DRM KMS
/ | \
/ | \
crtc encoder connector
| / \ |
| / \ |
| |drm_bridgedrm_panel
| | | |
| | | |
FIMD MIPI-DSI LVDS bridge PanelQuoted 7 lines
Hmm, this doesn't seem to be complete. Several bridges can be chained together. Also I believe "Panel" and "
drm_panel" on your diagram should be basically the same. This leads to obvious conclusion thatdrm_bridgeanddrm_panelshould be merged and Andrzej has shown an example (and IMHO good) way to do it, asdrm_panelalready provides a significant amount of existing infrastructure.
Quoted 7 lines
Not opposite to using
drm_panelframework. What I disagree is to implement encoder/connector to crtc driver, and to usedrm_panelframework for bridge device.
I tend to believe that obvious fact is that crtc driver, fimd, is not proper place that encoder and connector should be implemented. Is there other SoC using such way? I think other SoC guys had ever agonized about same issue.
Quick look at some mobile drm drivers:
1. tegra - in rgb pseudo-driver encoder/connector is bound to crtc device, it is separate file but the same device driver.
2. imx - crtc and encoder are separated, but parallel driver is a pure virtual device driver, no hw associated with it.
3. shmob - crtc, encoder and connector are in the same device.
4. omap - all drm components are created in omap_drv, physical devices are bound to them using internal framework.
I prefer to avoid creating virtual devices, I think the simpler solution for parallel output for now could be something like in tegra.
Generally I tend to omap solution but instead of creating internal framework use what we have already, ie drm_panel.
Btw I do not see drm_panel as sth strange in this context, for example in the chain:
FIMD --> DSIM --> DSI/LVDS --> Panel
any device in the chain sees device on the right side of the link as a panel. Ie.
FIMD sees RGB panel,
DSIM sees DSI panel,
bridge sees LVDS panel.
Quoted 7 lines
And I'm not sure that how several bridges can be chained together so can you show me the real case, real hardware? If there is my missing something and we cannot really cover such hardware support with
drm_bridgeframework, I think we could consider to usedrm_panelframework instead ofdrm_bridge. And maybe, we may need opinions from other maintainers.
Real cases I have showed in another thread:
FIMD --> MIE --> DSI --> DSI/LVDS --> Panel
Five hw devices in the chain, we are not able to map them to 3+1 drm components 1:1, something should be squashed. Probably squashing MIE with FIMD would be a some solution. But in place of MIE there can be also mDNIe --> FIMDlite. So we need another sub-framework or bunch of conditionals to handle it.
On the other side drm_panel would solve these problems in generic way.
Regards
Andrzej
Quoted 11 lines
Thanks,
Inki DaeQuoted 7 lines
Best regards,
Tomasz_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Inki Dae
maintainer2014-03-13 22:41 GMT+09:00 Andrzej Hajda <[email protected]>:
Quoted 135 lines · Inki Dae
Quoted 118 lines
2014-03-12 20:16 GMT+09:00 Tomasz Figa <[email protected]>:
Quoted 110 lines · Inki Dae
Quoted 42 lines
2014-03-07 19:00 GMT+09:00 Andrzej Hajda <[email protected]>:
Quoted 28 lines · Inki Dae
Quoted 20 lines
Hi Andrzej,
Thanks for your contributions.
2014-02-12 20:31 GMT+09:00 Andrzej Hajda <[email protected]>:
Quoted 15 lines
Hi,
This patchset adds drivers and bindings to the following devices:
- Exynos DSI master,
- S6E8AA0 DSI panel,
- TC358764 DSI/LVDS bridge,
- HV070WSA-100 LVDS panel.It adds also display support in DTS files for the following boards:
- Exynos4210/Trats,
- Exynos4412/Trats2,
- Exynos5250/Arndale.Things worth mentioning:
Quoted 7 lines
Quoted 4 lines
1. I have implemented DSI/LVDS bridge using
drm_panelframework, ie. the driver exposesdrm_panelinterface on DSI side, and interact with panels on LVDS side usingdrm_panelframework. This approach seems to me simpler and more natural than usingdrm_bridge.Can you give me more details about why you think better to use panel framework than using
drm_bridge? "Simpler" and "more natural" are ambiguous to me.Quoted 12 lines
In this particular case DSI master expects on the other end any device having DSI slave interface, it could be panel or bridge. So it seems natural that both types of slave devices should expose the same interface also on programming level.
Another problem withdrm_bridgeis that it is not scalable - if some manufacturer will decide to add another block between the bridge and the panel there is no drm component which can be used for it. Usingdrm_panelthe way I have used in toshiba bridge makes scalability possible,
it will be only a matter of adding a driver for new block and making proper links in device tree, I see no easy way of doing it withdrm_bridgeapproach.Quoted 7 lines
Now
drm_bridgemay not cover all hardware. Howeverdrm_bridgehas already been merged to mainline so I think we need to usedrm_bridgesomehow instead of using other one, and also we could extenddrm_bridgeif needed. It would be definitely impossible for a new framework to cover all hardware because there may be other hardware not appeared yet. That is what we are doing for mainline until now.Well, maybe
drm_bridgehas been merged, but so has beendrm_panel. Moreover, merged code is not carved in stone, if there is a better option that could replace it, users of it can be converted to the new approach and the old one can be removed.As I believe Andrzej has demonstrated,
drm_panelframework is clearly superior overdrm_bridgeand I can't think of any good reason why it couldn't become more generic and replacedrm_bridge. Of course it can be renamed then to something more generic appropriately.Quoted 38 lines
Quoted 14 lines
Quoted 8 lines
Using same
drm_panelframework for LDVS bridge and real panel drivers isn't reasonable to me as now becausedrm_panelframework would be for real panel device even if the use ofdrm_panelframework looks like suitable to LVDS bridge driver. I thought Sean's way, ptn3460 driver usingdrm_bridestuff, is good enough, and that would be whydrm_bridgeexists and whydrm_encoderhasdrm_bridge.Quoted 6 lines
And I'm finding more generic way, how to handle LVDS bridge using super node so that LVDS bridge driver isn't embedded to connector drivers such as eDP and MIPI-DSI, and dt binding of LVDS bridge can be done at top level of Exynos drm. Once the binding is done, encoder of display bus driver will have
drm_bridgeobject of LVDS bridge driver so that display bus driver can handle LVDS bridge driver.Quoted 5 lines
Could you explain what you mean by "dt binding of LVDS bridge can be done at top level of Exynos drm" ? How it will look like if there will be more bridges, one for DSI, one for HDMI, etc... What if there will be two
bridges in one chain. How it will cope with video pipeline bindings?it was just my idea so I have no implementation about it yet.
My idea is that crtc and encoder are binded at top level of Exynos drm as is. And for bridge support, the only difference is, in case that encoder driver has bridge, the dt binding of the encoder driver is done once last one between encoder and bridge driver is binded. It would mean that bridge driver can use driver model and it doesn't need to concern about probe order issue.
For this, encoder driver with bridge, MIPI-DSI or eDP, would need to use component interfaces specific to Exynos drm. As a result, once the dt bindings of crtc and encoder are completed at top level, encoder driver has its own
drm_bridgefor bridge, and dt binding you proposed could be used without any change, anddrm_panelcould also be used only for real lcd panel driver.And below is a block diagram I think,
Quoted 11 lines
DRM KMS
/ | \
/ | \
crtc encoder connector
| / \ |
| / \ |
| |drm_bridgedrm_panel
| | | |
| | | |
FIMD MIPI-DSI LVDS bridge PanelQuoted 7 lines
Hmm, this doesn't seem to be complete. Several bridges can be chained together. Also I believe "Panel" and "
drm_panel" on your diagram should be basically the same. This leads to obvious conclusion thatdrm_bridgeanddrm_panelshould be merged and Andrzej has shown an example (and IMHO good) way to do it, asdrm_panelalready provides a significant amount of existing infrastructure.Quoted 7 lines
Not opposite to using
drm_panelframework. What I disagree is to implement encoder/connector to crtc driver, and to usedrm_panelframework for bridge device.
I tend to believe that obvious fact is that crtc driver, fimd, is not proper place that encoder and connector should be implemented. Is there other SoC using such way? I think other SoC guys had ever agonized about same issue.Quick look at some mobile drm drivers:
1. tegra - in rgb pseudo-driver encoder/connector is bound to crtc device, it is separate file but the same device driver.
2. imx - crtc and encoder are separated, but parallel driver is a pure virtual device driver, no hw associated with it.
3. shmob - crtc, encoder and connector are in the same device.
4. omap - all drm components are created inomap_drv, physical devices are bound to them using internal framework.
Quoted 5 lines
I prefer to avoid creating virtual devices, I think the simpler solution for parallel output for now could be something like in tegra.
Generally I tend to omap solution but instead of creating internal framework use what we have already, ie
drm_panel.
Doesn't it better to use internal framework like omap did ? Or, I think it's better to change drm_panel to more generic name if you want to use drm_panel so that drm_panel can be used commonly for other hardware block devices. It's curious to control all hardware blocks and real panel device using drm_panel.
Quoted 18 lines
Btw I do not see
drm_panelas sth strange in this context, for example in the chain:
FIMD --> DSIM --> DSI/LVDS --> Panel
any device in the chain sees device on the right side of the link as a panel. Ie.
FIMD sees RGB panel,
DSIM sees DSI panel,
bridge sees LVDS panel.Quoted 7 lines
And I'm not sure that how several bridges can be chained together so can you show me the real case, real hardware? If there is my missing something and we cannot really cover such hardware support with
drm_bridgeframework, I think we could consider to usedrm_panelframework instead ofdrm_bridge. And maybe, we may need opinions from other maintainers.
Quoted 2 lines
Real cases I have showed in another thread:
FIMD --> MIE --> DSI --> DSI/LVDS --> Panel
I didn't see these hardware blocks are called bridge. :) Yes, right, and also these can be chained together in more various ways.
Quoted 10 lines
Five hw devices in the chain, we are not able to map them to 3+1 drm components 1:1, something should be squashed. Probably squashing MIE with FIMD would be a some solution. But in place of MIE there can be also mDNIe --> FIMDlite. So we need another sub-framework or bunch of conditionals to handle it.
On the other sidedrm_panelwould solve these problems in generic way.
Ok, but for more clear I think we would need to look into how other SoC guys are handling similar hardware blocks in drm world.
Thanks,
Inki Dae
Quoted 19 lines
Regards
AndrzejQuoted 11 lines
Thanks,
Inki DaeQuoted 7 lines
Best regards,
Tomasz_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel