linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] soc: imx: gpc: Power off PU domain in suspend/resume on 6qp
@ 2018-07-02 11:52 Leonard Crestez
  2018-07-02 11:52 ` [PATCH 1/2] soc: imx: gpc: Use static platform_device instances Leonard Crestez
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Leonard Crestez @ 2018-07-02 11:52 UTC (permalink / raw)
  To: linux-arm-kernel

Tested by doing `rtcwake -s 5 -m mem` while running glxgears on etnaviv.

The first patch is required because otherwise it is not easy to reach pgc
domains from the gpc itself when using new-style bindings. It's also
easier to understand.

The use of dynamic allocation in this driver is strange. Since there is
only one GPC physically present in each soc my impulse would be to make
most things global and delete imx_gpc_driver.remove entirely.

With current code (even without my patches) attempting to dynamically
remove/probe the GPC fils since since the per-pgc platform_device
instances are not removed. I'm trying something like this:

echo 130000.gpu > /sys/bus/platform/drivers/etnaviv-gpu/unbind
echo 134000.gpu > /sys/bus/platform/drivers/etnaviv-gpu/unbind
echo 20dc000.gpc  > /sys/bus/platform/drivers/imx-gpc/unbind
echo 20dc000.gpc  > /sys/bus/platform/drivers/imx-gpc/bind

But is there any usecase for dynamically removing the GPC? Instead of
trying to fix it I'd rather delete imx_gpc_driver.remove, just like
for gpcv2. Would anyone object to a patch doing this?

This series is not very pretty, constructive suggestions is welcome.
NXP internal tree has quite a lot of changes in gpc code and this causes
a lot of trouble when doing upgrades so I am trying to push some of the
internal features upstream.

Maybe instead of direct calls from mach-imx the gpc could implement
SLEEP_PM_OPS instead? It would still need a way to access the pgc
devices directly.

Leonard Crestez (2):
  soc: imx: gpc: Use static platform_device instances
  soc: imx: gpc: Power off PU domain in suspend/resume on 6qp

 arch/arm/mach-imx/gpc.c | 10 +++++
 drivers/soc/imx/gpc.c   | 93 ++++++++++++++++++++++++++---------------
 2 files changed, 70 insertions(+), 33 deletions(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-07-02 13:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-02 11:52 [PATCH 0/2] soc: imx: gpc: Power off PU domain in suspend/resume on 6qp Leonard Crestez
2018-07-02 11:52 ` [PATCH 1/2] soc: imx: gpc: Use static platform_device instances Leonard Crestez
2018-07-02 11:52 ` [PATCH 2/2] soc: imx: gpc: Power off PU domain in suspend/resume on 6qp Leonard Crestez
2018-07-02 12:05   ` Lucas Stach
2018-07-02 12:15 ` [PATCH 0/2] " Lucas Stach
2018-07-02 13:49   ` Leonard Crestez
2018-07-02 13:58     ` Lucas Stach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).