Re: [PATCH v2 21/25] drm/virtio: Compute dumb-buffer sizes with drm_mode_size_dumb()

2025-02-20 Thread Dmitry Osipenko
args->height; > - args->size = ALIGN(args->size, PAGE_SIZE); > - > params.format = virtio_gpu_translate_format(DRM_FORMAT_HOST_XRGB); > params.width = args->width; > params.height = args->height; > @@ -92,7 +92,6 @@ int virtio_gpu_mode_dumb_create(struct d

Re: [QEMU PATCH v5 05/13] virtio-gpu: Configure context init for virglrenderer

2023-10-17 Thread Dmitry Osipenko
On 10/10/23 14:51, Daniel P. Berrangé wrote: > On Tue, Oct 10, 2023 at 02:41:22PM +0300, Dmitry Osipenko wrote: >> On 9/15/23 14:11, Huang Rui wrote: >>> Configure context init feature flag for virglrenderer. >>> >>> Originally-by: Antonio Caggiano >>>

Re: [QEMU PATCH v5 12/13] virtio-gpu: Initialize Venus

2023-10-10 Thread Dmitry Osipenko
On 9/15/23 14:11, Huang Rui wrote: > + if virgl.version().version_compare('>= 0.9.0') and > virgl.version().version_compare('< 1.0.0') > +message('Enabling virglrenderer unstable APIs') > +virgl = declare_dependency(compile_args: > '-DVIRGL_RENDERER_UNSTABLE_APIS', > +

Re: [QEMU PATCH v5 00/13] Support blob memory and venus on qemu

2023-10-10 Thread Dmitry Osipenko
On 9/15/23 14:11, Huang Rui wrote: > Hi all, > > Antonio Caggiano made the venus with QEMU on KVM platform last > September[1]. This series are inherited from his original work to support > the features of context init, hostmem, resource uuid, and blob resources > for venus. > At March of this yea

Re: [QEMU PATCH v5 13/13] virtio-gpu: Enable virglrenderer render server flag for venus

2023-10-10 Thread Dmitry Osipenko
On 9/15/23 14:11, Huang Rui wrote: > Venus in virglrenderer has required render server support. > > Signed-off-by: Huang Rui > --- > hw/display/virtio-gpu-virgl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl

Re: [QEMU PATCH v5 05/13] virtio-gpu: Configure context init for virglrenderer

2023-10-10 Thread Dmitry Osipenko
On 9/15/23 14:11, Huang Rui wrote: > Configure context init feature flag for virglrenderer. > > Originally-by: Antonio Caggiano > Signed-off-by: Huang Rui > --- > > V4 -> V5: > - Inverted patch 5 and 6 because we should configure > HAVE_VIRGL_CONTEXT_INIT firstly. (Philippe) > > mes

Re: [QEMU PATCH v4 12/13] virtio-gpu: Initialize Venus

2023-09-12 Thread Dmitry Osipenko
On 9/9/23 13:53, Huang Rui wrote: > On Thu, Aug 31, 2023 at 11:51:50PM +0800, Dmitry Osipenko wrote: >> On 8/31/23 13:40, Antonio Caggiano wrote: >>> Hi Huang, >>> >>> Thank you for pushing this forward! >>> >>> On 31/08/2023 11:32, Huang Rui

Re: [QEMU PATCH v4 12/13] virtio-gpu: Initialize Venus

2023-08-31 Thread Dmitry Osipenko
On 8/31/23 13:40, Antonio Caggiano wrote: > Hi Huang, > > Thank you for pushing this forward! > > On 31/08/2023 11:32, Huang Rui wrote: >> From: Antonio Caggiano >> >> Request Venus when initializing VirGL. >> >> Signed-off-by: Antonio Caggiano >> Signed-off-by: Huang Rui >> --- >> >> v1->v2:

Re: [RFC QEMU PATCH 08/18] virtio-gpu: Initialize Venus

2023-04-03 Thread Dmitry Osipenko
On 3/24/23 16:22, Huang Rui wrote: > On Thu, Mar 16, 2023 at 07:14:47AM +0800, Dmitry Osipenko wrote: >> On 3/13/23 18:55, Huang Rui wrote: >>> On Mon, Mar 13, 2023 at 01:51:03AM +0800, Dmitry Osipenko wrote: >>>> On 3/12/23 12:22, Huang Rui wrote: >>>>>

Re: [RFC QEMU PATCH 08/18] virtio-gpu: Initialize Venus

2023-03-15 Thread Dmitry Osipenko
On 3/13/23 18:55, Huang Rui wrote: > On Mon, Mar 13, 2023 at 01:51:03AM +0800, Dmitry Osipenko wrote: >> On 3/12/23 12:22, Huang Rui wrote: >>> From: Antonio Caggiano >>> >>> Request Venus when initializing VirGL. >>> >>> Signed-off-by: Antoni

Re: [RFC QEMU PATCH 08/18] virtio-gpu: Initialize Venus

2023-03-12 Thread Dmitry Osipenko
On 3/12/23 20:51, Dmitry Osipenko wrote: > On 3/12/23 12:22, Huang Rui wrote: >> From: Antonio Caggiano >> >> Request Venus when initializing VirGL. >> >> Signed-off-by: Antonio Caggiano >> --- >> hw/display/virtio-gpu-virgl.c | 4 >> 1

Re: [RFC QEMU PATCH 08/18] virtio-gpu: Initialize Venus

2023-03-12 Thread Dmitry Osipenko
On 3/12/23 12:22, Huang Rui wrote: > From: Antonio Caggiano > > Request Venus when initializing VirGL. > > Signed-off-by: Antonio Caggiano > --- > hw/display/virtio-gpu-virgl.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-v

Re: [PATCH] drm/virtio: Pass correct device to dma_sync_sgtable_for_device()

2023-02-26 Thread Dmitry Osipenko
On 2/25/23 17:55, Dmitry Osipenko wrote: > On 2/24/23 18:34, Oleksandr Tyshchenko wrote: >> From: Oleksandr Tyshchenko >> >> The "vdev->dev.parent" should be used instead of "vdev->dev" as a device >> for which to perform the DMA opera

Re: [PATCH] drm/virtio: Pass correct device to dma_sync_sgtable_for_device()

2023-02-25 Thread Dmitry Osipenko
m(bo) && use_dma_api) > - dma_sync_sgtable_for_device(&vgdev->vdev->dev, > + dma_sync_sgtable_for_device(vgdev->vdev->dev.parent, > bo->base.sgt, DMA_TO_DEVICE); > > cmd_p = virtio_gpu_alloc_cmd(vgdev, &vbuf, sizeof(*cmd_p)); Indeed, it's only the vgpu drm device that was moved to use the pci parent device. On x86 the vdev always has dma-ops, also virtio_has_dma_quirk=true for modern Qemu. So I didn't test this code path and apparently it's only testable on Xen, which is good to know. Reviewed-by: Dmitry Osipenko -- Best regards, Dmitry

Re: [PATCH v8 16/27] m68k: Switch to new sys-off handler API

2022-05-31 Thread Dmitry Osipenko
On 5/31/22 22:04, Geert Uytterhoeven wrote: > Hi Dmitry, > > On Tue, May 10, 2022 at 1:34 AM Dmitry Osipenko > wrote: >> Kernel now supports chained power-off handlers. Use >> register_power_off_handler() that registers power-off handlers and >> do_kernel_power_of

Re: [PATCH v8 07/27] kernel/reboot: Add kernel_can_power_off()

2022-05-24 Thread Dmitry Osipenko
On 5/24/22 18:03, Geert Uytterhoeven wrote: > Hi Dmitry, > > On Tue, May 24, 2022 at 3:41 PM Dmitry Osipenko > wrote: >> On 5/24/22 16:14, Geert Uytterhoeven wrote: >>> On Tue, May 10, 2022 at 1:33 AM Dmitry Osipenko >>> wrote: >>>> Add kernel

Re: [PATCH v8 07/27] kernel/reboot: Add kernel_can_power_off()

2022-05-24 Thread Dmitry Osipenko
On 5/24/22 16:14, Geert Uytterhoeven wrote: > Hi Dmitry, > > On Tue, May 10, 2022 at 1:33 AM Dmitry Osipenko > wrote: >> Add kernel_can_power_off() helper that replaces open-coded checks of >> the global pm_power_off variable. This is a necessary step towards >>

Re: [PATCH v8 00/27] Introduce power-off+restart call chain API

2022-05-19 Thread Dmitry Osipenko
On 5/18/22 17:46, Rafael J. Wysocki wrote: > On Tue, May 10, 2022 at 1:33 AM Dmitry Osipenko > wrote: ... >> Introduce new API that provides call chains support for all restart and >> power-off modes. The new API is designed with simplicity and extensibility >> in mind.

Re: [PATCH v8 01/27] notifier: Add atomic_notifier_call_chain_is_empty()

2022-05-11 Thread Dmitry Osipenko
On 5/10/22 21:14, Rafael J. Wysocki wrote: > On Tue, May 10, 2022 at 1:33 AM Dmitry Osipenko > wrote: >> Add atomic_notifier_call_chain_is_empty() that returns true if given >> atomic call chain is empty. > It would be good to mention a use case for it. > I

[PATCH v8 23/27] regulator: pfuze100: Use devm_register_sys_off_handler()

2022-05-09 Thread Dmitry Osipenko
Use devm_register_sys_off_handler() that replaces global pm_power_off_prepare variable and allows to register multiple power-off handlers. Acked-by: Mark Brown Signed-off-by: Dmitry Osipenko --- drivers/regulator/pfuze100-regulator.c | 42 +++--- 1 file changed, 17

[PATCH v8 12/27] arm64: Use do_kernel_power_off()

2022-05-09 Thread Dmitry Osipenko
Mirosław Signed-off-by: Dmitry Osipenko --- arch/arm64/kernel/process.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 142a51256669..92bcc1768f0b 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel

[PATCH v8 24/27] reboot: Remove pm_power_off_prepare()

2022-05-09 Thread Dmitry Osipenko
All pm_power_off_prepare() users were converted to sys-off handler API. Remove the obsolete global callback variable. Signed-off-by: Dmitry Osipenko --- include/linux/pm.h | 1 - kernel/reboot.c| 19 --- 2 files changed, 20 deletions(-) diff --git a/include/linux/pm.h b

[PATCH v8 17/27] sh: Use do_kernel_power_off()

2022-05-09 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new sys-off API. Reviewed-by: Michał Mirosław Signed-off-by: Dmitry

[PATCH v8 26/27] kernel/reboot: Add devm_register_power_off_handler()

2022-05-09 Thread Dmitry Osipenko
. Signed-off-by: Dmitry Osipenko --- include/linux/reboot.h | 4 kernel/reboot.c| 22 ++ 2 files changed, 26 insertions(+) diff --git a/include/linux/reboot.h b/include/linux/reboot.h index f185b64faae0..7c6e1f308f7c 100644 --- a/include/linux/reboot.h +++ b/include

[PATCH v8 15/27] powerpc: Use do_kernel_power_off()

2022-05-09 Thread Dmitry Osipenko
Mirosław Signed-off-by: Dmitry Osipenko --- arch/powerpc/kernel/setup-common.c | 4 +--- arch/powerpc/xmon/xmon.c | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 518ae5aa9410..1b586577e75b

[PATCH v8 09/27] ARM: Use do_kernel_power_off()

2022-05-09 Thread Dmitry Osipenko
: Michał Mirosław Signed-off-by: Dmitry Osipenko --- arch/arm/kernel/reboot.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/kernel/reboot.c b/arch/arm/kernel/reboot.c index 3044fcb8d073..2cb943422554 100644 --- a/arch/arm/kernel/reboot.c +++ b/arch/arm/kernel/reboot.c

[PATCH v8 20/27] mips: Use do_kernel_power_off()

2022-05-09 Thread Dmitry Osipenko
Mirosław Signed-off-by: Dmitry Osipenko --- arch/mips/kernel/reset.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/mips/kernel/reset.c b/arch/mips/kernel/reset.c index 6288780b779e..e7ce07b3e79b 100644 --- a/arch/mips/kernel/reset.c +++ b/arch/mips/kernel/reset.c

[PATCH v8 25/27] soc/tegra: pmc: Use sys-off handler API to power off Nexus 7 properly

2022-05-09 Thread Dmitry Osipenko
callbacks functionality that is required for powering-off devices properly. It also brings resource-managed API for the restart handler registration that makes PMC driver code cleaner. Signed-off-by: Dmitry Osipenko --- drivers/soc/tegra/pmc.c | 87 + 1 file

[PATCH v8 21/27] memory: emif: Use kernel_can_power_off()

2022-05-09 Thread Dmitry Osipenko
Replace legacy pm_power_off with kernel_can_power_off() helper that is aware about chained power-off handlers. Acked-by: Krzysztof Kozlowski Reviewed-by: Michał Mirosław Signed-off-by: Dmitry Osipenko --- drivers/memory/emif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v8 14/27] xen/x86: Use do_kernel_power_off()

2022-05-09 Thread Dmitry Osipenko
Signed-off-by: Dmitry Osipenko --- arch/x86/xen/enlighten_pv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c index 5038edb79ad5..af1f6e886225 100644 --- a/arch/x86/xen/enlighten_pv.c +++ b/arch/x86/xen

[PATCH v8 27/27] kernel/reboot: Add devm_register_restart_handler()

2022-05-09 Thread Dmitry Osipenko
-by: Dmitry Osipenko --- include/linux/reboot.h | 4 kernel/reboot.c| 22 ++ 2 files changed, 26 insertions(+) diff --git a/include/linux/reboot.h b/include/linux/reboot.h index 7c6e1f308f7c..e5d9ef886179 100644 --- a/include/linux/reboot.h +++ b/include/linux

[PATCH v8 22/27] ACPI: power: Switch to sys-off handler API

2022-05-09 Thread Dmitry Osipenko
Switch to sys-off API that replaces legacy pm_power_off callbacks, allowing us to remove global pm_* variables and support chaining of all restart and power-off modes consistently. Signed-off-by: Dmitry Osipenko --- drivers/acpi/sleep.c | 16 1 file changed, 12 insertions(+), 4

[PATCH v8 11/27] riscv: Use do_kernel_power_off()

2022-05-09 Thread Dmitry Osipenko
Signed-off-by: Dmitry Osipenko --- arch/riscv/kernel/reset.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/riscv/kernel/reset.c b/arch/riscv/kernel/reset.c index 9c842c41684a..912288572226 100644 --- a/arch/riscv/kernel/reset.c +++ b/arch/riscv/kernel

[PATCH v8 13/27] parisc: Use do_kernel_power_off()

2022-05-09 Thread Dmitry Osipenko
Mirosław Signed-off-by: Dmitry Osipenko --- arch/parisc/kernel/process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index a6a2a558fc5b..7c37e09c92da 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc

[PATCH v8 19/27] ia64: Use do_kernel_power_off()

2022-05-09 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new sys-off API. Reviewed-by: Michał Mirosław Signed-off-by: Dmitry

[PATCH v8 16/27] m68k: Switch to new sys-off handler API

2022-05-09 Thread Dmitry Osipenko
e can't convert platforms to the new API separately. There are only two platforms changed here, so it's not a big deal. Acked-by: Geert Uytterhoeven Reviewed-by: Michał Mirosław Signed-off-by: Dmitry Osipenko --- arch/m68k/emu/natfeat.c | 3 ++- arch/m68k/include/asm/machdep.

[PATCH v8 18/27] x86: Use do_kernel_power_off()

2022-05-09 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new sys-off API. Reviewed-by: Michał Mirosław Signed-off-by: Dmitry

[PATCH v8 10/27] csky: Use do_kernel_power_off()

2022-05-09 Thread Dmitry Osipenko
Signed-off-by: Dmitry Osipenko --- arch/csky/kernel/power.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/csky/kernel/power.c b/arch/csky/kernel/power.c index 923ee4e381b8..86ee202906f8 100644 --- a/arch/csky/kernel/power.c +++ b/arch/csky/kernel/power.c @@ -9,16 +9,14

[PATCH v8 08/27] kernel/reboot: Add register_platform_power_off()

2022-05-09 Thread Dmitry Osipenko
Add platform-level registration helpers that will ease transition of the arch/platform power-off callbacks to the new sys-off based API, allowing us to remove the global pm_power_off variable in the future. Signed-off-by: Dmitry Osipenko --- include/linux/reboot.h | 3 +++ kernel/reboot.c

[PATCH v8 06/27] kernel/reboot: Add stub for pm_power_off

2022-05-09 Thread Dmitry Osipenko
Add weak stub for the global pm_power_off callback variable. This will allow us to remove pm_power_off definitions from arch/ code and transition to the new sys-off based API that will replace the global variable. Signed-off-by: Dmitry Osipenko --- kernel/reboot.c | 6 ++ 1 file changed, 6

[PATCH v8 05/27] kernel/reboot: Add do_kernel_power_off()

2022-05-09 Thread Dmitry Osipenko
Add do_kernel_power_off() helper that will remove open-coded pm_power_off invocations from the architecture code. This is the first step on the way to remove the global pm_power_off variable, which will allow us to implement consistent power-off chaining support. Signed-off-by: Dmitry Osipenko

[PATCH v8 04/27] kernel/reboot: Wrap legacy power-off callbacks into sys-off handlers

2022-05-09 Thread Dmitry Osipenko
Wrap legacy power-off callbacks into sys-off handlers in order to support co-existence of both legacy and new callbacks while we're in process of upgrading legacy callbacks to the new API. Signed-off-by: Dmitry Osipenko --- kernel/reboot.c | 44 ++

[PATCH v8 03/27] kernel/reboot: Introduce sys-off handler API

2022-05-09 Thread Dmitry Osipenko
: Dmitry Osipenko --- include/linux/reboot.h | 77 + kernel/reboot.c| 182 + 2 files changed, 259 insertions(+) diff --git a/include/linux/reboot.h b/include/linux/reboot.h index a2429648d831..05981ef079d8 100644 --- a/include/linux

[PATCH v8 07/27] kernel/reboot: Add kernel_can_power_off()

2022-05-09 Thread Dmitry Osipenko
Add kernel_can_power_off() helper that replaces open-coded checks of the global pm_power_off variable. This is a necessary step towards supporting chained power-off handlers. Signed-off-by: Dmitry Osipenko --- include/linux/reboot.h | 1 + kernel/reboot.c| 14 +- 2 files

[PATCH v8 01/27] notifier: Add atomic_notifier_call_chain_is_empty()

2022-05-09 Thread Dmitry Osipenko
Add atomic_notifier_call_chain_is_empty() that returns true if given atomic call chain is empty. Reviewed-by: Michał Mirosław Signed-off-by: Dmitry Osipenko --- include/linux/notifier.h | 2 ++ kernel/notifier.c| 13 + 2 files changed, 15 insertions(+) diff --git a

[PATCH v8 02/27] notifier: Add blocking/atomic_notifier_chain_register_unique_prio()

2022-05-09 Thread Dmitry Osipenko
Add variant of blocking/atomic_notifier_chain_register() functions that allow registration of a notifier only if it has unique priority, otherwise -EBUSY error code is returned by the new functions. Reviewed-by: Michał Mirosław Signed-off-by: Dmitry Osipenko --- include/linux/notifier.h | 5

[PATCH v8 00/27] Introduce power-off+restart call chain API

2022-05-09 Thread Dmitry Osipenko
This preserves old behaviour for existing drivers once they are converted to the new API. Dmitry Osipenko (27): notifier: Add atomic_notifier_call_chain_is_empty() notifier: Add blocking/atomic_notifier_chain_register_unique_prio() kernel/reboot: Introduce sys-off handler API

Re: [PATCH v7 04/20] kernel: Add combined power-off+restart handler call chain API

2022-05-06 Thread Dmitry Osipenko
On 4/20/22 21:47, Rafael J. Wysocki wrote: + spin_unlock(&platform_power_off_lock); + + if (ret) + return ret; + + ret = register_power_off_handler(&priv->power_off_nb); + if (ret) + priv->platform_power_off

Re: [PATCH v7 04/20] kernel: Add combined power-off+restart handler call chain API

2022-05-06 Thread Dmitry Osipenko
On 4/20/22 21:47, Rafael J. Wysocki wrote: + void (*platform_power_off_cb)(void); + void (*simple_power_off_cb)(void *data); + void *simple_power_off_cb_data; >>> Is there any particular reason to put these callbacks here and not >>> directly into struct sys_off_han

Re: [PATCH v7 04/20] kernel: Add combined power-off+restart handler call chain API

2022-05-06 Thread Dmitry Osipenko
On 4/20/22 21:47, Rafael J. Wysocki wrote: +/** + * devm_register_prioritized_power_off_handler - Register prioritized power-off callback + * @dev: Device that registers callback + * @priority: Callback's priority + * @callback: Callback function

Re: [PATCH v7 04/20] kernel: Add combined power-off+restart handler call chain API

2022-05-06 Thread Dmitry Osipenko
On 4/20/22 21:47, Rafael J. Wysocki wrote: + POWEROFF_PREPARE, +}; + +/** + * struct power_off_data - Power-off callback argument + * + * @cb_data: Callback data. + */ +struct power_off_data { + void *cb_data; +}; + +/** >

Re: [PATCH v7 04/20] kernel: Add combined power-off+restart handler call chain API

2022-04-17 Thread Dmitry Osipenko
On 4/15/22 21:14, Rafael J. Wysocki wrote: > Honestly, I would prefer this to be split so as to make it easier to > review if nothing else. I'll try to split it in v8. > On Tue, Apr 12, 2022 at 1:39 AM Dmitry Osipenko > wrote: >> >> SoC platforms often have mu

Re: [PATCH v7 03/20] reboot: Print error message if restart handler has duplicated priority

2022-04-17 Thread Dmitry Osipenko
On 4/14/22 14:19, Rafael J. Wysocki wrote: > On Thu, Apr 14, 2022 at 12:24 AM Dmitry Osipenko > wrote: >> >> On 4/13/22 21:48, Rafael J. Wysocki wrote: >>> On Tue, Apr 12, 2022 at 1:39 AM Dmitry Osipenko >>> wrote: >>>> >>>> Add sanit

Re: [PATCH v7 03/20] reboot: Print error message if restart handler has duplicated priority

2022-04-13 Thread Dmitry Osipenko
On 4/13/22 21:48, Rafael J. Wysocki wrote: > On Tue, Apr 12, 2022 at 1:39 AM Dmitry Osipenko > wrote: >> >> Add sanity check which ensures that there are no two restart handlers >> registered using the same priority. This requirement will become mandatory >> once al

Re: [PATCH v7 17/20] memory: emif: Use kernel_can_power_off()

2022-04-12 Thread Dmitry Osipenko
On 4/12/22 02:38, Dmitry Osipenko wrote: > Replace legacy pm_power_off with kernel_can_power_off() helper that > is aware about chained power-off handlers. > > Signed-off-by: Dmitry Osipenko > --- > drivers/memory/emif.c | 2 +- > 1 file changed, 1 insertion(+), 1 deleti

Re: [PATCH v7 16/20] mips: Use do_kernel_power_off()

2022-04-12 Thread Dmitry Osipenko
On 4/12/22 02:38, Dmitry Osipenko wrote: > Kernel now supports chained power-off handlers. Use do_kernel_power_off() > that invokes chained power-off handlers. It also invokes legacy > pm_power_off() for now, which will be removed once all drivers will > be converted to the new p

Re: [PATCH v7 00/20] Introduce power-off+restart call chain API

2022-04-12 Thread Dmitry Osipenko
On 4/12/22 10:06, Geert Uytterhoeven wrote: > Hi Dmitry, > > On Tue, Apr 12, 2022 at 1:38 AM Dmitry Osipenko > wrote: >> Problem >> --- >> >> SoC devices require power-off call chaining functionality from kernel. >> We have a widely used restart

[PATCH v7 16/20] mips: Use do_kernel_power_off()

2022-04-11 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Signed-off-by: Dmitry Osipenko --- arch/mips

[PATCH v7 15/20] ia64: Use do_kernel_power_off()

2022-04-11 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Signed-off-by: Dmitry Osipenko --- arch/ia64

[PATCH v7 12/20] m68k: Switch to new sys-off handler API

2022-04-11 Thread Dmitry Osipenko
e can't convert platforms to the new API separately. There are only two platforms changed here, so it's not a big deal. Acked-by: Geert Uytterhoeven Signed-off-by: Dmitry Osipenko --- arch/m68k/emu/natfeat.c | 3 ++- arch/m68k/include/asm/machdep.h | 1 - arch/m68k/kernel/proce

[PATCH v7 09/20] parisc: Use do_kernel_power_off()

2022-04-11 Thread Dmitry Osipenko
: Dmitry Osipenko --- arch/parisc/kernel/process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 28b6a2a5574c..d145184696ea 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c @@ -26,6

[PATCH v7 10/20] xen/x86: Use do_kernel_power_off()

2022-04-11 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Acked-by: Juergen Gross Signed-off-by: Dmitry

[PATCH v7 06/20] csky: Use do_kernel_power_off()

2022-04-11 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Acked-by: Guo Ren Signed-off-by: Dmitry Osipenko

[PATCH v7 03/20] reboot: Print error message if restart handler has duplicated priority

2022-04-11 Thread Dmitry Osipenko
Add sanity check which ensures that there are no two restart handlers registered using the same priority. This requirement will become mandatory once all drivers will be converted to the new API and such errors will be fixed. Signed-off-by: Dmitry Osipenko --- kernel/reboot.c | 15

[PATCH v7 19/20] regulator: pfuze100: Use devm_register_sys_off_handler()

2022-04-11 Thread Dmitry Osipenko
Use devm_register_sys_off_handler() that replaces global pm_power_off_prepare variable and allows to register multiple power-off handlers. Acked-by: Mark Brown Signed-off-by: Dmitry Osipenko --- drivers/regulator/pfuze100-regulator.c | 38 ++ 1 file changed, 14

[PATCH v7 20/20] reboot: Remove pm_power_off_prepare()

2022-04-11 Thread Dmitry Osipenko
All pm_power_off_prepare() users were converted to sys-off handler API. Remove the obsolete callback. Signed-off-by: Dmitry Osipenko --- include/linux/pm.h | 1 - kernel/reboot.c| 11 --- 2 files changed, 12 deletions(-) diff --git a/include/linux/pm.h b/include/linux/pm.h index

[PATCH v7 00/20] Introduce power-off+restart call chain API

2022-04-11 Thread Dmitry Osipenko
e unique priority. Suggested by Guenter Roeck. - v2 API has power-off chaining disabled by default and require drivers to explicitly opt-in to the chaining. This preserves old behaviour for existing drivers once they are converted to the new API. Dmitry Osipenko (20): notifi

[PATCH v7 18/20] ACPI: power: Switch to sys-off handler API

2022-04-11 Thread Dmitry Osipenko
Switch to sys-off API that replaces legacy pm_power_off callbacks. Signed-off-by: Dmitry Osipenko --- drivers/acpi/sleep.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index c992e57b2c79..426297258e26

[PATCH v7 17/20] memory: emif: Use kernel_can_power_off()

2022-04-11 Thread Dmitry Osipenko
Replace legacy pm_power_off with kernel_can_power_off() helper that is aware about chained power-off handlers. Signed-off-by: Dmitry Osipenko --- drivers/memory/emif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c index

[PATCH v7 14/20] x86: Use do_kernel_power_off()

2022-04-11 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Signed-off-by: Dmitry Osipenko --- arch/x86/kernel

[PATCH v7 13/20] sh: Use do_kernel_power_off()

2022-04-11 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Signed-off-by: Dmitry Osipenko --- arch/sh/kernel

[PATCH v7 11/20] powerpc: Use do_kernel_power_off()

2022-04-11 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Acked-by: Michael Ellerman Signed-off-by: Dmitry

[PATCH v7 08/20] arm64: Use do_kernel_power_off()

2022-04-11 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Acked-by: Catalin Marinas Signed-off-by: Dmitry

[PATCH v7 07/20] riscv: Use do_kernel_power_off()

2022-04-11 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Acked-by: Palmer Dabbelt Signed-off-by: Dmitry

[PATCH v7 04/20] kernel: Add combined power-off+restart handler call chain API

2022-04-11 Thread Dmitry Osipenko
l existing drivers want, and thus, they could be easily converted to the new API. Users of the new API should explicitly enable power-off chaining by setting corresponding flag of the power_handler structure. Signed-off-by: Dmitry Osipenko --- include/linux/reboot.h | 229 ++- ke

[PATCH v7 02/20] notifier: Add atomic/blocking_notifier_chain_register_unique_prio()

2022-04-11 Thread Dmitry Osipenko
Add variant of atomic/blocking_notifier_chain_register() functions that doesn't allow to register notifier using a duplicated priority. The -EBUSY error code is returned in this case by the new API functions. Signed-off-by: Dmitry Osipenko --- include/linux/notifier.h | 5 +++ k

[PATCH v7 01/20] notifier: Add blocking_notifier_call_chain_is_empty()

2022-04-11 Thread Dmitry Osipenko
Add blocking_notifier_call_chain_is_empty() that returns true if call chain is empty. Signed-off-by: Dmitry Osipenko --- include/linux/notifier.h | 2 ++ kernel/notifier.c| 13 + 2 files changed, 15 insertions(+) diff --git a/include/linux/notifier.h b/include/linux

[PATCH v7 05/20] ARM: Use do_kernel_power_off()

2022-04-11 Thread Dmitry Osipenko
: Dmitry Osipenko --- arch/arm/kernel/reboot.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/kernel/reboot.c b/arch/arm/kernel/reboot.c index 3044fcb8d073..2cb943422554 100644 --- a/arch/arm/kernel/reboot.c +++ b/arch/arm/kernel/reboot.c @@ -116,9 +116,7 @@ void

Re: [PATCH v6 00/21] Introduce power-off+restart call chain API

2022-02-17 Thread Dmitry Osipenko
16.02.2022 23:30, Helge Deller пишет: > On 2/16/22 13:25, Rafael J. Wysocki wrote: >> On Tue, Feb 15, 2022 at 11:00 PM Dmitry Osipenko wrote: >>> >>> 31.01.2022 02:36, Dmitry Osipenko пишет: >>>> Problem >>>> --- >>>> >>>

Re: [PATCH v6 00/21] Introduce power-off+restart call chain API

2022-02-15 Thread Dmitry Osipenko
31.01.2022 02:36, Dmitry Osipenko пишет: > Problem > --- > > SoC devices require power-off call chaining functionality from kernel. > We have a widely used restart chaining provided by restart notifier API, > but nothing for power-off. > > Solution >

[PATCH v6 19/21] ACPI: power: Switch to sys-off handler API

2022-01-30 Thread Dmitry Osipenko
Switch to sys-off API that replaces legacy pm_power_off callbacks. Signed-off-by: Dmitry Osipenko --- drivers/acpi/sleep.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index a60ff5dfed3a..e27ac5b4645b

[PATCH v6 20/21] regulator: pfuze100: Use devm_register_sys_off_handler()

2022-01-30 Thread Dmitry Osipenko
Use devm_register_sys_off_handler() that replaces global pm_power_off_prepare variable and allows to register multiple power-off handlers. Acked-by: Mark Brown Signed-off-by: Dmitry Osipenko --- drivers/regulator/pfuze100-regulator.c | 38 ++ 1 file changed, 14

[PATCH v6 21/21] reboot: Remove pm_power_off_prepare()

2022-01-30 Thread Dmitry Osipenko
All pm_power_off_prepare() users were converted to sys-off handler API. Remove the obsolete callback. Signed-off-by: Dmitry Osipenko --- include/linux/pm.h | 1 - kernel/reboot.c| 11 --- 2 files changed, 12 deletions(-) diff --git a/include/linux/pm.h b/include/linux/pm.h index

[PATCH v6 16/21] mips: Use do_kernel_power_off()

2022-01-30 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Signed-off-by: Dmitry Osipenko --- arch/mips

[PATCH v6 17/21] nds32: Use do_kernel_power_off()

2022-01-30 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Signed-off-by: Dmitry Osipenko --- arch/nds32

[PATCH v6 18/21] memory: emif: Use kernel_can_power_off()

2022-01-30 Thread Dmitry Osipenko
Replace legacy pm_power_off with kernel_can_power_off() helper that is aware about chained power-off handlers. Signed-off-by: Dmitry Osipenko --- drivers/memory/emif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c index

[PATCH v6 15/21] ia64: Use do_kernel_power_off()

2022-01-30 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Signed-off-by: Dmitry Osipenko --- arch/ia64

[PATCH v6 14/21] x86: Use do_kernel_power_off()

2022-01-30 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Signed-off-by: Dmitry Osipenko --- arch/x86/kernel

[PATCH v6 13/21] sh: Use do_kernel_power_off()

2022-01-30 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Signed-off-by: Dmitry Osipenko --- arch/sh/kernel

[PATCH v6 12/21] m68k: Switch to new sys-off handler API

2022-01-30 Thread Dmitry Osipenko
e can't convert platforms to the new API separately. There are only two platforms changed here, so it's not a big deal. Acked-by: Geert Uytterhoeven Signed-off-by: Dmitry Osipenko --- arch/m68k/emu/natfeat.c | 3 ++- arch/m68k/include/asm/machdep.h | 1 - arch/m68k/kernel/proce

[PATCH v6 11/21] powerpc: Use do_kernel_power_off()

2022-01-30 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Acked-by: Michael Ellerman Signed-off-by: Dmitry

[PATCH v6 10/21] xen/x86: Use do_kernel_power_off()

2022-01-30 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Acked-by: Juergen Gross Signed-off-by: Dmitry

[PATCH v6 09/21] parisc: Use do_kernel_power_off()

2022-01-30 Thread Dmitry Osipenko
: Dmitry Osipenko --- arch/parisc/kernel/process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index ea3d83b6fb62..928201b1f58f 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c @@ -26,6

[PATCH v6 08/21] arm64: Use do_kernel_power_off()

2022-01-30 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Acked-by: Catalin Marinas Signed-off-by: Dmitry

[PATCH v6 07/21] riscv: Use do_kernel_power_off()

2022-01-30 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Acked-by: Palmer Dabbelt Signed-off-by: Dmitry

[PATCH v6 06/21] csky: Use do_kernel_power_off()

2022-01-30 Thread Dmitry Osipenko
Kernel now supports chained power-off handlers. Use do_kernel_power_off() that invokes chained power-off handlers. It also invokes legacy pm_power_off() for now, which will be removed once all drivers will be converted to the new power-off API. Acked-by: Guo Ren Signed-off-by: Dmitry Osipenko

[PATCH v6 04/21] kernel: Add combined power-off+restart handler call chain API

2022-01-30 Thread Dmitry Osipenko
l existing drivers want, and thus, they could be easily converted to the new API. Users of the new API should explicitly enable power-off chaining by setting corresponding flag of the power_handler structure. Signed-off-by: Dmitry Osipenko --- include/linux/reboot.h | 265 ++- ke

[PATCH v6 05/21] ARM: Use do_kernel_power_off()

2022-01-30 Thread Dmitry Osipenko
: Dmitry Osipenko --- arch/arm/kernel/reboot.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/kernel/reboot.c b/arch/arm/kernel/reboot.c index 3044fcb8d073..2cb943422554 100644 --- a/arch/arm/kernel/reboot.c +++ b/arch/arm/kernel/reboot.c @@ -116,9 +116,7 @@ void

[PATCH v6 03/21] reboot: Print error message if restart handler has duplicated priority

2022-01-30 Thread Dmitry Osipenko
Add sanity check which ensures that there are no two restart handlers registered using the same priority. This requirement will become mandatory once all drivers will be converted to the new API and such errors will be fixed. Signed-off-by: Dmitry Osipenko --- kernel/reboot.c | 15

[PATCH v6 01/21] notifier: Add blocking_notifier_call_chain_is_empty()

2022-01-30 Thread Dmitry Osipenko
Add blocking_notifier_call_chain_is_empty() that returns true if call chain is empty. Signed-off-by: Dmitry Osipenko --- include/linux/notifier.h | 2 ++ kernel/notifier.c| 13 + 2 files changed, 15 insertions(+) diff --git a/include/linux/notifier.h b/include/linux

  1   2   3   >