* [PATCH v2 1/2] dt-bindings: etnaviv: add slave interface clock @ 2018-01-24 15:37 Lucas Stach [not found] ` <20180124153711.22049-1-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 2018-01-24 20:50 ` [PATCH v2 1/2] dt-bindings: etnaviv: add slave interface clock Rob Herring 0 siblings, 2 replies; 5+ messages in thread From: Lucas Stach @ 2018-01-24 15:37 UTC (permalink / raw) To: Rob Herring Cc: Mark Rutland, devicetree, etnaviv, dri-devel, patchwork-lst, kernel, Russell King Newer GPU cores added a new clock input, which allows to gate the slave (AHB) interface independently from other parts of the GPU. Add it to the supported clocks. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> --- v2: State when this clock is required. --- Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt b/Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt index 05176f1ae108..511b814543ba 100644 --- a/Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt +++ b/Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt @@ -32,7 +32,9 @@ Required properties: - clocks: should contain one clock for entry in clock-names see Documentation/devicetree/bindings/clock/clock-bindings.txt - clock-names: - - "bus": AXI/register clock + - "bus": AXI/master interface clock + - "reg": AHB/slave interface clock + (only required if GPU can gate slave interface independently) - "core": GPU core clock - "shader": Shader clock (only required if GPU has feature PIPE_3D) -- 2.15.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <20180124153711.22049-1-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>]
* [PATCH v2 2/2] drm/etnaviv: remove the need for a gpu-subsystem DT node [not found] ` <20180124153711.22049-1-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> @ 2018-01-24 15:37 ` Lucas Stach 2018-01-24 20:49 ` Rob Herring 0 siblings, 1 reply; 5+ messages in thread From: Lucas Stach @ 2018-01-24 15:37 UTC (permalink / raw) To: Rob Herring Cc: Russell King, Christian Gmeiner, Mark Rutland, etnaviv-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, devicetree-u79uwXL29TY76Z2rM5mHXA, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, patchwork-lst-bIcnvbaLZ9MEGnE8C9+IrQ The module autoloading can be triggered through the GPU core nodes and the necessary platform device for the DRM toplevel device will be instantiated on module init. Suggested-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Signed-off-by: Lucas Stach <l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> --- .../bindings/display/etnaviv/etnaviv-drm.txt | 20 ------------ drivers/gpu/drm/etnaviv/etnaviv_drv.c | 36 ++++++++++++---------- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 1 + 3 files changed, 20 insertions(+), 37 deletions(-) diff --git a/Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt b/Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt index 511b814543ba..8def11b16a24 100644 --- a/Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt +++ b/Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt @@ -1,23 +1,3 @@ -Etnaviv DRM master device -========================= - -The Etnaviv DRM master device is a virtual device needed to list all -Vivante GPU cores that comprise the GPU subsystem. - -Required properties: -- compatible: Should be one of - "fsl,imx-gpu-subsystem" - "marvell,dove-gpu-subsystem" -- cores: Should contain a list of phandles pointing to Vivante GPU devices - -example: - -gpu-subsystem { - compatible = "fsl,imx-gpu-subsystem"; - cores = <&gpu_2d>, <&gpu_3d>; -}; - - Vivante GPU core devices ======================== diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c index 491eddf9b150..665e62272a87 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c @@ -655,25 +655,21 @@ static int compare_str(struct device *dev, void *data) static int etnaviv_pdev_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct device_node *node = dev->of_node; struct component_match *match = NULL; dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)); - if (node) { + if (!dev->platform_data) { struct device_node *core_node; - int i; - for (i = 0; ; i++) { - core_node = of_parse_phandle(node, "cores", i); - if (!core_node) - break; + for_each_compatible_node(core_node, NULL, "vivante,gc") { + if (!of_device_is_available(core_node)) + continue; drm_of_component_match_add(&pdev->dev, &match, compare_of, core_node); - of_node_put(core_node); } - } else if (dev->platform_data) { + } else { char **names = dev->platform_data; unsigned i; @@ -691,25 +687,18 @@ static int etnaviv_pdev_remove(struct platform_device *pdev) return 0; } -static const struct of_device_id dt_match[] = { - { .compatible = "fsl,imx-gpu-subsystem" }, - { .compatible = "marvell,dove-gpu-subsystem" }, - {} -}; -MODULE_DEVICE_TABLE(of, dt_match); - static struct platform_driver etnaviv_platform_driver = { .probe = etnaviv_pdev_probe, .remove = etnaviv_pdev_remove, .driver = { .name = "etnaviv", - .of_match_table = dt_match, }, }; static int __init etnaviv_init(void) { int ret; + struct device_node *np; etnaviv_validate_init(); @@ -721,6 +710,19 @@ static int __init etnaviv_init(void) if (ret != 0) platform_driver_unregister(&etnaviv_gpu_driver); + /* + * If the DT contains at least one available GPU device, instantiate + * the DRM platform device. + */ + for_each_compatible_node(np, NULL, "vivante,gc") { + if (!of_device_is_available(np)) + continue; + + platform_device_register_simple("etnaviv", -1, NULL, 0); + of_node_put(np); + break; + } + return ret; } module_init(etnaviv_init); diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c index e19cbe05da2a..3f282d725935 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c @@ -1823,6 +1823,7 @@ static const struct of_device_id etnaviv_gpu_match[] = { }, { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, etnaviv_gpu_match); static int etnaviv_gpu_platform_probe(struct platform_device *pdev) { -- 2.15.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 2/2] drm/etnaviv: remove the need for a gpu-subsystem DT node 2018-01-24 15:37 ` [PATCH v2 2/2] drm/etnaviv: remove the need for a gpu-subsystem DT node Lucas Stach @ 2018-01-24 20:49 ` Rob Herring [not found] ` <CAL_JsqJYfX3ngPns4TcTbaCWQwwZQHq=VtvZ3KTpBNyVVMH-mQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Rob Herring @ 2018-01-24 20:49 UTC (permalink / raw) To: Lucas Stach Cc: Mark Rutland, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, etnaviv, dri-devel, patchwork-lst, Sascha Hauer, Russell King On Wed, Jan 24, 2018 at 9:37 AM, Lucas Stach <l.stach@pengutronix.de> wrote: > The module autoloading can be triggered through the GPU core nodes > and the necessary platform device for the DRM toplevel device will > be instantiated on module init. > > Suggested-by: Rob Herring <robh@kernel.org> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > --- > .../bindings/display/etnaviv/etnaviv-drm.txt | 20 ------------ > drivers/gpu/drm/etnaviv/etnaviv_drv.c | 36 ++++++++++++---------- > drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 1 + > 3 files changed, 20 insertions(+), 37 deletions(-) Reviewed-by: Rob Herring <robh@kernel.org> Are you going to update dts files to remove the node? Rob _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <CAL_JsqJYfX3ngPns4TcTbaCWQwwZQHq=VtvZ3KTpBNyVVMH-mQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH v2 2/2] drm/etnaviv: remove the need for a gpu-subsystem DT node [not found] ` <CAL_JsqJYfX3ngPns4TcTbaCWQwwZQHq=VtvZ3KTpBNyVVMH-mQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2018-01-25 9:43 ` Lucas Stach 0 siblings, 0 replies; 5+ messages in thread From: Lucas Stach @ 2018-01-25 9:43 UTC (permalink / raw) To: Rob Herring Cc: Russell King, Christian Gmeiner, Mark Rutland, etnaviv-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, dri-devel, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Sascha Hauer, patchwork-lst-bIcnvbaLZ9MEGnE8C9+IrQ Am Mittwoch, den 24.01.2018, 14:49 -0600 schrieb Rob Herring: > On Wed, Jan 24, 2018 at 9:37 AM, Lucas Stach <l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> > wrote: > > The module autoloading can be triggered through the GPU core nodes > > and the necessary platform device for the DRM toplevel device will > > be instantiated on module init. > > > > Suggested-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> > > Signed-off-by: Lucas Stach <l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> > > --- > > .../bindings/display/etnaviv/etnaviv-drm.txt | 20 ---------- > > -- > > drivers/gpu/drm/etnaviv/etnaviv_drv.c | 36 > > ++++++++++++---------- > > drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 1 + > > 3 files changed, 20 insertions(+), 37 deletions(-) > > Reviewed-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> > > Are you going to update dts files to remove the node? Sure. I'll send DT update patches for this once this patch has landed in my etnaviv/next tree. Regards, Lucas -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: etnaviv: add slave interface clock 2018-01-24 15:37 [PATCH v2 1/2] dt-bindings: etnaviv: add slave interface clock Lucas Stach [not found] ` <20180124153711.22049-1-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> @ 2018-01-24 20:50 ` Rob Herring 1 sibling, 0 replies; 5+ messages in thread From: Rob Herring @ 2018-01-24 20:50 UTC (permalink / raw) To: Lucas Stach Cc: Mark Rutland, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, etnaviv, dri-devel, patchwork-lst, Sascha Hauer, Russell King On Wed, Jan 24, 2018 at 9:37 AM, Lucas Stach <l.stach@pengutronix.de> wrote: > Newer GPU cores added a new clock input, which allows to gate the slave (AHB) > interface independently from other parts of the GPU. Add it to the supported > clocks. > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de> > --- > v2: State when this clock is required. > --- > Documentation/devicetree/bindings/display/etnaviv/etnaviv-drm.txt | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Reviewed-by: Rob Herring <robh@kernel.org> _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-01-25 9:43 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-01-24 15:37 [PATCH v2 1/2] dt-bindings: etnaviv: add slave interface clock Lucas Stach [not found] ` <20180124153711.22049-1-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> 2018-01-24 15:37 ` [PATCH v2 2/2] drm/etnaviv: remove the need for a gpu-subsystem DT node Lucas Stach 2018-01-24 20:49 ` Rob Herring [not found] ` <CAL_JsqJYfX3ngPns4TcTbaCWQwwZQHq=VtvZ3KTpBNyVVMH-mQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2018-01-25 9:43 ` Lucas Stach 2018-01-24 20:50 ` [PATCH v2 1/2] dt-bindings: etnaviv: add slave interface clock Rob Herring
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).