drm/tilcdc: Add DRM panel support and use it for am335x-evm
Subsystems (5)
cover drm/tilcdc: Add DRM panel support and use it for am335x-evm
The first patch adds support for drm panels to tilcdc. The second is just for convenience. The third adds support for am335x-evm's panel to panel-simple driver. The third changes am335x-evm's dts file to use panel-simple instead of tilcdc's bundled dpi-panel support.
After the review I will pick the tilcdc patches, but how about the panel-simple, who will take it?
There is no hurry with the dts patch. We can even wait with it until the next release, when everything certainly ready for it. The evm works just fine with the old tilcdc bundled panel support and we probably have to keep it around indefinately for backward compatibility.
Best regards,
Jyri
Jyri Sarha (4):
drm/tilcdc: Add support for drm panels
drm/tilcdc: tilcdc_panel: Rename device from "panel" to "tilcdc-panel" drm/panel: simple: Add TVC S9700RTWV43TR-01B 800x480 panel support
ARM: dts: am335x-evm: Use drm simple-panel instead of tilcdc-panel
arch/arm/boot/dts/am335x-evm.dts | 44 +++++++++++++------------------- drivers/gpu/drm/panel/panel-simple.c | 26 +++++++++++++++++++ drivers/gpu/drm/tilcdc/Kconfig | 2 ++ drivers/gpu/drm/tilcdc/tilcdc_external.c | 29 ++++++++++++++------- drivers/gpu/drm/tilcdc/tilcdc_panel.c | 2 +- 5 files changed, 67 insertions(+), 36 deletions(-)
Signature · 6 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/4 drm/tilcdc: tilcdc_panel: Rename device from "panel" to "tilcdc-panel"
Rename the bundled tilcdc_panel driver from just "panel" to "tilcdc-panel" to avoid noisy error messages from the driver trying to probe all device nodes named "panel".
--- drivers/gpu/drm/tilcdc/tilcdc_panel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tilcdc/tilcdc_panel.c +1 -1
@@ -421,7 +421,7 @@ struct platform_driver panel_driver = { .remove = panel_remove, .driver = { .owner = THIS_MODULE, - .name = "panel", + .name = "tilcdc-panel", .of_match_table = panel_of_match, }, };
Signature · 6 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/4 drm/panel: simple: Add TVC S9700RTWV43TR-01B 800x480 panel support
In reply to Jyri SarhaAdd support for TVC S9700RTWV43TR-01B 800x480 panel found on TI's AM335X-EVM.
--- drivers/gpu/drm/panel/panel-simple.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
drivers/gpu/drm/panel/panel-simple.c +26 -0
@@ -1962,6 +1962,29 @@ static const struct panel_desc tpk_f10a_0102 = { }, }; +static const struct drm_display_mode tvc_s9700rtwv43tr_01b_mode = { + .clock =3000 , + .hdisplay =800 , + .hsync_start =800 +39 , + .hsync_end =800 +39 +47 , + .htotal =800 +39 +47 +39 , + .vdisplay =480 , + .vsync_start =480 +13 , + .vsync_end =480 +13 +2 , + .vtotal =480 +13 +2 +29 , + .vrefresh =62 , +}; + +static const struct panel_desc tvc_s9700rtwv43tr_01b = { + .modes = &tvc_s9700rtwv43tr_01b_mode, + .num_modes =1 , + .bpc =8 , + .size = { + .width =155 , + .height =90 , + }, +}; +static const struct display_timing urt_umsh_8596md_timing = { .pixelclock = {33260000 ,33260000 ,33260000 }, .hactive = {800 ,800 ,800 },
@@ -2214,6 +2237,9 @@ static const struct of_device_id platform_of_match[] = { .compatible = "tpk,f10a-0102", .data = &tpk_f10a_0102, }, { + .compatible = "tvc,s9700rtwv43tr-01b", + .data = &tvc_s9700rtwv43tr_01b, + }, { .compatible = "urt,umsh-8596md-t", .data = &urt_umsh_8596md_parallel, }, {
Signature · 6 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/4 drm/tilcdc: Add support for drm panels
In reply to Jyri SarhaAdd support for drm panels to tilcdc. Adding the support on top of the existing bridge support needs only couple of lines of code when using using the drm panel bridge helpers.
--- drivers/gpu/drm/tilcdc/Kconfig | 2 ++ drivers/gpu/drm/tilcdc/tilcdc_external.c | 29 ++++++++++++++++++++--------- 2 files changed, 22 insertions(+), 9 deletions(-)
drivers/gpu/drm/tilcdc/Kconfig +2 -0
@@ -4,6 +4,8 @@ config DRM_TILCDC select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER select DRM_GEM_CMA_HELPER + select DRM_BRIDGE + select DRM_PANEL_BRIDGE select VIDEOMODE_HELPERS select BACKLIGHT_CLASS_DEVICE select BACKLIGHT_LCD_SUPPORT
drivers/gpu/drm/tilcdc/tilcdc_external.c +20 -9
@@ -188,18 +188,16 @@ int tilcdc_attach_bridge(struct drm_device *ddev, struct drm_bridge *bridge)int tilcdc_attach_external_device (struct drm_device *ddev) {struct tilcdc_drm_private *priv = ddev->dev_private; -struct device_node *remote_node;struct drm_bridge *bridge; +struct drm_panel *panel;int ret; - remote_node =of_graph_get_remote_node (ddev->dev->of_node,0 ,0 ); -if (!remote_node) + ret =drm_of_find_panel_or_bridge (ddev->dev->of_node,0 ,0 , + &panel, &bridge); +if (ret == -ENODEV )return 0 ; - - bridge =of_drm_find_bridge (remote_node); -of_node_put (remote_node); -if (!bridge) -return -EPROBE_DEFER ; +else if (ret) +return ret; priv->external_encoder = devm_kzalloc(ddev->dev, sizeof(*priv->external_encoder),
@@ -215,10 +213,23 @@ int tilcdc_attach_external_device(struct drm_device *ddev)return ret; } +if (panel) { + bridge =devm_drm_panel_bridge_add (ddev->dev, panel, +DRM_MODE_CONNECTOR_DPI ); +if (IS_ERR (bridge)) { + ret =PTR_ERR (bridge); + goto err_encoder_cleanup; + } + } + ret =tilcdc_attach_bridge (ddev, bridge);if (ret) -drm_encoder_cleanup (priv->external_encoder); + goto err_encoder_cleanup; + +return 0 ; +err_encoder_cleanup: +drm_encoder_cleanup (priv->external_encoder);return ret; }
Signature · 6 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 4/4 ARM: dts: am335x-evm: Use drm simple-panel instead of tilcdc-panel
In reply to Jyri SarhaMove to use the new drm panel support in tilcdc together with added "tvc,s9700rtwv43tr-01b"-panel support in drm panel-simple.
--- arch/arm/boot/dts/am335x-evm.dts | 44 ++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 26 deletions(-)
arch/arm/boot/dts/am335x-evm.dts +18 -26
@@ -98,7 +98,7 @@ }; }; - backlight { + backlight: backlight { compatible = "pwm-backlight"; pwms = <&ecap0 0 50000 0>; brightness-levels = <0 51 53 56 62 75 101 152 255>;
@@ -106,35 +106,19 @@ }; panel { - compatible = "ti,tilcdc,panel"; + compatible = "tvc,s9700rtwv43tr-01b"; + status = "okay"; + pinctrl-names = "default"; pinctrl-0 = <&lcd_pins_s0>; - panel-info { - ac-bias = <255>; - ac-bias-intrpt = <0>; - dma-burst-sz = <16>; - bpp = <32>; - fdd = <0x80>; - sync-edge = <0>; - sync-ctrl = <1>; - raster-order = <0>; - fifo-th = <0>; - }; - display-timings { - 800x480p62 { - clock-frequency = <30000000>; - hactive = <800>; - vactive = <480>; - hfront-porch = <39>; - hback-porch = <39>; - hsync-len = <47>; - vback-porch = <29>; - vfront-porch = <13>; - vsync-len = <2>; - hsync-active = <1>; - vsync-active = <1>; + backlight = <&backlight>; + ports { + port { + panel_0: endpoint@0 { + remote-endpoint = <&lcdc_0>; + }; }; }; };
@@ -503,6 +487,14 @@ status = "okay"; blue-and-red-wiring = "crossed"; + + ports { + port { + lcdc_0: endpoint@0 { + remote-endpoint = <&panel_0>; + }; + }; + }; }; &elm {
Signature · 6 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 22 lines · Jyri Sarha
The first patch adds support for drm panels to tilcdc. The second is just for convenience. The third adds support for am335x-evm's panel to panel-simple driver. The third changes am335x-evm's dts file to use panel-simple instead of tilcdc's bundled dpi-panel support.
After the review I will pick the tilcdc patches, but how about the panel-simple, who will take it?
There is no hurry with the dts patch. We can even wait with it until the next release, when everything certainly ready for it. The evm works just fine with the old tilcdc bundled panel support and we probably have to keep it around indefinately for backward compatibility.
Best regards,
JyriJyri Sarha (4):
drm/tilcdc: Add support for drm panels
drm/tilcdc:tilcdc_panel: Rename device from "panel" to "tilcdc-panel" drm/panel: simple: Add TVC S9700RTWV43TR-01B 800x480 panel support
ARM: dts: am335x-evm: Use drm simple-panel instead of tilcdc-panel
Quoted 7 lines
arch/arm/boot/dts/am335x-evm.dts | 44 +++++++++++++------------------- drivers/gpu/drm/panel/panel-simple.c | 26 +++++++++++++++++++ drivers/gpu/drm/tilcdc/Kconfig | 2 ++ drivers/gpu/drm/tilcdc/tilcdc_external.c | 29 ++++++++++++++------- drivers/gpu/drm/tilcdc/tilcdc_panel.c | 2 +- 5 files changed, 67 insertions(+), 36 deletions(-)
Tomi
Signature · 6 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 31 lines · Tomi Valkeinen
Quoted 22 lines · Jyri Sarha
The first patch adds support for drm panels to tilcdc. The second is just for convenience. The third adds support for am335x-evm's panel to panel-simple driver. The third changes am335x-evm's dts file to use panel-simple instead of tilcdc's bundled dpi-panel support.
After the review I will pick the tilcdc patches, but how about the panel-simple, who will take it?
There is no hurry with the dts patch. We can even wait with it until the next release, when everything certainly ready for it. The evm works just fine with the old tilcdc bundled panel support and we probably have to keep it around indefinately for backward compatibility.
Best regards,
JyriJyri Sarha (4):
drm/tilcdc: Add support for drm panels
drm/tilcdc:tilcdc_panel: Rename device from "panel" to "tilcdc-panel" drm/panel: simple: Add TVC S9700RTWV43TR-01B 800x480 panel support
ARM: dts: am335x-evm: Use drm simple-panel instead of tilcdc-panelQuoted 7 lines
arch/arm/boot/dts/am335x-evm.dts | 44 +++++++++++++------------------- drivers/gpu/drm/panel/panel-simple.c | 26 +++++++++++++++++++ drivers/gpu/drm/tilcdc/Kconfig | 2 ++ drivers/gpu/drm/tilcdc/tilcdc_external.c | 29 ++++++++++++++------- drivers/gpu/drm/tilcdc/tilcdc_panel.c | 2 +- 5 files changed, 67 insertions(+), 36 deletions(-)
Quoted 1 line
Reviewed-by Tomi Valkeinen <[email protected]>
Since panel drivers are in drm-misc probably simplest if we push these all through that tree? Want commit rights for that?
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 32 lines · Daniel Vetter
Quoted 31 lines · Tomi Valkeinen
Quoted 29 lines · Jyri Sarha
The first patch adds support for drm panels to tilcdc. The second is just for convenience. The third adds support for am335x-evm's panel to panel-simple driver. The third changes am335x-evm's dts file to use panel-simple instead of tilcdc's bundled dpi-panel support.
After the review I will pick the tilcdc patches, but how about the panel-simple, who will take it?
There is no hurry with the dts patch. We can even wait with it until the next release, when everything certainly ready for it. The evm works just fine with the old tilcdc bundled panel support and we probably have to keep it around indefinately for backward compatibility.
Best regards,
JyriJyri Sarha (4):
drm/tilcdc: Add support for drm panels
drm/tilcdc:tilcdc_panel: Rename device from "panel" to "tilcdc-panel" drm/panel: simple: Add TVC S9700RTWV43TR-01B 800x480 panel support
ARM: dts: am335x-evm: Use drm simple-panel instead of tilcdc-panelarch/arm/boot/dts/am335x-evm.dts | 44 +++++++++++++------------------- drivers/gpu/drm/panel/panel-simple.c | 26 +++++++++++++++++++ drivers/gpu/drm/tilcdc/Kconfig | 2 ++ drivers/gpu/drm/tilcdc/tilcdc_external.c | 29 ++++++++++++++------- drivers/gpu/drm/tilcdc/tilcdc_panel.c | 2 +- 5 files changed, 67 insertions(+), 36 deletions(-)
Quoted 6 lines
Quoted 1 line
Reviewed-by Tomi Valkeinen <[email protected]>Since panel drivers are in drm-misc probably simplest if we push these all through that tree? Want commit rights for that?
-Daniel
Sure. However, I already sent a pull request for tilcdc patches. But I can send another for the panel patch to drm misc.
There is no direct dependency and I the dts patch can wait until the next release, just to be sure that there is no breakage.
Best regards,
Jyri
Signature · 6 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 10 lines · Jyri Sarha
Quoted 4 lines
Since panel drivers are in drm-misc probably simplest if we push these all through that tree? Want commit rights for that?
-DanielSure. However, I already sent a pull request for tilcdc patches. But I can send another for the panel patch to drm misc.
There is no direct dependency and I the dts patch can wait until the next release, just to be sure that there is no breakage.
Oh... I was hasty in replying. But yes can push the panel patch to drm-misc if you give me the rights. I guess you need my ssh public key (attached) for that.
BR,
Jyri
Signature · 2 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 8 lines · Jyri Sarha
Quoted 7 lines · Jyri Sarha
Quoted 4 lines
Since panel drivers are in drm-misc probably simplest if we push these all through that tree? Want commit rights for that?
-DanielSure. However, I already sent a pull request for tilcdc patches. But I can send another for the panel patch to drm misc.
Quoted 7 lines
Quoted 3 lines
There is no direct dependency and I the dts patch can wait until the next release, just to be sure that there is no breakage.
Oh... I was hasty in replying. But yes can push the panel patch to drm-misc if you give me the rights. I guess you need my ssh public key (attached) for that.
You need a fd.o account, please follow the procedure here:
https://www.freedesktop.org/wiki/AccountRequests/
btw if we go this way there's also the question whether you want to maintain tilcdc in drm-misc, but that's up to you.
Cheers, Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel