Re: [PATCH v6 2/5] drm/panfrost: Drop duplicated Mediatek supplies arrays

2025-05-09 Thread Steven Price
latform data). > > So drop these duplicated definitions and use default_supplies instead. > Also, rename mediatek_mt8183_supplies to a more generic name too > (legacy_supplies). > > Signed-off-by: Louis-Alexis Eyraud Thanks for doing this. Reviewed-by: Steven Price >

Re: [PATCH v6 3/5] drm/panfrost: Commonize Mediatek power domain array definitions

2025-05-09 Thread Steven Price
ries, if the num_pm_domains field of the platform data is also > set to the matching core number. > > So, create a generic power domain array (mediatek_pm_domains) and use > it in the mt8183(b), mt8186, mt8188 and mt8192 platform data instead. > > Signed-off-by: Louis-Alexis Eyraud

Re: [PATCH 8/8] drm/panfrost: Use DRM_GPU_SCHED_STAT_RUNNING to skip the reset

2025-05-08 Thread Steven Price
avoid such leaks, use the DRM_GPU_SCHED_STAT_RUNNING status to skip the > reset and rearm the timer. > > Signed-off-by: Maíra Canal Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_job.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > dif

Re: [PATCH v2 3/3] drm/panfrost: show device-wide list of DRM GEM objects over DebugFS

2025-05-08 Thread Steven Price
On 07/05/2025 17:07, Adrián Larumbe wrote: > This change is essentially a Panfrost port of commit a3707f53eb3f > ("drm/panthor: show device-wide list of DRM GEM objects over DebugFS"). > > The DebugFS file is almost the same as in Panthor, minus the GEM object > usage flags, since Panfrost has no

Re: [PATCH v5 2/3] drm/panfrost: Add support for Mali on the MT8370 SoC

2025-05-07 Thread Steven Price
ut modifying MT8186 > configuration and behaviour. > > Signed-off-by: Louis-Alexis Eyraud With one minor comment fixed below: Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_drv.c | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git

Re: [PATCH 2/3] drm/panfrost: Add driver IOCTL for setting BO labels

2025-05-07 Thread Steven Price
On 24/04/2025 03:21, Adrián Larumbe wrote: > Allow UM to label a BO for which it possesses a DRM handle. > > Signed-off-by: Adrián Larumbe Minor comments below, but otherwise: Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_drv.c | 44 +

Re: [PATCH 1/3] drm/panfrost: Add BO labelling to Panfrost

2025-05-07 Thread Steven Price
that will allow > UM to set BO labels through a new ioctl(). > > Signed-off-by: Adrián Larumbe Reviewed-by: Steven Price But one comment below > --- > drivers/gpu/drm/panfrost/panfrost_gem.c | 19 +++ > drivers/gpu/drm/panfrost/panfrost_gem.h | 16

Re: [PATCH v2 0/3] drm/panfrost: enable G31 on H616

2025-04-28 Thread Steven Price
On 28/04/2025 07:10, Philippe Simons wrote: > Hi, is there any issue with this serie Hi, Sorry, no nothing wrong - it's just slipped through. Thanks for the reminder. I've applied it to drm-misc-next. Thanks, Steve > Thanks, > > Philippe > > On 4/3/25 07:52, Philippe Simons wrote: >> Allwinne

Re: [PATCH] drm/panthor: Fix build warning when DEBUG_FS is disabled

2025-04-28 Thread Steven Price
ags() into panthor_gem.c and > declare it static. > > Fixes: a3707f53eb3f ("drm/panthor: show device-wide list of DRM GEM objects > over DebugFS") > Reported-by: Arnd Bergmann > Closes: > https://lore.kernel.org/dri-devel/20250424142419.47b9d...@collabora.com/T/#t >

Re: drm/panfrost: question about cache coherency handling

2025-04-25 Thread Steven Price
On 24/04/2025 07:08, Gregory Greenman wrote: > Hello, > > I'm new to DRM developmentand ran into something in the Panfrost (but > also Panthor) driver I'm curious about. > > In drivers/gpu/drm/panfrost/panfrost_gem.c, there's this line: obj- >>base.map_wc = !pfdev->coherent; > > From what I can

Re: [PATCH 09/15] drm/panthor: Test for imported buffers with drm_gem_is_imported()

2025-04-25 Thread Steven Price
On 25/04/2025 15:30, Boris Brezillon wrote: > On Fri, 25 Apr 2025 14:34:53 +0100 > Steven Price wrote: > >> On 17/03/2025 13:06, Thomas Zimmermann wrote: >>> Instead of testing import_attach for imported GEM buffers, invoke >>> drm_gem_is_imported() to do the t

Re: [PATCH 09/15] drm/panthor: Test for imported buffers with drm_gem_is_imported()

2025-04-25 Thread Steven Price
ach optional. > > Signed-off-by: Thomas Zimmermann > Cc: Boris Brezillon > Cc: Steven Price > Cc: Liviu Dudau > --- > drivers/gpu/drm/panthor/panthor_gem.c | 2 +- > drivers/gpu/drm/panthor/panthor_mmu.c | 10 +- > 2 files changed, 6 insertions(+), 6 deletions(-) &g

Re: [PATCH] drm/doc: Start documenting aspects specific to tile-based renderers

2025-04-23 Thread Steven Price
On 18/04/2025 13:25, Boris Brezillon wrote: > Tile-based GPUs come with a set of constraints that are not present > when immediate rendering is used. This new document tries to explain > the differences between tile/immediate rendering, the problems that > come with tilers, and how we plan to addre

Re: [PATCH v8 4/4] drm/panthor: show device-wide list of DRM GEM objects over DebugFS

2025-04-17 Thread Steven Price
ed onto the FW's address space. > > Signed-off-by: Adrián Larumbe > Reviewed-by: Liviu Dudau > Reviewed-by: Boris Brezillon Reviewed-by: Steven Price Although I feel I have to point out the table output is much wider than it needs to be. I'd personally like it if some

Re: [PATCH v2 2/2] drm/panthor: Fix the user MMIO offset logic for emulators

2025-04-17 Thread Steven Price
_PANTHOR_SET_USER_MMIO_OFFSET is never called. > > Changes: > - Drop the lock/immutable fields and allow SET_USER_MMIO_OFFSET > requests to race with mmap() requests > - Don't do the is_user_mmio_offset test twice in panthor_mmap() > - Improve the uAPI docs > > Signed

Re: [PATCH v8 4/4] drm/panthor: show device-wide list of DRM GEM objects over DebugFS

2025-04-17 Thread Steven Price
On 17/04/2025 15:46, Adrián Larumbe wrote: > Hi Steve, > > On 17.04.2025 15:25, Steven Price wrote: >> On 15/04/2025 20:15, Adrián Larumbe wrote: >>> Add a device DebugFS file that displays a complete list of all the DRM >>> GEM objects that are exposed to UM th

Re: [PATCH v8 1/4] drm/panthor: Introduce BO labeling

2025-04-17 Thread Steven Price
allocating it is the responsibility > of callers. > > Signed-off-by: Adrián Larumbe > Reviewed-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_gem.c | 46 +++ > drivers/gpu/drm/panthor/panthor_gem.h | 17 +++

Re: [PATCH v2 1/2] drm/panthor: Add missing explicit padding in drm_panthor_gpu_info

2025-04-17 Thread Steven Price
and adjust the comment accordingly > - Add Liviu's R-b > > Fixes: 0f25e493a246 ("drm/panthor: Add uAPI") > Signed-off-by: Boris Brezillon > Acked-by: Liviu Dudau Reviewed-by: Steven Price > --- > include/uapi/drm/panthor_drm.h | 3 +++ > 1 file changed, 3

Re: [PATCH 2/2] drm/panthor: Fix the user MMIO offset logic for emulators

2025-04-17 Thread Steven Price
On 17/04/2025 13:10, Boris Brezillon wrote: > On Thu, 17 Apr 2025 11:41:18 +0100 > Steven Price wrote: > >> On 17/04/2025 11:05, Boris Brezillon wrote: >>> Currently, we pick the MMIO offset based on the size of the pgoff_t >>> type seen by the process that manip

Re: [PATCH 2/2] drm/panthor: Fix the user MMIO offset logic for emulators

2025-04-17 Thread Steven Price
On 17/04/2025 11:05, Boris Brezillon wrote: > Currently, we pick the MMIO offset based on the size of the pgoff_t > type seen by the process that manipulates the FD, such that a 32-bit > process can always map the user MMIO ranges. But this approach doesn't > work well for emulators like FEX, where

Re: [PATCH 1/2] drm/panthor: Fix missing explicit padding in drm_panthor_gpu_info

2025-04-17 Thread Steven Price
On 17/04/2025 11:05, Boris Brezillon wrote: > drm_panthor_gpu_info::shader_present is currently automatically offset > by 4 byte to meet Arm's 32-bit/64-bit field alignment rules, but those > constraints don't stand on 32-bit x86 and cause a mismatch when running > an x86 binary in a user emulated

Re: [PATCH v2] drm/panthor: Don't create a file offset for NO_MMAP BOs

2025-04-17 Thread Steven Price
m_mmap() > - Get rid of the Fixes tag and adjust the commit message accordingly > - Return ENOPERM instead of EINVAL > > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_drv.c | 5 + > drivers/gpu/drm/panthor/panthor_ge

Re: [PATCH v3 0/8] drm: Introduce sparse GEM shmem

2025-04-16 Thread Steven Price
On 15/04/2025 10:47, Boris Brezillon wrote: > On Mon, 14 Apr 2025 16:34:35 +0100 > Steven Price wrote: > >> On 14/04/2025 13:47, Boris Brezillon wrote: >>> On Fri, 11 Apr 2025 16:39:02 +0200 >>> Boris Brezillon wrote: >>> >>>> On Fri,

Re: [PATCH] drm/panthor: Enforce DRM_PANTHOR_BO_NO_MMAP

2025-04-16 Thread Steven Price
nger need panthor_gem_mmap() - although I haven't completely convinced myself of that yet. > Fixes: 4bdca1150792 ("drm/panthor: Add the driver frontend block") > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_drv.c | 5

Re: [PATCH] drm/panthor: Fix the panthor_gpu_coherency_init() error path

2025-04-16 Thread Steven Price
("drm/panthor: Call panthor_gpu_coherency_init() after PM > resume()") > Reported-by: Dan Carpenter > Closes: > https://lore.kernel.org/dri-devel/4da470aa-4f84-460e-aff8-dabc8cc4da15@stanley.mountain/T/#t > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > d

Re: [PATCH v7 2/4] drm/panthor: Add driver IOCTL for setting BO labels

2025-04-16 Thread Steven Price
On 14/04/2025 21:41, Adrián Larumbe wrote: > On 14.04.2025 11:01, Steven Price wrote: >> On 11/04/2025 16:03, Adrián Larumbe wrote: >>> Allow UM to label a BO for which it possesses a DRM handle. >>> >>> Signed-off-by: Adrián Larumbe >>> Reviewed-by:

Re: [PATCH v7 1/4] drm/panthor: Introduce BO labeling

2025-04-16 Thread Steven Price
On 14/04/2025 20:43, Adrián Larumbe wrote: > Hi Steven, > > On 14.04.2025 10:50, Steven Price wrote: >> Hi Adrián, >> >> On 11/04/2025 16:03, Adrián Larumbe wrote: >>> Add a new character string Panthor BO field, and a function that allows >>> sett

Re: [PATCH v3 0/8] drm: Introduce sparse GEM shmem

2025-04-14 Thread Steven Price
On 14/04/2025 13:47, Boris Brezillon wrote: > On Fri, 11 Apr 2025 16:39:02 +0200 > Boris Brezillon wrote: > >> On Fri, 11 Apr 2025 15:13:26 +0200 >> Christian König wrote: >> > Background is that you don't get a crash, nor error message, nor > anything indicating what is happeni

Re: [PATCH v3 1/2] drm/panthor: Add 64-bit and poll register accessors

2025-04-14 Thread Steven Price
Hi Karunika, Minor process thing: There's generally no need to resend a series just to add R-b tags - they'll get picked up when the series is merged. On 11/04/2025 17:48, Karunika Choo wrote: > This patch adds 64-bit register accessors to simplify register access in > Panthor. It also adds 32-bi

Re: [PATCH v3 2/2] drm/panthor: Clean up 64-bit register definitions

2025-04-14 Thread Steven Price
> Reviewed-by: Boris Brezillon > Suggested-by: Boris Brezillon > Signed-off-by: Karunika Choo Reviewed-by: Steven Price I would sort of prefer that the calls like gpu_read64() just appended the _LO as a form of type checking (with some macro magic). But I can't think of how to

Re: [PATCH v7 3/4] drm/panthor: Label all kernel BO's

2025-04-14 Thread Steven Price
d in the > future, this would have to change. I'm not sure I follow why bounds-checking would be an issue for strings from the kernel. But as you state these are all literals so definitely not a problem. > > Signed-off-by: Adrián Larumbe > Reviewed-by: Boris Brezillon >

Re: [PATCH v7 2/4] drm/panthor: Add driver IOCTL for setting BO labels

2025-04-14 Thread Steven Price
On 11/04/2025 16:03, Adrián Larumbe wrote: > Allow UM to label a BO for which it possesses a DRM handle. > > Signed-off-by: Adrián Larumbe > Reviewed-by: Liviu Dudau > Reviewed-by: Boris Brezillon Reviewed-by: Steven Price Although very minor NITs below which y

Re: [PATCH v7 1/4] drm/panthor: Introduce BO labeling

2025-04-14 Thread Steven Price
Hi Adrián, On 11/04/2025 16:03, Adrián Larumbe wrote: > Add a new character string Panthor BO field, and a function that allows > setting it from within the driver. > > Driver takes care of freeing the string when it's replaced or no longer > needed at object destruction time, but allocating it i

Re: [PATCH v3] drm/panthor: Make the timeout per-queue instead of per-job

2025-04-11 Thread Steven Price
Hi Ashley, On 10/04/2025 13:57, Ashley Smith wrote: > The timeout logic provided by drm_sched leads to races when we try > to suspend it while the drm_sched workqueue queues more jobs. Let's > overhaul the timeout handling in panthor to have our own delayed work > that's resumed/suspended when a g

Re: [PATCH v2 5/9] drm/panthor: Implement support for multiple power domains

2025-04-05 Thread Steven Price
ozlowski > Cc: Liviu Dudau > Cc: Maarten Lankhorst > Cc: Maxime Ripard > Cc: Pengutronix Kernel Team > Cc: Philipp Zabel > Cc: Rob Herring > Cc: Sascha Hauer > Cc: Sebastian Reichel > Cc: Shawn Guo > Cc: Simona Vetter > Cc: Steven Price > Cc: Thomas Zimm

Re: [PATCH v2 1/5] drm/panthor: Fix GPU_COHERENCY_ACE[_LITE] definitions

2025-04-05 Thread Steven Price
) > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_regs.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/panthor/panthor_regs.h > b/drivers/gpu/drm/panthor/panthor_regs.h > index

Re: [PATCH v5 0/6] drm/panfrost: Add support for AARCH64_4K page table format

2025-04-05 Thread Steven Price
On 24/03/2025 18:57, Ariel D'Alessandro wrote: > Hi all, > > This is a new iteration on Panfrost support for AARCH64_4K page table > format. The main reason behind this patchset is that MediaTek MT8188 SoC > (ARM Mali-G57 MC3 GPU) constantly faults due to the actual Panfrost cache > configuration.

Re: [PATCH v2 2/5] drm/panthor: Call panthor_gpu_coherency_init() after PM resume()

2025-04-04 Thread Steven Price
ne. Move the > panthor_gpu_coherency_init() call after the device has been resumed > to prevent that. > > Changes in v2: > - Add Liviu's R-b > > Fixes: dd7db8d911a1 ("drm/panthor: Explicitly set the coherency mode") > Signed-off-by: Boris Brezillon >

Re: [PATCH v3 4/5] drm/panthor: Let IRQ handlers clear the interrupts themselves

2025-04-04 Thread Steven Price
e > masked, so we're not risking an interrupt flood. > > Changes in v3: > - Mention the fact we no longer clear MMU COMPLETED irqs Thanks! Reviewed-by: Steven Price > - Add Liviu's R-b > > Changes in v2: > - Move the MMU_INT_CLEAR around > > Signed-

Re: [PATCH v2 5/5] drm/panthor: Don't update MMU_INT_MASK in panthor_mmu_irq_handler()

2025-04-02 Thread Steven Price
> Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_mmu.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/gpu/drm/panthor/panthor_mmu.c > b/drivers/gpu/drm/panthor/panthor_mmu.c > index 4ac95a31907d..7a7

Re: [PATCH v2 4/5] drm/panthor: Let IRQ handlers clear the interrupts themselves

2025-04-02 Thread Steven Price
On 02/04/2025 11:58, Boris Brezillon wrote: > On Wed, 2 Apr 2025 11:20:17 +0100 > Steven Price wrote: > >>> static void panthor_mmu_irq_handler(struct panthor_device *ptdev, u32 >>> status) >>> { >>> bool has_unhandled_faults = false; >

Re: [PATCH v2 4/5] drm/panthor: Let IRQ handlers clear the interrupts themselves

2025-04-02 Thread Steven Price
On 01/04/2025 19:23, Boris Brezillon wrote: > MMU handler needs to be in control of the job interrupt clears because > clearing the interrupt also unblocks the writer/reader that triggered > the fault, and we don't want it to be unblocked until we've had a chance > to process the IRQ. > > Since cl

Re: [PATCH v2 3/5] drm/panthor: Update panthor_mmu::irq::mask when needed

2025-04-02 Thread Steven Price
t; > Fixes: 647810ec2476 ("drm/panthor: Add the MMU/VM logical block") > Signed-off-by: Boris Brezillon > Reviewed-by: Liviu Dudau Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_mmu.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/d

Re: [PATCH 09/15] drm/panthor: Test for imported buffers with drm_gem_is_imported()

2025-03-31 Thread Steven Price
ach optional. > > Signed-off-by: Thomas Zimmermann > Cc: Boris Brezillon > Cc: Steven Price > Cc: Liviu Dudau Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_gem.c | 2 +- > drivers/gpu/drm/panthor/panthor_mmu.c | 10 +- > 2 files changed, 6

Re: [PATCH v5 4/6] drm/panfrost: Add support for AARCH64_4K page table format

2025-03-31 Thread Steven Price
must have > the HW_FEATURE_AARCH64_MMU feature flag present. > > Signed-off-by: Ariel D'Alessandro > Reviewed-by: AngeloGioacchino Del Regno > > Reviewed-by: Boris Brezillon > Reviewed-by: Adrián Larumbe Reviewed-by: Steven Price (one very minor nit below) &

Re: [PATCH 1/2] drm/panfrost: Add PM runtime flags

2025-03-31 Thread Steven Price
On 31/03/2025 11:49, Philippe Simons wrote: > > On 3/31/25 12:32, Steven Price wrote: >> On 27/03/2025 12:36, Andre Przywara wrote: >>> On Thu, 13 Mar 2025 00:23:18 +0100 >>> Philippe Simons wrote: >>> >>> Hi Rob, Boris, Steven, >>> >&g

Re: [PATCH 2/2] drm/panfrost: add h616 compatible string

2025-03-31 Thread Steven Price
On 31/03/2025 11:57, Andre Przywara wrote: > On Mon, 31 Mar 2025 11:32:58 +0100 > Steven Price wrote: > > Hi Steven, > > thanks for having a look! > >> On 12/03/2025 23:23, Philippe Simons wrote: >>> Tie the Allwinner compatible string to the two features

Re: [PATCH 2/2] drm/panfrost: add h616 compatible string

2025-03-31 Thread Steven Price
On 12/03/2025 23:23, Philippe Simons wrote: > Tie the Allwinner compatible string to the two features bits that will > toggle the clocks and the reset line whenever the power domain is changing > state. This looks fine, but we need the new compatible string to be documented in the bindings: Docum

Re: [PATCH 1/2] drm/panfrost: Add PM runtime flags

2025-03-31 Thread Steven Price
ional, not depending on implementation > specific flags? I think you're right, this probably should be unconditional. My only reservation is that "it works" currently and we'd need to test this doesn't cause regressions on existing platforms. So unless someone with a reas

Re: [PATCH 08/15] drm/panfrost: Test for imported buffers with drm_gem_is_imported()

2025-03-31 Thread Steven Price
ach optional. > > Signed-off-by: Thomas Zimmermann > Cc: Boris Brezillon > Cc: Rob Herring > Cc: Steven Price Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_gem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gp

Re: [PATCH v1 1/6] drm/panfrost: Set IOMMU_CACHE flag

2025-03-15 Thread Steven Price
x27;t wrong for the legacy page tables. Reviewed-by: Steven Price Steve > Signed-off-by: Boris Brezillon > Signed-off-by: Ariel D'Alessandro > --- > drivers/gpu/drm/panfrost/panfrost_mmu.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/dri

Re: [PATCH v1 6/6] drm/panfrost: Set HW_FEATURE_AARCH64_MMU feature flag on Bifrost models

2025-03-15 Thread Steven Price
On 10/03/2025 19:59, Ariel D'Alessandro wrote: > Set this feature flag on all Mali Bifrost platforms as the MMU supports > AARCH64 4K page table format. > > Signed-off-by: Ariel D'Alessandro Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_

Re: [PATCH v2] drm/panthor: Make the timeout per-queue instead of per-job

2025-03-11 Thread Steven Price
s: de8548813824 ("drm/panthor: Add the scheduler logical block") > Signed-off-by: Ashley Smith Reviewed-by: Steven Price Steve > --- > drivers/gpu/drm/panthor/panthor_sched.c | 233 +--- > 1 file changed, 167 insertions(+), 66 deletions(-) > > diff

Re: [PATCH v4 1/2] drm/panthor: Replace sleep locks with spinlocks in fdinfo path

2025-03-05 Thread Steven Price
nlock. > > Signed-off-by: Adrián Larumbe > Fixes: 0590c94c3596 ("drm/panthor: Fix race condition when gathering fdinfo > group samples") > Reviewed-by: Liviu Dudau > Reviewed-by: Boris Brezillon > Reviewed-by: Steven Price Pushed to drm-misc-next. Note I f

Re: [PATCH v2] drm/panthor: Update CS_STATUS_ defines to correct values

2025-03-05 Thread Steven Price
panthor: Add the FW logical block") > Signed-off-by: Ashley Smith Reviewed-by: Steven Price I'll push this to drm-misc-next. Steve > --- > Changes in v2: > - Rename _RES to _RESOURCE > --- > drivers/gpu/drm/panthor/panthor_fw.h | 6 +++--- > 1 file changed, 3

Re: [PATCH v4 2/2] drm/panthor: Avoid sleep locking in the internal BO size path

2025-03-05 Thread Steven Price
7 ("drm/panthor: Expose size of driver internal BO's over > fdinfo") Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_heap.c | 62 +- > drivers/gpu/drm/panthor/panthor_mmu.c | 8 +--- > 2 files changed, 31 insertions(+), 39 d

Re: [PATCH] drm/panthor: Update CS_STATUS_ defines to correct values

2025-03-03 Thread Steven Price
STATUS_BLOCKED_REASON_RES 5 NIT: The actual name is RESOURCE not RES. So if we're updating to match the spec we could rename it (it isn't currently used by the driver). The actual updated values are correct, so with the above fixed: Reviewed-by: Steven Price

Re: [PATCH v3 1/2] drm/panthor: Replace sleep locks with spinlocks in fdinfo path

2025-02-28 Thread Steven Price
> > Signed-off-by: Adrián Larumbe > 0590c94c3596 ("drm/panthor: Fix race condition when gathering fdinfo group > samples") Missing "Fixes:" prefix > Reviewed-by: Liviu Dudau > Reviewed-by: Boris Brezillon Otherwise Reviewed-by: Steven Price > --- >

Re: [RFC PATCH 3/4] drm/panfrost: Support ARM_64_LPAE_S1 page table

2025-02-27 Thread Steven Price
On 26/02/2025 18:30, Ariel D'Alessandro wrote: > Bifrost MMUs support AArch64 4kB granule specification. However, > panfrost only enables MMU in legacy mode, despite the presence of the > HW_FEATURE_AARCH64_MMU feature flag. > > This commit adds support to use page tables according to AArch64 4kB

Re: [RFC PATCH 1/4] drm/panfrost: Use GPU_MMU_FEATURES_VA_BITS/PA_BITS macros

2025-02-27 Thread Steven Price
On 26/02/2025 18:30, Ariel D'Alessandro wrote: > As done in panthor, define and use these GPU_MMU_FEATURES_* macros, > which makes code easier to read and reuse. > > Signed-off-by: Ariel D'Alessandro Reviewed-by: Steven Price > --- > drivers/gpu/drm/

[PATCH] drm/panthor: Clean up FW version information display

2025-02-13 Thread Steven Price
27; array, allow the NUL byte to be present in git_sha_header, and calculate the length directly from git_sha_header. Reported-by: Will Deacon Fixes: 9d443deb0441 ("drm/panthor: Display FW version information") Signed-off-by: Steven Price --- Note that there should be no functional change

Re: [PATCH] drm/panthor: Convert IOCTL defines to an enum

2025-02-06 Thread Steven Price
ticular case I think it's fine. Reviewed-by: Steven Price > Cc: Beata Michalska > Signed-off-by: Rob Herring (Arm) > --- > include/uapi/drm/panthor_drm.h | 86 +- > 1 file changed, 44 insertions(+), 42 deletions(-) > > diff --git a/

Re: [PATCH v9 5/5] drm/panthor: Fix race condition when gathering fdinfo group samples

2025-01-24 Thread Steven Price
"drm/panthor: add DRM fdinfo support") Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_sched.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/panthor/panthor_sched.c > b/drivers/gpu/drm/panthor/panthor_sched.c > inde

Re: [PATCH] drm/panthor: avoid garbage value in panthor_ioctl_dev_query()

2025-01-20 Thread Steven Price
es: f7ef2352 ("drm/panthor: Add DEV_QUERY_GROUP_PRIORITIES_INFO dev > query") > Signed-off-by: Su Hui Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_drv.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/panthor/panthor_drv

Re: [PATCH 2/3] drm/panfrost: Add support for Mali on the MT8370 SoC

2025-01-16 Thread Steven Price
r, two power domains). > > Signed-off-by: Louis-Alexis Eyraud Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_drv.c | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c > b/drivers/gpu

Re: [PATCH] drm/panthor: Fix a race between the reset and suspend path

2025-01-13 Thread Steven Price
On 17/12/2024 09:24, Boris Brezillon wrote: > If a reset is scheduled when the suspend happens, we drop the > reset-pending info on the floor assuming the resume will fix things, > but the resume logic might try a fast reset. If we're lucky, the > fast reset fails and we fallback to a slow reset, b

Re: [PATCH] drm/panthor: fix all mmu kernel-doc comments

2025-01-13 Thread Steven Price
. > > This fixes around 80 kernel-doc warnings. > > Signed-off-by: Randy Dunlap > Cc: Boris Brezillon > Cc: Steven Price > Cc: Liviu Dudau > Cc: Maarten Lankhorst > Cc: Maxime Ripard > Cc: Thomas Zimmermann > Cc: David Airlie > Cc: Simona Vetter Thanks fo

Re: [PATCH] drm/panthor: Remove dead code

2025-01-08 Thread Steven Price
On 07/01/2025 17:33, Florent Tomasin wrote: > Remove unused function declaration in panthor_gem.h: > - `panthor_gem_prime_import_sg_table()` > > Remove duplicate macro definitions: > - `MAX_CSG_PRIO` > - `MIN_CS_PER_CSG` > - `MIN_CSGS` > > Signed-off-by: Florent To

Re: [RFC PATCH 1/4] drm/panthor: Add 64-bit register accessors

2024-12-23 Thread Steven Price
On 19/12/2024 17:05, Karunika Choo wrote: > This patch adds 64-bit register accessors to simplify register access in > Panthor. It also adds 64-bit variants for read_poll_timeout and replaces > all 64-bit and poll register accesses with these new functions. > > Signed-off-by: Karunika Choo (Mino

Re: [RFC PATCH 4/4] drm/panthor: Use GPU_COMMAND.FLUSH_CACHES for cache maintenance

2024-12-23 Thread Steven Price
On 19/12/2024 17:05, Karunika Choo wrote: > This patch adds support for performing cache maintenance operations via > the GPU_CONTROL.GPU_COMMAND register instead of using FLUSH_PT or > FLUSH_MEM commands from the AS_COMMAND register. This feature is enabled > when the HW feature bit (PANTHOR_HW_FE

Re: [RFC PATCH 3/4] drm/panthor: Add gpu specific initialization framework

2024-12-23 Thread Steven Price
On 19/12/2024 17:05, Karunika Choo wrote: > This patch adds a framework for adding GPU specific code which adds the > following gpu-specific features: > - register base addresses > - feature bits > - function pointers > > The above allows the handling of changes to register and register set > offs

Re: [RFC PATCH 2/4] drm/panthor: Add parsed gpu properties

2024-12-23 Thread Steven Price
On 19/12/2024 17:05, Karunika Choo wrote: > This patch adds parsing of GPU register fields on initialization instead of > parsing the fields each time it is needed. Why? ;) The commit message should ideally explain the reason behind a change rather than the change itself (that should ideally be o

Re: [PATCH] drm/panthor: Fix a race between the reset and suspend path

2024-12-23 Thread Steven Price
; > Fixes: 5fe909cae118 ("drm/panthor: Add the device logical block") > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_device.c | 22 -- > 1 file changed, 12 insertions(+), 10 deletions(-) > &

Re: [PATCH v5 2/2] Documentation/gpu: Add fdinfo meanings of drm-*-internal memory tags

2024-12-20 Thread Steven Price
t; with the definitions of the new drm-*-internal ones. > > Signed-off-by: Adrián Larumbe > Reviewed-by: Mihail Atanassov Reviewed-by: Steven Price > --- > Documentation/gpu/panthor.rst | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a

Re: [PATCH v5 1/2] drm/panthor: Expose size of driver internal BO's over fdinfo

2024-12-20 Thread Steven Price
or_each(&pool->xa, i, heap) >> +size += heap->chunk_size * heap->chunk_count; >> +up_write(&pool->lock); > > Oh well, just realised I forgot to change this to up_read() so will do in a > final revision. With that fixed, feel free to add: Reviewed-by: Steven Price Thanks, Steve

Re: [PATCH v5 1/2] drm/panthor: Expose size of driver internal BO's over fdinfo

2024-12-20 Thread Steven Price
On 19/12/2024 16:30, Mihail Atanassov wrote: > > > On 18/12/2024 18:18, Adrián Martínez Larumbe wrote: >> From: Adrián Larumbe >> >> This will display the sizes of kenrel BO's bound to an open file, >> which are >> otherwise not exposed to UM through a handle. >> >> The sizes recorded are as fol

Re: [PATCH v2 6/8] drm/panfrost: Make re-enabling job interrupts at device reset optional

2024-12-04 Thread Steven Price
On 04/12/2024 15:34, Adrián Larumbe wrote: > Hi Boris, > > On 02.12.2024 12:20, Boris Brezillon wrote: >> On Thu, 28 Nov 2024 21:06:21 + >> Adrián Larumbe wrote: >> >>> Rather than remasking interrupts after a device reset in the main reset >>> path, allow selecting whether to do this with an

Re: [PATCH v2 4/5] drm/panthor: Be robust against resume failures

2024-11-29 Thread Steven Price
something we can live with. I agree this is "something we can live with", and the comment at least explains the logic here - so hopefully it won't confuse me in the future. But it still seems like this is the wrong solution because we've got a known race. On the other hand it&#x

Re: [PATCH v2 2/5] drm/panthor: Be robust against runtime PM resume failures in the suspend path

2024-11-29 Thread Steven Price
nged in the next commit > - Drop the panthor_device_unplug() changes > > Signed-off-by: Boris Brezillon With the comment fix: Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_fw.c | 14 +- > drivers/gpu/drm/panthor/panthor_gpu.c | 3 ++- > drivers

Re: [PATCH] drm/panfrost: Add GPU ID for MT8188 Mali-G57 MC3

2024-11-28 Thread Steven Price
On 13/11/2024 11:26, AngeloGioacchino Del Regno wrote: > The MediaTek MT8188 SoC has a Mali-G57 MC3 GPU and, similarly to > MT8192, it has yet another special GPU ID. > > Add the GPU ID to the list and treat it as a standard Mali-G57. > > Signed-off-by: AngeloGioacchino Del Regno > Pushed to d

Re: [PATCH v6 2/7] drm/sched: store the drm client_id in drm_sched_fence

2024-11-15 Thread Steven Price
On 14/11/2024 10:01, Pierre-Eric Pelloux-Prayer wrote: > This will be used in a later commit to trace the drm client_id in > some of the gpu_scheduler trace events. > > Signed-off-by: Pierre-Eric Pelloux-Prayer > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- > drivers/gpu/drm/amd/a

Re: [PATCH] drm/panthor: Fix memory leak in panthor_ioctl_group_create()

2024-11-14 Thread Steven Price
jump forward to cleanup. > > Cc: sta...@vger.kernel.org > Fixes: 5f7762042f8a ("drm/panthor: Restrict high priorities on group_create") > Signed-off-by: Jann Horn Reviewed-by: Steven Price Thanks, Steve > --- > testcase: > ``` > #include > #include > #

Re: [PATCH 5/5] drm/panthor: Fix the fast-reset logic

2024-11-14 Thread Steven Price
n't blow up in the "normal" case, so: Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_device.c | 32 > drivers/gpu/drm/panthor/panthor_device.h | 11 ++ > drivers/gpu/drm/panthor/panthor_fw.c | 48 &

Re: [PATCH 4/5] drm/panthor: Be robust against resume failures

2024-11-14 Thread Steven Price
On 13/11/2024 15:42, Boris Brezillon wrote: > When the runtime PM resume callback returns an error, it puts the device > in a state where it can't be resumed anymore. Make sure we can recover > from such transient failures by calling pm_runtime_set_suspended() > explicitly after a pm_runtime_resume

Re: [PATCH 3/5] drm/panthor: Ignore devfreq_{suspend, resume}_device() failures

2024-11-14 Thread Steven Price
e can address at the driver level, so let's just assume failures are > harmless for now, like is done in panfrost. > > Signed-off-by: Boris Brezillon With the missing chunk from patch 2: Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_devfreq

Re: [PATCH 1/5] drm/panthor: Preserve the result returned by panthor_fw_resume()

2024-11-14 Thread Steven Price
;) > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_device.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/panthor/panthor_device.c > b/drivers/gpu/drm/panthor/panthor_device.c >

Re: [PATCH] drm/panthor: Fix a typo in the FW iface flag definitions

2024-11-14 Thread Steven Price
On 13/11/2024 16:02, Boris Brezillon wrote: > Drop the _RD_ in the flag names. > > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_fw.c | 62 ++-- > 1 file changed, 31 insertions(+), 31 deletions(-)

Re: [PATCH] drm/panfrost: Add GPU ID for MT8188 Mali-G57 MC3

2024-11-13 Thread Steven Price
l Regno > Looks reasonable to me - I wonder how many different MediaTek specials there are out there ;) Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_gpu.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/panfrost/panfrost

Re: [PATCH] drm/panthor: Fix handling of partial GPU mapping of BOs

2024-11-11 Thread Steven Price
. > The bug caused the partial GPU mapping of BO to go wrong for the said > case, as the pages didn't get map at the expected virtual address and > consequently there were kernel warnings on unmap. > > Signed-off-by: Akash Goel Fixes: 647810ec2476 ("drm/panthor: Add the

Re: [PATCH] drm/panthor: Be stricter about IO mapping flags

2024-11-07 Thread Steven Price
On 04/11/2024 23:17, Jann Horn wrote: > The current panthor_device_mmap_io() implementation has two issues: > > 1. For mapping DRM_PANTHOR_USER_FLUSH_ID_MMIO_OFFSET, >panthor_device_mmap_io() bails if VM_WRITE is set, but does not clear >VM_MAYWRITE. That means userspace can use mprotect()

Re: [PATCH v2] drm/panthor: Lock XArray when getting entries for the VM

2024-11-07 Thread Steven Price
was trying to protect fetching > the heap pointer from XArray, as that operation is protected by > the @pool->lock. > > Fixes: 647810ec2476 ("drm/panthor: Add the MMU/VM logical block") > Reported-by: Jann Horn > Cc: Boris Brezillon > Cc: Steven Price > Si

Re: [PATCH v2] drm/panthor: Lock XArray when getting entries for the VM

2024-11-07 Thread Steven Price
was trying to protect fetching > the heap pointer from XArray, as that operation is protected by > the @pool->lock. > > Fixes: 647810ec2476 ("drm/panthor: Add the MMU/VM logical block") > Reported-by: Jann Horn > Cc: Boris Brezillon > Cc: Steven Price > Signed

Re: [PATCH] drm/panthor: Be stricter about IO mapping flags

2024-11-06 Thread Steven Price
working kernel build setup for the test machine yet. Please test it > before applying it. > > Cc: sta...@vger.kernel.org > Fixes: 5fe909cae118 ("drm/panthor: Add the device logical block") > Signed-off-by: Jann Horn Reviewed-by: Steven Price Thanks, Steve

Re: [PATCH v4 1/2] drm/panfrost: Add missing OPP table refcnt decremental

2024-11-06 Thread Steven Price
eventually leads to an OPP core warning when removing the device. > > Fix it by putting OPP objects as many times as they're retrieved. > > Also remove an unnecessary whitespace. > > Signed-off-by: Adrián Larumbe > Fixes: f11b0417eec2 ("drm/panfrost: Add fdinfo s

Re: [PATCH] drm/panthor: Lock XArray when getting entries for heap and VM

2024-11-06 Thread Steven Price
n > Cc: Boris Brezillon > Cc: Steven Price > Signed-off-by: Liviu Dudau > --- > drivers/gpu/drm/panthor/panthor_heap.c | 15 +-- > drivers/gpu/drm/panthor/panthor_mmu.c | 2 ++ > 2 files changed, 15 insertions(+), 2 deletions(-) > > diff --git a/dr

Re: [PATCH v2 1/3] iommu/io-pgtable-arm: Remove split on unmap behavior

2024-11-06 Thread Steven Price
2, ARM_64_LPAE_S1, ARM_64_LPAE_S2, and > ARM_MALI_LPAE formats. > > Cc: Boris Brezillon > Cc: Steven Price > Cc: Liviu Dudau > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Jason Gunthorpe Reviewed-by: Steven Price > --- > drivers/iommu/io-pgtable-arm.c | 68

Re: [PATCH] drm/panthor: Lock XArray when getting entries for heap and VM

2024-11-06 Thread Steven Price
On 06/11/2024 13:34, Boris Brezillon wrote: > On Wed, 6 Nov 2024 13:17:29 + > Steven Price wrote: > >> On 06/11/2024 12:07, Liviu Dudau wrote: >>> Similar to cac075706f29 ("drm/panthor: Fix race when converting >>> group handle to group object&

Re: [PATCH v3 3/3] drm/panthor: Report innocent group kill

2024-10-30 Thread Steven Price
@@ static void panthor_debugfs_init(struct drm_minor > *minor) > * - 1.1 - adds DEV_QUERY_TIMESTAMP_INFO query > * - 1.2 - adds DEV_QUERY_GROUP_PRIORITIES_INFO query > * - adds PANTHOR_GROUP_PRIORITY_REALTIME priority > + * - 1.3 - adds DRM_PANTHOR_GROUP_STATE_INNOCENT flag > */

Re: [PATCH v2 2/3] drm/panthor: Report group as timedout when we fail to properly suspend

2024-10-28 Thread Steven Price
block") > Signed-off-by: Boris Brezillon I guess a failure to suspend is close enough to a time out. I think the only case that might actually matter is dealt with by your next patch. Reviewed-by: Steven Price > --- > drivers/gpu/drm/panthor/panthor_sched.c | 15 +

Re: [PATCH v2 3/3] drm/panthor: Report innocent group kill

2024-10-28 Thread Steven Price
On 28/10/2024 11:48, Boris Brezillon wrote: > Groups can be killed during a reset even though they did nothing wrong. > That usually happens when the FW is put in a bad state by other groups, > resulting in group suspension failures when the reset happens. > > If we end up in that situation, flag

  1   2   3   4   5   6   7   8   9   10   >