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

2025-07-30 Thread Lucas Stach
Hi Christian, Am Montag, dem 28.07.2025 um 00:28 +0200 schrieb Christian Gmeiner: > Hi Lucas, > > > > > We should be comparing the last submitted sequence number with that of > > > > the address space we may be switching to. > > > > > > > This isn't the relevant change here though: if we switch

Re: DMA-BUFs always uncached on arm64, causing poor camera performance on Librem 5

2025-07-10 Thread Lucas Stach
Hi Pavel, Am Donnerstag, dem 10.07.2025 um 10:24 +0200 schrieb Pavel Machek: > Hi! > > It seems that DMA-BUFs are always uncached on arm64... which is a > problem. > > I'm trying to get useful camera support on Librem 5, and that includes > recording vidos (and taking photos). > > memcpy() from

Re: [PATCH v3 6/8] drm/etnaviv: Use DRM_GPU_SCHED_STAT_NO_HANG to skip the reset

2025-06-24 Thread Lucas Stach
job a chance to complete. > > Instead of manipulating scheduler's internals, inform the scheduler that > the job did not actually timeout and no reset was performed through > the new status code DRM_GPU_SCHED_STAT_NO_HANG. > > Signed-off-by: Maíra Canal Reviewed-by:

Re: [PATCH v2 5/6] drm/etnaviv: Add PPU flop reset

2025-06-23 Thread Lucas Stach
Am Montag, dem 23.06.2025 um 14:05 +0200 schrieb Gert Wollny: > On Fri, 2025-06-20 at 22:22 +0200, Lucas Stach wrote: > > > > > @@ -1807,6 +1808,11 @@ static int etnaviv_gpu_bind(struct device > > > *dev, struct device *master, > > >   ret = -E

Re: [PATCH v2 6/6] drm/etnaviv: Add module parameter to force PPU flop reset

2025-06-20 Thread Lucas Stach
Am Mittwoch, dem 18.06.2025 um 22:43 +0200 schrieb Gert Wollny: > Signed-off-by: Gert Wollny > --- > drivers/gpu/drm/etnaviv/etnaviv_flop_reset.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_flop_reset.c > b/drivers/gpu/drm/etnaviv/etnaviv_fl

Re: [PATCH v2 5/6] drm/etnaviv: Add PPU flop reset

2025-06-20 Thread Lucas Stach
Am Mittwoch, dem 18.06.2025 um 22:43 +0200 schrieb Gert Wollny: > The PPU flop reset is required on some hardware to clear the > temporary registers. This implementation follows the code > implemented in the public galcore kernel module code to this > for the PPU. > > v2: - Move flop reset data to

Re: [PATCH v2 4/6] drm/etnaviv: Identify GPU already when binding

2025-06-20 Thread Lucas Stach
Am Mittwoch, dem 18.06.2025 um 22:43 +0200 schrieb Gert Wollny: > This is required to know whether to be able to avoid allocating > the flop reset data if non of the available GPUs actually need > it. > I'm surprised that this works on your platform at all. You can not move the identification here

[PATCH] drm/etnaviv: remove unnecessary cache flushes on pipe switch

2025-06-20 Thread Lucas Stach
of the next cmdstream, which may trigger a pipe switch, is started. Drop the unnecessary cache flushes. This also avoids sending a stall command into a GPU where the active pipe has not been selected, yet. Signed-off-by: Lucas Stach --- drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 21

[PATCH] drm/etnaviv: disable pulse eater on cores with 3D pipe and revision > 0x5420

2025-06-20 Thread Lucas Stach
The downstream driver switched from only disabling internal DFS on those cores to clearing bit 16 and setting bit 17 in commit "MGS-3448: gpu-viv: fix 6.2.4 remaning issues". This, as far as is known, completely disables the pulse eater. Signed-off-by: Lucas Stach --- drivers/gpu/d

[PATCH 1/2] drm/etnaviv: reset bit 0 when disabling pulse eater for reset

2025-06-20 Thread Lucas Stach
and copy this part verbatim. Fixes: b0da08559c74 ("drm/etnaviv: disable MLCG and pulse eater on GPU reset") Signed-off-by: Lucas Stach --- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/d

[PATCH 2/2] drm/etnaviv: don't touch clock gating register during reset

2025-06-20 Thread Lucas Stach
less reliable and often leaves parts of the GPU in indeterminate state. Fixes: b0da08559c74 ("drm/etnaviv: disable MLCG and pulse eater on GPU reset") Signed-off-by: Lucas Stach --- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/

Re: [PATCH] drm/etnaviv: Protect the scheduler's pending list with its lock

2025-06-16 Thread Lucas Stach
704d3d60fec4 ("drm/etnaviv: don't block scheduler when GPU is still > active") > Signed-off-by: Maíra Canal Reviewed-by: Lucas Stach Feel free to take this through drm-misc. This code is really ugly and I'm really happy to see your work on a better solution for extending

Re: [PATCH] drm/bridge: ti-sn65dsi86: fix REFCLK setting

2025-06-12 Thread Lucas Stach
Am Donnerstag, dem 12.06.2025 um 15:31 -0700 schrieb Doug Anderson: > Hi, > > On Thu, Jun 12, 2025 at 10:52 AM Doug Anderson wrote: > > > > Hi, > > > > On Thu, Jun 12, 2025 at 12:35 AM Jayesh Choudhary > > wrote: > > > > > > > > If refclk is described in devicetree node, then I see that > >

Re: ttm vs aarch64 mappings

2025-06-03 Thread Lucas Stach
Am Dienstag, dem 03.06.2025 um 06:37 +1000 schrieb Dave Airlie: > On Mon, 2 Jun 2025 at 21:51, Christian König wrote: > > [...] > > > > > Has anyone else come across this problem with TTM on aarch64? or > > > understand if I'm missing something. > > > > If I'm not completely mistaken both pgpro

Re: [PATCH v5 08/10] accel/rocket: Add IOCTLs for synchronizing memory accesses

2025-05-20 Thread Lucas Stach
Hi Tomeu, Am Dienstag, dem 20.05.2025 um 12:27 +0200 schrieb Tomeu Vizoso: > The NPU cores have their own access to the memory bus, and this isn't > cache coherent with the CPUs. > > Add IOCTLs so userspace can mark when the caches need to be flushed, and > also when a writer job needs to be wait

[PATCH] drm/bridge: adv7511: expose test mode as parameter

2025-05-19 Thread Lucas Stach
From: Michael Tretter The ADV7533 supports a test mode that simply prints vertical bars on the output whenever the MIPI-DSI clock is running. This allows to test the clock without making sure that the data lanes produce valid data. Signed-off-by: Michael Tretter Signed-off-by: Lucas Stach

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

2025-05-08 Thread Lucas Stach
Am Donnerstag, dem 08.05.2025 um 16:56 +0200 schrieb Tomeu Vizoso: > We should be comparing the last submitted sequence number with that of > the address space we may be switching to. > This isn't the relevant change here though: if we switch the address space, the comparison is moot, as we do a f

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

2025-05-07 Thread Lucas Stach
Am Mittwoch, dem 07.05.2025 um 13:21 +0200 schrieb Tomeu Vizoso: > We should be comparing the last submitted sequence number with that of > the address space we may be switching to. > > And we should be using the latter as the last submitted sequence number > afterwards. > > Signed-off-by: Tomeu

Re: [PATCH 03/15] drm/etnaviv: Use dma_buf from GEM object instance

2025-03-17 Thread Lucas Stach
Both etnaviv patches are Reviewed-by: Lucas Stach Feel free to take them through drm-misc if you want to put further cleanups on top of that series. Regards, Lucas > Signed-off-by: Thomas Zimmermann > Cc: Lucas Stach > Cc: Russell King > Cc: Christian Gmeiner > Cc: et

Re: [PATCH v6 08/14] drm/rockchip: analogix_dp: Add support to get panel from the DP AUX bus

2025-02-07 Thread Lucas Stach
Hi Damon, Am Donnerstag, dem 23.01.2025 um 18:07 +0800 schrieb Damon Ding: > Move drm_of_find_panel_or_bridge() a little later and combine it with > component_add() into a new function rockchip_dp_link_panel(). The function > will serve as done_probing() callback of devm_of_dp_aux_populate_bus(),

[PATCH 2/2] drm/rockchip: analogix_dp: move PSR entry wait to VOP CRTC handling

2025-02-07 Thread Lucas Stach
Instead of calling from the Analogix DP encoder into the VOP crtc handling, move the wait for PSR entry to vop_crtc_atomic_disable(). This untangles the Analogix DP code from the VOP, so it can safely be used with VOP2. Signed-off-by: Lucas Stach --- Note: I don't have any Rockchip system

[PATCH 1/2] drm/rockchip: vop: remove redundant condition check

2025-02-07 Thread Lucas Stach
Instead of checking the same thing twice in a row, fold the second condition into the first clause. Signed-off-by: Lucas Stach --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b

Re: [PATCH] dma-buf: fix timeout handling in dma_resv_wait_timeout v2

2025-01-29 Thread Lucas Stach
ted, instead of only returning > 1 we also waited for at least one jiffies. > > Fix that by adjusting the handling to what the function is actually > documented to do. > > v2: improve code readability > > Reported-by: Marek Olšák > Reported-by: Lucas Stach > S

Re: [PATCH] dma-buf: fix timeout handling in dma_resv_wait_timeout

2025-01-28 Thread Lucas Stach
Am Dienstag, dem 28.01.2025 um 15:28 +0100 schrieb Christian König: > Am 28.01.25 um 11:48 schrieb Lucas Stach: > > Hi Christian, > > > > Am Dienstag, dem 28.01.2025 um 11:08 +0100 schrieb Christian König: > > > Even the kerneldoc says that with a zero timeout the

Re: [PATCH] dma-buf: fix timeout handling in dma_resv_wait_timeout

2025-01-28 Thread Lucas Stach
what was implemented, instead of only returning > 1 we also waited for at least one jiffies. > > Fix that by adjusting the handling to what the function is actually > documented to do. > > Reported-by: Marek Olšák > Reported-by: Lucas Stach > Signed-off-by: Christian König

Re: [PATCH] drm/amdgpu: restore wait-free fastpath for GEM_WAIT_IDLE

2025-01-27 Thread Lucas Stach
Hi Christian, Am Montag, dem 27.01.2025 um 17:14 +0100 schrieb Christian König: > Am 27.01.25 um 17:02 schrieb Lucas Stach: > > This effectively reverts 0fea2ed61e7f ("drm/amdgpu: Remove call to > > reservation_object_test_signaled_rcu before wait"), as the premise of

[PATCH] drm/amdgpu: restore wait-free fastpath for GEM_WAIT_IDLE

2025-01-27 Thread Lucas Stach
unsignaled fences, which is not at all what userspace expects when it calls GEM_WAIT_IDLE with a timeout of 0. Signed-off-by: Lucas Stach --- This is most likely the correct kernel-side solution for the unexpected slowdown worked around with in userspace with this Mesa series: https://gitlab.freedeskto

[GIT PULL] etnaviv-next for 6.14

2025-01-08 Thread Lucas Stach
Hi Dave, hi Sima, please pull the following changes for the next merge window. This time mostly cleanups from Jingfeng, but also explicit reset handling for SoCs where this isn't done as part of a powerdomain from Philippe and fdinfo memory stats support from Christian. Regards, Lucas The follow

Re: [PATCH v4] drm/etnaviv: add optional reset support

2024-12-20 Thread Lucas Stach
Am Dienstag, dem 17.12.2024 um 11:36 + schrieb LECOINTRE Philippe: > Add optional reset support which is mentioned in vivante,gc.yaml to > allow the driver to work on SoCs whose reset signal is asserted by default > Thanks, applied to etnaviv/next. Regards, Lucas > Signed-off-by: Philippe Le

Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment

2024-12-16 Thread Lucas Stach
Am Montag, dem 16.12.2024 um 10:27 +0100 schrieb Michel Dänzer: > On 2024-12-15 21:53, Marek Olšák wrote: > > The comment explains the problem with DRM_FORMAT_MOD_LINEAR. > >     > > Signed-off-by: Marek Olšák > > > > > > diff --git a/include/uapi/drm/drm_fourcc.h b/in

Re: [PATCH v3] drm/etnaviv: add optional reset support

2024-12-09 Thread Lucas Stach
Hi Philippe, Am Freitag, dem 06.12.2024 um 17:00 + schrieb LECOINTRE Philippe: > Add optional reset support which is mentioned in vivante,gc.yaml to > allow the driver to work on SoCs whose reset signal is asserted by default > > Signed-off-by: Philippe Lecointre > Reviewed-by: Simon Lenain

Re: [PATCH v2] drm/etnaviv: add optional reset support

2024-12-05 Thread Lucas Stach
Am Donnerstag, dem 05.12.2024 um 15:06 + schrieb LECOINTRE Philippe: > Hi Lucas, > > I am grateful to you for your answer as this is my first attempt to > contribute to the kernel. > > > -Message d'origine- > > De : Lucas Stach > > Envo

Re: [PATCH 1/2] drm/etnaviv: Preallocate STLB according to CPU PAGE_SIZE

2024-12-03 Thread Lucas Stach
Am Freitag, dem 08.11.2024 um 22:36 +0800 schrieb Sui Jingfeng: > The dma_direct_alloc() allocate one page at minmium, which size is the CPU > PAGE_SIZE. while the etnaviv_iommuv2_ensure_stlb() only ask for 4KiB. The > rest memory space that beyond 4KiB gets wasted on bigger page size systems. > Fo

Re: [PATCH v2] drm/etnaviv: add optional reset support

2024-12-03 Thread Lucas Stach
Hi Philippe, Am Freitag, dem 08.11.2024 um 14:00 + schrieb LECOINTRE Philippe: > Add optional reset support which is mentioned in vivante,gc.yaml to > allow the driver to work on SoCs whose reset signal is asserted by default > Avoid enabling the interrupt until everything is ready > > Signed

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

2024-12-03 Thread Lucas Stach
Am Donnerstag, dem 21.11.2024 um 10:24 +0100 schrieb Christian Gmeiner: > From: Christian Gmeiner > > Use the new helper to export stats about memory usage. > Thanks, applied to etnaviv/next. Regards, Lucas > Signed-off-by: Christian Gmeiner > --- > drivers/gpu/drm/etnaviv/etnaviv_drv.c | 12

Re: [PATCH v3 0/3] drm/etnaviv: Trivial mmu map and ummap cleanups

2024-12-03 Thread Lucas Stach
Am Freitag, dem 15.11.2024 um 20:32 +0800 schrieb Sui Jingfeng: > The 'sg->offset' denotes the offset into a page in bytes, but under drm > subsystem, there has NO drivers that etnaviv can contact that actually > touch the 'offset' data member of SG anymore. This means that all DMA > addresses that

Re: [PATCH v16] drm/etnaviv: Fix page property being used for non writecombine buffers

2024-12-03 Thread Lucas Stach
Am Montag, dem 04.11.2024 um 08:41 +0800 schrieb Sui Jingfeng: > In the etnaviv_gem_vmap_impl() function, the driver vmap whatever buffers > with write combine(WC) page property, this is incorrect. Cached buffers > should be mapped with the cached page property and uncached buffers should > be mapp

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

2024-12-03 Thread Lucas Stach
Am Freitag, dem 15.11.2024 um 21:22 + schrieb Easwar Hariharan: > 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) > Thanks,

Re: [PATCH] drm/etnaviv: Drop the 'struct etnaviv_iommu_global::pta_lock' data member

2024-12-03 Thread Lucas Stach
Am Samstag, dem 26.10.2024 um 01:51 +0800 schrieb Sui Jingfeng: > Because it is not get used, drop it. > Thanks, applied to etnaviv/next. Regards, Lucas > Signed-off-by: Sui Jingfeng > --- > drivers/gpu/drm/etnaviv/etnaviv_mmu.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/

Re: [PATCH] drm/etnaviv: etnaviv_cmdbuf.c: Drop the unneeded include of drm_mm.h

2024-12-03 Thread Lucas Stach
Am Samstag, dem 26.10.2024 um 01:56 +0800 schrieb Sui Jingfeng: > The etnaviv_cmdbuf.c doesn't reference any functions or data members > defined in drm_mm.h, remove unneeded headers may reduce kernel compile > times. > Thanks, applied to etnaviv/next. Regards, Lucas > Signed-off-by: Sui Jingfeng

Re: [PATCH v6 7/7] drm/doc: document some tracepoints as uAPI

2024-11-14 Thread Lucas Stach
n the fields, > formats and semantics of these events. > > Acked-by: Lucas Stach > Acked-by: Maíra Canal > Signed-off-by: Pierre-Eric Pelloux-Prayer > --- > Documentation/gpu/drm-uapi.rst| 19 > .../gpu/drm/scheduler/gpu_scheduler_trace.h

[GIT PULL] etnaviv-next for 6.13

2024-11-07 Thread Lucas Stach
) Lucas Stach (7): drm/etnaviv: hold GPU lock across perfmon sampling drm/etnaviv: assert GPU lock held in perfmon pipe_*_read functions drm/etnaviv: unconditionally enable debug registers drm/etnaviv: update hardware headers from rnndb drm

Re: [PATCH 3/3] drm/etnaviv: Print an error message if inserting IOVA range fails

2024-10-28 Thread Lucas Stach
Hi Sui, Am Montag, dem 07.10.2024 um 12:20 +0200 schrieb Lucas Stach: > Am Samstag, dem 05.10.2024 um 03:42 +0800 schrieb Sui Jingfeng: > > Print an error message to help debug when such an issue happen, since it's > > not so obvious. > > > > Signed-off-by: Sui J

Re: [PATCH] drm/etnaviv: etnaviv_cmdbuf.c: Drop the unneeded include of drm_mm.h

2024-10-28 Thread Lucas Stach
Am Samstag, dem 26.10.2024 um 01:56 +0800 schrieb Sui Jingfeng: > The etnaviv_cmdbuf.c doesn't reference any functions or data members > defined in drm_mm.h, remove unneeded headers may reduce kernel compile > times. > > Signed-off-by: Sui Jingfeng Thanks, applied to etnaviv/next. > --- > driv

Re: [PATCH] drm/etnaviv: Drop the 'struct etnaviv_iommu_global::pta_lock' data member

2024-10-28 Thread Lucas Stach
Am Samstag, dem 26.10.2024 um 01:51 +0800 schrieb Sui Jingfeng: > Because it is not get used, drop it. > > Signed-off-by: Sui Jingfeng Thanks, applied to etnaviv/next. > --- > drivers/gpu/drm/etnaviv/etnaviv_mmu.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/gpu/drm/etnaviv

Re: [PATCH v2 0/2] drm/etnaviv: Fix GPUVA range collision when CPU page size is not equal to GPU page size

2024-10-28 Thread Lucas Stach
Am Samstag, dem 26.10.2024 um 04:43 +0800 schrieb Sui Jingfeng: > Etnaviv assumes that GPU page size is 4KiB, however, when using > softpin capable GPUs on a different CPU page size configuration. > The userspace allocated GPUVA ranges collision, unable to be > inserted to the specified address hol

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

2024-10-28 Thread Lucas Stach
Am Freitag, dem 05.07.2024 um 22:00 +0200 schrieb Lucas Stach: > The perfmon sampling mutates shared GPU state (e.g. VIVS_HI_CLOCK_CONTROL > to select the pipe for the perf counter reads). To avoid clashing with > other functions mutating the same state (e.g. etnaviv_gpu_update_clo

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

2024-10-28 Thread Lucas Stach
Am Sonntag, dem 25.08.2024 um 20:14 +0800 schrieb Sui Jingfeng: > Currently, the calling of mutex_destroy() is ignored on error handling > code path. It is safe for now, since mutex_destroy() actually does > nothing in non-debug builds. But the mutex_destroy() is used to mark > the mutex uninitiali

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

2024-10-28 Thread Lucas Stach
Am Sonntag, dem 08.09.2024 um 20:11 +0800 schrieb Sui Jingfeng: > The drm_prime_pages_to_sg() function takes an 'unsigned int' argument to > store the length of the page vector. The size of the object in number of > CPU pages can not be negative, hence, use 'unsigned' variable to store > the number

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

2024-10-28 Thread Lucas Stach
Am Mittwoch, dem 02.10.2024 um 07:34 +0800 schrieb Xiaolei Wang: > Remove __GFP_HIGHMEM when requesting a page from DMA32 zone, > and since all vivante GPUs in the system will share the same > DMA constraints, move the check of whether to get a page from > DMA32 to etnaviv_bind(). > > Fixes: b72af

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

2024-10-25 Thread Lucas Stach
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 --- drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 3 ++- 1 file changed, 2 insertions

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

2024-10-25 Thread Lucas Stach
Since the kernel ringbuffers are allocated from a larger suballocated area, same as the user commandbufs, they don't need to be CPU page sized. Allocate 4KB for the kernel ring buffers, as we never use more than that. Signed-off-by: Lucas Stach --- drivers/gpu/drm/etnaviv/etnaviv_gpu.

Re: [PATCH 0/3] Fix GPU virtual address collosion when CPU page size != GPU page size

2024-10-25 Thread Lucas Stach
Hi Sui, Am Samstag, dem 05.10.2024 um 03:42 +0800 schrieb Sui Jingfeng: > Etnaviv assumes that GPU page size is 4KiB, however, when using > softpin capable GPUs on a different CPU page size configuration. > Userspace still doing the allocation with 4KiB page as unit. This > results in userspace al

Re: [PATCH 3/3] drm/etnaviv: Print an error message if inserting IOVA range fails

2024-10-07 Thread Lucas Stach
Am Samstag, dem 05.10.2024 um 03:42 +0800 schrieb Sui Jingfeng: > Print an error message to help debug when such an issue happen, since it's > not so obvious. > > Signed-off-by: Sui Jingfeng Reviewed-by: Lucas Stach > --- > v0 -> v1: Use dev_err_ratelimited() to

Re: [PATCH 2/3] drm/etnaviv: Map and unmap the GPU VA range with respect to its user size

2024-10-07 Thread Lucas Stach
Am Samstag, dem 05.10.2024 um 03:42 +0800 schrieb Sui Jingfeng: > Since the GPU VA space is compact in terms of 4KiB unit, map and/or unmap > the area that doesn't belong to a context breaks the philosophy of PPAS. > That results in severe errors: GPU hang and MMU fault (page not present) > and suc

Re: [PATCH 1/3] drm/etnaviv: Track GPU VA size separately

2024-10-07 Thread Lucas Stach
Am Samstag, dem 05.10.2024 um 03:42 +0800 schrieb Sui Jingfeng: > Etnaviv assumes that GPU page size is 4KiB, yet on some systems, the CPU > page size is 16KiB. The size of etnaviv buffer objects will be aligned > to CPU page size on kernel side, however, userspace still assumes the > page size is

Re: [PATCH] drm/etnaviv: Print error message if inserting IOVA address range fails

2024-10-02 Thread Lucas Stach
Am Mittwoch, dem 02.10.2024 um 03:26 +0800 schrieb Sui Jingfeng: > Hi, > > On 2024/10/1 16:27, Lucas Stach wrote: > > Hi Sui, > > > > Am Dienstag, dem 01.10.2024 um 06:17 +0800 schrieb Sui Jingfeng: > > > Etnaviv assumes that GPU page size is 4KiB, yet on some

Re: [PATCH v15 05/19] drm/etnaviv: Add contructor and destructor for etnaviv_gem_get_mapping structure

2024-10-01 Thread Lucas Stach
Am Sonntag, dem 08.09.2024 um 17:43 +0800 schrieb Sui Jingfeng: > Because this make the code more easier to understand, When GPU access the > VRAM, it will allocate a new mapping to use if there don't have one. > > Signed-off-by: Sui Jingfeng > --- > drivers/gpu/drm/etnaviv/etnaviv_gem.c | 40 ++

Re: [PATCH v15 01/19] drm/etnaviv: Implement drm_gem_object_funcs::print_info()

2024-10-01 Thread Lucas Stach
Hi Sui, Am Sonntag, dem 08.09.2024 um 17:43 +0800 schrieb Sui Jingfeng: > It will be called by drm_gem_print_info() if implemented, and it can > provide more information about the framebuffer objects. Etnaviv GEM BOs are not framebuffer objects. > > Signed-off-by: Sui Jingfeng > --- > drivers

Re: [PATCH v15 04/19] drm/etnaviv: Make etnaviv_gem_prime_vmap() a static function

2024-10-01 Thread Lucas Stach
Am Sonntag, dem 08.09.2024 um 17:43 +0800 schrieb Sui Jingfeng: > The etnaviv_gem_prime_vmap() function has no caller in the > etnaviv_gem_prime.c file, move it into etnaviv_gem.c file. > While at it, rename it as etnaviv_gem_object_vmap(), since > it is a intermidiate layer function, it has no dir

Re: [PATCH v15 03/19] drm/etnaviv: Implement drm_gem_object_funcs::vunmap()

2024-10-01 Thread Lucas Stach
Am Sonntag, dem 08.09.2024 um 17:43 +0800 schrieb Sui Jingfeng: > The vunmap() can be used to release virtual mapping obtained by vmap(), > While the vmap() is used to make a long duration mapping of multiple > physical pages into a contiguous virtual space. > > Make the implementation-specific vu

Re: [PATCH v15 18/19] drm/etnaviv: Allow userspace specify the domain of etnaviv GEM buffer object

2024-10-01 Thread Lucas Stach
Am Sonntag, dem 08.09.2024 um 17:43 +0800 schrieb Sui Jingfeng: > Otherwise we don't know where a etnaviv GEM buffer object should put when > we create it at userspace. > > Signed-off-by: Sui Jingfeng > --- > drivers/gpu/drm/etnaviv/etnaviv_drv.c | 9 + > include/uapi/drm/etnaviv_drm.h

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

2024-10-01 Thread Lucas Stach
Hi Xiaolei, Am Dienstag, dem 03.09.2024 um 10:08 +0800 schrieb Xiaolei Wang: > Remove __GFP_HIGHMEM when requesting a page from DMA32 zone, > and since all vivante GPUs in the system will share the same > DMA constraints, move the check of whether to get a page from > DMA32 to etnaviv_bind(). > >

Re: [PATCH v15 16/19] drm/etnaviv: Call etnaviv_gem_obj_add() in ernaviv_gem_new_private()

2024-10-01 Thread Lucas Stach
Am Sonntag, dem 08.09.2024 um 17:43 +0800 schrieb Sui Jingfeng: > The etnaviv_gem_obj_add() a common operation, the 'etnaviv_drm_private:: > gem_list' is being used to record(track) all of the etnaviv GEM buffer > object created in this driver. > > Once a etnaviv GEM buffer object has been allocat

Re: [PATCH] drm/etnaviv: Print error message if inserting IOVA address range fails

2024-10-01 Thread Lucas Stach
Hi Sui, Am Dienstag, dem 01.10.2024 um 06:17 +0800 schrieb Sui Jingfeng: > Etnaviv assumes that GPU page size is 4KiB, yet on some systems, the CPU > page size is 16 KiB. The size of etnaviv buffer objects will be aligned > to CPU page size on kernel side, however, userspace still assumes the > pa

Re: [PATCH v15 08/19] drm/etnaviv: Fix wrong caching mode being used for non writecombine buffers

2024-10-01 Thread Lucas Stach
Am Sonntag, dem 08.09.2024 um 17:43 +0800 schrieb Sui Jingfeng: > In the etnaviv_gem_vmap_impl() function, the driver vmap whatever buffers > with write combine(WC) page property. This is incorrect, as some platforms > are cached coherent. Cached buffers should be mapped with cached page > property

Re: [PATCH v15 02/19] drm/etnaviv: Export drm_gem_print_info() and use it

2024-10-01 Thread Lucas Stach
Am Sonntag, dem 08.09.2024 um 17:43 +0800 schrieb Sui Jingfeng: > This will make the newly implemented etnaviv_gem_object_funcs::print_info > get in use, which improves code sharing and simplifies debugfs. Achieve > better humen readability for debug log. > > Use container_of_const() if 'struct et

Re: [PATCH v15 11/19] drm/etnaviv: Add etnaviv_gem_obj_remove() helper

2024-10-01 Thread Lucas Stach
Am Sonntag, dem 08.09.2024 um 17:43 +0800 schrieb Sui Jingfeng: > Which is corresonding to the etnaviv_gem_obj_add() > While symmetry is nice, it's still not really symmetric, as this function isn't exported into the PRIME parts of the driver like etnaviv_gem_obj_add(). Given that I don't really s

Re: [PATCH v15 09/19] drm/etnaviv: Add constructor and destructor for the etnaviv_drm_private structure

2024-10-01 Thread Lucas Stach
Am Sonntag, dem 08.09.2024 um 17:43 +0800 schrieb Sui Jingfeng: > Because there are a lot of data members in the struct etnaviv_drm_private, > which are intended to be shared by all GPU cores. It can be lengthy and > daunting on error handling, the 'gem_lock' of struct etnaviv_drm_private > just be

Re: [PATCH] drm/etnaviv: Remove GFP_HIGHUSER in systems with 32 address limits

2024-08-06 Thread Lucas Stach
Hi Xiaolei, Am Dienstag, dem 06.08.2024 um 18:47 +0800 schrieb Xiaolei Wang: > GFP_HIGHUSER is for userspace allocations that may be mapped > to userspace,An example may be a hardware allocation that maps > data directly into userspace but has no addressing limitations, > this conflicts with GFP_D

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

2024-07-05 Thread Lucas Stach
draw progresses. Signed-off-by: Lucas Stach --- v2: - dropped debug register enable/disable - locked against concurrent debug register access --- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 1 + drivers/gpu/drm/etnaviv/etnaviv_sched.c | 17 +++-- 2 files changed, 16 insertions(+), 2

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

2024-07-05 Thread Lucas Stach
t;drm/etnaviv: use 'sync points' for performance monitor requests") Signed-off-by: Lucas Stach --- v2: new patch --- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.

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

2024-07-05 Thread Lucas Stach
manage some prerequisites. Signed-off-by: Lucas Stach --- v2: new patch replacing more complex usage tracking from v1 --- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu

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

2024-07-05 Thread Lucas Stach
Update state_hi.xml.h header from etna_viv commit 8f43a34fd9cd ("rndb: document FE current primitve debug reg") Signed-off-by: Lucas Stach --- v2: no changes --- drivers/gpu/drm/etnaviv/state_hi.xml.h | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) di

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

2024-07-05 Thread Lucas Stach
The perf counter read functions don't just read registers, but they also mutate state to direct the reads towards the correct pipe and engine. Assert that the GPU mutex is held at this point, so that those state changes don't interfere with others. Signed-off-by: Lucas Stach --- v2:

Re: [PATCH v5 3/4] drm/sched: trace dependencies for gpu jobs

2024-07-03 Thread Lucas Stach
Am Freitag, dem 14.06.2024 um 10:16 +0200 schrieb Pierre-Eric Pelloux- Prayer: > Trace the fence dependencies similarly to how we print fences: > > ... , dependencies:{(context:606, seqno:38006)} > > This allows tools to analyze the dependencies between the jobs (previously > it was only possibl

Re: [PATCH v5 4/4] drm/doc: document some tracepoints as uAPI

2024-07-03 Thread Lucas Stach
ogether through a stable representation of the fences is a very welcome improvement. Acked-by: Lucas Stach Regards, Lucas > Thanks! > Pierre-Eric > > > Le 14/06/2024 à 10:16, Pierre-Eric Pelloux-Prayer a écrit : > > This commit adds a document section in drm-uapi.rst abou

Re: [PATCH v5 4/4] drm/doc: document some tracepoints as uAPI

2024-07-03 Thread Lucas Stach
Am Freitag, dem 14.06.2024 um 10:16 +0200 schrieb Pierre-Eric Pelloux- Prayer: > This commit adds a document section in drm-uapi.rst about tracepoints, > and mark the events gpu_scheduler_trace.h as stable uAPI. > > The goal is to explicitly state that tools can rely on the fields, > formats and s

Re: [PATCH 1/4] drm/scheduler: implement hardware time accounting

2024-07-02 Thread Lucas Stach
Hi Tvrtko, Am Dienstag, dem 02.07.2024 um 09:42 +0100 schrieb Tvrtko Ursulin: > Hi, > > I few questions below. > > On 01/07/2024 18:14, Lucas Stach wrote: > > From: Christian König > > > > Multiple drivers came up with the requirement to measure how > >

Re: [PATCH 1/3] drm/etnaviv: move debug register en-/disable into own function

2024-07-01 Thread Lucas Stach
Am Freitag, dem 28.06.2024 um 13:07 +0200 schrieb Philipp Zabel: > On Fr, 2024-06-28 at 12:47 +0200, Lucas Stach wrote: > > The next changes will introduce another place where the debug registers > > need to be en-/disabled. Split into separate functions, so we don't need >

[PATCH 1/4] drm/scheduler: implement hardware time accounting

2024-07-01 Thread Lucas Stach
the other hand solves this task by keeping track of all the submissions and calculating how much time they have used on demand. Move this approach over into the scheduler to provide an easy to use interface for all drivers. Signed-off-by: Christian König Signed-off-by: Lucas Stach --- v2

[PATCH 3/4] drm/amdgpu: use new scheduler accounting

2024-07-01 Thread Lucas Stach
From: Christian König Instead of implementing this ourself. Signed-off-by: Christian König Signed-off-by: Lucas Stach --- v2: - rebased to v6.10-rc1 - adapted to match new function names --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 52 - 1 file changed, 8 insertions

[PATCH 4/4] drm/etnaviv: export client GPU usage statistics via fdinfo

2024-07-01 Thread Lucas Stach
This exposes a accumulated GPU active time per client via the fdinfo infrastructure. Signed-off-by: Lucas Stach --- v2: - new patch --- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 32 ++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/etnaviv

[PATCH 2/4] drm/amdgpu: mostly revert "fix force APP kill hang(v4)"

2024-07-01 Thread Lucas Stach
to amdgpu. Signed-off-by: Christian König Signed-off-by: Lucas Stach --- v2: - rebased to v6.10-rc1 --- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 59 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- 3 files changed, 5

[PATCH 2/3] drm/etnaviv: update hardware headers from rnndb

2024-06-28 Thread Lucas Stach
Update state_hi.xml.h header from etna_viv commit 8f43a34fd9cd ("rndb: document FE current primitve debug reg") Signed-off-by: Lucas Stach --- drivers/gpu/drm/etnaviv/state_hi.xml.h | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drive

[PATCH 1/3] drm/etnaviv: move debug register en-/disable into own function

2024-06-28 Thread Lucas Stach
r. Signed-off-by: Lucas Stach --- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 33 --- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 3 +++ 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_g

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

2024-06-28 Thread Lucas Stach
draw progresses. Signed-off-by: Lucas Stach --- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 1 + drivers/gpu/drm/etnaviv/etnaviv_sched.c | 16 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h b/drivers/gpu/drm/etnaviv

[GIT PULL] etnaviv-next for 6.11

2024-06-28 Thread Lucas Stach
erformance Derek Foreman (1): drm/etnaviv: Read some FE registers twice Krzysztof Kozlowski (1): drm/etnaviv: drop driver owner assignment Lucas Stach (5): drm/etnaviv: don't disable TS on MMUv2 core when moving the linear w

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

2024-06-26 Thread Lucas Stach
s, Lucas > > > > > Cheers, > > > > Tomeu > > > > On Wed, Jun 12, 2024 at 4:26 PM Tomeu Vizoso wrote: > > > > > > On Mon, May 20, 2024 at 1:19 PM Daniel Stone wrote: > > > > > > > > Hi, > > > > >

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

2024-06-25 Thread Lucas Stach
Am Dienstag, dem 25.06.2024 um 11:18 +0800 schrieb Icenowy Zheng: > 在 2024-05-20星期一的 00:53 +0800,Sui Jingfeng写道: > > drm/etnaviv use the component framework to bind multiple GPU cores to > > a > > virtual master, the virtual master is manually create during driver > > load > > time. This works well

[PATCH] drm/rockchip: analogix_dp: allow to work without panel

2024-06-21 Thread Lucas Stach
When the DP output is routed to a external connector there is no need for a fixed panel, as the panel may be detected via EDID on the AUX channel. Allow to continue probing if no panel reference is present. Signed-off-by: Lucas Stach --- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 +- 1

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

2024-06-21 Thread Lucas Stach
completed jobs and reuse this for all fences that get signalled by the handler. Signed-off-by: Lucas Stach --- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c index

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

2024-06-21 Thread Lucas Stach
hen 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 --- drivers/gpu/drm/etnaviv/etnaviv_sched.c | 9 - 1 file changed, 4 insertions(+), 5 deletio

[PATCH v2] drm/etnaviv: switch devcoredump allocations to GFP_NOWAIT

2024-06-21 Thread Lucas Stach
allows background reclaim to be triggered, but avoids any stalls waiting for direct reclaim. Signed-off-by: Lucas Stach Reviewed-by: Daniel Vetter --- v2: drop __GFP_NORWARN, as it's already part of GFP_NOWAIT --- drivers/gpu/drm/etnaviv/etnaviv_dump.c | 5 ++--- 1 file changed, 2 inser

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

2024-06-21 Thread Lucas Stach
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 --- v2: switch conditions to be exact matches --- drivers/gpu/d

[PATCH v2 14/14] drm/bridge: analogix_dp: handle AUX transfer timeouts

2024-06-19 Thread Lucas Stach
Timeouts on the AUX bus are to be expected in certain normal operating conditions. There is no need to raise an error log or re-initialize the whole AUX state machine. Simply acknowledge the AUX_ERR interrupt and let upper layers know about the timeout. Signed-off-by: Lucas Stach Reviewed-by

[PATCH v2 13/14] drm/bridge: analogix_dp: only read AUX status when an error occured

2024-06-19 Thread Lucas Stach
All AUX error responses raise the AUX_ERR interrupt, so there is no need to read the AUX status register in normal operation. Only read the status when an error occurred and we can expect a different status than OK. Signed-off-by: Lucas Stach Reviewed-by: Robert Foss Tested-by: Heiko Stuebner

[PATCH v2 11/14] drm/bridge: analogix_dp: don't wait for PLL lock too early

2024-06-19 Thread Lucas Stach
. Signed-off-by: Lucas Stach Reviewed-by: Robert Foss Tested-by: Heiko Stuebner (rk3288-veyron and rk3399-gru) --- drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c b

[PATCH v2 12/14] drm/bridge: analogix_dp: simplify and correct PLL lock checks

2024-06-19 Thread Lucas Stach
Move the wait loop into its own function, so it doesn't need to be replicated in multiple locations. Also move the PLL lock checks between setting the link bandwidth, which may cause the PLL to unlock, and the MACRO_RST which needs the PLL to be locked. Signed-off-by: Lucas Stach Review

[PATCH v2 08/14] drm/bridge: analogix_dp: move basic controller init into runtime PM

2024-06-19 Thread Lucas Stach
Make sure the controller is in a basic working state after runtime resume. Keep the analog function enable in the mode set path as this enables parts of the PHY that are only required to be powered when there is a data stream being sent out. Signed-off-by: Lucas Stach Reviewed-by: Robert Foss

  1   2   3   4   5   6   7   8   9   10   >