Dove PMU support
Subsystems (8)
cover Dove PMU support
The following series of patches add better PMU support for Dove. This has been developed on the Cubox, and tested in non-DT and DT modes.
This also improves the interrupt handling over the existing code: the existing code ends up calling the interrupt handlers twice for every interrupt raised, because the interrupt clear-down is done at the wrong point - we need to clear down the interrupt in the device first, then clear it down in the controller.
The problem this gives is that it can be racy (see comments in the driver) so we're careful about how we do that to minimise the window.
I've included all patches here - the initial set are targetted towards adding DT support, with the final adding the non-DT support. There is a call to the initialisation function missing for DT mode - I'd like the mvebu people to comment on how that should be handled, as it needs to be done pretty early.
Also included are two PM domain changes: the first I've discussed with Rafael who seems happy with it. The second is necessary because we have no way to know if a generic PM domain is associated with a device or whether something else making use of the PM domain is installed in the dev->pm_domain pointer, so this allows that decision to be made by core PM code.
This is more a "this is where I'm at" with this stuff than a real submission, nevertheless comments on how to get it ready for submission would be welcome. I'd like to get this off my plate ASAP.
arch/arm/Kconfig | 1 + arch/arm/boot/dts/dove.dtsi | 7 + arch/arm/mach-dove/Makefile | 1 + arch/arm/mach-dove/common.c | 2 + arch/arm/mach-dove/common.h | 1 + arch/arm/mach-dove/include/mach/pm.h | 17 -- arch/arm/mach-dove/irq.c | 87 ------ arch/arm/mach-dove/pmu.c | 531 +++++++++++++++++++++++++++++++++++ drivers/base/power/domain.c | 8 +- 9 files changed, 547 insertions(+), 108 deletions(-)
Signature · 2 lines
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.
PATCH 1/5 pm: domains: quieten down generic pm domains
--- drivers/base/power/domain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/base/power/domain.c +3 -3
@@ -42,7 +42,7 @@struct gpd_timing_data *__td = &dev_gpd_data (dev)->td; \if (!__retval && __elapsed > __td->field) { \ __td->field = __elapsed; \ -dev_warn (dev, name" latency exceeded, new value %lld ns\n" , \ +dev_dbg (dev, name" latency exceeded, new value %lld ns\n" , \ __elapsed); \ genpd->max_off_time_changed = true; \ __td->constraint_changed = true; \
@@ -242,7 +242,7 @@ static int __pm_genpd_poweron(struct generic_pm_domain *genpd) genpd->max_off_time_changed = true;genpd_recalc_cpu_exit_latency (genpd);if (genpd->name) -pr_warning ("%s: Power-on latency exceeded, " +pr_debug ("%s: Power-on latency exceeded, " "new value %lld ns\n" , genpd->name, elapsed_ns); }
@@ -566,7 +566,7 @@ static int pm_genpd_poweroff(struct generic_pm_domain *genpd) genpd->power_off_latency_ns = elapsed_ns; genpd->max_off_time_changed = true;if (genpd->name) -pr_warning ("%s: Power-off latency exceeded, " +pr_debug ("%s: Power-off latency exceeded, " "new value %lld ns\n" , genpd->name, elapsed_ns); }
Signature · 1 line
1.8.3.1
PATCH 1/5 pm: domains: quieten down generic pm domains
Quoted 1 line · Russell King
Signed-off-by Russell King <[email protected]>
Since you need this one and [2/5] for the rest of the patchset, please feel free to take them through your tree if that's convenient.
Quoted 36 lines
--- drivers/base/power/domain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/base/power/domain.c +3
-3@@ -42,7 +42,7 @@struct gpd_timing_data *__td = &dev_gpd_data (dev)->td; \if (!__retval && __elapsed > __td->field) { \ __td->field = __elapsed; \ -dev_warn (dev, name" latency exceeded, new value %lld ns\n" , \ +dev_dbg (dev, name" latency exceeded, new value %lld ns\n" , \ __elapsed); \ genpd->max_off_time_changed = true; \ __td->constraint_changed = true; \@@ -242,7 +242,7 @@ static int __pm_genpd_poweron(struct generic_pm_domain *genpd) genpd->max_off_time_changed = true;genpd_recalc_cpu_exit_latency (genpd);if (genpd->name) -pr_warning ("%s: Power-on latency exceeded, " +pr_debug ("%s: Power-on latency exceeded, " "new value %lld ns\n" , genpd->name, elapsed_ns); }@@ -566,7 +566,7 @@ static int pm_genpd_poweroff(struct generic_pm_domain *genpd) genpd->power_off_latency_ns = elapsed_ns; genpd->max_off_time_changed = true;if (genpd->name) -pr_warning ("%s: Power-off latency exceeded, " +pr_debug ("%s: Power-off latency exceeded, " "new value %lld ns\n" , genpd->name, elapsed_ns); }
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
PATCH 1/5 pm: domains: quieten down generic pm domains
Quoted 7 lines · Rafael J. Wysocki
Quoted 1 line · Russell King
Signed-off-by Russell King <[email protected]>Since you need this one and [2/5] for the rest of the patchset, please feel free to take them through your tree if that's convenient.
Unless it complicates things for Russell, I would prefer if this could go via Rafael's tree.
I have a quite big patchset for the PM domain, it would help me if I have a single point to base my work upon.
Additionally, you have Tomasz Figa patchset below to consider for the PM domain code.
[PATCH v3 0/3] Generic Device Tree based power domain look-up
Kind regards
Ulf Hansson
Quoted 45 lines
Quoted 29 lines
--- drivers/base/power/domain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/base/power/domain.c +2
-2@@ -42,7 +42,7 @@struct gpd_timing_data *__td = &dev_gpd_data (dev)->td; \if (!__retval && __elapsed > __td->field) { \ __td->field = __elapsed; \ -dev_warn (dev, name" latency exceeded, new value %lld ns\n" , \ +dev_dbg (dev, name" latency exceeded, new value %lld ns\n" , \ __elapsed); \ genpd->max_off_time_changed = true; \ __td->constraint_changed = true; \@@ -242,7 +242,7 @@ static int __pm_genpd_poweron(struct generic_pm_domain *genpd) genpd->max_off_time_changed = true;genpd_recalc_cpu_exit_latency (genpd);if (genpd->name) -pr_warning ("%s: Power-on latency exceeded, " +pr_debug ("%s: Power-on latency exceeded, " "new value %lld ns\n" , genpd->name, elapsed_ns); }drivers/base/power/domain.c static int pm_genpd_poweroff(struct generic_pm_domain *genpd) · line 572
Quoted 8 lines
drivers/base/power/domain.c +1
-1@@ -566,7 +566,7 @@ static int pm_genpd_poweroff(struct generic_pm_domain *genpd) genpd->power_off_latency_ns = elapsed_ns; genpd->max_off_time_changed = true;if (genpd->name) -pr_warning ("%s: Power-off latency exceeded, " +pr_debug ("%s: Power-off latency exceeded, " "new value %lld ns\n" , genpd->name, elapsed_ns); }--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 1/5 pm: domains: quieten down generic pm domains
Quoted 6 lines · Ulf Hansson
Quoted 5 lines · Rafael J. Wysocki
Quoted 1 line · Russell King
Signed-off-by Russell King <[email protected]>
Quoted 8 lines
Quoted 2 lines
Since you need this one and [2/5] for the rest of the patchset, please feel free to take them through your tree if that's convenient.
Unless it complicates things for Russell, I would prefer if this could go via Rafael's tree.
I have a quite big patchset for the PM domain, it would help me if I have a single point to base my work upon.
No problem for me, but I'm not sure about what Russell things.
Quoted 4 lines
Additionally, you have Tomasz Figa patchset below to consider for the PM domain code.
[PATCH v3 0/3] Generic Device Tree based power domain look-up
This one seems to have been under discussion recently, however.
Thanks!
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
PATCH 1/5 pm: domains: quieten down generic pm domains
Quoted 10 lines · Rafael J. Wysocki
Quoted 9 lines · Ulf Hansson
Quoted 7 lines · Rafael J. Wysocki
Quoted 1 line · Russell King
Signed-off-by Russell King <[email protected]>Since you need this one and [2/5] for the rest of the patchset, please feel free to take them through your tree if that's convenient.
Quoted 7 lines
Quoted 5 lines
Unless it complicates things for Russell, I would prefer if this could go via Rafael's tree.
I have a quite big patchset for the PM domain, it would help me if I have a single point to base my work upon.
No problem for me, but I'm not sure about what Russell things.
Well, it seems nothing happened with these patches, and they're still something I have (and I've just updated them to changes in 3.19.)
What are we going to do about them?
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.
PATCH 2/5 pm: domains: avoid potential oops in pm_genpd_remove_device()
In reply to Russell King - ARM Linuxpm_genpd_remove_device() should only be called with valid and present pm domain. There are circumstances where we may end up with something that isn't a generic PM domain in dev->pm_domain (eg, vga_switcheroo stuff.)
--- drivers/base/power/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/power/domain.c +1 -1
@@ -1531,7 +1531,7 @@ int pm_genpd_remove_device(struct generic_pm_domain *genpd,dev_dbg (dev,"%s()\n" , __func__); -if (IS_ERR_OR_NULL (genpd) ||IS_ERR_OR_NULL (dev) +if (!pm_genpd_present (genpd) ||IS_ERR_OR_NULL (dev) ||IS_ERR_OR_NULL (dev->pm_domain) ||pd_to_genpd (dev->pm_domain) != genpd)return -EINVAL ;
Signature · 1 line
1.8.3.1
PATCH 2/5 pm: domains: avoid potential oops in pm_genpd_remove_device()
Quoted 6 lines · Russell King
pm_genpd_remove_device()should only be called with valid and present pm domain. There are circumstances where we may end up with something that isn't a generic PM domain indev->pm_domain(eg,vga_switcheroostuff.)Signed-off-by Russell King <[email protected]>
Quoted 18 lines
--- drivers/base/power/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/base/power/domain.c +1
-1@@ -1531,7 +1531,7 @@ int pm_genpd_remove_device(struct generic_pm_domain *genpd,dev_dbg (dev,"%s()\n" , __func__); -if (IS_ERR_OR_NULL (genpd) ||IS_ERR_OR_NULL (dev) +if (!pm_genpd_present (genpd) ||IS_ERR_OR_NULL (dev) ||IS_ERR_OR_NULL (dev->pm_domain) ||pd_to_genpd (dev->pm_domain) != genpd)return -EINVAL ;
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
PATCH 3/5 ARM: dove: create a proper PMU driver for power domains, PMU IRQs and resets
In reply to Russell King - ARM LinuxThe PMU device contains an interrupt controller, power control and resets. The interrupt controller is a little sub-standard in that there is no race free way to clear down pending interrupts, so we try to avoid problems by reducing the window as much as possible, and clearing as infrequently as possible.
The interrupt support is implemented using an IRQ domain, and the parent interrupt referenced in the standard DT way.
The power domains and reset support is closely related - there is a defined sequence for powering down a domain which is tightly coupled with asserting the reset. Hence, it makes sense to group these two together.
This patch adds the core PMU driver: power domains must be defined in the DT file in order to make use of them. The reset controller can be referenced in the standard way for reset controllers.
--- arch/arm/Kconfig | 1 + arch/arm/mach-dove/Makefile | 1 + arch/arm/mach-dove/common.c | 2 + arch/arm/mach-dove/common.h | 1 + arch/arm/mach-dove/include/mach/pm.h | 17 -- arch/arm/mach-dove/irq.c | 87 ------- arch/arm/mach-dove/pmu.c | 457 +++++++++++++++++++++++++++++++++++ 7 files changed, 462 insertions(+), 104 deletions(-) create mode 100644 arch/arm/mach-dove/pmu.c
arch/arm/Kconfig +1 -0
@@ -534,6 +534,7 @@ config ARCH_DOVE select PINCTRL select PINCTRL_DOVE select PLAT_ORION_LEGACY + select PM_GENERIC_DOMAINS if PM select USB_ARCH_HAS_EHCI help Support for the Marvell Dove SoC 88AP510
arch/arm/mach-dove/Makefile +1 -0
@@ -1,4 +1,5 @@ obj-y += common.o +obj-$(CONFIG_PM_GENERIC_DOMAINS)+= pmu.o obj-$(CONFIG_DOVE_LEGACY) += irq.o mpp.o obj-$(CONFIG_PCI) += pcie.o obj-$(CONFIG_MACH_DOVE_DB) += dove-db-setup.o
arch/arm/mach-dove/common.c +2 -0
@@ -377,6 +377,8 @@ void __init dove_setup_cpu_wins(void)void __init dove_init (void ) { +dove_init_pmu (); +pr_info ("Dove 88AP510 SoC, TCLK = %d MHz.\n" , (dove_tclk +499999 ) /1000000 );
arch/arm/mach-dove/common.h +1 -0
@@ -45,5 +45,6 @@ void dove_i2c_init(void);void dove_sdio0_init (void );void dove_sdio1_init (void );void dove_restart (enum reboot_mode ,const char *); +int dove_init_pmu (void );#endif
arch/arm/mach-dove/include/mach/pm.h +0 -17
@@ -51,22 +51,5 @@#define CLOCK_GATING_GIGA_PHY_MASK (1 << CLOCK_GATING_BIT_GIGA_PHY)#define PMU_INTERRUPT_CAUSE (DOVE_PMU_VIRT_BASE + 0x50) -#define PMU_INTERRUPT_MASK (DOVE_PMU_VIRT_BASE + 0x54) - -static inline int pmu_to_irq (int pin) -{ -if (pin <NR_PMU_IRQS ) -return pin +IRQ_DOVE_PMU_START ; - -return -EINVAL ; -} - -static inline int irq_to_pmu (int irq) -{ -if (IRQ_DOVE_PMU_START <= irq && irq <NR_IRQS ) -return irq -IRQ_DOVE_PMU_START ; - -return -EINVAL ; -}#endif
arch/arm/mach-dove/irq.c +0 -87
111 lines not on this page · raw message
arch/arm/mach-dove/pmu.c new file +457 -0
457 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH 3/5 ARM: dove: create a proper PMU driver for power domains, PMU IRQs and resets
Quoted 9 lines · Russell King
The PMU device contains an interrupt controller, power control and resets. The interrupt controller is a little sub-standard in that there is no race free way to clear down pending interrupts, so we try to avoid problems by reducing the window as much as possible, and clearing as infrequently as possible.
The interrupt support is implemented using an IRQ domain, and the parent interrupt referenced in the standard DT way.
Quoted 8 lines
The power domains and reset support is closely related - there is a defined sequence for powering down a domain which is tightly coupled with asserting the reset. Hence, it makes sense to group these two together.
This patch adds the core PMU driver: power domains must be defined in the DT file in order to make use of them. The reset controller can be referenced in the standard way for reset controllers.
Hi Russell,
This patch would be simplified if this was based upon the not yet merged patchset from Tomasz Figa, "[PATCH v3 0/3] Generic Device Tree based power domain look-up".
For example you would likely not need to add some of the marvel specific DT bindings, and you wouldn?t need the bus_notifiers to add devices to the power domain. I guess I just though it could be useful input to consider while going forward, unless you already knew.
Kind regards
Ulf Hansson
PATCH 3/5 ARM: dove: create a proper PMU driver for power domains, PMU IRQs and resets
Quoted 21 lines · Ulf Hansson
Quoted 9 lines · Russell King
The PMU device contains an interrupt controller, power control and resets. The interrupt controller is a little sub-standard in that there is no race free way to clear down pending interrupts, so we try to avoid problems by reducing the window as much as possible, and clearing as infrequently as possible.
The interrupt support is implemented using an IRQ domain, and the parent interrupt referenced in the standard DT way.
Quoted 8 lines
The power domains and reset support is closely related - there is a defined sequence for powering down a domain which is tightly coupled with asserting the reset. Hence, it makes sense to group these two together.
This patch adds the core PMU driver: power domains must be defined in the DT file in order to make use of them. The reset controller can be referenced in the standard way for reset controllers.
Hi Russell,
Quoted 8 lines
This patch would be simplified if this was based upon the not yet merged patchset from Tomasz Figa, "[PATCH v3 0/3] Generic Device Tree based power domain look-up".
For example you would likely not need to add some of the marvel specific DT bindings, and you wouldn?t need the
bus_notifiersto add devices to the power domain. I guess I just though it could be useful input to consider while going forward, unless you already knew.
Does that apply to 3.14?
Signature · 2 lines
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.
PATCH 3/5 ARM: dove: create a proper PMU driver for power domains, PMU IRQs and resets
In reply to Ulf HanssonQuoted 21 lines · Ulf Hansson
Quoted 9 lines · Russell King
The PMU device contains an interrupt controller, power control and resets. The interrupt controller is a little sub-standard in that there is no race free way to clear down pending interrupts, so we try to avoid problems by reducing the window as much as possible, and clearing as infrequently as possible.
The interrupt support is implemented using an IRQ domain, and the parent interrupt referenced in the standard DT way.
Quoted 8 lines
The power domains and reset support is closely related - there is a defined sequence for powering down a domain which is tightly coupled with asserting the reset. Hence, it makes sense to group these two together.
This patch adds the core PMU driver: power domains must be defined in the DT file in order to make use of them. The reset controller can be referenced in the standard way for reset controllers.
Hi Russell,
Quoted 8 lines
This patch would be simplified if this was based upon the not yet merged patchset from Tomasz Figa, "[PATCH v3 0/3] Generic Device Tree based power domain look-up".
For example you would likely not need to add some of the marvel specific DT bindings, and you wouldn?t need the
bus_notifiersto add devices to the power domain. I guess I just though it could be useful input to consider while going forward, unless you already knew.
In 3.19, I notice something of an odd behaviour.
My vMeta driver has runtime PM support enabled. When I explicitly register the PM domain in the pmu driver via a bus notifier, I see:
root at cubox:~# cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
domain status slaves
/device runtime status
----------------------------------------------------------------------
gpu-domain on
/devices/platform/vivante/etnaviv-gpu,2d active
vpu-domain off
/devices/platform/mbus/mbus:internal-regs/f1c00000.video-decoder suspended
But when I disable that, and let the generic code do the registration, I instead get:
root at cubox:~# cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
domain status slaves
/device runtime status
----------------------------------------------------------------------
gpu-domain on
/devices/platform/vivante/etnaviv-gpu,2d active
vpu-domain on
/devices/platform/mbus/mbus:internal-regs/f1c00000.video-decoder suspended
The difference being that the vpu domain remains powered.
The only difference code-wise seems to be when genpd_dev_pm_attach() is called. In the working case, it's before the device is considered for probing. In the non-working case, it's just before the device is probed.
With debugging enabled in the PM domain code, with the former case I get:
Added domain provider from /mbus/internal-regs/power-management at d0000/vpu-domain platform f1c00000.video-decoder: adding to PM domain vpu-domain platform f1c00000.video-decoder: __pm_genpd_add_device()
With the latter non-working case:
Added domain provider from /mbus/internal-regs/power-management at d0000/vpu-domain
...
ap510-vmeta f1c00000.video-decoder: adding to PM domain vpu-domain ap510-vmeta f1c00000.video-decoder: __pm_genpd_add_device()
vpu-domain: Power-on latency exceeded, new value 1578 ns
Neither of these debug messages provide much hint as to what the difference is, or the cause of the PM domain code being de-sync'd with its devices.
Maybe the PM code needs more debugging in it, and maybe the debugfs file should always be present if debugfs support is enabled?
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.
PATCH 3/5 ARM: dove: create a proper PMU driver for power domains, PMU IRQs and resets
Quoted 77 lines · Russell King - ARM Linux
Quoted 21 lines · Ulf Hansson
Quoted 9 lines · Russell King
The PMU device contains an interrupt controller, power control and resets. The interrupt controller is a little sub-standard in that there is no race free way to clear down pending interrupts, so we try to avoid problems by reducing the window as much as possible, and clearing as infrequently as possible.
The interrupt support is implemented using an IRQ domain, and the parent interrupt referenced in the standard DT way.
Quoted 8 lines
The power domains and reset support is closely related - there is a defined sequence for powering down a domain which is tightly coupled with asserting the reset. Hence, it makes sense to group these two together.
This patch adds the core PMU driver: power domains must be defined in the DT file in order to make use of them. The reset controller can be referenced in the standard way for reset controllers.
Hi Russell,
Quoted 8 lines
This patch would be simplified if this was based upon the not yet merged patchset from Tomasz Figa, "[PATCH v3 0/3] Generic Device Tree based power domain look-up".
For example you would likely not need to add some of the marvel specific DT bindings, and you wouldn?t need the
bus_notifiersto add devices to the power domain. I guess I just though it could be useful input to consider while going forward, unless you already knew.In 3.19, I notice something of an odd behaviour.
My vMeta driver has runtime PM support enabled. When I explicitly register the PM domain in the pmu driver via a bus notifier, I see:
root at cubox:~# cat
/sys/kernel/debug/pm_genpd/pm_genpd_summary
domain status slaves
/device runtime status
----------------------------------------------------------------------
gpu-domain on
/devices/platform/vivante/etnaviv-gpu,2d active
vpu-domain off
/devices/platform/mbus/mbus:internal-regs/f1c00000.video-decoder suspendedBut when I disable that, and let the generic code do the registration, I instead get:
root at cubox:~# cat
/sys/kernel/debug/pm_genpd/pm_genpd_summary
domain status slaves
/device runtime status
----------------------------------------------------------------------
gpu-domain on
/devices/platform/vivante/etnaviv-gpu,2d active
vpu-domain on
/devices/platform/mbus/mbus:internal-regs/f1c00000.video-decoder suspendedThe difference being that the vpu domain remains powered.
The only difference code-wise seems to be when
genpd_dev_pm_attach()is called. In the working case, it's before the device is considered for probing. In the non-working case, it's just before the device is probed.With debugging enabled in the PM domain code, with the former case I get:
Added domain provider from /mbus/internal-regs/power-management at d0000/vpu-domain platform f1c00000.video-decoder: adding to PM domain vpu-domain platform f1c00000.video-decoder:
__pm_genpd_add_device()With the latter non-working case:
Added domain provider from /mbus/internal-regs/power-management at d0000/vpu-domain
...
ap510-vmeta f1c00000.video-decoder: adding to PM domain vpu-domain ap510-vmeta f1c00000.video-decoder:__pm_genpd_add_device()
vpu-domain: Power-on latency exceeded, new value 1578 ns
Quoted 6 lines
Neither of these debug messages provide much hint as to what the difference is, or the cause of the PM domain code being de-sync'd with its devices.
Maybe the PM code needs more debugging in it, and maybe the debugfs file should always be present if debugfs support is enabled?
The vmeta driver does this in its probe function:
pm_runtime_use_autosuspend(vi->dev);
pm_runtime_set_autosuspend_delay(vi->dev, 100);
pm_runtime_enable(vi->dev);since it doesn't touch the hardware, and the hardware starts off at boot time in "suspended" mode.
I think what's going on is that there's a difference in the expectations from the PM domain code vs the runtime PM code. I refer to section 5 of the runtime PM documentation:
| 5. Runtime PM Initialization, Device Probing and Removal | | Initially, the runtime PM is disabled for all devices, which means that the | majority of the runtime PM helper functions described in Section 4 will return | -EAGAIN until pm_runtime_enable() is called for the device. | | In addition to that, the initial runtime PM status of all devices is | 'suspended', but it need not reflect the actual physical state of the device. | Thus, if the device is initially active (i.e. it is able to process I/O), its | runtime PM status must be changed to 'active', with the help of | pm_runtime_set_active(), before pm_runtime_enable() is called for the device.
However, the PM domain code seems to always power up the PM domain when a device is attached to it:
int genpd_dev_pm_attach(struct device *dev)
{
...
pm_genpd_poweron(pd);
return 0;
}EXPORT_SYMBOL_GPL(genpd_dev_pm_attach);
So, the PM domain code ends up disagreeing with the runtime PM code about the state of the device.
I think your commit (2ed127697eb1 "PM / Domains: Power on the PM domain right after attach completes") is fundamentally wrong. The assertion you make in there is built upon the assumption that every driver will call pm_runtime_set_active(), which is not an assumption you can make.
Instead, you should be doing is to hook into __pm_runtime_set_status() and use that to trigger the PM domain power up so that the runtime PM and PM domain state is always in step with each other.
What I'm certain of is that the current situation is just totally crazy.
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.
PATCH 3/5 ARM: dove: create a proper PMU driver for power domains, PMU IRQs and resets
Quoted 36 lines · Russell King - ARM Linux
I think what's going on is that there's a difference in the expectations from the PM domain code vs the runtime PM code. I refer to section 5 of the runtime PM documentation:
| 5. Runtime PM Initialization, Device Probing and Removal | | Initially, the runtime PM is disabled for all devices, which means that the | majority of the runtime PM helper functions described in Section 4 will return | -EAGAIN until pm_runtime_enable() is called for the device. | | In addition to that, the initial runtime PM status of all devices is | 'suspended', but it need not reflect the actual physical state of the device. | Thus, if the device is initially active (i.e. it is able to process I/O), its | runtime PM status must be changed to 'active', with the help of | pm_runtime_set_active(), before pm_runtime_enable() is called for the device.However, the PM domain code seems to always power up the PM domain when a device is attached to it:
int
genpd_dev_pm_attach(struct device *dev)
{
...pm_genpd_poweron(pd); return 0; }
EXPORT_SYMBOL_GPL(genpd_dev_pm_attach);So, the PM domain code ends up disagreeing with the runtime PM code about the state of the device.
I think your commit (
2ed127697eb1"PM / Domains: Power on the PM domain right after attach completes") is fundamentally wrong. The assertion you make in there is built upon the assumption that every driver will callpm_runtime_set_active(), which is not an assumption you can make.
Quoted 5 lines
Instead, you should be doing is to hook into
__pm_runtime_set_status()and use that to trigger the PM domain power up so that the runtime PM and PM domain state is always in step with each other.What I'm certain of is that the current situation is just totally crazy.
There are around 150 drivers in the kernel tree which do not call pm_runtime_set_active() before calling pm_runtime_enable(), so the assertion in the PM domains commit above is wrong. Some of them are only saved because they do a pm_runtime_get() immediately after pm_runtime_enable(), but that's in no way guaranteed - others do neither. So, for this to work properly, we need to address this issue _correctly_ rather than papering over the problem.
Here's a patch which solves the issue for me along the lines which I described above. I'm introducing a new callback - runtime_set_status() which the PM domain code uses to be notified of the runtime PM status updates while RPM is disabled. This callback will only occur from __pm_runtime_set_status(), which can only be used while runtime PM is disabled.
I believe it's safe - if we think that a PM domain is powered down, and the runtime PM status is then set active, it's clear that the PM domain absolutely must transition to active mode as well. If the runtime PM status is set to suspended, then the PM domain code can transition to off state.
I've left some of my debugging in place in the patch below as that's exactly the code I've tested.
drivers/base/power/domain.c +22 -2
@@ -5,7 +5,7 @@* * This file is released under the GPLv2. */ - +#define DEBUG #include <linux/kernel.h> #include <linux/io.h> #include <linux/platform_device.h>
@@ -158,6 +158,8 @@ static int genpd_power_on(struct generic_pm_domain *genpd)s64 elapsed_ns;int ret; +pr_debug ("%s: %s()\n" , genpd->name, __func__); +if (!genpd->power_on)return 0 ;
@@ -219,6 +221,10 @@ static int __pm_genpd_poweron(struct generic_pm_domain *genpd)DEFINE_WAIT (wait);int ret =0 ; +pr_debug ("%s: %s() status %u prepared %d spo %u\n" , + genpd->name, __func__, genpd->status, genpd->prepared_count, + genpd->suspend_power_off); +/* If the domain's master is being waited for, we have to wait too. */ for (;;) { prepare_to_wait(&genpd->status_wait_queue, &wait,
@@ -741,6 +747,20 @@ static int pm_genpd_runtime_resume(struct device *dev)return 0 ; } +static int pm_genpd_runtime_set_status (struct device *dev) +{ +int ret; + +dev_dbg (dev,"%s()\n" , __func__); + +if (pm_runtime_suspended (dev)) + ret =pm_genpd_runtime_suspend (dev); +else + ret =pm_genpd_runtime_resume (dev); + +return ret; +} +static bool pd_ignore_unused;static int __init pd_ignore_unused_setup (char *__unused) {
@@ -1907,6 +1927,7 @@ void pm_genpd_init(struct generic_pm_domain *genpd, genpd->max_off_time_changed = true; genpd->domain.ops.runtime_suspend = pm_genpd_runtime_suspend; genpd->domain.ops.runtime_resume = pm_genpd_runtime_resume; + genpd->domain.ops.runtime_set_status = pm_genpd_runtime_set_status; genpd->domain.ops.prepare = pm_genpd_prepare; genpd->domain.ops.suspend = pm_genpd_suspend; genpd->domain.ops.suspend_late = pm_genpd_suspend_late;
@@ -2223,7 +2244,6 @@ int genpd_dev_pm_attach(struct device *dev) } dev->pm_domain->detach = genpd_dev_pm_detach; -pm_genpd_poweron (pd);return 0 ; }
drivers/base/power/runtime.c +5 -0
@@ -981,6 +981,7 @@ int __pm_runtime_set_status(struct device *dev, unsigned int status)struct device *parent = dev->parent;unsigned long flags;bool notify_parent = false; +pm_callback_t callback;int error =0 ;if (status !=RPM_ACTIVE && status !=RPM_SUSPENDED )
@@ -1029,6 +1030,10 @@ int __pm_runtime_set_status(struct device *dev, unsigned int status) out_set:__update_runtime_status (dev, status); dev->power.runtime_error =0 ; +if (dev->power.no_callbacks) + goto out; + callback =RPM_GET_CALLBACK (dev, runtime_set_status); +rpm_callback (callback, dev); out:spin_unlock_irqrestore (&dev->power.lock, flags);
include/linux/pm.h +1 -0
@@ -316,6 +316,7 @@ struct dev_pm_ops {int (*runtime_suspend)(struct device *dev);int (*runtime_resume)(struct device *dev);int (*runtime_idle)(struct device *dev); +int (*runtime_set_status)(struct device *dev); };#ifdef CONFIG_PM_SLEEP
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.
PATCH 4/5 ARM: dove: add Dove PMU DT entries to dove.dtsi
In reply to Russell King - ARM Linux--- arch/arm/boot/dts/dove.dtsi | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/boot/dts/dove.dtsi +7 -0
@@ -367,6 +367,13 @@ status = "disabled"; }; + pmu: power-management at d0000 { + compatible = "marvell,pmu"; + reg = <0xd0000 0x8000>, <0xd8000 0x8000>; + interrupts = <33>; + #reset-cells = <1>; + }; + thermal: thermal-diode at d001c { compatible = "marvell,dove-thermal"; reg = <0xd001c 0x0c>, <0xd005c 0x08>;
Signature · 1 line
1.8.3.1
PATCH 5/5 ARM: dove: add non-DT PMU support
In reply to Russell King - ARM LinuxSince Dove has non-DT support still, this patch adds the static data to the PMU driver in order to initialise PMU domains.
--- arch/arm/mach-dove/pmu.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-)
arch/arm/mach-dove/pmu.c +75 -1
@@ -226,6 +226,20 @@ static void __pmu_domain_register(struct pmu_domain *domain)pm_genpd_init (&domain->base,NULL , !(val & domain->pwr_mask)); } +static void pmu_domain_register (struct pmu_data *pmu, +const struct pmu_domain *pmu_dom) +{ +struct pmu_domain *domain; + + domain =kmemdup (pmu_dom,sizeof (*domain),GFP_KERNEL ); +if (!domain) +return ; + + domain->pmu = pmu; + +__pmu_domain_register (domain); +} +static void pmu_add_genpd_of (struct device *dev) {struct device_node *node;
@@ -241,6 +255,15 @@ static void pmu_add_genpd_of(struct device *dev) } } +static void pmu_add_genpd_name (const char *name,struct device *dev) +{ +while (1 ) { +if (pm_genpd_name_add_device (name, dev) != -EAGAIN ) +break ; +cond_resched (); + } +} +static void pmu_remove_genpd (struct device *dev) {struct generic_pm_domain *genpd =dev_to_genpd (dev);
@@ -256,11 +279,19 @@ static int pmu_platform_call(struct notifier_block *nb, unsigned long event, void *data) { struct device *dev = data; +const char *name =NULL ; + +if (strcmp (dev_name (dev),"ap510-vmeta.0" ) ==0 ) + name ="vpu" ; +else if (strcmp (dev_name (dev),"galcore.0" ) ==0 ) + name ="gpu" ;switch (event) {case BUS_NOTIFY_ADD_DEVICE :if (dev->of_node)pmu_add_genpd_of (dev); +else if (name) +pmu_add_genpd_name (name, dev);break ;case BUS_NOTIFY_DEL_DEVICE :
@@ -363,6 +394,49 @@ static int __init dove_init_pmu_irq(struct pmu_data *pmu, int irq)return 0 ; } +static struct pmu_data pmu_data = { + .lock =__SPIN_LOCK_UNLOCKED (&pmu.lock), + .pmc_base =DOVE_PMU_VIRT_BASE , + .pmu_base =DOVE_PMU_VIRT_BASE +0x8000 , +}; + +static struct pmu_domain vpu_domain = { + .pwr_mask =PMU_PWR_DOWN_VPU , + .rst_mask =PMU_SW_RST_VIDEO_MASK , + .iso_mask =PMU_ISO_VPU , + .base = { + .name ="vpu" , + }, +}; + +static struct pmu_domain gpu_domain = { + .pwr_mask =PMU_PWR_DOWN_GPU , + .rst_mask =PMU_SW_RST_GPU_MASK , + .iso_mask =PMU_ISO_GPU , + .base = { + .name ="gpu" , + }, +}; + +static int __init dove_pmu_init_legacy (void ) +{ +struct pmu_data *pmu = &pmu_data; +int ret, parent_irq; + +pmu_reset_init (pmu); +pmu_domain_register (pmu, &vpu_domain); +pmu_domain_register (pmu, &gpu_domain); +pm_genpd_poweroff_unused (); + + ret =dove_init_pmu_irq (pmu,IRQ_DOVE_PMU ); +if (ret) +pr_err ("dove_init_pmu_irq() failed: %d\n" , ret); + +bus_register_notifier (&platform_bus_type, &platform_nb); + +return 0 ; +} +/* * pmu { * compatible = "marvell,pmu";
@@ -390,7 +464,7 @@ int __init dove_init_pmu(void)/* Lookup the PMU node */ np_pmu =of_find_compatible_node (NULL ,NULL ,"marvell,pmu" );if (!np_pmu) -return 0 ; +return dove_pmu_init_legacy (); pmu =kzalloc (sizeof (*pmu),GFP_KERNEL );if (!pmu)
Signature · 1 line
1.8.3.1
Sebastian Hesselbarth
maintainercover Dove PMU support
In reply to Russell King - ARM LinuxQuoted 25 lines · Russell King - ARM Linux
The following series of patches add better PMU support for Dove. This has been developed on the Cubox, and tested in non-DT and DT modes.
This also improves the interrupt handling over the existing code: the existing code ends up calling the interrupt handlers twice for every interrupt raised, because the interrupt clear-down is done at the wrong point - we need to clear down the interrupt in the device first, then clear it down in the controller.
The problem this gives is that it can be racy (see comments in the driver) so we're careful about how we do that to minimise the window.
I've included all patches here - the initial set are targetted towards adding DT support, with the final adding the non-DT support. There is a call to the initialisation function missing for DT mode - I'd like the mvebu people to comment on how that should be handled, as it needs to be done pretty early.
Also included are two PM domain changes: the first I've discussed with Rafael who seems happy with it. The second is necessary because we have no way to know if a generic PM domain is associated with a device or whether something else making use of the PM domain is installed in the
dev->pm_domainpointer, so this allows that decision to be made by core PM code.
Quoted 3 lines
This is more a "this is where I'm at" with this stuff than a real submission, nevertheless comments on how to get it ready for submission would be welcome. I'd like to get this off my plate ASAP.
Russell,
thanks for dropping those patches. I know you are packed with a bunch of other patch sets, so if you agree, I can pick up your Dove related patches and finish them.
One thing that comes into my mind is, that we moved Dove DT to mach-mvebu starting with v3.15-rc1 so we need to find a better place for the driver than mach-dove.
Sebastian
Quoted 11 lines
arch/arm/Kconfig | 1 + arch/arm/boot/dts/dove.dtsi | 7 + arch/arm/mach-dove/Makefile | 1 + arch/arm/mach-dove/common.c | 2 + arch/arm/mach-dove/common.h | 1 + arch/arm/mach-dove/include/mach/pm.h | 17 -- arch/arm/mach-dove/irq.c | 87 ------ arch/arm/mach-dove/pmu.c | 531 +++++++++++++++++++++++++++++++++++ drivers/base/power/domain.c | 8 +- 9 files changed, 547 insertions(+), 108 deletions(-)
Andrew Lunn
maintainercover Dove PMU support
Quoted 9 lines
Russell,
thanks for dropping those patches. I know you are packed with a bunch of other patch sets, so if you agree, I can pick up your Dove related patches and finish them.
One thing that comes into my mind is, that we moved Dove DT to mach-mvebu starting with v3.15-rc1 so we need to find a better place for the driver than mach-dove.
Create drivers/pmu ?
The cpufreq driver also needs access to registers within the pmu range. Should it be part of pmu.c, or should we export a regmap which cpufreq can use?
Andrew
Sebastian Hesselbarth
maintainercover Dove PMU support
Quoted 11 lines · Andrew Lunn
Quoted 9 lines
Russell,
thanks for dropping those patches. I know you are packed with a bunch of other patch sets, so if you agree, I can pick up your Dove related patches and finish them.
One thing that comes into my mind is, that we moved Dove DT to mach-mvebu starting with v3.15-rc1 so we need to find a better place for the driver than mach-dove.
Create
drivers/pmu?
Hmm, I see no other folder it could sit in. Maybe, yes.
Quoted 3 lines
The cpufreq driver also needs access to registers within the pmu range. Should it be part of
pmu.c, or should we export a regmap which cpufreq can use?
Not only cpufreq but also pinctrl as the first 16 mpps can have PMU related functions mapped to them. Syscon should do the trick.
Sebastian
cover Dove PMU support
Quoted 13 lines · Sebastian Hesselbarth
Quoted 11 lines · Andrew Lunn
Quoted 9 lines
Russell,
thanks for dropping those patches. I know you are packed with a bunch of other patch sets, so if you agree, I can pick up your Dove related patches and finish them.
One thing that comes into my mind is, that we moved Dove DT to mach-mvebu starting with v3.15-rc1 so we need to find a better place for the driver than mach-dove.
Create
drivers/pmu?
Quoted 8 lines
Hmm, I see no other folder it could sit in. Maybe, yes.
Quoted 3 lines
The cpufreq driver also needs access to registers within the pmu range. Should it be part of
pmu.c, or should we export a regmap which cpufreq can use?Not only cpufreq but also pinctrl as the first 16 mpps can have PMU related functions mapped to them. Syscon should do the trick.
The thing I don't like about regmap/syscon for this stuff is that it seems pretty easy to violate the statement in 8.6.2.4 when you lock individual register accesses.
This statement states that the power-up/power-down sequence for VMeta and the GPU must be completed one at a time. In other words, you can't interleave the power control of these units (which is what could happen if you rely on the locking provided by regmap/syscon.)
I'd prefer to take that a little further to avoid any unintended consequences (as indeed I have done in this patch) and ensure that these sequences are complete before any other system is controlled.
As for DT, I should probably state that I'm far from happy with the DT situation on Dove. When I've tried it, I've encountered problems with the HDMI output - the picture spends more time blanked than displaying. I've no idea what is causing that, I've been through the SI5351 registers, the TDA998x registers, the LCD controller registers, and I can't find any reason for it. Yet, boot the same kernel without DT and it works fine. Boot back using DT, and it's unstable again.
I can't detect any difference on the actual HDMI signals themselves either. The HDMI clock seems stable and of the correct frequency.
There is definitely some difference between booting with DT and booting with legacy stuff that seems to upset HDMI.
For me, the /only/ reliably working system is one where DT is not involved. This means I remain opposed to any solutions which can't be used in a non-DT environment - at least until the HDMI issue can be resolved.
Signature · 2 lines
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.
Sebastian Hesselbarth
maintainerDove DT and HDMI on v3.16-rc1 (was: Re: [PATCH RFC 0/5] Dove PMU support)
Quoted 11 lines · Russell King - ARM Linux
As for DT, I should probably state that I'm far from happy with the DT situation on Dove. When I've tried it, I've encountered problems with the HDMI output - the picture spends more time blanked than displaying. I've no idea what is causing that, I've been through the SI5351 registers, the TDA998x registers, the LCD controller registers, and I can't find any reason for it. Yet, boot the same kernel without DT and it works fine. Boot back using DT, and it's unstable again.
I can't detect any difference on the actual HDMI signals themselves either. The HDMI clock seems stable and of the correct frequency.
Quoted 7 lines
There is definitely some difference between booting with DT and booting with legacy stuff that seems to upset HDMI.
For me, the /only/ reliably working system is one where DT is not involved. This means I remain opposed to any solutions which can't be used in a non-DT environment - at least until the HDMI issue can be resolved.
Russell,
as said on IRC, I really want this to be sorted out. I prepared a Dove DT HDMI quick-hack and pushed it to
https://github.com/shesselba/linux-dove.git dove-drm-v3.16-rc1
Using your libdrm-armada and xf86-video-armada on Ubuntu raring armhf, I can run Xfce4 on 1920x1080p60 on Dove Cubox without any blanking issues. Using xrandr -s <mode> will fail after 2-3 times but that shouldn't be related to the issues you see.
Please test above branch with kernel config at
https://dl.dropboxusercontent.com/u/59928252/config-dove-v3.16-rc1-hdmi
and report back if issues are still there.
Anyone having a Dove CuBox ready, please also test. Russell has a git branch for the required video lib and drivers.
Sebastian
Dove DT and HDMI on v3.16-rc1 (was: Re: [PATCH RFC 0/5] Dove PMU support)
Quoted 20 lines · Sebastian Hesselbarth
Quoted 11 lines · Russell King - ARM Linux
As for DT, I should probably state that I'm far from happy with the DT situation on Dove. When I've tried it, I've encountered problems with the HDMI output - the picture spends more time blanked than displaying. I've no idea what is causing that, I've been through the SI5351 registers, the TDA998x registers, the LCD controller registers, and I can't find any reason for it. Yet, boot the same kernel without DT and it works fine. Boot back using DT, and it's unstable again.
I can't detect any difference on the actual HDMI signals themselves either. The HDMI clock seems stable and of the correct frequency.
Quoted 7 lines
There is definitely some difference between booting with DT and booting with legacy stuff that seems to upset HDMI.
For me, the /only/ reliably working system is one where DT is not involved. This means I remain opposed to any solutions which can't be used in a non-DT environment - at least until the HDMI issue can be resolved.
Quoted 7 lines
Russell,
as said on IRC, I really want this to be sorted out. I prepared a Dove DT HDMI quick-hack and pushed it to
https://github.com/shesselba/linux-dove.git dove-drm-v3.16-rc1
I can probably give a quick test to this using Qt over FB, or just plain fb-test / libdrm tests. But you are already doing a more involved test, so maybe my tests are too simple.
Quoted 5 lines
Using your libdrm-armada and xf86-video-armada on Ubuntu raring armhf, I can run Xfce4 on 1920x1080p60 on Dove Cubox without any blanking issues. Using xrandr -s <mode> will fail after 2-3 times but that shouldn't be related to the issues you see.
Quoted 7 lines
Please test above branch with kernel config at
https://dl.dropboxusercontent.com/u/59928252/config-dove-v3.16-rc1-hdmi
and report back if issues are still there.Anyone having a Dove CuBox ready, please also test. Russell has a git branch for the required video lib and drivers.
Can you point me at those?
Signature · 3 lines
Ezequiel Garc?a, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com
Dove DT and HDMI on v3.16-rc1 (was: Re: [PATCH RFC 0/5] Dove PMU support)
Quoted 10 lines · Ezequiel Garcia
Quoted 9 lines · Sebastian Hesselbarth
Using your libdrm-armada and xf86-video-armada on Ubuntu raring armhf, I can run Xfce4 on 1920x1080p60 on Dove Cubox without any blanking issues. Using xrandr -s <mode> will fail after 2-3 times but that shouldn't be related to the issues you see.
Please test above branch with kernel config at
https://dl.dropboxusercontent.com/u/59928252/config-dove-v3.16-rc1-hdmi
and report back if issues are still there.
Quoted 5 lines
Quoted 3 lines
Anyone having a Dove CuBox ready, please also test. Russell has a git branch for the required video lib and drivers.
Can you point me at those?
Beware - the machine is rather aged and slow by todays standards ((c)git is rather heavy weight):
http://ftp.arm.linux.org.uk/cgit/
The xf86-video-armada.git tree is not trivial to build as there's dependencies on the Vivante galcore libraries - and even if you have them, there's then there's non-trivial changes to the kernel-side driver to support dmabuf imports. Welcome to the world of closed source graphics libraries making open source hard... I've been wishing for etnaviv for a while now...
Even though the kernel side is supposed to be GPL, I'm really not happy distributing it or publishing changes as there are a number of files with headers which seem to be GPL-incompatible (which I've eliminated from my tree through updates) but the problem is wonderful git keeps them as history... and in my tree it's a massive 93 patches, against an old version of the code (0.8.0.1998) which I then sort-of updated to the version OLPC were carrying towards the start of 2013.
It's probably best if Sebastian walks you through getting it up and running as my experience is with my kernels and userspace, which has all the necessary hacks in.
Signature · 2 lines
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.
Sebastian Hesselbarth
maintainerDove DT and HDMI on v3.16-rc1
Quoted 37 lines · Russell King - ARM Linux
Quoted 10 lines · Ezequiel Garcia
Quoted 9 lines · Sebastian Hesselbarth
Using your libdrm-armada and xf86-video-armada on Ubuntu raring armhf, I can run Xfce4 on 1920x1080p60 on Dove Cubox without any blanking issues. Using xrandr -s <mode> will fail after 2-3 times but that shouldn't be related to the issues you see.
Please test above branch with kernel config at
https://dl.dropboxusercontent.com/u/59928252/config-dove-v3.16-rc1-hdmi
and report back if issues are still there.Quoted 5 lines
Quoted 3 lines
Anyone having a Dove CuBox ready, please also test. Russell has a git branch for the required video lib and drivers.
Can you point me at those?
Beware - the machine is rather aged and slow by todays standards ((c)git is rather heavy weight):
http://ftp.arm.linux.org.uk/cgit/
The xf86-video-armada.git tree is not trivial to build as there's dependencies on the Vivante galcore libraries - and even if you have them, there's then there's non-trivial changes to the kernel-side driver to support dmabuf imports. Welcome to the world of closed source graphics libraries making open source hard... I've been wishing for etnaviv for a while now...
Even though the kernel side is supposed to be GPL, I'm really not happy distributing it or publishing changes as there are a number of files with headers which seem to be GPL-incompatible (which I've eliminated from my tree through updates) but the problem is wonderful git keeps them as history... and in my tree it's a massive 93 patches, against an old version of the code (0.8.0.1998) which I then sort-of updated to the version OLPC were carrying towards the start of 2013.
Quoted 3 lines
It's probably best if Sebastian walks you through getting it up and running as my experience is with my kernels and userspace, which has all the necessary hacks in.
I basically followed Russell's guide from
http://www.home.arm.linux.org.uk/~rmk/cubox/carrier-1-readme.txt
with this binary/include package from SolidRun
http://download.solid-run.com/pub/solidrun/cubox/packages/marvell-opengl/marvell-opengl-hardfp-new-headers.zip
xf86-video-armada needs some missing
#include "picturestr.h"
for raring, but whole process has been very straight forward.
Feel free to bug me on IRC anytime you hit some build errors or anything else.
Sebastian
Dove DT and HDMI on v3.16-rc1
Quoted 3 lines · Sebastian Hesselbarth
xf86-video-armada needs some missing
#include "picturestr.h"
for raring, but whole process has been very straight forward.
I'm only aware of this (sorry, copy'n'pasted) which I found when trying to build against ubuntu 14.04. If further patches are needed to make it compatible with more Xorg versions, please ensure that they find their way into my inbox...
src/common_drm.h +1 -1
@@ -1,8 +1,8 @@ #ifndef COMMON_DRM_H #define COMMON_DRM_H -#include "compat-api.h" #include "xf86Crtc.h" +#include "compat-api.h" struct common_crtc_info { int drm_fd;
src/vivante_unaccel_render.c +1 -1
@@ -11,11 +11,11 @@#include "config.h" #endif -#include "compat-api.h" #include "fb.h" #include "fbpict.h" #include "mipict.h" +#include "compat-api.h" #include "vivante_unaccel.h" #include "vivante_utils.h"
Signature · 2 lines
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.
Sebastian Hesselbarth
maintainerDove DT and HDMI on v3.16-rc1
Quoted 9 lines · Russell King - ARM Linux
Quoted 3 lines · Sebastian Hesselbarth
xf86-video-armada needs some missing
#include "picturestr.h"
for raring, but whole process has been very straight forward.I'm only aware of this (sorry, copy'n'pasted) which I found when trying to build against ubuntu 14.04. If further patches are needed to make it compatible with more Xorg versions, please ensure that they find their way into my inbox...
Your patch also makes the xorg driver build fine on raring. When I encountered the build error, I just tried the first hit on Google
- I didn't investigate it at all.
Sebastian
Dove DT and HDMI on v3.16-rc1
Quoted 6 lines · Sebastian Hesselbarth
Quoted 5 lines · Russell King - ARM Linux
Quoted 3 lines · Sebastian Hesselbarth
xf86-video-armada needs some missing
#include "picturestr.h"
for raring, but whole process has been very straight forward.
Quoted 8 lines
Quoted 4 lines
I'm only aware of this (sorry, copy'n'pasted) which I found when trying to build against ubuntu 14.04. If further patches are needed to make it compatible with more Xorg versions, please ensure that they find their way into my inbox...
Your patch also makes the xorg driver build fine on raring. When I encountered the build error, I just tried the first hit on Google
- I didn't investigate it at all.
Thanks, just pushed that change out.
Signature · 2 lines
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.
Dove DT and HDMI on v3.16-rc1 (was: Re: [PATCH RFC 0/5] Dove PMU support)
In reply to Russell King - ARM LinuxQuoted 7 lines · Russell King - ARM Linux
Even though the kernel side is supposed to be GPL, I'm really not happy distributing it or publishing changes as there are a number of files with headers which seem to be GPL-incompatible (which I've eliminated from my tree through updates) but the problem is wonderful git keeps them as history... and in my tree it's a massive 93 patches, against an old version of the code (0.8.0.1998) which I then sort-of updated to the version OLPC were carrying towards the start of 2013.
If you want to remove some files from git history, you may look at the git-filter-branch man page. The first provided examples are most likely what you'd need.
Nicolas
Dove DT and HDMI on v3.16-rc1 (was: Re: [PATCH RFC 0/5] Dove PMU support)
In reply to Sebastian HesselbarthOn 18 Jun 04:11 PM, Sebastian Hesselbarth wrote:
[..]
Quoted 6 lines
as said on IRC, I really want this to be sorted out. I prepared a Dove DT HDMI quick-hack and pushed it to
https://github.com/shesselba/linux-dove.git dove-drm-v3.16-rc1
Tested the above branch using mvebu_v7_defconfig + Cubox-specific options and ran a few basic tests. I know it's not much, but here they are:
* The bootlogo shows up
* Legacy fbdev tests (fb-test, fb-test-rect, mplayer) worked fine in the default mode (1920x1080 in my case).
* Set a few different modes with LibDRM modetest tool:
modetest -M armada-drm -s 18:640x480 modetest -M armada-drm -s 18:800x600
...
modetest -M armada-drm -s 18:1920x1080
Signature · 3 lines
Ezequiel Garc?a, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com