Re: [Intel-gfx] [PATCH][next] treewide: uapi: Replace zero-length arrays with flexible-array members

2022-06-28 Thread Geert Uytterhoeven
Hi Gustavo,

Thanks for your patch!

On Mon, Jun 27, 2022 at 8:04 PM Gustavo A. R. Silva
 wrote:
> There is a regular need in the kernel to provide a way to declare
> having a dynamically sized set of trailing elements in a structure.
> Kernel code should always use “flexible array members”[1] for these
> cases. The older style of one-element or zero-length arrays should
> no longer be used[2].

These rules apply to the kernel, but uapi is not considered part of the
kernel, so different rules apply.  Uapi header files should work with
whatever compiler that can be used for compiling userspace.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: ttm for stolen (rev5)

2022-06-28 Thread Tvrtko Ursulin



On 27/06/2022 18:08, Robert Beckett wrote:



On 22/06/2022 10:05, Tvrtko Ursulin wrote:


On 21/06/2022 20:11, Robert Beckett wrote:



On 21/06/2022 18:37, Patchwork wrote:

*Patch Details*
*Series:*    drm/i915: ttm for stolen (rev5)
*URL:*    https://patchwork.freedesktop.org/series/101396/ 


*State:*    failure
*Details:* 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_101396v5/index.html 
 




  CI Bug Log - changes from CI_DRM_11790 -> Patchwork_101396v5


    Summary

*FAILURE*

Serious unknown changes coming with Patchwork_101396v5 absolutely 
need to be

verified manually.

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_101396v5, please notify your bug team to 
allow them
to document this new failure mode, which will reduce false positives 
in CI.


External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_101396v5/index.html



    Participating hosts (40 -> 41)

Additional (2): fi-icl-u2 bat-dg2-9
Missing (1): fi-bdw-samus


    Possible new issues

Here are the unknown changes that may have been introduced in 
Patchwork_101396v5:



  IGT changes


    Possible regressions

  * igt@i915_selftest@live@reset:
  o bat-adlp-4: PASS
 


    -> DMESG-FAIL
 





I keep hitting clobbered pages during engine resets on bat-adlp-4.
It seems to happen most of the time on that machine and occasionally 
on bat-adlp-6.


Should bat-adlp-4 be considered an unreliable machine like bat-adlp-6 
is for now?


Alternatively, seeing the history of this in

commit 3da3c5c1c9825c24168f27b021339e90af37e969 "drm/i915: Exclude 
low pages (128KiB) of stolen from use"


could this be an indication that maybe the original issue is worse on 
adlp machines?
I have only ever seen page page 135 or 136 clobbered across many runs 
via trybot, so it looks fairly consistent.

Though excluding the use of over 540K of stolen might be too severe.


Don't know but I see that on the latest version you even hit pages 
165/166.


Any history of hitting this in CI without your series? If not, are 
there some other changes which could explain it? Are you touching the 
selftest itself?


Hexdump of the clobbered page looks quite complex. Especially 
POISON_FREE. Any idea how that ends up there?



(see 
https://intel-gfx-ci.01.org/tree/drm-tip/Trybot_105517v4/fi-rkl-guc/igt@i915_selftest@l...@reset.html#dmesg-warnings702) 



after lots of slow debug via CI, it looks like the issue is that a ring 
buffer was allocated and taking up that page during the initial crc 
capture in the test, but by the time it came to check for corruption, it 
had been freed from that page.


The test has a number of weaknesses:

1. the busy check is done twice, without taking in to account any change 
in between. I assume previously this could be relied on never to occur, 
but now it can for some reason (more on that later)


You mean the stolen page used/unused test? Probably the premise is that 
the test controls the driver completely ie. is the sole user and the two 
checks are run at the time where nothing else could have changed the state.


With the nerfed request (as with GuC) this actually should hold. In the 
generic case I am less sure, my working knowledge faded a bit, but 
perhaps there was something guaranteeing the spinner couldn't have been 
retired yet at the time of the second check. Would need clarifying at 
least in comments.


2. the engine reset returns early with an error for guc submission 
engines, but it is silently ignored in the test. Perhaps it should 
ignore guc submission engines as it is a largely useless test for those 
situations.


Yes looks dodgy indeed. You will need to summon the owners of the GuC 
backend to comment on this.


However even if the test should be skipped with GuC it is extremely 
interesting that you are hitting this so I suspect there is a more 
serious issue at play.


A quick obvious fix is to have a busy bitmask that remembers each page's 
busy state initially and only check for corruption if it was busy during 
both checks.


However, the main question is why this is occurring now with my changes.
I have added more debug to check where the stolen memory is being freed, 
but the first run last night didn't hit the issue for once.
I am running again now, will report back if I figure out where it is 
being freed.


I am pretty sure the "corruption" (which isn't actually corruption) is 
from a ring buffer.
The POISON_FREE is the only difference between the captured before and 
after dumps:


[0040]  0280 6b6b6b6b 6b6b6b6b 6b6b6b6b 6b6b6b6b 6b6b6b6b 
6b6b6b6b


with the 2nd dword being the MI_ARB_

Re: [Intel-gfx] [PATCH v3 3/3] drm/doc/rfc: VM_BIND uapi definition

2022-06-28 Thread Tvrtko Ursulin



On 27/06/2022 19:58, Zeng, Oak wrote:



Thanks,
Oak


-Original Message-
From: Tvrtko Ursulin 
Sent: June 27, 2022 4:30 AM
To: Zeng, Oak ; Landwerlin, Lionel G
; Vishwanathapura, Niranjana

Cc: Zanoni, Paulo R ; intel-
g...@lists.freedesktop.org; dri-de...@lists.freedesktop.org; Hellstrom,
Thomas ; Wilson, Chris P
; Vetter, Daniel ;
christian.koe...@amd.com; Auld, Matthew 
Subject: Re: [Intel-gfx] [PATCH v3 3/3] drm/doc/rfc: VM_BIND uapi definition


On 24/06/2022 21:23, Zeng, Oak wrote:

Let's compare "tlb invalidate at vm unbind" vs "tlb invalidate at backing

storage":


Correctness:
consider this sequence of:
1. unbind va1 from pa1,
2. then bind va1 to pa2. //user space has the freedom to do this as it
manages virtual address space 3. Submit shader code using va1, 4. Then
retire pa1.

If you don't perform tlb invalidate at step #1, in step #3, shader will use

stale entries in tlb and pa1 will be used for the shader. User want to use pa2.
So I don't think invalidate tlb at step #4 make correctness.

Define step 3. Is it a new execbuf? If so then there will be a TLB flush there.
Unless the plan is to stop doing that with eb3 but I haven't picked up on that
anywhere so far.


In Niranjana's latest patch series, he removed the TLB flushing from vm_unbind. 
He also said explicitly TLB invalidation will be performed at job submission 
and backing storage releasing time, which is the existing behavior of the 
current i915 driver.

I think if we invalidate TLB on each vm_unbind, then we don't need to 
invalidate at submission and backing storage releasing. It doesn't make a lot 
of sense to me to perform a tlb invalidation at execbuf time. Maybe it is a 
behavior for the old implicit binding programming model. For vm_bind and eb3, 
we separate the binding and job submission into two APIs. It is more natural 
the TLB invalidation be coupled with the vm bind/unbind, not job submission. So 
in my opinion we should remove tlb invalidation from submission and backing 
storage releasing and add it to vm unbind. This is method is cleaner to me.


You can propose this model (not flushing in eb3) but I have my doubts. 
Consider the pointlessness of flushing on N unbinds for 99% of clients 
which are not infinite compute batch. And consider how you make the 
behaviour consistent on all platforms (selective vs global tlb flush).


Also note that this discussion is orthogonal to unbind vs backing store 
release.



Regarding performance, we don't have data. In my opinion, we should make things 
work in a most straight forward way as the first step. Then consider 
performance improvement if necessary. Consider some delayed tlb invalidation at 
submission and backing release time without performance data support wasn't a 
good decision.


It is quite straightforward though. ;) It aligns with the eb2 model and 
argument can be made backing store release is (much) less frequent than 
unbind (consider softpin where client could trigger a lot of pointless 
flushes).


Regards,

Tvrtko


Re: [Intel-gfx] [PATCH] drm/i915/gt: handle null ptr at sg traversing

2022-06-28 Thread Matthew Auld

On 27/06/2022 18:35, Ramalingam C wrote:

When calculating the starting address for ccs data in smem scatterlist,
handle the NULL pointer returned from sg_next, incase of scatterlist
less than required size..


Do we have some more information on how we can hit this? Is this a 
programmer error? Do we have a testcase?




Signed-off-by: Ramalingam C 
---
  drivers/gpu/drm/i915/gt/intel_migrate.c | 13 ++---
  1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c 
b/drivers/gpu/drm/i915/gt/intel_migrate.c
index 2c35324b5f68..c206fb4f4186 100644
--- a/drivers/gpu/drm/i915/gt/intel_migrate.c
+++ b/drivers/gpu/drm/i915/gt/intel_migrate.c
@@ -669,7 +669,7 @@ calculate_chunk_sz(struct drm_i915_private *i915, bool 
src_is_lmem,
}
  }
  
-static void get_ccs_sg_sgt(struct sgt_dma *it, u32 bytes_to_cpy)

+static int get_ccs_sg_sgt(struct sgt_dma *it, u32 bytes_to_cpy)
  {
u32 len;
  
@@ -684,9 +684,13 @@ static void get_ccs_sg_sgt(struct sgt_dma *it, u32 bytes_to_cpy)

bytes_to_cpy -= len;
  
  		it->sg = __sg_next(it->sg);

+   if (!it->sg)
+   return -EINVAL;
it->dma = sg_dma_address(it->sg);
it->max = it->dma + sg_dma_len(it->sg);
} while (bytes_to_cpy);
+
+   return 0;
  }
  
  int

@@ -745,8 +749,11 @@ intel_context_migrate_copy(struct intel_context *ce,
 * Need to fix it.
 */
ccs_bytes_to_cpy = src_sz != dst_sz ? GET_CCS_BYTES(i915, 
bytes_to_cpy) : 0;
-   if (ccs_bytes_to_cpy)
-   get_ccs_sg_sgt(&it_ccs, bytes_to_cpy);
+   if (ccs_bytes_to_cpy) {
+   err = get_ccs_sg_sgt(&it_ccs, bytes_to_cpy);
+   if (err)
+   return err;
+   }
}
  
  	src_offset = 0;


Re: [Intel-gfx] [PATCH] drm/i915/gt: handle null ptr at sg traversing

2022-06-28 Thread Ramalingam C
On 2022-06-28 at 10:40:56 +0100, Matthew Auld wrote:
> On 27/06/2022 18:35, Ramalingam C wrote:
> > When calculating the starting address for ccs data in smem scatterlist,
> > handle the NULL pointer returned from sg_next, incase of scatterlist
> > less than required size..
> 
> Do we have some more information on how we can hit this? Is this a
> programmer error? Do we have a testcase?
Typically We will never get NULL at this point, as we allocate the smem
of sz equal to lmem obj size + requiured ccs size. So we will never run
into NULL when we traverse the sg for the size of lmem in smem's sg.

IF there is NULL returned in this scenario we could report BUG_ON or let
it NPD or return the error code.

But either way couldn't think of a scenario when this will hit. after
thinking further seems to be leaving the NPD itself sufficient as other
error handling also not doing good job at it. Please share your thoughts

Ram
> 
> > 
> > Signed-off-by: Ramalingam C 
> > ---
> >   drivers/gpu/drm/i915/gt/intel_migrate.c | 13 ++---
> >   1 file changed, 10 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c 
> > b/drivers/gpu/drm/i915/gt/intel_migrate.c
> > index 2c35324b5f68..c206fb4f4186 100644
> > --- a/drivers/gpu/drm/i915/gt/intel_migrate.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_migrate.c
> > @@ -669,7 +669,7 @@ calculate_chunk_sz(struct drm_i915_private *i915, bool 
> > src_is_lmem,
> > }
> >   }
> > -static void get_ccs_sg_sgt(struct sgt_dma *it, u32 bytes_to_cpy)
> > +static int get_ccs_sg_sgt(struct sgt_dma *it, u32 bytes_to_cpy)
> >   {
> > u32 len;
> > @@ -684,9 +684,13 @@ static void get_ccs_sg_sgt(struct sgt_dma *it, u32 
> > bytes_to_cpy)
> > bytes_to_cpy -= len;
> > it->sg = __sg_next(it->sg);
> > +   if (!it->sg)
> > +   return -EINVAL;
> > it->dma = sg_dma_address(it->sg);
> > it->max = it->dma + sg_dma_len(it->sg);
> > } while (bytes_to_cpy);
> > +
> > +   return 0;
> >   }
> >   int
> > @@ -745,8 +749,11 @@ intel_context_migrate_copy(struct intel_context *ce,
> >  * Need to fix it.
> >  */
> > ccs_bytes_to_cpy = src_sz != dst_sz ? GET_CCS_BYTES(i915, 
> > bytes_to_cpy) : 0;
> > -   if (ccs_bytes_to_cpy)
> > -   get_ccs_sg_sgt(&it_ccs, bytes_to_cpy);
> > +   if (ccs_bytes_to_cpy) {
> > +   err = get_ccs_sg_sgt(&it_ccs, bytes_to_cpy);
> > +   if (err)
> > +   return err;
> > +   }
> > }
> > src_offset = 0;


Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 1/3] tests/i915/gem_eio: fix uaf

2022-06-28 Thread Das, Nirmoy

The series is Reviewed-by: Nirmoy Das 

On 6/27/2022 6:10 PM, Matthew Auld wrote:

../tests/i915/gem_eio.c:277:20: warning: pointer ‘ctx’ used after ‘free’ 
[-Wuse-after-free]
   277 | igt_assert(igt_sysfs_printf(ctx->debugfs, "i915_drop_caches",
../lib/igt_core.h:667:20: note: in definition of macro ‘igt_assert’
   667 | do { if (!(expr)) \
   |^~~~
../tests/i915/gem_eio.c:274:9: note: call to ‘free’ here
   274 | free(ctx);

Signed-off-by: Matthew Auld 
Cc: Gwan-gyeong Mun 
---
  tests/i915/gem_eio.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
index 913a21f9..6cbae6eb 100644
--- a/tests/i915/gem_eio.c
+++ b/tests/i915/gem_eio.c
@@ -270,11 +270,11 @@ static void hang_handler(union sigval arg)
  igt_nsec_elapsed(&ctx->delay) / 1000.0);
  
  	igt_assert_eq(timer_delete(ctx->timer), 0);

-   free(ctx);
  
  	/* flush any excess work before we start timing our reset */

igt_assert(igt_sysfs_printf(ctx->debugfs, "i915_drop_caches",
"%d", DROP_RCU));
+   free(ctx);
  
  	igt_nsec_elapsed(ts);

igt_assert(igt_sysfs_printf(dir, "i915_wedged", "%llu", -1ull));


Re: [Intel-gfx] [PATCH i-g-t 1/3] tests/i915/gem_eio: fix uaf

2022-06-28 Thread Gwan-gyeong Mun

Looks good to me.

Reviewed-by: Gwan-gyeong Mun 

However, the use after free build issue did not occur only with the "$ 
meson build && ninja -C build" build command guided by the igt 
README.md. How did you check it?


Br,

G.G.


On 6/27/22 7:10 PM, Matthew Auld wrote:

../tests/i915/gem_eio.c:277:20: warning: pointer ‘ctx’ used after ‘free’ 
[-Wuse-after-free]
   277 | igt_assert(igt_sysfs_printf(ctx->debugfs, "i915_drop_caches",
../lib/igt_core.h:667:20: note: in definition of macro ‘igt_assert’
   667 | do { if (!(expr)) \
   |^~~~
../tests/i915/gem_eio.c:274:9: note: call to ‘free’ here
   274 | free(ctx);

Signed-off-by: Matthew Auld 
Cc: Gwan-gyeong Mun 
---
  tests/i915/gem_eio.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
index 913a21f9..6cbae6eb 100644
--- a/tests/i915/gem_eio.c
+++ b/tests/i915/gem_eio.c
@@ -270,11 +270,11 @@ static void hang_handler(union sigval arg)
  igt_nsec_elapsed(&ctx->delay) / 1000.0);
  
  	igt_assert_eq(timer_delete(ctx->timer), 0);

-   free(ctx);
  
  	/* flush any excess work before we start timing our reset */

igt_assert(igt_sysfs_printf(ctx->debugfs, "i915_drop_caches",
"%d", DROP_RCU));
+   free(ctx);
  
  	igt_nsec_elapsed(ts);

igt_assert(igt_sysfs_printf(dir, "i915_wedged", "%llu", -1ull));



Re: [Intel-gfx] [PATCH] drm/i915: Fix error code in icl_compute_combo_phy_dpll()

2022-06-28 Thread Ville Syrjälä
On Fri, Jun 24, 2022 at 12:55:52PM +, Souza, Jose wrote:
> On Fri, 2022-06-24 at 09:39 +0300, Dan Carpenter wrote:
> > This function is supposed to return zero or negative error codes but it
> > accidentally returns true on failure.
> 
> Reviewed-by: José Roberto de Souza 

Thanks for the patch and review. Pushed to drm-intel-next.

> 
> > 
> > Fixes: 92a020747d6c ("drm/i915: Split shared dpll .get_dplls() into compute 
> > and get phases")
> > Signed-off-by: Dan Carpenter 
> > ---
> >  drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c 
> > b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> > index ddae7e42ac46..118598c9a809 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> > @@ -3184,7 +3184,7 @@ static int icl_compute_combo_phy_dpll(struct 
> > intel_atomic_state *state,
> > struct icl_port_dpll *port_dpll =
> > &crtc_state->icl_port_dplls[ICL_PORT_DPLL_DEFAULT];
> > struct skl_wrpll_params pll_params = {};
> > -   bool ret;
> > +   int ret;
> >  
> > if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI) ||
> > intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DSI))
> 

-- 
Ville Syrjälä
Intel


[Intel-gfx] [PATCH i-g-t] tests/i915/kms_big_fb: trigger async flip with a dummy flip

2022-06-28 Thread Arun R Murthy
In oder to trigger the async flip, a dummy flip is required after sync
flip so as to update the watermarks for async in KMD which happens as
part of this dummy flip. Thereafter async memory update will act as a
trigger register.
Capturing the CRC is done after the async flip as async flip at some
times can consume fairly a vblank period time.

Signed-off-by: Arun R Murthy 
---
 tests/i915/kms_big_fb.c | 29 +++--
 1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/tests/i915/kms_big_fb.c b/tests/i915/kms_big_fb.c
index d50fde45..6caf3c31 100644
--- a/tests/i915/kms_big_fb.c
+++ b/tests/i915/kms_big_fb.c
@@ -465,7 +465,7 @@ static bool test_pipe(data_t *data)
 static bool
 max_hw_stride_async_flip_test(data_t *data)
 {
-   uint32_t ret, startframe;
+   uint32_t ret, frame;
const uint32_t w = data->output->config.default_mode.hdisplay,
   h = data->output->config.default_mode.vdisplay;
igt_plane_t *primary;
@@ -519,7 +519,19 @@ max_hw_stride_async_flip_test(data_t *data)
  DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
 
igt_wait_for_vblank(data->drm_fd, 
data->display.pipes[primary->pipe->pipe].crtc_offset);
-   startframe = kmstest_get_vblank(data->drm_fd, data->pipe, 0) + 
1;
+   /*
+* In older platforms (<= Gen10), async address update bit is 
double buffered.
+* So flip timestamp can be verified only from the second flip.
+* The first async flip just enables the async address update.
+* In platforms greater than DISPLAY13 the first async flip 
will be discarded
+* in order to change the watermark levels as per the 
optimization. Hence the
+* subsequent async flips will actually do the asynchronous 
flips.
+*/
+   ret = drmModePageFlip(data->drm_fd, 
data->output->config.crtc->crtc_id,
+ 
data->big_fb_flip[i].fb_id,
+ DRM_MODE_PAGE_FLIP_ASYNC, 
NULL);
+   igt_wait_for_vblank(data->drm_fd, 
data->display.pipes[primary->pipe->pipe].crtc_offset);
+   frame = kmstest_get_vblank(data->drm_fd, data->pipe, 0) + 1;
 
for (int j = 0; j < 2; j++) {
do {
@@ -528,23 +540,20 @@ max_hw_stride_async_flip_test(data_t *data)
  DRM_MODE_PAGE_FLIP_ASYNC, 
NULL);
} while (ret == -EBUSY);
igt_assert(ret == 0);
+   igt_pipe_crc_get_for_frame(data->drm_fd, data->pipe_crc,
+  frame, &compare_crc);
 
+   frame = kmstest_get_vblank(data->drm_fd, data->pipe, 0) 
+ 1;
do {
ret = drmModePageFlip(data->drm_fd, 
data->output->config.crtc->crtc_id,
  data->big_fb.fb_id,
  DRM_MODE_PAGE_FLIP_ASYNC, 
NULL);
} while (ret == -EBUSY);
igt_assert(ret == 0);
+   igt_pipe_crc_get_for_frame(data->drm_fd, data->pipe_crc,
+  frame, &async_crc);
}
 
-   igt_pipe_crc_get_for_frame(data->drm_fd, data->pipe_crc,
-  startframe, &compare_crc);
-   igt_pipe_crc_get_for_frame(data->drm_fd, data->pipe_crc,
-  startframe + 1, &async_crc);
-
-   igt_assert_f(kmstest_get_vblank(data->drm_fd, data->pipe, 0) -
-startframe == 1, "lost frames\n");
-
igt_assert_f(igt_check_crc_equal(&compare_crc, 
&async_crc)^(i^1),
 "CRC failure with async flip, crc %s match for 
checked round\n",
 i?"should":"shouldn't");
-- 
2.25.1



Re: [Intel-gfx] [PATCH] drm/fourcc: Document the Intel CCS modifiers' CC plane expected pitch

2022-06-28 Thread Imre Deak
On Sat, Jun 25, 2022 at 12:38:50AM +0300, Chery, Nanley G wrote:
> +Jordan (FYI)
> 
> I think the commit message has an extra "color" next to "CC".

IIUC, i915 calls all the planes contained in a framebuffer "color
planes" for consistency (so main-, aux-, CC color planes).

> With or without that dropped,
> 
> Reviewed-by: Nanley Chery 

The patch is pushed to drm-misc-next, thanks for the reviews.

--Imre

> Thanks for the fix.
> 
> > -Original Message-
> > From: Deak, Imre 
> > Sent: Thursday, June 23, 2022 10:50 AM
> > To: dri-de...@lists.freedesktop.org
> > Cc: intel-gfx@lists.freedesktop.org; Chery, Nanley G 
> > 
> > Subject: [PATCH] drm/fourcc: Document the Intel CCS modifiers' CC plane 
> > expected pitch
> >
> > The driver expects the pitch of the Intel CCS CC color planes to be
> > 64 bytes aligned, adjust the modifier descriptions accordingly.
> >
> > Cc: Nanley Chery 
> > Signed-off-by: Imre Deak 
> > ---
> >  include/uapi/drm/drm_fourcc.h | 8 
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
> > index f1972154a5940..c1b4cfda75075 100644
> > --- a/include/uapi/drm/drm_fourcc.h
> > +++ b/include/uapi/drm/drm_fourcc.h
> > @@ -559,7 +559,7 @@ extern "C" {
> >   *
> >   * The main surface is Y-tiled and is at plane index 0 whereas CCS is 
> > linear
> >   * and at index 1. The clear color is stored at index 2, and the pitch 
> > should
> > - * be ignored. The clear color structure is 256 bits. The first 128 bits
> > + * be 64 bytes aligned. The clear color structure is 256 bits. The first 
> > 128 bits
> >   * represents Raw Clear Color Red, Green, Blue and Alpha color each 
> > represented
> >   * by 32 bits. The raw clear color is consumed by the 3d engine and 
> > generates
> >   * the converted clear color of size 64 bits. The first 32 bits store the 
> > Lower
> > @@ -612,9 +612,9 @@ extern "C" {
> >   * outside of the GEM object in a reserved memory area dedicated for the
> >   * storage of the CCS data for all RC/RC_CC/MC compressible GEM objects. 
> > The
> >   * main surface pitch is required to be a multiple of four Tile 4 widths. 
> > The
> > - * clear color is stored at plane index 1 and the pitch should be ignored. 
> > The
> > - * format of the 256 bits of clear color data matches the one used for the
> > - * I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC modifier, see its description
> > + * clear color is stored at plane index 1 and the pitch should be 64 bytes
> > + * aligned. The format of the 256 bits of clear color data matches the one 
> > used
> > + * for the I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC modifier, see its 
> > description
> >   * for details.
> >   */
> >  #define I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC fourcc_mod_code(INTEL, 12)
> > --
> > 2.30.2
> 


Re: [Intel-gfx] [PATCH i-g-t 2/3] tests/i915/kms_mmap_write_crc: handle missing gem_get_caching()

2022-06-28 Thread Gwan-gyeong Mun

Looks good to me.

Reviewed-by: Gwan-gyeong Mun 

On 6/27/22 7:10 PM, Matthew Auld wrote:

The kernel is meant to force the caching level for the object to
CACHE_NONE or CACHE_WT when first scanning out the object, since the
display engine is not coherent (assuming userspace hasn't already done
this). On discrete we no longer support set/get_caching, but we can only
do the scanout from lmem, which can only be mapped as WC and so should
always be coherent for scanout. Adjust the test and ensure it still
passes as expected.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5303
Signed-off-by: Matthew Auld 
Cc: Gwan-gyeong Mun 
---
  tests/i915/kms_mmap_write_crc.c | 11 +++
  1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/tests/i915/kms_mmap_write_crc.c b/tests/i915/kms_mmap_write_crc.c
index b17e5fdb..da7312d6 100644
--- a/tests/i915/kms_mmap_write_crc.c
+++ b/tests/i915/kms_mmap_write_crc.c
@@ -78,7 +78,6 @@ static void test(data_t *data)
drmModeModeInfo *mode;
cairo_t *cr;
char *ptr;
-   uint32_t caching;
void *buf;
igt_crc_t crc;
  
@@ -102,9 +101,13 @@ static void test(data_t *data)

igt_plane_set_fb(data->primary, &data->fb[0]);
igt_display_commit(display);
  
-	/* make sure caching mode has become UC/WT */

-   caching = gem_get_caching(data->drm_fd, fb->gem_handle);
-   igt_assert(caching == I915_CACHING_NONE || caching == 
I915_CACHING_DISPLAY);
+   if (!gem_has_lmem(data->drm_fd)) {
+   uint32_t caching;
+
+   /* make sure caching mode has become UC/WT */
+   caching = gem_get_caching(data->drm_fd, fb->gem_handle);
+   igt_assert(caching == I915_CACHING_NONE || caching == 
I915_CACHING_DISPLAY);
+   }
  
  	/*

 * firstly demonstrate the need for DMA_BUF_SYNC_START 
("begin_cpu_access")



Re: [Intel-gfx] [PATCH i-g-t 1/3] tests/i915/gem_eio: fix uaf

2022-06-28 Thread Matthew Auld

On 28/06/2022 11:24, Gwan-gyeong Mun wrote:

Looks good to me.

Reviewed-by: Gwan-gyeong Mun 

However, the use after free build issue did not occur only with the "$ 
meson build && ninja -C build" build command guided by the igt 
README.md. How did you check it?


Hmm, I assume it's just a difference in compiler version or so. I have: 
gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1).




Br,

G.G.


On 6/27/22 7:10 PM, Matthew Auld wrote:
../tests/i915/gem_eio.c:277:20: warning: pointer ‘ctx’ used after 
‘free’ [-Wuse-after-free]
   277 | igt_assert(igt_sysfs_printf(ctx->debugfs, 
"i915_drop_caches",

../lib/igt_core.h:667:20: note: in definition of macro ‘igt_assert’
   667 | do { if (!(expr)) \
   |    ^~~~
../tests/i915/gem_eio.c:274:9: note: call to ‘free’ here
   274 | free(ctx);

Signed-off-by: Matthew Auld 
Cc: Gwan-gyeong Mun 
---
  tests/i915/gem_eio.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
index 913a21f9..6cbae6eb 100644
--- a/tests/i915/gem_eio.c
+++ b/tests/i915/gem_eio.c
@@ -270,11 +270,11 @@ static void hang_handler(union sigval arg)
    igt_nsec_elapsed(&ctx->delay) / 1000.0);
  igt_assert_eq(timer_delete(ctx->timer), 0);
-    free(ctx);
  /* flush any excess work before we start timing our reset */
  igt_assert(igt_sysfs_printf(ctx->debugfs, "i915_drop_caches",
  "%d", DROP_RCU));
+    free(ctx);
  igt_nsec_elapsed(ts);
  igt_assert(igt_sysfs_printf(dir, "i915_wedged", "%llu", -1ull));



[Intel-gfx] [PATCH i-g-t 1/3] lib/igt_device_scan: fix dangling pointer

2022-06-28 Thread Matthew Auld
It looks like the linkto is out of scope:

../lib/igt_device_scan.c: In function ‘igt_device_add_attr’:
../lib/igt_device_scan.c:368:57: warning: dangling pointer ‘v’ to ‘linkto’ may 
be used [-Wdangling-pointer=]
  368 | g_hash_table_insert(dev->attrs_ht, strdup(key), strdup(v));
  | ^
../lib/igt_device_scan.c:351:22: note: ‘linkto’ declared here
  351 | char linkto[PATH_MAX];

Signed-off-by: Matthew Auld 
Cc: Petri Latvala 
---
 lib/igt_device_scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/igt_device_scan.c b/lib/igt_device_scan.c
index a1cee7a4..5d1d4258 100644
--- a/lib/igt_device_scan.c
+++ b/lib/igt_device_scan.c
@@ -338,6 +338,7 @@ static void igt_device_add_attr(struct igt_device *dev,
const char *key, const char *value)
 {
const char *v = value;
+   char linkto[PATH_MAX];
 
if (!key)
return;
@@ -348,7 +349,6 @@ static void igt_device_add_attr(struct igt_device *dev,
if (!v) {
struct stat st;
char path[PATH_MAX];
-   char linkto[PATH_MAX];
int len;
 
snprintf(path, sizeof(path), "%s/%s", dev->syspath, key);
-- 
2.36.1



[Intel-gfx] [PATCH i-g-t 2/3] tests/kms_cursor_crc: fix truncated warning

2022-06-28 Thread Matthew Auld
Looks reasonable to just increase the size of 'name' to avoid the
potential truncation:

../tests/kms_cursor_crc.c: In function ‘run_size_tests.constprop’:
../tests/kms_cursor_crc.c:699:50: warning: ‘%d’ directive output may be 
truncated writing between 1 and 11 bytes into a region of size between 4 and 14 
[-Wformat-truncation=]
  699 | snprintf(name, sizeof(name), "%dx%d", w, h);
  |  ^~
../tests/kms_cursor_crc.c:699:46: note: directive argument in the range 
[-2147483648, 1024]
  699 | snprintf(name, sizeof(name), "%dx%d", w, h);
  |  ^~~
In file included from /usr/include/stdio.h:894,
 from ../lib/igt_core.h:38,
 from ../lib/drmtest.h:39,
 from ../lib/igt.h:27,
 from ../tests/kms_cursor_crc.c:25:
In function ‘snprintf’,
inlined from ‘run_size_tests.constprop’ at ../tests/kms_cursor_crc.c:699:3:
/usr/include/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’ output 
between 4 and 24 bytes into a destination of size 16
   71 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
  |  ^~~~
   72 |__glibc_objsize (__s), __fmt,
  |~
   73 |__va_arg_pack ());
  |~

Signed-off-by: Matthew Auld 
Cc: Petri Latvala 
---
 tests/kms_cursor_crc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 513c9715..131fdb0a 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -691,7 +691,7 @@ static void test_rapid_movement(data_t *data)
 static void run_size_tests(data_t *data, enum pipe pipe,
   int w, int h)
 {
-   char name[16];
+   char name[32];
 
if (w == 0 && h == 0)
strcpy(name, "max-size");
-- 
2.36.1



[Intel-gfx] [PATCH i-g-t 3/3] tests/amdgpu/amdgpu_command_submission: fix uaf

2022-06-28 Thread Matthew Auld
../lib/amdgpu/amd_command_submission.c: In function 
‘amdgpu_command_submission_write_linear_helper’:
../lib/amdgpu/amd_command_submission.c:201:13: warning: pointer ‘ring_context’ 
used after ‘free’ [-Wuse-after-free]
  201 | r = amdgpu_cs_ctx_free(ring_context->context_handle);
  | ^~~~
../lib/amdgpu/amd_command_submission.c:199:9: note: call to ‘free’ here
  199 | free(ring_context);
  | ^~

Signed-off-by: Matthew Auld 
Cc: Petri Latvala 
---
 lib/amdgpu/amd_command_submission.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/amdgpu/amd_command_submission.c 
b/lib/amdgpu/amd_command_submission.c
index 4dc4df95..16939653 100644
--- a/lib/amdgpu/amd_command_submission.c
+++ b/lib/amdgpu/amd_command_submission.c
@@ -196,10 +196,10 @@ void 
amdgpu_command_submission_write_linear_helper(amdgpu_device_handle device,
}
/* clean resources */
free(ring_context->pm4);
-   free(ring_context);
/* end of test */
r = amdgpu_cs_ctx_free(ring_context->context_handle);
igt_assert_eq(r, 0);
+   free(ring_context);
 }
 
 
-- 
2.36.1



Re: [Intel-gfx] [PATCH v3 3/3] drm/doc/rfc: VM_BIND uapi definition

2022-06-28 Thread Zeng, Oak


Thanks,
Oak

> -Original Message-
> From: Tvrtko Ursulin 
> Sent: June 28, 2022 4:58 AM
> To: Zeng, Oak ; Landwerlin, Lionel G
> ; Vishwanathapura, Niranjana
> 
> Cc: Zanoni, Paulo R ; intel-
> g...@lists.freedesktop.org; dri-de...@lists.freedesktop.org; Hellstrom,
> Thomas ; Wilson, Chris P
> ; Vetter, Daniel ;
> christian.koe...@amd.com; Auld, Matthew 
> Subject: Re: [Intel-gfx] [PATCH v3 3/3] drm/doc/rfc: VM_BIND uapi definition
> 
> 
> On 27/06/2022 19:58, Zeng, Oak wrote:
> >
> >
> > Thanks,
> > Oak
> >
> >> -Original Message-
> >> From: Tvrtko Ursulin 
> >> Sent: June 27, 2022 4:30 AM
> >> To: Zeng, Oak ; Landwerlin, Lionel G
> >> ; Vishwanathapura, Niranjana
> >> 
> >> Cc: Zanoni, Paulo R ; intel-
> >> g...@lists.freedesktop.org; dri-de...@lists.freedesktop.org;
> >> Hellstrom, Thomas ; Wilson, Chris P
> >> ; Vetter, Daniel ;
> >> christian.koe...@amd.com; Auld, Matthew 
> >> Subject: Re: [Intel-gfx] [PATCH v3 3/3] drm/doc/rfc: VM_BIND uapi
> >> definition
> >>
> >>
> >> On 24/06/2022 21:23, Zeng, Oak wrote:
> >>> Let's compare "tlb invalidate at vm unbind" vs "tlb invalidate at
> >>> backing
> >> storage":
> >>>
> >>> Correctness:
> >>> consider this sequence of:
> >>> 1. unbind va1 from pa1,
> >>> 2. then bind va1 to pa2. //user space has the freedom to do this as
> >>> it manages virtual address space 3. Submit shader code using va1, 4.
> >>> Then retire pa1.
> >>>
> >>> If you don't perform tlb invalidate at step #1, in step #3, shader
> >>> will use
> >> stale entries in tlb and pa1 will be used for the shader. User want to use
> pa2.
> >> So I don't think invalidate tlb at step #4 make correctness.
> >>
> >> Define step 3. Is it a new execbuf? If so then there will be a TLB flush
> there.
> >> Unless the plan is to stop doing that with eb3 but I haven't picked
> >> up on that anywhere so far.
> >
> > In Niranjana's latest patch series, he removed the TLB flushing from
> vm_unbind. He also said explicitly TLB invalidation will be performed at job
> submission and backing storage releasing time, which is the existing behavior
> of the current i915 driver.
> >
> > I think if we invalidate TLB on each vm_unbind, then we don't need to
> invalidate at submission and backing storage releasing. It doesn't make a lot
> of sense to me to perform a tlb invalidation at execbuf time. Maybe it is a
> behavior for the old implicit binding programming model. For vm_bind and
> eb3, we separate the binding and job submission into two APIs. It is more
> natural the TLB invalidation be coupled with the vm bind/unbind, not job
> submission. So in my opinion we should remove tlb invalidation from
> submission and backing storage releasing and add it to vm unbind. This is
> method is cleaner to me.
> 
> You can propose this model (not flushing in eb3) but I have my doubts.
> Consider the pointlessness of flushing on N unbinds for 99% of clients which
> are not infinite compute batch. And consider how you make the behaviour
> consistent on all platforms (selective vs global tlb flush).

When I thought about eb3, compute workload and ulls were also in the picture. 
Under ulls, user mode keep submitting job without calling execbuf (it uses a 
semaphore to notify HW of the new batch). The execbuf + backing release flush 
has a correctness issue as I pointed out. Now we decided eb3 is only for mesa, 
not for compute, we don't have this correctness problem for now. We can close 
this conversation for now and revive it when we move to Xe and vm bind for 
compute.

Regards,
Oak


> 
> Also note that this discussion is orthogonal to unbind vs backing store 
> release.
> 
> > Regarding performance, we don't have data. In my opinion, we should
> make things work in a most straight forward way as the first step. Then
> consider performance improvement if necessary. Consider some delayed tlb
> invalidation at submission and backing release time without performance
> data support wasn't a good decision.
> 
> It is quite straightforward though. ;) It aligns with the eb2 model and
> argument can be made backing store release is (much) less frequent than
> unbind (consider softpin where client could trigger a lot of pointless 
> flushes).
> 
> Regards,
> 
> Tvrtko


Re: [Intel-gfx] [PATCH i-g-t 1/3] tests/i915/gem_eio: fix uaf

2022-06-28 Thread Gwan-gyeong Mun




On 6/28/22 3:47 PM, Matthew Auld wrote:

On 28/06/2022 11:24, Gwan-gyeong Mun wrote:

Looks good to me.

Reviewed-by: Gwan-gyeong Mun 

However, the use after free build issue did not occur only with the "$ 
meson build && ninja -C build" build command guided by the igt 
README.md. How did you check it?


Hmm, I assume it's just a difference in compiler version or so. I have: 
gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1).



Thanks for sharing your compiling environment info.
My gcc says its version is 11.1.0.
I'll try with the version you mentioned.

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr 
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man 
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ 
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d --with-isl 
--with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit 
--enable-cet=auto --enable-checking=release --enable-clocale=gnu 
--enable-default-pie --enable-default-ssp --enable-gnu-indirect-function 
--enable-gnu-unique-object --enable-install-libiberty 
--enable-linker-build-id --enable-lto --enable-multilib --enable-plugin 
--enable-shared --enable-threads=posix --disable-libssp 
--disable-libstdcxx-pch --disable-libunwind-exceptions --disable-werror 
gdc_include_dir=/usr/include/dlang/gdc

Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.1.0 (GCC)


Thanks,
G.G.



Br,

G.G.


On 6/27/22 7:10 PM, Matthew Auld wrote:
../tests/i915/gem_eio.c:277:20: warning: pointer ‘ctx’ used after 
‘free’ [-Wuse-after-free]
   277 | igt_assert(igt_sysfs_printf(ctx->debugfs, 
"i915_drop_caches",

../lib/igt_core.h:667:20: note: in definition of macro ‘igt_assert’
   667 | do { if (!(expr)) \
   |    ^~~~
../tests/i915/gem_eio.c:274:9: note: call to ‘free’ here
   274 | free(ctx);

Signed-off-by: Matthew Auld 
Cc: Gwan-gyeong Mun 
---
  tests/i915/gem_eio.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
index 913a21f9..6cbae6eb 100644
--- a/tests/i915/gem_eio.c
+++ b/tests/i915/gem_eio.c
@@ -270,11 +270,11 @@ static void hang_handler(union sigval arg)
    igt_nsec_elapsed(&ctx->delay) / 1000.0);
  igt_assert_eq(timer_delete(ctx->timer), 0);
-    free(ctx);
  /* flush any excess work before we start timing our reset */
  igt_assert(igt_sysfs_printf(ctx->debugfs, "i915_drop_caches",
  "%d", DROP_RCU));
+    free(ctx);
  igt_nsec_elapsed(ts);
  igt_assert(igt_sysfs_printf(dir, "i915_wedged", "%llu", -1ull));



Re: [Intel-gfx] [PATCH 5/6] drm/i915/gt: Serialize GRDOM access between multiple engine resets

2022-06-28 Thread Mauro Carvalho Chehab
Hi Tvrtko,

On Fri, 24 Jun 2022 09:34:21 +0100
Tvrtko Ursulin  wrote:

> On 23/06/2022 12:17, Andi Shyti wrote:
> > Hi Mauro,
> > 
> > On Wed, Jun 15, 2022 at 04:27:39PM +0100, Mauro Carvalho Chehab wrote:  
> >> From: Chris Wilson 
> >>
> >> Don't allow two engines to be reset in parallel, as they would both
> >> try to select a reset bit (and send requests to common registers)
> >> and wait on that register, at the same time. Serialize control of
> >> the reset requests/acks using the uncore->lock, which will also ensure
> >> that no other GT state changes at the same time as the actual reset.
> >>
> >> Fixes: 7938d61591d3 ("drm/i915: Flush TLBs before releasing backing store")
> >>
> >> Reported-by: Mika Kuoppala 
> >> Signed-off-by: Chris Wilson 
> >> Cc: Mika Kuoppala 
> >> Cc: Andi Shyti 
> >> Cc: sta...@vger.kernel.org
> >> Acked-by: Thomas Hellström 
> >> Signed-off-by: Mauro Carvalho Chehab   
> > 
> > Reviewed-by: Andi Shyti   
> 
> Notice I had a bunch of questions and asks in this series so please do 
> not merge until those are addressed.
> 
> In this particular patch (and some others) for instance Fixes: tag, at 
> least against that sha, shouldn't be there.

Hmm... I sent an answer to your points, but I can't see it at:


https://lore.kernel.org/all/160e613f-a0a8-18ff-5d4b-249d4280c...@linux.intel.com/

Maybe it got lost somewhere, I dunno.

Yeah, indeed the fixes tag on patch 5/6 should be removed as this is not
directly related to changeset 7938d61591d3. Yet, this one is required for
patch 6 to work.

The other patches on this series, though, are modifying the code 
introduced by changeset 7938d61591d3.

Patch 2 is clearly a workaround needed for TLB cache invalidation to
work on some GPUs. So, while not related to Broadwell, they're also
fixing some TLB cache issues. So, IMO, it should keep the fixes.

I tried to port just the two serialize patches to drm-tip, in order
to solve the issues on Broadwell, but it didn't work, as the logic 
inside the spinlock could be calling schedule() with a spinlock hold:
 
Jun 14 17:38:48 silver kernel: [   23.227813] BUG: sleeping function 
called from invalid context at drivers/gpu/drm/i915/intel_uncore.c:2496
Jun 14 17:38:48 silver kernel: [   23.227816] in_atomic(): 1, 
irqs_disabled(): 1, non_block: 0, pid: 37, name: kworker/u8:1
Jun 14 17:38:48 silver kernel: [   23.227818] preempt_count: 1, 
expected: 0
Jun 14 17:38:48 silver kernel: [   23.227819] RCU nest depth: 0, 
expected: 0
Jun 14 17:38:48 silver kernel: [   23.227820] 5 locks held by 
kworker/u8:1/37:
Jun 14 17:38:48 silver kernel: [   23.227822]  #0: 88811159b538 
((wq_completion)i915){+.+.}-{0:0}, at: process_one_work+0x1e0/0x580
Jun 14 17:38:48 silver kernel: [   23.227831]  #1: c9183e60 
((work_completion)(&(&i915->mm.free_work)->work)){+.+.}-{0:0}, at: 
process_one_work+0x1e0/0x580
Jun 14 17:38:48 silver kernel: [   23.227837]  #2: 88811b34c5e8 
(reservation_ww_class_mutex){+.+.}-{3:3}, at: 
__i915_gem_free_objects+0xba/0x210 [i915]
Jun 14 17:38:48 silver kernel: [   23.228283]  #3: 88810a66c2d8 
(>->tlb_invalidate_lock){+.+.}-{3:3}, at: intel_gt_invalidate_tlbs+0xe7/0x4d0 
[i915]
Jun 14 17:38:48 silver kernel: [   23.228663]  #4: 88810a668f28 
(&uncore->lock){-.-.}-{2:2}, at: intel_gt_invalidate_tlbs+0x115/0x4d0 [i915]

I didn't investigate the root cause, but it seems related to PM, so 
patches 1 and 3 seem to be required for the serialization logic
to actually work.

So, I would keep the Fixes: tag mentioning changeset 7938d61591d3
on patches: 1, 2, 3 and 6.

Yet, IMO the entire series should be merged on -stable.

If that's OK for you and there's no additional issues to be
addressed, I'll submit a v2 of this series removing the Fixes tag
from patches 4 and 5.

Regards,
Mauro


[Intel-gfx] [PATCH v2] drm/i915: use DISPLAY_VER() instead of accessing match_info directly

2022-06-28 Thread Jani Nikula
We've just set up device info in i915_driver_create() so we can use
DISPLAY_VER() intead of looking at match_info directly.

Semantically we want to check the display version instead of the
graphics version, and for the earlier platforms they are always the
same.

v2: Use DISPLAY_VER() instead of GRAPHICS_VER() (Ville)

Signed-off-by: Jani Nikula 
Reviewed-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/i915_driver.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_driver.c 
b/drivers/gpu/drm/i915/i915_driver.c
index 6e5849c1086f..b2e14cd76d7e 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -847,8 +847,6 @@ i915_driver_create(struct pci_dev *pdev, const struct 
pci_device_id *ent)
  */
 int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
-   const struct intel_device_info *match_info =
-   (struct intel_device_info *)ent->driver_data;
struct drm_i915_private *i915;
int ret;
 
@@ -857,7 +855,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct 
pci_device_id *ent)
return PTR_ERR(i915);
 
/* Disable nuclear pageflip by default on pre-ILK */
-   if (!i915->params.nuclear_pageflip && match_info->graphics.ver < 5)
+   if (!i915->params.nuclear_pageflip && DISPLAY_VER(i915) < 5)
i915->drm.driver_features &= ~DRIVER_ATOMIC;
 
ret = pci_enable_device(pdev);
-- 
2.30.2



Re: [Intel-gfx] [PATCH 01/16] drm/i915: use GRAPHICS_VER() instead of accessing match_info directly

2022-06-28 Thread Jani Nikula
On Thu, 23 Jun 2022, Ville Syrjälä  wrote:
> On Mon, Jun 20, 2022 at 11:37:40AM +0300, Jani Nikula wrote:
>> We've just set up device info in i915_driver_create() so we can use
>> GRAPHICS_VER() intead of looking at match_info directly.
>> 
>> Signed-off-by: Jani Nikula 
>> ---
>>  drivers/gpu/drm/i915/i915_driver.c | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/i915_driver.c 
>> b/drivers/gpu/drm/i915/i915_driver.c
>> index d26dcca7e654..aeec3dfe3ebf 100644
>> --- a/drivers/gpu/drm/i915/i915_driver.c
>> +++ b/drivers/gpu/drm/i915/i915_driver.c
>> @@ -829,8 +829,6 @@ i915_driver_create(struct pci_dev *pdev, const struct 
>> pci_device_id *ent)
>>   */
>>  int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>>  {
>> -const struct intel_device_info *match_info =
>> -(struct intel_device_info *)ent->driver_data;
>>  struct drm_i915_private *i915;
>>  int ret;
>>  
>> @@ -839,7 +837,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct 
>> pci_device_id *ent)
>>  return PTR_ERR(i915);
>>  
>>  /* Disable nuclear pageflip by default on pre-ILK */
>> -if (!i915->params.nuclear_pageflip && match_info->graphics.ver < 5)
>> +if (!i915->params.nuclear_pageflip && GRAPHICS_VER(i915) < 5)
>
> Should also be switched to DISPLAY_VER(), but that could be done as a
> separate patch too.
>
> Reviewed-by: Ville Syrjälä 

Thanks, I've sent this separately with s/GRAPHICS_VER/DISPLAY_VER/.

BR,
Jani.


>
>>  i915->drm.driver_features &= ~DRIVER_ATOMIC;
>>  
>>  ret = pci_enable_device(pdev);
>> -- 
>> 2.30.2

-- 
Jani Nikula, Intel Open Source Graphics Center


Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/guc/slpc: Add a new SLPC selftest (rev4)

2022-06-28 Thread Belgaumkar, Vinay


From: Patchwork 
Sent: Monday, June 27, 2022 10:00 PM
To: Belgaumkar, Vinay 
Cc: intel-gfx@lists.freedesktop.org
Subject: ✗ Fi.CI.BAT: failure for drm/i915/guc/slpc: Add a new SLPC selftest 
(rev4)

Patch Details
Series:
drm/i915/guc/slpc: Add a new SLPC selftest (rev4)
URL:
https://patchwork.freedesktop.org/series/105005/
State:
failure
Details:
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105005v4/index.html
CI Bug Log - changes from CI_DRM_11816 -> Patchwork_105005v4
Summary

FAILURE

Serious unknown changes coming with Patchwork_105005v4 absolutely need to be
verified manually.

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_105005v4, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.

External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105005v4/index.html

Participating hosts (40 -> 39)

Additional (3): fi-hsw-4770 bat-adlm-1 fi-icl-u2
Missing (4): bat-dg2-8 fi-rkl-11600 fi-bdw-samus bat-dg1-5

Possible new issues

Here are the unknown changes that may have been introduced in 
Patchwork_105005v4:

IGT changes
Possible regressions

  *   igt@i915_selftest@live@workarounds:
 *   fi-bdw-5557u: 
PASS
 -> 
INCOMPLETE
This failure is not related to the patch, bdw does not have SLPC.
Thanks,
Vinay.
Suppressed

The following results come from untrusted machines, tests, or statuses.
They do not affect the overall result.

  *   igt@i915_selftest@live@perf:
 *   {bat-adln-1}: NOTRUN -> 
DMESG-FAIL

Known issues

Here are the changes found in Patchwork_105005v4 that come from known issues:

IGT changes
Issues hit

  *   igt@gem_huc_copy@huc-copy:
 *   fi-icl-u2: NOTRUN -> 
SKIP
 (i915#2190)
  *   igt@gem_lmem_swapping@random-engines:
 *   fi-icl-u2: NOTRUN -> 
SKIP
 (i915#4613) +3 similar 
issues
  *   igt@i915_pm_backlight@basic-brightness:
 *   fi-hsw-4770: NOTRUN -> 
SKIP
 (fdo#109271 / 
i915#3012)
  *   igt@i915_pm_rpm@module-reload:
 *   fi-cfl-8109u: 
PASS
 -> 
DMESG-FAIL
 (i915#62)
 *   bat-adlp-4: 
PASS
 -> 
DMESG-WARN
 (i915#3576) +1 similar 
issue
  *   igt@i915_selftest@live@execlists:
 *   fi-bsw-nick: 
PASS
 -> 
INCOMPLETE
 (i915#5847)
  *   igt@i915_selftest@live@hangcheck:
 *   fi-hsw-g3258: 
PASS
 -> 
INCOMPLETE
 (i915#4785)
  *   igt@i915_selftest@live@ring_submission:
 *   fi-cfl-8109u: 
PASS
 -> 
DMESG-WARN
 (i915#5904) +11 similar 
issues
  *   igt@i915_suspend@basic-s2idle-without-i915:
 *   fi-cfl-8109u: 
PASS
 -> 
DMESG-WARN

Re: [Intel-gfx] [PATCH 5/6] drm/i915/gt: Serialize GRDOM access between multiple engine resets

2022-06-28 Thread Tvrtko Ursulin



Hi,

On 27/06/2022 10:00, Mauro Carvalho Chehab (by way of Mauro Carvalho 
Chehab ) wrote:

Hi Tvrtko,

On Fri, 24 Jun 2022 09:34:21 +0100
Tvrtko Ursulin  wrote:


On 23/06/2022 12:17, Andi Shyti wrote:

Hi Mauro,

On Wed, Jun 15, 2022 at 04:27:39PM +0100, Mauro Carvalho Chehab wrote:

From: Chris Wilson 

Don't allow two engines to be reset in parallel, as they would both
try to select a reset bit (and send requests to common registers)
and wait on that register, at the same time. Serialize control of
the reset requests/acks using the uncore->lock, which will also ensure
that no other GT state changes at the same time as the actual reset.

Fixes: 7938d61591d3 ("drm/i915: Flush TLBs before releasing backing store")

Reported-by: Mika Kuoppala 
Signed-off-by: Chris Wilson 
Cc: Mika Kuoppala 
Cc: Andi Shyti 
Cc: sta...@vger.kernel.org
Acked-by: Thomas Hellström 
Signed-off-by: Mauro Carvalho Chehab 


Reviewed-by: Andi Shyti 


Notice I had a bunch of questions and asks in this series so please do
not merge until those are addressed.

In this particular patch (and some others) for instance Fixes: tag, at
least against that sha, shouldn't be there.


Hmm... I sent an answer to your points, but I can't see it at:


https://lore.kernel.org/all/160e613f-a0a8-18ff-5d4b-249d4280c...@linux.intel.com/

Maybe it got lost somewhere, I dunno.


Yeah, no replies received on my end I'm afraid.



Yeah, indeed the fixes tag on patch 5/6 should be removed as this is not
directly related to changeset 7938d61591d3. Yet, this one is required for
patch 6 to work.

The other patches on this series, though, are modifying the code
introduced by changeset 7938d61591d3.


Modifying the code does not strictly means something is a fix for a 
certain patch.



Patch 2 is clearly a workaround needed for TLB cache invalidation to
work on some GPUs. So, while not related to Broadwell, they're also
fixing some TLB cache issues. So, IMO, it should keep the fixes.


Umesh commented that patch 2 is not needed - who is right then? :)


I tried to port just the two serialize patches to drm-tip, in order
to solve the issues on Broadwell, but it didn't work, as the logic
inside the spinlock could be calling schedule() with a spinlock hold:
  
	Jun 14 17:38:48 silver kernel: [   23.227813] BUG: sleeping function called from invalid context at drivers/gpu/drm/i915/intel_uncore.c:2496

Jun 14 17:38:48 silver kernel: [   23.227816] in_atomic(): 1, 
irqs_disabled(): 1, non_block: 0, pid: 37, name: kworker/u8:1
Jun 14 17:38:48 silver kernel: [   23.227818] preempt_count: 1, 
expected: 0
Jun 14 17:38:48 silver kernel: [   23.227819] RCU nest depth: 0, 
expected: 0
Jun 14 17:38:48 silver kernel: [   23.227820] 5 locks held by 
kworker/u8:1/37:
Jun 14 17:38:48 silver kernel: [   23.227822]  #0: 88811159b538 
((wq_completion)i915){+.+.}-{0:0}, at: process_one_work+0x1e0/0x580
Jun 14 17:38:48 silver kernel: [   23.227831]  #1: c9183e60 
((work_completion)(&(&i915->mm.free_work)->work)){+.+.}-{0:0}, at: 
process_one_work+0x1e0/0x580
Jun 14 17:38:48 silver kernel: [   23.227837]  #2: 88811b34c5e8 
(reservation_ww_class_mutex){+.+.}-{3:3}, at: 
__i915_gem_free_objects+0xba/0x210 [i915]
Jun 14 17:38:48 silver kernel: [   23.228283]  #3: 88810a66c2d8 
(>->tlb_invalidate_lock){+.+.}-{3:3}, at: intel_gt_invalidate_tlbs+0xe7/0x4d0 
[i915]
Jun 14 17:38:48 silver kernel: [   23.228663]  #4: 88810a668f28 
(&uncore->lock){-.-.}-{2:2}, at: intel_gt_invalidate_tlbs+0x115/0x4d0 [i915]

I didn't investigate the root cause, but it seems related to PM, so
patches 1 and 3 seem to be required for the serialization logic
to actually work.


Yes that is clear, what is needed is the split of the for_each_engine 
loop into request and wait.


But question is how much backporting trouble will the _extra_ changes 
patch 1 brings create.


In the ideal world patch 1 wouldn't be an optimising one, I mean adding 
skipping of TLB invalidations on idle engines but just the loop split. 
That would make it smaller and more suitable for Cc: stable. Because 
both i915_gem_pages.c and intel_gt_pm.h hunks wouldn't even be there. 
And the refactor in intel_gt_invalidate_tlbs would be smaller since it 
wouldn't be adding the engine awake checks...



So, I would keep the Fixes: tag mentioning changeset 7938d61591d3
on patches: 1, 2, 3 and 6.


... which for me means a different patch 1, followed by patch 6 (moved 
to be patch 2) would be ideal stable material.


Then we have the current patch 2 which is open/unknown (to me at least).

And the rest seem like optimisations which shouldn't be tagged as fixes.

Apart from patch 5 which should be cc: stable, but no fixes as agreed.

Could you please double check if what I am suggesting here is feasible 
to implement and if it is just send those minimal patches out alone?


Maybe it even makes sense to squash such 1&2 into a single patch.

Again

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/dp: wait on timeout before retry

2022-06-28 Thread Patchwork
== Series Details ==

Series: drm/i915/dp: wait on timeout before retry
URL   : https://patchwork.freedesktop.org/series/105660/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_11816_full -> Patchwork_105660v1_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_105660v1_full absolutely need 
to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_105660v1_full, please notify your bug team to allow 
them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (13 -> 13)
--

  No changes in participating hosts

Possible new issues
---

  Here are the unknown changes that may have been introduced in 
Patchwork_105660v1_full:

### IGT changes ###

 Possible regressions 

  * igt@gem_ctx_persistence@smoketest:
- shard-glk:  [PASS][1] -> [INCOMPLETE][2] +2 similar issues
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk1/igt@gem_ctx_persiste...@smoketest.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105660v1/shard-glk7/igt@gem_ctx_persiste...@smoketest.html

  * igt@gem_exec_parallel@fds@rcs0:
- shard-apl:  [PASS][3] -> [INCOMPLETE][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-apl4/igt@gem_exec_parallel@f...@rcs0.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105660v1/shard-apl8/igt@gem_exec_parallel@f...@rcs0.html

  
 Warnings 

  * igt@i915_pm_rc6_residency@rc6-idle@bcs0:
- shard-iclb: [WARN][5] -> [FAIL][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-iclb8/igt@i915_pm_rc6_residency@rc6-i...@bcs0.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105660v1/shard-iclb1/igt@i915_pm_rc6_residency@rc6-i...@bcs0.html

  
 Suppressed 

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@kms_vblank@pipe-d-wait-busy-hang:
- {shard-tglu}:   [PASS][7] -> [SKIP][8]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-tglu-1/igt@kms_vbl...@pipe-d-wait-busy-hang.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105660v1/shard-tglu-4/igt@kms_vbl...@pipe-d-wait-busy-hang.html

  

### Piglit changes ###

 Possible regressions 

  * 
spec@arb_tessellation_shader@execution@built-in-functions@tcs-op-eq-bvec2-bvec2-using-if:
- pig-skl-6260u:  NOTRUN -> [CRASH][9]
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105660v1/pig-skl-6260u/spec@arb_tessellation_shader@execution@built-in-functi...@tcs-op-eq-bvec2-bvec2-using-if.html

  * spec@ext_texture_srgb@multisample-fast-clear gl_ext_texture_srgb:
- pig-glk-j5005:  NOTRUN -> [INCOMPLETE][10]
   [10]: None

  
Known issues


  Here are the changes found in Patchwork_105660v1_full that come from known 
issues:

### CI changes ###

 Possible fixes 

  * boot:
- shard-skl:  ([PASS][11], [PASS][12], [PASS][13], [PASS][14], 
[PASS][15], [PASS][16], [PASS][17], [PASS][18], [PASS][19], [PASS][20], 
[PASS][21], [PASS][22], [PASS][23], [PASS][24], [PASS][25], [FAIL][26], 
[PASS][27], [PASS][28], [PASS][29], [PASS][30], [PASS][31], [PASS][32], 
[PASS][33], [PASS][34]) ([i915#5032]) -> ([PASS][35], [PASS][36], [PASS][37], 
[PASS][38], [PASS][39], [PASS][40], [PASS][41], [PASS][42], [PASS][43], 
[PASS][44], [PASS][45], [PASS][46], [PASS][47], [PASS][48], [PASS][49], 
[PASS][50], [PASS][51], [PASS][52], [PASS][53], [PASS][54], [PASS][55], 
[PASS][56], [PASS][57])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl9/boot.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl9/boot.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl9/boot.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl9/boot.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl9/boot.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl7/boot.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl7/boot.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl7/boot.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl7/boot.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl7/boot.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl4/boot.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl4/boot.html
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl4/boot.html
   [24]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl4/boot.html
   [25]: 
https://intel-gfx-ci.01.org/tree/drm

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: ttm for stolen (rev5)

2022-06-28 Thread Robert Beckett




On 28/06/2022 09:46, Tvrtko Ursulin wrote:


On 27/06/2022 18:08, Robert Beckett wrote:



On 22/06/2022 10:05, Tvrtko Ursulin wrote:


On 21/06/2022 20:11, Robert Beckett wrote:



On 21/06/2022 18:37, Patchwork wrote:

*Patch Details*
*Series:*    drm/i915: ttm for stolen (rev5)
*URL:*    https://patchwork.freedesktop.org/series/101396/ 


*State:*    failure
*Details:* 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_101396v5/index.html 
 




  CI Bug Log - changes from CI_DRM_11790 -> Patchwork_101396v5


    Summary

*FAILURE*

Serious unknown changes coming with Patchwork_101396v5 absolutely 
need to be

verified manually.

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_101396v5, please notify your bug team to 
allow them
to document this new failure mode, which will reduce false 
positives in CI.


External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_101396v5/index.html



    Participating hosts (40 -> 41)

Additional (2): fi-icl-u2 bat-dg2-9
Missing (1): fi-bdw-samus


    Possible new issues

Here are the unknown changes that may have been introduced in 
Patchwork_101396v5:



  IGT changes


    Possible regressions

  * igt@i915_selftest@live@reset:
  o bat-adlp-4: PASS
 


    -> DMESG-FAIL
 





I keep hitting clobbered pages during engine resets on bat-adlp-4.
It seems to happen most of the time on that machine and occasionally 
on bat-adlp-6.


Should bat-adlp-4 be considered an unreliable machine like 
bat-adlp-6 is for now?


Alternatively, seeing the history of this in

commit 3da3c5c1c9825c24168f27b021339e90af37e969 "drm/i915: Exclude 
low pages (128KiB) of stolen from use"


could this be an indication that maybe the original issue is worse 
on adlp machines?
I have only ever seen page page 135 or 136 clobbered across many 
runs via trybot, so it looks fairly consistent.

Though excluding the use of over 540K of stolen might be too severe.


Don't know but I see that on the latest version you even hit pages 
165/166.


Any history of hitting this in CI without your series? If not, are 
there some other changes which could explain it? Are you touching the 
selftest itself?


Hexdump of the clobbered page looks quite complex. Especially 
POISON_FREE. Any idea how that ends up there?



(see 
https://intel-gfx-ci.01.org/tree/drm-tip/Trybot_105517v4/fi-rkl-guc/igt@i915_selftest@l...@reset.html#dmesg-warnings702) 



after lots of slow debug via CI, it looks like the issue is that a 
ring buffer was allocated and taking up that page during the initial 
crc capture in the test, but by the time it came to check for 
corruption, it had been freed from that page.


The test has a number of weaknesses:

1. the busy check is done twice, without taking in to account any 
change in between. I assume previously this could be relied on never 
to occur, but now it can for some reason (more on that later)


You mean the stolen page used/unused test? Probably the premise is that 
the test controls the driver completely ie. is the sole user and the two 
checks are run at the time where nothing else could have changed the state.


With the nerfed request (as with GuC) this actually should hold. In the 
generic case I am less sure, my working knowledge faded a bit, but 
perhaps there was something guaranteeing the spinner couldn't have been 
retired yet at the time of the second check. Would need clarifying at 
least in comments.


2. the engine reset returns early with an error for guc submission 
engines, but it is silently ignored in the test. Perhaps it should 
ignore guc submission engines as it is a largely useless test for 
those situations.


Yes looks dodgy indeed. You will need to summon the owners of the GuC 
backend to comment on this.


However even if the test should be skipped with GuC it is extremely 
interesting that you are hitting this so I suspect there is a more 
serious issue at play.


indeed. That's why I am keen to get to the root cause instead of just 
slapping in a fix.




A quick obvious fix is to have a busy bitmask that remembers each 
page's busy state initially and only check for corruption if it was 
busy during both checks.


However, the main question is why this is occurring now with my changes.
I have added more debug to check where the stolen memory is being 
freed, but the first run last night didn't hit the issue for once.
I am running again now, will report back if I figure out where it is 
being freed.


I am pretty sure the "corruption" (which isn't actually corruption) is 
from a ring buffer.
The POISON_FREE is the only difference between the captured befor

Re: [Intel-gfx] [PATCH v6 00/22] Add generic memory shrinker to VirtIO-GPU and Panfrost DRM drivers

2022-06-28 Thread Rob Clark
On Tue, Jun 28, 2022 at 5:51 AM Dmitry Osipenko
 wrote:
>
> On 6/28/22 15:31, Robin Murphy wrote:
> > ->8-
> > [   68.295951] ==
> > [   68.295956] WARNING: possible circular locking dependency detected
> > [   68.295963] 5.19.0-rc3+ #400 Not tainted
> > [   68.295972] --
> > [   68.295977] cc1/295 is trying to acquire lock:
> > [   68.295986] 08d7f1a0
> > (reservation_ww_class_mutex){+.+.}-{3:3}, at: drm_gem_shmem_free+0x7c/0x198
> > [   68.296036]
> > [   68.296036] but task is already holding lock:
> > [   68.296041] 8c14b820 (fs_reclaim){+.+.}-{0:0}, at:
> > __alloc_pages_slowpath.constprop.0+0x4d8/0x1470
> > [   68.296080]
> > [   68.296080] which lock already depends on the new lock.
> > [   68.296080]
> > [   68.296085]
> > [   68.296085] the existing dependency chain (in reverse order) is:
> > [   68.296090]
> > [   68.296090] -> #1 (fs_reclaim){+.+.}-{0:0}:
> > [   68.296111]fs_reclaim_acquire+0xb8/0x150
> > [   68.296130]dma_resv_lockdep+0x298/0x3fc
> > [   68.296148]do_one_initcall+0xe4/0x5f8
> > [   68.296163]kernel_init_freeable+0x414/0x49c
> > [   68.296180]kernel_init+0x2c/0x148
> > [   68.296195]ret_from_fork+0x10/0x20
> > [   68.296207]
> > [   68.296207] -> #0 (reservation_ww_class_mutex){+.+.}-{3:3}:
> > [   68.296229]__lock_acquire+0x1724/0x2398
> > [   68.296246]lock_acquire+0x218/0x5b0
> > [   68.296260]__ww_mutex_lock.constprop.0+0x158/0x2378
> > [   68.296277]ww_mutex_lock+0x7c/0x4d8
> > [   68.296291]drm_gem_shmem_free+0x7c/0x198
> > [   68.296304]panfrost_gem_free_object+0x118/0x138
> > [   68.296318]drm_gem_object_free+0x40/0x68
> > [   68.296334]drm_gem_shmem_shrinker_run_objects_scan+0x42c/0x5b8
> > [   68.296352]drm_gem_shmem_shrinker_scan_objects+0xa4/0x170
> > [   68.296368]do_shrink_slab+0x220/0x808
> > [   68.296381]shrink_slab+0x11c/0x408
> > [   68.296392]shrink_node+0x6ac/0xb90
> > [   68.296403]do_try_to_free_pages+0x1dc/0x8d0
> > [   68.296416]try_to_free_pages+0x1ec/0x5b0
> > [   68.296429]__alloc_pages_slowpath.constprop.0+0x528/0x1470
> > [   68.296444]__alloc_pages+0x4e0/0x5b8
> > [   68.296455]__folio_alloc+0x24/0x60
> > [   68.296467]vma_alloc_folio+0xb8/0x2f8
> > [   68.296483]alloc_zeroed_user_highpage_movable+0x58/0x68
> > [   68.296498]__handle_mm_fault+0x918/0x12a8
> > [   68.296513]handle_mm_fault+0x130/0x300
> > [   68.296527]do_page_fault+0x1d0/0x568
> > [   68.296539]do_translation_fault+0xa0/0xb8
> > [   68.296551]do_mem_abort+0x68/0xf8
> > [   68.296562]el0_da+0x74/0x100
> > [   68.296572]el0t_64_sync_handler+0x68/0xc0
> > [   68.296585]el0t_64_sync+0x18c/0x190
> > [   68.296596]
> > [   68.296596] other info that might help us debug this:
> > [   68.296596]
> > [   68.296601]  Possible unsafe locking scenario:
> > [   68.296601]
> > [   68.296604]CPU0CPU1
> > [   68.296608]
> > [   68.296612]   lock(fs_reclaim);
> > [   68.296622] lock(reservation_ww_class_mutex);
> > [   68.296633]lock(fs_reclaim);
> > [   68.296644]   lock(reservation_ww_class_mutex);
> > [   68.296654]
> > [   68.296654]  *** DEADLOCK ***
>
> This splat could be ignored for now. I'm aware about it, although
> haven't looked closely at how to fix it since it's a kind of a lockdep
> misreporting.

The lockdep splat could be fixed with something similar to what I've
done in msm, ie. basically just not acquire the lock in the finalizer:

https://patchwork.freedesktop.org/patch/489364/

There is one gotcha to watch for, as danvet pointed out
(scan_objects() could still see the obj in the LRU before the
finalizer removes it), but if scan_objects() does the
kref_get_unless_zero() trick, it is safe.

BR,
-R


[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/dg2: Add performance workaround 18019455067 (rev2)

2022-06-28 Thread Patchwork
== Series Details ==

Series: drm/i915/dg2: Add performance workaround 18019455067 (rev2)
URL   : https://patchwork.freedesktop.org/series/105512/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_11816_full -> Patchwork_105512v2_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_105512v2_full absolutely need 
to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_105512v2_full, please notify your bug team to allow 
them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (13 -> 13)
--

  No changes in participating hosts

Possible new issues
---

  Here are the unknown changes that may have been introduced in 
Patchwork_105512v2_full:

### IGT changes ###

 Possible regressions 

  * igt@gem_ctx_persistence@smoketest:
- shard-glk:  [PASS][1] -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk1/igt@gem_ctx_persiste...@smoketest.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105512v2/shard-glk2/igt@gem_ctx_persiste...@smoketest.html

  * igt@gem_exec_parallel@fds@vcs0:
- shard-tglb: [PASS][3] -> [INCOMPLETE][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-tglb3/igt@gem_exec_parallel@f...@vcs0.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105512v2/shard-tglb5/igt@gem_exec_parallel@f...@vcs0.html

  * igt@i915_selftest@live@late_gt_pm:
- shard-glk:  NOTRUN -> [DMESG-FAIL][5]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105512v2/shard-glk5/igt@i915_selftest@live@late_gt_pm.html

  
 Suppressed 

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@i915_selftest@live@gtt:
- {shard-rkl}:[PASS][6] -> [DMESG-FAIL][7]
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-rkl-2/igt@i915_selftest@l...@gtt.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105512v2/shard-rkl-5/igt@i915_selftest@l...@gtt.html

  

### Piglit changes ###

 Possible regressions 

  * 
spec@arb_gpu_shader_int64@execution@built-in-functions@fs-op-add-u64vec4-u64vec4:
- pig-glk-j5005:  NOTRUN -> [INCOMPLETE][8]
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105512v2/pig-glk-j5005/spec@arb_gpu_shader_int64@execution@built-in-functi...@fs-op-add-u64vec4-u64vec4.html

  * 
spec@arb_gpu_shader_int64@execution@built-in-functions@vs-op-sub-int64_t-i64vec2:
- pig-glk-j5005:  NOTRUN -> [CRASH][9] +2 similar issues
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105512v2/pig-glk-j5005/spec@arb_gpu_shader_int64@execution@built-in-functions@vs-op-sub-int64_t-i64vec2.html

  * spec@arb_shader_texture_image_samples@texturesamples@vs-sampler2dms-2:
- pig-skl-6260u:  NOTRUN -> [INCOMPLETE][10]
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105512v2/pig-skl-6260u/spec@arb_shader_texture_image_samples@texturesamp...@vs-sampler2dms-2.html

  
Known issues


  Here are the changes found in Patchwork_105512v2_full that come from known 
issues:

### CI changes ###

 Possible fixes 

  * boot:
- shard-skl:  ([PASS][11], [PASS][12], [PASS][13], [PASS][14], 
[PASS][15], [PASS][16], [PASS][17], [PASS][18], [PASS][19], [PASS][20], 
[PASS][21], [PASS][22], [PASS][23], [PASS][24], [PASS][25], [FAIL][26], 
[PASS][27], [PASS][28], [PASS][29], [PASS][30], [PASS][31], [PASS][32], 
[PASS][33], [PASS][34]) ([i915#5032]) -> ([PASS][35], [PASS][36], [PASS][37], 
[PASS][38], [PASS][39], [PASS][40], [PASS][41], [PASS][42], [PASS][43], 
[PASS][44], [PASS][45], [PASS][46], [PASS][47], [PASS][48], [PASS][49], 
[PASS][50], [PASS][51], [PASS][52], [PASS][53], [PASS][54], [PASS][55], 
[PASS][56])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl9/boot.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl9/boot.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl9/boot.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl9/boot.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl9/boot.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl7/boot.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl7/boot.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl7/boot.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl7/boot.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl7/boot.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl4/boot.html
   [22]: 
https://intel-gfx-c

Re: [Intel-gfx] [PATCH][next] treewide: uapi: Replace zero-length arrays with flexible-array members

2022-06-28 Thread Kees Cook
On Mon, Jun 27, 2022 at 09:40:52PM -0300, Jason Gunthorpe wrote:
> On Mon, Jun 27, 2022 at 08:27:37PM +0200, Daniel Borkmann wrote:
> > [...]
> > Fyi, this breaks BPF CI:
> > 
> > https://github.com/kernel-patches/bpf/runs/7078719372?check_suite_focus=true
> > 
> >   [...]
> >   progs/map_ptr_kern.c:314:26: error: field 'trie_key' with variable sized 
> > type 'struct bpf_lpm_trie_key' not at the end of a struct or class is a GNU 
> > extension [-Werror,-Wgnu-variable-sized-type-not-at-end]
> >   struct bpf_lpm_trie_key trie_key;
> >   ^

The issue here seems to be a collision between "unknown array size"
and known sizes:

struct bpf_lpm_trie_key {
__u32   prefixlen;  /* up to 32 for AF_INET, 128 for AF_INET6 */
__u8data[0];/* Arbitrary size */
};

struct lpm_key {
struct bpf_lpm_trie_key trie_key;
__u32 data;
};

This is treating trie_key as a header, which it's not: it's a complete
structure. :)

Perhaps:

struct lpm_key {
__u32 prefixlen;
__u32 data;
};

I don't see anything else trying to include bpf_lpm_trie_key.

> 
> This will break the rdma-core userspace as well, with a similar
> error:
> 
> /usr/bin/clang-13 -DVERBS_DEBUG -Dibverbs_EXPORTS -Iinclude 
> -I/usr/include/libnl3 -I/usr/include/drm -g -O2 -fdebug-prefix-map=/__w/1/s=. 
> -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
> -D_FORTIFY_SOURCE=2 -Wmissing-prototypes -Wmissing-declarations 
> -Wwrite-strings -Wformat=2 -Wcast-function-type -Wformat-nonliteral 
> -Wdate-time -Wnested-externs -Wshadow -Wstrict-prototypes 
> -Wold-style-definition -Werror -Wredundant-decls -g -fPIC   -std=gnu11 -MD 
> -MT libibverbs/CMakeFiles/ibverbs.dir/cmd_flow.c.o -MF 
> libibverbs/CMakeFiles/ibverbs.dir/cmd_flow.c.o.d -o 
> libibverbs/CMakeFiles/ibverbs.dir/cmd_flow.c.o   -c ../libibverbs/cmd_flow.c
> In file included from ../libibverbs/cmd_flow.c:33:
> In file included from include/infiniband/cmd_write.h:36:
> In file included from include/infiniband/cmd_ioctl.h:41:
> In file included from include/infiniband/verbs.h:48:
> In file included from include/infiniband/verbs_api.h:66:
> In file included from include/infiniband/ib_user_ioctl_verbs.h:38:
> include/rdma/ib_user_verbs.h:436:34: error: field 'base' with variable sized 
> type 'struct ib_uverbs_create_cq_resp' not at the end of a struct or class is 
> a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end]
> struct ib_uverbs_create_cq_resp base;
> ^
> include/rdma/ib_user_verbs.h:644:34: error: field 'base' with variable sized 
> type 'struct ib_uverbs_create_qp_resp' not at the end of a struct or class is 
> a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end]
> struct ib_uverbs_create_qp_resp base;

This looks very similar, a struct of unknown size is being treated as a
header struct:

struct ib_uverbs_create_cq_resp {
__u32 cq_handle;
__u32 cqe;
__aligned_u64 driver_data[0];
};

struct ib_uverbs_ex_create_cq_resp {
struct ib_uverbs_create_cq_resp base;
__u32 comp_mask;
__u32 response_length;
};

And it only gets used here:

DECLARE_UVERBS_WRITE(IB_USER_VERBS_CMD_CREATE_CQ,
 ib_uverbs_create_cq,
 UAPI_DEF_WRITE_UDATA_IO(
 struct ib_uverbs_create_cq,
 struct ib_uverbs_create_cq_resp),
 ^^^
 UAPI_DEF_METHOD_NEEDS_FN(create_cq)),

which must also be assuming it's a header. So probably better to just
drop the driver_data field? I don't see anything using it (that I can
find) besides as a sanity-check that the field exists and is at the end
of the struct.

-- 
Kees Cook


Re: [Intel-gfx] [PATCH][next] treewide: uapi: Replace zero-length arrays with flexible-array members

2022-06-28 Thread Kees Cook
On Tue, Jun 28, 2022 at 09:27:21AM +0200, Geert Uytterhoeven wrote:
> Hi Gustavo,
> 
> Thanks for your patch!
> 
> On Mon, Jun 27, 2022 at 8:04 PM Gustavo A. R. Silva
>  wrote:
> > There is a regular need in the kernel to provide a way to declare
> > having a dynamically sized set of trailing elements in a structure.
> > Kernel code should always use “flexible array members”[1] for these
> > cases. The older style of one-element or zero-length arrays should
> > no longer be used[2].
> 
> These rules apply to the kernel, but uapi is not considered part of the
> kernel, so different rules apply.  Uapi header files should work with
> whatever compiler that can be used for compiling userspace.

Right, userspace isn't bound by these rules, but the kernel ends up
consuming these structures, so we need to fix them. The [0] -> []
changes (when they are not erroneously being used within other
structures) is valid for all compilers. Flexible arrays are C99; it's
been 23 years. :)

But, yes, where we DO break stuff we need to workaround it, etc.

-- 
Kees Cook


[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/gt: handle null ptr at sg traversing

2022-06-28 Thread Patchwork
== Series Details ==

Series: drm/i915/gt: handle null ptr at sg traversing
URL   : https://patchwork.freedesktop.org/series/105683/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_11816_full -> Patchwork_105683v1_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_105683v1_full absolutely need 
to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_105683v1_full, please notify your bug team to allow 
them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (13 -> 13)
--

  No changes in participating hosts

Possible new issues
---

  Here are the unknown changes that may have been introduced in 
Patchwork_105683v1_full:

### IGT changes ###

 Possible regressions 

  * igt@kms_cursor_legacy@flip-vs-cursor@toggle:
- shard-iclb: [PASS][1] -> [FAIL][2] +2 similar issues
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-iclb6/igt@kms_cursor_legacy@flip-vs-cur...@toggle.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105683v1/shard-iclb7/igt@kms_cursor_legacy@flip-vs-cur...@toggle.html

  * igt@kms_flip@flip-vs-absolute-wf_vblank-interruptible@a-edp1:
- shard-tglb: [PASS][3] -> [INCOMPLETE][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-tglb7/igt@kms_flip@flip-vs-absolute-wf_vblank-interrupti...@a-edp1.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105683v1/shard-tglb6/igt@kms_flip@flip-vs-absolute-wf_vblank-interrupti...@a-edp1.html

  

### Piglit changes ###

 Possible regressions 

  * spec@glsl-1.50@execution@built-in-functions@gs-op-bitor-abs-not-ivec4-ivec4:
- pig-skl-6260u:  NOTRUN -> [INCOMPLETE][5]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105683v1/pig-skl-6260u/spec@glsl-1.50@execution@built-in-functi...@gs-op-bitor-abs-not-ivec4-ivec4.html

  * spec@glsl-1.50@execution@texturesize@gs-texturesize-isampler3d:
- pig-glk-j5005:  NOTRUN -> [INCOMPLETE][6]
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105683v1/pig-glk-j5005/spec@glsl-1.50@execution@textures...@gs-texturesize-isampler3d.html

  
Known issues


  Here are the changes found in Patchwork_105683v1_full that come from known 
issues:

### CI changes ###

 Possible fixes 

  * boot:
- shard-skl:  ([PASS][7], [PASS][8], [PASS][9], [PASS][10], 
[PASS][11], [PASS][12], [PASS][13], [PASS][14], [PASS][15], [PASS][16], 
[PASS][17], [PASS][18], [PASS][19], [PASS][20], [PASS][21], [FAIL][22], 
[PASS][23], [PASS][24], [PASS][25], [PASS][26], [PASS][27], [PASS][28], 
[PASS][29], [PASS][30]) ([i915#5032]) -> ([PASS][31], [PASS][32], [PASS][33], 
[PASS][34], [PASS][35], [PASS][36], [PASS][37], [PASS][38], [PASS][39], 
[PASS][40], [PASS][41], [PASS][42], [PASS][43], [PASS][44], [PASS][45], 
[PASS][46], [PASS][47], [PASS][48], [PASS][49], [PASS][50], [PASS][51], 
[PASS][52], [PASS][53])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl9/boot.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl9/boot.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl9/boot.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl9/boot.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl9/boot.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl7/boot.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl7/boot.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl7/boot.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl7/boot.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl7/boot.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl4/boot.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl4/boot.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl4/boot.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl4/boot.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl3/boot.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl3/boot.html
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl1/boot.html
   [24]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl1/boot.html
   [25]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl1/boot.html
   [26]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl1/boot.html
   [27]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-skl10/boot.html
   [28]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816

[Intel-gfx] [CI 1/3] drm-tip: 2022y-06m-27d-16h-18m-47s UTC integration manifest

2022-06-28 Thread Lucas De Marchi
From: Ville Syrjälä 

---
 integration-manifest | 26 ++
 1 file changed, 26 insertions(+)
 create mode 100644 integration-manifest

diff --git a/integration-manifest b/integration-manifest
new file mode 100644
index ..baffa2a57cd4
--- /dev/null
+++ b/integration-manifest
@@ -0,0 +1,26 @@
+drm drm-fixes 03c765b0e3b4cb5063276b086c76f7a612856a9a
+   Linux 5.19-rc4
+drm-misc drm-misc-fixes 5f701324c0fb6f9f5aaac3f8d1575321375f6d8f
+   drm/vc4: perfmon: Fix variable dereferenced before check
+drm-intel drm-intel-fixes 79538490fd7ade244dba400923e792519a2bdfea
+   drm/i915: tweak the ordering in cpu_write_needs_clflush
+drm drm-next 805ada63ba0567b15d10d40419bcc5e6f0b461e6
+   Merge tag 'drm-intel-next-2022-06-22' of 
git://anongit.freedesktop.org/drm/drm-intel into drm-next
+drm-misc drm-misc-next-fixes 5ee8c8f930ba7d20717c4fc2d9f1ce0e757d1155
+   drm/rockchip: Change register space names in vop2
+drm-intel drm-intel-next-fixes f2906aa863381afb0015a9eb7fefad885d4e5a56
+   Linux 5.19-rc1
+drm-misc drm-misc-next 7d008eecb0cfc2b1a1a742d6faa0a02f339535c2
+   drm/stm: ltdc: update hardware error management
+drm-intel drm-intel-next f7fb92cd2e39357f14846d69ae0e1d8692371f82
+   drm/i915: Move the color stuff under INTEL_INFO->display
+drm-intel drm-intel-gt-next 7d8097073caa334ed6187a964645335324231e01
+   drm/i915: Prefer "XEHP_" prefix for registers
+sound-upstream for-linus 7cf3dead1ad70c72edb03e2d98e1f3dcd332cdb2
+   Linux 5.13
+sound-upstream for-next 7cf3dead1ad70c72edb03e2d98e1f3dcd332cdb2
+   Linux 5.13
+drm-intel topic/core-for-CI f7d7dddaab81eeae4508197b5f38f0b974d97b8c
+   topic/core-for-CI: Add remaining DG2 and ATS-M device IDs
+drm-misc topic/i915-ttm 1e3944578b749449bd7fa6bf0bae4c3d3f5f1733
+   Merge tag 'amd-drm-next-5.16-2021-09-27' of 
https://gitlab.freedesktop.org/agd5f/linux into drm-next
-- 
2.36.1



[Intel-gfx] [CI 2/3] iosys-map: Add per-word read

2022-06-28 Thread Lucas De Marchi
Instead of always falling back to memcpy_fromio() for any size, prefer
using read{b,w,l}(). When reading struct members it's common to read
individual integer variables individually. Going through memcpy_fromio()
for each of them poses a high penalty.

Employ a similar trick as __seqprop() by using _Generic() to generate
only the specific call based on a type-compatible variable.

For a pariticular i915 workload producing GPU context switches,
__get_engine_usage_record() is particularly hot since the engine usage
is read from device local memory with dgfx, possibly multiple times
since it's racy. Test execution time for this test shows a ~12.5%
improvement with DG2:

Before:
nrepeats = 1000; min = 7.63243e+06; max = 1.01817e+07;
median = 9.52548e+06; var = 526149;
After:
nrepeats = 1000; min = 7.03402e+06; max = 8.8832e+06;
median = 8.33955e+06; var = 333113;

Other things attempted that didn't prove very useful:
1) Change the _Generic() on x86 to just dereference the memory address
2) Change __get_engine_usage_record() to do just 1 read per loop,
   comparing with the previous value read
3) Change __get_engine_usage_record() to access the fields directly as it
   was before the conversion to iosys-map

(3) did gave a small improvement (~3%), but doesn't seem to scale well
to other similar cases in the driver.

Additional test by Chris Wilson using gem_create from igt with some
changes to track object creation time. This happens to accidentally
stress this code path:

Pre iosys_map conversion of engine busyness:
lmem0: Creating262144 4KiB objects took 59274.2ms

Unpatched:
lmem0: Creating262144 4KiB objects took 108830.2ms

With readl (this patch):
lmem0: Creating262144 4KiB objects took 61348.6ms

s/readl/READ_ONCE/
lmem0: Creating262144 4KiB objects took 61333.2ms

So we do take a little bit more time than before the conversion, but
that is due to other factors: bringing the READ_ONCE back would be as
good as just doing this conversion.

v2:
  - Remove default from _Generic() - callers wanting to read more
than u64 should use iosys_map_memcpy_from()
  - Add READ_ONCE() cases dereferencing the pointer when using system
memory
v3:
  - Fix precedence issue when casting inside READ_ONCE(). By not using ()
around vaddr__ the offset was not part of the cast, but rather added
to it, producing a wrong address
  - Remove compiletime_assert() as READ_ONCE() already contains it

Signed-off-by: Lucas De Marchi 
Reviewed-by: Christian König  # v1
Reviewed-by: Thomas Zimmermann 
---
 include/linux/iosys-map.h | 42 ++-
 1 file changed, 33 insertions(+), 9 deletions(-)

diff --git a/include/linux/iosys-map.h b/include/linux/iosys-map.h
index 4b8406ee8bc4..48e550b290fa 100644
--- a/include/linux/iosys-map.h
+++ b/include/linux/iosys-map.h
@@ -6,6 +6,7 @@
 #ifndef __IOSYS_MAP_H__
 #define __IOSYS_MAP_H__
 
+#include 
 #include 
 #include 
 
@@ -333,6 +334,23 @@ static inline void iosys_map_memset(struct iosys_map *dst, 
size_t offset,
memset(dst->vaddr + offset, value, len);
 }
 
+#ifdef CONFIG_64BIT
+#define __iosys_map_rd_io_u64_case(val_, vaddr_iomem_) 
\
+   u64: val_ = readq(vaddr_iomem_)
+#else
+#define __iosys_map_rd_io_u64_case(val_, vaddr_iomem_) 
\
+   u64: memcpy_fromio(&(val_), vaddr_iomem_, sizeof(u64))
+#endif
+
+#define __iosys_map_rd_io(val__, vaddr_iomem__, type__) _Generic(val__,
\
+   u8: val__ = readb(vaddr_iomem__),   
\
+   u16: val__ = readw(vaddr_iomem__),  
\
+   u32: val__ = readl(vaddr_iomem__),  
\
+   __iosys_map_rd_io_u64_case(val__, vaddr_iomem__))
+
+#define __iosys_map_rd_sys(val__, vaddr__, type__) 
\
+   val__ = READ_ONCE(*(type__ *)(vaddr__));
+
 /**
  * iosys_map_rd - Read a C-type value from the iosys_map
  *
@@ -340,16 +358,21 @@ static inline void iosys_map_memset(struct iosys_map 
*dst, size_t offset,
  * @offset__:  The offset from which to read
  * @type__:Type of the value being read
  *
- * Read a C type value from iosys_map, handling possible un-aligned accesses to
- * the mapping.
+ * Read a C type value (u8, u16, u32 and u64) from iosys_map. For other types 
or
+ * if pointer may be unaligned (and problematic for the architecture 
supported),
+ * use iosys_map_memcpy_from().
  *
  * Returns:
  * The value read from the mapping.
  */
-#define iosys_map_rd(map__, offset__, type__) ({   \
-   type__ val; \
-   iosys_map_memcpy_from(&val, map__, offset__, sizeof(val));  \
-   val;\
+#define iosys_map_rd(map__, offset__, type__) (

[Intel-gfx] [CI 3/3] iosys-map: Add per-word write

2022-06-28 Thread Lucas De Marchi
Like was done for read, provide the equivalent for write. Even if
current users are not in the hot path, this should future-proof it.

v2:
  - Remove default from _Generic() - callers wanting to write more
than u64 should use iosys_map_memcpy_to()
  - Add WRITE_ONCE() cases dereferencing the pointer when using system
memory
v3:
  - Fix precedence issue when casting inside WRITE_ONCE(). By not using ()
around vaddr__ the offset was not part of the cast, but rather added
to it, producing a wrong address
  - Remove compiletime_assert() as WRITE_ONCE() already contains it

Signed-off-by: Lucas De Marchi 
Reviewed-by: Reviewed-by: Christian König  # v1
Reviewed-by: Thomas Zimmermann 
---
 include/linux/iosys-map.h | 38 +-
 1 file changed, 29 insertions(+), 9 deletions(-)

diff --git a/include/linux/iosys-map.h b/include/linux/iosys-map.h
index 48e550b290fa..08dad5b0ad17 100644
--- a/include/linux/iosys-map.h
+++ b/include/linux/iosys-map.h
@@ -337,9 +337,13 @@ static inline void iosys_map_memset(struct iosys_map *dst, 
size_t offset,
 #ifdef CONFIG_64BIT
 #define __iosys_map_rd_io_u64_case(val_, vaddr_iomem_) 
\
u64: val_ = readq(vaddr_iomem_)
+#define __iosys_map_wr_io_u64_case(val_, vaddr_iomem_) 
\
+   u64: writeq(val_, vaddr_iomem_)
 #else
 #define __iosys_map_rd_io_u64_case(val_, vaddr_iomem_) 
\
u64: memcpy_fromio(&(val_), vaddr_iomem_, sizeof(u64))
+#define __iosys_map_wr_io_u64_case(val_, vaddr_iomem_) 
\
+   u64: memcpy_toio(vaddr_iomem_, &(val_), sizeof(u64))
 #endif
 
 #define __iosys_map_rd_io(val__, vaddr_iomem__, type__) _Generic(val__,
\
@@ -351,6 +355,15 @@ static inline void iosys_map_memset(struct iosys_map *dst, 
size_t offset,
 #define __iosys_map_rd_sys(val__, vaddr__, type__) 
\
val__ = READ_ONCE(*(type__ *)(vaddr__));
 
+#define __iosys_map_wr_io(val__, vaddr_iomem__, type__) _Generic(val__,
\
+   u8: writeb(val__, vaddr_iomem__),   
\
+   u16: writew(val__, vaddr_iomem__),  
\
+   u32: writel(val__, vaddr_iomem__),  
\
+   __iosys_map_wr_io_u64_case(val__, vaddr_iomem__))
+
+#define __iosys_map_wr_sys(val__, vaddr__, type__) 
\
+   WRITE_ONCE(*(type__ *)(vaddr__), val__);
+
 /**
  * iosys_map_rd - Read a C-type value from the iosys_map
  *
@@ -383,12 +396,17 @@ static inline void iosys_map_memset(struct iosys_map 
*dst, size_t offset,
  * @type__:Type of the value being written
  * @val__: Value to write
  *
- * Write a C-type value to the iosys_map, handling possible un-aligned accesses
- * to the mapping.
+ * Write a C type value (u8, u16, u32 and u64) to the iosys_map. For other 
types
+ * or if pointer may be unaligned (and problematic for the architecture
+ * supported), use iosys_map_memcpy_to()
  */
-#define iosys_map_wr(map__, offset__, type__, val__) ({
\
-   type__ val = (val__);   \
-   iosys_map_memcpy_to(map__, offset__, &val, sizeof(val));\
+#define iosys_map_wr(map__, offset__, type__, val__) ({
\
+   type__ val = (val__);   
\
+   if ((map__)->is_iomem) {
\
+   __iosys_map_wr_io(val, (map__)->vaddr_iomem + (offset__), 
type__);\
+   } else {
\
+   __iosys_map_wr_sys(val, (map__)->vaddr + (offset__), type__);   
\
+   }   
\
 })
 
 /**
@@ -469,10 +487,12 @@ static inline void iosys_map_memset(struct iosys_map 
*dst, size_t offset,
  * @field__:   Member of the struct to read
  * @val__: Value to write
  *
- * Write a value to the iosys_map considering its layout is described by a C 
struct
- * starting at @struct_offset__. The field offset and size is calculated and 
the
- * @val__ is written handling possible un-aligned memory accesses. Refer to
- * iosys_map_rd_field() for expected usage and memory layout.
+ * Write a value to the iosys_map considering its layout is described by a C
+ * struct starting at @struct_offset__. The field offset and size is calculated
+ * and the @val__ is written. If the field access would incur in un-aligned
+ * access, then either iosys_map_memcpy_to() needs to be used or the
+ * architecture must support it. Refer to iosys_map_rd_field() for expected
+ * usage and memory layout.
  */
 #define iosys_map_wr_field(map__, struct_offset__, struct_type__, field__, 
val__) ({   \
struct_type__ *s;  

Re: [Intel-gfx] [CI 1/3] drm-tip: 2022y-06m-27d-16h-18m-47s UTC integration manifest

2022-06-28 Thread Lucas De Marchi

On Tue, Jun 28, 2022 at 11:47:45AM -0700, Lucas De Marchi wrote:

From: Ville Syrjälä 


Sorry for the noise.

This should NOT be the patch 1, of course. It went here beacuse my local
and remote branch were out of sync (and drm-tip/drm-tip.. then includes
it)

This is intended for CI, but it will fail to apply. I will re-submit
this.

Lucas De Marchi


[Intel-gfx] [CI 2/2] iosys-map: Add per-word write

2022-06-28 Thread Lucas De Marchi
Like was done for read, provide the equivalent for write. Even if
current users are not in the hot path, this should future-proof it.

v2:
  - Remove default from _Generic() - callers wanting to write more
than u64 should use iosys_map_memcpy_to()
  - Add WRITE_ONCE() cases dereferencing the pointer when using system
memory
v3:
  - Fix precedence issue when casting inside WRITE_ONCE(). By not using ()
around vaddr__ the offset was not part of the cast, but rather added
to it, producing a wrong address
  - Remove compiletime_assert() as WRITE_ONCE() already contains it

Signed-off-by: Lucas De Marchi 
Reviewed-by: Reviewed-by: Christian König  # v1
Reviewed-by: Thomas Zimmermann 
---
 include/linux/iosys-map.h | 38 +-
 1 file changed, 29 insertions(+), 9 deletions(-)

diff --git a/include/linux/iosys-map.h b/include/linux/iosys-map.h
index 48e550b290fa..08dad5b0ad17 100644
--- a/include/linux/iosys-map.h
+++ b/include/linux/iosys-map.h
@@ -337,9 +337,13 @@ static inline void iosys_map_memset(struct iosys_map *dst, 
size_t offset,
 #ifdef CONFIG_64BIT
 #define __iosys_map_rd_io_u64_case(val_, vaddr_iomem_) 
\
u64: val_ = readq(vaddr_iomem_)
+#define __iosys_map_wr_io_u64_case(val_, vaddr_iomem_) 
\
+   u64: writeq(val_, vaddr_iomem_)
 #else
 #define __iosys_map_rd_io_u64_case(val_, vaddr_iomem_) 
\
u64: memcpy_fromio(&(val_), vaddr_iomem_, sizeof(u64))
+#define __iosys_map_wr_io_u64_case(val_, vaddr_iomem_) 
\
+   u64: memcpy_toio(vaddr_iomem_, &(val_), sizeof(u64))
 #endif
 
 #define __iosys_map_rd_io(val__, vaddr_iomem__, type__) _Generic(val__,
\
@@ -351,6 +355,15 @@ static inline void iosys_map_memset(struct iosys_map *dst, 
size_t offset,
 #define __iosys_map_rd_sys(val__, vaddr__, type__) 
\
val__ = READ_ONCE(*(type__ *)(vaddr__));
 
+#define __iosys_map_wr_io(val__, vaddr_iomem__, type__) _Generic(val__,
\
+   u8: writeb(val__, vaddr_iomem__),   
\
+   u16: writew(val__, vaddr_iomem__),  
\
+   u32: writel(val__, vaddr_iomem__),  
\
+   __iosys_map_wr_io_u64_case(val__, vaddr_iomem__))
+
+#define __iosys_map_wr_sys(val__, vaddr__, type__) 
\
+   WRITE_ONCE(*(type__ *)(vaddr__), val__);
+
 /**
  * iosys_map_rd - Read a C-type value from the iosys_map
  *
@@ -383,12 +396,17 @@ static inline void iosys_map_memset(struct iosys_map 
*dst, size_t offset,
  * @type__:Type of the value being written
  * @val__: Value to write
  *
- * Write a C-type value to the iosys_map, handling possible un-aligned accesses
- * to the mapping.
+ * Write a C type value (u8, u16, u32 and u64) to the iosys_map. For other 
types
+ * or if pointer may be unaligned (and problematic for the architecture
+ * supported), use iosys_map_memcpy_to()
  */
-#define iosys_map_wr(map__, offset__, type__, val__) ({
\
-   type__ val = (val__);   \
-   iosys_map_memcpy_to(map__, offset__, &val, sizeof(val));\
+#define iosys_map_wr(map__, offset__, type__, val__) ({
\
+   type__ val = (val__);   
\
+   if ((map__)->is_iomem) {
\
+   __iosys_map_wr_io(val, (map__)->vaddr_iomem + (offset__), 
type__);\
+   } else {
\
+   __iosys_map_wr_sys(val, (map__)->vaddr + (offset__), type__);   
\
+   }   
\
 })
 
 /**
@@ -469,10 +487,12 @@ static inline void iosys_map_memset(struct iosys_map 
*dst, size_t offset,
  * @field__:   Member of the struct to read
  * @val__: Value to write
  *
- * Write a value to the iosys_map considering its layout is described by a C 
struct
- * starting at @struct_offset__. The field offset and size is calculated and 
the
- * @val__ is written handling possible un-aligned memory accesses. Refer to
- * iosys_map_rd_field() for expected usage and memory layout.
+ * Write a value to the iosys_map considering its layout is described by a C
+ * struct starting at @struct_offset__. The field offset and size is calculated
+ * and the @val__ is written. If the field access would incur in un-aligned
+ * access, then either iosys_map_memcpy_to() needs to be used or the
+ * architecture must support it. Refer to iosys_map_rd_field() for expected
+ * usage and memory layout.
  */
 #define iosys_map_wr_field(map__, struct_offset__, struct_type__, field__, 
val__) ({   \
struct_type__ *s;  

[Intel-gfx] [CI 1/2] iosys-map: Add per-word read

2022-06-28 Thread Lucas De Marchi
Instead of always falling back to memcpy_fromio() for any size, prefer
using read{b,w,l}(). When reading struct members it's common to read
individual integer variables individually. Going through memcpy_fromio()
for each of them poses a high penalty.

Employ a similar trick as __seqprop() by using _Generic() to generate
only the specific call based on a type-compatible variable.

For a pariticular i915 workload producing GPU context switches,
__get_engine_usage_record() is particularly hot since the engine usage
is read from device local memory with dgfx, possibly multiple times
since it's racy. Test execution time for this test shows a ~12.5%
improvement with DG2:

Before:
nrepeats = 1000; min = 7.63243e+06; max = 1.01817e+07;
median = 9.52548e+06; var = 526149;
After:
nrepeats = 1000; min = 7.03402e+06; max = 8.8832e+06;
median = 8.33955e+06; var = 333113;

Other things attempted that didn't prove very useful:
1) Change the _Generic() on x86 to just dereference the memory address
2) Change __get_engine_usage_record() to do just 1 read per loop,
   comparing with the previous value read
3) Change __get_engine_usage_record() to access the fields directly as it
   was before the conversion to iosys-map

(3) did gave a small improvement (~3%), but doesn't seem to scale well
to other similar cases in the driver.

Additional test by Chris Wilson using gem_create from igt with some
changes to track object creation time. This happens to accidentally
stress this code path:

Pre iosys_map conversion of engine busyness:
lmem0: Creating262144 4KiB objects took 59274.2ms

Unpatched:
lmem0: Creating262144 4KiB objects took 108830.2ms

With readl (this patch):
lmem0: Creating262144 4KiB objects took 61348.6ms

s/readl/READ_ONCE/
lmem0: Creating262144 4KiB objects took 61333.2ms

So we do take a little bit more time than before the conversion, but
that is due to other factors: bringing the READ_ONCE back would be as
good as just doing this conversion.

v2:
  - Remove default from _Generic() - callers wanting to read more
than u64 should use iosys_map_memcpy_from()
  - Add READ_ONCE() cases dereferencing the pointer when using system
memory
v3:
  - Fix precedence issue when casting inside READ_ONCE(). By not using ()
around vaddr__ the offset was not part of the cast, but rather added
to it, producing a wrong address
  - Remove compiletime_assert() as READ_ONCE() already contains it

Signed-off-by: Lucas De Marchi 
Reviewed-by: Christian König  # v1
Reviewed-by: Thomas Zimmermann 
---
 include/linux/iosys-map.h | 42 ++-
 1 file changed, 33 insertions(+), 9 deletions(-)

diff --git a/include/linux/iosys-map.h b/include/linux/iosys-map.h
index 4b8406ee8bc4..48e550b290fa 100644
--- a/include/linux/iosys-map.h
+++ b/include/linux/iosys-map.h
@@ -6,6 +6,7 @@
 #ifndef __IOSYS_MAP_H__
 #define __IOSYS_MAP_H__
 
+#include 
 #include 
 #include 
 
@@ -333,6 +334,23 @@ static inline void iosys_map_memset(struct iosys_map *dst, 
size_t offset,
memset(dst->vaddr + offset, value, len);
 }
 
+#ifdef CONFIG_64BIT
+#define __iosys_map_rd_io_u64_case(val_, vaddr_iomem_) 
\
+   u64: val_ = readq(vaddr_iomem_)
+#else
+#define __iosys_map_rd_io_u64_case(val_, vaddr_iomem_) 
\
+   u64: memcpy_fromio(&(val_), vaddr_iomem_, sizeof(u64))
+#endif
+
+#define __iosys_map_rd_io(val__, vaddr_iomem__, type__) _Generic(val__,
\
+   u8: val__ = readb(vaddr_iomem__),   
\
+   u16: val__ = readw(vaddr_iomem__),  
\
+   u32: val__ = readl(vaddr_iomem__),  
\
+   __iosys_map_rd_io_u64_case(val__, vaddr_iomem__))
+
+#define __iosys_map_rd_sys(val__, vaddr__, type__) 
\
+   val__ = READ_ONCE(*(type__ *)(vaddr__));
+
 /**
  * iosys_map_rd - Read a C-type value from the iosys_map
  *
@@ -340,16 +358,21 @@ static inline void iosys_map_memset(struct iosys_map 
*dst, size_t offset,
  * @offset__:  The offset from which to read
  * @type__:Type of the value being read
  *
- * Read a C type value from iosys_map, handling possible un-aligned accesses to
- * the mapping.
+ * Read a C type value (u8, u16, u32 and u64) from iosys_map. For other types 
or
+ * if pointer may be unaligned (and problematic for the architecture 
supported),
+ * use iosys_map_memcpy_from().
  *
  * Returns:
  * The value read from the mapping.
  */
-#define iosys_map_rd(map__, offset__, type__) ({   \
-   type__ val; \
-   iosys_map_memcpy_from(&val, map__, offset__, sizeof(val));  \
-   val;\
+#define iosys_map_rd(map__, offset__, type__) (

[Intel-gfx] [PATCH] drm/i915/reset: Handle reset timeouts under unrelated kernel hangs

2022-06-28 Thread Ashutosh Dixit
From: Chris Wilson 

When resuming after hibernate sometimes we see hangs in unrelated kernel
subsystems. These hangs often result in the following i915 trace:

i915 :00:02.0: [drm] \
*ERROR* intel_gt_reset_global timed out, cancelling all in-flight 
rendering.

implying our reset task has been starved by the hanging kernel subsystem,
causing us to inappropiately declare the system as wedged beyond recovery.

The trace would be caused by our synchronize_srcu_expedited() taking more
than the allowed 5s due to the unrelated kernel hang. But we neither need
to perform that synchronisation inside the reset watchdog, nor do we need
such a short timeout before declaring the device as unrecoverable.

Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/3575
Signed-off-by: Chris Wilson 
Signed-off-by: Ashutosh Dixit 
---
 drivers/gpu/drm/i915/gt/intel_reset.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c 
b/drivers/gpu/drm/i915/gt/intel_reset.c
index a5338c3fde7a0..e72744f6faedc 100644
--- a/drivers/gpu/drm/i915/gt/intel_reset.c
+++ b/drivers/gpu/drm/i915/gt/intel_reset.c
@@ -1259,12 +1259,9 @@ static void intel_gt_reset_global(struct intel_gt *gt,
kobject_uevent_env(kobj, KOBJ_CHANGE, reset_event);
 
/* Use a watchdog to ensure that our reset completes */
-   intel_wedge_on_timeout(&w, gt, 5 * HZ) {
+   intel_wedge_on_timeout(&w, gt, 60 * HZ) {
intel_display_prepare_reset(gt->i915);
 
-   /* Flush everyone using a resource about to be clobbered */
-   synchronize_srcu_expedited(>->reset.backoff_srcu);
-
intel_gt_reset(gt, engine_mask, reason);
 
intel_display_finish_reset(gt->i915);
@@ -1373,6 +1370,9 @@ void intel_gt_handle_error(struct intel_gt *gt,
}
}
 
+   /* Flush everyone using a resource about to be clobbered */
+   synchronize_srcu_expedited(>->reset.backoff_srcu);
+
intel_gt_reset_global(gt, engine_mask, msg);
 
if (!intel_uc_uses_guc_submission(>->uc)) {
-- 
2.36.1



[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/guc: ADL-N should use the same GuC FW as ADL-S (rev2)

2022-06-28 Thread Patchwork
== Series Details ==

Series: drm/i915/guc: ADL-N should use the same GuC FW as ADL-S (rev2)
URL   : https://patchwork.freedesktop.org/series/105444/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_11816_full -> Patchwork_105444v2_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_105444v2_full absolutely need 
to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_105444v2_full, please notify your bug team to allow 
them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (13 -> 13)
--

  No changes in participating hosts

Possible new issues
---

  Here are the unknown changes that may have been introduced in 
Patchwork_105444v2_full:

### IGT changes ###

 Possible regressions 

  * igt@gem_exec_parallel@fds@vcs0:
- shard-iclb: [PASS][1] -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-iclb1/igt@gem_exec_parallel@f...@vcs0.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v2/shard-iclb3/igt@gem_exec_parallel@f...@vcs0.html

  * igt@gem_exec_schedule@preempt-other@vcs0:
- shard-glk:  [PASS][3] -> [INCOMPLETE][4] +2 similar issues
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk9/igt@gem_exec_schedule@preempt-ot...@vcs0.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v2/shard-glk5/igt@gem_exec_schedule@preempt-ot...@vcs0.html

  

### Piglit changes ###

 Possible regressions 

  * 
spec@arb_gpu_shader_int64@execution@conversion@vert-conversion-implicit-ivec2-i64vec2:
- pig-glk-j5005:  NOTRUN -> [CRASH][5]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v2/pig-glk-j5005/spec@arb_gpu_shader_int64@execution@convers...@vert-conversion-implicit-ivec2-i64vec2.html

  * spec@glsl-1.20@execution@fs-outerproduct-mat3x3:
- pig-skl-6260u:  NOTRUN -> [INCOMPLETE][6]
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v2/pig-skl-6260u/spec@glsl-1.20@execut...@fs-outerproduct-mat3x3.html

  
Known issues


  Here are the changes found in Patchwork_105444v2_full that come from known 
issues:

### CI changes ###

 Issues hit 

  * boot:
- shard-glk:  ([PASS][7], [PASS][8], [PASS][9], [PASS][10], 
[PASS][11], [PASS][12], [PASS][13], [PASS][14], [PASS][15], [PASS][16], 
[PASS][17], [PASS][18], [PASS][19], [PASS][20], [PASS][21], [PASS][22], 
[PASS][23], [PASS][24], [PASS][25], [PASS][26], [PASS][27], [PASS][28], 
[PASS][29], [PASS][30], [PASS][31]) -> ([FAIL][32], [PASS][33], [PASS][34], 
[PASS][35], [PASS][36], [PASS][37], [PASS][38], [PASS][39], [PASS][40], 
[PASS][41], [PASS][42], [PASS][43], [PASS][44], [PASS][45], [PASS][46], 
[PASS][47], [PASS][48], [PASS][49], [PASS][50], [PASS][51], [PASS][52], 
[PASS][53], [PASS][54], [PASS][55], [PASS][56]) ([i915#4392])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk6/boot.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk1/boot.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk1/boot.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk1/boot.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk2/boot.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk2/boot.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk2/boot.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk9/boot.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk3/boot.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk3/boot.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk3/boot.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk9/boot.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk9/boot.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk5/boot.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk5/boot.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk8/boot.html
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk8/boot.html
   [24]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk5/boot.html
   [25]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk5/boot.html
   [26]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk8/boot.html
   [27]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk7/boot.html
   [28]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11816/shard-glk7/boot.html
   [29]: 
https://intel-gfx-ci.01.org

Re: [Intel-gfx] [PATCH v6 01/22] drm/gem: Properly annotate WW context on drm_gem_lock_reservations() error

2022-06-28 Thread Intel

Hi,

On 5/27/22 01:50, Dmitry Osipenko wrote:

Use ww_acquire_fini() in the error code paths. Otherwise lockdep
thinks that lock is held when lock's memory is freed after the
drm_gem_lock_reservations() error. The WW needs to be annotated
as "freed"


s /WW/ww_acquire_context/ ?
s /"freed"/"released"/ ?



, which fixes the noisy "WARNING: held lock freed!" splat
of VirtIO-GPU driver with CONFIG_DEBUG_MUTEXES=y and enabled lockdep.

Cc: sta...@vger.kernel.org


Can you dig up the commit in error and add a Fixes: Tag?

Using that and "dim fixes" will also make the Cc: stable tag a bit more 
verbose.


With that fixed,

Reviewed-by: Thomas Hellström 



Signed-off-by: Dmitry Osipenko 
---
  drivers/gpu/drm/drm_gem.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index eb0c2d041f13..86d670c71286 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -1226,7 +1226,7 @@ drm_gem_lock_reservations(struct drm_gem_object **objs, 
int count,
ret = dma_resv_lock_slow_interruptible(obj->resv,
 acquire_ctx);
if (ret) {
-   ww_acquire_done(acquire_ctx);
+   ww_acquire_fini(acquire_ctx);
return ret;
}
}
@@ -1251,7 +1251,7 @@ drm_gem_lock_reservations(struct drm_gem_object **objs, 
int count,
goto retry;
}
  
-			ww_acquire_done(acquire_ctx);

+   ww_acquire_fini(acquire_ctx);
return ret;
}
}


[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Delay disabling scheduling on a context (rev2)

2022-06-28 Thread Patchwork
== Series Details ==

Series: Delay disabling scheduling on a context (rev2)
URL   : https://patchwork.freedesktop.org/series/96167/
State : warning

== Summary ==

Error: dim checkpatch failed
09acc7bdc695 drm/i915/selftests: Use correct selfest calls for live tests
2b07a6d7f9ea drm/i915/guc: Add delay to disable scheduling after pin count goes 
to zero
-:49: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description 
(prefer a maximum 75 chars per line)
#49: 
context was constantly idling between submissions. This was causing thrashing

total: 0 errors, 1 warnings, 0 checks, 352 lines checked




[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Delay disabling scheduling on a context (rev2)

2022-06-28 Thread Patchwork
== Series Details ==

Series: Delay disabling scheduling on a context (rev2)
URL   : https://patchwork.freedesktop.org/series/96167/
State : warning

== Summary ==

Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.




[Intel-gfx] ✗ Fi.CI.BAT: failure for Delay disabling scheduling on a context (rev2)

2022-06-28 Thread Patchwork
== Series Details ==

Series: Delay disabling scheduling on a context (rev2)
URL   : https://patchwork.freedesktop.org/series/96167/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_11820 -> Patchwork_96167v2


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_96167v2 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_96167v2, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_96167v2/index.html

Participating hosts (38 -> 39)
--

  Additional (1): bat-dg2-9 

Possible new issues
---

  Here are the unknown changes that may have been introduced in 
Patchwork_96167v2:

### IGT changes ###

 Possible regressions 

  * igt@core_auth@basic-auth:
- fi-rkl-guc: [PASS][1] -> [TIMEOUT][2] +4 similar issues
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-rkl-guc/igt@core_a...@basic-auth.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_96167v2/fi-rkl-guc/igt@core_a...@basic-auth.html
- bat-dg1-6:  [PASS][3] -> [TIMEOUT][4] +2 similar issues
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/bat-dg1-6/igt@core_a...@basic-auth.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_96167v2/bat-dg1-6/igt@core_a...@basic-auth.html

  * igt@debugfs_test@read_all_entries:
- bat-adlp-4: [PASS][5] -> [TIMEOUT][6] +2 similar issues
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/bat-adlp-4/igt@debugfs_test@read_all_entries.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_96167v2/bat-adlp-4/igt@debugfs_test@read_all_entries.html

  * igt@gem_basic@bad-close:
- bat-adlp-4: [PASS][7] -> [INCOMPLETE][8]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/bat-adlp-4/igt@gem_ba...@bad-close.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_96167v2/bat-adlp-4/igt@gem_ba...@bad-close.html
- bat-dg1-6:  [PASS][9] -> [INCOMPLETE][10]
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/bat-dg1-6/igt@gem_ba...@bad-close.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_96167v2/bat-dg1-6/igt@gem_ba...@bad-close.html

  
 Suppressed 

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@core_auth@basic-auth:
- {bat-dg2-9}:NOTRUN -> [TIMEOUT][11] +2 similar issues
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_96167v2/bat-dg2-9/igt@core_a...@basic-auth.html
- {bat-dg2-8}:[PASS][12] -> [TIMEOUT][13]
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/bat-dg2-8/igt@core_a...@basic-auth.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_96167v2/bat-dg2-8/igt@core_a...@basic-auth.html

  * igt@debugfs_test@read_all_entries:
- {bat-adln-1}:   [PASS][14] -> [TIMEOUT][15] +2 similar issues
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/bat-adln-1/igt@debugfs_test@read_all_entries.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_96167v2/bat-adln-1/igt@debugfs_test@read_all_entries.html
- {bat-dg2-8}:[PASS][16] -> [INCOMPLETE][17]
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/bat-dg2-8/igt@debugfs_test@read_all_entries.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_96167v2/bat-dg2-8/igt@debugfs_test@read_all_entries.html

  * igt@gem_basic@bad-close:
- {bat-adlp-6}:   [PASS][18] -> [INCOMPLETE][19]
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/bat-adlp-6/igt@gem_ba...@bad-close.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_96167v2/bat-adlp-6/igt@gem_ba...@bad-close.html
- {bat-adln-1}:   [PASS][20] -> [INCOMPLETE][21]
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/bat-adln-1/igt@gem_ba...@bad-close.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_96167v2/bat-adln-1/igt@gem_ba...@bad-close.html
- {bat-dg2-9}:NOTRUN -> [INCOMPLETE][22]
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_96167v2/bat-dg2-9/igt@gem_ba...@bad-close.html

  * igt@i915_module_load@load:
- {bat-adlp-6}:   [PASS][23] -> [TIMEOUT][24] +2 similar issues
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/bat-adlp-6/igt@i915_module_l...@load.html
   [24]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_96167v2/bat-adlp-6/igt@i915_module_l...@load.html
- {bat-dg2-8}:[DMESG-WARN][25] ([i915#5763]) -> [TIMEOUT][26]
   [25]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/bat-dg2-8/igt@i915_module_l...@load.html
   [26]: 
https://int

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/edid: expand on struct drm_edid usage (rev7)

2022-06-28 Thread Patchwork
== Series Details ==

Series: drm/edid: expand on struct drm_edid usage (rev7)
URL   : https://patchwork.freedesktop.org/series/104309/
State : warning

== Summary ==

Error: dim checkpatch failed
a51b7acd926d drm/edid: move drm_connector_update_edid_property() to drm_edid.c
42329ce39f03 drm/edid: convert drm_connector_update_edid_property() to struct 
drm_edid
65b3bc9a5dde drm/edid: clean up connector update error handling and debug 
logging
e47558e4ec70 drm/edid: abstract debugfs override EDID set/reset
6157f79b9e20 drm/edid: add drm_edid_connector_update()
1fe859695cb5 drm/probe-helper: add drm_connector_helper_get_modes()
740b3db8ef8f drm/edid: add drm_edid_raw() to access the raw EDID data
4bbed2192f9d drm/i915/edid: convert DP, HDMI and LVDS to drm_edid
-:270: CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written "drm_edid"
#270: FILE: drivers/gpu/drm/i915/display/intel_hdmi.c:2429:
+   intel_hdmi_dp_dual_mode_detect(connector, drm_edid != NULL);

total: 0 errors, 0 warnings, 1 checks, 311 lines checked
9611271c929d drm/i915/bios: convert intel_bios_init_panel() to drm_edid
b4a3363b9a8e drm/edid: do invalid block filtering in-place
854313aa1ac6 drm/edid: add HF-EEODB support to EDID read and allocation
e528374d09d0 drm/edid: take HF-EEODB extension count into account
b7f101903aaf drm/todo: add entry for converting the subsystem to struct drm_edid




[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/edid: expand on struct drm_edid usage (rev7)

2022-06-28 Thread Patchwork
== Series Details ==

Series: drm/edid: expand on struct drm_edid usage (rev7)
URL   : https://patchwork.freedesktop.org/series/104309/
State : warning

== Summary ==

Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.




[Intel-gfx] ✓ Fi.CI.BAT: success for drm/edid: expand on struct drm_edid usage (rev7)

2022-06-28 Thread Patchwork
== Series Details ==

Series: drm/edid: expand on struct drm_edid usage (rev7)
URL   : https://patchwork.freedesktop.org/series/104309/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_11820 -> Patchwork_104309v7


Summary
---

  **SUCCESS**

  No regressions found.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104309v7/index.html

Participating hosts (38 -> 33)
--

  Additional (1): bat-dg2-9 
  Missing(6): fi-kbl-soraka bat-dg1-6 bat-dg2-8 bat-adlp-6 bat-adlp-4 
bat-adln-1 

Known issues


  Here are the changes found in Patchwork_104309v7 that come from known issues:

### IGT changes ###

 Issues hit 

  * 
igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size:
- fi-bsw-kefka:   [PASS][1] -> [FAIL][2] ([i915#6298])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cur...@atomic-transitions-varying-size.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104309v7/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cur...@atomic-transitions-varying-size.html

  * igt@kms_flip@basic-plain-flip@a-edp1:
- fi-tgl-u2:  [PASS][3] -> [DMESG-WARN][4] ([i915#402]) +1 similar 
issue
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-tgl-u2/igt@kms_flip@basic-plain-f...@a-edp1.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104309v7/fi-tgl-u2/igt@kms_flip@basic-plain-f...@a-edp1.html

  
 Possible fixes 

  * igt@i915_pm_rps@basic-api:
- fi-hsw-4770:[FAIL][5] -> [PASS][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-hsw-4770/igt@i915_pm_...@basic-api.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104309v7/fi-hsw-4770/igt@i915_pm_...@basic-api.html

  * igt@i915_selftest@live@gtt:
- fi-bdw-5557u:   [DMESG-FAIL][7] ([i915#3674]) -> [PASS][8]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-bdw-5557u/igt@i915_selftest@l...@gtt.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104309v7/fi-bdw-5557u/igt@i915_selftest@l...@gtt.html

  * igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1:
- fi-tgl-u2:  [DMESG-WARN][9] ([i915#402]) -> [PASS][10]
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-tgl-u2/igt@kms_flip@basic-flip-vs-wf_vbl...@a-edp1.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_104309v7/fi-tgl-u2/igt@kms_flip@basic-flip-vs-wf_vbl...@a-edp1.html

  
  {name}: This element is suppressed. This means it is ignored when computing
  the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
  [i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3595]: https://gitlab.freedesktop.org/drm/intel/issues/3595
  [i915#3674]: https://gitlab.freedesktop.org/drm/intel/issues/3674
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
  [i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
  [i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
  [i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
  [i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
  [i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
  [i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
  [i915#4873]: https://gitlab.freedesktop.org/drm/intel/issues/4873
  [i915#5174]: https://gitlab.freedesktop.org/drm/intel/issues/5174
  [i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190
  [i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
  [i915#5763]: https://gitlab.freedesktop.org/drm/intel/issues/5763
  [i915#6298]: https://gitlab.freedesktop.org/drm/intel/issues/6298


Build changes
-

  * Linux: CI_DRM_11820 -> Patchwork_104309v7

  CI-20190529: 20190529
  CI_DRM_11820: 8f4a9176de36698b5b3ba72c4f68f1cf7a15c0c9 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6549: 9b9371c8da32533022ad700a7c023b4c3a085fbc @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_104309v7: 8f4a9176de36698b5b3ba72c4f68f1cf7a15c0c9 @ 
git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

b467a93943b6 drm/todo: add entry for converting the subsystem to struct drm_edid
ddecf7fde651 drm/edid: take HF-EEODB extension count i

Re: [Intel-gfx] [PATCH 2/3] drm/i915/ttm: don't overwrite cache_dirty after setting coherency

2022-06-28 Thread Robert Beckett




On 14/06/2022 18:55, Matthew Auld wrote:

On Tue, 14 Jun 2022 at 02:14, Adrian Larumbe
 wrote:


When i915_gem_object_set_cache_level sets the GEM object's cache_dirty to
true, in the case of TTM that will sometimes be overwritten when getting
the object's pages, more specifically for shmem-placed objects for which
its ttm structure has just been populated.

This wasn't an issue so far, even though intel_dpt_create was setting the
object's cache level to 'none', regardless of the platform and memory
placement of the framebuffer. However, commit 2f0ec95ed20c ("drm/i915/ttm:
dont trample cache_level overrides during ttm move") makes sure the cache
level set by older backends soon to be managed by TTM isn't altered after
their TTM bo ttm structure is populated.

However this led to the 'obj->cache_dirty = true' set in
i915_gem_object_set_cache_level to stick around rather than being reset
inside i915_ttm_adjust_gem_after_move after calling ttm_tt_populate in
__i915_ttm_get_pages, which eventually led to a warning in DGFX platforms.

There also seems to be no need for this statement to be kept in
i915_gem_object_set_cache_level, since i915_gem_object_set_cache_coherency
is already taking care of it, and also considering whether it's a discrete
platform.

Remove statement altogether.

Signed-off-by: Adrian Larumbe 
---
  drivers/gpu/drm/i915/gem/i915_gem_domain.c | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_domain.c 
b/drivers/gpu/drm/i915/gem/i915_gem_domain.c
index 3e5d6057b3ef..b2c9e16bfa55 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_domain.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_domain.c
@@ -273,10 +273,8 @@ int i915_gem_object_set_cache_level(struct 
drm_i915_gem_object *obj,
 return ret;

 /* Always invalidate stale cachelines */
-   if (obj->cache_level != cache_level) {
+   if (obj->cache_level != cache_level)
 i915_gem_object_set_cache_coherency(obj, cache_level);
-   obj->cache_dirty = true;


Maybe ban calling this on dgpu or have it fail silently? At the ioctl
level this should already be banned.

Ignoring dgpu, the cache_dirty handling is quite thorny on non-LLC
platforms. I'm not sure if there are other historical reasons for
having this here, but one big issue is that we are not allowed to
freely set cache_dirty = false, unless we are certain that the pages
underneath have been populated and the potential flush-on-acquire
completed. See the kernel-doc for @cache_dirty for more details.


given the commit "068b1bd09253 drm/i915: stop setting cache_dirty on 
discrete"
with it's justification of cache_dirty should not be set on discreet as 
it is not needed, I think this patch should change to set


obj->cache_dirty = !IS_DGFX(to_i915(obj->base.dev));

along with the assignment in flush_write_domain()

and should be considered a fix for that patch.

It should keep the asignment for integrated as it's original purpose 
still holds there.







-   }

 /* The cache-level will be applied when each vma is rebound. */
 return i915_gem_object_unbind(obj,
--
2.36.1



Re: [Intel-gfx] [PATCH v6 14/22] dma-buf: Introduce new locking convention

2022-06-28 Thread Intel



On 5/30/22 15:57, Dmitry Osipenko wrote:

On 5/30/22 16:41, Christian König wrote:

Hi Dmitry,

Am 30.05.22 um 15:26 schrieb Dmitry Osipenko:

Hello Christian,

On 5/30/22 09:50, Christian König wrote:

Hi Dmitry,

First of all please separate out this patch from the rest of the series,
since this is a complex separate structural change.

I assume all the patches will go via the DRM tree in the end since the
rest of the DRM patches in this series depend on this dma-buf change.
But I see that separation may ease reviewing of the dma-buf changes, so
let's try it.

That sounds like you are underestimating a bit how much trouble this
will be.


I have tried this before and failed because catching all the locks in
the right code paths are very tricky. So expect some fallout from this
and make sure the kernel test robot and CI systems are clean.

Sure, I'll fix up all the reported things in the next iteration.

BTW, have you ever posted yours version of the patch? Will be great if
we could compare the changed code paths.

No, I never even finished creating it after realizing how much work it
would be.


This patch introduces new locking convention for dma-buf users. From
now
on all dma-buf importers are responsible for holding dma-buf
reservation
lock around operations performed over dma-bufs.

This patch implements the new dma-buf locking convention by:

     1. Making dma-buf API functions to take the reservation lock.

     2. Adding new locked variants of the dma-buf API functions for
drivers
    that need to manage imported dma-bufs under the held lock.

Instead of adding new locked variants please mark all variants which
expect to be called without a lock with an _unlocked postfix.

This should make it easier to remove those in a follow up patch set and
then fully move the locking into the importer.

Do we really want to move all the locks to the importers? Seems the
majority of drivers should be happy with the dma-buf helpers handling
the locking for them.

Yes, I clearly think so.


     3. Converting all drivers to the new locking scheme.

I have strong doubts that you got all of them. At least radeon and
nouveau should grab the reservation lock in their ->attach callbacks
somehow.

Radeon and Nouveau use gem_prime_import_sg_table() and they take resv
lock already, seems they should be okay (?)

You are looking at the wrong side. You need to fix the export code path,
not the import ones.

See for example attach on radeon works like this
drm_gem_map_attach->drm_gem_pin->radeon_gem_prime_pin->radeon_bo_reserve->ttm_bo_reserve->dma_resv_lock.

Yeah, I was looking at the both sides, but missed this one.


Also i915 will run into trouble with attach. In particular since i915 
starts a full ww transaction in its attach callback to be able to lock 
other objects if migration is needed. I think i915 CI would catch this 
in a selftest.


Perhaps it's worthwile to take a step back and figure out, if the 
importer is required to lock, which callbacks might need a ww acquire 
context?


(And off-topic, Since we do a lot of fancy stuff under dma-resv locks 
including waiting for fences and other locks, IMO taking these locks 
uninterruptible should ring a warning bell)


/Thomas




Same for nouveau and probably a few other exporters as well. That will
certainly cause a deadlock if you don't fix it.

I strongly suggest to do this step by step, first attach/detach and then
the rest.

Thank you very much for the suggestions. I'll implement them in the next
version.



[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: use DISPLAY_VER() instead of accessing match_info directly

2022-06-28 Thread Patchwork
== Series Details ==

Series: drm/i915: use DISPLAY_VER() instead of accessing match_info directly
URL   : https://patchwork.freedesktop.org/series/105734/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_11820 -> Patchwork_105734v1


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_105734v1 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_105734v1, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v1/index.html

Participating hosts (38 -> 37)
--

  Missing(1): bat-adlp-4 

Possible new issues
---

  Here are the unknown changes that may have been introduced in 
Patchwork_105734v1:

### IGT changes ###

 Possible regressions 

  * igt@gem_exec_parallel@engines@fds:
- fi-bsw-kefka:   [PASS][1] -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-bsw-kefka/igt@gem_exec_parallel@engi...@fds.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v1/fi-bsw-kefka/igt@gem_exec_parallel@engi...@fds.html
- fi-bdw-5557u:   [PASS][3] -> [INCOMPLETE][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-bdw-5557u/igt@gem_exec_parallel@engi...@fds.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v1/fi-bdw-5557u/igt@gem_exec_parallel@engi...@fds.html

  
Known issues


  Here are the changes found in Patchwork_105734v1 that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@i915_selftest@live@hangcheck:
- fi-hsw-4770:[PASS][5] -> [INCOMPLETE][6] ([i915#4785])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-hsw-4770/igt@i915_selftest@l...@hangcheck.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v1/fi-hsw-4770/igt@i915_selftest@l...@hangcheck.html

  * igt@kms_flip@basic-plain-flip@a-edp1:
- fi-tgl-u2:  [PASS][7] -> [DMESG-WARN][8] ([i915#402])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-tgl-u2/igt@kms_flip@basic-plain-f...@a-edp1.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v1/fi-tgl-u2/igt@kms_flip@basic-plain-f...@a-edp1.html

  * igt@runner@aborted:
- fi-hsw-4770:NOTRUN -> [FAIL][9] ([fdo#109271] / [i915#4312] / 
[i915#5594] / [i915#6246])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v1/fi-hsw-4770/igt@run...@aborted.html
- fi-bdw-5557u:   NOTRUN -> [FAIL][10] ([i915#4312])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v1/fi-bdw-5557u/igt@run...@aborted.html
- fi-bsw-kefka:   NOTRUN -> [FAIL][11] ([i915#4312])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v1/fi-bsw-kefka/igt@run...@aborted.html

  
 Possible fixes 

  * igt@i915_pm_rps@basic-api:
- fi-hsw-4770:[FAIL][12] -> [PASS][13]
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-hsw-4770/igt@i915_pm_...@basic-api.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v1/fi-hsw-4770/igt@i915_pm_...@basic-api.html

  * igt@kms_busy@basic@modeset:
- {bat-adln-1}:   [DMESG-WARN][14] ([i915#3576]) -> [PASS][15] +1 
similar issue
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/bat-adln-1/igt@kms_busy@ba...@modeset.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v1/bat-adln-1/igt@kms_busy@ba...@modeset.html

  
  {name}: This element is suppressed. This means it is ignored when computing
  the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [i915#3576]: https://gitlab.freedesktop.org/drm/intel/issues/3576
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4785]: https://gitlab.freedesktop.org/drm/intel/issues/4785
  [i915#5153]: https://gitlab.freedesktop.org/drm/intel/issues/5153
  [i915#5594]: https://gitlab.freedesktop.org/drm/intel/issues/5594
  [i915#6246]: https://gitlab.freedesktop.org/drm/intel/issues/6246
  [i915#6299]: https://gitlab.freedesktop.org/drm/intel/issues/6299


Build changes
-

  * Linux: CI_DRM_11820 -> Patchwork_105734v1

  CI-20190529: 20190529
  CI_DRM_11820: 8f4a9176de36698b5b3ba72c4f68f1cf7a15c0c9 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6549: 9b9371c8da32533022ad700a7c023b4c3a085fbc @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_105734v1: 8f4a9176de36698b5b3ba72c4f68f1cf7a15c0c9 @ 
git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

39feaabbd7f0 drm/i915: use DISPLAY_VER() instead of acc

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/guc/slpc: Add a new SLPC selftest (rev5)

2022-06-28 Thread Patchwork
== Series Details ==

Series: drm/i915/guc/slpc: Add a new SLPC selftest (rev5)
URL   : https://patchwork.freedesktop.org/series/105005/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_11820 -> Patchwork_105005v5


Summary
---

  **SUCCESS**

  No regressions found.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105005v5/index.html

Participating hosts (38 -> 37)
--

  Additional (1): bat-dg2-9 
  Missing(2): fi-hsw-4770 bat-adlp-4 

Possible new issues
---

  Here are the unknown changes that may have been introduced in 
Patchwork_105005v5:

### IGT changes ###

 Suppressed 

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@i915_selftest@live@ring_submission:
- {bat-adln-1}:   NOTRUN -> [DMESG-FAIL][1]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105005v5/bat-adln-1/igt@i915_selftest@live@ring_submission.html

  
Known issues


  Here are the changes found in Patchwork_105005v5 that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@kms_flip@basic-flip-vs-modeset@a-edp1:
- fi-tgl-u2:  [PASS][2] -> [DMESG-WARN][3] ([i915#402])
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-tgl-u2/igt@kms_flip@basic-flip-vs-mode...@a-edp1.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105005v5/fi-tgl-u2/igt@kms_flip@basic-flip-vs-mode...@a-edp1.html

  
 Possible fixes 

  * igt@i915_selftest@live@gt_lrc:
- {bat-adln-1}:   [DMESG-FAIL][4] -> [PASS][5]
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/bat-adln-1/igt@i915_selftest@live@gt_lrc.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105005v5/bat-adln-1/igt@i915_selftest@live@gt_lrc.html

  * igt@i915_selftest@live@gtt:
- fi-bdw-5557u:   [DMESG-FAIL][6] ([i915#3674]) -> [PASS][7]
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-bdw-5557u/igt@i915_selftest@l...@gtt.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105005v5/fi-bdw-5557u/igt@i915_selftest@l...@gtt.html

  * igt@i915_selftest@live@hangcheck:
- bat-dg1-6:  [DMESG-FAIL][8] ([i915#4494] / [i915#4957]) -> 
[PASS][9]
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/bat-dg1-6/igt@i915_selftest@l...@hangcheck.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105005v5/bat-dg1-6/igt@i915_selftest@l...@hangcheck.html

  * igt@kms_busy@basic@modeset:
- {bat-adln-1}:   [DMESG-WARN][10] ([i915#3576]) -> [PASS][11] +1 
similar issue
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/bat-adln-1/igt@kms_busy@ba...@modeset.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105005v5/bat-adln-1/igt@kms_busy@ba...@modeset.html

  * igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1:
- fi-tgl-u2:  [DMESG-WARN][12] ([i915#402]) -> [PASS][13]
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-tgl-u2/igt@kms_flip@basic-flip-vs-wf_vbl...@a-edp1.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105005v5/fi-tgl-u2/igt@kms_flip@basic-flip-vs-wf_vbl...@a-edp1.html

  
  {name}: This element is suppressed. This means it is ignored when computing
  the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3576]: https://gitlab.freedesktop.org/drm/intel/issues/3576
  [i915#3595]: https://gitlab.freedesktop.org/drm/intel/issues/3595
  [i915#3674]: https://gitlab.freedesktop.org/drm/intel/issues/3674
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
  [i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
  [i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
  [i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
  [i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
  [i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
  [i915#4494]: https://gitlab.freedesktop.org/drm/intel/issues/4494
  [i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
  [i915#4873]: https://gitlab.freedesktop.org/drm/intel/issues/4873
  [i915#4957]: https://gitlab.f

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [CI,1/2] iosys-map: Add per-word read

2022-06-28 Thread Patchwork
== Series Details ==

Series: series starting with [CI,1/2] iosys-map: Add per-word read
URL   : https://patchwork.freedesktop.org/series/105746/
State : warning

== Summary ==

Error: dim checkpatch failed
52de7a46693f iosys-map: Add per-word read
-:93: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#93: FILE: include/linux/iosys-map.h:339:
+   u64: val_ = readq(vaddr_iomem_)
   ^

-:93: WARNING:INDENTED_LABEL: labels should not be indented
#93: FILE: include/linux/iosys-map.h:339:
+   u64: val_ = readq(vaddr_iomem_)

-:96: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#96: FILE: include/linux/iosys-map.h:342:
+   u64: memcpy_fromio(&(val_), vaddr_iomem_, sizeof(u64))
   ^

-:96: WARNING:INDENTED_LABEL: labels should not be indented
#96: FILE: include/linux/iosys-map.h:342:
+   u64: memcpy_fromio(&(val_), vaddr_iomem_, sizeof(u64))

-:99: CHECK:CAMELCASE: Avoid CamelCase: <_Generic>
#99: FILE: include/linux/iosys-map.h:345:
+#define __iosys_map_rd_io(val__, vaddr_iomem__, type__) _Generic(val__,
\

-:99: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'val__' - possible 
side-effects?
#99: FILE: include/linux/iosys-map.h:345:
+#define __iosys_map_rd_io(val__, vaddr_iomem__, type__) _Generic(val__,
\
+   u8: val__ = readb(vaddr_iomem__),   
\
+   u16: val__ = readw(vaddr_iomem__),  
\
+   u32: val__ = readl(vaddr_iomem__),  
\
+   __iosys_map_rd_io_u64_case(val__, vaddr_iomem__))

-:99: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'vaddr_iomem__' - possible 
side-effects?
#99: FILE: include/linux/iosys-map.h:345:
+#define __iosys_map_rd_io(val__, vaddr_iomem__, type__) _Generic(val__,
\
+   u8: val__ = readb(vaddr_iomem__),   
\
+   u16: val__ = readw(vaddr_iomem__),  
\
+   u32: val__ = readl(vaddr_iomem__),  
\
+   __iosys_map_rd_io_u64_case(val__, vaddr_iomem__))

-:100: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#100: FILE: include/linux/iosys-map.h:346:
+   u8: val__ = readb(vaddr_iomem__),   
\
  ^

-:100: WARNING:INDENTED_LABEL: labels should not be indented
#100: FILE: include/linux/iosys-map.h:346:
+   u8: val__ = readb(vaddr_iomem__),   
\

-:101: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#101: FILE: include/linux/iosys-map.h:347:
+   u16: val__ = readw(vaddr_iomem__),  
\
   ^

-:101: WARNING:INDENTED_LABEL: labels should not be indented
#101: FILE: include/linux/iosys-map.h:347:
+   u16: val__ = readw(vaddr_iomem__),  
\

-:102: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#102: FILE: include/linux/iosys-map.h:348:
+   u32: val__ = readl(vaddr_iomem__),  
\
   ^

-:102: WARNING:INDENTED_LABEL: labels should not be indented
#102: FILE: include/linux/iosys-map.h:348:
+   u32: val__ = readl(vaddr_iomem__),  
\

-:105: ERROR:MULTISTATEMENT_MACRO_USE_DO_WHILE: Macros with multiple statements 
should be enclosed in a do - while loop
#105: FILE: include/linux/iosys-map.h:351:
+#define __iosys_map_rd_sys(val__, vaddr__, type__) 
\
+   val__ = READ_ONCE(*(type__ *)(vaddr__));

-:105: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'type__' may be better as 
'(type__)' to avoid precedence issues
#105: FILE: include/linux/iosys-map.h:351:
+#define __iosys_map_rd_sys(val__, vaddr__, type__) 
\
+   val__ = READ_ONCE(*(type__ *)(vaddr__));

-:105: WARNING:TRAILING_SEMICOLON: macros should not use a trailing semicolon
#105: FILE: include/linux/iosys-map.h:351:
+#define __iosys_map_rd_sys(val__, vaddr__, type__) 
\
+   val__ = READ_ONCE(*(type__ *)(vaddr__));

-:128: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'map__' - possible 
side-effects?
#128: FILE: include/linux/iosys-map.h:368:
+#define iosys_map_rd(map__, offset__, type__) ({   
\
+   type__ val; 
\
+   if ((map__)->is_iomem) {
\
+   __iosys_map_rd_io(val, (map__)->vaddr_iomem + (offset__), 
type__);\
+   } else {
\
+   __iosys_map_rd_sys(val, (map__)->vaddr + (offset__), type__);   
\
+   }   
\
+   val;
\
 })

-:128: CHECK:MACRO_ARG_REUSE: Macro argum

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [CI,1/2] iosys-map: Add per-word read

2022-06-28 Thread Patchwork
== Series Details ==

Series: series starting with [CI,1/2] iosys-map: Add per-word read
URL   : https://patchwork.freedesktop.org/series/105746/
State : warning

== Summary ==

Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.




[Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [CI,1/2] iosys-map: Add per-word read

2022-06-28 Thread Patchwork
== Series Details ==

Series: series starting with [CI,1/2] iosys-map: Add per-word read
URL   : https://patchwork.freedesktop.org/series/105746/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_11820 -> Patchwork_105746v1


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_105746v1 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_105746v1, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v1/index.html

Participating hosts (38 -> 37)
--

  Missing(1): bat-adlp-4 

Possible new issues
---

  Here are the unknown changes that may have been introduced in 
Patchwork_105746v1:

### IGT changes ###

 Possible regressions 

  * igt@gem_exec_parallel@engines@fds:
- fi-bsw-kefka:   [PASS][1] -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-bsw-kefka/igt@gem_exec_parallel@engi...@fds.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v1/fi-bsw-kefka/igt@gem_exec_parallel@engi...@fds.html
- fi-cfl-8109u:   [PASS][3] -> [INCOMPLETE][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-cfl-8109u/igt@gem_exec_parallel@engi...@fds.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v1/fi-cfl-8109u/igt@gem_exec_parallel@engi...@fds.html

  
 Suppressed 

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@i915_selftest@live@gt_heartbeat:
- {bat-adln-1}:   NOTRUN -> [DMESG-FAIL][5]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v1/bat-adln-1/igt@i915_selftest@live@gt_heartbeat.html

  
Known issues


  Here are the changes found in Patchwork_105746v1 that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@i915_selftest@live@hangcheck:
- fi-hsw-g3258:   [PASS][6] -> [INCOMPLETE][7] ([i915#4785])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-hsw-g3258/igt@i915_selftest@l...@hangcheck.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v1/fi-hsw-g3258/igt@i915_selftest@l...@hangcheck.html

  * igt@i915_selftest@live@late_gt_pm:
- fi-bsw-nick:[PASS][8] -> [DMESG-FAIL][9] ([i915#3428])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-bsw-nick/igt@i915_selftest@live@late_gt_pm.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v1/fi-bsw-nick/igt@i915_selftest@live@late_gt_pm.html

  * igt@kms_chamelium@common-hpd-after-suspend:
- fi-pnv-d510:NOTRUN -> [SKIP][10] ([fdo#109271])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v1/fi-pnv-d510/igt@kms_chamel...@common-hpd-after-suspend.html

  * igt@runner@aborted:
- fi-cfl-8109u:   NOTRUN -> [FAIL][11] ([i915#4312])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v1/fi-cfl-8109u/igt@run...@aborted.html
- fi-bsw-nick:NOTRUN -> [FAIL][12] ([fdo#109271] / [i915#3428] / 
[i915#4312])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v1/fi-bsw-nick/igt@run...@aborted.html
- fi-hsw-g3258:   NOTRUN -> [FAIL][13] ([fdo#109271] / [i915#4312] / 
[i915#6246])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v1/fi-hsw-g3258/igt@run...@aborted.html
- fi-bsw-kefka:   NOTRUN -> [FAIL][14] ([i915#4312])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v1/fi-bsw-kefka/igt@run...@aborted.html

  
 Possible fixes 

  * igt@i915_pm_rps@basic-api:
- fi-hsw-4770:[FAIL][15] -> [PASS][16]
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-hsw-4770/igt@i915_pm_...@basic-api.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v1/fi-hsw-4770/igt@i915_pm_...@basic-api.html

  * igt@i915_selftest@live@gt_lrc:
- {bat-adln-1}:   [DMESG-FAIL][17] -> [PASS][18]
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/bat-adln-1/igt@i915_selftest@live@gt_lrc.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v1/bat-adln-1/igt@i915_selftest@live@gt_lrc.html

  * igt@i915_selftest@live@gtt:
- fi-bdw-5557u:   [DMESG-FAIL][19] ([i915#3674]) -> [PASS][20]
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-bdw-5557u/igt@i915_selftest@l...@gtt.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v1/fi-bdw-5557u/igt@i915_selftest@l...@gtt.html

  * igt@i915_selftest@live@hangcheck:
- bat-dg1-6:  [DMESG-FAIL][21] ([i915#4494] / [i915#4957]) -> 
[PASS][22]
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_1182

Re: [Intel-gfx] [PATCH RESEND] drm: i915: fix a possible refcount leak in intel_dp_add_mst_connector()

2022-06-28 Thread Lyude Paul
Nice catch!

Reviewed-by: Lyude Paul 

Will push to drm-intel-next

On Fri, 2022-06-24 at 10:28 +0800, Hangyu Hua wrote:
> If drm_connector_init fails, intel_connector_free will be called to take
> care of proper free. So it is necessary to drop the refcount of port
> before intel_connector_free.
> 
> Fixes: 091a4f91942a ("drm/i915: Handle drm-layer errors in
> intel_dp_add_mst_connector")
> Signed-off-by: Hangyu Hua 
> Reviewed-by: José Roberto de Souza 
> ---
>  drivers/gpu/drm/i915/display/intel_dp_mst.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 061b277e5ce7..14d2a64193b2 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -839,6 +839,7 @@ static struct drm_connector
> *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
> ret = drm_connector_init(dev, connector,
> &intel_dp_mst_connector_funcs,
>  DRM_MODE_CONNECTOR_DisplayPort);
> if (ret) {
> +   drm_dp_mst_put_port_malloc(port);
> intel_connector_free(intel_connector);
> return NULL;
> }

-- 
Cheers,
 Lyude Paul (she/her)
 Software Engineer at Red Hat



Re: [Intel-gfx] [PATCH RESEND] drm: i915: fix a possible refcount leak in intel_dp_add_mst_connector()

2022-06-28 Thread Lyude Paul
Ah-nevermind! Seems like someone already pushed this for you :)

On Tue, 2022-06-28 at 18:55 -0400, Lyude Paul wrote:
> Nice catch!
> 
> Reviewed-by: Lyude Paul 
> 
> Will push to drm-intel-next
> 
> On Fri, 2022-06-24 at 10:28 +0800, Hangyu Hua wrote:
> > If drm_connector_init fails, intel_connector_free will be called to take
> > care of proper free. So it is necessary to drop the refcount of port
> > before intel_connector_free.
> > 
> > Fixes: 091a4f91942a ("drm/i915: Handle drm-layer errors in
> > intel_dp_add_mst_connector")
> > Signed-off-by: Hangyu Hua 
> > Reviewed-by: José Roberto de Souza 
> > ---
> >  drivers/gpu/drm/i915/display/intel_dp_mst.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > index 061b277e5ce7..14d2a64193b2 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > @@ -839,6 +839,7 @@ static struct drm_connector
> > *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
> > ret = drm_connector_init(dev, connector,
> > &intel_dp_mst_connector_funcs,
> >  DRM_MODE_CONNECTOR_DisplayPort);
> > if (ret) {
> > +   drm_dp_mst_put_port_malloc(port);
> > intel_connector_free(intel_connector);
> > return NULL;
> > }
> 

-- 
Cheers,
 Lyude Paul (she/her)
 Software Engineer at Red Hat



[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/reset: Handle reset timeouts under unrelated kernel hangs

2022-06-28 Thread Patchwork
== Series Details ==

Series: drm/i915/reset: Handle reset timeouts under unrelated kernel hangs
URL   : https://patchwork.freedesktop.org/series/105748/
State : warning

== Summary ==

Error: dim checkpatch failed
ac39982eb930 drm/i915/reset: Handle reset timeouts under unrelated kernel hangs
-:11: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description 
(prefer a maximum 75 chars per line)
#11: 
*ERROR* intel_gt_reset_global timed out, cancelling all in-flight 
rendering.

total: 0 errors, 1 warnings, 0 checks, 22 lines checked




[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/reset: Handle reset timeouts under unrelated kernel hangs

2022-06-28 Thread Patchwork
== Series Details ==

Series: drm/i915/reset: Handle reset timeouts under unrelated kernel hangs
URL   : https://patchwork.freedesktop.org/series/105748/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_11820 -> Patchwork_105748v1


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_105748v1 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_105748v1, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105748v1/index.html

Participating hosts (38 -> 38)
--

  Additional (2): fi-icl-u2 bat-dg2-9 
  Missing(2): bat-dg2-8 bat-adlp-4 

Possible new issues
---

  Here are the unknown changes that may have been introduced in 
Patchwork_105748v1:

### IGT changes ###

 Possible regressions 

  * igt@gem_exec_parallel@engines@fds:
- fi-bsw-nick:[PASS][1] -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-bsw-nick/igt@gem_exec_parallel@engi...@fds.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105748v1/fi-bsw-nick/igt@gem_exec_parallel@engi...@fds.html

  * igt@i915_suspend@basic-s3-without-i915:
- fi-cfl-8109u:   [PASS][3] -> [INCOMPLETE][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-cfl-8109u/igt@i915_susp...@basic-s3-without-i915.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105748v1/fi-cfl-8109u/igt@i915_susp...@basic-s3-without-i915.html

  
Known issues


  Here are the changes found in Patchwork_105748v1 that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@gem_huc_copy@huc-copy:
- fi-icl-u2:  NOTRUN -> [SKIP][5] ([i915#2190])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105748v1/fi-icl-u2/igt@gem_huc_c...@huc-copy.html

  * igt@gem_lmem_swapping@random-engines:
- fi-icl-u2:  NOTRUN -> [SKIP][6] ([i915#4613]) +3 similar issues
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105748v1/fi-icl-u2/igt@gem_lmem_swapp...@random-engines.html

  * igt@i915_pm_rpm@module-reload:
- fi-cfl-8109u:   [PASS][7] -> [DMESG-FAIL][8] ([i915#62])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-cfl-8109u/igt@i915_pm_...@module-reload.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105748v1/fi-cfl-8109u/igt@i915_pm_...@module-reload.html

  * igt@i915_selftest@live@gem:
- fi-pnv-d510:NOTRUN -> [DMESG-FAIL][9] ([i915#4528])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105748v1/fi-pnv-d510/igt@i915_selftest@l...@gem.html

  * igt@i915_suspend@basic-s3-without-i915:
- fi-icl-u2:  NOTRUN -> [SKIP][10] ([i915#5903])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105748v1/fi-icl-u2/igt@i915_susp...@basic-s3-without-i915.html

  * igt@kms_chamelium@common-hpd-after-suspend:
- fi-blb-e6850:   NOTRUN -> [SKIP][11] ([fdo#109271])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105748v1/fi-blb-e6850/igt@kms_chamel...@common-hpd-after-suspend.html

  * igt@kms_chamelium@hdmi-hpd-fast:
- fi-icl-u2:  NOTRUN -> [SKIP][12] ([fdo#111827]) +8 similar issues
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105748v1/fi-icl-u2/igt@kms_chamel...@hdmi-hpd-fast.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor:
- fi-icl-u2:  NOTRUN -> [SKIP][13] ([i915#4103])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105748v1/fi-icl-u2/igt@kms_cursor_leg...@basic-busy-flip-before-cursor.html

  * igt@kms_flip@basic-flip-vs-dpms@a-edp1:
- fi-tgl-u2:  [PASS][14] -> [DMESG-WARN][15] ([i915#402])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-tgl-u2/igt@kms_flip@basic-flip-vs-d...@a-edp1.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105748v1/fi-tgl-u2/igt@kms_flip@basic-flip-vs-d...@a-edp1.html

  * igt@kms_force_connector_basic@force-connector-state:
- fi-icl-u2:  NOTRUN -> [WARN][16] ([i915#6008])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105748v1/fi-icl-u2/igt@kms_force_connector_ba...@force-connector-state.html

  * igt@kms_force_connector_basic@force-load-detect:
- fi-icl-u2:  NOTRUN -> [SKIP][17] ([fdo#109285])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105748v1/fi-icl-u2/igt@kms_force_connector_ba...@force-load-detect.html

  * igt@kms_frontbuffer_tracking@basic:
- fi-cfl-8109u:   [PASS][18] -> [DMESG-WARN][19] ([i915#62]) +12 
similar issues
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11820/fi-cfl-8109u/igt@kms_frontbuffer_track...@basic.html
   [19]: 
https://intel-gfx-ci.01.o

[Intel-gfx] [PATCH] drm/i915: Remove __dma_fence_is_chain()

2022-06-28 Thread Rob Clark
From: Rob Clark 

drive-by cleanup

Signed-off-by: Rob Clark 
---
 drivers/gpu/drm/i915/gem/i915_gem_wait.c | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_wait.c 
b/drivers/gpu/drm/i915/gem/i915_gem_wait.c
index 319936f91ac5..667841780514 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_wait.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_wait.c
@@ -73,11 +73,6 @@ static void fence_set_priority(struct dma_fence *fence,
rcu_read_unlock();
 }
 
-static inline bool __dma_fence_is_chain(const struct dma_fence *fence)
-{
-   return fence->ops == &dma_fence_chain_ops;
-}
-
 void i915_gem_fence_wait_priority(struct dma_fence *fence,
  const struct i915_sched_attr *attr)
 {
@@ -93,7 +88,7 @@ void i915_gem_fence_wait_priority(struct dma_fence *fence,
 
for (i = 0; i < array->num_fences; i++)
fence_set_priority(array->fences[i], attr);
-   } else if (__dma_fence_is_chain(fence)) {
+   } else if (dma_fence_is_chain(fence)) {
struct dma_fence *iter;
 
/* The chain is ordered; if we boost the last, we boost all */
-- 
2.36.1



Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [CI,1/2] iosys-map: Add per-word read

2022-06-28 Thread Lucas De Marchi
+Lakshmi

Can't see how these would be related. Searching recent failure I found this
very similar one:
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11814/shard-glk7/pstore24-1656384153_Oops_1.txt

Lucas De Marchi

On Tue, Jun 28, 2022 at 3:49 PM Patchwork 
wrote:

> *Patch Details*
> *Series:* series starting with [CI,1/2] iosys-map: Add per-word read
> *URL:* https://patchwork.freedesktop.org/series/105746/
> *State:* failure
> *Details:*
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v1/index.html CI
> Bug Log - changes from CI_DRM_11820 -> Patchwork_105746v1 Summary
>
> *FAILURE*
>
> Serious unknown changes coming with Patchwork_105746v1 absolutely need to
> be
> verified manually.
>
> If you think the reported changes have nothing to do with the changes
> introduced in Patchwork_105746v1, please notify your bug team to allow them
> to document this new failure mode, which will reduce false positives in CI.
>
> External URL:
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v1/index.html
> Participating hosts (38 -> 37)
>
> Missing (1): bat-adlp-4
> Possible new issues
>
> Here are the unknown changes that may have been introduced in
> Patchwork_105746v1:
> IGT changes Possible regressions
>
>-
>
>igt@gem_exec_parallel@engines@fds:
>-
>
>   fi-bsw-kefka: PASS
>   
> 
>   -> INCOMPLETE
>   
> 
>   -
>
>   fi-cfl-8109u: PASS
>   
> 
>   -> INCOMPLETE
>   
> 
>
> Suppressed
>
> The following results come from untrusted machines, tests, or statuses.
> They do not affect the overall result.
>
>- igt@i915_selftest@live@gt_heartbeat:
>   - {bat-adln-1}: NOTRUN -> DMESG-FAIL
>   
> 
>
> Known issues
>
> Here are the changes found in Patchwork_105746v1 that come from known
> issues:
> IGT changes Issues hit
>
>-
>
>igt@i915_selftest@live@hangcheck:
>- fi-hsw-g3258: PASS
>   
> 
>   -> INCOMPLETE
>   
> 
>   (i915#4785 )
>-
>
>igt@i915_selftest@live@late_gt_pm:
>- fi-bsw-nick: PASS
>   
> 
>   -> DMESG-FAIL
>   
> 
>   (i915#3428 )
>-
>
>igt@kms_chamelium@common-hpd-after-suspend:
>- fi-pnv-d510: NOTRUN -> SKIP
>   
> 
>   (fdo#109271 )
>-
>
>igt@runner@aborted:
>-
>
>   fi-cfl-8109u: NOTRUN -> FAIL
>   
> 
>   (i915#4312 )
>   -
>
>   fi-bsw-nick: NOTRUN -> FAIL
>   
> 
>   (fdo#109271  /
>   i915#3428  /
>   i915#4312 )
>   -
>
>   fi-hsw-g3258: NOTRUN -> FAIL
>   
> 
>   (fdo#109271  /
>   i915#4312  /
>   i915#6246 )
>   -
>
>   fi-bsw-kefka: NOTRUN -> FAIL
>   
> 
>   (i915#4312 )
>
> Possible fixes
>
>-
>
>igt@i915_pm_rps@basic-api:
>- fi-hsw-4770: FAIL
>   
> 
>   -> PASS
>   
> 

[Intel-gfx] linux-next: manual merge of the drm-misc tree with Linus' tree

2022-06-28 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/vc4/vc4_drv.c

between commit:

  538f6061 ("drm/vc4: drv: Register a different driver on BCM2711")

from Linus' tree and commit:

  da8e393e23ef ("drm/vc4: drv: Adopt the dma configuration from the HVS or V3D 
component")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/vc4/vc4_drv.c
index 0f0f0263e744,14a7d529144d..
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@@ -281,16 -230,25 +290,26 @@@ static int vc4_drm_bind(struct device *
  
dev->coherent_dma_mask = DMA_BIT_MASK(32);
  
 -  /* If VC4 V3D is missing, don't advertise render nodes. */
 -  node = of_find_matching_node_and_match(NULL, vc4_v3d_dt_match, NULL);
 -  if (!node || !of_device_is_available(node))
 -  vc4_drm_driver.driver_features &= ~DRIVER_RENDER;
 -  of_node_put(node);
 +  is_vc5 = of_device_is_compatible(dev->of_node, "brcm,bcm2711-vc5");
 +  if (is_vc5)
 +  driver = &vc5_drm_driver;
 +  else
 +  driver = &vc4_drm_driver;
  
+   node = of_find_matching_node_and_match(NULL, vc4_dma_range_matches,
+  NULL);
+   if (node) {
+   ret = of_dma_configure(dev, node, true);
+   of_node_put(node);
+ 
+   if (ret)
+   return ret;
+   }
+ 
 -  vc4 = devm_drm_dev_alloc(dev, &vc4_drm_driver, struct vc4_dev, base);
 +  vc4 = devm_drm_dev_alloc(dev, driver, struct vc4_dev, base);
if (IS_ERR(vc4))
return PTR_ERR(vc4);
 +  vc4->is_vc5 = is_vc5;
  
drm = &vc4->base;
platform_set_drvdata(pdev, drm);


pgp_w20wN2KNR.pgp
Description: OpenPGP digital signature


[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/guc: ADL-N should use the same GuC FW as ADL-S (rev3)

2022-06-28 Thread Patchwork
== Series Details ==

Series: drm/i915/guc: ADL-N should use the same GuC FW as ADL-S (rev3)
URL   : https://patchwork.freedesktop.org/series/105444/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_11822 -> Patchwork_105444v3


Summary
---

  **SUCCESS**

  No regressions found.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v3/index.html

Participating hosts (37 -> 38)
--

  Additional (3): fi-hsw-4770 fi-icl-u2 bat-dg2-9 
  Missing(2): fi-kbl-soraka fi-bdw-samus 

Possible new issues
---

  Here are the unknown changes that may have been introduced in 
Patchwork_105444v3:

### IGT changes ###

 Suppressed 

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@i915_selftest@live@hangcheck:
- {bat-adln-1}:   NOTRUN -> [INCOMPLETE][1]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v3/bat-adln-1/igt@i915_selftest@l...@hangcheck.html

  
Known issues


  Here are the changes found in Patchwork_105444v3 that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@gem_huc_copy@huc-copy:
- fi-icl-u2:  NOTRUN -> [SKIP][2] ([i915#2190])
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v3/fi-icl-u2/igt@gem_huc_c...@huc-copy.html

  * igt@gem_lmem_swapping@random-engines:
- fi-icl-u2:  NOTRUN -> [SKIP][3] ([i915#4613]) +3 similar issues
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v3/fi-icl-u2/igt@gem_lmem_swapp...@random-engines.html

  * igt@i915_pm_backlight@basic-brightness:
- fi-hsw-4770:NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#3012])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v3/fi-hsw-4770/igt@i915_pm_backli...@basic-brightness.html

  * igt@i915_selftest@live@gem:
- fi-pnv-d510:NOTRUN -> [DMESG-FAIL][5] ([i915#4528])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v3/fi-pnv-d510/igt@i915_selftest@l...@gem.html

  * igt@i915_selftest@live@gem_contexts:
- fi-bdw-5557u:   [PASS][6] -> [INCOMPLETE][7] ([i915#5502])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11822/fi-bdw-5557u/igt@i915_selftest@live@gem_contexts.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v3/fi-bdw-5557u/igt@i915_selftest@live@gem_contexts.html

  * igt@i915_selftest@live@hangcheck:
- fi-hsw-4770:NOTRUN -> [INCOMPLETE][8] ([i915#4785])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v3/fi-hsw-4770/igt@i915_selftest@l...@hangcheck.html

  * igt@i915_suspend@basic-s3-without-i915:
- fi-icl-u2:  NOTRUN -> [SKIP][9] ([i915#5903])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v3/fi-icl-u2/igt@i915_susp...@basic-s3-without-i915.html

  * igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- fi-hsw-4770:NOTRUN -> [SKIP][10] ([fdo#109271]) +9 similar issues
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v3/fi-hsw-4770/igt@kms_addfb_ba...@addfb25-y-tiled-small-legacy.html

  * igt@kms_chamelium@common-hpd-after-suspend:
- fi-bsw-nick:NOTRUN -> [SKIP][11] ([fdo#109271] / [fdo#111827])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v3/fi-bsw-nick/igt@kms_chamel...@common-hpd-after-suspend.html
- fi-hsw-g3258:   NOTRUN -> [SKIP][12] ([fdo#109271] / [fdo#111827])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v3/fi-hsw-g3258/igt@kms_chamel...@common-hpd-after-suspend.html

  * igt@kms_chamelium@dp-crc-fast:
- fi-hsw-4770:NOTRUN -> [SKIP][13] ([fdo#109271] / [fdo#111827]) +7 
similar issues
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v3/fi-hsw-4770/igt@kms_chamel...@dp-crc-fast.html

  * igt@kms_chamelium@hdmi-hpd-fast:
- fi-icl-u2:  NOTRUN -> [SKIP][14] ([fdo#111827]) +8 similar issues
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v3/fi-icl-u2/igt@kms_chamel...@hdmi-hpd-fast.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor:
- fi-icl-u2:  NOTRUN -> [SKIP][15] ([i915#4103])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v3/fi-icl-u2/igt@kms_cursor_leg...@basic-busy-flip-before-cursor.html

  * igt@kms_force_connector_basic@force-connector-state:
- fi-icl-u2:  NOTRUN -> [WARN][16] ([i915#6008])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v3/fi-icl-u2/igt@kms_force_connector_ba...@force-connector-state.html

  * igt@kms_force_connector_basic@force-load-detect:
- fi-icl-u2:  NOTRUN -> [SKIP][17] ([fdo#109285])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105444v3/fi-icl-u2/igt@kms_force_connector_ba...@force-load-detect.html

  * igt@kms_pipe_crc_basic@suspend-read-crc:
- fi-bsw-nick

Re: [Intel-gfx] [PATCH] drm/i915/dp: Check for Low voltage IO only for eDP

2022-06-28 Thread Murthy, Arun R
> - if (intel_dp_is_edp(intel_dp) || is_low_voltage_sku(dev_priv, phy))
> + if (intel_dp_is_edp(intel_dp))
>   return 54;
Shouldn't the low voltage check be for both eDP and is low voltage sku?

Thanks and Regards,
Arun R Murthy



[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: use DISPLAY_VER() instead of accessing match_info directly (rev2)

2022-06-28 Thread Patchwork
== Series Details ==

Series: drm/i915: use DISPLAY_VER() instead of accessing match_info directly 
(rev2)
URL   : https://patchwork.freedesktop.org/series/105734/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_11822 -> Patchwork_105734v2


Summary
---

  **SUCCESS**

  No regressions found.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v2/index.html

Participating hosts (37 -> 35)
--

  Missing(2): fi-bxt-dsi fi-bdw-samus 

Known issues


  Here are the changes found in Patchwork_105734v2 that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@i915_selftest@live:
- fi-cfl-8109u:   NOTRUN -> [INCOMPLETE][1] ([i915#6114])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v2/fi-cfl-8109u/igt@i915_selft...@live.html

  * igt@i915_selftest@live@gt_engines:
- fi-rkl-guc: [PASS][2] -> [INCOMPLETE][3] ([i915#4418])
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11822/fi-rkl-guc/igt@i915_selftest@live@gt_engines.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v2/fi-rkl-guc/igt@i915_selftest@live@gt_engines.html

  * igt@kms_chamelium@common-hpd-after-suspend:
- fi-bsw-nick:NOTRUN -> [SKIP][4] ([fdo#109271] / [fdo#111827])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v2/fi-bsw-nick/igt@kms_chamel...@common-hpd-after-suspend.html
- fi-hsw-g3258:   NOTRUN -> [SKIP][5] ([fdo#109271] / [fdo#111827])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v2/fi-hsw-g3258/igt@kms_chamel...@common-hpd-after-suspend.html

  * igt@kms_pipe_crc_basic@suspend-read-crc:
- fi-bsw-nick:NOTRUN -> [SKIP][6] ([fdo#109271])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v2/fi-bsw-nick/igt@kms_pipe_crc_ba...@suspend-read-crc.html

  * igt@runner@aborted:
- fi-cfl-8109u:   NOTRUN -> [FAIL][7] ([i915#4312])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v2/fi-cfl-8109u/igt@run...@aborted.html
- fi-rkl-guc: NOTRUN -> [FAIL][8] ([i915#4312])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v2/fi-rkl-guc/igt@run...@aborted.html

  
 Possible fixes 

  * igt@i915_selftest@live@gt_heartbeat:
- {fi-tgl-dsi}:   [DMESG-FAIL][9] ([i915#5334]) -> [PASS][10]
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11822/fi-tgl-dsi/igt@i915_selftest@live@gt_heartbeat.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v2/fi-tgl-dsi/igt@i915_selftest@live@gt_heartbeat.html

  * igt@i915_selftest@live@gtt:
- fi-bdw-5557u:   [DMESG-FAIL][11] ([i915#3674]) -> [PASS][12]
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11822/fi-bdw-5557u/igt@i915_selftest@l...@gtt.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v2/fi-bdw-5557u/igt@i915_selftest@l...@gtt.html

  * igt@i915_selftest@live@hangcheck:
- fi-hsw-g3258:   [INCOMPLETE][13] ([i915#4785]) -> [PASS][14]
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11822/fi-hsw-g3258/igt@i915_selftest@l...@hangcheck.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v2/fi-hsw-g3258/igt@i915_selftest@l...@hangcheck.html

  * igt@i915_selftest@live@late_gt_pm:
- fi-bsw-nick:[DMESG-FAIL][15] ([i915#3428]) -> [PASS][16]
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11822/fi-bsw-nick/igt@i915_selftest@live@late_gt_pm.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v2/fi-bsw-nick/igt@i915_selftest@live@late_gt_pm.html

  * igt@kms_flip@basic-flip-vs-modeset@a-edp1:
- fi-tgl-u2:  [DMESG-WARN][17] ([i915#402]) -> [PASS][18] +2 
similar issues
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11822/fi-tgl-u2/igt@kms_flip@basic-flip-vs-mode...@a-edp1.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v2/fi-tgl-u2/igt@kms_flip@basic-flip-vs-mode...@a-edp1.html
- {bat-adlp-6}:   [DMESG-WARN][19] ([i915#3576]) -> [PASS][20] +1 
similar issue
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11822/bat-adlp-6/igt@kms_flip@basic-flip-vs-mode...@a-edp1.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v2/bat-adlp-6/igt@kms_flip@basic-flip-vs-mode...@a-edp1.html

  * igt@kms_frontbuffer_tracking@basic:
- fi-cfl-8109u:   [DMESG-WARN][21] ([i915#62]) -> [PASS][22] +12 
similar issues
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11822/fi-cfl-8109u/igt@kms_frontbuffer_track...@basic.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105734v2/fi-cfl-8109u/igt@kms_frontbuffer_track...@basic.html

  
 Warnings 

  * igt@i915_pm_rpm@module-reload:
- fi-cfl-8109u:   [DMESG-FAIL][23] ([i915#62]) -> [FAIL][24] 
([i915#4054])
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_D

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Remove __dma_fence_is_chain()

2022-06-28 Thread Patchwork
== Series Details ==

Series: drm/i915: Remove __dma_fence_is_chain()
URL   : https://patchwork.freedesktop.org/series/105760/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_11822 -> Patchwork_105760v1


Summary
---

  **SUCCESS**

  No regressions found.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105760v1/index.html

Participating hosts (37 -> 37)
--

  Additional (3): fi-hsw-4770 fi-icl-u2 bat-dg2-9 
  Missing(3): fi-cfl-8109u fi-bdw-samus fi-pnv-d510 

Possible new issues
---

  Here are the unknown changes that may have been introduced in 
Patchwork_105760v1:

### IGT changes ###

 Suppressed 

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@i915_pm_rpm@basic-pci-d3-state:
- {bat-dg2-8}:[PASS][1] -> [DMESG-WARN][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11822/bat-dg2-8/igt@i915_pm_...@basic-pci-d3-state.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105760v1/bat-dg2-8/igt@i915_pm_...@basic-pci-d3-state.html

  * igt@i915_selftest@live@coherency:
- {bat-adln-1}:   NOTRUN -> [DMESG-FAIL][3]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105760v1/bat-adln-1/igt@i915_selftest@l...@coherency.html

  
Known issues


  Here are the changes found in Patchwork_105760v1 that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@gem_huc_copy@huc-copy:
- fi-icl-u2:  NOTRUN -> [SKIP][4] ([i915#2190])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105760v1/fi-icl-u2/igt@gem_huc_c...@huc-copy.html

  * igt@gem_lmem_swapping@random-engines:
- fi-icl-u2:  NOTRUN -> [SKIP][5] ([i915#4613]) +3 similar issues
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105760v1/fi-icl-u2/igt@gem_lmem_swapp...@random-engines.html

  * igt@i915_pm_backlight@basic-brightness:
- fi-hsw-4770:NOTRUN -> [SKIP][6] ([fdo#109271] / [i915#3012])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105760v1/fi-hsw-4770/igt@i915_pm_backli...@basic-brightness.html

  * igt@i915_selftest@live@gem:
- fi-blb-e6850:   NOTRUN -> [DMESG-FAIL][7] ([i915#4528])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105760v1/fi-blb-e6850/igt@i915_selftest@l...@gem.html

  * igt@i915_selftest@live@gem_contexts:
- fi-bdw-5557u:   [PASS][8] -> [INCOMPLETE][9] ([i915#5502])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11822/fi-bdw-5557u/igt@i915_selftest@live@gem_contexts.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105760v1/fi-bdw-5557u/igt@i915_selftest@live@gem_contexts.html

  * igt@i915_selftest@live@gt_engines:
- bat-dg1-6:  [PASS][10] -> [INCOMPLETE][11] ([i915#4418])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11822/bat-dg1-6/igt@i915_selftest@live@gt_engines.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105760v1/bat-dg1-6/igt@i915_selftest@live@gt_engines.html

  * igt@i915_selftest@live@hangcheck:
- fi-hsw-4770:NOTRUN -> [INCOMPLETE][12] ([i915#4785])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105760v1/fi-hsw-4770/igt@i915_selftest@l...@hangcheck.html

  * igt@i915_suspend@basic-s3-without-i915:
- fi-icl-u2:  NOTRUN -> [SKIP][13] ([i915#5903])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105760v1/fi-icl-u2/igt@i915_susp...@basic-s3-without-i915.html

  * igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- fi-hsw-4770:NOTRUN -> [SKIP][14] ([fdo#109271]) +9 similar issues
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105760v1/fi-hsw-4770/igt@kms_addfb_ba...@addfb25-y-tiled-small-legacy.html

  * igt@kms_chamelium@common-hpd-after-suspend:
- fi-bsw-nick:NOTRUN -> [SKIP][15] ([fdo#109271] / [fdo#111827])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105760v1/fi-bsw-nick/igt@kms_chamel...@common-hpd-after-suspend.html
- fi-hsw-g3258:   NOTRUN -> [SKIP][16] ([fdo#109271] / [fdo#111827])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105760v1/fi-hsw-g3258/igt@kms_chamel...@common-hpd-after-suspend.html

  * igt@kms_chamelium@dp-crc-fast:
- fi-hsw-4770:NOTRUN -> [SKIP][17] ([fdo#109271] / [fdo#111827]) +7 
similar issues
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105760v1/fi-hsw-4770/igt@kms_chamel...@dp-crc-fast.html

  * igt@kms_chamelium@hdmi-hpd-fast:
- fi-icl-u2:  NOTRUN -> [SKIP][18] ([fdo#111827]) +8 similar issues
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105760v1/fi-icl-u2/igt@kms_chamel...@hdmi-hpd-fast.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor:
- fi-icl-u2:  NOTRUN -> [SKIP][19] ([i915#4103])
   [19]: 
https://intel-gfx-ci.01.org/tre

Re: [Intel-gfx] [PATCH 1/2] drm/i915/hpd: postpone HPD cancel work after last user suspension

2022-06-28 Thread Murthy, Arun R



> -Original Message-
> From: Intel-gfx  On Behalf Of
> Andrzej Hajda
> Sent: Thursday, June 23, 2022 10:08 PM
> To: Jani Nikula ; Ville Syrjälä
> 
> Cc: Hajda, Andrzej ; intel-
> g...@lists.freedesktop.org; dri-de...@lists.freedesktop.org; Vivi, Rodrigo
> 
> Subject: [Intel-gfx] [PATCH 1/2] drm/i915/hpd: postpone HPD cancel work
> after last user suspension
>
> i915->hotplug.dig_port_work can be queued from intel_hpd_irq_handler
> called by IRQ handler or by intel_hpd_trigger_irq called from dp_mst.
> To avoid re-queuing lets cancel HPD work after intel_dp_mst_suspend.
>
It is not re-queuing!
I Would rather put it as, a cleaner approach is to flush the hpd work on
suspend.

With the above said changes included, you can have
Reviewed-by: Arun R Murthy 

Thanks and Regards,
Arun R Murthy



Re: [Intel-gfx] [PATCH] drm/i915/dp: Check for Low voltage IO only for eDP

2022-06-28 Thread Nautiyal, Ankit K

Hi Arun,

Thanks for the comments. Please find my response inline:

On 6/29/2022 8:55 AM, Murthy, Arun R wrote:

-   if (intel_dp_is_edp(intel_dp) || is_low_voltage_sku(dev_priv, phy))
+   if (intel_dp_is_edp(intel_dp))
return 54;

Shouldn't the low voltage check be for both eDP and is low voltage sku?


For JSP/EHL there is SOC PHY restriction for Como phy port with eDP to 
support only HBR2, 5.4GHz.


But the DP can support HBR3 8.1 GHz. Bspec: 32247

So for eDP for this platform we do not check for low voltage IO port.


Regards,

Ankit




Thanks and Regards,
Arun R Murthy



Re: [Intel-gfx] [PATCH] drm/i915/dp: Check for Low voltage IO only for eDP

2022-06-28 Thread Murthy, Arun R
> On 6/29/2022 8:55 AM, Murthy, Arun R wrote:
> >> -  if (intel_dp_is_edp(intel_dp) || is_low_voltage_sku(dev_priv, phy))
> >> +  if (intel_dp_is_edp(intel_dp))
> >>return 54;
> > Shouldn't the low voltage check be for both eDP and is low voltage sku?
> 
> For JSP/EHL there is SOC PHY restriction for Como phy port with eDP to
> support only HBR2, 5.4GHz.
> 
> But the DP can support HBR3 8.1 GHz. Bspec: 32247
> 
> So for eDP for this platform we do not check for low voltage IO port.
> 
Its better to add this as a comment in the code.
Upon adding this in comments
Reviewed-by: Arun R Murthy 

Thanks and Regards,
Arun R Murthy



Re: [Intel-gfx] [Linaro-mm-sig] [PATCH] drm/i915: Remove __dma_fence_is_chain()

2022-06-28 Thread Intel



On 6/29/22 01:35, Rob Clark wrote:

From: Rob Clark 

drive-by cleanup

Signed-off-by: Rob Clark 


Reviewed-by: Thomas Hellström 



---
  drivers/gpu/drm/i915/gem/i915_gem_wait.c | 7 +--
  1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_wait.c 
b/drivers/gpu/drm/i915/gem/i915_gem_wait.c
index 319936f91ac5..667841780514 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_wait.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_wait.c
@@ -73,11 +73,6 @@ static void fence_set_priority(struct dma_fence *fence,
rcu_read_unlock();
  }
  
-static inline bool __dma_fence_is_chain(const struct dma_fence *fence)

-{
-   return fence->ops == &dma_fence_chain_ops;
-}
-
  void i915_gem_fence_wait_priority(struct dma_fence *fence,
  const struct i915_sched_attr *attr)
  {
@@ -93,7 +88,7 @@ void i915_gem_fence_wait_priority(struct dma_fence *fence,
  
  		for (i = 0; i < array->num_fences; i++)

fence_set_priority(array->fences[i], attr);
-   } else if (__dma_fence_is_chain(fence)) {
+   } else if (dma_fence_is_chain(fence)) {
struct dma_fence *iter;
  
  		/* The chain is ordered; if we boost the last, we boost all */


Re: [Intel-gfx] [PATCH] drm/i915/reset: Handle reset timeouts under unrelated kernel hangs

2022-06-28 Thread Dixit, Ashutosh
On Tue, 28 Jun 2022 12:17:41 -0700, Ashutosh Dixit wrote:
>
> From: Chris Wilson 
>
> When resuming after hibernate sometimes we see hangs in unrelated kernel
> subsystems. These hangs often result in the following i915 trace:
>
> i915 :00:02.0: [drm] \
>   *ERROR* intel_gt_reset_global timed out, cancelling all in-flight 
> rendering.
>
> implying our reset task has been starved by the hanging kernel subsystem,
> causing us to inappropiately declare the system as wedged beyond recovery.
>
> The trace would be caused by our synchronize_srcu_expedited() taking more
> than the allowed 5s due to the unrelated kernel hang. But we neither need
> to perform that synchronisation inside the reset watchdog, nor do we need
> such a short timeout before declaring the device as unrecoverable.
>
> Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/3575
> Signed-off-by: Chris Wilson 
> Signed-off-by: Ashutosh Dixit 
> ---
>  drivers/gpu/drm/i915/gt/intel_reset.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c 
> b/drivers/gpu/drm/i915/gt/intel_reset.c
> index a5338c3fde7a0..e72744f6faedc 100644
> --- a/drivers/gpu/drm/i915/gt/intel_reset.c
> +++ b/drivers/gpu/drm/i915/gt/intel_reset.c
> @@ -1259,12 +1259,9 @@ static void intel_gt_reset_global(struct intel_gt *gt,
>   kobject_uevent_env(kobj, KOBJ_CHANGE, reset_event);
>
>   /* Use a watchdog to ensure that our reset completes */
> - intel_wedge_on_timeout(&w, gt, 5 * HZ) {
> + intel_wedge_on_timeout(&w, gt, 60 * HZ) {

How about we take one step at a time so if we are moving
synchronize_srcu_expedited() out of the reset watchdog, we leave the
timeout to the previous 5s? With the original timeout restored this patch
is:

Reviewed-by: Ashutosh Dixit 

>   intel_display_prepare_reset(gt->i915);
>
> - /* Flush everyone using a resource about to be clobbered */
> - synchronize_srcu_expedited(>->reset.backoff_srcu);
> -
>   intel_gt_reset(gt, engine_mask, reason);
>
>   intel_display_finish_reset(gt->i915);
> @@ -1373,6 +1370,9 @@ void intel_gt_handle_error(struct intel_gt *gt,
>   }
>   }
>
> + /* Flush everyone using a resource about to be clobbered */
> + synchronize_srcu_expedited(>->reset.backoff_srcu);
> +
>   intel_gt_reset_global(gt, engine_mask, msg);
>
>   if (!intel_uc_uses_guc_submission(>->uc)) {
> --
> 2.36.1
>


Re: [Intel-gfx] [PATCH 2/2] drm/i915/fbdev: suspend HPD before fbdev unregistration

2022-06-28 Thread Murthy, Arun R
>  void intel_fbdev_unregister(struct drm_i915_private *dev_priv)  {
>   struct intel_fbdev *ifbdev = dev_priv->fbdev; @@ -573,6 +594,8 @@
> void intel_fbdev_unregister(struct drm_i915_private *dev_priv)
>   if (!ifbdev)
>   return;
>
> + intel_fbdev_hpd_set_suspend(dev_priv,
> FBINFO_STATE_SUSPENDED);
> +

Instead of intel_fbdev_hpd_set_suspend(), will intel_fbdev_set_suspend() make 
more sense?
If intel_fbdev_set_suspend() is called, then the below cancel_work_sync() may 
not be required.

>   cancel_work_sync(&dev_priv->fbdev_suspend_work);
>   if (!current_is_async())
>   intel_fbdev_sync(ifbdev);

Thanks and Regards,
Arun R Murthy



[Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [CI,1/2] iosys-map: Add per-word read (rev2)

2022-06-28 Thread Patchwork
== Series Details ==

Series: series starting with [CI,1/2] iosys-map: Add per-word read (rev2)
URL   : https://patchwork.freedesktop.org/series/105746/
State : warning

== Summary ==

Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.




Re: [Intel-gfx] [PATCH 1/2] drm/i915: Add support for LMEM PCIe resizable bar

2022-06-28 Thread Intel

Hi,

On 6/24/22 06:02, Dandamudi, Priyanka wrote:



-Original Message-
From: Christian König 
Sent: 18 June 2022 08:45 PM
To: De Marchi, Lucas ; Bjorn Helgaas

Cc: linux-...@vger.kernel.org; intel-gfx@lists.freedesktop.org; Sergei
Miroshnichenko ; linux-
ker...@vger.kernel.org; Dandamudi, Priyanka
; Auld, Matthew
; Bjorn Helgaas 
Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915: Add support for LMEM PCIe
resizable bar

Am 17.06.22 um 23:27 schrieb Lucas De Marchi:

On Fri, Jun 17, 2022 at 03:32:52PM -0500, Bjorn Helgaas wrote:

[+cc Christian, author of pci_resize_resource(), Sergei, author of
rebalancing patches]

Hi Lucas,

On Fri, Jun 17, 2022 at 11:44:41AM -0700, Lucas De Marchi wrote:

Cc'ing intel-pci, lkml, Bjorn

On Fri, Jun 17, 2022 at 11:32:37AM +0300, Jani Nikula wrote:

On Thu, 16 Jun 2022, priyanka.dandam...@intel.com wrote:

From: Akeem G Abodunrin 

Add support for the local memory PICe resizable bar, so that
local memory can be resized to the maximum size supported by the

device,

and mapped correctly to the PCIe memory bar. It is usual that
GPU devices expose only 256MB BARs primarily to be compatible
with

32-bit

systems. So, those devices cannot claim larger memory BAR

windows size due

to the system BIOS limitation. With this change, it would be

possible to

reprogram the windows of the bridge directly above the

requesting device

on the same BAR type.

There is a big caveat here that this may be too late as other
drivers may have already mapped their BARs - so probably too late in
the pci scan for it to be effective. In fact, after using this for a
while, it seems to fail too often, particularly on CFL systems.

Help me understand the "too late" part.  Do you mean that there is
enough available space for the max BAR size, but it's fragmented and
therefore not usable?  And that if we could do something earlier,
before drivers have claimed their devices, we might be able to
compact the BARs of other devices to make a larger contiguous available

space?

yes. I will dig some logs I had in the past to confirm.



That is theoretically possible, but I think the current
pci_resize_resource() only supports resizing of the specified BAR and
any upstream bridge windows.  I don't think it supports moving BARs
of other devices.

Sergei did some nice work that might help with this situation because
it can move BARs around more generally.  It hasn't quite achieved
critical mass yet, but maybe this would help get there:




https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flor

e.kernel.org%2Flinux-pci%2F20201218174011.340514-1-

s.miroshnichenko%4
0yadro.com%2F&data=05%7C01%7Cchristian.koenig%40amd.com%7C8
096027
f68484d0656b108da50a82e7d%7C3dd8961fe4884e608e11a82d994e183d%7C
0%7C0%
7C637910980509199388%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
wMDAiLCJQ
IjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&
sdata=
%2FfntE2FTQ8wmLnz4wnzk94R0GMLEwVs7Mj18%2B9Q6PJk%3D&reser
ved=0

oh... I hadn't thought about pause/ioremap/unpause. That looks rad :).
So it seems this would integrate neatly with
pci_resize_resource() (what this patch is doing), as long as drivers
for devices affected implement
.bar_fixed()/.rescan_prepare()/.rescan_done(). That seems it would
solve our issues too.

Well we never ran into any of the issues you describe with PCIe BAR resize
for GPUs so there must be something you do differently to AMD hardware
regarding this.

Additional to that keep in mind that you can't resize the BAR before kicking
out vgacon/efifb or otherwise it can happen that the just released 256MiB
window is still used while you try to resize it. When you do that you usually
end up with a hard lockup of the system.

Regards,
Christian.


thanks
Lucas De Marchi


If I understand Sergei's series correctly, this rebalancing actually
cannot be done during enumeration because we only move BARs if a
driver for the device indicates that it supports it, so there would
be no requirement to do this early.


Do we have any alternative to be done in the PCI subsystem during
the scan?  There is other work in progress to allow i915 to use the
rest of the device memory even with a smaller BAR, but it would be
better if we can improve our chances of succeeding the resize.

Signed-off-by: Akeem G Abodunrin 
Signed-off-by: Michał Winiarski 
Cc: Stuart Summers 
Cc: Michael J Ruhl 
Cc: Prathap Kumar Valsan 
Signed-off-by: Priyanka Dandamudi



Reviewed-by: Matthew Auld 

Please see

https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flo
re.kernel.org%2Fr%2F87pmj8vesm.fsf%40intel.com&data=05%7C01%7C
ch
ristian.koenig%40amd.com%7C8096027f68484d0656b108da50a82e7d%7C3d
d896
1fe4884e608e11a82d994e183d%7C0%7C0%7C637910980509199388%7CUnk
nown%7C
TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiL
CJX
VCI6Mn0%3D%7C3000%7C%7C%7C&sdata=d4cf7HQ6t7y1Xobwjdt8im%
2Fh0E5IZ

sXgzQDpsB2vCU4%3D&reserved=0

---
   drivers/gpu/drm/i915/i915_driver.c | 92

++

   1 

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [CI,1/2] iosys-map: Add per-word read (rev2)

2022-06-28 Thread Patchwork
== Series Details ==

Series: series starting with [CI,1/2] iosys-map: Add per-word read (rev2)
URL   : https://patchwork.freedesktop.org/series/105746/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_11823 -> Patchwork_105746v2


Summary
---

  **SUCCESS**

  No regressions found.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v2/index.html

Participating hosts (37 -> 38)
--

  Additional (3): bat-dg2-8 fi-bxt-dsi bat-dg2-9 
  Missing(2): fi-icl-u2 fi-bdw-samus 

Known issues


  Here are the changes found in Patchwork_105746v2 that come from known issues:

### CI changes ###

 Issues hit 

  * boot:
- fi-skl-6700k2:  [PASS][1] -> [FAIL][2] ([i915#5032])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11823/fi-skl-6700k2/boot.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v2/fi-skl-6700k2/boot.html

  

### IGT changes ###

 Issues hit 

  * igt@gem_huc_copy@huc-copy:
- fi-bxt-dsi: NOTRUN -> [SKIP][3] ([fdo#109271] / [i915#2190])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v2/fi-bxt-dsi/igt@gem_huc_c...@huc-copy.html

  * igt@gem_lmem_swapping@verify-random:
- fi-bxt-dsi: NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#4613]) +3 
similar issues
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v2/fi-bxt-dsi/igt@gem_lmem_swapp...@verify-random.html

  * igt@gem_tiled_blits@basic:
- fi-bxt-dsi: NOTRUN -> [SKIP][5] ([fdo#109271]) +12 similar issues
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v2/fi-bxt-dsi/igt@gem_tiled_bl...@basic.html

  * igt@i915_module_load@load:
- fi-kbl-soraka:  [PASS][6] -> [DMESG-WARN][7] ([i915#1982])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11823/fi-kbl-soraka/igt@i915_module_l...@load.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v2/fi-kbl-soraka/igt@i915_module_l...@load.html

  * igt@i915_selftest@live@requests:
- fi-blb-e6850:   [PASS][8] -> [DMESG-FAIL][9] ([i915#4528])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11823/fi-blb-e6850/igt@i915_selftest@l...@requests.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v2/fi-blb-e6850/igt@i915_selftest@l...@requests.html

  * igt@kms_chamelium@common-hpd-after-suspend:
- fi-bsw-nick:NOTRUN -> [SKIP][10] ([fdo#109271] / [fdo#111827])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v2/fi-bsw-nick/igt@kms_chamel...@common-hpd-after-suspend.html

  * igt@kms_chamelium@hdmi-edid-read:
- fi-bxt-dsi: NOTRUN -> [SKIP][11] ([fdo#109271] / [fdo#111827]) +8 
similar issues
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v2/fi-bxt-dsi/igt@kms_chamel...@hdmi-edid-read.html

  * igt@kms_flip@basic-flip-vs-modeset@a-edp1:
- fi-tgl-u2:  [PASS][12] -> [DMESG-WARN][13] ([i915#402]) +1 
similar issue
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11823/fi-tgl-u2/igt@kms_flip@basic-flip-vs-mode...@a-edp1.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v2/fi-tgl-u2/igt@kms_flip@basic-flip-vs-mode...@a-edp1.html

  * igt@kms_pipe_crc_basic@suspend-read-crc:
- fi-bsw-nick:NOTRUN -> [SKIP][14] ([fdo#109271])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v2/fi-bsw-nick/igt@kms_pipe_crc_ba...@suspend-read-crc.html

  * igt@prime_vgem@basic-userptr:
- fi-tgl-u2:  NOTRUN -> [SKIP][15] ([fdo#109295] / [i915#3301])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v2/fi-tgl-u2/igt@prime_v...@basic-userptr.html

  
 Possible fixes 

  * igt@i915_selftest@live@execlists:
- fi-bsw-nick:[INCOMPLETE][16] ([i915#2940]) -> [PASS][17]
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11823/fi-bsw-nick/igt@i915_selftest@l...@execlists.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v2/fi-bsw-nick/igt@i915_selftest@l...@execlists.html

  * igt@kms_flip@basic-flip-vs-modeset@a-edp1:
- {bat-adlp-6}:   [DMESG-WARN][18] ([i915#3576]) -> [PASS][19] +1 
similar issue
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11823/bat-adlp-6/igt@kms_flip@basic-flip-vs-mode...@a-edp1.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v2/bat-adlp-6/igt@kms_flip@basic-flip-vs-mode...@a-edp1.html

  * igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1:
- fi-tgl-u2:  [DMESG-WARN][20] ([i915#402]) -> [PASS][21]
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11823/fi-tgl-u2/igt@kms_flip@basic-flip-vs-wf_vbl...@a-edp1.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_105746v2/fi-tgl-u2/igt@kms_flip@basic-flip-vs-wf_vbl...@a-edp1.html

  
  {name}: This element is suppressed. This means it is ignored when computing
  the statu

Re: [Intel-gfx] [PATCH v6 02/22] drm/gem: Move mapping of imported dma-bufs to drm_gem_mmap_obj()

2022-06-28 Thread Intel



On 5/27/22 01:50, Dmitry Osipenko wrote:

Drivers that use drm_gem_mmap() and drm_gem_mmap_obj() helpers don't
handle imported dma-bufs properly, which results in mapping of something
else than the imported dma-buf. For example, on NVIDIA Tegra we get a hard
lockup when userspace writes to the memory mapping of a dma-buf that was
imported into Tegra's DRM GEM.

To fix this bug, move mapping of imported dma-bufs to drm_gem_mmap_obj().
Now mmaping of imported dma-bufs works properly for all DRM drivers.

Same comment about Fixes: as in patch 1,


Cc: sta...@vger.kernel.org
Signed-off-by: Dmitry Osipenko 
---
  drivers/gpu/drm/drm_gem.c  | 3 +++
  drivers/gpu/drm/drm_gem_shmem_helper.c | 9 -
  drivers/gpu/drm/tegra/gem.c| 4 
  3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 86d670c71286..7c0b025508e4 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -1038,6 +1038,9 @@ int drm_gem_mmap_obj(struct drm_gem_object *obj, unsigned 
long obj_size,
if (obj_size < vma->vm_end - vma->vm_start)
return -EINVAL;
  
+	if (obj->import_attach)

+   return dma_buf_mmap(obj->dma_buf, vma, 0);


If we start enabling mmaping of imported dma-bufs on a majority of 
drivers in this way, how do we ensure that user-space is not blindly 
using the object mmap without calling the needed DMA_BUF_IOCTL_SYNC 
which is needed before and after cpu access of mmap'ed dma-bufs?


I was under the impression (admittedly without looking) that the few 
drivers that actually called into dma_buf_mmap() had some private 
user-mode driver code in place that ensured this happened.


/Thomas



+
/* Take a ref for this mapping of the object, so that the fault
 * handler can dereference the mmap offset's pointer to the object.
 * This reference is cleaned up by the corresponding vm_close
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c 
b/drivers/gpu/drm/drm_gem_shmem_helper.c
index 8ad0e02991ca..6190f5018986 100644
--- a/drivers/gpu/drm/drm_gem_shmem_helper.c
+++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
@@ -609,17 +609,8 @@ EXPORT_SYMBOL_GPL(drm_gem_shmem_vm_ops);
   */
  int drm_gem_shmem_mmap(struct drm_gem_shmem_object *shmem, struct 
vm_area_struct *vma)
  {
-   struct drm_gem_object *obj = &shmem->base;
int ret;
  
-	if (obj->import_attach) {

-   /* Drop the reference drm_gem_mmap_obj() acquired.*/
-   drm_gem_object_put(obj);
-   vma->vm_private_data = NULL;
-
-   return dma_buf_mmap(obj->dma_buf, vma, 0);
-   }
-
ret = drm_gem_shmem_get_pages(shmem);
if (ret) {
drm_gem_vm_close(vma);
diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c
index 7c7dd84e6db8..f92aa20d63bb 100644
--- a/drivers/gpu/drm/tegra/gem.c
+++ b/drivers/gpu/drm/tegra/gem.c
@@ -564,6 +564,10 @@ int __tegra_gem_mmap(struct drm_gem_object *gem, struct 
vm_area_struct *vma)
  {
struct tegra_bo *bo = to_tegra_bo(gem);
  
+	/* imported dmu-buf is mapped by drm_gem_mmap_obj()  */

+   if (gem->import_attach)
+   return 0;
+
if (!bo->pages) {
unsigned long vm_pgoff = vma->vm_pgoff;
int err;


Re: [Intel-gfx] [PATCH v6 08/22] drm/virtio: Unlock reservations on dma_resv_reserve_fences() error

2022-06-28 Thread Intel



On 5/27/22 01:50, Dmitry Osipenko wrote:

Unlock reservations on dma_resv_reserve_fences() error to fix recursive
locking of the reservations when this error happens.

Fixes:

Cc: sta...@vger.kernel.org


With that fixed,

Reviewed-by: Thomas Hellström 



Signed-off-by: Dmitry Osipenko 
---
  drivers/gpu/drm/virtio/virtgpu_gem.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_gem.c 
b/drivers/gpu/drm/virtio/virtgpu_gem.c
index 580a78809836..7db48d17ee3a 100644
--- a/drivers/gpu/drm/virtio/virtgpu_gem.c
+++ b/drivers/gpu/drm/virtio/virtgpu_gem.c
@@ -228,8 +228,10 @@ int virtio_gpu_array_lock_resv(struct 
virtio_gpu_object_array *objs)
  
  	for (i = 0; i < objs->nents; ++i) {

ret = dma_resv_reserve_fences(objs->objs[i]->resv, 1);
-   if (ret)
+   if (ret) {
+   virtio_gpu_array_unlock_resv(objs);
return ret;
+   }
}
return ret;
  }