Re: [RFC PATCH 2/2] drm/panthor: add initial mt8196 support

2025-09-07 Thread Chia-I Wu
On Wed, Sep 3, 2025 at 11:02 PM Boris Brezillon wrote: > > On Wed, 3 Sep 2025 15:55:04 -0700 > Chia-I Wu wrote: > > > diff --git a/drivers/gpu/drm/panthor/Makefile > > b/drivers/gpu/drm/panthor/Makefile > > index 02db21748c125..75e92c461304b 100644 > > --

Re: [RFC PATCH 2/2] drm/panthor: add initial mt8196 support

2025-09-05 Thread Chia-I Wu
On Fri, Sep 5, 2025 at 2:18 AM Florent Tomasin wrote: > > > > On 05/09/2025 00:06, Chia-I Wu wrote: > > On Wed, Sep 3, 2025 at 11:02 PM Boris Brezillon > > wrote: > >> > >> On Wed, 3 Sep 2025 15:55:04 -0700 > >> Chia-I Wu wrote: > >>

Re: [RFC PATCH 0/2] drm/panthor: initial mt8196 support

2025-09-04 Thread Chia-I Wu
On Thu, Sep 4, 2025 at 4:20 AM Nicolas Frattaroli wrote: > > Hi, > > On Thursday, 4 September 2025 00:55:02 Central European Summer Time Chia-I Wu > wrote: > > MediaTek MT8196 has Mali-G925-Immortalis, for which panthor gained > > support recently. But the soc also req

Re: [RFC PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: add MediaTek MT8196 compatible

2025-09-04 Thread Chia-I Wu
On Thu, Sep 4, 2025 at 2:30 AM Krzysztof Kozlowski wrote: > > On Wed, Sep 03, 2025 at 03:55:03PM -0700, Chia-I Wu wrote: > > MediaTek MT8196 has Mali-G925-Immortalis, which can be supported by > > panthor. > > What is panthor? Please describe here hardware or provide so

[RFC PATCH 2/2] drm/panthor: add initial mt8196 support

2025-09-03 Thread Chia-I Wu
1.5.0 for 4800.gpu on minor 1 Signed-off-by: Chia-I Wu --- drivers/gpu/drm/panthor/Kconfig | 6 + drivers/gpu/drm/panthor/Makefile | 2 ++ drivers/gpu/drm/panthor/panthor_device.c | 2 ++ drivers/gpu/drm/panthor/panthor_device.h | 4 +++ drivers/gpu/d

[RFC PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: add MediaTek MT8196 compatible

2025-09-03 Thread Chia-I Wu
MediaTek MT8196 has Mali-G925-Immortalis, which can be supported by panthor. Signed-off-by: Chia-I Wu --- Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml b

[RFC PATCH 0/2] drm/panthor: initial mt8196 support

2025-09-03 Thread Chia-I Wu
nel/-/commit/170d5fc90f817dc90bde54b32872c59cf5c9 Chia-I Wu (2): dt-bindings: gpu: mali-valhall-csf: add MediaTek MT8196 compatible drm/panthor: add initial mt8196 support .../bindings/gpu/arm,mali-valhall-csf.yaml| 1 + drivers/gpu/drm/panthor/Kconfig | 6 + driv

Re: [PATCH] drm/panthor: check bo offset alignment in vm bind

2025-09-03 Thread Chia-I Wu
On Wed, Sep 3, 2025 at 9:46 AM Boris Brezillon wrote: > > On Thu, 28 Aug 2025 13:01:16 -0700 > Chia-I Wu wrote: > > > Fail early from panthor_vm_bind_prepare_op_ctx instead of late from > > ops->map_pages. > > > > Signed-off-by: Chia-I Wu > > Revie

[PATCH v2] drm/panthor: validate group queue count

2025-09-03 Thread Chia-I Wu
A panthor group can have at most MAX_CS_PER_CSG panthor queues. Fixes: 4bdca11507928 ("drm/panthor: Add the driver frontend block") Signed-off-by: Chia-I Wu Reviewed-by: Boris Brezillon # v1 Reviewed-by: Steven Price --- v2: - move validation up to panthor_ioctl_group_create - add

Re: [PATCH v2] drm/panthor: assign unique names to queues

2025-09-03 Thread Chia-I Wu
On Mon, Sep 1, 2025 at 12:27 AM Boris Brezillon wrote: > > diff --git a/drivers/gpu/drm/panthor/panthor_sched.c > > b/drivers/gpu/drm/panthor/panthor_sched.c > > index ba5dc3e443d9c..62f17476e5852 100644 > > --- a/drivers/gpu/drm/panthor/panthor_sched.c > > +++ b/drivers/gpu/drm/panthor/panthor_

[PATCH] drm/panthor: validate group queue count

2025-09-02 Thread Chia-I Wu
A panthor group can have at most MAX_CS_PER_CSG panthor queues. Signed-off-by: Chia-I Wu --- drivers/gpu/drm/panthor/panthor_sched.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c index ba5dc3e443d9c

[PATCH v2] drm/panthor: assign unique names to queues

2025-08-29 Thread Chia-I Wu
can distinguish them. Signed-off-by: Chia-I Wu --- v2: - include drm_client_id in the name to be truly unique - remove unnecessary NULL in drm_sched_init_args initialization - reformat to column width 100 --- drivers/gpu/drm/panthor/panthor_drv.c | 2 +- drivers/gpu/drm/panthor/panthor_sche

Re: [PATCH] drm/panthor: assign unique names to queues

2025-08-29 Thread Chia-I Wu
On Fri, Aug 29, 2025 at 1:00 AM Boris Brezillon wrote: > > On Thu, 28 Aug 2025 13:05:32 -0700 > Chia-I Wu wrote: > > > Userspace relies on the ring field of gpu_scheduler tracepoints to > > identify a drm_gpu_scheduler. The value of the ring field is taken from > >

Re: [PATCH 0/2] drm/panthor: add custom ASN hash support

2025-08-29 Thread Chia-I Wu
On Fri, Aug 29, 2025 at 6:41 AM Steven Price wrote: > > On 28/08/2025 21:18, Chia-I Wu wrote: > > Some socs such as mt8196 require custom ASN hash. > > I don't know the full details of this, but I'm puzzled by the "require" > here. > > AIUI the &qu

[PATCH 2/2] drm/panthor: add asn-hash support

2025-08-28 Thread Chia-I Wu
Parse asn-hash and enable custom ASN hash when the property exists. This is required on some socs such as mt8196. Signed-off-by: Chia-I Wu --- drivers/gpu/drm/panthor/panthor_device.c | 28 drivers/gpu/drm/panthor/panthor_device.h | 6 + drivers/gpu/drm/panthor

[PATCH 0/2] drm/panthor: add custom ASN hash support

2025-08-28 Thread Chia-I Wu
Some socs such as mt8196 require custom ASN hash. Chia-I Wu (2): dt-bindings: gpu: mali-valhall-csf: add asn-hash drm/panthor: add asn-hash support .../bindings/gpu/arm,mali-valhall-csf.yaml| 8 ++ drivers/gpu/drm/panthor/panthor_device.c | 28 +++ drivers/gpu

[PATCH] drm/panthor: assign unique names to queues

2025-08-28 Thread Chia-I Wu
can distinguish them. Signed-off-by: Chia-I Wu --- drivers/gpu/drm/panthor/panthor_sched.c | 32 ++--- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c index ba5dc3e443d9c..26616b6cb1

[PATCH v2] drm/panthor: always set fence errors on CS_FAULT

2025-08-28 Thread Chia-I Wu
It is unclear why fence errors were set only for CS_INHERIT_FAULT. Downstream driver also does not treat CS_INHERIT_FAULT specially. Remove the check. Signed-off-by: Chia-I Wu Reviewed-by: Boris Brezillon --- v2: add rb from Boris --- drivers/gpu/drm/panthor/panthor_sched.c | 2 +- 1 file

[PATCH] drm/panthor: check bo offset alignment in vm bind

2025-08-28 Thread Chia-I Wu
Fail early from panthor_vm_bind_prepare_op_ctx instead of late from ops->map_pages. Signed-off-by: Chia-I Wu Reviewed-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_mmu.c

Re: [PATCH v6 0/6] Add support for new Mali GPUs

2025-07-23 Thread Chia-I Wu
ux-firmware I've made minor comments to individual patches. With them addressed, the series is Reviewed-by: Chia-I Wu

Re: [PATCH v6 6/6] drm/panthor: Add support for Mali-Gx20 and Mali-Gx25 GPUs

2025-07-23 Thread Chia-I Wu
On Mon, Jul 21, 2025 at 3:53 PM Karunika Choo wrote: > > This patch adds firmware binary and GPU model naming support for > Mali-Gx20 and Mali-Gx25 GPUs. > > The GPU_COHERENCY_FEATURES macros are slightly reworked as the > assumption that FEATURE = BIT(PROTOCOL) no longer holds with the > introduc

Re: [PATCH v6 4/6] drm/panthor: Add support for Mali-Gx15 family of GPUs

2025-07-23 Thread Chia-I Wu
On Mon, Jul 21, 2025 at 3:13 PM Karunika Choo wrote: > > Mali-Gx15 introduces a new GPU_FEATURES register that provides > information about GPU-wide supported features. The register value will > be passed on to userspace via gpu_info. > > Additionally, Mali-Gx15 presents an 'Immortalis' naming var

Re: [PATCH v5 3/6] drm/panthor: Add support for Mali-G710, Mali-G510 and Mali-G310

2025-07-23 Thread Chia-I Wu
On Mon, Jul 21, 2025 at 4:33 AM Karunika Choo wrote: > > This patch adds GPU model name and FW binary support for Mali-G710, > Mali-G510, and Mali-G310. > > Signed-off-by: Karunika Choo > --- > drivers/gpu/drm/panthor/panthor_fw.c | 2 ++ > drivers/gpu/drm/panthor/panthor_hw.c | 6 ++ > 2 fi

Re: [PATCH 0/9] drm/panthor: add devcoredump support

2025-07-19 Thread Chia-I Wu
On Sat, Jul 19, 2025 at 5:41 PM Daniel Almeida wrote: > > Hi Chia-I Wu :) > > > On 19 Jul 2025, at 21:01, Chia-I Wu wrote: > > > > This series adds devcoredump support to panthor. > > > > This is written from scratch and is not based on the prior work

[PATCH 9/9] drm/panthor: add DRM_PANTHOR_VM_BIND_OP_MAP_DUMPABLE

2025-07-19 Thread Chia-I Wu
When the flag is set, bo data is captured for devcoredump. Signed-off-by: Chia-I Wu --- drivers/gpu/drm/panthor/panthor_coredump.c | 36 ++ drivers/gpu/drm/panthor/panthor_drv.c | 3 +- drivers/gpu/drm/panthor/panthor_mmu.c | 7 +++-- include/uapi/drm

[PATCH 8/9] drm/panthor: check bo offset alignment in vm bind

2025-07-19 Thread Chia-I Wu
Fail early from panthor_vm_bind_prepare_op_ctx instead of late from ops->map_pages. Signed-off-by: Chia-I Wu --- drivers/gpu/drm/panthor/panthor_mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_mmu.c b/drivers/gpu/drm/pant

[PATCH 6/9] drm/panthor: capture AS state for devcoredump

2025-07-19 Thread Chia-I Wu
Capture interesting MMU_AS_CONTROL regs for devcoredump. Signed-off-by: Chia-I Wu --- drivers/gpu/drm/panthor/panthor_coredump.c | 33 ++ drivers/gpu/drm/panthor/panthor_coredump.h | 11 drivers/gpu/drm/panthor/panthor_sched.c| 5 drivers/gpu/drm/panthor

[PATCH 7/9] drm/panthor: capture VMA state for devcoredump

2025-07-19 Thread Chia-I Wu
Capture interesting panthor_vma fields for devcoredump. Because bo->label can change at anytime, we cap it to 32 chars to simplify size estimation. Signed-off-by: Chia-I Wu --- drivers/gpu/drm/panthor/panthor_coredump.c | 78 -- drivers/gpu/drm/panthor/panthor_coredum

[PATCH 4/9] drm/panthor: capture CSG state for devcoredump

2025-07-19 Thread Chia-I Wu
Capture interesting panthor_fw_csg_iface fields for devcoredump. Signed-off-by: Chia-I Wu --- drivers/gpu/drm/panthor/panthor_coredump.c | 58 ++ drivers/gpu/drm/panthor/panthor_coredump.h | 23 + drivers/gpu/drm/panthor/panthor_sched.c| 13 + 3 files changed

[PATCH 5/9] drm/panthor: capture CS state for devcoredump

2025-07-19 Thread Chia-I Wu
Capture interesting panthor_fw_cs_iface, panthor_fw_ringbuf_input_iface, and panthor_fw_ringbuf_output_iface fields for devcoredump. Signed-off-by: Chia-I Wu --- drivers/gpu/drm/panthor/panthor_coredump.c | 79 ++ drivers/gpu/drm/panthor/panthor_coredump.h | 32

[PATCH 3/9] drm/panthor: capture GLB state for devcoredump

2025-07-19 Thread Chia-I Wu
Capture interesting panthor_fw_global_iface fields for devcoredump. Signed-off-by: Chia-I Wu --- drivers/gpu/drm/panthor/panthor_coredump.c | 33 ++ drivers/gpu/drm/panthor/panthor_coredump.h | 13 + 2 files changed, 46 insertions(+) diff --git a/drivers/gpu/drm

[PATCH 2/9] drm/panthor: capture GPU state for devcoredump

2025-07-19 Thread Chia-I Wu
Capture interesting GPU_CONTROL regs for devcoredump. Signed-off-by: Chia-I Wu --- drivers/gpu/drm/panthor/panthor_coredump.c | 85 ++ drivers/gpu/drm/panthor/panthor_coredump.h | 16 drivers/gpu/drm/panthor/panthor_regs.h | 6 ++ drivers/gpu/drm/panthor

[PATCH 1/9] drm/panthor: add devcoredump support

2025-07-19 Thread Chia-I Wu
Create a devcoredump on any faulty or fatal event. The coredump data is in YAML format for readability and flexibility. Only panthor_group state is captured for now. Signed-off-by: Chia-I Wu --- drivers/gpu/drm/panthor/Makefile | 2 + drivers/gpu/drm/panthor/panthor_coredump.c

[PATCH 0/9] drm/panthor: add devcoredump support

2025-07-19 Thread Chia-I Wu
/20240821143826.3720-1-daniel.alme...@collabora.com/ Chia-I Wu (9): drm/panthor: add devcoredump support drm/panthor: capture GPU state for devcoredump drm/panthor: capture GLB state for devcoredump drm/panthor: capture CSG state for devcoredump drm/panthor: capture CS state for devcoredump

[PATCH v3 3/3] panthor: dump task pid and comm on gpu errors

2025-07-17 Thread Chia-I Wu
It is useful to know which tasks cause gpu errors. Signed-off-by: Chia-I Wu Reviewed-by: Steven Price --- drivers/gpu/drm/panthor/panthor_sched.c | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu

[PATCH v3 1/3] panthor: set owner field for driver fops

2025-07-17 Thread Chia-I Wu
It allows us to get rid of manual try_module_get / module_put. Signed-off-by: Chia-I Wu Reviewed-by: Boris Brezillon Reviewed-by: Steven Price --- drivers/gpu/drm/panthor/panthor_drv.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/panthor

[PATCH v3 0/3] panthor: print task pid and comm on gpu errors

2025-07-17 Thread Chia-I Wu
interested in the task that created the group. Chia-I Wu (3): panthor: set owner field for driver fops panthor: save task pid and comm in panthor_group panthor: dump task pid and comm on gpu errors drivers/gpu/drm/panthor/panthor_drv.c | 14 ++-- drivers/gpu/drm/panthor/panthor_sched.c | 43

Re: [PATCH] drm/bridge: it6505: select REGMAP_I2C

2025-07-12 Thread Chia-I Wu
Can anyone help review this? It is a trivial build fix. On Tue, Jun 10, 2025 at 4:58 PM Chia-I Wu wrote: > > Fix > > aarch64-linux-gnu-ld: drivers/gpu/drm/bridge/ite-it6505.o: in function > `it6505_i2c_probe': > ite-it6505.c:(.text+0x754): undefined reference to

Re: [PATCH 2/4] panthor: save panthor_file in panthor_group

2025-07-12 Thread Chia-I Wu
Hi, On Mon, Jun 23, 2025 at 2:07 AM Liviu Dudau wrote: > > On Mon, Jun 23, 2025 at 08:21:22AM +0200, Boris Brezillon wrote: > > On Fri, 20 Jun 2025 16:50:51 -0700 > > Chia-I Wu wrote: > > > > > We would like to access panthor_file from panthor_group on gpu err

[PATCH v2 3/3] panthor: dump task pid and comm on gpu errors

2025-07-12 Thread Chia-I Wu
It is useful to know which tasks cause gpu errors. Signed-off-by: Chia-I Wu --- drivers/gpu/drm/panthor/panthor_sched.c | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor

[PATCH v2 1/3] panthor: set owner field for driver fops

2025-07-12 Thread Chia-I Wu
It allows us to get rid of manual try_module_get / module_put. Signed-off-by: Chia-I Wu Reviewed-by: Boris Brezillon Reviewed-by: Steven Price --- drivers/gpu/drm/panthor/panthor_drv.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/panthor

[PATCH v2 0/3] panthor: print task pid and comm on gpu errors

2025-07-12 Thread Chia-I Wu
group. Chia-I Wu (3): panthor: set owner field for driver fops panthor: save task pid and comm in panthor_group panthor: dump task pid and comm on gpu errors drivers/gpu/drm/panthor/panthor_drv.c | 14 ++-- drivers/gpu/drm/panthor/panthor_sched.c | 43 ++--- 2

[PATCH v2 2/3] panthor: save task pid and comm in panthor_group

2025-07-12 Thread Chia-I Wu
We would like to report them on gpu errors. We choose to save the info on panthor_group_create rather than on panthor_open because, when the two differ, we are more interested in the task that created the group. Signed-off-by: Chia-I Wu --- v2: save to panthor_group on panthor_group_create

Re: [PATCH] drm/panthor: always set fence errors on CS_FAULT

2025-07-08 Thread Chia-I Wu
On Sun, Jun 22, 2025 at 11:32 PM Boris Brezillon wrote: > > On Wed, 18 Jun 2025 07:55:49 -0700 > Chia-I Wu wrote: > > > It is unclear why fence errors were set only for CS_INHERIT_FAULT. > > Downstream driver also does not treat CS_INHERIT_FAULT specially. > > Re

[PATCH 1/4] panthor: set owner field for driver fops

2025-06-20 Thread Chia-I Wu
It allows us to get rid of manual try_module_get / module_put. Signed-off-by: Chia-I Wu --- drivers/gpu/drm/panthor/panthor_drv.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c

[PATCH 4/4] panthor: dump task pid and comm on gpu errors

2025-06-20 Thread Chia-I Wu
It is useful to know which tasks cause gpu errors. Signed-off-by: Chia-I Wu --- drivers/gpu/drm/panthor/panthor_sched.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor

[PATCH 3/4] panthor: save task pid and comm in panthor_file

2025-06-20 Thread Chia-I Wu
We would like to report them on gpu errors. Signed-off-by: Chia-I Wu --- drivers/gpu/drm/panthor/panthor_device.h | 6 ++ drivers/gpu/drm/panthor/panthor_drv.c| 9 + 2 files changed, 15 insertions(+) diff --git a/drivers/gpu/drm/panthor/panthor_device.h b/drivers/gpu/drm

[PATCH 2/4] panthor: save panthor_file in panthor_group

2025-06-20 Thread Chia-I Wu
We would like to access panthor_file from panthor_group on gpu errors. Because panthour_group can outlive drm_file, add refcount to panthor_file to ensure its lifetime. Signed-off-by: Chia-I Wu --- drivers/gpu/drm/panthor/panthor_device.h | 16 drivers/gpu/drm/panthor

[PATCH 0/4] panthor: print task pid and comm on gpu errors

2025-06-20 Thread Chia-I Wu
This series saves task pid and comm in panthor_file, ensures panthor_group can access panthor_file, and prints task pid and comm on gpu errors. Chia-I Wu (4): panthor: set owner field for driver fops panthor: save panthor_file in panthor_group panthor: save task pid and comm in panthor_file

[PATCH] drm/panthor: always set fence errors on CS_FAULT

2025-06-18 Thread Chia-I Wu
It is unclear why fence errors were set only for CS_INHERIT_FAULT. Downstream driver also does not treat CS_INHERIT_FAULT specially. Remove the check. Signed-off-by: Chia-I Wu --- drivers/gpu/drm/panthor/panthor_sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH] drm/bridge: it6505: select REGMAP_I2C

2025-06-10 Thread Chia-I Wu
Fix aarch64-linux-gnu-ld: drivers/gpu/drm/bridge/ite-it6505.o: in function `it6505_i2c_probe': ite-it6505.c:(.text+0x754): undefined reference to `__devm_regmap_init_i2c' Signed-off-by: Chia-I Wu --- drivers/gpu/drm/bridge/Kconfig | 1 + 1 file changed, 1 insertion(+) di

Re: [PATCH v4 7/7] drm/panthor: Add support for Mali-Gx20 and Mali-Gx25 GPUs

2025-06-10 Thread Chia-I Wu
On Mon, Jun 2, 2025 at 7:34 AM Karunika Choo wrote: > > Mali-Gx20 and Mali-Gx25 deprecates the use of FLUSH_MEM and FLUSH_PT > MMU_AS commands in favour of cache maintenance via > GPU_COMMAND's FLUSH_CACHES and FLUSH_PA_RANGE. > > They also introduce the following registers: > - GPU_COMMAND_ARG0~1

Re: [PATCH v4 6/7] drm/panthor: Support GPU_CONTROL cache flush based on feature bit

2025-06-10 Thread Chia-I Wu
On Mon, Jun 2, 2025 at 7:42 AM Karunika Choo wrote: > > As the FLUSH_MEM and FLUSH_PT commands are deprecated in GPUs from > Mali-Gx20 onwards, this patch adds support for performing cache > maintenance via the FLUSH_CACHES command in GPU_CONTROL, in place of > FLUSH_MEM and FLUSH_PT based on PANT

Re: [PATCH v4 3/7] drm/panthor: Simplify getting the GPU model name

2025-06-10 Thread Chia-I Wu
On Mon, Jun 2, 2025 at 8:16 AM Karunika Choo wrote: > > This patch replaces the panthor_model structure with a simple switch > case based on the product_id which is in the format of: > ((arch_major << 24) | product_major) > > This simplifies comparison and allows extending of the function

Re: [PATCH v4 1/7] drm/panthor: Add GPU specific initialization framework

2025-06-10 Thread Chia-I Wu
On Mon, Jun 2, 2025 at 7:33 AM Karunika Choo wrote: > > This patch provides an initialization framework for multiple Mali GPUs > by introducing a GPU support look-up table. Each entry contains, at > minimum, the architecture major version of the GPU, and may optionally > provide feature flags and

Re: Ensure progress for dma_fence_array

2024-11-12 Thread Chia-I Wu
On Tue, Nov 12, 2024 at 4:00 AM Christian König wrote: > > Am 09.11.24 um 01:32 schrieb Chia-I Wu: > > On Fri, Nov 8, 2024 at 1:43 AM Christian König > > wrote: > >> Hi guys, > >> > >> as pointed out by Chia-I userspace doesn't see any progress

Re: Ensure progress for dma_fence_array

2024-11-08 Thread Chia-I Wu
On Fri, Nov 8, 2024 at 1:43 AM Christian König wrote: > > Hi guys, > > as pointed out by Chia-I userspace doesn't see any progress when > signaling is not enabled and Boris noted that this is because > dma_fence_array_signaled() never returns true in this case. > > Improve this by fixing the dma_f

Re: [PATCH v2] drm/syncobj: ensure progress for syncobj queries

2024-11-05 Thread Chia-I Wu
On Mon, Nov 4, 2024 at 11:32 PM Christian König wrote: > > Am 04.11.24 um 22:32 schrieb Chia-I Wu: > > On Tue, Oct 22, 2024 at 10:24 AM Chia-I Wu wrote: > > On Tue, Oct 22, 2024 at 9:53 AM Christian König > wrote: > > Am 22.10.24 um 18:18 schrieb Chia-I Wu: > &g

Re: [PATCH v2] drm/syncobj: ensure progress for syncobj queries

2024-11-04 Thread Chia-I Wu
On Tue, Oct 22, 2024 at 10:24 AM Chia-I Wu wrote: > > On Tue, Oct 22, 2024 at 9:53 AM Christian König > wrote: > > > > Am 22.10.24 um 18:18 schrieb Chia-I Wu: > > > Userspace might poll a syncobj with the query ioctl. Call > > > dma_fence_enable_sw_si

Re: [PATCH v2] drm/syncobj: ensure progress for syncobj queries

2024-10-22 Thread Chia-I Wu
On Tue, Oct 22, 2024 at 9:53 AM Christian König wrote: > > Am 22.10.24 um 18:18 schrieb Chia-I Wu: > > Userspace might poll a syncobj with the query ioctl. Call > > dma_fence_enable_sw_signaling to ensure dma_fence_is_signaled returns > > true in finite time. > > Wa

Re: [PATCH] drm/syncobj: ensure progress for syncobj queries

2024-10-22 Thread Chia-I Wu
On Tue, Oct 22, 2024 at 3:30 AM Boris Brezillon wrote: > > On Thu, 17 Oct 2024 09:20:53 -0700 > Chia-I Wu wrote: > > > Userspace might poll a syncobj with the query ioctl. Call > > dma_fence_enable_sw_signaling to ensure dma_fence_is_signaled returns

[PATCH v2] drm/syncobj: ensure progress for syncobj queries

2024-10-22 Thread Chia-I Wu
Userspace might poll a syncobj with the query ioctl. Call dma_fence_enable_sw_signaling to ensure dma_fence_is_signaled returns true in finite time. Fixes: 27b575a9aa2f ("drm/syncobj: add timeline payload query ioctl v6") Signed-off-by: Chia-I Wu --- v2: add Signed-off-by and

[PATCH] drm/syncobj: ensure progress for syncobj queries

2024-10-17 Thread Chia-I Wu
Userspace might poll a syncobj with the query ioctl. Call dma_fence_enable_sw_signaling to ensure dma_fence_is_signaled returns true in finite time. --- panvk hits this issue when timeline semaphore is enabled. It uses the transfer ioctl to propagate fences. dma_fence_unwrap_merge converts the

Re: [PATCH] kernel/resource: optimize find_next_iomem_res

2024-06-04 Thread Chia-I Wu
On Tue, Jun 4, 2024 at 8:41 AM Greg Kroah-Hartman wrote: > > On Thu, May 30, 2024 at 10:36:57PM -0700, Chia-I Wu wrote: > > We can skip children resources when the parent resource does not cover > > the range. > > > > This should help vmf_insert_* users on x86, such

Re: [PATCH] kernel/resource: optimize find_next_iomem_res

2024-06-03 Thread Chia-I Wu
On Mon, Jun 3, 2024 at 12:24 AM Ilpo Järvinen wrote: > > On Sun, 2 Jun 2024, Andy Shevchenko wrote: > > > On Fri, May 31, 2024 at 02:31:45PM -0700, Chia-I Wu wrote: > > > On Fri, May 31, 2024 at 1:57 AM Andy Shevchenko < > > > andriy.shevche...@linux.intel.com&

Re: [PATCH] kernel/resource: optimize find_next_iomem_res

2024-05-31 Thread Chia-I Wu
On Fri, May 31, 2024 at 1:57 AM Andy Shevchenko < andriy.shevche...@linux.intel.com> wrote: > On Thu, May 30, 2024 at 10:36:57PM -0700, Chia-I Wu wrote: > > We can skip children resources when the parent resource does not cover > > the range. > > > > This shou

[PATCH] kernel/resource: optimize find_next_iomem_res

2024-05-30 Thread Chia-I Wu
%--__do_fault 26.57%--amdgpu_gem_fault 25.83%--ttm_bo_vm_fault_reserved 24.40%--vmf_insert_pfn_prot 14.30%--track_pfn_insert 12.20%--lookup_memtype 9.34%--pat_pagerange_is_ram 8.22%--walk_system_ram_range 5.09%--find_next_iomem_res after. Signed-off-by: Chia-I Wu --- kernel/resource.c | 8

Re: [PATCH AUTOSEL 5.10 13/22] drm/amdgpu: install stub fence into potential unused fence pointers

2023-08-31 Thread Chia-I Wu
On Thu, Aug 31, 2023 at 7:01 AM Greg KH wrote: > > On Thu, Aug 31, 2023 at 03:26:28PM +0200, Christian König wrote: > > Am 31.08.23 um 12:56 schrieb Greg KH: > > > On Thu, Aug 31, 2023 at 12:27:27PM +0200, Christian König wrote: > > > > Am 30.08.23 um 20:53 sc

Re: [PATCH AUTOSEL 5.10 13/22] drm/amdgpu: install stub fence into potential unused fence pointers

2023-08-30 Thread Chia-I Wu
On Sun, Jul 23, 2023 at 6:24 PM Sasha Levin wrote: > > From: Lang Yu > > [ Upstream commit 187916e6ed9d0c3b3abc27429f7a5f8c936bd1f0 ] > > When using cpu to update page tables, vm update fences are unused. > Install stub fence into these fence pointers instead of NULL > to avoid NULL dereference w

Re: [PATCH] drm/amdgpu: fix xclk freq on CHIP_STONEY

2023-06-02 Thread Chia-I Wu
On Fri, Jun 2, 2023 at 11:50 AM Alex Deucher wrote: > > Nevermind, missing your Signed-off-by. Please add and I'll apply. Sorry that I keep forgetting... This patch is Signed-off-by: Chia-I Wu I can send v2 if necessary. > > Alex >

[PATCH v3] amdgpu: validate offset_in_bo of drm_amdgpu_gem_va

2023-06-01 Thread Chia-I Wu
y use the VM map parameters") Signed-off-by: Chia-I Wu --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 22f9a65ca0fc7..76d

[PATCH] drm/amdgpu: fix xclk freq on CHIP_STONEY

2023-06-01 Thread Chia-I Wu
According to Alex, most APUs from that time seem to have the same issue (vbios says 48Mhz, actual is 100Mhz). I only have a CHIP_STONEY so I limit the fixup to CHIP_STONEY --- drivers/gpu/drm/amd/amdgpu/vi.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/g

[PATCH v2] amdgpu: validate drm_amdgpu_gem_va addrs

2023-05-23 Thread Chia-I Wu
offset_in_bo+map_size overflows. Userspace (radeonsi and radv) seems fine as well. v2: keep the validations in amdgpu_vm_bo_map Fixes: 9f7eb5367d00 ("drm/amdgpu: actually use the VM map parameters") Signed-off-by: Chia-I Wu --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 15 +++ d

Re: [PATCH 1/2] amdgpu: validate drm_amdgpu_gem_va addrs for all ops

2023-05-23 Thread Chia-I Wu
On Mon, May 22, 2023 at 12:12 PM Christian König wrote: > > Am 21.05.23 um 20:49 schrieb Chia-I Wu: > > On Thu, May 18, 2023 at 1:12 PM Alex Deucher wrote: > >> On Wed, May 17, 2023 at 5:27 PM Chia-I Wu wrote: > >>> On Tue, May 9, 2023 at 11:33 AM Chia-I Wu wro

Re: [PATCH 1/2] amdgpu: validate drm_amdgpu_gem_va addrs for all ops

2023-05-21 Thread Chia-I Wu
On Thu, May 18, 2023 at 1:12 PM Alex Deucher wrote: > > On Wed, May 17, 2023 at 5:27 PM Chia-I Wu wrote: > > > > On Tue, May 9, 2023 at 11:33 AM Chia-I Wu wrote: > > > > > > Extend the address and size validations to AMDGPU_VA_OP_UNMAP and > > > AM

Re: [PATCH 1/2] amdgpu: validate drm_amdgpu_gem_va addrs for all ops

2023-05-17 Thread Chia-I Wu
On Tue, May 9, 2023 at 11:33 AM Chia-I Wu wrote: > > Extend the address and size validations to AMDGPU_VA_OP_UNMAP and > AMDGPU_VA_OP_CLEAR by moving the validations to amdgpu_gem_va_ioctl. > > Internal users of amdgpu_vm_bo_map are no longer validated but they > should be f

[PATCH 2/2] amdgpu: validate drm_amdgpu_gem_va against overflows

2023-05-09 Thread Chia-I Wu
The existing validations are incorrect and insufficient. This is motivated by OOB access in amdgpu_vm_update_range when offset_in_bo+map_size overflows. Fixes: 9f7eb5367d00 ("drm/amdgpu: actually use the VM map parameters") --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 7 +-- drivers/gpu/drm

[PATCH 1/2] amdgpu: validate drm_amdgpu_gem_va addrs for all ops

2023-05-09 Thread Chia-I Wu
Extend the address and size validations to AMDGPU_VA_OP_UNMAP and AMDGPU_VA_OP_CLEAR by moving the validations to amdgpu_gem_va_ioctl. Internal users of amdgpu_vm_bo_map are no longer validated but they should be fine. Userspace (radeonsi and radv) seems fine as well. --- drivers/gpu/drm/amd/amd

Re: [PATCH v2] drm/amdgpu: add a missing lock for AMDGPU_SCHED

2023-04-26 Thread Chia-I Wu
On Wed, Apr 26, 2023 at 4:05 AM Christian König wrote: > > Am 26.04.23 um 08:17 schrieb Chia-I Wu: > > mgr->ctx_handles should be protected by mgr->lock. > > > > v2: improve commit message > > > > Signed-off-by: Chia-I Wu > > Cc: sta...@

[PATCH v3] drm/amdgpu: add a missing lock for AMDGPU_SCHED

2023-04-26 Thread Chia-I Wu
mgr->ctx_handles should be protected by mgr->lock. v2: improve commit message v3: add a Fixes tag Signed-off-by: Chia-I Wu Reviewed-by: Christian König Fixes: 52c6a62c64fac ("drm/amdgpu: add interface for editing a foreign process's priority v3") --- drivers/gpu/drm/amd/

Re: [PATCH] drm/amdgpu: add a missing lock for AMDGPU_SCHED

2023-04-25 Thread Chia-I Wu
On Tue, Apr 25, 2023 at 9:58 PM Greg KH wrote: > > On Tue, Apr 25, 2023 at 05:48:27PM -0700, Chia-I Wu wrote: > > Signed-off-by: Chia-I Wu > > Cc: sta...@vger.kernel.org > > I know I can not take patches without any changelog text at all, maybe > the DRM developers a

[PATCH v2] drm/amdgpu: add a missing lock for AMDGPU_SCHED

2023-04-25 Thread Chia-I Wu
mgr->ctx_handles should be protected by mgr->lock. v2: improve commit message Signed-off-by: Chia-I Wu Cc: sta...@vger.kernel.org --- drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sche

Re: [PATCH] drm/amdgpu: add a missing lock for AMDGPU_SCHED

2023-04-25 Thread Chia-I Wu
--- > > From: amd-gfx On Behalf Of Chia- > > I Wu > > Sent: Wednesday, April 26, 2023 8:48 AM > > To: dri-devel@lists.freedesktop.org > > Cc: Pan, Xinhui ; linux-ker...@vger.kernel.org; > > sta...@vger.kernel.org; amd-...@lists.freedesktop.org; Daniel

[PATCH] drm/amdgpu: add a missing lock for AMDGPU_SCHED

2023-04-25 Thread Chia-I Wu
Signed-off-by: Chia-I Wu Cc: sta...@vger.kernel.org --- drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c index e9b45089a28a6..863b2a34b2d64

[PATCH] drm/amdkfd: fix potential kgd_mem UAFs

2023-03-08 Thread Chia-I Wu
kgd_mem should be accessed with p->mutex locked, or it could have been freed by kfd_ioctl_free_memory_of_gpu. Signed-off-by: Chia-I Wu --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amd

[PATCH] drm/amdkfd: fix a potential double free in pqm_create_queue

2023-03-07 Thread Chia-I Wu
Set *q to NULL on errors, otherwise pqm_create_queue would free it again. Signed-off-by: Chia-I Wu --- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers

Re: [PATCH v2 0/3] drm/msm/gpu: Devfreq fixes+tuning

2023-01-13 Thread Chia-I Wu
Series is Reviewed-by: Chia-I Wu On Tue, Jan 10, 2023 at 3:14 PM Rob Clark wrote: > > From: Rob Clark > > Rob Clark (3): > drm/msm/gpu: Add devfreq tuning debugfs > drm/msm/gpu: Bypass PM QoS constraint for idle clamp > drm/msm/gpu: Add default devfreq thresholds

Re: [PATCH] drm/panfrost: Fix GEM handle creation UAF

2022-12-16 Thread Chia-I Wu
On Fri, Dec 16, 2022 at 4:20 PM Rob Clark wrote: > > On Fri, Dec 16, 2022 at 3:59 PM Chia-I Wu wrote: > > > > On Fri, Dec 16, 2022 at 3:34 PM Rob Clark wrote: > > > > > > From: Rob Clark > > > > > > Relying on an unreturned handle to hol

Re: [PATCH] drm/panfrost: Fix GEM handle creation UAF

2022-12-16 Thread Chia-I Wu
On Fri, Dec 16, 2022 at 3:34 PM Rob Clark wrote: > > From: Rob Clark > > Relying on an unreturned handle to hold a reference to an object we > dereference is not safe. Userspace can guess the handle and race us > by closing the handle from another thread. The _create_with_handle() > that return

Re: [PATCH] drm/virtio: Fix GEM handle creation UAF

2022-12-16 Thread Chia-I Wu
r that reason, dropping > the handle's reference must be done *after* we are done dereferencing > the object. > > Signed-off-by: Rob Clark Reviewed-by: Chia-I Wu

Re: [PATCH] drm/msm: Enable clamp_to_idle for 7c3

2022-11-15 Thread Chia-I Wu
adreno/a6xx_gpu.c | 14 +++--- > > 1 file changed, 7 insertions(+), 7 deletions(-) > > Reviewed-by: Douglas Anderson Reviewed-by: Chia-I Wu

Re: [PATCH v3 2/2] drm/msm: Hangcheck progress detection

2022-11-09 Thread Chia-I Wu
u; > int id; > @@ -64,6 +69,25 @@ struct msm_ringbuffer { > uint64_t memptrs_iova; > struct msm_fence_context *fctx; > > + /** > +* hangcheck_progress_retries: > +* > +* The number of extra hangcheck duration cycles that we have given > +

Re: [Freedreno] [PATCH 0/3] drm/msm/a6xx: devcore dump fixes

2022-10-13 Thread Chia-I Wu
On Thu, Oct 13, 2022 at 3:55 PM Rob Clark wrote: > > From: Rob Clark > > First patch fixes a recently introduced memory corruption, the remaining > two are cleanups. Series is Reviewed-by: Chia-I Wu > Rob Clark (3): > drm/msm/a6xx: Fix kvzalloc vs state_kcalloc usage &

Re: [Freedreno] [PATCH] drm/msm/gem: Unpin objects slightly later

2022-09-29 Thread Chia-I Wu
e shrinker to evict an > obj queued up in gpu scheduler.) > > Fixes: f371bcc0c2ac ("drm/msm/gem: Unpin buffers earlier") > Fixes: 025d27239a2f ("drm/msm/gem: Evict active GEM objects when necessary") > Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/19 >

Re: [PATCH v2] virtio-gpu: fix shift wrapping bug in virtio_gpu_fence_event_create()

2022-09-19 Thread Chia-I Wu
#x27;(1 << ring_idx)' be a 64 bit type? > > Fixes: cd7f5ca33585 ("drm/virtio: implement context init: add > virtio_gpu_fence_event") > Signed-off-by: Dan Carpenter > --- > v2: Style change. Use BIT_ULL(). Reviewed-by: Chia-I Wu > > drivers/gpu/drm/virt

Re: [PATCH] virtio-gpu: fix shift wrapping bug in virtio_gpu_fence_event_create()

2022-09-15 Thread Chia-I Wu
On Thu, Sep 15, 2022 at 4:14 AM Dan Carpenter wrote: > > The ->ring_idx_mask variable is a u64 so static checkers, Smatch in > this case, complain if the BIT() is not also a u64. > > drivers/gpu/drm/virtio/virtgpu_ioctl.c:50 virtio_gpu_fence_event_create() > warn: should '(1 << ring_idx)' be a 64

[PATCH] drm/virtio: set fb_modifiers_not_supported

2022-08-31 Thread Chia-I Wu
pported flag in mode_config") Suggested-by: Shao-Chuan Lee Signed-off-by: Chia-I Wu --- drivers/gpu/drm/virtio/virtgpu_display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c index 5c7f198c0712..9ea7611a9e0f

Re: [PATCH v2] drm/virtio: Fix NULL vs IS_ERR checking in virtio_gpu_object_shmem_init

2022-06-11 Thread Chia-I Wu
("drm/virtio: move virtio_gpu_mem_entry initialization to > new function") > Signed-off-by: Miaoqian Lin > --- > changes in v2: > - Update Fixes tag. > - rebase the working tree. > v1 Link: > https://lore.kernel.org/all/20211222072649.18169-1-linmq...@gmail.com/ Reviewed-by: Chia-I Wu

Re: [PATCH v2] drm/msm/adreno: Allow larger address space size

2022-06-11 Thread Chia-I Wu
s. > > Also, add a modparam override for debugging and igt. > > v2: Send the right version of the patch (ie. the one that actually > compiles) > > Signed-off-by: Rob Clark Reviewed-by: Chia-I Wu

Re: [PATCH v2] drm/msm: add trace_dma_fence_emit to msm_gpu_submit

2022-04-27 Thread Chia-I Wu
On Wed, Apr 27, 2022 at 9:07 AM Rob Clark wrote: > > On Tue, Apr 26, 2022 at 11:20 PM Christian König > wrote: > > > > Am 26.04.22 um 20:50 schrieb Chia-I Wu: > > > On Tue, Apr 26, 2022 at 11:02 AM Christian König > > > wrote: > > >> Am

  1   2   3   >