Re: [PATCH] drm/etnaviv: Fix flush sequence logic

2025-05-07 Thread Christian Gmeiner
ubmitted sequence number > > afterwards. > > > > Signed-off-by: Tomeu Vizoso > > Does this need a Fixes tag? Yes - based on the READ_ONCE(..) line, it should be Fixes: 27b67278e007 ("drm/etnaviv: rework MMU handling") -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy

Re: [PATCH v2] drm/sched: Use struct for drm_sched_init() params

2025-01-29 Thread Christian Gmeiner
u/drm/v3d/v3d_sched.c| 68 +- > drivers/gpu/drm/xe/xe_execlist.c | 16 +++-- > drivers/gpu/drm/xe/xe_gpu_scheduler.c | 17 +- > include/drm/gpu_scheduler.h| 37 ++-- > 14 files changed, 206 insertions(+), 151 deletions(-) &g

Re: [PATCH v2] drm/sched: Use struct for drm_sched_init() params

2025-01-28 Thread Christian Gmeiner
ome bits in there are not static, in this particular case, > gpu->dev is not static for instance. > Ah.. yes - thanks. -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy

Re: [PATCH v2] drm/sched: Use struct for drm_sched_init() params

2025-01-28 Thread Christian Gmeiner
-- a/drivers/gpu/drm/xe/xe_gpu_scheduler.c > +++ b/drivers/gpu/drm/xe/xe_gpu_scheduler.c > @@ -63,13 +63,24 @@ int xe_sched_init(struct xe_gpu_scheduler *sched, > atomic_t *score, const char *name, > struct device *dev) > { > + const struct drm_sched

Re: [PATCH v2 09/21] drm/etnaviv: Convert timeouts to secs_to_jiffies()

2024-12-02 Thread Christian Gmeiner
> > Changes made with the following Coccinelle rules: > > @@ constant C; @@ > > - msecs_to_jiffies(C * 1000) > + secs_to_jiffies(C) > > @@ constant C; @@ > > - msecs_to_jiffies(C * MSEC_PER_SEC) > + secs_to_jiffies(C) > > Signed-off-by: Easwar

[PATCH v4] drm/v3d: Add DRM_IOCTL_V3D_PERFMON_SET_GLOBAL

2024-12-02 Thread Christian Gmeiner
From: Christian Gmeiner Add a new ioctl, DRM_IOCTL_V3D_PERFMON_SET_GLOBAL, to allow configuration of a global performance monitor (perfmon). Use the global perfmon for all jobs to ensure consistent performance tracking across submissions. This feature is needed to implement a Perfetto

[PATCH] drm/etnaviv: Add fdinfo support for memory stats

2024-11-21 Thread Christian Gmeiner
From: Christian Gmeiner Use the new helper to export stats about memory usage. Signed-off-by: Christian Gmeiner --- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 12 +++- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 12 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a

Re: [PATCH v3] drm/v3d: Add DRM_IOCTL_V3D_PERFMON_SET_GLOBAL

2024-11-18 Thread Christian Gmeiner
Hi Maira, > > The patch overall LGTM, I just have one small nit. > Hopefully v4 will be the last iteration. > On 17/11/24 18:41, Christian Gmeiner wrote: > > From: Christian Gmeiner > > > > Add a new ioctl, DRM_IOCTL_V3D_PERFMON_SET_GLOBAL, to allow > > c

[PATCH] drm/v3d: Stop active perfmon if it is being destroyed

2024-11-18 Thread Christian Gmeiner
From: Christian Gmeiner If the active performance monitor (v3d->active_perfmon) is being destroyed, stop it first. Currently, the active perfmon is not stopped during destruction, leaving the v3d->active_perfmon pointer stale. This can lead to undefined behavior and instability. This

[PATCH v3] drm/v3d: Add DRM_IOCTL_V3D_PERFMON_SET_GLOBAL

2024-11-17 Thread Christian Gmeiner
From: Christian Gmeiner Add a new ioctl, DRM_IOCTL_V3D_PERFMON_SET_GLOBAL, to allow configuration of a global performance monitor (perfmon). Use the global perfmon for all jobs to ensure consistent performance tracking across submissions. This feature is needed to implement a Perfetto

Re: [PATCH] drm/v3d: Fix performance counter source settings on V3D 7.x

2024-11-07 Thread Christian Gmeiner
-by: Maíra Canal Reviewed-by: Christian Gmeiner --- drivers/gpu/drm/v3d/v3d_debugfs.c | 4 ++-- drivers/gpu/drm/v3d/v3d_perfmon.c | 15 --- drivers/gpu/drm/v3d/v3d_regs.h| 29 + 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/d

Re: [PATCH v2] drm/v3d: Add DRM_IOCTL_V3D_PERFMON_SET_GLOBAL

2024-11-04 Thread Christian Gmeiner
Hi Maíra, > On 31/10/24 17:51, Christian Gmeiner wrote: > > From: Christian Gmeiner > > > > Add a new ioctl, DRM_IOCTL_V3D_PERFMON_SET_GLOBAL, to allow > > configuration of a global performance monitor (perfmon). > > Use the global perfmon for all jobs to

Re: [PATCH v2] drm/v3d: Add DRM_IOCTL_V3D_PERFMON_SET_GLOBAL

2024-11-04 Thread Christian Gmeiner
Hi Maíra, > > Thanks for your patch! Just some small nits. > Thanks for your review. > On 31/10/24 17:51, Christian Gmeiner wrote: > > From: Christian Gmeiner > > > > Add a new ioctl, DRM_IOCTL_V3D_PERFMON_SET_GLOBAL, to allow > > configuration of a

Re: [PATCH] drm/v3d: Add DRM_IOCTL_V3D_PERFMON_SET_GLOBAL

2024-10-31 Thread Christian Gmeiner
Hi André > > Em 20/10/2024 17:41, Christian Gmeiner escreveu: > > From: Christian Gmeiner > > > > This patch adds a new ioctl, DRM_IOCTL_V3D_PERFMON_SET_GLOBAL, which > > allows the configuration of a global performance monitor (perfmon). > > The global pe

Re: [PATCH] drm/v3d: Add DRM_IOCTL_V3D_PERFMON_SET_GLOBAL

2024-10-31 Thread Christian Gmeiner
le and disable this state through the IOCTL. > > One last thing is: don't forget to stop the perfmons when you don't use > it anymore :) > I've sent v2 of this patch and hope I've addressed all your comments. -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy

[PATCH v2] drm/v3d: Add DRM_IOCTL_V3D_PERFMON_SET_GLOBAL

2024-10-31 Thread Christian Gmeiner
From: Christian Gmeiner Add a new ioctl, DRM_IOCTL_V3D_PERFMON_SET_GLOBAL, to allow configuration of a global performance monitor (perfmon). Use the global perfmon for all jobs to ensure consistent performance tracking across submissions. Signed-off-by: Christian Gmeiner --- Changes in v2

Re: [PATCH] drm/etnaviv: flush shader L1 cache after user commandstream

2024-10-28 Thread Christian Gmeiner
Hi Lucas > > The shader L1 cache is a writeback cache for shader loads/stores > and thus must be flushed before any BOs backing the shader buffers > are potentially freed. > > Cc: sta...@vger.kernel.org > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner >

Re: [PATCH] drm/etnaviv: always allocate 4K for kernel ringbuffers

2024-10-26 Thread Christian Gmeiner
han that. > > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c > b/drivers/gpu/drm/etnaviv/etnaviv_gpu

[PATCH] drm/v3d: Add DRM_IOCTL_V3D_PERFMON_SET_GLOBAL

2024-10-20 Thread Christian Gmeiner
From: Christian Gmeiner This patch adds a new ioctl, DRM_IOCTL_V3D_PERFMON_SET_GLOBAL, which allows the configuration of a global performance monitor (perfmon). The global perfmon is used for all jobs, ensuring consistent performance tracking across submissions. Signed-off-by: Christian Gmeiner

Re: [PATCH 1/2] drm/vc4: Use `vc4_perfmon_find()`

2024-10-07 Thread Christian Gmeiner
Similar to commit f2a4bcb25328 ("drm/v3d: Use v3d_perfmon_find()"), replace the open-coded `vc4_perfmon_find()` with the real thing. Cc: Christian Gmeiner Signed-off-by: Maíra Canal Reviewed-by: Christian Gmeiner --- drivers/gpu/drm/vc4/vc4_perfmon.c | 6 +- 1 file

[PATCH] drm/v3d: Use v3d_perfmon_find(..)

2024-09-23 Thread Christian Gmeiner
From: Christian Gmeiner Replace the open coded v3d_perfmon_find(..) with the real thing. Signed-off-by: Christian Gmeiner --- drivers/gpu/drm/v3d/v3d_perfmon.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/v3d/v3d_perfmon.c b/drivers/gpu/drm/v3d

Re: [PATCH v3] drm/etnaviv: Request pages from DMA32 zone on addressing_limited

2024-09-11 Thread Christian Gmeiner
nd(). > > Fixes: b72af445cd38 ("drm/etnaviv: request pages from DMA32 zone when needed") > Suggested-by: Sui Jingfeng > Signed-off-by: Xiaolei Wang Reviewed-by: Christian Gmeiner > --- > > change log > > v1: > > https://patchwork.kernel.org/project/dri-devel

Re: [PATCH] drm/etnaviv: Fix missing mutex_destroy()

2024-08-26 Thread Christian Gmeiner
x uninitialized on debug builds, and any subsequent use of the > mutex is forbidden. > > It also could lead to problems if mutex_destroy() gets extended, add > missing mutex_destroy() to eliminate potential concerns. > > Signed-off-by: Sui Jingfeng Reviewed-by: Christian G

Re: [PATCH] drm/etnaviv: Drop the header

2024-08-26 Thread Christian Gmeiner
> > Currently, the etnaviv_gem_submit.c isn't call any runtime power management > functions. So drop it, we can re-include it when the header really get used > though. > > Signed-off-by: Sui Jingfeng Reviewed-by: Christian Gmeiner > --- > drivers/gpu/drm/etn

Re: [PATCH] drm/etnaviv: Use unsigned type to count the number of userspace pages

2024-08-26 Thread Christian Gmeiner
t; > Signed-off-by: Sui Jingfeng Reviewed-by: Christian Gmeiner > --- > drivers/gpu/drm/etnaviv/etnaviv_gem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c > b/drivers/gpu/drm/etnaviv/etnaviv_gem.c > index

Re: [PATCH] drm/etnaviv: Use unsigned type to count the number of pages

2024-08-26 Thread Christian Gmeiner
instead of the signed > type. > > Signed-off-by: Sui Jingfeng Reviewed-by: Christian Gmeiner > --- > drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_g

Re: [PATCH v2 5/5] drm/etnaviv: take current primitive into account when checking for hung GPU

2024-07-07 Thread Christian Gmeiner
the timeout as long as the > draw progresses. > > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > v2: > - dropped debug register enable/disable > - locked against concurrent debug register access > --- > drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 1 +

Re: [PATCH v2 4/5] drm/etnaviv: update hardware headers from rnndb

2024-07-07 Thread Christian Gmeiner
> > Update state_hi.xml.h header from etna_viv commit > 8f43a34fd9cd ("rndb: document FE current primitve debug reg") > > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > v2: no changes > --- > drivers/gpu/drm/etnaviv/state_hi.xml.h |

Re: [PATCH v2 3/5] drm/etnaviv: unconditionally enable debug registers

2024-07-07 Thread Christian Gmeiner
they are always accessible performance > profiling still needs to manage some prerequisites. > > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > v2: new patch replacing more complex usage tracking from v1 > --- > drivers/gpu/drm/etnaviv/etnaviv_gpu.

Re: [PATCH v2 2/5] drm/etnaviv: assert GPU lock held in perfmon pipe_*_read functions

2024-07-07 Thread Christian Gmeiner
> Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > v2: new patch > --- > drivers/gpu/drm/etnaviv/etnaviv_perfmon.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_perfmon.c > b/drivers/gpu/drm/etnaviv/etnaviv_perf

Re: [PATCH v2 1/5] drm/etnaviv: hold GPU lock across perfmon sampling

2024-07-07 Thread Christian Gmeiner
lock. > > Fixes: 68dc0b295dcb ("drm/etnaviv: use 'sync points' for performance monitor > requests") > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > v2: new patch > --- > drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 20 ++-- > 1 f

Re: [etnaviv-next v14 0/8] drm/etnaviv: Add driver wrapper for vivante GPUs attached on PCI(e) device

2024-06-24 Thread Christian Gmeiner
ully this series will land anytime. [6.783267] etnaviv :0c:00.0: enabling device ( -> 0003) [6.783324] etnaviv :0c:00.0: JingJia Micro JM9100 has 1 GPU cores [6.783459] etnaviv :0c:00.0: bound etnaviv-gpu,3d.0 (ops gpu_ops [etnaviv]) [6.783502] etnaviv-gpu

Re: [PATCH] drm/etnaviv: don't block scheduler when GPU is still active

2024-06-24 Thread Christian Gmeiner
b is already removed from the pending list and > will not be put back when drm_sched_start() isn't called, we must > make sure to put the job back on the pending list when extending > the timeout. > > Cc: sta...@vger.kernel.org #6.0 > Signed-off-by: Lucas Stach Reviewed-by: Christ

Re: [PATCH v2] drm/etnaviv: fix DMA direction handling for cached RW buffers

2024-06-24 Thread Christian Gmeiner
> > The dma sync operation needs to be done with DMA_BIDIRECTIONAL when > the BO is prepared for both read and write operations. > > Fixes: a8c21a5451d8 ("drm/etnaviv: add initial etnaviv DRM driver") > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner >

Re: [PATCH] drm/etnaviv: reduce number of ktime_get calls in IRQ handler

2024-06-24 Thread Christian Gmeiner
r has determined that > there are completed jobs and reuse this for all fences that get > signalled by the handler. > > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 3 ++- > 1 file changed, 2 insertions(+), 1 de

Re: [PATCH] drm/etnaviv: Create an accel device node if compute-only

2024-04-25 Thread Christian Gmeiner
ring node, and if we find out that there is no rendering > hardware, abort and retry with an accel node. > I really love this idea of moving away from a render node. What needs to be done on the userspace side? > Signed-off-by: Tomeu Vizoso > Cc: Oded Gabbay Reviewed-by: Christian Gme

[PATCH] Revert "drm/etnaviv: Expose a few more chipspecs to userspace"

2024-04-20 Thread Christian Gmeiner
From: Christian Gmeiner This reverts commit 1dccdba084897443d116508a8ed71e0ac8a031a4. In userspace a different approach was choosen - hwdb. As a result, there is no need for these values. Signed-off-by: Christian Gmeiner --- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 20

Re: [PATCH v3 2/2] misc: sram: Add DMA-BUF Heap exporting of SRAM areas

2024-04-19 Thread Christian Gmeiner
due to message size and could potentially slow down data transfer. However, an alternative approach could be to allocate a sizable chunk of SRAM memory in userspace. By utilizing memcpy() to copy data into this memory, followed by a single rpmsg signal to notify the RTOS that the data is ready, we can leverage the faster access speed of SRAM compared to DDR from the remoteproc. -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy

Re: [PATCH] drm/etnaviv: drop driver owner assignment

2024-04-01 Thread Christian Gmeiner
> > Core in platform_driver_register() already sets the .owner, so driver > does not need to. Whatever is set here will be anyway overwritten by > main driver calling platform_driver_register(). > > Signed-off-by: Krzysztof Kozlowski Reviewed-by: Christian Gmeiner > -

Re: [PATCH] etnaviv: Restore some id values

2024-03-01 Thread Christian Gmeiner
Hi Lucas, > > prefix for etnaviv kernel patches should be "drm/etnaviv: ..." Ah yeah .. corrected in v2. > > Am Donnerstag, dem 29.02.2024 um 20:55 +0100 schrieb Christian Gmeiner: > > From: Christian Gmeiner > > > > The hwdb selection logic as a fe

[PATCH v2] drm/etnaviv: Restore some id values

2024-03-01 Thread Christian Gmeiner
From: Christian Gmeiner The hwdb selection logic as a feature that allows it to mark some fields as 'don't care'. If we match with such a field we memcpy(..) the current etnaviv_chip_identity into ident. This step can overwrite some id values read from the GPU with the 'don

[PATCH] etnaviv: Restore some id values

2024-02-29 Thread Christian Gmeiner
From: Christian Gmeiner The hwdb selection logic as a feature that allows it to mark some fields as 'don't care'. If we match with such a field we memcpy(..) the current etnaviv_chip_identity into ident. This step can overwrite some id values read from the GPU with the 'don

Re: [PATCH v2 2/3] drm/etnaviv: Turn etnaviv_is_model_rev() into a function

2024-01-25 Thread Christian Gmeiner
gpu, 0x320, 0x5007) || > +etnaviv_is_model_rev(gpu, 0x320, 0x5220)) && > gpu_read(gpu, VIVS_HI_CHIP_TIME) != 0x2062400) { > u32 mc_memory_debug; > > @@ -745,7 +747,7 @@ static void etnaviv_gpu_hw_init(struct etnaviv_gpu *gpu) > VIVS_HI_AXI_CONFIG_ARCACHE(2)); > > /* GC2000 rev 5108 needs a special bus config */ > - if (etnaviv_is_model_rev(gpu, GC2000, 0x5108)) { > + if (etnaviv_is_model_rev(gpu, 0x2000, 0x5108)) { > u32 bus_config = gpu_read(gpu, VIVS_MC_BUS_CONFIG); > bus_config &= ~(VIVS_MC_BUS_CONFIG_FE_BUS_CONFIG__MASK | > VIVS_MC_BUS_CONFIG_TX_BUS_CONFIG__MASK); > > -- > 2.39.2 > -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy

Re: [PATCH v2 1/3] drm/etnaviv: Update hardware headers from rnndb

2024-01-25 Thread Christian Gmeiner
> > Update the state HI header from the rnndb commit > 8d7ee714cfe2 ("Merge pull request #24 from pH5/unknown-3950"). > > Signed-off-by: Philipp Zabel You missed my R-b from the v1 series for this patch - please include it the next time! Reviewed-by: Christian Gmeiner

Re: [PATCH 0/2] drm/etnaviv: Disable SH_EU clock gating on the i.MX8MP NPU

2024-01-24 Thread Christian Gmeiner
VIPNano-Si+ NPU on i.MX8MP. > > Signed-off-by: Philipp Zabel Thanks - series is Reviewed-by: Christian Gmeiner > --- > Philipp Zabel (2): > drm/etnaviv: Update hardware headers from rnndb > drm/etnaviv: Disable SH_EU clock gating on VIPNano-Si+ > > dri

Re: [PATCH] drm/etnaviv: add sensitive state for PE_RT_ADDR_4_PIPE(3, 0|1) address

2023-12-07 Thread Christian Gmeiner
Hi Lucas > > Am Donnerstag, dem 07.12.2023 um 08:43 +0100 schrieb Christian Gmeiner: > > From: Christian Gmeiner > > > > 0x1540 is the address of 4th render target address pair (two pixel pipes). > > > Are there any corresponding TS states for this region? I wi

[PATCH] drm/etnaviv: add sensitive state for PE_RT_ADDR_4_PIPE(3, 0|1) address

2023-12-06 Thread Christian Gmeiner
From: Christian Gmeiner 0x1540 is the address of 4th render target address pair (two pixel pipes). Signed-off-by: Christian Gmeiner --- drivers/gpu/drm/etnaviv/etnaviv_cmd_parser.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_cmd_parser.c b/drivers/gpu

Re: [PATCH v2] drm/etnaviv: Expose a few more chipspecs to userspace

2023-11-22 Thread Christian Gmeiner
ll the new values but it looks fine to me. Acked-by: Christian Gmeiner > --- > > v2: Update a few chipspecs that I had missed before. (Christian) > --- > drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 20 +++ > drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 12 + >

Re: [PATCH] drm/etnaviv: Expose a few more chipspecs to userspace

2023-11-17 Thread Christian Gmeiner
ude/uapi/drm/etnaviv_drm.h > index af024d90453d..d87410a8443a 100644 > --- a/include/uapi/drm/etnaviv_drm.h > +++ b/include/uapi/drm/etnaviv_drm.h > @@ -77,6 +77,11 @@ struct drm_etnaviv_timespec { > #define ETNAVIV_PARAM_GPU_PRODUCT_ID0x1c > #define ETNAVIV_PARAM_GPU_CUSTOMER_ID

Re: [PATCH v2] drm/etnaviv: refactor deprecated strncpy

2023-10-09 Thread Christian Gmeiner
e who is responsible for this job. > > Thanks! > > -Kees > > > > > Link: > > https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings > > [1] > > Link: https://github.com/KSPP/linux/issues/90 > > Cc: lin

Re: [PATCH v2 02/12] drm/etnaviv: Convert to platform remove callback returning void

2023-09-09 Thread Christian Gmeiner
s returning zero in > the remove callback to the void returning variant. > > Reviewed-by: Thomas Zimmermann > Reviewed-by: Jyri Sarha > Signed-off-by: Uwe Kleine-König > Reviewed-by: Christian Gmeiner --- > drivers/gpu/drm/etnaviv/etnaviv_drv.c | 6 ++ > dr

Re: [PATCH] drm/etnaviv: fix dumping of active MMU context

2023-07-19 Thread Christian Gmeiner
Hi Lucas, Am Mi., 21. Juni 2023 um 17:44 Uhr schrieb Christian Gmeiner : > > Hi Lucas, > > Am Mo., 17. Apr. 2023 um 19:42 Uhr schrieb Christian Gmeiner > : > > > > Hi Lucas > > > > > > > > gpu->mmu_context is the MMU context of the last job i

Re: [PATCH] drm/etnaviv: fix dumping of active MMU context

2023-06-21 Thread Christian Gmeiner
Hi Lucas, Am Mo., 17. Apr. 2023 um 19:42 Uhr schrieb Christian Gmeiner : > > Hi Lucas > > > > > gpu->mmu_context is the MMU context of the last job in the HW queue, which > > isn't necessarily the same as the context from the bad job. Dump the MMU > >

Re: [PATCH v10 00/11] drm/etnaviv: Add pci device driver support

2023-06-21 Thread Christian Gmeiner
ci output for the GPU? Something like this: sudo lspci -vvv -s ... thanks -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy

Re: [PATCH 8/8] drm/etnaviv: expedited MMU fault handling

2023-06-21 Thread Christian Gmeiner
Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 2 ++ > drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 1 + > drivers/gpu/drm/etnaviv/etnaviv_sched.c | 5 +++-- > 3 files changed, 6 insertions(+), 2 deletions(-) > > diff --g

Re: [PATCH 7/8] drm/etnaviv: drop GPU initialized property

2023-06-21 Thread Christian Gmeiner
tialized object. > > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c | 3 +++ > drivers/gpu/drm/etnaviv/etnaviv_gpu.c| 9 ++--- > drivers/gpu/drm/etnaviv/etnaviv_gpu.h| 1 - > drivers/gpu/drm/etnaviv

Re: [PATCH 6/8] drm/etnaviv: better track GPU state

2023-06-21 Thread Christian Gmeiner
in that > state. > > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 25 ++--- > drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 10 +- > 2 files changed, 27 insertions(+), 8 deletions(-) >

Re: [PATCH 5/8] drm/etnaviv: avoid runtime PM usage in etnaviv_gpu_bind

2023-06-19 Thread Christian Gmeiner
s also removes the need to guard against the state where the driver > isn't fully initialized yet in the runtime PM resume handler. > > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 15 +-- > 1 file c

Re: [PATCH 3/8] drm/etnaviv: move runtime PM handling to events

2023-06-19 Thread Christian Gmeiner
Hi Lucas, Am Do., 15. Juni 2023 um 11:37 Uhr schrieb Lucas Stach : > > Hi Christian, > > Am Mittwoch, dem 14.06.2023 um 20:41 +0200 schrieb Christian Gmeiner: > > Hi Lucas > > > > > > > > Conceptually events are the right abstraction to handle the GPU &g

Re: [PATCH v2] drm/etnaviv: slow down FE idle polling

2023-06-18 Thread Christian Gmeiner
); > } > > static int etnaviv_hw_reset(struct etnaviv_gpu *gpu) > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h > b/drivers/gpu/drm/etnaviv/etnaviv_gpu.h > index 98c6f9c320fc..e1e1de59c38d 100644 > --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h > +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.h > @@ -150,6 +150,7 @@ struct etnaviv_gpu { > struct clk *clk_shader; > > unsigned int freq_scale; > + unsigned int fe_waitcycles; > unsigned long base_rate_core; > unsigned long base_rate_shader; > }; > -- > 2.39.2 > -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy

Re: drm/etnaviv: slow down FE idle polling

2023-06-15 Thread Christian Gmeiner
have some unknown discrete steps in the wait cycles > >> add a comma here. > >>>so > >>> we may over/undershoot the target a bit, but that should be harmless. > >> overshoot or undershoot > >>> Signed-off-by: Lucas Stach > >>&g

Re: [PATCH 4/8] drm/etnaviv: make clock handling symetric between runtime resume and suspend

2023-06-14 Thread Christian Gmeiner
d-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c > b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c > index

Re: [PATCH 3/8] drm/etnaviv: move runtime PM handling to events

2023-06-14 Thread Christian Gmeiner
tnaviv_gem_submit *submit) > unsigned int i, nr_events = 1, event[3]; > int ret; > > - if (!submit->runtime_resumed) { > - ret = pm_runtime_get_sync(gpu->dev); > - if (ret < 0) { > - pm_runtime_put_noidle(gpu->dev); > - return NULL; > - } > - submit->runtime_resumed = true; > - } > - > /* > * if there are performance monitor requests we need to have > * - a sync point to re-configure gpu and process ETNA_PM_PROCESS_PRE > -- > 2.39.2 > -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy

Re: [PATCH 2/8] drm/etnaviv: free events the usual way in recover worker

2023-06-14 Thread Christian Gmeiner
gpu->event_spinlock); > for_each_set_bit(i, gpu->event_bitmap, ETNA_NR_EVENTS) > - complete(&gpu->event_free); > - bitmap_zero(gpu->event_bitmap, ETNA_NR_EVENTS); > + event_free(gpu, i); > spin_unlock(&gpu->event_spi

Re: [PATCH 1/8] drm/etnaviv: move down etnaviv_gpu_recover_hang() in file

2023-06-14 Thread Christian Gmeiner
Hi Lucas > > So it can use the event_free function without adding another > forward declaration. No functional change. > > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 88 +-- > 1 fil

Re: [PATCH] drm/etnaviv: slow down FE idle polling

2023-06-14 Thread Christian Gmeiner
should not hurt most use-cases. The FE WAIT > command seems to have some unknown discrete steps in the wait cycles so > we may over/undershoot the target a bit, but that should be harmless. > > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > drivers/gpu/drm/etna

Re: [PATCH] drm/etnaviv: disable MLCG and pulse eater on GPU reset

2023-06-13 Thread Christian Gmeiner
> > Module level clock gating and the pulse eater might interfere with > the GPU reset, as they both have the potential to stop the clock > and thus reset propagation to parts of the GPU. > > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > I'm

Re: [PATCH] drm/etnaviv: fix dumping of active MMU context

2023-04-17 Thread Christian Gmeiner
17e4660ae3d7 ("drm/etnaviv: implement per-process address spaces on > MMUv2") > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > drivers/gpu/drm/etnaviv/etnaviv_dump.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > >

Re: [PATCH] misc: sram: Add dma-heap-export reserved SRAM area type

2023-04-13 Thread Christian Gmeiner
Hi Andrew Am Di., 4. Apr. 2023 um 17:02 Uhr schrieb Christian Gmeiner : > > > > Hi Andrew > > > > > >> > > >> > > >> Okay, will split for v2. > > >> > > >> > > > > > > Was there a follow-up v2 of

Re: [PATCH] misc: sram: Add dma-heap-export reserved SRAM area type

2023-04-04 Thread Christian Gmeiner
rk on it? If not I would like to help out > > as we have a use case where we want to > > use a dma-buf sram exporter. > > > > > > Sure, I've been keeping it alive in our evil vendor tree, but if > there is interest upstream now I'll post a v2 and CC you. That would be great! -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy

Re: [PATCH] misc: sram: Add dma-heap-export reserved SRAM area type

2023-04-01 Thread Christian Gmeiner
f sram exporter. -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy

Re: [PATCH] drm/etnaviv: fix reference leak when mmaping imported buffer

2023-03-03 Thread Christian Gmeiner
d-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 10 +- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c > b/drivers/gpu/drm/etnaviv/etnaviv_gem_pri

Re: [PATCH] drm/etnaviv: print MMU exception cause

2022-11-30 Thread Christian Gmeiner
Hi Lucas Am Mi., 30. Nov. 2022 um 19:53 Uhr schrieb Lucas Stach : > > From: Christian Gmeiner > > The MMU tells us the fault status. While the raw register value is > already printed, it's a bit more user friendly to translate the > fault reasons into human readable fo

Re: [PATCH] drm/fourcc: add Vivante tile status modifiers

2022-09-10 Thread Christian Gmeiner
rs describe the interpretation of the tag bits in this > buffer. > > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy

Re: [PATCH 2/2] drm/etnaviv: fix power register offset on GC300

2022-09-03 Thread Christian Gmeiner
r possible solutions: 1) Add two seperate helpers ala gpu_read_power() and gpu_write_power() where we do the if beast. 2) Add a power register offset variable to etnaviv_gpu and explicitly use it on for reads and writes - like the Vivante driver does. But that's just my personal opinion. Can't wait to hear what Lucas thinks. -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy

Re: [PATCH 1/2] drm/etnaviv: add missing quirks for GC300

2022-09-03 Thread Christian Gmeiner
> > The GC300's features register doesn't specify that a 2D pipe is > available, and like the GC600, its idle register reports zero bits where > modules aren't present. > > Signed-off-by: Doug Brown Reviewed-by: Christian Gmeiner > --- > dri

Re: [PATCH 2/2] drm/etnaviv: disable tx clock gating for GC7000 rev6203

2022-09-03 Thread Christian Gmeiner
o the same check > to bundle them. > > Signed-off-by: Marco Felsch > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu

Re: [PATCH 1/2] drm/etnaviv: add HWDB entry for GC7000 r6203

2022-09-03 Thread Christian Gmeiner
han forcing users to update their kernels to get this new database entry. -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy

Re: [PATCH v2 4/4] drm/etnaviv: export loadavg via perfmon

2022-07-02 Thread Christian Gmeiner
s a starting point. I have no problem introducing per process load avg values .. lets see how the next version of this series will look like, -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy

Re: [PATCH v2 2/4] drm/etnaviv: add loadavg accounting

2022-07-02 Thread Christian Gmeiner
Am Fr., 24. Juni 2022 um 11:38 Uhr schrieb Lucas Stach : > > Am Dienstag, dem 21.06.2022 um 09:20 +0200 schrieb Christian Gmeiner: > > The GPU has an idle state register where each bit represents the idle > > state of a sub-GPU component like FE or TX. Sample this register

Re: [PATCH v2 1/4] drm/etnaviv: add simple moving average (SMA)

2022-07-02 Thread Christian Gmeiner
Hi Lucas > > Am Dienstag, dem 21.06.2022 um 09:20 +0200 schrieb Christian Gmeiner: > > This adds a SMA algorithm inspired by Exponentially weighted moving > > average (EWMA) algorithm found in the kernel. > > > Still not sure about this one. I _feel_ that a simple mov

[PATCH v2 4/4] drm/etnaviv: export loadavg via perfmon

2022-06-21 Thread Christian Gmeiner
Make it possible to access the sub-GPU component load value from user space with the perfmon infrastructure. Signed-off-by: Christian Gmeiner --- drivers/gpu/drm/etnaviv/etnaviv_perfmon.c | 79 +++ 1 file changed, 79 insertions(+) diff --git a/drivers/gpu/drm/etnaviv

[PATCH v2 2/4] drm/etnaviv: add loadavg accounting

2022-06-21 Thread Christian Gmeiner
percentage based load of each sub-GPU component. Signed-off-by: Christian Gmeiner --- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 14 ++ drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 64 ++- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 37 3 files changed, 114 insertions

[PATCH v2 3/4] drm/etnaviv: show loadavg in debugfs

2022-06-21 Thread Christian Gmeiner
Might be helpful to see the loadavg in debugfs. Signed-off-by: Christian Gmeiner --- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c index

[PATCH v2 1/4] drm/etnaviv: add simple moving average (SMA)

2022-06-21 Thread Christian Gmeiner
This adds a SMA algorithm inspired by Exponentially weighted moving average (EWMA) algorithm found in the kernel. Signed-off-by: Christian Gmeiner --- drivers/gpu/drm/etnaviv/etnaviv_sma.h | 53 +++ 1 file changed, 53 insertions(+) create mode 100644 drivers/gpu/drm

[PATCH v2 0/4] Add support for GPU load values

2022-06-21 Thread Christian Gmeiner
This patch series add support for loadavg values for GPU sub-components. I am adding a SMA algorithm as I was not really sure if EWMA would be a good fit for this use case. Changes v2: - Addressed feedback from Lucas Christian Gmeiner (4): drm/etnaviv: add simple moving average (SMA) drm

[PATCH] drm/etnaviv: print offender task information on hangcheck recovery

2022-06-03 Thread Christian Gmeiner
Track the pid per submit, so we can print the name and cmdline of the task which submitted the batch that caused the gpu to hang. Signed-off-by: Christian Gmeiner --- drivers/gpu/drm/etnaviv/etnaviv_gem.h| 1 + drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 6 ++ drivers/gpu/drm

Re: [PATCH] drm/etnaviv: relax submit size limits

2022-01-09 Thread Christian Gmeiner
8ddd ("drm/etnaviv: limit submit sizes") > Cc: sta...@vger.kernel.org > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy

Re: [PATCH] drm/etnaviv: consider completed fence seqno in hang check

2021-12-21 Thread Christian Gmeiner
U resets, also remember and consider the last completed fence seqno > in the hang check. > > Reported-by: Joerg Albert > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy

Re: [PATCH] drm/etnaviv: limit submit sizes

2021-12-17 Thread Christian Gmeiner
ngle submit seems like a reasonably future-proof number for now. This > number can be bumped if needed without breaking the interface. > > Cc: sta...@vger.kernel.org > Reported-by: Dan Carpenter > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy

Re: [PATCH] drm/etnaviv: constify static struct cooling_ops

2021-11-29 Thread Christian Gmeiner
put it in read-only memory. > > Signed-off-by: Rikard Falkeborn Reviewed-by: Christian Gmeiner > --- > drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c > b/driver

Re: [PATCH] drm: Remove redundant 'flush_workqueue()' calls

2021-10-18 Thread Christian Gmeiner
ed with coccinelle: > > @@ > expression E; > @@ > - flush_workqueue(E); > destroy_workqueue(E); > > Signed-off-by: Christophe JAILLET For drm/etnaviv: Reviewed-by: Christian Gmeiner -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy

Re: [PATCH 1/3] drm/etnaviv: use PLATFORM_DEVID_NONE

2021-08-26 Thread Christian Gmeiner
Am Do., 26. Aug. 2021 um 14:10 Uhr schrieb Michael Walle : > > There is already a macro for the magic value. Use it. > > Signed-off-by: Michael Walle Reviewed-by: Christian Gmeiner I will wait for v2 for the rest of the changes to review. > --- > drivers/gpu/drm/etnaviv

Re: [PATCH 8/8] drm/etnaviv: add missing MMU context put when reaping MMU mapping

2021-08-26 Thread Christian Gmeiner
Add the > mssing context put to fix the leak. > > Cc: sta...@vger.kernel.org # 5.4 > Signed-off-by: Lucas Stach > Tested-by: Michael Walle Series is: Reviewed-by: Christian Gmeiner > --- > drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 1 + > 1 file changed, 1 insertion(+)

Re: [PATCH 7/8] drm/etnaviv: reference MMU context when setting up hardware state

2021-08-24 Thread Christian Gmeiner
Hi Lucas Am Di., 24. Aug. 2021 um 09:54 Uhr schrieb Lucas Stach : > > Am Dienstag, dem 24.08.2021 um 09:24 +0200 schrieb Christian Gmeiner: > > Am Fr., 20. Aug. 2021 um 22:18 Uhr schrieb Lucas Stach > > : > > > > > > Move the refcount manipulation of th

Re: [PATCH 7/8] drm/etnaviv: reference MMU context when setting up hardware state

2021-08-24 Thread Christian Gmeiner
& > VIVS_MMUv2_SEC_CONTROL_ENABLE) > return; > > + if (gpu->mmu_context) > + etnaviv_iommu_context_put(gpu->mmu_context); > + gpu->mmu_context = etnaviv_iommu_context_get(context); > + I have seen this pattern now more than two times - maybe put the assignment of a new mmu context into its own function? > gpu_write(gpu, VIVS_MMUv2_PTA_ADDRESS_LOW, > lower_32_bits(context->global->v2.pta_dma)); > gpu_write(gpu, VIVS_MMUv2_PTA_ADDRESS_HIGH, > -- > 2.30.2 > -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy

Re: [PATCH] drm/etnaviv: remove NULL check which is not needed

2021-06-06 Thread Christian Gmeiner
kvfree(etnaviv_obj->pages); > + kvfree(etnaviv_obj->pages); > > drm_prime_gem_destroy(&etnaviv_obj->base, etnaviv_obj->sgt); > } > -- > 2.31.0 > Thanks for the patch, but there is an other one queued up in etnaviv/next that fixes the same issue: https://git.pengutronix.de/c

Re: [PATCH] drm/etnaviv: remove no need NULL check

2021-06-06 Thread Christian Gmeiner
2.31.0 > Thanks for the patch, but there is an other one queued up in etnaviv/next that fixes the same issue: https://git.pengutronix.de/cgit/lst/linux/commit/?h=etnaviv/next&id=bdf622e0fade2cec72c948c708763378b656c01d -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy

Re: [PATCH -next] drm/etnaviv: Remove unneeded if-null-free check

2021-06-03 Thread Christian Gmeiner
Am Di., 1. Juni 2021 um 16:06 Uhr schrieb Zheng Yongjun : > > Eliminate the following coccicheck warning: > > drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c:84:2-8: WARNING: > NULL check before some freeing functions is not needed. > > Signed-off-by: Zheng Yongjun Reviewed-

Re: [PATCH] drm/etnaviv: rework linear window offset calculation

2021-05-03 Thread Christian Gmeiner
t; is obviously bad. > > Rework the linear window offset calculation to be based on the command buffer > physical address, making sure that the command buffer is always mappable. > > Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner > --- > driver

  1   2   3   4   5   >