Re: [PATCH v2 0/3] drm/lima: fix devfreq refcount imbalance for job timeouts

2024-04-14 Thread Qiang Yu
applied to drm-misc-next On Sat, Apr 6, 2024 at 3:32 PM Qiang Yu wrote: > > Serial is Reviewed-by: Qiang Yu > > On Fri, Apr 5, 2024 at 11:31 PM Erico Nunes wrote: > > > > v1 reference: > > https://patchwork.freedesktop.org/series/131902/ > > > > Cha

Re: [PATCH 0/2] drm/lima: two driver cleanups

2024-04-14 Thread Qiang Yu
applied to drm-misc-next On Thu, Apr 4, 2024 at 8:51 PM Qiang Yu wrote: > > Serial is Reviewed-by: Qiang Yu > > On Tue, Apr 2, 2024 at 6:43 AM Erico Nunes wrote: > > > > Patch 1 is a fix for a crash which triggers on removing the module on > > kernels w

Re: [PATCH v2 0/3] drm/lima: fix devfreq refcount imbalance for job timeouts

2024-04-06 Thread Qiang Yu
Serial is Reviewed-by: Qiang Yu On Fri, Apr 5, 2024 at 11:31 PM Erico Nunes wrote: > > v1 reference: > https://patchwork.freedesktop.org/series/131902/ > > Changes v1 -> v2: > - Split synchronize_irq of pp bcast irq change into (new) patch 2. > > Erico Nunes (3):

Re: [PATCH 0/2] drm/lima: two driver cleanups

2024-04-04 Thread Qiang Yu
Serial is Reviewed-by: Qiang Yu On Tue, Apr 2, 2024 at 6:43 AM Erico Nunes wrote: > > Patch 1 is a fix for a crash which triggers on removing the module on > kernels with CONFIG_DEBUG_SHIRQ enabled, such as the Fedora kernel. > > Patch 2 is a fix to this warning: > dr

Re: [PATCH 2/2] drm/lima: mask irqs in timeout path before hard reset

2024-04-04 Thread Qiang Yu
Reviewed-by: Qiang Yu On Tue, Apr 2, 2024 at 5:20 AM Erico Nunes wrote: > > There is a race condition in which a rendering job might take just long > enough to trigger the drm sched job timeout handler but also still > complete before the hard reset is done by the timeout handler.

Re: [PATCH 1/2] drm/lima: add mask irq callback to gp and pp

2024-04-04 Thread Qiang Yu
On Tue, Apr 2, 2024 at 5:20 AM Erico Nunes wrote: > > This is needed because we want to reset those devices in device-agnostic > code such as lima_sched. > In particular, masking irqs will be useful before a hard reset to > prevent race conditions. > > Signed-off-by: Erico Nunes > --- >

Re: [PATCH v2 0/8] drm/lima: fixes and improvements to error recovery

2024-02-12 Thread Qiang Yu
applied to drm-misc-next On Tue, Jan 30, 2024 at 9:07 AM Qiang Yu wrote: > > Serial is Reviewed-by: QIang Yu > > On Wed, Jan 24, 2024 at 11:00 AM Erico Nunes wrote: > > > > v1 reference: > > https://patchwork.kernel.org/project/dri-devel/cover/20240117031212.1

Re: [PATCH v2 0/8] drm/lima: fixes and improvements to error recovery

2024-01-29 Thread Qiang Yu
Serial is Reviewed-by: QIang Yu On Wed, Jan 24, 2024 at 11:00 AM Erico Nunes wrote: > > v1 reference: > https://patchwork.kernel.org/project/dri-devel/cover/20240117031212.1104034-1-nunes.er...@gmail.com/ > > Changes v1 -> v2: > - Dropped patch 1 which

Re: [PATCH v2 5/8] drm/lima: handle spurious timeouts due to high irq latency

2024-01-29 Thread Qiang Yu
On Tue, Jan 30, 2024 at 6:55 AM Erico Nunes wrote: > > On Wed, Jan 24, 2024 at 1:38 PM Qiang Yu wrote: > > > > On Wed, Jan 24, 2024 at 11:00 AM Erico Nunes wrote: > > > > > > There are several unexplained and unreproduced cases of rendering > > > tim

Re: [PATCH v2 5/8] drm/lima: handle spurious timeouts due to high irq latency

2024-01-24 Thread Qiang Yu
ndex c3bf8cda8498..814428564637 100644 > --- a/drivers/gpu/drm/lima/lima_sched.c > +++ b/drivers/gpu/drm/lima/lima_sched.c > @@ -1,6 +1,7 @@ > // SPDX-License-Identifier: GPL-2.0 OR MIT > /* Copyright 2017-2019 Qiang Yu */ > > +#include > #include > #include >

Re: [PATCH v1 1/6] drm/lima: fix devfreq refcount imbalance for job timeouts

2024-01-23 Thread Qiang Yu
On Wed, Jan 24, 2024 at 7:19 AM Erico Nunes wrote: > > On Fri, Jan 19, 2024 at 2:50 AM Qiang Yu wrote: > > > > On Thu, Jan 18, 2024 at 7:14 PM Erico Nunes wrote: > > > > > > On Thu, Jan 18, 2024 at 2:36 AM Qiang Yu wrote: > > > > > &g

Re: [PATCH v1 4/6] drm/lima: handle spurious timeouts due to high irq latency

2024-01-22 Thread Qiang Yu
On Sun, Jan 21, 2024 at 11:11 PM Erico Nunes wrote: > > On Sun, Jan 21, 2024 at 12:20 PM Qiang Yu wrote: > > > > On Sun, Jan 21, 2024 at 5:56 PM Hillf Danton wrote: > > > > > > On Wed, 17 Jan 2024 04:12:10 +0100 Erico Nunes > > > > > > &

Re: [PATCH v1 4/6] drm/lima: handle spurious timeouts due to high irq latency

2024-01-21 Thread Qiang Yu
On Sun, Jan 21, 2024 at 5:56 PM Hillf Danton wrote: > > On Wed, 17 Jan 2024 04:12:10 +0100 Erico Nunes > > > > @@ -401,9 +399,33 @@ static enum drm_gpu_sched_stat > > lima_sched_timedout_job(struct drm_sched_job *job > > struct lima_sched_pipe *pipe = to_lima_pipe(job->sched); > >

Re: [PATCH v1 4/6] drm/lima: handle spurious timeouts due to high irq latency

2024-01-20 Thread Qiang Yu
On Fri, Jan 19, 2024 at 9:43 AM Qiang Yu wrote: > > On Wed, Jan 17, 2024 at 11:12 AM Erico Nunes wrote: > > > > There are several unexplained and unreproduced cases of rendering > > timeouts with lima, for which one theory is high IRQ latency coming from > >

Re: [PATCH] [v2] drm/lima: fix a memleak in lima_heap_alloc

2024-01-18 Thread Qiang Yu
applied to drm-misc-next On Wed, Jan 17, 2024 at 8:14 PM Qiang Yu wrote: > > Reviewed-by: Qiang Yu > > On Wed, Jan 17, 2024 at 3:14 PM Zhipeng Lu wrote: > > > > When lima_vm_map_bo fails, the resources need to be deallocated, or > > there will be memleaks. >

Re: [PATCH v1 1/6] drm/lima: fix devfreq refcount imbalance for job timeouts

2024-01-18 Thread Qiang Yu
On Thu, Jan 18, 2024 at 7:14 PM Erico Nunes wrote: > > On Thu, Jan 18, 2024 at 2:36 AM Qiang Yu wrote: > > > > So this is caused by same job trigger both done and timeout handling? > > I think a better way to solve this is to make sure only one handler > > (do

Re: [PATCH v1 4/6] drm/lima: handle spurious timeouts due to high irq latency

2024-01-18 Thread Qiang Yu
ed.c > b/drivers/gpu/drm/lima/lima_sched.c > index 66317296d831..9449b81bcd5b 100644 > --- a/drivers/gpu/drm/lima/lima_sched.c > +++ b/drivers/gpu/drm/lima/lima_sched.c > @@ -1,6 +1,7 @@ > // SPDX-License-Identifier: GPL-2.0 OR MIT > /* Copyright 2017-2019 Qiang Yu */ > > +#inc

Re: [PATCH v1 4/6] drm/lima: handle spurious timeouts due to high irq latency

2024-01-17 Thread Qiang Yu
ed.c > b/drivers/gpu/drm/lima/lima_sched.c > index 66317296d831..9449b81bcd5b 100644 > --- a/drivers/gpu/drm/lima/lima_sched.c > +++ b/drivers/gpu/drm/lima/lima_sched.c > @@ -1,6 +1,7 @@ > // SPDX-License-Identifier: GPL-2.0 OR MIT > /* Copyright 2017-2019 Qiang Yu */ > > +#inc

Re: [PATCH v1 3/6] drm/lima: set bus_stop bit before hard reset

2024-01-17 Thread Qiang Yu
Do we need same for GP? Regards, Qiang On Wed, Jan 17, 2024 at 11:12 AM Erico Nunes wrote: > > This is required for reliable hard resets. Otherwise, doing a hard reset > while a task is still running (such as a task which is being stopped by > the drm_sched timeout handler) may result in random

Re: [PATCH v1 2/6] drm/lima: reset async_reset on pp hard reset

2024-01-17 Thread Qiang Yu
GP should also need this. Regards, Qiang On Wed, Jan 17, 2024 at 11:12 AM Erico Nunes wrote: > > Lima pp jobs use an async reset to avoid having to wait for the soft > reset right after a job. The soft reset is done at the end of a job and > a reset_complete flag is expected to be set at the

Re: [PATCH v1 1/6] drm/lima: fix devfreq refcount imbalance for job timeouts

2024-01-17 Thread Qiang Yu
So this is caused by same job trigger both done and timeout handling? I think a better way to solve this is to make sure only one handler (done or timeout) process the job instead of just making lima_pm_idle() unique. Regards, Qiang On Wed, Jan 17, 2024 at 11:12 AM Erico Nunes wrote: > > In

Re: [PATCH] [v2] drm/lima: fix a memleak in lima_heap_alloc

2024-01-17 Thread Qiang Yu
Reviewed-by: Qiang Yu On Wed, Jan 17, 2024 at 3:14 PM Zhipeng Lu wrote: > > When lima_vm_map_bo fails, the resources need to be deallocated, or > there will be memleaks. > > Fixes: 6aebc51d7aef ("drm/lima: support heap buffer creation") > Signed-off-by: Zhipeng L

Re: [PATCH] drm/lima: fix a memleak in lima_heap_alloc

2024-01-15 Thread Qiang Yu
Thanks for the fix. As the error handling gets longer and duplicated, could you rearrange them like the lima_gem_submit(): err_out2: dma_unmap_sgtable(dev, , DMA_BIDIRECTIONAL, 0); err_out1: kfree(bo->base.sgt); bo->base.sgt = NULL; err_out0: sg_free_table(); return ret.

Re: [PATCH] RFC: drm/lima: fix calling drm_mm_init with an empty range

2023-12-18 Thread Qiang Yu
Thanks for the fix. It could be done in a simpler way that swap the va_start/va_end init/fini and empty_vm create/release. On Thu, Dec 14, 2023 at 5:04 PM Alban Browaeys wrote: > > For the empty_vm initialization the range is empty which is not supported > by drm_mm_init. > > With

Re: [PATCH 2/2] drm/lima: fix Wvoid-pointer-to-enum-cast warning

2023-08-10 Thread Qiang Yu
Reviewed-by: Qiang Yu On Thu, Aug 10, 2023 at 5:59 PM Krzysztof Kozlowski wrote: > > 'id' is an enum, thus cast of pointer on 64-bit compile test with W=1 > causes: > > lima_drv.c:387:13: error: cast to smaller integer type 'enum lima_gpu_id' > from 'const void *' [-Wer

Re: [Lima] [PATCH] drm/lima: fix sched context destroy

2023-06-06 Thread Qiang Yu
Reviewed-by: Qiang Yu Applied to drm-misc-fixes. On Wed, Jun 7, 2023 at 9:18 AM Vasily Khoruzhick wrote: > > On Tue, Jun 6, 2023 at 7:33 AM Erico Nunes wrote: > > > > The drm sched entity must be flushed before finishing, to account for > > jobs potentially stil

Re: [PATCH 0/3] Revert lima fdinfo patchset

2023-04-04 Thread Qiang Yu
Applied to drm-misc-next, sorry for the trouble. Regards, Qiang On Wed, Apr 5, 2023 at 3:28 AM Daniel Vetter wrote: > > On Tue, Apr 04, 2023 at 04:17:33PM +0100, Emil Velikov wrote: > > On Tue, 4 Apr 2023 at 08:13, wrote: > > > > > > From: Qiang Yu >

Re: linux-next: build failure after merge of the drm-misc tree

2023-04-03 Thread Qiang Yu
I think you can just revert the following three lima commits when merge: * 4a66f3da99dc ("drm/lima: add show_fdinfo for drm usage stats") * 87767de835ed ("drm/lima: allocate unique id per drm_file") * bccafec957a5 ("drm/lima: add usage counting method to ctx_mgr") Regards, Qiang On Mon, Apr 3,

Re: [PATCH 0/3] drm/lima: expose usage statistics via fdinfo

2023-04-02 Thread Qiang Yu
drm-misc-next or left to branch maintainer to decide whether to pick this patchset upstream? Regards, Qiang > > > On Mon, Mar 13, 2023 at 11:09 AM Qiang Yu wrote: > > > > > > Patch set is: > > > Reviewed-by: Qiang Yu > > > > > > Looks like drm-mi

Re: [PATCH 0/3] drm/lima: expose usage statistics via fdinfo

2023-04-02 Thread Qiang Yu
Applied to drm-misc-next. On Mon, Mar 13, 2023 at 11:09 AM Qiang Yu wrote: > > Patch set is: > Reviewed-by: Qiang Yu > > Looks like drm-misc-next does not contain "df622729ddbf drm/scheduler: > track GPU active time per entity" yet. > Will apply later. > >

Re: [PATCH] drm/lima/lima_drv: Add missing unwind goto in lima_pdev_probe()

2023-04-02 Thread Qiang Yu
Applied to drm-misc-next. On Tue, Mar 14, 2023 at 2:22 PM Qiang Yu wrote: > > Reviewed-by: Qiang Yu > > On Tue, Mar 14, 2023 at 1:27 PM Harshit Mogalapalli > wrote: > > > > Smatch reports: > > drivers/gpu/drm/lima/lima_drv.c:396 lima_pdev_probe() warn

Re: [PATCH] drm/lima/lima_drv: Add missing unwind goto in lima_pdev_probe()

2023-03-14 Thread Qiang Yu
Reviewed-by: Qiang Yu On Tue, Mar 14, 2023 at 1:27 PM Harshit Mogalapalli wrote: > > Smatch reports: > drivers/gpu/drm/lima/lima_drv.c:396 lima_pdev_probe() warn: > missing unwind goto? > > Store return value in err and goto 'err_out0' which has > lima_sched_slab_fi

Re: [PATCH 1/2] drm/lima: Use drm_sched_job_add_syncobj_dependency()

2023-03-12 Thread Qiang Yu
Patch is: Reviewed-by: Qiang Yu On Sat, Feb 25, 2023 at 5:41 AM Maíra Canal wrote: > > As lima_gem_add_deps() performs the same steps as > drm_sched_job_add_syncobj_dependency(), replace the open-coded > implementation in Lima in order to simply use the DRM function. > > Si

Re: [PATCH 0/3] drm/lima: expose usage statistics via fdinfo

2023-03-12 Thread Qiang Yu
Patch set is: Reviewed-by: Qiang Yu Looks like drm-misc-next does not contain "df622729ddbf drm/scheduler: track GPU active time per entity" yet. Will apply later. Regards, Qiang On Mon, Mar 13, 2023 at 7:31 AM Erico Nunes wrote: > > Expose lima gp and pp usage stats through f

Re: [PATCH 3/3] drm/lima: add show_fdinfo for drm usage stats

2023-03-12 Thread Qiang Yu
On Mon, Mar 13, 2023 at 7:31 AM Erico Nunes wrote: > > This exposes an accumulated active time per client via the fdinfo > infrastructure per execution engine, following > Documentation/gpu/drm-usage-stats.rst. > In lima, the exposed execution engines are gp and pp. > > Signed-off-by: Erico Nunes

Re: [PATCH v2] drm/lima: Fix opp clkname setting in case of missing regulator

2022-11-14 Thread Qiang Yu
Applied to drm-misc-fixes. On Mon, Oct 31, 2022 at 6:35 PM Erico Nunes wrote: > > On Thu, Oct 27, 2022 at 10:05 AM Viresh Kumar wrote: > > Acked-by: Viresh Kumar > > Thanks. > > Could someone take a final look and apply this? I don't have drm-misc > commit rights. > > Erico

[PATCH] drm/amdgpu: fix suspend/resume hang regression

2022-02-28 Thread Qiang Yu
ing flag") Signed-off-by: Qiang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 2cd9f1a2e5fa..fc4563cf2828 100644 --- a/drivers/gpu/d

Re: [PATCH v2] drm/amdgpu: check vm ready by amdgpu_vm->evicting flag

2022-02-22 Thread Qiang Yu
On Wed, Feb 23, 2022 at 3:47 PM Paul Menzel wrote: > > Dear Qiang, > > > Am 22.02.22 um 03:46 schrieb Qiang Yu: > > Workstation application ANSA/META v21.1.4 get this error dmesg when > > running CI test suite provided by ANSA/META: > > [drm:amdgpu_gem_va_ioctl

[PATCH v2] drm/amdgpu: check vm ready by amdgpu_vm->evicting flag

2022-02-21 Thread Qiang Yu
list but no page table in it) gets done immediately. v2: update commit comments. Reviewed-by: Christian König Signed-off-by: Qiang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_

[PATCH] drm/amdgpu: check vm ready by evicting

2022-02-21 Thread Qiang Yu
M ops. But we'd better clear the error log by check the evicting flag which really stop VM ops latter. Signed-off-by: Qiang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/driv

Re: [PATCH] drm/amdgpu: check vm bo eviction valuable at last

2022-02-20 Thread Qiang Yu
On Fri, Feb 18, 2022 at 6:24 PM Christian König wrote: > > Am 18.02.22 um 11:16 schrieb Qiang Yu: > > [SNIP] > >>> If amdgpu_vm_ready() use evicting flag, it's still not equivalent to check > >>> vm idle: true -> vm idle, false -> vm may be idle or busy.

Re: [PATCH] drm/amdgpu: check vm bo eviction valuable at last

2022-02-18 Thread Qiang Yu
On Fri, Feb 18, 2022 at 5:27 PM Christian König wrote: > > Am 18.02.22 um 09:58 schrieb Qiang Yu: > > On Fri, Feb 18, 2022 at 3:46 PM Christian König > > wrote: > >> Am 18.02.22 um 04:08 schrieb Qiang Yu: > >>> On Thu, Feb 17, 2022 at 8:22 PM Christian Kö

Re: [PATCH] drm/amdgpu: check vm bo eviction valuable at last

2022-02-18 Thread Qiang Yu
On Fri, Feb 18, 2022 at 3:46 PM Christian König wrote: > > Am 18.02.22 um 04:08 schrieb Qiang Yu: > > On Thu, Feb 17, 2022 at 8:22 PM Christian König > > wrote: > >> Am 17.02.22 um 11:58 schrieb Qiang Yu: > >>> On Thu, Feb 17, 2022 at 6:39 PM Christi

Re: [PATCH] drm/amdgpu: check vm bo eviction valuable at last

2022-02-17 Thread Qiang Yu
On Thu, Feb 17, 2022 at 8:22 PM Christian König wrote: > > Am 17.02.22 um 11:58 schrieb Qiang Yu: > > On Thu, Feb 17, 2022 at 6:39 PM Christian König > > wrote: > >> > >> > >> Am 17.02.22 um 11:13 schrieb Qiang Yu: > >>> On Thu, Feb 17

Re: [PATCH] drm/amdgpu: check vm bo eviction valuable at last

2022-02-17 Thread Qiang Yu
On Thu, Feb 17, 2022 at 6:39 PM Christian König wrote: > > > > Am 17.02.22 um 11:13 schrieb Qiang Yu: > > On Thu, Feb 17, 2022 at 5:46 PM Christian König > > wrote: > >> Am 17.02.22 um 10:40 schrieb Qiang Yu: > >>> On Thu, Feb 17, 2022 at 5:15 PM Chr

Re: [PATCH] drm/amdgpu: check vm bo eviction valuable at last

2022-02-17 Thread Qiang Yu
On Thu, Feb 17, 2022 at 5:46 PM Christian König wrote: > > Am 17.02.22 um 10:40 schrieb Qiang Yu: > > On Thu, Feb 17, 2022 at 5:15 PM Christian König > > wrote: > >> Am 17.02.22 um 10:04 schrieb Qiang Yu: > >>> Workstation app

Re: [PATCH] drm/amdgpu: check vm bo eviction valuable at last

2022-02-17 Thread Qiang Yu
On Thu, Feb 17, 2022 at 5:15 PM Christian König wrote: > > Am 17.02.22 um 10:04 schrieb Qiang Yu: > > Workstation application ANSA/META get this error dmesg: > > [drm:amdgpu_gem_va_ioctl [amdgpu]] *ERROR* Couldn't update BO_VA (-16) > > > > This is caused by

[PATCH] drm/amdgpu: check vm bo eviction valuable at last

2022-02-17 Thread Qiang Yu
M ops. But we'd better make the amdgpu_vm->evicting correctly reflact the vm status and clear the error log. Signed-off-by: Qiang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 85 ++--- 1 file changed, 47 insertions(+), 38 deletions(-) diff --git a/drivers/gpu/drm/amd/a

Re: [PATCH v2] drm/lima: avoid error task dump attempt when not enabled

2022-02-11 Thread Qiang Yu
lar message when the user > has not explicitly set the max_error_tasks parameter to enable the > feature. > > Signed-off-by: Erico Nunes > Reviewed-by: Qiang Yu > Reviewed-by: Javier Martinez Canillas > --- > v2: > - collect review tags > - update summary line to "drm/lima:"

Re: [PATCH] lima: avoid error task dump attempt when not enabled

2022-02-06 Thread Qiang Yu
Looks good for me, patch is: Reviewed-by: Qiang Yu On Sun, Feb 6, 2022 at 2:59 AM Erico Nunes wrote: > > Currently when users try to run an application with lima and that hits > an issue such as a timeout, a message saying "fail to save task state" > and "error

[PATCH] drm/lima: fix warning when CONFIG_DEBUG_SG=y & CONFIG_DMA_API_DEBUG=y

2021-10-30 Thread Qiang Yu
Otherwise get following warning: DMA-API: lima 1c4.gpu: mapping sg segment longer than device claims to support [len=4149248] [max=65536] See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5496 Reported-by: Roman Stratiienko Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima

Re: [PATCH] drm/lima: Remove unused lima_vm_print()

2021-08-22 Thread Qiang Yu
This function is kept for debug usage. On Fri, Aug 20, 2021 at 10:19 AM Cai Huoqing wrote: > > lima_vm_print() isn't used, so remove it > > Signed-off-by: Cai Huoqing > --- > drivers/gpu/drm/lima/lima_vm.c | 29 - > drivers/gpu/drm/lima/lima_vm.h | 1 - > 2 files

Re: [PATCH v5 08/20] drm/lima: use scheduler dependency tracking

2021-08-13 Thread Qiang Yu
Thanks for the remind, indeed miss a lock. Patch is: Reviewed-by: Qiang Yu Regards, Qiang On Fri, Aug 13, 2021 at 3:28 AM Daniel Vetter wrote: > > On Thu, Aug 05, 2021 at 12:46:53PM +0200, Daniel Vetter wrote: > > Nothing special going on here. > > > > Aside reviewing

Re: [PATCH] drm/lima: Convert to clk_bulk API

2021-07-19 Thread Qiang Yu
linx-bsp/recipes-graphics/mali/kernel-module-mali > > -Mads > > On 7/19/21, 10:38 AM, "Jianqiang Chen" wrote: > > Add Mads. > > Thanks, > Jason > > > -Original Message- > > From: Michal Simek > > Sent: Mo

Re: [PATCH] drm/lima: Convert to clk_bulk API

2021-07-17 Thread Qiang Yu
On Sat, Jul 17, 2021 at 10:52 PM Marek Vasut wrote: > > On 7/17/21 4:21 PM, Qiang Yu wrote: > > On Sat, Jul 17, 2021 at 9:08 PM Marek Vasut wrote: > >> > >> On 7/17/21 2:34 PM, Qiang Yu wrote: > >>> On Sat, Jul 17, 2021 at 2:20 AM Marek Vasut wrot

Re: [PATCH] drm/lima: Convert to clk_bulk API

2021-07-17 Thread Qiang Yu
On Sat, Jul 17, 2021 at 9:08 PM Marek Vasut wrote: > > On 7/17/21 2:34 PM, Qiang Yu wrote: > > On Sat, Jul 17, 2021 at 2:20 AM Marek Vasut wrote: > >> > >> Instead of requesting two separate clock and then handling them > >> separately in various pla

Re: [PATCH] drm/lima: Convert to clk_bulk API

2021-07-17 Thread Qiang Yu
pp0"/"gpu_pp1" clk? Do they need to be controlled separately or we can just control the "gpu" clk? Because the devfreq code just controls a single module clk. > > Signed-off-by: Marek Vasut > Cc: Qiang Yu > Cc: l...@lists.freedesktop.org > --- >

[X11][Question] Any plan on explicit synchronization for X11?

2021-04-01 Thread Qiang Yu
Hi guys, I have some interest to enable explicit sync for X11, so send a draft MR to collect feedback: https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/34 As no comments on the gitlab MR, send this to mailing list and hope to hear some voice. If NAKed early, it will save me a

Re: [PATCH] drm/lima: Use delayed timer as default in devfreq profile

2021-02-07 Thread Qiang Yu
Applied to drm-misc-next. Regards, Qiang On Thu, Feb 4, 2021 at 10:24 PM Lukasz Luba wrote: > > > > On 2/4/21 1:39 PM, Robin Murphy wrote: > > On 2021-02-03 02:01, Qiang Yu wrote: > >> On Tue, Feb 2, 2021 at 10:02 PM Lukasz Luba wrote: > >>> > >>

Re: [PATCH v2] drm/lima: add governor data with pre-defined thresholds

2021-02-07 Thread Qiang Yu
Applied to drm-misc-next. Regards, Qiang On Tue, Feb 2, 2021 at 9:04 AM Qiang Yu wrote: > > OK, I see. Patch is also: > Reviewed-by: Qiang Yu > > Regards, > Qiang > > On Mon, Feb 1, 2021 at 5:59 PM Lukasz Luba wrote: > > > > > > > > On 1/30/2

Re: [PATCH] drm/lima: Use delayed timer as default in devfreq profile

2021-02-02 Thread Qiang Yu
On Tue, Feb 2, 2021 at 10:02 PM Lukasz Luba wrote: > > > > On 2/2/21 1:01 AM, Qiang Yu wrote: > > Hi Lukasz, > > > > Thanks for the explanation. So the deferred timer option makes a mistake > > that > > when GPU goes from idle to busy for only one p

Re: [PATCH v2] drm/lima: add governor data with pre-defined thresholds

2021-02-01 Thread Qiang Yu
OK, I see. Patch is also: Reviewed-by: Qiang Yu Regards, Qiang On Mon, Feb 1, 2021 at 5:59 PM Lukasz Luba wrote: > > > > On 1/30/21 1:57 PM, Qiang Yu wrote: > > This patch gets minor improvement on glmark2 (160->162). > > It has bigger impact when the load is

Re: [PATCH] drm/lima: Use delayed timer as default in devfreq profile

2021-02-01 Thread Qiang Yu
like phone suspend? Regards, Qiang On Mon, Feb 1, 2021 at 5:53 PM Lukasz Luba wrote: > > Hi Qiang, > > On 1/30/21 1:51 PM, Qiang Yu wrote: > > Thanks for the patch. But I can't observe any difference on glmark2 > > with or without this patch. > > Maybe you ca

Re: [PATCH v2] drm/lima: add governor data with pre-defined thresholds

2021-01-30 Thread Qiang Yu
This patch gets minor improvement on glmark2 (160->162). Seems there's no way for user to change this value, do we? Or there's work pending to expose it to sysfs? Regards, Qiang On Thu, Jan 28, 2021 at 3:40 AM Christian Hewitt wrote: > > This patch adapts the panfrost pre-defined thresholds

Re: [PATCH] drm/lima: Use delayed timer as default in devfreq profile

2021-01-30 Thread Qiang Yu
Thanks for the patch. But I can't observe any difference on glmark2 with or without this patch. Maybe you can provide other test which can benefit from it. Considering it will wake up CPU more frequently, and user may choose to change this by sysfs, I'd like to not apply it. Regards, Qiang On

Re: [PATCH] drm/lima: fix reference leak in lima_pm_busy

2021-01-29 Thread Qiang Yu
Thanks, applied to drm-misc-next. Regards, Qiang On Fri, Nov 27, 2020 at 5:42 PM Qinglang Miao wrote: > > pm_runtime_get_sync will increment pm usage counter even it > failed. Forgetting to putting operation will result in a > reference leak here. > > A new function pm_runtime_resume_and_get is

Re: [PATCH 5/7] drm/lima: dev_pm_opp_put_*() accepts NULL argument

2020-11-15 Thread Qiang Yu
Looks good for me, patch is: Reviewed-by: Qiang Yu Regards, Qiang On Fri, Nov 6, 2020 at 3:05 PM Viresh Kumar wrote: > > The dev_pm_opp_put_*() APIs now accepts a NULL opp_table pointer and so > there is no need for us to carry the extra check. Drop them. > > Signed-off-b

Re: [PATCH V2 Resend 1/2] drm/lima: Unconditionally call dev_pm_opp_of_remove_table()

2020-11-15 Thread Qiang Yu
remove_table() > unconditionally here. > > Reviewed-by: Qiang Yu > Signed-off-by: Viresh Kumar > > --- > V2: Applied Reviewed by tag. > --- > drivers/gpu/drm/lima/lima_devfreq.c | 6 +- > drivers/gpu/drm/lima/lima_devfreq.h | 1 - > 2 files changed, 1 insertion(+), 6 delet

Re: [PATCH 23/40] drm/lima/lima_sched: Remove unused and unnecessary variable 'ret'

2020-11-15 Thread Qiang Yu
but > not used [-Wunused-but-set-variable] > > Cc: Qiang Yu > Cc: David Airlie > Cc: Daniel Vetter > Cc: Sumit Semwal > Cc: "Christian König" > Cc: dri-devel@lists.freedesktop.org > Cc: l...@lists.freedesktop.org > Cc: linux-me...@vger.kernel.org > Cc:

Re: [PATCH -next] drm/lima: simplify the return expression of lima_devfreq_target

2020-11-15 Thread Qiang Yu
Applied to drm-misc-next. On Sat, Sep 19, 2020 at 6:43 PM Qiang Yu wrote: > > Looks good for me, patch is: > Reviewed-by: Qiang Yu > > Regards, > Qiang > > On Sat, Sep 19, 2020 at 5:47 PM Liu Shixin wrote: > > > > Simplify the return expressio

Re: [PATCH 15/40] drm/lima/lima_drv: Demote kernel-doc formatting abuse

2020-11-15 Thread Qiang Yu
Applied to drm-misc-next. On Fri, Nov 13, 2020 at 9:50 PM Lee Jones wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/lima/lima_drv.c:264: warning: cannot understand function > prototype: 'const struct drm_driver lima_drm_driver = ' > > Cc:

Re: [PATCH -next] drm/lima: simplify the return expression of lima_devfreq_target

2020-09-19 Thread Qiang Yu
Looks good for me, patch is: Reviewed-by: Qiang Yu Regards, Qiang On Sat, Sep 19, 2020 at 5:47 PM Liu Shixin wrote: > > Simplify the return expression. > > Signed-off-by: Liu Shixin > --- > drivers/gpu/drm/lima/lima_devfreq.c | 7 +-- > 1 file changed, 1 inse

Re: [PATCH 2/8] drm/lima: Unconditionally call dev_pm_opp_of_remove_table()

2020-08-22 Thread Qiang Yu
Looks good for me, patch is: Reviewed-by: Qiang Yu Regards, Qiang On Thu, Aug 20, 2020 at 6:44 PM Viresh Kumar wrote: > > dev_pm_opp_of_remove_table() doesn't report any errors when it fails to > find the OPP table with error -ENODEV (i.e. OPP table not present for > the device)

Re: [PATCH] drm/lima: fix wait pp reset timeout

2020-07-19 Thread Qiang Yu
Thanks, applied to drm-misc-fixes. Regards, Qiang On Sun, Jul 19, 2020 at 6:41 PM Erico Nunes wrote: > > On Sun, Jul 19, 2020 at 9:31 AM Qiang Yu wrote: > > > > PP bcast is marked as doing async reset after job is done. > > When resume after suspend, each PP is re

[PATCH] drm/lima: fix wait pp reset timeout

2020-07-19 Thread Qiang Yu
/lima: add resume/suspend callback for each ip") Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_pp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/lima/lima_pp.c b/drivers/gpu/drm/lima/lima_pp.c index 33f01383409c..a5c95bed08c0 100644 --- a/drivers/gpu/drm/lima

Re: [PATCH] drm/lima: Expose job_hang_limit module parameter

2020-07-13 Thread Qiang Yu
Applied to drm-misc-next: https://cgit.freedesktop.org/drm/drm-misc/ Sorry for the late response. Regards, Qiang On Tue, Jul 7, 2020 at 12:17 AM Andrey Lebedev wrote: > > Hello guys, > > What is the status of this patch? Was this committed to any branch? Is > it pending for merge to the

Re: [PATCH] drm/lima: Expose job_hang_limit module parameter

2020-06-18 Thread Qiang Yu
On Thu, Jun 18, 2020 at 10:58 PM Andrey Lebedev wrote: > > From: Andrey Lebedev > > Some pp or gp jobs can be successfully repeated even after they time outs. > Introduce lima module parameter to specify number of times a job can hang > before being dropped. > > Signed-off-by: Andrey Lebedev >

Re: [PATCH] drm/lima: Expose job_hang_limit module parameter

2020-06-18 Thread Qiang Yu
ima/lima_drv.c > @@ -19,6 +19,7 @@ > int lima_sched_timeout_ms; > uint lima_heap_init_nr_pages = 8; > uint lima_max_error_tasks; > +int lima_job_hang_limit; Better be an "uint" to avoid negative check. With this fixed, patch is: Reviewed-by: Qiang Yu Regards, Qiang > >

Re: [PATCH v5 13/38] drm: lima: fix common struct sg_table related issues

2020-05-17 Thread Qiang Yu
Looks good for me, patch is: Reviewed-by: Qiang Yu Regards, Qiang On Wed, May 13, 2020 at 9:33 PM Marek Szyprowski wrote: > > The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function > returns the number of the created entries in the DMA address space. > However th

Re: [PATCH 1/2] drm/lima: Clean up IRQ warnings

2020-04-24 Thread Qiang Yu
Applied to drm-misc-next. Thanks, Qiang On Wed, Apr 22, 2020 at 9:29 AM Qiang Yu wrote: > > Looks good for me, patch 1&2 are: > Reviewed-by: Qiang Yu > > Regards, > Qiang > > On Wed, Apr 22, 2020 at 6:51 AM Robin Murphy wrote: > > > > Use the option

Re: [PATCH v2 00/10] drm/lima: add suspend/resume support

2020-04-24 Thread Qiang Yu
Thanks, fix and applied to drm-misc-next. Regards, Qiang On Wed, Apr 22, 2020 at 1:51 PM Vasily Khoruzhick wrote: > > On Tue, Apr 21, 2020 at 6:37 AM Qiang Yu wrote: > > > > Suspend need to wait running jobs finish and put hardware in > > poweroff state. Resume

Re: [PATCH 1/2] drm/lima: Clean up IRQ warnings

2020-04-21 Thread Qiang Yu
Looks good for me, patch 1&2 are: Reviewed-by: Qiang Yu Regards, Qiang On Wed, Apr 22, 2020 at 6:51 AM Robin Murphy wrote: > > Use the optional form of platform_get_irq() for blocks that legitimately > may not be present, to avoid getting an annoying barrage of spurious >

[PATCH v2 05/10] drm/lima: add lima_devfreq_resume/suspend

2020-04-21 Thread Qiang Yu
Used for device resume/suspend in the following commits. Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_devfreq.c | 24 drivers/gpu/drm/lima/lima_devfreq.h | 3 +++ 2 files changed, 27 insertions(+) diff --git a/drivers/gpu/drm/lima/lima_devfreq.c b/drivers

[PATCH v2 10/10] drm/lima: enable runtime pm

2020-04-21 Thread Qiang Yu
Enable runtime pm by default so GPU suspend when idle for 200ms. This value can be changed by autosuspend_delay_ms in device's power sysfs dir. On Allwinner H3 lima_device_resume takes ~40us and lima_device_suspend takes ~20us. Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_drv.c | 21

[PATCH v2 06/10] drm/lima: power down ip blocks when pmu exit

2020-04-21 Thread Qiang Yu
Prepare resume/suspend PM. v2: Fix lima_pmu_wait_cmd timeout when mali400 case. Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_device.h | 2 ++ drivers/gpu/drm/lima/lima_pmu.c| 53 +- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH v2 03/10] drm/lima: check vm != NULL in lima_vm_put

2020-04-21 Thread Qiang Yu
No need to handle this check before calling lima_vm_put. Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_sched.c | 7 ++- drivers/gpu/drm/lima/lima_vm.h| 3 ++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/lima/lima_sched.c b/drivers/gpu/drm/lima

[PATCH v2 09/10] drm/lima: add pm resume/suspend ops

2020-04-21 Thread Qiang Yu
Add driver pm system and runtime hardware resume/suspend ops. Note this won't enable runtime pm of the device yet. v2: Do clock and power gating when suspend/resume. Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_device.c | 90 ++ drivers/gpu/drm/lima

[PATCH v2 07/10] drm/lima: add resume/suspend callback for each ip

2020-04-21 Thread Qiang Yu
For called when PM do resume/suspend. Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_bcast.c| 25 drivers/gpu/drm/lima/lima_bcast.h| 2 ++ drivers/gpu/drm/lima/lima_device.c | 4 +++ drivers/gpu/drm/lima/lima_device.h | 2 +- drivers/gpu/drm/lima

[PATCH v2 02/10] drm/lima: print process name and pid when task error

2020-04-21 Thread Qiang Yu
When error task list is full, print the process info where the error task come from for debug usage. Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_sched.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/lima/lima_sched.c b/drivers/gpu/drm/lima

[PATCH v2 08/10] drm/lima: seperate clk/regulator enable/disable function

2020-04-21 Thread Qiang Yu
For being used by both device init/fini and suspend/resume. Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_device.c | 105 +++-- 1 file changed, 68 insertions(+), 37 deletions(-) diff --git a/drivers/gpu/drm/lima/lima_device.c b/drivers/gpu/drm/lima

[PATCH v2 04/10] drm/lima: always set page directory when switch vm

2020-04-21 Thread Qiang Yu
We need to flush TLB anyway before every task start, and the page directory will be set to empty vm after suspend/resume, so always set it to the task vm even no ctx switch happens. Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_mmu.c | 3 +-- drivers/gpu/drm/lima/lima_sched.c | 14

[PATCH v2 01/10] drm/lima: use module_platform_driver helper

2020-04-21 Thread Qiang Yu
Simplify module init/exit with module_platform_driver. Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_drv.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/lima/lima_drv.c b/drivers/gpu/drm/lima/lima_drv.c index bbbdc8455e2f..91bf5b305e9d

[PATCH v2 00/10] drm/lima: add suspend/resume support

2020-04-21 Thread Qiang Yu
Suspend need to wait running jobs finish and put hardware in poweroff state. Resume need to re-init hardware. v2: 1. add misc patches to prepare enable runtime pm 2. fix pmu command wait time out on mali400 gpu 3. do power and clock gating when suspend 4. do runtime pm Qiang Yu (10): drm/lima

[PATCH 1/4] drm/lima: add lima_devfreq_resume/suspend

2020-04-15 Thread Qiang Yu
Used for device resume/suspend in the following commits. Tested-by: Bhushan Shah Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_devfreq.c | 24 drivers/gpu/drm/lima/lima_devfreq.h | 3 +++ 2 files changed, 27 insertions(+) diff --git a/drivers/gpu/drm/lima

[PATCH 2/4] drm/lima: power down ip blocks when pmu exit

2020-04-15 Thread Qiang Yu
Prepare resume/suspend PM. Tested-by: Bhushan Shah Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_device.h | 2 ++ drivers/gpu/drm/lima/lima_pmu.c| 43 ++ 2 files changed, 45 insertions(+) diff --git a/drivers/gpu/drm/lima/lima_device.h b/drivers/gpu

[PATCH 3/4] drm/lima: add resume/suspend callback for each ip

2020-04-15 Thread Qiang Yu
For called when PM do resume/suspend. Tested-by: Bhushan Shah Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_bcast.c| 25 drivers/gpu/drm/lima/lima_bcast.h| 2 ++ drivers/gpu/drm/lima/lima_device.c | 4 +++ drivers/gpu/drm/lima/lima_device.h | 2

[PATCH 4/4] drm/lima: add pm resume/suspend

2020-04-15 Thread Qiang Yu
Do hardware resume/suspend. Tested-by: Bhushan Shah Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_device.c | 65 ++ drivers/gpu/drm/lima/lima_device.h | 3 ++ drivers/gpu/drm/lima/lima_drv.c| 7 3 files changed, 75 insertions(+) diff --git

[PATCH 0/4] drm/lima: add suspend/resume support

2020-04-15 Thread Qiang Yu
Suspend need to wait running jobs finish and put hardware in poweroff state. Resume need to re-init hardware. Qiang Yu (4): drm/lima: add lima_devfreq_resume/suspend drm/lima: power down ip blocks when pmu exit drm/lima: add resume/suspend callback for each ip drm/lima: add pm resume

Re: [PATCH v4 2/2] drm/lima: Add optional devfreq and cooling device support

2020-03-29 Thread Qiang Yu
I'm not the maintainer of patch 1 file, so please contact: - Rob Herring - Maxime Ripard - Heiko Stuebner to review and apply patch 1. Regards, Qiang On Sat, Mar 28, 2020 at 6:20 PM Martin Blumenstingl wrote: > > On Sat, Mar 28, 2020 at 9:40 AM Qiang Yu wrote: > > > &

Re: [PATCH v4 2/2] drm/lima: Add optional devfreq and cooling device support

2020-03-28 Thread Qiang Yu
Applied to drm-misc-next. On Sun, Mar 22, 2020 at 10:24 AM Qiang Yu wrote: > > Looks good for me, patch is: > Reviewed-by: Qiang Yu > > Regards, > Qiang > > On Fri, Mar 20, 2020 at 4:35 AM Martin Blumenstingl > wrote: > > > > Most platforms with a Mal

  1   2   3   4   >