drm/omap: panel-tpo-td028ttec1: add backlight support
Subsystems (5)
v2 cover drm/omap: panel-tpo-td028ttec1: add backlight support
This panel has a backlight, so add a property describing that and add the code to use that.
This makes things like xset dpms force off
also turn off the backlight, so we do not need to rely on additional userspace programs to do that.
Andreas Kemnade (2):
drm/omap: panel-tpo-td028ttec1: add backlight support
dt-bindings: panel: td028ttec1: add backlight property
.../devicetree/bindings/display/panel/tpo,td028ttec1.txt | 2 ++ drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c | 10 ++++++++++ 2 files changed, 12 insertions(+)
Signature · 1 line
2.11.0
PATCH v2 1/2 drm/omap: panel-tpo-td028ttec1: add backlight support
This panel has a backlight, so fetch it from devicetree using the corresponding property as documented in panel-common.txt. It is implemented the same way as in panel-dpi.c
This ensures the backlight is also disabled when the display is turned off like when doing xset dpms force off.
---
Changes in v2:
- do not reorder initialisation
- fix commit message
drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c +10 -0
@@ -35,6 +35,8 @@ struct panel_drv_data {struct videomode vm; +struct backlight_device *backlight; +struct spi_device *spi_dev; };
@@ -268,6 +270,8 @@ static int td028ttec1_panel_enable(struct omap_dss_device *dssdev) r |=jbt_ret_write_0 (ddata,JBT_REG_DISPLAY_ON ); +backlight_enable (ddata->backlight); + dssdev->state =OMAP_DSS_DISPLAY_ACTIVE ; transfer_err:
@@ -283,6 +287,8 @@ static void td028ttec1_panel_disable(struct omap_dss_device *dssdev)if (!omapdss_device_is_enabled (dssdev))return ; +backlight_disable (ddata->backlight); +dev_dbg (dssdev->dev,"td028ttec1_panel_disable()\n" );jbt_ret_write_0 (ddata,JBT_REG_DISPLAY_OFF );
@@ -334,6 +340,10 @@ static int td028ttec1_panel_probe(struct spi_device *spi)if (ddata ==NULL )return -ENOMEM ; + ddata->backlight =devm_of_find_backlight (&spi->dev); +if (IS_ERR (ddata->backlight)) +return PTR_ERR (ddata->backlight); +dev_set_drvdata (&spi->dev, ddata); ddata->spi_dev = spi;
Signature · 1 line
2.11.0
Hi Andreas,
Thank you for the patch.
Quoted 7 lines · Andreas Kemnade
This panel has a backlight, so fetch it from devicetree using the corresponding property as documented in panel-common.txt. It is implemented the same way as in
panel-dpi.c
This ensures the backlight is also disabled when the display is turned off like when doing xset dpms force off.Signed-off-by Andreas Kemnade <[email protected]>
Quoted 50 lines
---
Changes in v2:
- do not reorder initialisation
- fix commit messagedrivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c | 10 ++++++++++ 1 file changed, 10 insertions(+)drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c +10
-0@@ -35,6 +35,8 @@ struct panel_drv_data {struct videomode vm; +struct backlight_device *backlight; +struct spi_device *spi_dev; };@@ -268,6 +270,8 @@ static int td028ttec1_panel_enable(struct omap_dss_device *dssdev) r |=jbt_ret_write_0 (ddata,JBT_REG_DISPLAY_ON ); +backlight_enable (ddata->backlight); + dssdev->state =OMAP_DSS_DISPLAY_ACTIVE ; transfer_err:@@ -283,6 +287,8 @@ static void td028ttec1_panel_disable(struct omap_dss_device *dssdev)if (!omapdss_device_is_enabled (dssdev))return ; +backlight_disable (ddata->backlight); +dev_dbg (dssdev->dev,"td028ttec1_panel_disable()\n" );jbt_ret_write_0 (ddata,JBT_REG_DISPLAY_OFF );@@ -334,6 +340,10 @@ static int td028ttec1_panel_probe(struct spi_device *spi)if (ddata ==NULL )return -ENOMEM ; + ddata->backlight =devm_of_find_backlight (&spi->dev); +if (IS_ERR (ddata->backlight)) +return PTR_ERR (ddata->backlight); +dev_set_drvdata (&spi->dev, ddata); ddata->spi_dev = spi;
Signature · 3 lines
Regards, Laurent Pinchart
PATCH v2 2/2 dt-bindings: panel: td028ttec1: add backlight property
In reply to Andreas KemnadeThis adds an additional backlight property as described in panel-common.txt
--- Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt +2 -0
@@ -6,6 +6,7 @@ Required properties: Optional properties: - label: a symbolic name for the panel +- backlight: phandle of the backlight device Required nodes: - Video port for DPI input
@@ -21,6 +22,7 @@ lcd-panel: td028ttec1@0 { spi-cpha; label = "lcd"; + backlight = <&backlight>; port { lcd_in: endpoint { remote-endpoint = <&dpi_out>;
Signature · 1 line
2.11.0
Re: [PATCH v2 2/2] dt-bindings: panel: td028ttec1: add backlight property
Hi Andreas,
Thank you for the patch.
Quoted 4 lines · Andreas Kemnade
This adds an additional backlight property as described in panel-common.txt
Signed-off-by Andreas Kemnade <[email protected]>
Quoted 24 lines
--- Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt +2
-0@@ -6,6 +6,7 @@ Required properties: Optional properties: - label: a symbolic name for the panel +- backlight: phandle of the backlight device Required nodes: - Video port for DPI input@@ -21,6 +22,7 @@ lcd-panel: td028ttec1@0 { spi-cpha; label = "lcd"; + backlight = <&backlight>; port { lcd_in: endpoint { remote-endpoint = <&dpi_out>;
Signature · 7 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v2 2/2] dt-bindings: panel: td028ttec1: add backlight property
In reply to Andreas KemnadeQuoted 8 lines · Andreas Kemnade
This adds an additional backlight property as described in panel-common.txt
Signed-off-by Andreas Kemnade <[email protected]>--- Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt | 2 ++ 1 file changed, 2 insertions(+)
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · Andreas Kemnade
This panel has a backlight, so add a property describing that and add the code to use that.
This makes things like xset dpms force off
also turn off the backlight, so we do not need to rely on additional userspace programs to do that.
Quoted 8 lines
Andreas Kemnade (2):
drm/omap: panel-tpo-td028ttec1: add backlight support
dt-bindings: panel: td028ttec1: add backlight property.../devicetree/bindings/display/panel/tpo,td028ttec1.txt | 2 ++ drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c | 10 ++++++++++ 2 files changed, 12 insertions(+)
Thanks, I'll pick these up.
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
Hi,
Quoted 11 lines · On Fri, 8 Feb 2019 11:13:33 +0200 Tomi Valkeinen <[email protected]> wrote:
Quoted 10 lines · Andreas Kemnade
This panel has a backlight, so add a property describing that and add the code to use that.
This makes things like xset dpms force off
also turn off the backlight, so we do not need to rely on additional userspace programs to do that.Andreas Kemnade (2):
drm/omap: panel-tpo-td028ttec1: add backlight support
dt-bindings: panel: td028ttec1: add backlight property
Quoted 7 lines
Quoted 4 lines
.../devicetree/bindings/display/panel/tpo,td028ttec1.txt | 2 ++ drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c | 10 ++++++++++ 2 files changed, 12 insertions(+)Thanks, I'll pick these up.
hmm, that sounds like: patch accepted, will appear in linux-next soon. I have not seen it there, or is it just in some branch not merged into linux-next. Any new obstacles?
Regards,
Andreas
Quoted 21 lines · Andreas Kemnade
Hi,
Quoted 16 lines · On Fri, 8 Feb 2019 11:13:33 +0200 Tomi Valkeinen <[email protected]> wrote:
Quoted 14 lines · Andreas Kemnade
This panel has a backlight, so add a property describing that and add the code to use that.
This makes things like xset dpms force off
also turn off the backlight, so we do not need to rely on additional userspace programs to do that.Andreas Kemnade (2):
drm/omap: panel-tpo-td028ttec1: add backlight support
dt-bindings: panel: td028ttec1: add backlight property.../devicetree/bindings/display/panel/tpo,td028ttec1.txt | 2 ++ drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c | 10 ++++++++++ 2 files changed, 12 insertions(+)
Quoted 6 lines
Quoted 2 lines
Thanks, I'll pick these up.
hmm, that sounds like: patch accepted, will appear in linux-next soon. I have not seen it there, or is it just in some branch not merged into linux-next. Any new obstacles?
It's too late to get it to the next merge window, so I'll have to wait until the merge window is closed before I can send these to drm-next.
Tomi
Signature · 2 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki