Re: [Freedreno] [PATCH v3 0/9] dma-fence: Deadline awareness

2021-09-09 Thread Rob Clark
On Thu, Sep 9, 2021 at 9:42 AM Simon Ser wrote: > > On Thursday, September 9th, 2021 at 18:31, Rob Clark > wrote: > > > Yes, I think it would.. and "dma-buf/sync_file: Add SET_DEADLINE > > ioctl" adds such an ioctl.. just for the benefit of igt tests at this

Re: [Freedreno] [PATCH] drm/msm: Disable frequency clamping on a630

2021-09-09 Thread Rob Clark
>>> On Mon 09 Aug 10:26 PDT 2021, Akhil P Oommen wrote: > >>> > >>>> On 8/9/2021 9:48 PM, Caleb Connolly wrote: > >>>>> > >>>>> > >>>>> On 09/08/2021 17:12, Rob Clark wrote: > >>>>>> On Mon, Aug 9,

Re: [Freedreno] [PATCH] drm/msm: Disable frequency clamping on a630

2021-09-10 Thread Rob Clark
On Tue, Sep 7, 2021 at 7:20 PM Bjorn Andersson wrote: > > On Mon 09 Aug 10:26 PDT 2021, Akhil P Oommen wrote: > > > On 8/9/2021 9:48 PM, Caleb Connolly wrote: > > > > > > > > > On 09/08/2021 17:12, Rob Clark wrote: > > > > On Mon

Re: [Freedreno] [PATCH] drm/msm: Disable frequency clamping on a630

2021-09-10 Thread Rob Clark
On Thu, Sep 9, 2021 at 1:54 PM Rob Clark wrote: > > On Thu, Sep 9, 2021 at 12:50 PM Akhil P Oommen wrote: > > > > On 9/9/2021 9:42 PM, Amit Pundir wrote: > > > On Thu, 9 Sept 2021 at 17:47, Amit Pundir wrote: > > >> > > >> On Wed,

Re: [Freedreno] [PATCH 4/4] drm/bridge: ti-sn65dsi86: Add NO_CONNECTOR support

2021-09-20 Thread Rob Clark
On Thu, Aug 12, 2021 at 1:08 PM Doug Anderson wrote: > > Laurent, > > On Thu, Aug 12, 2021 at 12:26 PM Laurent Pinchart > wrote: > > > > Hi Rob, > > > > Thank you for the patch. > > > > On Wed, Aug 11, 2021 at 04:52:50PM -0700, Rob Clark wrote:

[Freedreno] [PATCH v2 0/3] drm: msm+ti-sn65dsi86 support for NO_CONNECTOR

2021-09-20 Thread Rob Clark
From: Rob Clark Respin of https://www.spinics.net/lists/linux-arm-msm/msg92182.html with the remaining 3 patches that are not yet merged. At the end of this series, but drm/msm and ti-sn65dsi86 work in both combinations, so the two bridge patches can be merged indepdendently of the msm/dsi

[Freedreno] [PATCH v2 1/3] drm/msm/dsi: Support NO_CONNECTOR bridges

2021-09-20 Thread Rob Clark
From: Rob Clark For now, since we have a mix of bridges which support this flag, which which do *not* support this flag, or work both ways, try it once with NO_CONNECTOR and then fall back to the old way if that doesn't work. Eventually we can drop the fallback path. v2: Add mi

[Freedreno] [PATCH v2 2/3] drm/bridge: ti-sn65dsi86: Implement bridge->mode_valid()

2021-09-20 Thread Rob Clark
From: Rob Clark For the brave new world of bridges not creating their own connectors, we need to implement the max clock limitation via bridge->mode_valid() instead of connector->mode_valid(). v2: Drop unneeded connector->mode_valid() Signed-off-by: Rob Clark Reviewed-by: Douglas

[Freedreno] [PATCH v2 3/3] drm/bridge: ti-sn65dsi86: Add NO_CONNECTOR support

2021-09-20 Thread Rob Clark
From: Rob Clark Slightly awkward to fish out the display_info when we aren't creating own connector. But I don't see an obvious better way. v2: Remove error return with NO_CONNECTOR flag Signed-off-by: Rob Clark --- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 39

Re: [Freedreno] [PATCH v2 3/3] drm/bridge: ti-sn65dsi86: Add NO_CONNECTOR support

2021-09-21 Thread Rob Clark
On Tue, Sep 21, 2021 at 3:20 PM Doug Anderson wrote: > > Hi, > > On Mon, Sep 20, 2021 at 3:53 PM Rob Clark wrote: > > > > From: Rob Clark > > > > Slightly awkward to fish out the display_info when we aren't creating > > own connector. But I don&

[Freedreno] [PATCH 0/3] io-pgtable-arm + drm/msm: Extend iova fault debugging

2021-09-22 Thread Rob Clark
From: Rob Clark This series extends io-pgtable-arm with a method to retrieve the page table entries traversed in the process of address translation, and then beefs up drm/msm gpu devcore dump to include this (and additional info) in the devcore dump. The motivation is tracking down an obscure

[Freedreno] [PATCH 1/3] iommu/io-pgtable-arm: Add way to debug pgtable walk

2021-09-22 Thread Rob Clark
From: Rob Clark Add an io-pgtable method to retrieve the raw PTEs that would be traversed for a given iova access. Signed-off-by: Rob Clark --- drivers/iommu/io-pgtable-arm.c | 40 +++--- include/linux/io-pgtable.h | 9 2 files changed, 41 insertions

[Freedreno] [PATCH 2/3] drm/msm: Show all smmu info for iova fault devcore dumps

2021-09-22 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 +- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 25 + drivers/gpu/drm/msm/msm_gpu.h | 2 +- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/drivers/gpu

[Freedreno] [PATCH 3/3] drm/msm: Extend gpu devcore dumps with pgtbl info

2021-09-22 Thread Rob Clark
From: Rob Clark In the case of iova fault triggered devcore dumps, include additional debug information based on what we think is the current page tables, including the TTBR0 value (which should match what we have in adreno_smmu_fault_info unless things have gone horribly wrong), and the

Re: [Freedreno] [PATCH v2 3/3] drm/bridge: ti-sn65dsi86: Add NO_CONNECTOR support

2021-09-23 Thread Rob Clark
On Wed, Sep 22, 2021 at 5:44 PM Laurent Pinchart wrote: > > Hi Rob, > > Thank you for the patch. > > On Mon, Sep 20, 2021 at 03:58:00PM -0700, Rob Clark wrote: > > From: Rob Clark > > > > Slightly awkward to fish out the display_info when we aren't creati

Re: [Freedreno] [PATCH 1/4] dma-buf: add dma_fence_describe and dma_resv_describe

2021-09-24 Thread Rob Clark
On Fri, Sep 24, 2021 at 12:18 AM Christian König wrote: > > Add functions to dump dma_fence and dma_resv objects into a seq_file and > use them for printing the debugfs informations. > > Signed-off-by: Christian König for the series, Reviewed-by: Rob Clark > --- > driv

[Freedreno] [PATCH] drm/msm: Fix crash on dev file close

2021-09-26 Thread Rob Clark
From: Rob Clark If the device file was opened prior to fw being available (such as from initrd before rootfs is mounted, when the initrd does not contain GPU fw), that would cause a later crash when the dev file is closed due to unitialized submitqueues list: CPU: 4 PID: 263 Comm: plymouthd

Re: [Freedreno] [PATCH] drm/msm: Fix crash on dev file close

2021-09-27 Thread Rob Clark
On Sun, Sep 26, 2021 at 12:36 PM Dmitry Baryshkov wrote: > > On Sun, 26 Sept 2021 at 22:01, Rob Clark wrote: > > > > From: Rob Clark > > > > If the device file was opened prior to fw being available (such as from > > initrd before rootfs is mounted, when th

[Freedreno] [PATCH] drm/msm: Switch ordering of runpm put vs devfreq_idle

2021-09-27 Thread Rob Clark
From: Rob Clark I've seen a few crashes like: Internal error: synchronous external abort: 9610 [#1] PREEMPT SMP Modules linked in: snd_seq_dummy snd_seq snd_seq_device bridge stp llc tun nf_nat_tftp nf_conntrack_tftp nf_nat_ftp nf_conntrack_ftp esp6 ah6 ip6t_REJECT ip6t_ipv6h

[Freedreno] [RFC] drm/msm/a6xx: Serialize GMU communication

2021-09-27 Thread Rob Clark
From: Rob Clark I've seen some crashes in our crash reporting that *look* like multiple threads stomping on each other while communicating with GMU. So wrap all those paths in a lock. Signed-off-by: Rob Clark --- Are we allowed to use c99/gnu99 yet? drivers/gpu/drm/msm/Mak

[Freedreno] [PATCH 1/2] drm/msm: Add hrtimer + kthread_work helper

2021-09-27 Thread Rob Clark
From: Rob Clark Before open-coding this a 2nd time, add a helper. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_atomic.c | 21 ++--- drivers/gpu/drm/msm/msm_drv.c| 29 + drivers/gpu/drm/msm/msm_drv.h| 22

[Freedreno] [PATCH 2/2] drm/msm/devfreq: Add 1ms delay before clamping freq

2021-09-27 Thread Rob Clark
From: Rob Clark Add a short delay before clamping to idle frequency on active->idle transition. It takes ~0.5ms to increase the freq again on the next idle->active transition, so this helps avoid extra freq transitions on workloads that bounce between CPU and GPU. Signed-off-by: Rob

Re: [Freedreno] [PATCH] drm/msm: Switch ordering of runpm put vs devfreq_idle

2021-09-28 Thread Rob Clark
On Tue, Sep 28, 2021 at 7:52 AM Akhil P Oommen wrote: > > On 9/27/2021 8:59 PM, Rob Clark wrote: > > From: Rob Clark > > > > I've seen a few crashes like: > > > > Internal error: synchronous external abort: 9610 [#1] PREEMPT SMP > >

[Freedreno] [PATCH] drm/msm/dpu: Remove some nonsense

2021-09-28 Thread Rob Clark
From: Rob Clark These aren't used. And if we add use for them later, we should probably do something a bit more structured than string parsing. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 6 -- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.

Re: [Freedreno] [PATCH v4 00/24] drm/bridge: Make panel and bridge probe order consistent

2021-09-29 Thread Rob Clark
> > important > > > > and I wasn't confortable doing them. > > > > > > > > > Hey Maxime, > > > Sorry for taking so long to get to this, but now that plumbers is > > > over I've had a chance to check it out on kirin > > > > &

[Freedreno] [PATCH] drm/msm/a6xx: Track current ctx by seqno

2021-09-30 Thread Rob Clark
From: Rob Clark In theory a context can be destroyed and a new one allocated at the same address, making the pointer comparision to detect when we don't need to update the current pagetables invalid. Instead assign a sequence number to each context on creation, and use this for the

Re: [Freedreno] [PATCH] drm/msm/a6xx: Track current ctx by seqno

2021-09-30 Thread Rob Clark
On Thu, Sep 30, 2021 at 11:34 AM Daniel Vetter wrote: > > On Thu, Sep 30, 2021 at 8:20 PM Rob Clark wrote: > > > > From: Rob Clark > > > > In theory a context can be destroyed and a new one allocated at the same > > address, making the pointer compari

[Freedreno] [PATCH 0/2] drm/msm: Un-break multi-context gl

2021-10-01 Thread Rob Clark
From: Rob Clark Userspace is expecting that a single thread doing rendering against multiple contexts does not need additional synchronization between those contexts beyond ensuring work is flushed to the kernel in the correct order. But if we have a sched-entity per-context, and are not using

[Freedreno] [PATCH 1/2] drm/msm: A bit more docs + cleanup

2021-10-01 Thread Rob Clark
From: Rob Clark msm_file_private is more gpu related, and in the next commit it will need access to other GPU specific #defines. While we're at it, add some comments. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_drv.h | 44 -- drivers/gpu/drm/msm/msm_

[Freedreno] [PATCH 2/2] drm/msm: One sched entity per process per priority

2021-10-01 Thread Rob Clark
From: Rob Clark Some userspace apps make assumptions that rendering against multiple contexts within the same process (from the same thread, with appropriate MakeCurrent() calls) provides sufficient synchronization without any external synchronization (ie. glFenceSync()/glWaitSync()). Since a

Re: [Freedreno] [PATCH v2 1/3] drm/msm/dsi: Support NO_CONNECTOR bridges

2021-10-01 Thread Rob Clark
On Fri, Oct 1, 2021 at 10:28 AM Dmitry Baryshkov wrote: > > On 21/09/2021 01:57, Rob Clark wrote: > > From: Rob Clark > > > > For now, since we have a mix of bridges which support this flag, which > > which do *not* support this flag, or work both ways, try it once

Re: [Freedreno] [RFC] drm/msm/a6xx: Serialize GMU communication

2021-10-01 Thread Rob Clark
On Fri, Oct 1, 2021 at 10:39 AM Dmitry Baryshkov wrote: > > On 27/09/2021 21:03, Rob Clark wrote: > > From: Rob Clark > > > > I've seen some crashes in our crash reporting that *look* like multiple > > threads stomping on each other while communicating with GMU

[Freedreno] [PATCH] drm/msm/a6xx: Serialize GMU communication

2021-10-01 Thread Rob Clark
From: Rob Clark I've seen some crashes in our crash reporting that *look* like multiple threads stomping on each other while communicating with GMU. So wrap all those paths in a lock. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 6 drivers/gpu/drm/msm/a

[Freedreno] [PATCH v2 0/3] io-pgtable-arm + drm/msm: Extend iova fault debugging

2021-10-05 Thread Rob Clark
From: Rob Clark This series extends io-pgtable-arm with a method to retrieve the page table entries traversed in the process of address translation, and then beefs up drm/msm gpu devcore dump to include this (and additional info) in the devcore dump. The motivation is tracking down an obscure

[Freedreno] [PATCH v2 1/3] iommu/io-pgtable-arm: Add way to debug pgtable walk

2021-10-05 Thread Rob Clark
From: Rob Clark Add an io-pgtable method to retrieve the raw PTEs that would be traversed for a given iova access. Signed-off-by: Rob Clark --- drivers/iommu/io-pgtable-arm.c | 40 +++--- include/linux/io-pgtable.h | 9 2 files changed, 41 insertions

[Freedreno] [PATCH v2 2/3] drm/msm: Show all smmu info for iova fault devcore dumps

2021-10-05 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 +- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 25 + drivers/gpu/drm/msm/msm_gpu.h | 2 +- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/drivers/gpu

[Freedreno] [PATCH v2 3/3] drm/msm: Extend gpu devcore dumps with pgtbl info

2021-10-05 Thread Rob Clark
From: Rob Clark In the case of iova fault triggered devcore dumps, include additional debug information based on what we think is the current page tables, including the TTBR0 value (which should match what we have in adreno_smmu_fault_info unless things have gone horribly wrong), and the

[Freedreno] [pull] drm/msm: drm-msm-fixes-2021-10-05 for v5.15-rc5

2021-10-05 Thread Rob Clark
non-DPU devices Kuogee Hsieh (1): drm/msm/dp: only signal audio when disconnected detected at dp_pm_resume Marek Vasut (1): drm/msm: Avoid potential overflow in timeout_to_jiffies() Marijn Suijten (1): drm/msm/dsi: dsi_phy_14nm: Take ready-bit into account in poll_for_ready

Re: [Freedreno] [pull] drm/msm: drm-msm-fixes-2021-10-05 for v5.15-rc5

2021-10-05 Thread Rob Clark
+ dri-devel, sorry hit 'send' too quickly On Tue, Oct 5, 2021 at 3:45 PM Rob Clark wrote: > > Hi Dave & Daniel, > > A few fixes for v5.15: > > * Fix a new crash on dev file close if the dev file was opened when > GPU is not loaded (such as missing

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

2021-10-12 Thread Rob Clark
ed with coccinelle: > > @@ > expression E; > @@ > - flush_workqueue(E); > destroy_workqueue(E); > > Signed-off-by: Christophe JAILLET For drm/msm: Reviewed-by: Rob Clark > --- > drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 1 - > drivers/gpu/drm/msm/dsi/dsi

Re: [Freedreno] [PATCH v4 00/24] drm/bridge: Make panel and bridge probe order consistent

2021-10-13 Thread Rob Clark
On Wed, Oct 13, 2021 at 7:16 AM Maxime Ripard wrote: > > Hi Caleb, > > On Thu, Sep 30, 2021 at 09:20:52PM +0100, Caleb Connolly wrote: > > Hi, > > > > On 30/09/2021 20:49, Amit Pundir wrote: > > > On Thu, 30 Sept 2021 at 04:50, Rob Clark wrote: > >

[Freedreno] [PATCH] drm/msm/devfreq: Restrict idle clamping to a618 for now

2021-10-18 Thread Rob Clark
From: Rob Clark Until we better understand the stability issues caused by frequent frequency changes, lets limit them to a618. Signed-off-by: Rob Clark --- Caleb/John, I think this should help as a workaround for the power instability issues on a630.. could you give it a try? drivers/gpu/drm

Re: [Freedreno] [PATCH v4 00/24] drm/bridge: Make panel and bridge probe order consistent

2021-10-18 Thread Rob Clark
On Mon, Oct 18, 2021 at 5:34 AM Maxime Ripard wrote: > > Hi Rob, > > On Wed, Oct 13, 2021 at 05:16:58PM -0700, Rob Clark wrote: > > On Wed, Oct 13, 2021 at 7:16 AM Maxime Ripard wrote: > > > > > > Hi Caleb, > > > > > > On Thu, Sep 30, 2021

[Freedreno] [pull] drm/msm: drm-msm-fixes-2021-10-18

2021-10-18 Thread Rob Clark
0700) ---- Rob Clark (1): drm/msm/devfreq: Restrict idle clamping to a618 for now drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 7 +++ drivers/gpu/drm/msm/msm_gpu.h | 4 drivers/gpu/drm/msm/msm_gpu_devfreq.c | 3 ++- 3 files changed, 13 insertions(+), 1 deletion(-)

Re: [Freedreno] [PATCH] drm/msm/devfreq: Restrict idle clamping to a618 for now

2021-10-18 Thread Rob Clark
On Mon, Oct 18, 2021 at 10:33 AM Caleb Connolly wrote: > > Hi all, > > On 18/10/2021 17:42, John Stultz wrote: > > On Mon, Oct 18, 2021 at 8:31 AM Rob Clark wrote: > >> > >> From: Rob Clark > >> > >> Until we better understand the stability

Re: [Freedreno] [PATCH v5 21/21] drm/msm/dsi: Adjust probe order

2021-10-21 Thread Rob Clark
On Thu, Oct 21, 2021 at 12:41 AM Maxime Ripard wrote: > > From: Rob Clark > > Switch to the documented order dsi-host vs bridge probe. > > Tested-by: Amit Pundir > Tested-by: Caleb Connolly > Tested-by: John Stultz > Signed-off-by: Rob Clark > Signed-off-by

[Freedreno] [PATCH 1/2] drm/msm/dpu: Remove impossible NULL check

2021-10-22 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c index e91568d4f09a..0ae397044310 100644 --- a/drivers/gpu/drm/msm

[Freedreno] [PATCH 2/2] drm/msm/dpu: Remove dynamic allocation from atomic context

2021-10-22 Thread Rob Clark
From: Rob Clark We know the upper bound on # of mixers (ie. two), so lets just allocate this on the stack. Fixes: BUG: sleeping function called from invalid context at include/linux/sched/mm.h:201 in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 0, name: swapper/0 INFO

Re: [Freedreno] [PATCH 2/2] drm/msm/dpu: Remove dynamic allocation from atomic context

2021-10-23 Thread Rob Clark
On Fri, Oct 22, 2021 at 12:15 PM Jessica Zhang wrote: > > On 10/22/2021 10:20 AM, Rob Clark wrote: > > From: Rob Clark > > > > We know the upper bound on # of mixers (ie. two), so lets just allocate > > this on the stack. > > > > Fixes: > > &g

[Freedreno] [PATCH v2 1/2] drm/msm/dpu: Remove impossible NULL check

2021-10-23 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark Reviewed-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c index e91568d4f09a..0ae397044310 100644

[Freedreno] [PATCH v2 2/2] drm/msm/dpu: Remove dynamic allocation from atomic context

2021-10-23 Thread Rob Clark
From: Rob Clark We know the upper bound on # of mixers (ie. two), so lets just allocate this on the stack. Fixes: BUG: sleeping function called from invalid context at include/linux/sched/mm.h:201 in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 0, name: swapper/0 INFO

Re: [Freedreno] MAINTAINERS: update designated reviewer entry for MSM DRM driver

2021-10-26 Thread Rob Clark
On Mon, Oct 25, 2021 at 4:35 PM Abhinav Kumar wrote: > > Adding myself as a designated reviewer to assist with the > code reviews for the changes coming into MSM DRM. > > Signed-off-by: Abhinav Kumar Acked-by: Rob Clark > --- > MAINTAINERS | 1 + > 1 file changed,

[Freedreno] [pull] drm/msm: drm-msm-next-2021-10-26

2021-10-26 Thread Rob Clark
rtc_get_vblank_counter to use vsync count. Nathan Chancellor (1): drm/msm/dpu: Remove commit and its uses in dpu_crtc_set_crc_source() Rikard Falkeborn (1): drm: msm: hdmi: Constify static structs Rob Clark (6): drm/msm/dsi: Support NO_CONNECTOR bridges drm/msm/dpu: Remov

[Freedreno] [PATCH 1/2] drm/msm/devfreq: Add some locking asserts

2021-11-03 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gpu_devfreq.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_gpu_devfreq.c b/drivers/gpu/drm/msm/msm_gpu_devfreq.c index 47b3cf2df230..b24e5475cafb 100644 --- a/drivers

[Freedreno] [PATCH 2/2] drm/msm/gpu: Respect PM QoS constraints

2021-11-03 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gpu_devfreq.c | 31 +-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gpu_devfreq.c b/drivers/gpu/drm/msm/msm_gpu_devfreq.c index b24e5475cafb..427c55002f4d

[Freedreno] [PATCH] drm/msm: Hangcheck timer fixes

2021-11-03 Thread Rob Clark
From: Rob Clark Cancel the timer when the GPU is idle, but also remember to restart it in the recover path if we've re-submitted submits following the one that hung. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gpu.c | 10 ++ 1 file changed, 10 insertions(+) diff --

[Freedreno] [PATCH] drm/msm/devfreq: Fix OPP refcnt leak

2021-11-04 Thread Rob Clark
From: Rob Clark Reported-by: Douglas Anderson Fixes: 9bc95570175a ("drm/msm: Devfreq tuning") Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gpu_devfreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gpu_devfreq.c b/drivers/g

[Freedreno] [PATCH v2] drm/msm/devfreq: Fix OPP refcnt leak

2021-11-05 Thread Rob Clark
From: Rob Clark Reported-by: Douglas Anderson Fixes: 9bc95570175a ("drm/msm: Devfreq tuning") Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gpu_devfreq.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/msm/msm_gpu_devfreq.c b/drivers/g

[Freedreno] [PATCH] iommu/arm-smmu-qcom: Fix TTBR0 read

2021-11-08 Thread Rob Clark
From: Rob Clark It is a 64b register, lets not lose the upper bits. Fixes: ab5df7b953d8 ("iommu/arm-smmu-qcom: Add an adreno-smmu-priv callback to get pagefault info") Signed-off-by: Rob Clark --- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 2 +- 1 file changed, 1 insertion(+),

[Freedreno] [PATCH] drm/msm: Do hw_init() before capturing GPU state

2021-11-08 Thread Rob Clark
From: Rob Clark In particular, we need to ensure all the necessary blocks are switched to 64b mode (a5xx+) otherwise the high bits of the address of the BO to snapshot state into will be ignored, resulting in: *** gpu fault: ttbr0= iova=00012000 dir=READ type

[Freedreno] [PATCH igt 0/3] msm: Add tests for gpu fault handling

2021-11-09 Thread Rob Clark
From: Rob Clark The first patch adds a easy way to write debugfs files (needed to disable hw fault detection, so we can test the sw timeout fallback). The second adds some helpers for cmdstream building. And the third adds the new tests. Rob Clark (3): lib/igt_debugfs: Add helper for writing

[Freedreno] [PATCH igt 2/3] msm: Add helper for cmdstream building and submission

2021-11-09 Thread Rob Clark
From: Rob Clark A pretty minimal subset compared to what a full gallium driver would need, but OTOH for igt tests we should only need to emit fairly basic command stream. Signed-off-by: Rob Clark --- lib/igt_msm.c | 102 ++ lib/igt_msm.h | 48

[Freedreno] [PATCH igt 1/3] lib/igt_debugfs: Add helper for writing debugfs files

2021-11-09 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- lib/igt_debugfs.c | 16 lib/igt_debugfs.h | 12 2 files changed, 28 insertions(+) diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c index a5bb95ca..39431068 100644 --- a/lib/igt_debugfs.c +++ b/lib/igt_debugfs.c

[Freedreno] [PATCH igt 3/3] msm: Add recovery tests

2021-11-09 Thread Rob Clark
From: Rob Clark Add tests to exercise: 1. sw hangcheck timeout 2. gpu fault (hang) recovery 3. iova fault recovery Signed-off-by: Rob Clark --- lib/igt_msm.h| 3 + tests/meson.build| 1 + tests/msm_recovery.c | 172 +++ 3 files changed

[Freedreno] [PATCH 0/5] drm/msm: Cleanup and drm/sched tdr prep

2021-11-09 Thread Rob Clark
From: Rob Clark This started out as conversion to using drm/sched to handle job timeout, recovery, and retire (and delete a bunch of code), but the latter part is on hold until drm/sched is fixed to properly handle job retire/ cleanup before deciding which job triggered the fault/timeout[1

[Freedreno] [PATCH 1/5] drm/msm: Remove unnecessary struct_mutex

2021-11-09 Thread Rob Clark
From: Rob Clark The struct_mutex locking is a remnant from the days before per-obj locks, and no longer needed. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_debugfs.c | 37 ++- drivers/gpu/drm/msm/msm_fbdev.c | 13 --- 2 files changed, 16

[Freedreno] [PATCH 2/5] drm/msm: Drop priv->lastctx

2021-11-09 Thread Rob Clark
From: Rob Clark cur_ctx_seqno already does the same thing, but handles the edge cases where a refcnt'd context can live after lastclose. So let's not have two ways to do the same thing. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a2xx_gpu.c | 3 +-- drivers/gpu/drm/

[Freedreno] [PATCH 3/5] drm/msm: Remove struct_mutex usage

2021-11-09 Thread Rob Clark
From: Rob Clark The remaining struct_mutex usage is just to serialize various gpu related things (submit/retire/recover/fault/etc), so replace struct_mutex with gpu->lock. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 4 ++-- drivers/gpu/drm/msm/adr

[Freedreno] [PATCH 4/5] drm/msm: Handle fence rollover

2021-11-09 Thread Rob Clark
From: Rob Clark Add some helpers for fence comparision, which handle rollover properly, and stop open coding fence seqno comparisions. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_fence.h | 12 drivers/gpu/drm/msm/msm_gpu.c | 6 +++--- drivers/gpu/drm/msm/msm_gpu.h

[Freedreno] [PATCH 5/5] drm/msm: Add debugfs to disable hw err handling

2021-11-09 Thread Rob Clark
From: Rob Clark Add a debugfs interface to ignore hw error irqs, in order to force fallback to sw hangcheck mechanism. Because the hw error detection is pretty good on newer gens, we need this for igt tests to test the sw hang detection. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm

Re: [Freedreno] [PATCH v4 07/13] drm/msm: Track "seqno" fences by idr

2021-11-10 Thread Rob Clark
On Wed, Nov 10, 2021 at 7:28 AM Akhil P Oommen wrote: > > On 7/28/2021 6:36 AM, Rob Clark wrote: > > From: Rob Clark > > > > Previously the (non-fd) fence returned from submit ioctl was a raw > > seqno, which is scoped to the ring. But from UABI standpoint, t

[Freedreno] [PATCH igt v2 0/3] msm: Add tests for gpu fault handling

2021-11-10 Thread Rob Clark
From: Rob Clark The first patch adds a easy way to write debugfs files (needed to disable hw fault detection, so we can test the sw timeout fallback). The second adds some helpers for cmdstream building. And the third adds the new tests. v2: Fix headerdoc comments in first patch Rob Clark (3

[Freedreno] [PATCH igt v2 1/3] lib/igt_debugfs: Add helper for writing debugfs files

2021-11-10 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark --- v2: Fix headerdoc comments lib/igt_debugfs.c | 17 + lib/igt_debugfs.h | 13 + 2 files changed, 30 insertions(+) diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c index a5bb95ca..dd6f2995 100644 --- a/lib/igt_debugfs.c

[Freedreno] [PATCH igt v2 2/3] msm: Add helper for cmdstream building and submission

2021-11-10 Thread Rob Clark
From: Rob Clark A pretty minimal subset compared to what a full gallium driver would need, but OTOH for igt tests we should only need to emit fairly basic command stream. Signed-off-by: Rob Clark --- lib/igt_msm.c | 102 ++ lib/igt_msm.h | 48

[Freedreno] [PATCH igt v2 3/3] msm: Add recovery tests

2021-11-10 Thread Rob Clark
From: Rob Clark Add tests to exercise: 1. sw hangcheck timeout 2. gpu fault (hang) recovery 3. iova fault recovery Signed-off-by: Rob Clark --- lib/igt_msm.h| 3 + tests/meson.build| 1 + tests/msm_recovery.c | 172 +++ 3 files changed

Re: [Freedreno] [PATCH igt v2 3/3] msm: Add recovery tests

2021-11-10 Thread Rob Clark
On Wed, Nov 10, 2021 at 10:37 AM Rob Clark wrote: > > From: Rob Clark > > Add tests to exercise: > > 1. sw hangcheck timeout > 2. gpu fault (hang) recovery > 3. iova fault recovery > > Signed-off-by: Rob Clark > --- > lib/igt_msm.h| 3 + >

Re: [Freedreno] [PATCH v4 07/13] drm/msm: Track "seqno" fences by idr

2021-11-11 Thread Rob Clark
On Thu, Nov 11, 2021 at 7:54 AM Akhil P Oommen wrote: > > On 11/10/2021 10:25 PM, Rob Clark wrote: > > On Wed, Nov 10, 2021 at 7:28 AM Akhil P Oommen > > wrote: > >> > >> On 7/28/2021 6:36 AM, Rob Clark wrote: > >>> From: Rob Clark > >>&

Re: [Freedreno] [PATCH igt v2 3/3] msm: Add recovery tests

2021-11-11 Thread Rob Clark
On Thu, Nov 11, 2021 at 4:13 AM Petri Latvala wrote: > > On Wed, Nov 10, 2021 at 11:00:41AM -0800, Rob Clark wrote: > > On Wed, Nov 10, 2021 at 10:37 AM Rob Clark wrote: > > > > > > From: Rob Clark > > > > > > Add tests to exercise: > > &g

[Freedreno] [PATCH 0/2] drm/msm: wait_fence fixes

2021-11-11 Thread Rob Clark
From: Rob Clark A couple of wait_fence related fixes. Rob Clark (2): drm/msm: Fix wait_fence submitqueue leak drm/msm: Restore error return on invalid fence drivers/gpu/drm/msm/msm_drv.c| 49 ++-- drivers/gpu/drm/msm/msm_gem_submit.c | 1 + drivers/gpu/drm

[Freedreno] [PATCH 1/2] drm/msm: Fix wait_fence submitqueue leak

2021-11-11 Thread Rob Clark
From: Rob Clark We weren't dropping the submitqueue reference in all paths. In particular, when the fence has already been signalled. Split out a helper to simplify handling this in the various different return paths. Fixes: a61acbbe9cf8 ("drm/msm: Track "seqno" fences by

[Freedreno] [PATCH 2/2] drm/msm: Restore error return on invalid fence

2021-11-11 Thread Rob Clark
From: Rob Clark When converting to use an idr to map userspace fence seqno values back to a dma_fence, we lost the error return when userspace passes seqno that is larger than the last submitted fence. Restore this check. Reported-by: Akhil P Oommen Fixes: a61acbbe9cf8 ("drm/msm: Track &

[Freedreno] [PATCH] drm/msm: Make a6xx_gpu_set_freq() static

2021-11-11 Thread Rob Clark
From: Rob Clark Reported-by: kernel test robot Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index 8a2af3a27e33..dcde5eff931d

[Freedreno] [PATCH] drm/msm: Demote debug message

2021-11-11 Thread Rob Clark
From: Rob Clark Mesa attempts to allocate a cached-coherent buffer in order to determine if cached-coherent is supported. Resulting in seeing this error message once per process with newer mesa. But no reason for this to be more than a debug msg. Signed-off-by: Rob Clark --- drivers/gpu/drm

Re: [Freedreno] [PATCH 2/2] drm/msm: Restore error return on invalid fence

2021-11-15 Thread Rob Clark
On Mon, Nov 15, 2021 at 6:43 AM Akhil P Oommen wrote: > > On 11/12/2021 12:54 AM, Rob Clark wrote: > > From: Rob Clark > > > > When converting to use an idr to map userspace fence seqno values back > > to a dma_fence, we lost the error return when userspace passes

[Freedreno] [PATCH] drm/msm/adreno: Name the shadow buffer

2021-11-15 Thread Rob Clark
From: Rob Clark This was the one GPU related kernel buffer which was not given a debug name. Let's fix that. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 2 ++ drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/gp

[Freedreno] [PATCH igt v3 0/4] msm: Add tests for gpu fault handling

2021-11-15 Thread Rob Clark
From: Rob Clark The first patch adds a easy way to write debugfs files (needed to disable hw fault detection, so we can test the sw timeout fallback). The second adds some helpers for cmdstream building. And the third adds the new tests. v2: Fix headerdoc comments in first patch v3: Add helper

[Freedreno] [PATCH igt v3 2/4] lib/igt_debugfs: Add helper for detecting debugfs files

2021-11-15 Thread Rob Clark
From: Rob Clark Add a helper that can be used with, for ex, igt_require() so that tests can be skipped if the kernel is too old. Signed-off-by: Rob Clark --- lib/igt_debugfs.c | 21 + lib/igt_debugfs.h | 1 + 2 files changed, 22 insertions(+) diff --git a/lib

[Freedreno] [PATCH igt v3 1/4] lib/igt_debugfs: Add helper for writing debugfs files

2021-11-15 Thread Rob Clark
From: Rob Clark Signed-off-by: Rob Clark Reviewed-by: Petri Latvala --- lib/igt_debugfs.c | 17 + lib/igt_debugfs.h | 13 + 2 files changed, 30 insertions(+) diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c index a5bb95ca..dd6f2995 100644 --- a/lib/igt_debugfs.c

[Freedreno] [PATCH igt v3 3/4] msm: Add helper for cmdstream building and submission

2021-11-15 Thread Rob Clark
From: Rob Clark A pretty minimal subset compared to what a full gallium driver would need, but OTOH for igt tests we should only need to emit fairly basic command stream. Signed-off-by: Rob Clark --- lib/igt_msm.c | 102 ++ lib/igt_msm.h | 48

[Freedreno] [PATCH igt v3 4/4] msm: Add recovery tests

2021-11-15 Thread Rob Clark
From: Rob Clark Add tests to exercise: 1. sw hangcheck timeout 2. gpu fault (hang) recovery 3. iova fault recovery Signed-off-by: Rob Clark --- lib/igt_msm.h| 3 + tests/meson.build| 1 + tests/msm_recovery.c | 174 +++ 3 files changed

Re: [Freedreno] [PATCH 11/11] drm/msm/dpu: rip out debugfs support from dpu_plane

2021-11-18 Thread Rob Clark
On Fri, Oct 22, 2021 at 4:35 AM Dmitry Baryshkov wrote: > > Hi, > > On Fri, 22 Oct 2021 at 02:53, wrote: > > > > On 2021-09-30 07:00, Dmitry Baryshkov wrote: > > > In preparations of virtualizing the dpu_plane rip out debugfs support > > > from dpu_plane (as it is mostly used to expose plane's pi

Re: [Freedreno] [PATCH igt v3 0/4] msm: Add tests for gpu fault handling

2021-11-19 Thread Rob Clark
On Fri, Nov 19, 2021 at 3:56 AM Petri Latvala wrote: > > On Mon, Nov 15, 2021 at 04:30:38PM -0800, Rob Clark wrote: > > From: Rob Clark > > > > The first patch adds a easy way to write debugfs files (needed to > > disable hw fault detection, so we can test the

[Freedreno] [PATCH 2/2] drm/msm/gpu: Respect PM QoS constraints

2021-11-19 Thread Rob Clark
From: Rob Clark Re-work the boost and idle clamping to use PM QoS requests instead, so they get aggreggated with other requests (such as cooling device). This does have the minor side-effect that devfreq sysfs min_freq/ max_freq files now reflect the boost and idle clamping, as they show

[Freedreno] [PATCH 1/2] drm/msm/gpu: Fix idle_work time

2021-11-19 Thread Rob Clark
From: Rob Clark This was supposed to be a relative timer, not absolute. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_gpu_devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_gpu_devfreq.c b/drivers/gpu/drm/msm/msm_gpu_devfreq.c index

Re: [Freedreno] [PATCH 1/2] drm/msm/gpu: Fix idle_work time

2021-11-19 Thread Rob Clark
On Fri, Nov 19, 2021 at 2:46 PM Rob Clark wrote: > > From: Rob Clark > > This was supposed to be a relative timer, not absolute. > Fixes: 658f4c829688 ("drm/msm/devfreq: Add 1ms delay before clamping freq") > Signed-off-by: Rob Clark > --- > drivers/gpu/drm

Re: [Freedreno] [PATCH 2/2] drm/msm/gpu: Respect PM QoS constraints

2021-11-20 Thread Rob Clark
On Fri, Nov 19, 2021 at 4:21 PM Doug Anderson wrote: > > Hi, > > On Fri, Nov 19, 2021 at 2:47 PM Rob Clark wrote: > > > > +void msm_devfreq_boost(struct msm_gpu *gpu, unsigned factor) > > +{ > > + struct msm_gpu_devfreq *df = &gpu-

[Freedreno] [PATCH v2 1/3] drm/msm/gpu: Fix idle_work time

2021-11-20 Thread Rob Clark
From: Rob Clark This was supposed to be a relative timer, not absolute. Fixes: 658f4c829688 ("drm/msm/devfreq: Add 1ms delay before clamping freq") Signed-off-by: Rob Clark Reviewed-by: Douglas Anderson --- drivers/gpu/drm/msm/msm_gpu_devfreq.c | 2 +- 1 file changed, 1 inser

[Freedreno] [PATCH v2 2/3] drm/msm/gpu: Fix check for devices without devfreq

2021-11-20 Thread Rob Clark
From: Rob Clark Looks like 658f4c829688 ("drm/msm/devfreq: Add 1ms delay before clamping freq") was badly rebased on top of efb8a170a367 ("drm/msm: Fix devfreq NULL pointer dereference on a3xx") and ended up with the NULL check in the wrong place. Fixes: 658f4c829688 ("

[Freedreno] [PATCH v2 3/3] drm/msm/gpu: Respect PM QoS constraints

2021-11-20 Thread Rob Clark
From: Rob Clark Re-work the boost and idle clamping to use PM QoS requests instead, so they get aggreggated with other requests (such as cooling device). This does have the minor side-effect that devfreq sysfs min_freq/ max_freq files now reflect the boost and idle clamping, as they show

Re: [Freedreno] [PATCH 4/4] drm/msm/a6xx: Capture gmu log in devcoredump

2021-11-22 Thread Rob Clark
On Thu, Nov 18, 2021 at 2:21 AM Akhil P Oommen wrote: > > Capture gmu log in coredump to enhance debugging. > > Signed-off-by: Akhil P Oommen > --- > > drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 41 > + > drivers/gpu/drm/msm/adreno/adreno_gpu.c | 2 +- > driv

<    1   2   3   4   5   6   7   8   9   10   >