Re: [PATCH] drm/panfrost: devfreq: Don't display error for EPROBE_DEFER

2021-07-23 Thread Steven Price
the driver would also allow us to use dev_err_probe(). But as a point fix this patch is fine and correct. Thanks! > Signed-off-by: Chris Morgan Reviewed-by: Steven Price I'll apply this to drm-misc-next. Thanks, Steve > --- > drivers/gpu/drm/panfrost/panfrost_devfreq.c |

Re: [PATCH v5 05/16] swiotlb: Add restricted DMA pool initialization

2021-04-23 Thread Steven Price
On 22/04/2021 09:14, Claire Chang wrote: Add the initialization function to create restricted DMA pools from matching reserved-memory nodes. Signed-off-by: Claire Chang --- include/linux/device.h | 4 +++ include/linux/swiotlb.h | 3 +- kernel/dma/swiotlb.c| 80 ++

Re: [PATCH v5 05/16] swiotlb: Add restricted DMA pool initialization

2021-04-28 Thread Steven Price
On 26/04/2021 17:37, Claire Chang wrote: On Fri, Apr 23, 2021 at 7:34 PM Steven Price wrote: [...] But even then if it's not and we have the situation where debugfs==NULL then the debugfs_create_dir() here will cause a subsequent attempt in swiotlb_create_debugfs() to fail (directory al

Re: [PATCH 1/3] drm/panfrost: Simplify lock_region calculation

2021-08-23 Thread Steven Price
a bigger issue with it being completely wrong when size == ~0 (see below). > Signed-off-by: Alyssa Rosenzweig > Reported-and-tested-by: Chris Morgan > Cc: However, I've confirmed this returns the same values and is certainly more simple, so: Reviewed-by: Steven Price > --- &

Re: [PATCH 2/3] drm/panfrost: Use u64 for size in lock_region

2021-08-23 Thread Steven Price
anfrost: Add initial panfrost driver") Reviewed-by: Steven Price Steve > --- > drivers/gpu/drm/panfrost/panfrost_mmu.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c > b/drivers/gpu/drm/pa

Re: [PATCH 3/3] drm/panfrost: Clamp lock region to Bifrost minimum

2021-08-23 Thread Steven Price
larger than the 4k page size. Add a > hardware definition for the minimum lock region size (corresponding to > KBASE_LOCK_REGION_MIN_SIZE_LOG2 in kbase) and respect it. > > Signed-off-by: Alyssa Rosenzweig > Tested-by: Chris Morgan > Cc: Reviewed-by: Steven Price > --- &g

Re: [PATCH 1/3] drm/panfrost: Simplify lock_region calculation

2021-08-23 Thread Steven Price
On 23 August 2021 22:09:08 BST, Alyssa Rosenzweig wrote: >> > In lock_region, simplify the calculation of the region_width parameter. >> > This field is the size, but encoded as log2(ceil(size)) - 1. >> > log2(ceil(size)) may be computed directly as fls(size - 1). However, we >> > want to use the

Re: [PATCH 2/3] drm/panfrost: Use u64 for size in lock_region

2021-08-23 Thread Steven Price
On 23 August 2021 22:11:09 BST, Alyssa Rosenzweig wrote: >> > Mali virtual addresses are 48-bit. Use a u64 instead of size_t to ensure >> > we can express the "lock everything" condition as ~0ULL without relying >> > on platform-specific behaviour. >> >> 'platform-specific behaviour' makes it sou

Re: [PATCH 3/3] drm/panfrost: Clamp lock region to Bifrost minimum

2021-08-23 Thread Steven Price
On 23 August 2021 22:13:45 BST, Alyssa Rosenzweig wrote: >> > When locking a region, we currently clamp to a PAGE_SIZE as the minimum >> > lock region. While this is valid for Midgard, it is invalid for Bifrost, >> >> While the spec does seem to state it's invalid for Bifrost - kbase >> didn't bo

Re: [PATCH v2 1/4] drm/panfrost: Simplify lock_region calculation

2021-08-25 Thread Steven Price
gt; > The new form of the calculation corrects this special case and avoids > the undefined behaviour. > > Signed-off-by: Alyssa Rosenzweig > Reported-and-tested-by: Chris Morgan > Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver") > Cc:

Re: [PATCH v2 4/4] drm/panfrost: Handle non-aligned lock addresses

2021-08-25 Thread Steven Price
ng the 4GB boundary) requires locking *at least* 0x-0x2 (i.e. locking the first 8GB). This appears to be broken in kbase (which actually does zero out the low bits of the address) - I've raised a bug internally so hopefully someone will tell me if I've read the spec completely w

Re: [PATCH] drm/panfrost: Use upper/lower_32_bits helpers

2021-08-25 Thread Steven Price
GPU_PERFCNT_BASE_HI, upper_32_bits(gpuva)); gpu_write(pfdev, GPU_INT_CLEAR, GPU_IRQ_CLEAN_CACHES_COMPLETED | GPU_IRQ_PERFCNT_SAMPLE_COMPLETED); ---8<-- With that squashed in: Reviewed-by: Steven Price Thanks, Steve > --- > drivers/gpu/drm/panfrost/

Re: [PATCH v2 4/4] drm/panfrost: Handle non-aligned lock addresses

2021-08-25 Thread Steven Price
On 25/08/2021 15:07, Alyssa Rosenzweig wrote: >>> In practice, the current callers pass PAGE_SIZE aligned inputs, avoiding >>> the bug. Therefore this doesn't need to be backported. Still, that's a >>> happy accident and not a precondition of lock_region, so we let's do the >>> right thing to futur

Re: [PATCH v2] drm/panfrost: Use upper/lower_32_bits helpers

2021-08-26 Thread Steven Price
ly "creative" way of writing upper_32_bits. > > v2: Use helpers for one more call site and add review tag (Steven). > > Signed-off-by: Alyssa Rosenzweig > Reviewed-by: Rob Herring (v1) > Reviewed-by: Steven Price Pushed to drm-misc-next Thanks, Steve > ---

Re: [PATCH v3] drm/scheduler re-insert Bailing job to avoid memleak

2021-03-22 Thread Steven Price
On 15/03/2021 05:23, Zhang, Jack (Jian) wrote: [AMD Public Use] Hi, Rob/Tomeu/Steven, Would you please help to review this patch for panfrost driver? Thanks, Jack Zhang -Original Message- From: Jack Zhang Sent: Monday, March 15, 2021 1:21 PM To: dri-devel@lists.freedesktop.org; amd-.

Re: [PATCH v3] drm/scheduler re-insert Bailing job to avoid memleak

2021-03-26 Thread Steven Price
n top of struct drm_sched_job. So there may be scope for cleaning up Panfrost afterwards even if your work doesn't directly affect it. Thanks, Steve Best, Jack -Original Message----- From: Steven Price Sent: Monday, March 22, 2021 11:29 PM To: Zhang, Jack (Jian) ;

Re: [PATCH v10 3/4] drm/panfrost: devfreq: Disable devfreq when num_supplies > 1

2021-01-14 Thread Steven Price
thout taking care of those constraints. Disable devfreq for now on those GPUs. Signed-off-by: Nicolas Boichat Reviewed-by: Tomeu Vizoso Thanks for the clarification in the commit message. Reviewed-by: Steven Price --- (no changes since v9) Changes in v9: - Explain why devfreq needs

Re: [PATCH v10 4/4] drm/panfrost: Add mt8183-mali compatible string

2021-01-14 Thread Steven Price
On 13/01/2021 06:07, Nicolas Boichat wrote: Add support for MT8183's G72 Bifrost. Signed-off-by: Nicolas Boichat Reviewed-by: Tomeu Vizoso LGTM Reviewed-by: Steven Price --- (no changes since v7) Changes in v7: - Fix GPU ID in commit message Changes in v6: - Context conf

Re: [PATCH] drm/komeda: Fix bit check to import to value of proper type

2021-01-20 Thread Steven Price
On 18/01/2021 14:20, carsten.haitz...@foss.arm.com wrote: From: Carsten Haitzler Another issue found by KASAN. The bit finding is bueried inside the NIT: s/bueried/buried/ dp_for_each_set_bit() macro (that passes on to for_each_set_bit() that calls the bit stuff. These bit functions want an

Re: [PATCH 1/1] drm/scheduler: Job timeout handler returns status (v3)

2021-01-21 Thread Steven Price
: Christian Gmeiner Cc: Qiang Yu Cc: Rob Herring Cc: Tomeu Vizoso Cc: Steven Price Cc: Alyssa Rosenzweig Cc: Eric Anholt Reported-by: kernel test robot Signed-off-by: Luben Tuikov Acked-by: Steven Price ___ dri-devel mailing list dri-dev

Re: [PATCH] drm/komeda: Fix bit check to import to value of proper type

2021-01-21 Thread Steven Price
On 21/01/2021 12:22, Carsten Haitzler wrote: On 1/20/21 3:44 PM, Steven Price wrote: On 18/01/2021 14:20, carsten.haitz...@foss.arm.com wrote: From: Carsten Haitzler Another issue found by KASAN. The bit finding is bueried inside the NIT: s/bueried/buried/ Yup. typo not spotted by me

Re: [PATCH] drm/panfrost: Add governor data with pre-defined thresholds

2021-01-22 Thread Steven Price
% threshold more easily (AFAICT kbase uses the default 90/5 thresholds), but this seems like a reasonable change for now. Reviewed-by: Steven Price Thanks, Steve [1] When I get some time I need to rework the "queue jobs on the hardware"[2] patch I posted ages ago. Last time it actua

Re: [PATCH] drm/panfrost: Add governor data with pre-defined thresholds

2021-01-22 Thread Steven Price
On 22/01/2021 10:11, Lukasz Luba wrote: On 1/21/21 5:15 PM, Daniel Lezcano wrote: On 21/01/2021 18:04, Lukasz Luba wrote: The simple_ondemand devfreq governor uses two thresholds to decide about the frequency change: upthreshold, downdifferential. These two tunable change the behavior of the

Re: [PATCH] drm/panfrost: Add governor data with pre-defined thresholds

2021-01-22 Thread Steven Price
On 22/01/2021 10:00, Lukasz Luba wrote: On 1/22/21 8:21 AM, Steven Price wrote: On 21/01/2021 17:04, Lukasz Luba wrote: The simple_ondemand devfreq governor uses two thresholds to decide about the frequency change: upthreshold, downdifferential. These two tunable change the behavior of the

Re: [PATCH] drm/komeda: Fix bit check to import to value of proper type

2021-01-27 Thread Steven Price
NIT: This is the second version of this patch so should have "[PATCH v2]" in the subject. On 27/01/2021 12:34, carsten.haitz...@foss.arm.com wrote: From: Carsten Haitzler Another issue found by KASAN. The bit finding is buried inside the dp_for_each_set_bit() macro (that passes on to for_each

Re: [PATCH 1/3] drm/panfrost: Clear MMU irqs before handling the fault

2021-02-01 Thread Steven Price
: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations") Signed-off-by: Boris Brezillon Good catch (although this oddly rings a bell - so perhaps it was me you discussed it with before) Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_mmu.c | 4 ++-

Re: [PATCH 2/3] drm/panfrost: Don't try to map pages that are already mapped

2021-02-01 Thread Steven Price
("drm/panfrost: Add support for GPU heap allocations") Signed-off-by: Boris Brezillon Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_mmu.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drive

Re: [PATCH 3/3] drm/panfrost: Stay in the threaded MMU IRQ handler until we've handled all IRQs

2021-02-01 Thread Steven Price
Back-to-back MMU faults should (hopefully) be fairly uncommon. Regardless: Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_mmu.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu

Re: [PATCH 3/3] drm/panfrost: Stay in the threaded MMU IRQ handler until we've handled all IRQs

2021-02-01 Thread Steven Price
On 01/02/2021 12:59, Boris Brezillon wrote: On Mon, 1 Feb 2021 12:13:49 + Steven Price wrote: On 01/02/2021 08:21, Boris Brezillon wrote: Doing a hw-irq -> threaded-irq round-trip is counter-productive, stay in the threaded irq handler as long as we can. Signed-off-by: Boris Brezil

Re: [PATCH 3/3] drm/panfrost: Stay in the threaded MMU IRQ handler until we've handled all IRQs

2021-02-03 Thread Steven Price
On 03/02/2021 14:45, Rob Herring wrote: On Mon, Feb 1, 2021 at 2:21 AM Boris Brezillon wrote: Doing a hw-irq -> threaded-irq round-trip is counter-productive, stay in the threaded irq handler as long as we can. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panfrost/panfrost_mmu.c | 7

Re: [PATCH] drm/komeda: Fix bit check to import to value of proper type

2021-02-05 Thread Steven Price
want an unsigned long pointer as input and just dumbly casting leads to out-of-bounds accesses. This fixes that. Signed-off-by: Carsten Haitzler Looks fine to me: Reviewed-by: Steven Price --- .../drm/arm/display/include/malidp_utils.h| 3 --- .../drm/arm/display/komeda

Re: [PATCH v2 3/3] drm/panfrost: Stay in the threaded MMU IRQ handler until we've handled all IRQs

2021-02-05 Thread Steven Price
On 05/02/2021 11:17, Boris Brezillon wrote: Doing a hw-irq -> threaded-irq round-trip is counter-productive, stay in the threaded irq handler as long as we can. v2: * Rework the loop to avoid a goto Signed-off-by: Boris Brezillon Reviewed-by: Steven Price --- drivers/gpu/drm/panfr

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-18 Thread Steven Price
On 17/02/2021 16:59, Neil Roberts wrote: When mmapping the shmem, it would previously adjust the pgoff in the vm_area_struct to remove the fake offset that is added to be able to identify the buffer. This patch removes the adjustment and makes the fault handler use the vm_fault address to calcula

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-18 Thread Steven Price
On 18/02/2021 15:45, Alyssa Rosenzweig wrote: Yeah plus Cc: stable for backporting and I think an igt or similar for panfrost to check this works correctly would be pretty good too. Since if it took us over 1 year to notice this bug it's pretty clear that normal testing doesn't catch this. So ver

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-18 Thread Steven Price
On 18/02/2021 16:38, Rob Herring wrote: On Thu, Feb 18, 2021 at 10:15 AM Steven Price wrote: On 18/02/2021 15:45, Alyssa Rosenzweig wrote: Yeah plus Cc: stable for backporting and I think an igt or similar for panfrost to check this works correctly would be pretty good too. Since if it took

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-19 Thread Steven Price
On 18/02/2021 18:20, Daniel Vetter wrote: On Thu, Feb 18, 2021 at 6:16 PM Rob Herring wrote: On Thu, Feb 18, 2021 at 10:51 AM Steven Price wrote: On 18/02/2021 16:38, Rob Herring wrote: On Thu, Feb 18, 2021 at 10:15 AM Steven Price wrote: On 18/02/2021 15:45, Alyssa Rosenzweig wrote

Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-19 Thread Steven Price
On 19/02/2021 15:13, Daniel Vetter wrote: On Fri, Feb 19, 2021 at 01:36:06PM +, Steven Price wrote: On 18/02/2021 18:20, Daniel Vetter wrote: On Thu, Feb 18, 2021 at 6:16 PM Rob Herring wrote: On Thu, Feb 18, 2021 at 10:51 AM Steven Price wrote: On 18/02/2021 16:38, Rob Herring wrote

Re: [PATCH 1/2] drm/shmem-helper: Check for purged buffers in fault handler

2021-02-24 Thread Steven Price
purge helpers") Signed-off-by: Neil Roberts Reviewed-by: Steven Price --- drivers/gpu/drm/drm_gem_shmem_helper.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_help

Re: [PATCH v2 2/2] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff

2021-02-24 Thread Steven Price
from other buffers v2: Don't check whether the unsigned page_offset is less than 0. Cc: sta...@vger.kernel.org Fixes: 17acb9f35ed7 ("drm/shmem: Add madvise state and purge helpers") Signed-off-by: Neil Roberts Reviewed-by: Steven Price --- drivers/gpu/drm/drm_gem

Re: [PATCH] devfreq: Register devfreq as a cooling device

2021-03-05 Thread Steven Price
On 04/03/2021 12:50, Daniel Lezcano wrote: Currently the default behavior is to manually having the devfreq backend to register themselves as a devfreq cooling device. There are no so many and actually it makes more sense to register the devfreq device when adding it. Consequently, every devfre

Re: [PATCH 0/2] Fix purging buffers in the shmem helpers

2021-03-05 Thread Steven Price
On 23/02/2021 15:51, Neil Roberts wrote: These two patches fix a problem with the madvise purging code for the shmem helpers where the mmaping for a purged buffer wouldn't get invalidated correctly. This presumably ends up as a security hole where the mapping can be accessed from user-space to re

Re: [PATCH v5 3/4] PM / devfreq: panfrost: Use devfreq cooling device registration

2021-03-08 Thread Steven Price
el Lezcano Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 14 +- drivers/gpu/drm/panfrost/panfrost_devfreq.h | 3 --- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/dr

Re: [RFC PATCH 0/7] drm/panfrost: Add a new submit ioctl

2021-03-11 Thread Steven Price
On 11/03/2021 09:25, Boris Brezillon wrote: Hello, I've been playing with Vulkan lately and struggled quite a bit to implement VkQueueSubmit with the submit ioctl we have. There are several limiting factors that can be worked around if we really have to, but I think it'd be much easier and futur

Re: [PATCH -next] drm/panfrost: Fix PM reference leak in panfrost_job_hw_submit()

2021-05-12 Thread Steven Price
On 11/05/2021 07:29, Zou Wei wrote: pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot Signed-off-by

[PATCH] drm/panfrost: Handle failure in panfrost_job_hw_submit()

2021-05-12 Thread Steven Price
or to return a failure code from panfrost_job_hw_submit() and report the failure back to the DRM scheduler. This means there's no need to wait for the scheduler to timeout on the job and the failure can be handled immediately. Signed-off-by: Steven Price --- This hopefully will also stop future

Re: [PATCH 1/1] drm/panfrost: Remove redundant error printing in panfrost_device_init()

2021-05-12 Thread Steven Price
printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei Reviewed-by: Steven Price I'll push to drm-misc-next. Thanks, Steve --- drivers/gpu/drm/panfrost/panfrost_device.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gp

Re: [PATCH v13 0/4] drm/panfrost: Add support for mt8183 GPU

2021-05-14 Thread Steven Price
On 14/05/2021 15:48, Neil Armstrong wrote: > On 13/05/2021 16:55, Ezequiel Garcia wrote: >> Hi Neil, >> >> On Mon, 26 Apr 2021 at 06:59, Neil Armstrong wrote: >>> >>> Hi, >>> >>> On 21/04/2021 07:28, Nicolas Boichat wrote: Hi! This is just a rebase of the v11, untested (but it seems

Re: [PATCH] drm/panfrost: Fix the panfrost_mmu_map_fault_addr() error path

2021-05-21 Thread Steven Price
eap allocations") > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_mmu.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c > b/drivers/gpu/drm/panfrost/panfrost_mmu

Re: [PATCH 3/6] drm/scheduler: Job timeout handler returns status

2020-11-25 Thread Steven Price
On 25/11/2020 03:17, Luben Tuikov wrote: The job timeout handler now returns status indicating back to the DRM layer whether the job was successfully cancelled or whether more time should be given to the job to complete. I'm not sure I understand in what circumstances you would want to give th

Re: [PATCH 6/6] drm/sched: Make use of a "done" thread

2020-11-25 Thread Steven Price
On 25/11/2020 03:17, Luben Tuikov wrote: Add a "done" list to which all completed jobs are added to be freed. The drm_sched_job_done() callback is the producer of jobs to this list. Add a "done" thread which consumes from the done list and frees up jobs. Now, the main scheduler thread only pushe

Re: [PATCH 3/6] drm/scheduler: Job timeout handler returns status

2020-11-25 Thread Steven Price
On 25/11/2020 11:15, Lucas Stach wrote: Am Mittwoch, den 25.11.2020, 11:04 + schrieb Steven Price: On 25/11/2020 03:17, Luben Tuikov wrote: The job timeout handler now returns status indicating back to the DRM layer whether the job was successfully cancelled or whether more time should be

Re: [PATCH] iommu/io-pgtable: Remove tlb_flush_leaf

2020-11-26 Thread Steven Price
y: Robin Murphy LGTM Reviewed-by: Steven Price --- Reviewing the Mediatek TLB optimisation patches just left me thinking "why do we even have this?"... Panfrost folks, this has zero functional impact to you, merely wants an ack for straying outside drivers/iommu. Robin. driver

Re: [PATCH] drm/panfrost: fix reference leak in panfrost_job_hw_submit

2020-11-27 Thread Steven Price
On 27/11/2020 09:44, Qinglang Miao wrote: pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in a reference leak here. A new function pm_runtime_resume_and_get is introduced in [0] to keep usage counter balanced. So We fix the referenc

Re: [PATCH] drm/komeda: Remove useless variable assignment

2020-11-27 Thread Steven Price
On 27/11/2020 11:00, carsten.haitz...@foss.arm.com wrote: From: Carsten Haitzler ret is not actually read after this (only written in one case then returned), so this assign line is useless. This removes that assignment. Signed-off-by: Carsten Haitzler Reviewed-by: Steven Price

Re: [PATCH] drm/komeda: Handle NULL pointer access code path in error case

2020-11-27 Thread Steven Price
) + if (!old_st || + memcmp(&(to_compiz_st(old_st)->cins[idx]), cin, sizeof(*cin))) c_st->changed_active_inputs |= BIT(idx); Even better, you can move the WARN_ON into the if: if (WARN_ON(!old_st) || ... Either way: Reviewed-by

Re: [PATCH 1/1] drm/scheduler: Job timeout handler returns status (v2)

2020-12-10 Thread Steven Price
Herring Cc: Tomeu Vizoso Cc: Steven Price Cc: Alyssa Rosenzweig Cc: Eric Anholt Reported-by: kernel test robot This reported-by seems a little odd for this patch. Signed-off-by: Luben Tuikov --- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 6 +++-- drivers/gpu/drm/etnaviv/etnaviv_sched

Re: [PATCH v6 14/16] drm/panfrost: Kill in-flight jobs on FD close

2021-06-30 Thread Steven Price
-by: Boris Brezillon > --- > drivers/gpu/drm/panfrost/panfrost_device.h | 7 > drivers/gpu/drm/panfrost/panfrost_job.c| 42 ++ > 2 files changed, 43 insertions(+), 6 deletions(-) The panfrost_exception_is_fault() makes the code much more readable - thanks! Rev

Re: [PATCH v6 15/16] drm/panfrost: Queue jobs on the hardware

2021-06-30 Thread Steven Price
On 30/06/2021 07:27, Boris Brezillon wrote: > From: Steven Price > > The hardware has a set of '_NEXT' registers that can hold a second job > while the first is executing. Make use of these registers to enqueue a > second job per slot. > > v5: > * Fix a comm

Re: [PATCH v6 16/16] drm/panfrost: Increase the AS_ACTIVE polling timeout

2021-06-30 Thread Steven Price
the case if devfreq is active. > > Let's pick a significantly bigger timeout value (1ms -> 100ms) to be on > the safe side. > > v5: > * New patch > > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_mmu.c |

Re: [PATCH v2] drm/panfrost:report the full raw fault information instead

2021-07-01 Thread Steven Price
On 29/06/2021 04:04, Chunyou Tang wrote: > Hi Steve, > thinks for your reply. > I set the pte in arm_lpae_prot_to_pte(), > *** > /* >* Also Mali has its own notions of shareability wherein its > Inner >

Re: [PATCH v2 1/7] drm/panfrost: Pass a job to panfrost_{acquire,attach_object_fences}()

2021-07-02 Thread Steven Price
ch}_object_fences() Otherwise: Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_job.c | 22 -- > 1 file changed, 8 insertions(+), 14 deletions(-) > > diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c > b/drivers/gpu/drm/panfrost/panfrost_job.c

Re: [PATCH v2 2/7] drm/panfrost: Move the mappings collection out of panfrost_lookup_bos()

2021-07-02 Thread Steven Price
On 01/07/2021 10:12, Boris Brezillon wrote: > So we can re-use it from elsewhere. > > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_drv.c | 52 ++--- > 1 file changed, 29 insertions(+), 23 deletions(-)

Re: [PATCH v2 3/7] drm/panfrost: Add BO access flags to relax dependencies between jobs

2021-07-02 Thread Steven Price
access flags will be introduced. > > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_drv.c | 9 + > drivers/gpu/drm/panfrost/panfrost_job.c | 23 +++ > drivers/gpu/drm/panfrost/panfrost_jo

Re: [PATCH v2 4/7] drm/panfrost: Add the ability to create submit queues

2021-07-02 Thread Steven Price
On 01/07/2021 10:12, Boris Brezillon wrote: > Needed to keep VkQueues isolated from each other. > > Signed-off-by: Boris Brezillon My Vulkan knowledge is limited so I'm not sure whether this is the right approach or not. In particular is it correct that an application can create a high priority

Re: [PATCH v2 7/7] drm/panfrost: Bump minor version to reflect the feature additions

2021-07-02 Thread Steven Price
On 01/07/2021 10:12, Boris Brezillon wrote: > We now have a new ioctl that allows submitting multiple jobs at once > (among other things) and we support timelined syncobjs. Bump the > minor version number to reflect those changes. > > Signed-off-by: Boris Brezillon Reviewed-b

Re: [PATCH v2 5/7] drm/panfrost: Add a new ioctl to submit batches

2021-07-02 Thread Steven Price
On 01/07/2021 10:12, Boris Brezillon wrote: > This should help limit the number of ioctls when submitting multiple > jobs. The new ioctl also supports syncobj timelines and BO access flags. > > Signed-off-by: Boris Brezillon The new ioctl looks reasonable, but I think there's a lot of scope for

Re: [PATCH v2 6/7] drm/panfrost: Advertise the SYNCOBJ_TIMELINE feature

2021-07-02 Thread Steven Price
On 01/07/2021 10:12, Boris Brezillon wrote: > Now that we have a new SUBMIT ioctl dealing with timelined syncojbs we Typo: s/syncojbs/syncobjs/ > can advertise the feature. > > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/

Re: [PATCH v2 4/7] drm/panfrost: Add the ability to create submit queues

2021-07-02 Thread Steven Price
On 01/07/2021 10:12, Boris Brezillon wrote: > Needed to keep VkQueues isolated from each other. One more comment I noticed when I tried this out: [...] > +struct panfrost_submitqueue * > +panfrost_submitqueue_create(struct panfrost_file_priv *ctx, > + enum panfrost_submitq

Re: [PATCH v2 4/7] drm/panfrost: Add the ability to create submit queues

2021-07-02 Thread Steven Price
On 02/07/2021 11:43, Boris Brezillon wrote: > On Fri, 2 Jul 2021 10:56:29 +0100 > Steven Price wrote: > >> On 01/07/2021 10:12, Boris Brezillon wrote: >>> Needed to keep VkQueues isolated from each other. >>> >>> Signed-off-by: Boris Brezillon >&

Re: [PATCH v2 4/7] drm/panfrost: Add the ability to create submit queues

2021-07-02 Thread Steven Price
On 02/07/2021 11:52, Boris Brezillon wrote: > On Fri, 2 Jul 2021 11:08:58 +0100 > Steven Price wrote: > >> On 01/07/2021 10:12, Boris Brezillon wrote: >>> Needed to keep VkQueues isolated from each other. >> >> One more comment I noticed when I tri

Re: [PATCH v3 4/7] drm/panfrost: Add the ability to create submit queues

2021-07-02 Thread Steven Price
On 02/07/2021 15:32, Boris Brezillon wrote: > Needed to keep VkQueues isolated from each other. > > v3: > * Limit the number of submitqueue per context to 16 > * Fix a deadlock > > Signed-off-by: Boris Brezillon 16 ought to be enough for anyone ;) Reviewed-by: Steven Pri

Re: [PATCH v3 5/7] drm/panfrost: Add a new ioctl to submit batches

2021-07-02 Thread Steven Price
On 02/07/2021 15:32, Boris Brezillon wrote: > This should help limit the number of ioctls when submitting multiple > jobs. The new ioctl also supports syncobj timelines and BO access flags. > > v3: > * Re-use panfrost_get_job_bos() and panfrost_get_job_in_syncs() in the > old submit path > > Si

Re: [PATCH v3 5/7] drm/panfrost: Add a new ioctl to submit batches

2021-07-05 Thread Steven Price
On 02/07/2021 19:11, Boris Brezillon wrote: > On Fri, 2 Jul 2021 12:49:55 -0400 > Alyssa Rosenzweig wrote: > ``` > #define PANFROST_BO_REF_EXCLUSIVE0x1 > +#define PANFROST_BO_REF_NO_IMPLICIT_DEP 0x2 ``` This seems logically backwards. NO_IMPLICIT_DEP ma

Re: [PATCH v3 5/7] drm/panfrost: Add a new ioctl to submit batches

2021-07-05 Thread Steven Price
On 05/07/2021 09:43, Boris Brezillon wrote: > Hi Steven, > > On Mon, 5 Jul 2021 09:22:39 +0100 > Steven Price wrote: > >> On 02/07/2021 19:11, Boris Brezillon wrote: >>> On Fri, 2 Jul 2021 12:49:55 -0400 >>> Alyssa Rosenzweig wrote:

Re: [PATCH v4 4/7] drm/panfrost: Add the ability to create submit queues

2021-07-05 Thread Steven Price
a deadlock > > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/Makefile | 3 +- > drivers/gpu/drm/panfrost/panfrost_device.h| 2 +- > drivers/gpu/drm/panfrost/panfrost_drv.c | 69 - > dri

Re: [PATCH v4 5/7] drm/panfrost: Add a new ioctl to submit batches

2021-07-05 Thread Steven Price
On 05/07/2021 09:29, Boris Brezillon wrote: > This should help limit the number of ioctls when submitting multiple > jobs. The new ioctl also supports syncobj timelines and BO access flags. > > v4: > * Implement panfrost_ioctl_submit() as a wrapper around > panfrost_submit_job() > * Replace stri

Re: [PATCH v2] drm/panfrost:report the full raw fault information instead

2021-07-05 Thread Steven Price
es were applied in the kernel. I think we'd need some input from the people who did the hardware integration, and hopefully they would have access to the proprietary driver from Arm. Steve > Thinks very much! > > Chunyou. > > > ?? Thu, 1 Jul 2021 11:15:1

Re: [PATCH v3 5/7] drm/panfrost: Add a new ioctl to submit batches

2021-07-07 Thread Steven Price
On 06/07/2021 13:48, Alyssa Rosenzweig wrote: >> My concern is if we ever find a security bug which requires new >> information/behaviour in the submit ABI to properly fix. In this case it >> would be appropriate to backport a 'feature' (bug fix) which provides a >> new ABI but it would need to be

Re: [PATCH v3 07/20] drm/panfrost: use scheduler dependency tracking

2021-07-12 Thread Steven Price
in-fences as dependencies. > > v2: Correctly clean up the partially set up job, now that job_init() > and job_arm() are apart (Emma). > > Reviewed-by: Steven Price (v1) v2/v3 are also: Reviewed-by: Steven Price Thanks, Steve > Signed-off-by: Daniel Vetter > Cc: Rob H

Re: [PATCH v3] drm/panfrost:fix the exception name always "UNKNOWN"

2021-07-12 Thread Steven Price
f the register value > to custom,so it's better fault_status don't (& 0xFF). > > Signed-off-by: ChunyouTang Reviewed-by: Steven Price Boris's change has actually modified panfrost_exception_name() to no longer take pfdev in drm-misc-next. However, I'll just fix th

[PATCH] drm/of: free the iterator object on failure

2021-07-12 Thread Steven Price
When bailing out due to the sanity check the iterator value needs to be freed because the early return prevents for_each_child_of_node() from doing the dereference itself. Fixes: 4ee48cc5586b ("drm: of: Fix double-free bug") Signed-off-by: Steven Price --- drivers/gpu/drm/drm_of.c |

Re: [PATCH] drm/of: free the iterator object on failure

2021-07-12 Thread Steven Price
On 12/07/2021 17:50, Laurent Pinchart wrote: > Hi Steven, > > Thank you for the patch. > > On Mon, Jul 12, 2021 at 04:57:58PM +0100, Steven Price wrote: >> When bailing out due to the sanity check the iterator value needs to be >> freed because the early return prev

Re: [PATCH] drm/of: free the iterator object on failure

2021-07-13 Thread Steven Price
On 12/07/2021 22:55, Laurent Pinchart wrote: > Hi Steven, Hi Laurent, > On Mon, Jul 12, 2021 at 10:31:52PM +0100, Steven Price wrote: >> On 12/07/2021 17:50, Laurent Pinchart wrote: >>> On Mon, Jul 12, 2021 at 04:57:58PM +0100, Steven Price wrote: >>>> When ba

[PATCH v2] drm/of: free the iterator object on failure

2021-07-14 Thread Steven Price
When bailing out due to the sanity check the iterator value needs to be freed because the early return prevents for_each_child_of_node() from doing the dereference itself. Fixes: 6529007522de ("drm: of: Add drm_of_lvds_get_dual_link_pixel_order") Signed-off-by: Steven Price --- drive

Re: [PATCH v2] drm/of: free the iterator object on failure

2021-07-15 Thread Steven Price
On 14/07/2021 16:26, Laurent Pinchart wrote: > Hi Steven, > > Thank you for the patch. > > On Wed, Jul 14, 2021 at 03:33:00PM +0100, Steven Price wrote: >> When bailing out due to the sanity check the iterator value needs to be >> freed because the early return prev

Re: [PATCH] drm/panfrost: Replace devm_reset_control_array_get()

2020-11-04 Thread Steven Price
On 03/11/2020 01:48, Yejune Deng wrote: devm_reset_control_array_get_optional_exclusive() looks more readable Signed-off-by: Yejune Deng Reviewed-by: Steven Price Thanks, I'll push this to drm-misc-next. Steve --- drivers/gpu/drm/panfrost/panfrost_device.c | 2 +- 1 file chang

Re: [PATCH v4] drm/panfrost: Move the GPU reset bits outside the timeout handler

2020-11-05 Thread Steven Price
x27;s R-b v2: - Use atomic_cmpxchg() to conditionally schedule the reset work (Steven Price) Fixes: 1a11a88cfd9a ("drm/panfrost: Fix job timeout handling") Cc: Signed-off-by: Boris Brezillon Hi Boris, A couple of nits below, but otherwise looks good. --- drivers/gpu/drm/panfrost/panfr

Re: [PATCH v5] drm/panfrost: Move the GPU reset bits outside the timeout handler

2020-11-05 Thread Steven Price
- Simplify panfrost_scheduler_stop() (Steven Price) - Always restart the queue in panfrost_scheduler_start() even if the status is corrupted (Steven Price) v4: - Rework the logic to prevent a race between drm_sched_start() (reset work) and drm_sched_job_timedout() (timeout work) - Drop Steven's R-b

Re: [PATCH 6/7] drm/panfrost: dev_pm_opp_put_*() accepts NULL argument

2020-11-09 Thread Steven Price
On 06/11/2020 07:03, Viresh Kumar wrote: The dev_pm_opp_put_*() APIs now accepts a NULL opp_table pointer and so there is no need for us to carry the extra check. Drop them. Signed-off-by: Viresh Kumar Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 6

Re: [PATCH v5] drm/panfrost: Move the GPU reset bits outside the timeout handler

2020-11-16 Thread Steven Price
- Simplify panfrost_scheduler_stop() (Steven Price) - Always restart the queue in panfrost_scheduler_start() even if the status is corrupted (Steven Price) v4: - Rework the logic to prevent a race between drm_sched_start() (reset work) and drm_sched_job_timedout() (timeout work) - Drop Steven's R-b

Re: [PATCH v2 6/8] drm/shmem-helper: Add generic memory shrinker

2022-03-16 Thread Steven Price
On 14/03/2022 22:42, Dmitry Osipenko wrote: > Introduce a common DRM SHMEM shrinker. It allows to reduce code > duplication among DRM drivers, it also handles complicated lockings > for the drivers. This is initial version of the shrinker that covers > basic needs of GPU drivers. > > This patch is

Re: [PATCH v2 8/8] drm/panfrost: Switch to generic memory shrinker

2022-03-16 Thread Steven Price
On 14/03/2022 22:42, Dmitry Osipenko wrote: > Replace Panfrost's memory shrinker with a generic DRM memory shrinker. > > Signed-off-by: Dmitry Osipenko > --- I gave this a spin on my Firefly-RK3288 board and everything seems to work. So feel free to add a: Tested-by: Steven

Re: [PATCH v2 8/8] drm/panfrost: Switch to generic memory shrinker

2022-03-18 Thread Steven Price
On 18/03/2022 14:41, Dmitry Osipenko wrote: > > On 3/17/22 02:04, Dmitry Osipenko wrote: >> >> On 3/16/22 18:04, Steven Price wrote: >>> On 14/03/2022 22:42, Dmitry Osipenko wrote: >>>> Replace Panfrost's memory shrinker with a generic DRM memory shrink

Re: [PATCH] drm/panfrost: cleanup comments

2022-03-02 Thread Steven Price
On 01/03/2022 12:43, t...@redhat.com wrote: > From: Tom Rix > > For spdx > change tab to space delimiter > Use // for *.c > > Replacements > commited to committed, use multiline comment style > regsiters to registers > initialze to initialize > > Signed-off-by: Tom Rix Thanks, most of the cha

Re: [PATCH v2] drm/panfrost: cleanup comments

2022-03-02 Thread Steven Price
On 02/03/2022 12:45, t...@redhat.com wrote: > From: Tom Rix > > For spdx > change tab to space delimiter > Use // for *.c > > Replacements > commited to committed > regsiters to registers > initialze to initialize > > Signed-off-by: Tom Rix Reviewed-b

Re: [PATCH] panfrost: Don't cleanup the job if it was successfully queued

2021-09-01 Thread Steven Price
; labels so we don't do the same mistake again. > > Fixes: 53516280cc38 ("drm/panfrost: use scheduler dependency tracking") > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price And also unlike last time... Tested-by: Steven Price Thanks for the clean up - I should ha

Re: [PATCH] drm/panfrost: Make use of the helper function devm_platform_ioremap_resource()

2021-09-02 Thread Steven Price
On 31/08/2021 08:53, Cai Huoqing wrote: > Use the devm_platform_ioremap_resource() helper instead of > calling platform_get_resource() and devm_ioremap_resource() > separately > > Signed-off-by: Cai Huoqing Reviewed-by: Steven Price I'll push this to drm-misc-n

[PATCH] drm/panfrost: Calculate lock region size correctly

2021-09-02 Thread Steven Price
(subtracting 1 from the end because the end address is exclusive). The start address is then aligned based on the size (this is technically unnecessary as the hardware will ignore these bits, but the spec advises to do this "to avoid confusion"). Signed-off-by: Steven Price --- See p

Re: [PATCH] drm/panfrost: Calculate lock region size correctly

2021-09-03 Thread Steven Price
On 03/09/2021 09:51, Boris Brezillon wrote: > On Thu, 2 Sep 2021 15:00:38 +0100 > Steven Price wrote: > >> It turns out that when locking a region, the region must be a naturally >> aligned power of 2. The upshot of this is that if the desired region >> crosses a

[PATCH v2] drm/panfrost: Calculate lock region size correctly

2021-09-03 Thread Steven Price
(subtracting 1 from the end because the end address is exclusive). The start address is then aligned based on the size (this is technically unnecessary as the hardware will ignore these bits, but the spec advises to do this "to avoid confusion"). Reviewed-by: Boris Brezillon Si

  1   2   3   4   5   6   7   8   >