arm: omap: DMM DT adaptation
Subsystems (7)
cover arm: omap: DMM DT adaptation
The DMM/Tiler block can used by omapdrm to allocate frame buffers. With the removal of address and irq data from the omap4 hwmods, the probe of DMM driver fails and omapdrm isn't able to utilize the DMM hardware.
Add DMM bindings for omap4 and omap5. Also, make sure DRM device is built only when omapdss device is built. Currently, it can register itself even without the presence of omapdss device being built.
Archit Taneja (4):
arm: omap: display: Create omapdrm inside omap_display_init
ARM: dts: OMAP4+: Add DMM bindings
drm: omap: Enable DT support for DMM
arm: omap: display: Don't build device for DMM
Documentation/devicetree/bindings/arm/omap/dmm.txt | 17 ++++++ arch/arm/boot/dts/omap4.dtsi | 7 +++ arch/arm/boot/dts/omap5.dtsi | 7 +++ arch/arm/mach-omap2/Makefile | 4 -- arch/arm/mach-omap2/display.c | 43 ++++++++++++++ arch/arm/mach-omap2/drm.c | 67 ---------------------- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 11 ++++ 7 files changed, 85 insertions(+), 71 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/omap/dmm.txt delete mode 100644 arch/arm/mach-omap2/drm.c
Signature · 1 line
1.8.1.2
PATCH 1/4 arm: omap: display: Create omapdrm inside omap_display_init
Move omapdrm device creation inside the omap_display_init so that we can correctly create the device based on the presence of omapdss.
Originally worked on by Andy Gross.
--- arch/arm/mach-omap2/Makefile | 4 --- arch/arm/mach-omap2/display.c | 55 +++++++++++++++++++++++++++++++++++ arch/arm/mach-omap2/drm.c | 67 ------------------------------------------- 3 files changed, 55 insertions(+), 71 deletions(-) delete mode 100644 arch/arm/mach-omap2/drm.c
arch/arm/mach-omap2/Makefile +0 -4
@@ -229,10 +229,6 @@ endif # OMAP2420 MSDI controller integration support ("MMC") obj-$(CONFIG_SOC_OMAP2420) += msdi.o -ifneq ($(CONFIG_DRM_OMAP),) -obj-y += drm.o -endif - # Specific board support obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o
arch/arm/mach-omap2/display.c +55 -0
78 lines not on this page · raw message
arch/arm/mach-omap2/drm.c deleted +0 -67
67 lines not on this page · raw message
Signature · 1 line
1.8.1.2
A message that is not in the archive (sent off-list or not yet received): 1379063679-4869-2-git-send-email-archit-l0cyMroinI0@public.gmane.org
Re: [PATCH 1/4] arm: omap: display: Create omapdrm inside omap_display_init
Quoted 4 lines · Archit Taneja
Move omapdrm device creation inside the
omap_display_initso that we can correctly create the device based on the presence of omapdss.Originally worked on by Andy Gross.
If the dmm device is present in the DT data, there is no need to create the dmm device. It's created automatically.
Also, omapfb device is currently created the same way as omapdrm, independently of omapdss. Why is it a problem to have them like that?
Tomi
Re: [PATCH 1/4] arm: omap: display: Create omapdrm inside omap_display_init
Quoted 8 lines · Tomi Valkeinen
Quoted 4 lines · Archit Taneja
Move omapdrm device creation inside the
omap_display_initso that we can correctly create the device based on the presence of omapdss.Originally worked on by Andy Gross.
If the dmm device is present in the DT data, there is no need to create the dmm device. It's created automatically.
Yes, that is done in a later patch.
Quoted 3 lines
Also, omapfb device is currently created the same way as omapdrm, independently of omapdss. Why is it a problem to have them like that?
In a multiplatform config, we might have CONFIG_DRM_OMAP and CONFIG_DRM_OMAP_MODULE selected.
This would cause the call omap_init_drm() in arch/arm/mach-omap2/drm.c to occur. Creating a platform device for omapdrm is unnecessary here isn't it? Tying it with the initialisation of omapdss devices prevents it.
Archit
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 1/4] arm: omap: display: Create omapdrm inside omap_display_init
Quoted 10 lines · Archit Taneja
Quoted 8 lines · Tomi Valkeinen
Quoted 4 lines · Archit Taneja
Move omapdrm device creation inside the
omap_display_initso that we can correctly create the device based on the presence of omapdss.Originally worked on by Andy Gross.
If the dmm device is present in the DT data, there is no need to create the dmm device. It's created automatically.
Quoted 8 lines
Yes, that is done in a later patch.
Quoted 3 lines
Also, omapfb device is currently created the same way as omapdrm, independently of omapdss. Why is it a problem to have them like that?
In a multiplatform config, we might have
CONFIG_DRM_OMAPandCONFIG_DRM_OMAP_MODULEselected.
I meant these configs might be selected even if the image is booted on am3xx platform.
Archit
Quoted 5 lines
This would cause the call
omap_init_drm()inarch/arm/mach-omap2/drm.cto occur. Creating a platform device for omapdrm is unnecessary here isn't it? Tying it with the initialisation of omapdss devices prevents it.
Quoted 7 lines
Archit
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
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
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 1/4] arm: omap: display: Create omapdrm inside omap_display_init
Quoted 15 lines · Archit Taneja
Quoted 14 lines · Archit Taneja
Quoted 9 lines · Tomi Valkeinen
Quoted 5 lines · Archit Taneja
Move omapdrm device creation inside the
omap_display_initso that we can
correctly create the device based on the presence of omapdss.Originally worked on by Andy Gross.
If the dmm device is present in the DT data, there is no need to create the dmm device. It's created automatically.
Yes, that is done in a later patch.
Quoted 1 line
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Also, omapfb device is currently created the same way as omapdrm, independently of omapdss. Why is it a problem to have them like that?
In a multiplatform config, we might have
CONFIG_DRM_OMAPandCONFIG_DRM_OMAP_MODULEselected.I meant these configs might be selected even if the image is booted on am3xx platform.
Ah, I see. And the same omap_arch_initcall() is used for am3xxx also, even if the DSS (and thus DRM) doesn't exist in the HW.
We have the same problem with omapfb, so it'd be good to include that in the same series.
Hmm. If omap_generic_init() is called on am3xxx, it means we try to create the dss stuff there also. It should fail to the DSS version check, printing an error (at least I hope), but we really shouldn't even call the dss init code on am3xxx.
I wonder how this should be fixed...
Tomi
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 1/4] arm: omap: display: Create omapdrm inside omap_display_init
Quoted 31 lines · Tomi Valkeinen
Quoted 15 lines · Archit Taneja
Quoted 14 lines · Archit Taneja
Quoted 9 lines · Tomi Valkeinen
Quoted 5 lines · Archit Taneja
Move omapdrm device creation inside the
omap_display_initso that we can
correctly create the device based on the presence of omapdss.Originally worked on by Andy Gross.
If the dmm device is present in the DT data, there is no need to create the dmm device. It's created automatically.
Yes, that is done in a later patch.
Quoted 1 line
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Also, omapfb device is currently created the same way as omapdrm, independently of omapdss. Why is it a problem to have them like that?
In a multiplatform config, we might have
CONFIG_DRM_OMAPandCONFIG_DRM_OMAP_MODULEselected.I meant these configs might be selected even if the image is booted on am3xx platform.
Ah, I see. And the same
omap_arch_initcall()is used for am3xxx also, even if the DSS (and thus DRM) doesn't exist in the HW.We have the same problem with omapfb, so it'd be good to include that in the same series.
Quoted 6 lines
Hmm. If
omap_generic_init()is called on am3xxx, it means we try to create the dss stuff there also. It should fail to the DSS version check, printing an error (at least I hope), but we really shouldn't even call the dss init code on am3xxx.I wonder how this should be fixed...
The calls in omap_generic_init() check the machine type via of_machine_is_compatible(), even if it's a multiplatform image, the dtb should be only of one platform. So it wouldn't be called at all.
Archit
--
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
Re: [PATCH 1/4] arm: omap: display: Create omapdrm inside omap_display_init
Quoted 3 lines · Archit Taneja
The calls in
omap_generic_init()check the machine type viaof_machine_is_compatible(), even if it's a multiplatform image, the dtb should be only of one platform. So it wouldn't be called at all.
Hmm. BeagleBone is "ti,am33xx". The "Generic AM33XX (Flattened Device Tree)" machine definition uses omap_generic_init(). So if I'm not missing something here, omap_generic_init() is called for BeagleBone.
Tomi
Re: [PATCH 1/4] arm: omap: display: Create omapdrm inside omap_display_init
Quoted 9 lines · Tomi Valkeinen
Quoted 3 lines · Archit Taneja
The calls in
omap_generic_init()check the machine type viaof_machine_is_compatible(), even if it's a multiplatform image, the dtb should be only of one platform. So it wouldn't be called at all.Hmm. BeagleBone is "ti,am33xx". The "Generic AM33XX (Flattened Device Tree)" machine definition uses
omap_generic_init(). So if I'm not missing something here,omap_generic_init()is called for BeagleBone.
I was talking about the calls within omap_generic_init() :
omap_generic_init(void)
{
...
if (of_machine_is_compatible("ti,omap4-panda")) {
omap4_panda_display_init_of();
legacy_init_ehci_clk("auxclk3_ck");
}
}omap4_panda_display_init_of() would be called only if a panda board dtb was used. Are you talking about these display calls, or something else?
Archit
Re: [PATCH 1/4] arm: omap: display: Create omapdrm inside omap_display_init
Quoted 23 lines · Archit Taneja
Quoted 9 lines · Tomi Valkeinen
Quoted 3 lines · Archit Taneja
The calls in
omap_generic_init()check the machine type viaof_machine_is_compatible(), even if it's a multiplatform image, the dtb should be only of one platform. So it wouldn't be called at all.Hmm. BeagleBone is "ti,am33xx". The "Generic AM33XX (Flattened Device Tree)" machine definition uses
omap_generic_init(). So if I'm not missing something here,omap_generic_init()is called for BeagleBone.I was talking about the calls within
omap_generic_init():
omap_generic_init(void){ ... if (of_machine_is_compatible("ti,omap4-panda")) { omap4_panda_display_init_of(); legacy_init_ehci_clk("auxclk3_ck"); } }
Quoted 2 lines
omap4_panda_display_init_of()would be called only if a panda board dtb was used. Are you talking about these display calls, or something else?
Ah, right. I was looking at the DSS DT branch. There we have omapdss_init_of() call from omap_generic_init(). So that is a problem, but not in the mainline.
You're right, the current mainline doesn't call the DSS init function on am33xx. But it does create omapfb and omapdrm devices, as you noted.
Well, those devices don't do any actual harm, but I agree that they shouldn't be there. It's probably best to move the device creation into display.c, as you did. Just include omapfb also, and maybe remove the DMM creation as a first patch.
Tomi
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 1/4] arm: omap: display: Create omapdrm inside omap_display_init
Quoted 31 lines · Tomi Valkeinen
Quoted 23 lines · Archit Taneja
Quoted 9 lines · Tomi Valkeinen
Quoted 3 lines · Archit Taneja
The calls in
omap_generic_init()check the machine type viaof_machine_is_compatible(), even if it's a multiplatform image, the dtb should be only of one platform. So it wouldn't be called at all.Hmm. BeagleBone is "ti,am33xx". The "Generic AM33XX (Flattened Device Tree)" machine definition uses
omap_generic_init(). So if I'm not missing something here,omap_generic_init()is called for BeagleBone.I was talking about the calls within
omap_generic_init():
omap_generic_init(void){ ... if (of_machine_is_compatible("ti,omap4-panda")) { omap4_panda_display_init_of(); legacy_init_ehci_clk("auxclk3_ck"); } }Quoted 2 lines
omap4_panda_display_init_of()would be called only if a panda board dtb was used. Are you talking about these display calls, or something else?Ah, right. I was looking at the DSS DT branch. There we have
omapdss_init_of()call fromomap_generic_init(). So that is a problem, but not in the mainline.
Quoted 7 lines
You're right, the current mainline doesn't call the DSS init function on am33xx. But it does create omapfb and omapdrm devices, as you noted.
Well, those devices don't do any actual harm, but I agree that they shouldn't be there. It's probably best to move the device creation into
display.c, as you did. Just include omapfb also, and maybe remove the DMM creation as a first patch.
Sure, I'll do that.
I'm not sure either about how to deal with the direct call to omapdss_init_of().
Archit
--
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
Re: [PATCH 1/4] arm: omap: display: Create omapdrm inside omap_display_init
In reply to a message not in the archiveQuoted 9 lines · Archit Taneja
Quoted 2 lines
Also, omapfb device is currently created the same way as omapdrm, independently of omapdss. Why is it a problem to have them like that?
In a multiplatform config, we might have
CONFIG_DRM_OMAPandCONFIG_DRM_OMAP_MODULEselected.This would cause the call
omap_init_drm()inarch/arm/mach-omap2/drm.cto occur. Creating a platform device for omapdrm is unnecessary here isn't it? Tying it with the initialisation of omapdss devices prevents it.
Well, omapdrm depends on omapdss in Kconfig. So if you have DRM enabled, you also have DSS enabled.
Tomi
A message that is not in the archive (sent off-list or not yet received): 1379063679-4869-1-git-send-email-archit-l0cyMroinI0@public.gmane.org
PATCH 2/4 ARM: dts: OMAP4+: Add DMM bindings
Add Dynamic Memory Manager (DMM) bindings for OMAP4 and OMAP5 devices. DMM only requires address and irq information.
Add documentation for the DMM bindings.
Originally worked on by Andy Gross.
--- Documentation/devicetree/bindings/arm/omap/dmm.txt | 17 +++++++++++++++++ arch/arm/boot/dts/omap4.dtsi | 7 +++++++ arch/arm/boot/dts/omap5.dtsi | 7 +++++++ 3 files changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/omap/dmm.txt
Documentation/devicetree/bindings/arm/omap/dmm.txt new file +17 -0
@@ -0,0 +1,17 @@ +OMAP Dynamic Memory Manager (DMM) bindings + +Required properties: +- compatible: Must be "ti,omap4-dmm" for OMAP4 family + Must be "ti,omap5-dmm" for OMAP5 family +- reg: Contains timer register address range (base address and length) +- interrupts: Contains interrupt information (source, etc) for the DMM IRQ +- ti,hwmods: Name of the hwmod associated to the counter, which is typically + "dmm" + +Example: + +dmm: dmm@4e000000 { + compatible = "ti,omap4-dmm"; + reg = <0x4e000000 0x800>; + ti,hwmods = "dmm"; +};
arch/arm/boot/dts/omap4.dtsi +7 -0
@@ -487,6 +487,13 @@ ti,hwmods = "kbd"; }; + dmm: dmm@4e000000 { + compatible = "ti,omap4-dmm"; + reg = <0x4e000000 0x800>; + interrupts = <0 113 0x4>; + ti,hwmods = "dmm"; + }; + emif1: emif@4c000000 { compatible = "ti,emif-4d"; reg = <0x4c000000 0x100>;
arch/arm/boot/dts/omap5.dtsi +7 -0
@@ -604,6 +604,13 @@ ti,hwmods = "wd_timer2"; }; + dmm: dmm@4e000000 { + compatible = "ti,omap5-dmm"; + reg = <0x4e000000 0x800>; + interrupts = <0 113 0x4>; + ti,hwmods = "dmm"; + }; + emif1: emif@0x4c000000 { compatible = "ti,emif-4d5"; ti,hwmods = "emif1";
Signature · 6 lines
1.8.1.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
PATCH 3/4 drm: omap: Enable DT support for DMM
In reply to a message not in the archiveEnable use of DT for DMM/Tiler.
Originally worked on by Andy Gross.
--- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +11 -0
@@ -968,12 +968,23 @@ static const struct dev_pm_ops omap_dmm_pm_ops = { };#endif +#if defined(CONFIG_OF ) +static const struct of_device_id dmm_of_match[] = { + { .compatible ="ti,omap4-dmm" , }, + { .compatible ="ti,omap5-dmm" , }, + {}, +}; +#else +#define dmm_of_match NULL +#endif +struct platform_driver omap_dmm_driver = { .probe = omap_dmm_probe, .remove = omap_dmm_remove, .driver = { .owner =THIS_MODULE , .name =DMM_DRIVER_NAME , + .of_match_table = dmm_of_match, #ifdef CONFIG_PM .pm = &omap_dmm_pm_ops, #endif
Signature · 6 lines
1.8.1.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
A message that is not in the archive (sent off-list or not yet received): 1379063679-4869-4-git-send-email-archit-l0cyMroinI0@public.gmane.org
Re: [PATCH 3/4] drm: omap: Enable DT support for DMM
Quoted 3 lines · Archit Taneja
Enable use of DT for DMM/Tiler.
Originally worked on by Andy Gross.
looks good.. but do we want to get information about # of LUT's, etc, from DT? Or did we decide that we can reliably get this from the hw? I lost track of that discussion (I guess Andy would remember)..
BR,
-R
Quoted 36 lines
Cc Andy Gross <[email protected]>Cc DRI Development <[email protected]>Signed-off-by Archit Taneja <[email protected]>--- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +11
-1@@ -968,12 +968,23 @@ static const struct dev_pm_ops omap_dmm_pm_ops = { };#endif +#if defined(CONFIG_OF ) +static const struct of_device_id dmm_of_match[] = { + { .compatible ="ti,omap4-dmm" , }, + { .compatible ="ti,omap5-dmm" , }, + {}, +}; +#else +#define dmm_of_match NULL +#endif +struct platform_driver omap_dmm_driver = { .probe = omap_dmm_probe, .remove = omap_dmm_remove, .driver = { .owner =THIS_MODULE , .name =DMM_DRIVER_NAME , + .of_match_table = dmm_of_match, #ifdef CONFIG_PM .pm = &omap_dmm_pm_ops, #endif --
Quoted 2 lines
1.8.1.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
A message that is not in the archive (sent off-list or not yet received): CAF6AEGu7eRFhrQZUD-43AOHNQtRWeyxYga1dnir=qUo1mQ9ebA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Re: [PATCH 3/4] drm: omap: Enable DT support for DMM
Quoted 8 lines · Rob Clark
Quoted 3 lines · Archit Taneja
Enable use of DT for DMM/Tiler.
Originally worked on by Andy Gross.
looks good.. but do we want to get information about # of LUT's, etc, from DT? Or did we decide that we can reliably get this from the hw? I lost track of that discussion (I guess Andy would remember)..
I am not aware of the discussion either. But looks like we get the LUT info from the HW registers in omap_dmm_probe:
hwinfo = readl(omap_dmm->base + DMM_PAT_HWINFO);
omap_dmm->num_engines = (hwinfo >> 24) & 0x1F;
omap_dmm->num_lut = (hwinfo >> 16) & 0x1F;
omap_dmm->container_width = 256;
omap_dmm->container_height = 128;
atomic_set(&omap_dmm->engine_counter, omap_dmm->num_engines);
/* read out actual LUT width and height */
pat_geom = readl(omap_dmm->base + DMM_PAT_GEOMETRY);
omap_dmm->lut_width = ((pat_geom >> 16) & 0xF) << 5;
omap_dmm->lut_height = ((pat_geom >> 24) & 0xF) << 5;
/* increment LUT by one if on OMAP5 */
/* LUT has twice the height, and is split into a separate
container */
if (omap_dmm->lut_height != omap_dmm->container_height)
omap_dmm->num_lut++;Archit
--
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
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH 3/4] drm: omap: Enable DT support for DMM
Quoted 9 lines · Archit Taneja
Quoted 8 lines · Rob Clark
Quoted 4 lines · Archit Taneja
Enable use of DT for DMM/Tiler.
Originally worked on by Andy Gross.
Quoted 7 lines
Quoted 3 lines
looks good.. but do we want to get information about # of LUT's, etc, from DT? Or did we decide that we can reliably get this from the hw? I lost track of that discussion (I guess Andy would remember)..
I am not aware of the discussion either. But looks like we get the LUT info from the HW registers in
omap_dmm_probe:
right.. I'm possibly mis-remembering, but I thought I remember Andy worried that this was not reliable for some reason or another, but I can't really remember the details. The issue may have only been related to a pre-Si simulation environment, so it could be nothing.
I suppose if it becomes an issue in the future we could always add DT bindings to override what we would read from the hw, so I guess if this works on all the current devices, maybe it isn't worth worrying about right now.
BR,
-R
Quoted 20 lines
hwinfo = readl(omap_dmm->base + DMM_PAT_HWINFO);
omap_dmm->num_engines = (hwinfo >> 24) & 0x1F;
omap_dmm->num_lut = (hwinfo >> 16) & 0x1F;
omap_dmm->container_width = 256;
omap_dmm->container_height = 128;
atomic_set(&omap_dmm->engine_counter, omap_dmm->num_engines);
/* read out actual LUT width and height */
pat_geom = readl(omap_dmm->base + DMM_PAT_GEOMETRY);
omap_dmm->lut_width = ((pat_geom >> 16) & 0xF) << 5;
omap_dmm->lut_height = ((pat_geom >> 24) & 0xF) << 5;
/* increment LUT by one if on OMAP5 */
/* LUT has twice the height, and is split into a separate container
*/
if (omap_dmm->lut_height != omap_dmm->container_height)
omap_dmm->num_lut++;Quoted 1 line
Archit
--
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
PATCH 4/4 arm: omap: display: Don't build device for DMM
In reply to a message not in the archiveDMM exists on omap4+ platforms, these platforms will always boot with DT. Remove the previous method of searching the dmm hwmod and building the device by ourselves. Addition of a DMM nodes in DT will ensure a DMM device is built.
For OMAP4, the address and irq data for most hwmods were removed, so the older method doesn't work anyway.
--- arch/arm/mach-omap2/display.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-)
arch/arm/mach-omap2/display.c +2 -14
@@ -126,20 +126,8 @@ static int __init omapdrm_init(void) {int r =0 ; -/* create DRM and DMM device */ +/* create DRM device(DMM device created via DT) */ if (omap_drm_device !=NULL ) { -struct omap_hwmod *oh =NULL ; -struct platform_device *pdev; - -/* lookup and populate the DMM information, if present - OMAP4+ */ - oh =omap_hwmod_lookup ("dmm" ); -if (oh) { - pdev =omap_device_build (oh->name,-1 , oh,NULL ,0 ); -WARN (IS_ERR (pdev), -"Could not build omap_device for %s\n" , - oh->name); - } - platform_drm_data.omaprev =GET_OMAP_TYPE ; r =platform_device_register (omap_drm_device);
@@ -464,7 +452,7 @@ int __init omap_display_init(struct omap_dss_board_info *board_data) } } -/* create DRM and DMM device */ +/* create DRM device */ r =omapdrm_init ();if (r <0 ) {pr_err ("Unable to register omapdrm device\n" );
Signature · 6 lines
1.8.1.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
A message that is not in the archive (sent off-list or not yet received): 1379063679-4869-5-git-send-email-archit-l0cyMroinI0@public.gmane.org
Re: [PATCH 4/4] arm: omap: display: Don't build device for DMM
Quoted 27 lines · Archit Taneja
DMM exists on omap4+ platforms, these platforms will always boot with DT. Remove the previous method of searching the dmm hwmod and building the device by ourselves. Addition of a DMM nodes in DT will ensure a DMM device is built.
For OMAP4, the address and irq data for most hwmods were removed, so the older method doesn't work anyway.
Cc Andy Gross <[email protected]>Signed-off-by Archit Taneja <[email protected]>--- arch/arm/mach-omap2/display.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-)arch/arm/mach-omap2/display.c +1
-4@@ -126,20 +126,8 @@ static int __init omapdrm_init(void) {int r =0 ; -/* create DRM and DMM device */ +/* create DRM device(DMM device created via DT) */ if (omap_drm_device !=NULL ) { -struct omap_hwmod *oh =NULL ; -struct platform_device *pdev; -
arch/arm/mach-omap2/display.c static int __init omapdrm_init(void) · line 131
Quoted 10 lines
arch/arm/mach-omap2/display.c +0
-9-/* lookup and populate the DMM information, if present - OMAP4+ */ - oh =omap_hwmod_lookup ("dmm" ); -if (oh) { - pdev =omap_device_build (oh->name,-1 , oh,NULL ,0 ); -WARN (IS_ERR (pdev), -"Could not build omap_device for %s\n" , - oh->name); - } - platform_drm_data.omaprev =GET_OMAP_TYPE ;
Ok, so you remove the DMM device creation here. Why not do this as a first patch, before moving the DMM/DRM code?
Tomi
v2 cover DMM DT adaptation
In reply to a message not in the archiveThe DMM/Tiler block can used by omapdrm to allocate frame buffers. With the removal of address and irq data from the omap4 hwmods, the probe of DMM driver fails and omapdrm isn't able to utilize the DMM hardware.
Add DMM bindings for omap4 and omap5.
Changes in v2:
- No changes, split out into a separate series containing only DT related parts.
Archit Taneja (2):
arm: dts: omap4+: Add DMM bindings
drm: omap: Enable DT support for DMM
Documentation/devicetree/bindings/arm/omap/dmm.txt | 17 +++++++++++++++++ arch/arm/boot/dts/omap4.dtsi | 7 +++++++ arch/arm/boot/dts/omap5.dtsi | 7 +++++++ drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 11 +++++++++++ 4 files changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/omap/dmm.txt
Signature · 6 lines
1.8.1.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
PATCH v2 1/2 arm: dts: omap4+: Add DMM bindings
Add Dynamic Memory Manager (DMM) bindings for OMAP4 and OMAP5 devices. DMM only requires address and irq information.
Add documentation for the DMM bindings.
Originally worked on by Andy Gross.
--- Documentation/devicetree/bindings/arm/omap/dmm.txt | 17 +++++++++++++++++ arch/arm/boot/dts/omap4.dtsi | 7 +++++++ arch/arm/boot/dts/omap5.dtsi | 7 +++++++ 3 files changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/omap/dmm.txt
Documentation/devicetree/bindings/arm/omap/dmm.txt new file +17 -0
@@ -0,0 +1,17 @@ +OMAP Dynamic Memory Manager (DMM) bindings + +Required properties: +- compatible: Must be "ti,omap4-dmm" for OMAP4 family + Must be "ti,omap5-dmm" for OMAP5 family +- reg: Contains timer register address range (base address and length) +- interrupts: Contains interrupt information (source, etc) for the DMM IRQ +- ti,hwmods: Name of the hwmod associated to the counter, which is typically + "dmm" + +Example: + +dmm: dmm@4e000000 { + compatible = "ti,omap4-dmm"; + reg = <0x4e000000 0x800>; + ti,hwmods = "dmm"; +};
arch/arm/boot/dts/omap4.dtsi +7 -0
@@ -487,6 +487,13 @@ ti,hwmods = "kbd"; }; + dmm: dmm@4e000000 { + compatible = "ti,omap4-dmm"; + reg = <0x4e000000 0x800>; + interrupts = <0 113 0x4>; + ti,hwmods = "dmm"; + }; + emif1: emif@4c000000 { compatible = "ti,emif-4d"; reg = <0x4c000000 0x100>;
arch/arm/boot/dts/omap5.dtsi +7 -0
@@ -604,6 +604,13 @@ ti,hwmods = "wd_timer2"; }; + dmm: dmm@4e000000 { + compatible = "ti,omap5-dmm"; + reg = <0x4e000000 0x800>; + interrupts = <0 113 0x4>; + ti,hwmods = "dmm"; + }; + emif1: emif@0x4c000000 { compatible = "ti,emif-4d5"; ti,hwmods = "emif1";
Signature · 1 line
1.8.1.2
Re: [PATCH v2 1/2] arm: dts: omap4+: Add DMM bindings
Quoted 22 lines · Archit Taneja
Add Dynamic Memory Manager (DMM) bindings for OMAP4 and OMAP5 devices. DMM only requires address and irq information.
Add documentation for the DMM bindings.
Originally worked on by Andy Gross.
Cc Andy Gross <[email protected]>Signed-off-by Archit Taneja <[email protected]>--- Documentation/devicetree/bindings/arm/omap/dmm.txt | 17 +++++++++++++++++ arch/arm/boot/dts/omap4.dtsi | 7 +++++++ arch/arm/boot/dts/omap5.dtsi | 7 +++++++ 3 files changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/omap/dmm.txtDocumentation/devicetree/bindings/arm/omap/dmm.txt new file +0
-0
Documentation/devicetree/bindings/arm/omap/dmm.txt line 6
Quoted 6 lines
Documentation/devicetree/bindings/arm/omap/dmm.txt new file +6
-0@@ -0,0 +1,17 @@ +OMAP Dynamic Memory Manager (DMM) bindings + +Required properties: +- compatible: Must be "ti,omap4-dmm" for OMAP4 family + Must be "ti,omap5-dmm" for OMAP5 family +- reg: Contains timer register address range (base address and length)
"timer"?
Documentation/devicetree/bindings/arm/omap/dmm.txt line 9
Quoted 3 lines
Documentation/devicetree/bindings/arm/omap/dmm.txt new file +3
-0+- interrupts: Contains interrupt information (source, etc) for the DMM IRQ +- ti,hwmods: Name of the hwmod associated to the counter, which is typically + "dmm"
"associated to the counter"?
Quoted 13 lines
Documentation/devicetree/bindings/arm/omap/dmm.txt new file +8
-0+ +Example: + +dmm: dmm@4e000000 { + compatible = "ti,omap4-dmm"; + reg = <0x4e000000 0x800>; + ti,hwmods = "dmm"; +};arch/arm/boot/dts/omap4.dtsi +0
-0
arch/arm/boot/dts/omap4.dtsi line 490
Quoted 4 lines
arch/arm/boot/dts/omap4.dtsi +1
-0@@ -487,6 +487,13 @@ ti,hwmods = "kbd"; }; + dmm: dmm@4e000000 {
I don't think anyone refers to this node, so there shouldn't be any need for the "dmm: " alias.
Quoted 14 lines
arch/arm/boot/dts/omap4.dtsi +6
-0+ compatible = "ti,omap4-dmm"; + reg = <0x4e000000 0x800>; + interrupts = <0 113 0x4>; + ti,hwmods = "dmm"; + }; + emif1: emif@4c000000 { compatible = "ti,emif-4d"; reg = <0x4c000000 0x100>;arch/arm/boot/dts/omap5.dtsi +0
-0
arch/arm/boot/dts/omap5.dtsi line 607
Quoted 4 lines
arch/arm/boot/dts/omap5.dtsi +1
-0@@ -604,6 +604,13 @@ ti,hwmods = "wd_timer2"; }; + dmm: dmm@4e000000 {
Same here.
Quoted 10 lines
arch/arm/boot/dts/omap5.dtsi +6
-0+ compatible = "ti,omap5-dmm"; + reg = <0x4e000000 0x800>; + interrupts = <0 113 0x4>; + ti,hwmods = "dmm"; + }; + emif1: emif@0x4c000000 { compatible = "ti,emif-4d5"; ti,hwmods = "emif1";
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [PATCH v2 1/2] arm: dts: omap4+: Add DMM bindings
Quoted 32 lines · Tomi Valkeinen
Quoted 22 lines · Archit Taneja
Add Dynamic Memory Manager (DMM) bindings for OMAP4 and OMAP5 devices. DMM only requires address and irq information.
Add documentation for the DMM bindings.
Originally worked on by Andy Gross.
Cc Andy Gross <[email protected]>Signed-off-by Archit Taneja <[email protected]>--- Documentation/devicetree/bindings/arm/omap/dmm.txt | 17 +++++++++++++++++ arch/arm/boot/dts/omap4.dtsi | 7 +++++++ arch/arm/boot/dts/omap5.dtsi | 7 +++++++ 3 files changed, 31 insertions(+)create mode 100644
Documentation/devicetree/bindings/arm/omap/dmm.txtDocumentation/devicetree/bindings/arm/omap/dmm.txt new file +0
-0Documentation/devicetree/bindings/arm/omap/dmm.txt line 6
Quoted 6 lines
Documentation/devicetree/bindings/arm/omap/dmm.txt new file +6
-0@@ -0,0 +1,17 @@ +OMAP Dynamic Memory Manager (DMM) bindings + +Required properties: +- compatible: Must be "ti,omap4-dmm" for OMAP4 family + Must be "ti,omap5-dmm" for OMAP5 family +- reg: Contains timer register address range (base address and length)"timer"?
Quoted 5 lines
Documentation/devicetree/bindings/arm/omap/dmm.txt line 9
Quoted 3 lines
Documentation/devicetree/bindings/arm/omap/dmm.txt new file +3
-0+- interrupts: Contains interrupt information (source, etc) for the DMM IRQ +- ti,hwmods: Name of the hwmod associated to the counter, which is typically + "dmm""associated to the counter"?
Seem like copy paste errors, will fix them.
Quoted 17 lines
Quoted 17 lines
Documentation/devicetree/bindings/arm/omap/dmm.txt new file +8
-0+ +Example: + +dmm: dmm@4e000000 { + compatible = "ti,omap4-dmm"; + reg = <0x4e000000 0x800>; + ti,hwmods = "dmm"; +};arch/arm/boot/dts/omap4.dtsi +0
-0@@ -487,6 +487,13 @@ ti,hwmods = "kbd"; };
Quoted 4 lines
arch/arm/boot/dts/omap4.dtsi line 490
Quoted 1 line
arch/arm/boot/dts/omap4.dtsi +1
-0+ dmm: dmm@4e000000 {I don't think anyone refers to this node, so there shouldn't be any need for the "dmm: " alias.
Yes, it won't be used. Will remove them.
Thanks,
Archit
--
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
PATCH v2 2/2 drm: omap: Enable DT support for DMM
In reply to Archit TanejaEnable use of DT for DMM/Tiler.
Originally worked on by Andy Gross.
--- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +11 -0
@@ -968,12 +968,23 @@ static const struct dev_pm_ops omap_dmm_pm_ops = { };#endif +#if defined(CONFIG_OF ) +static const struct of_device_id dmm_of_match[] = { + { .compatible ="ti,omap4-dmm" , }, + { .compatible ="ti,omap5-dmm" , }, + {}, +}; +#else +#define dmm_of_match NULL +#endif +struct platform_driver omap_dmm_driver = { .probe = omap_dmm_probe, .remove = omap_dmm_remove, .driver = { .owner =THIS_MODULE , .name =DMM_DRIVER_NAME , + .of_match_table = dmm_of_match, #ifdef CONFIG_PM .pm = &omap_dmm_pm_ops, #endif
Signature · 1 line
1.8.1.2
A message that is not in the archive (sent off-list or not yet received): 1379323815-14130-1-git-send-email-archit-l0cyMroinI0@public.gmane.org
Tomi Valkeinen
Acked-byRe: [PATCH v2 0/2] DMM DT adaptation
Quoted 4 lines · Archit Taneja
The DMM/Tiler block can used by omapdrm to allocate frame buffers. With the removal of address and irq data from the omap4 hwmods, the probe of DMM driver fails and omapdrm isn't able to utilize the DMM hardware.
Quoted 8 lines
Add DMM bindings for omap4 and omap5.
Changes in v2:
- No changes, split out into a separate series containing only DT related parts.Archit Taneja (2):
arm: dts: omap4+: Add DMM bindings
drm: omap: Enable DT support for DMM
This is not an objection as such, but I just want to point out that DMM is part of the memory subsystem, and Tiler is part of DMM. So it's not linked to the display subsystem in any way. And with a quick glance to the TRM, DMM manages _all_ accesses to system memory.
In that sense, having a "DMM" driver as part of omapdrm is quite wrong. If it was just a "Tiler" driver, it'd be better, but still wrong.
That said, if I remember right I brought this point up long ago, and it was pointed out that only the Tiler part of DMM is configured at runtime, and more or less all the registers of DMM are about Tiler. And only omapdrm uses the Tiler. Thus it was deemed ok to have the DMM driver in omapdrm.
I'd still rather have tiler as a separate driver, but that's a separate issue from this series.
So, after fixing the issues I pointed in the other mail:
Tomi
v3 cover DMM DT adaptation
In reply to Archit TanejaThe DMM/Tiler block can used by omapdrm to allocate frame buffers. With the removal of address and irq data from the omap4 hwmods, the probe of DMM driver fails and omapdrm isn't able to utilize the DMM hardware.
Add DMM bindings for omap4 and omap5.
Changes in v3:
- Fix mistakes in documentation and remove aliases for dmm nodes.
Changes in v2:
- No changes, split out into a separate series containing only DT related parts.
Archit Taneja (2):
arm: dts: omap4+: Add DMM bindings
drm: omap: Enable DT support for DMM
Documentation/devicetree/bindings/arm/omap/dmm.txt | 16 ++++++++++++++++ arch/arm/boot/dts/omap4.dtsi | 7 +++++++ arch/arm/boot/dts/omap5.dtsi | 7 +++++++ drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 11 +++++++++++ 4 files changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/omap/dmm.txt
Signature · 1 line
1.8.1.2
PATCH v3 1/2 arm: dts: omap4+: Add DMM bindings
Add Dynamic Memory Manager (DMM) bindings for OMAP4 and OMAP5 devices. DMM only requires address and irq information.
Add documentation for the DMM bindings.
Originally worked on by Andy Gross <[email protected]>
--- Documentation/devicetree/bindings/arm/omap/dmm.txt | 16 ++++++++++++++++ arch/arm/boot/dts/omap4.dtsi | 7 +++++++ arch/arm/boot/dts/omap5.dtsi | 7 +++++++ 3 files changed, 30 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/omap/dmm.txt
Documentation/devicetree/bindings/arm/omap/dmm.txt new file +16 -0
@@ -0,0 +1,16 @@ +OMAP Dynamic Memory Manager (DMM) bindings + +Required properties: +- compatible: Must be "ti,omap4-dmm" for OMAP4 family + Must be "ti,omap5-dmm" for OMAP5 and DRA7x family +- reg: Contains timer register address range (base address and length) +- interrupts: Contains interrupt information (source, etc) for the DMM IRQ +- ti,hwmods: Name of the hwmod associated to DMM, which is typically "dmm" + +Example: + +dmm@4e000000 { + compatible = "ti,omap4-dmm"; + reg = <0x4e000000 0x800>; + ti,hwmods = "dmm"; +};
arch/arm/boot/dts/omap4.dtsi +7 -0
@@ -487,6 +487,13 @@ ti,hwmods = "kbd"; }; + dmm@4e000000 { + compatible = "ti,omap4-dmm"; + reg = <0x4e000000 0x800>; + interrupts = <0 113 0x4>; + ti,hwmods = "dmm"; + }; + emif1: emif@4c000000 { compatible = "ti,emif-4d"; reg = <0x4c000000 0x100>;
arch/arm/boot/dts/omap5.dtsi +7 -0
@@ -604,6 +604,13 @@ ti,hwmods = "wd_timer2"; }; + dmm@4e000000 { + compatible = "ti,omap5-dmm"; + reg = <0x4e000000 0x800>; + interrupts = <0 113 0x4>; + ti,hwmods = "dmm"; + }; + emif1: emif@0x4c000000 { compatible = "ti,emif-4d5"; ti,hwmods = "emif1";
Signature · 1 line
1.8.1.2
Re: [PATCH v3 1/2] arm: dts: omap4+: Add DMM bindings
Quoted 22 lines · Archit Taneja
Add Dynamic Memory Manager (DMM) bindings for OMAP4 and OMAP5 devices. DMM only requires address and irq information.
Add documentation for the DMM bindings.
Originally worked on by Andy Gross <[email protected]>
Cc Andy Gross <[email protected]>Signed-off-by Archit Taneja <[email protected]>--- Documentation/devicetree/bindings/arm/omap/dmm.txt | 16 ++++++++++++++++ arch/arm/boot/dts/omap4.dtsi | 7 +++++++ arch/arm/boot/dts/omap5.dtsi | 7 +++++++ 3 files changed, 30 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/omap/dmm.txtDocumentation/devicetree/bindings/arm/omap/dmm.txt new file +0
-0
Documentation/devicetree/bindings/arm/omap/dmm.txt line 1
Quoted 1 line
Documentation/devicetree/bindings/arm/omap/dmm.txt new file +1
-0@@ -0,0 +1,16 @@ +OMAP Dynamic Memory Manager (DMM) bindings
Is there any documentation? A brief description of what this is would be nice.
Documentation/devicetree/bindings/arm/omap/dmm.txt line 5
Quoted 4 lines
Documentation/devicetree/bindings/arm/omap/dmm.txt new file +4
-0+ +Required properties: +- compatible: Must be "ti,omap4-dmm" for OMAP4 family + Must be "ti,omap5-dmm" for OMAP5 and DRA7x family
s/must be/should contain/
Documentation/devicetree/bindings/arm/omap/dmm.txt line 6
Quoted 1 line
Documentation/devicetree/bindings/arm/omap/dmm.txt new file +1
-0+- reg: Contains timer register address range (base address and length)
Huh? What's a timer got to do with the DMM?
Documentation/devicetree/bindings/arm/omap/dmm.txt line 7
Quoted 1 line
Documentation/devicetree/bindings/arm/omap/dmm.txt new file +1
-0+- interrupts: Contains interrupt information (source, etc) for the DMM IRQ
Is there a single interrupt? If so:
- interrupts: Should contain an interrupt-specifier for the DMM IRQ.
Assuming the "DMM IRQ" is well defined. If there's a name for it in documentation, using that's preferable. If a future revision may have multiple interrupts, please use interrupt-names now to save us endless pain in future.
Cheers,
Mark.
Re: [PATCH v3 1/2] arm: dts: omap4+: Add DMM bindings
Hi,
Quoted 17 lines · Mark Rutland
Quoted 16 lines · Archit Taneja
Add Dynamic Memory Manager (DMM) bindings for OMAP4 and OMAP5 devices. DMM only requires address and irq information.
Add documentation for the DMM bindings.
Originally worked on by Andy Gross <[email protected]>
Cc Andy Gross <[email protected]>Signed-off-by Archit Taneja <[email protected]>--- Documentation/devicetree/bindings/arm/omap/dmm.txt | 16 ++++++++++++++++ arch/arm/boot/dts/omap4.dtsi | 7 +++++++ arch/arm/boot/dts/omap5.dtsi | 7 +++++++ 3 files changed, 30 insertions(+)create mode 100644
Documentation/devicetree/bindings/arm/omap/dmm.txt
Quoted 10 lines
Documentation/devicetree/bindings/arm/omap/dmm.txt line 1
Quoted 7 lines
Documentation/devicetree/bindings/arm/omap/dmm.txt new file +1
-0@@ -0,0 +1,16 @@ +OMAP Dynamic Memory Manager (DMM) bindingsIs there any documentation? A brief description of what this is would be nice.
I'll do that.
Quoted 11 lines
Documentation/devicetree/bindings/arm/omap/dmm.txt line 5
Quoted 5 lines
Documentation/devicetree/bindings/arm/omap/dmm.txt new file +4
-0+ +Required properties: +- compatible: Must be "ti,omap4-dmm" for OMAP4 family + Must be "ti,omap5-dmm" for OMAP5 and DRA7x familys/must be/should contain/
Documentation/devicetree/bindings/arm/omap/dmm.txt line 6
Quoted 1 line
Documentation/devicetree/bindings/arm/omap/dmm.txt new file +1
-0+- reg: Contains timer register address range (base address and length)Huh? What's a timer got to do with the DMM?
Err, my mistake!
Quoted 6 lines
Documentation/devicetree/bindings/arm/omap/dmm.txt line 7
Quoted 2 lines
Documentation/devicetree/bindings/arm/omap/dmm.txt new file +1
-0+- interrupts: Contains interrupt information (source, etc) for the DMM IRQIs there a single interrupt? If so:
- interrupts: Should contain an interrupt-specifier for the DMM IRQ.
Okay.
Quoted 5 lines
Assuming the "DMM IRQ" is well defined. If there's a name for it in documentation, using that's preferable. If a future revision may have multiple interrupts, please use interrupt-names now to save us endless pain in future.
The IRQ is called DMM_IRQ in the documentation. I don't think there would be more than one interrupt line from this IP. I'll still cross check.
Thanks,
Archit
PATCH v3 2/2 drm: omap: Enable DT support for DMM
In reply to Archit TanejaEnable use of DT for DMM/Tiler.
Originally worked on by Andy Gross <[email protected]>
--- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +11 -0
@@ -968,12 +968,23 @@ static const struct dev_pm_ops omap_dmm_pm_ops = { };#endif +#if defined(CONFIG_OF ) +static const struct of_device_id dmm_of_match[] = { + { .compatible ="ti,omap4-dmm" , }, + { .compatible ="ti,omap5-dmm" , }, + {}, +}; +#else +#define dmm_of_match NULL +#endif +struct platform_driver omap_dmm_driver = { .probe = omap_dmm_probe, .remove = omap_dmm_remove, .driver = { .owner =THIS_MODULE , .name =DMM_DRIVER_NAME , + .of_match_table = dmm_of_match, #ifdef CONFIG_PM .pm = &omap_dmm_pm_ops, #endif
Signature · 1 line
1.8.1.2
v4 cover DMM DT adaptation
In reply to Archit TanejaThe DMM/Tiler block can used by omapdrm to allocate frame buffers. With the removal of address and irq data from the omap4 hwmods, the probe of DMM driver fails and omapdrm isn't able to utilize the DMM hardware.
Add DMM bindings for omap4 and omap5.
Changes in v4:
- Clean up documentation further.
Changes in v3:
- Fix mistakes in documentation and remove aliases for dmm nodes.
Changes in v2:
- No changes, split out into a separate series containing only DT related parts.
Archit Taneja (2):
arm: dts: omap4+: Add DMM bindings
drm: omap: Enable DT support for DMM
Documentation/devicetree/bindings/arm/omap/dmm.txt | 22 ++++++++++++++++++++++ arch/arm/boot/dts/omap4.dtsi | 7 +++++++ arch/arm/boot/dts/omap5.dtsi | 7 +++++++ drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 11 +++++++++++ 4 files changed, 47 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/omap/dmm.txt
Signature · 1 line
1.8.1.2
PATCH v4 1/2 arm: dts: omap4+: Add DMM bindings
Add Dynamic Memory Manager (DMM) bindings for OMAP4 and OMAP5 devices. DMM only requires address and irq information.
Add documentation for the DMM bindings.
Originally worked on by Andy Gross <[email protected]>
--- Documentation/devicetree/bindings/arm/omap/dmm.txt | 22 ++++++++++++++++++++++ arch/arm/boot/dts/omap4.dtsi | 7 +++++++ arch/arm/boot/dts/omap5.dtsi | 7 +++++++ 3 files changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/omap/dmm.txt
Documentation/devicetree/bindings/arm/omap/dmm.txt new file +22 -0
@@ -0,0 +1,22 @@ +OMAP Dynamic Memory Manager (DMM) bindings + +The dynamic memory manager (DMM) is a module located immediately in front of the +SDRAM controllers (called EMIFs on OMAP). DMM manages various aspects of memory +accesses such as priority generation amongst initiators, configuration of SDRAM +interleaving, optimizing transfer of 2D block objects, and provide MMU-like page +translation for initiators which need contiguous dma bus addresses. + +Required properties: +- compatible: Should contain "ti,omap4-dmm" for OMAP4 family + Should contain "ti,omap5-dmm" for OMAP5 and DRA7x family +- reg: Contains DMM register address range (base address and length) +- interrupts: Should contain an interrupt-specifier for DMM_IRQ. +- ti,hwmods: Name of the hwmod associated to DMM, which is typically "dmm" + +Example: + +dmm@4e000000 { + compatible = "ti,omap4-dmm"; + reg = <0x4e000000 0x800>; + ti,hwmods = "dmm"; +};
arch/arm/boot/dts/omap4.dtsi +7 -0
@@ -487,6 +487,13 @@ ti,hwmods = "kbd"; }; + dmm@4e000000 { + compatible = "ti,omap4-dmm"; + reg = <0x4e000000 0x800>; + interrupts = <0 113 0x4>; + ti,hwmods = "dmm"; + }; + emif1: emif@4c000000 { compatible = "ti,emif-4d"; reg = <0x4c000000 0x100>;
arch/arm/boot/dts/omap5.dtsi +7 -0
@@ -604,6 +604,13 @@ ti,hwmods = "wd_timer2"; }; + dmm@4e000000 { + compatible = "ti,omap5-dmm"; + reg = <0x4e000000 0x800>; + interrupts = <0 113 0x4>; + ti,hwmods = "dmm"; + }; + emif1: emif@0x4c000000 { compatible = "ti,emif-4d5"; ti,hwmods = "emif1";
Signature · 1 line
1.8.1.2
Re: [PATCH v4 1/2] arm: dts: omap4+: Add DMM bindings
Hi,
Quoted 7 lines · Archit Taneja
Add Dynamic Memory Manager (DMM) bindings for OMAP4 and OMAP5 devices. DMM only requires address and irq information.
Add documentation for the DMM bindings.
Originally worked on by Andy Gross <[email protected]>
Quoted 8 lines
Cc Andy Gross <[email protected]>Signed-off-by Archit Taneja <[email protected]>--- Documentation/devicetree/bindings/arm/omap/dmm.txt | 22 ++++++++++++++++++++++ arch/arm/boot/dts/omap4.dtsi | 7 +++++++ arch/arm/boot/dts/omap5.dtsi | 7 +++++++ 3 files changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/omap/dmm.txt
Has this been queued for 3.15?
Tomi
Re: [PATCH v4 1/2] arm: dts: omap4+: Add DMM bindings
Quoted 19 lines · Tomi Valkeinen
Hi,
Quoted 7 lines · Archit Taneja
Add Dynamic Memory Manager (DMM) bindings for OMAP4 and OMAP5 devices. DMM only requires address and irq information.
Add documentation for the DMM bindings.
Originally worked on by Andy Gross <[email protected]>
Quoted 8 lines
Cc Andy Gross <[email protected]>Signed-off-by Archit Taneja <[email protected]>--- Documentation/devicetree/bindings/arm/omap/dmm.txt | 22 ++++++++++++++++++++++ arch/arm/boot/dts/omap4.dtsi | 7 +++++++ arch/arm/boot/dts/omap5.dtsi | 7 +++++++ 3 files changed, 36 insertions(+)create mode 100644
Documentation/devicetree/bindings/arm/omap/dmm.txt
Quoted 1 line
Has this been queued for 3.15?
Yes, It has got queued.
Archit
PATCH v4 2/2 drm: omap: Enable DT support for DMM
In reply to Archit TanejaEnable use of DT for DMM/Tiler.
Originally worked on by Andy Gross <[email protected]>
--- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +11 -0
@@ -968,12 +968,23 @@ static const struct dev_pm_ops omap_dmm_pm_ops = { };#endif +#if defined(CONFIG_OF ) +static const struct of_device_id dmm_of_match[] = { + { .compatible ="ti,omap4-dmm" , }, + { .compatible ="ti,omap5-dmm" , }, + {}, +}; +#else +#define dmm_of_match NULL +#endif +struct platform_driver omap_dmm_driver = { .probe = omap_dmm_probe, .remove = omap_dmm_remove, .driver = { .owner =THIS_MODULE , .name =DMM_DRIVER_NAME , + .of_match_table = dmm_of_match, #ifdef CONFIG_PM .pm = &omap_dmm_pm_ops, #endif
Signature · 1 line
1.8.1.2
Re: [PATCH v4 2/2] drm: omap: Enable DT support for DMM
Quoted 26 lines · Archit Taneja
Enable use of DT for DMM/Tiler.
Originally worked on by Andy Gross <[email protected]>
Cc Andy Gross <[email protected]>Cc DRI Development <[email protected]>Signed-off-by Archit Taneja <[email protected]>--- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +7
-0@@ -968,12 +968,23 @@ static const struct dev_pm_ops omap_dmm_pm_ops = { };#endif +#if defined(CONFIG_OF ) +static const struct of_device_id dmm_of_match[] = { + { .compatible ="ti,omap4-dmm" , }, + { .compatible ="ti,omap5-dmm" , }, + {}, +}; +#else
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c static const struct dev_pm_ops omap_dmm_pm_ops = { · line 987
Quoted 10 lines
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +4
-0+#define dmm_of_match NULL +#endif +struct platform_driver omap_dmm_driver = { .probe = omap_dmm_probe, .remove = omap_dmm_remove, .driver = { .owner =THIS_MODULE , .name =DMM_DRIVER_NAME , + .of_match_table = dmm_of_match,
If you use of_match_ptr(dmm_of_match) here you don't need the #else case above.
Thanks,
Mark.
Re: [PATCH v4 2/2] drm: omap: Enable DT support for DMM
Quoted 31 lines · Mark Rutland
Quoted 30 lines · Archit Taneja
Enable use of DT for DMM/Tiler.
Originally worked on by Andy Gross <[email protected]>
Cc Andy Gross <[email protected]>Cc DRI Development <[email protected]>Signed-off-by Archit Taneja <[email protected]>--- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +10
-0@@ -968,12 +968,23 @@ static const struct dev_pm_ops omap_dmm_pm_ops = { };#endif +#if defined(CONFIG_OF ) +static const struct of_device_id dmm_of_match[] = { + { .compatible ="ti,omap4-dmm" , }, + { .compatible ="ti,omap5-dmm" , }, + {}, +}; +#else +#define dmm_of_match NULL +#endif +struct platform_driver omap_dmm_driver = {
Quoted 8 lines
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c static const struct dev_pm_ops omap_dmm_pm_ops = { · line 987
Quoted 6 lines
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +1
-0.probe = omap_dmm_probe, .remove = omap_dmm_remove, .driver = { .owner = THIS_MODULE, .name = DMM_DRIVER_NAME, + .of_match_table = dmm_of_match,If you use
of_match_ptr(dmm_of_match)here you don't need the #else case above.
Thanks for the tip. I'll make this update.
Archit
v5 cover DMM DT adaptation
In reply to Archit TanejaThe DMM/Tiler block can used by omapdrm to allocate frame buffers. With the removal of address and irq data from the omap4 hwmods, the probe of DMM driver fails and omapdrm isn't able to utilize the DMM hardware.
Add DMM bindings for OMAP4 and OMAP5 and DRA7x.
Changes in v5:
- Use of_match_ptr() in the dmm driver.
- Add DT node for DRA7x as dra7.dtsi is now in mainline.
Changes in v4:
- Clean up documentation further.
Changes in v3:
- Fix mistakes in documentation and remove aliases for dmm nodes.
Changes in v2:
- No changes, split out into a separate series containing only DT related parts.
Archit Taneja (2):
arm: dts: omap4+: Add DMM bindings
drm: omap: Enable DT support for DMM
Documentation/devicetree/bindings/arm/omap/dmm.txt | 22 ++++++++++++++++++++++ arch/arm/boot/dts/dra7.dtsi | 7 +++++++ arch/arm/boot/dts/omap4.dtsi | 7 +++++++ arch/arm/boot/dts/omap5.dtsi | 7 +++++++ drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 7 +++++++ 5 files changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/omap/dmm.txt
Signature · 1 line
1.8.3.2
PATCH v5 1/2 arm: dts: omap4+: Add DMM bindings
Add Dynamic Memory Manager (DMM) bindings for OMAP4 and OMAP5 and DRA7x devices. DMM only requires address and irq information.
Add documentation for the DMM bindings.
Originally worked on by Andy Gross <[email protected]>
--- Documentation/devicetree/bindings/arm/omap/dmm.txt | 22 ++++++++++++++++++++++ arch/arm/boot/dts/dra7.dtsi | 7 +++++++ arch/arm/boot/dts/omap4.dtsi | 7 +++++++ arch/arm/boot/dts/omap5.dtsi | 7 +++++++ 4 files changed, 43 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/omap/dmm.txt
Documentation/devicetree/bindings/arm/omap/dmm.txt new file +22 -0
@@ -0,0 +1,22 @@ +OMAP Dynamic Memory Manager (DMM) bindings + +The dynamic memory manager (DMM) is a module located immediately in front of the +SDRAM controllers (called EMIFs on OMAP). DMM manages various aspects of memory +accesses such as priority generation amongst initiators, configuration of SDRAM +interleaving, optimizing transfer of 2D block objects, and provide MMU-like page +translation for initiators which need contiguous dma bus addresses. + +Required properties: +- compatible: Should contain "ti,omap4-dmm" for OMAP4 family + Should contain "ti,omap5-dmm" for OMAP5 and DRA7x family +- reg: Contains DMM register address range (base address and length) +- interrupts: Should contain an interrupt-specifier for DMM_IRQ. +- ti,hwmods: Name of the hwmod associated to DMM, which is typically "dmm" + +Example: + +dmm@4e000000 { + compatible = "ti,omap4-dmm"; + reg = <0x4e000000 0x800>; + ti,hwmods = "dmm"; +};
arch/arm/boot/dts/dra7.dtsi +7 -0
@@ -425,6 +425,13 @@ ti,hwmods = "wd_timer2"; }; + dmm@4e000000 { + compatible = "ti,omap5-dmm"; + reg = <0x4e000000 0x800>; + interrupts = <0 113 0x4>; + ti,hwmods = "dmm"; + }; + i2c1: i2c@48070000 { compatible = "ti,omap4-i2c"; reg = <0x48070000 0x100>;
arch/arm/boot/dts/omap4.dtsi +7 -0
@@ -502,6 +502,13 @@ ti,hwmods = "kbd"; }; + dmm@4e000000 { + compatible = "ti,omap4-dmm"; + reg = <0x4e000000 0x800>; + interrupts = <0 113 0x4>; + ti,hwmods = "dmm"; + }; + emif1: emif@4c000000 { compatible = "ti,emif-4d"; reg = <0x4c000000 0x100>;
arch/arm/boot/dts/omap5.dtsi +7 -0
@@ -621,6 +621,13 @@ ti,hwmods = "wd_timer2"; }; + dmm@4e000000 { + compatible = "ti,omap5-dmm"; + reg = <0x4e000000 0x800>; + interrupts = <0 113 0x4>; + ti,hwmods = "dmm"; + }; + emif1: emif@4c000000 { compatible = "ti,emif-4d5"; ti,hwmods = "emif1";
Signature · 1 line
1.8.3.2
Re: [PATCH v5 1/2] arm: dts: omap4+: Add DMM bindings
Hi Archit,
Quoted 9 lines · Archit Taneja
Add Dynamic Memory Manager (DMM) bindings for OMAP4 and OMAP5 and DRA7x devices. DMM only requires address and irq information.
Add documentation for the DMM bindings.
Originally worked on by Andy Gross <[email protected]>
Cc Andy Gross <[email protected]>Signed-off-by Archit Taneja <[email protected]>
I've just applied your patch.
Thanks,
Benoit
Quoted 91 lines
--- Documentation/devicetree/bindings/arm/omap/dmm.txt | 22 ++++++++++++++++++++++ arch/arm/boot/dts/dra7.dtsi | 7 +++++++ arch/arm/boot/dts/omap4.dtsi | 7 +++++++ arch/arm/boot/dts/omap5.dtsi | 7 +++++++ 4 files changed, 43 insertions(+)create mode 100644
Documentation/devicetree/bindings/arm/omap/dmm.txtDocumentation/devicetree/bindings/arm/omap/dmm.txt new file +22
-0@@ -0,0 +1,22 @@ +OMAP Dynamic Memory Manager (DMM) bindings + +The dynamic memory manager (DMM) is a module located immediately in front of the +SDRAM controllers (called EMIFs on OMAP). DMM manages various aspects of memory +accesses such as priority generation amongst initiators, configuration of SDRAM +interleaving, optimizing transfer of 2D block objects, and provide MMU-like page +translation for initiators which need contiguous dma bus addresses. + +Required properties: +- compatible: Should contain "ti,omap4-dmm" for OMAP4 family + Should contain "ti,omap5-dmm" for OMAP5 and DRA7x family +- reg: Contains DMM register address range (base address and length) +- interrupts: Should contain an interrupt-specifier for DMM_IRQ. +- ti,hwmods: Name of the hwmod associated to DMM, which is typically "dmm" + +Example: + +dmm@4e000000 { + compatible = "ti,omap4-dmm"; + reg = <0x4e000000 0x800>; + ti,hwmods = "dmm"; +};arch/arm/boot/dts/dra7.dtsi +7
-0@@ -425,6 +425,13 @@ ti,hwmods = "wd_timer2"; }; + dmm@4e000000 { + compatible = "ti,omap5-dmm"; + reg = <0x4e000000 0x800>; + interrupts = <0 113 0x4>; + ti,hwmods = "dmm"; + }; + i2c1: i2c@48070000 { compatible = "ti,omap4-i2c"; reg = <0x48070000 0x100>;arch/arm/boot/dts/omap4.dtsi +7
-0@@ -502,6 +502,13 @@ ti,hwmods = "kbd"; }; + dmm@4e000000 { + compatible = "ti,omap4-dmm"; + reg = <0x4e000000 0x800>; + interrupts = <0 113 0x4>; + ti,hwmods = "dmm"; + }; + emif1: emif@4c000000 { compatible = "ti,emif-4d"; reg = <0x4c000000 0x100>;arch/arm/boot/dts/omap5.dtsi +7
-0@@ -621,6 +621,13 @@ ti,hwmods = "wd_timer2"; }; + dmm@4e000000 { + compatible = "ti,omap5-dmm"; + reg = <0x4e000000 0x800>; + interrupts = <0 113 0x4>; + ti,hwmods = "dmm"; + }; + emif1: emif@4c000000 { compatible = "ti,emif-4d5"; ti,hwmods = "emif1";
Signature · 8 lines
Benoît Cousson BayLibre Embedded Linux Technology Lab www.baylibre.com -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v5 2/2 drm: omap: Enable DT support for DMM
In reply to Archit TanejaEnable use of DT for DMM/Tiler.
Originally worked on by Andy Gross <[email protected]>
--- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +7 -0
@@ -969,12 +969,19 @@ static const struct dev_pm_ops omap_dmm_pm_ops = { };#endif +static const struct of_device_id dmm_of_match[] = { + { .compatible ="ti,omap4-dmm" , }, + { .compatible ="ti,omap5-dmm" , }, + {}, +}; +struct platform_driver omap_dmm_driver = { .probe = omap_dmm_probe, .remove = omap_dmm_remove, .driver = { .owner =THIS_MODULE , .name =DMM_DRIVER_NAME , + .of_match_table =of_match_ptr (dmm_of_match), #ifdef CONFIG_PM .pm = &omap_dmm_pm_ops, #endif
Signature · 1 line
1.8.3.2
Re: [PATCH v5 0/2] DMM DT adaptation
In reply to Archit TanejaHullo,
Quoted 5 lines · Archit Taneja
The DMM/Tiler block can used by omapdrm to allocate frame buffers. With the removal of address and irq data from the omap4 hwmods, the probe of DMM driver fails and omapdrm isn't able to utilize the DMM hardware.
Add DMM bindings for OMAP4 and OMAP5 and DRA7x.
Can this be pulled for 3.14? I've incorporated comments from Mark and other folks.
Thanks,
Archit
Quoted 27 lines
Changes in v5:
- Useof_match_ptr()in the dmm driver.
- Add DT node for DRA7x asdra7.dtsiis now in mainline.Changes in v4:
- Clean up documentation further.Changes in v3:
- Fix mistakes in documentation and remove aliases for dmm nodes.Changes in v2:
- No changes, split out into a separate series containing only DT related parts.Archit Taneja (2):
arm: dts: omap4+: Add DMM bindings
drm: omap: Enable DT support for DMMDocumentation/devicetree/bindings/arm/omap/dmm.txt | 22 ++++++++++++++++++++++ arch/arm/boot/dts/dra7.dtsi | 7 +++++++ arch/arm/boot/dts/omap4.dtsi | 7 +++++++ arch/arm/boot/dts/omap5.dtsi | 7 +++++++ drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 7 +++++++ 5 files changed, 50 insertions(+)create mode 100644
Documentation/devicetree/bindings/arm/omap/dmm.txt
Re: [PATCH v5 0/2] DMM DT adaptation
Hi Mark,
Quoted 9 lines · Archit Taneja
Hullo,
Quoted 6 lines · Archit Taneja
The DMM/Tiler block can used by omapdrm to allocate frame buffers. With the
removal of address and irq data from the omap4 hwmods, the probe of DMM driver
fails and omapdrm isn't able to utilize the DMM hardware.
Quoted 4 lines
Quoted 1 line
Add DMM bindings for OMAP4 and OMAP5 and DRA7x.
Can this be pulled for 3.14? I've incorporated comments from Mark and other folks.
Can you please ack the first patch in the series?
The second one is going via a pull request to the drm maintainer:
Thanks,
Archit
Quoted 40 lines
Thanks,
ArchitQuoted 20 lines
Changes in v5:
- Useof_match_ptr()in the dmm driver.
- Add DT node for DRA7x asdra7.dtsiis now in mainline.Changes in v4:
- Clean up documentation further.Changes in v3:
- Fix mistakes in documentation and remove aliases for dmm nodes.Changes in v2:
- No changes, split out into a separate series containing only DT related parts.Archit Taneja (2):
arm: dts: omap4+: Add DMM bindings
drm: omap: Enable DT support for DMMQuoted 9 lines
Documentation/devicetree/bindings/arm/omap/dmm.txt | 22 ++++++++++++++++++++++ arch/arm/boot/dts/dra7.dtsi | 7 +++++++ arch/arm/boot/dts/omap4.dtsi | 7 +++++++ arch/arm/boot/dts/omap5.dtsi | 7 +++++++ drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 7 +++++++ 5 files changed, 50 insertions(+)create mode 100644
Documentation/devicetree/bindings/arm/omap/dmm.txt--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html