Re: [PATCH] tracing/treewide: Remove second parameter of __assign_str()

2024-05-17 Thread Guenter Roeck

On 5/17/24 11:00, Guenter Roeck wrote:

On 5/17/24 10:48, Steven Rostedt wrote:

On Fri, 17 May 2024 10:36:37 -0700
Guenter Roeck  wrote:


Building csky:allmodconfig (and others) ... failed
--
Error log:
In file included from include/trace/trace_events.h:419,
  from include/trace/define_trace.h:102,
  from drivers/cxl/core/trace.h:737,
  from drivers/cxl/core/trace.c:8:
drivers/cxl/core/./trace.h:383:1: error: macro "__assign_str" passed 2 
arguments, but takes just 1

This is with the patch applied on top of v6.9-8410-gff2632d7d08e.
So far that seems to be the only build failure.
Introduced with commit 6aec00139d3a8 ("cxl/core: Add region info to
cxl_general_media and cxl_dram events"). Guess we'll see more of those
towards the end of the commit window.


Looks like I made this patch just before this commit was pulled into
Linus's tree.

Which is why I'll apply and rerun the above again probably on Tuesday of
next week against Linus's latest.

This patch made it through both an allyesconfig and an allmodconfig, but on
the commit I had applied it to, which was:

   1b294a1f3561 ("Merge tag 'net-next-6.10' of 
git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next")

I'll be compiling those two builds after I update it then.



I am currently repeating my test builds with the above errors fixed.
That should take a couple of hours. I'll let you know how it goes.



There are no more build failures caused by this patch after fixing the above
errors.

Tested-by: Guenter Roeck 

Guenter



Re: [RESEND v3 1/2] drm: enable (most) W=1 warnings by default across the subsystem

2024-05-17 Thread Guenter Roeck
Hi,

On Tue, Mar 05, 2024 at 11:07:35AM +0200, Jani Nikula wrote:
> At least the i915 and amd drivers enable a bunch more compiler warnings
> than the kernel defaults.
> 
> Extend most of the W=1 warnings to the entire drm subsystem by
> default. Use the copy-pasted warnings from scripts/Makefile.extrawarn
> with s/KBUILD_CFLAGS/subdir-ccflags-y/ to make it easier to compare and
> keep up with them in the future.
> 
> This is similar to the approach currently used in i915.
> 
> Some of the -Wextra warnings do need to be disabled, just like in
> Makefile.extrawarn, but take care to not disable them for W=2 or W=3
> builds, depending on the warning.
> 
> There are too many -Wformat-truncation warnings to cleanly fix up front;
> leave that warning disabled for now.
> 

With this patch in the mainline kernel, I get the following build error
when trying to build parisc:allmodconfig.

Error log:
drivers/gpu/drm/nouveau/nvif/object.c: In function 'nvif_object_mthd':
drivers/gpu/drm/nouveau/nvif/object.c:161:9: error: 'memcpy' accessing 
4294967264 or more bytes at offsets 0 and 32 overlaps 6442450881 bytes at 
offset -2147483617 [-Werror=restrict]
  161 | memcpy(data, args->mthd.data, size);
  | ^~~
drivers/gpu/drm/nouveau/nvif/object.c: In function 'nvif_object_ctor':
drivers/gpu/drm/nouveau/nvif/object.c:298:17: error: 'memcpy' accessing 
4294967240 or more bytes at offsets 0 and 56 overlaps 6442450833 bytes at 
offset -2147483593 [-Werror=restrict]
  298 | memcpy(data, args->new.data, size);

The problem is also seen with v6.9 when trying to build an image
with W=1, so it is not triggered by a code change. I don't know
if other architectures are affected. The problem is not seen with
gcc 11.4, but it is seen with gcc 12.3 and 13.2. I did not try
with older versions of gcc.

Bisect log is attached for reference.

The odd error makes me wonder if I should revert to testing with gcc 11.4
and no longer bother with later versions of gcc, at least for any affected
architectures. Any recommendations ?

Thanks,
Guenter

---
# bad: [7ee332c9f12bc5b380e36919cd7d056592a7073f] Merge tag 'parisc-for-6.10-1' 
of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
# good: [a38297e3fb012ddfa7ce0321a7e5a8daeb1872b6] Linux 6.9
git bisect start 'HEAD' 'v6.9'
# good: [1b294a1f35616977caddaddf3e9d28e576a1adbc] Merge tag 'net-next-6.10' of 
git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next
git bisect good 1b294a1f35616977caddaddf3e9d28e576a1adbc
# bad: [d34672777da3ea919e8adb0670ab91ddadf7dea0] Merge tag 
'fbdev-for-6.10-rc1' of 
git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev
git bisect bad d34672777da3ea919e8adb0670ab91ddadf7dea0
# bad: [2871ec40994912ce4f2e2d5072a428eb84c77d3c] Merge tag 
'drm-misc-next-2024-04-19' of https://gitlab.freedesktop.org/drm/misc/kernel 
into drm-next
git bisect bad 2871ec40994912ce4f2e2d5072a428eb84c77d3c
# bad: [34633158b8eb8fca145c9a73f8fe4f98c7275b06] Merge tag 
'amd-drm-next-6.10-2024-04-13' of https://gitlab.freedesktop.org/agd5f/linux 
into drm-next
git bisect bad 34633158b8eb8fca145c9a73f8fe4f98c7275b06
# good: [4b0cb230bdb71c23981acfa5e7b367c7dde02a41] drm/amdgpu: retire UMC v12 
mca_addr_to_pa
git bisect good 4b0cb230bdb71c23981acfa5e7b367c7dde02a41
# bad: [6376eb8b911534735fec104c1a0d780e4cf3116a] drm/dp: Clarify that 
wait_hpd_asserted() is not optional for panels
git bisect bad 6376eb8b911534735fec104c1a0d780e4cf3116a
# bad: [9c86b03863844ce69f99aa66404c79492ec9e208] drm/panthor: Fix 
panthor_devfreq kerneldoc
git bisect bad 9c86b03863844ce69f99aa66404c79492ec9e208
# bad: [b5d7cb76f2674c9d01b611141702723a95d12553] drm: add missing header 
guards to drm_internal.h
git bisect bad b5d7cb76f2674c9d01b611141702723a95d12553
# good: [4bdca11507928a4c9174e9b7240e9d058c12a71d] drm/panthor: Add the driver 
frontend block
git bisect good 4bdca11507928a4c9174e9b7240e9d058c12a71d
# good: [b2ec429b69280001d85029dc50b5427af41eb641] drm/tidss: Use 
dev_err_probe() over dev_dbg() when failing to probe the port
git bisect good b2ec429b69280001d85029dc50b5427af41eb641
# bad: [a61ddb4393ad1be61d2ffd92576d42707b05be17] drm: enable (most) W=1 
warnings by default across the subsystem
git bisect bad a61ddb4393ad1be61d2ffd92576d42707b05be17
# good: [113cc3ad8566e06d6c8ef4fc0075a938dedefab5] drm/bridge: Document bridge 
init order with pre_enable_prev_first
git bisect good 113cc3ad8566e06d6c8ef4fc0075a938dedefab5
# good: [460be1d527a8e296d85301e8b14923299508d4fc] drm/nouveau: move more 
missing UAPI bits
git bisect good 460be1d527a8e296d85301e8b14923299508d4fc
# first bad commit: [a61ddb4393ad1be61d2ffd92576d42707b05be17] drm: enable 
(most) W=1 warnings by default across the subsystem


Re: [PATCH] drm/i915/gt: Fix CCS id's calculation for CCS mode setting

2024-05-17 Thread Umesh Nerlige Ramappa

On Fri, May 17, 2024 at 11:06:16AM +0200, Andi Shyti wrote:

The whole point of the previous fixes has been to change the CCS
hardware configuration to generate only one stream available to
the compute users. We did this by changing the info.engine_mask
that is set during device probe, reset during the detection of
the fused engines, and finally reset again when choosing the CCS
mode.

We can't use the engine_mask variable anymore, as with the
current configuration, it imposes only one CCS no matter what the
hardware configuration is.

Before changing the engine_mask for the third time, save it and
use it for calculating the CCS mode.

After the previous changes, the user reported a performance drop
to around 1/4. We have tested that the compute operations, with
the current patch, have improved by the same factor.

Fixes: 6db31251bb26 ("drm/i915/gt: Enable only one CCS for compute workload")
Cc: Chris Wilson 
Cc: Gnattu OC 
Cc: Joonas Lahtinen 
Cc: Matt Roper 
Tested-by: Jian Ye 
---
Hi,

This ensures that all four CCS engines work properly. However,
during the tests, Jian detected that the performance during
memory copy assigned to the CCS engines is negatively impacted.

I believe this might be expected, considering that based on the
engines' availability, the media user might decide to reduce the
copy in multitasking.

With the upcoming work that will give the user the chance to
configure the CCS mode, this might improve.

Gnattu, can I use your kindness to ask for a test on this patch
and check whether the performance improve on your side as well?

Thanks,
Andi

drivers/gpu/drm/i915/gt/intel_engine_cs.c   | 6 ++
drivers/gpu/drm/i915/gt/intel_gt_ccs_mode.c | 2 +-
drivers/gpu/drm/i915/gt/intel_gt_types.h| 8 
3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c 
b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index 5c8e9ee3b008..3b740ca25000 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -885,6 +885,12 @@ static intel_engine_mask_t init_engine_mask(struct 
intel_gt *gt)
if (IS_DG2(gt->i915)) {
u8 first_ccs = __ffs(CCS_MASK(gt));

+   /*
+* Store the number of active cslices before
+* changing the CCS engine configuration
+*/
+   gt->ccs.cslices = CCS_MASK(gt);
+
/* Mask off all the CCS engine */
info->engine_mask &= ~GENMASK(CCS3, CCS0);
/* Put back in the first CCS engine */
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_ccs_mode.c 
b/drivers/gpu/drm/i915/gt/intel_gt_ccs_mode.c
index 99b71bb7da0a..3c62a44e9106 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_ccs_mode.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_ccs_mode.c
@@ -19,7 +19,7 @@ unsigned int intel_gt_apply_ccs_mode(struct intel_gt *gt)

/* Build the value for the fixed CCS load balancing */
for (cslice = 0; cslice < I915_MAX_CCS; cslice++) {
-   if (CCS_MASK(gt) & BIT(cslice))
+   if (gt->ccs.cslices & BIT(cslice))
/*
 * If available, assign the cslice
 * to the first available engine...
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_types.h 
b/drivers/gpu/drm/i915/gt/intel_gt_types.h
index def7dd0eb6f1..cfdd2ad5e954 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_types.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt_types.h
@@ -207,6 +207,14 @@ struct intel_gt {
[MAX_ENGINE_INSTANCE + 1];
enum intel_submission_method submission_method;

+   struct {
+   /*
+* Mask of the non fused CCS slices
+* to be used for the load balancing
+*/
+   intel_engine_mask_t cslices;
+   } ccs;
+


LGTM,

Reviewed-by: Umesh Nerlige Ramappa 


/*
 * Default address space (either GGTT or ppGTT depending on arch).
 *
--
2.43.0



Re: [PATCH 2/2] drm/i915: Don't treat FLR resets as errors

2024-05-17 Thread Nirmoy Das

Hi Andi,

On 5/17/2024 9:34 PM, Andi Shyti wrote:

Hi Nirmoy,

On Fri, May 17, 2024 at 04:00:02PM +0200, Nirmoy Das wrote:

On 5/17/2024 1:25 PM, Andi Shyti wrote:

If we timeout while waiting for an FLR reset, there is nothing we
can do and i915 doesn't have any control on it. In any case the
system is still perfectly usable

If a FLR reset fails then we will have a dead GPU, I don't think the GPU is
usable without a cold reboot.

fact is that the GPU keeps going and even though the timeout has
expired, the system moves to the next phase.
The current test might look like it is has passed, but if you look into 
the subsequent tests you can see a dead GPU:


<7>[  369.168121] pci :00:02.0: [drm:intel_uncore_fini_mmio [i915]] 
Triggering Driver-FLR
*<3>[ 372.170189] pci :00:02.0: [drm] *ERROR* Driver-FLR-teardown 
wait completion failed! -110*

*<7>[ 372.437630] [IGT] i915_selftest: finished subtest requests, SUCCESS*
<7>[  372.438356] [IGT] i915_selftest: starting dynamic subtest migrate
<5>[  373.110580] Setting dangerous option live_selftests - tainting kernel
<3>[  373.183499] i915 :00:02.0: Unable to change power state from D0 to 
D0, device inaccessible
<3>[  373.246921] i915 :00:02.0: [drm] *ERROR* Unrecognized display IP 
version 1023.255; disabling display.
<7>[  373.247130] i915 :00:02.0: [drm:intel_step_init [i915]] Using future 
steppings
<7>[  373.247716] i915 :00:02.0: [drm:intel_step_init [i915]] Using future 
steppings
<7>[  373.248263] i915 :00:02.0: [drm:intel_step_init [i915]] Using future 
display steppings
<7>[  373.251843] i915 :00:02.0: [drm:intel_gt_common_init_early [i915]] 
WOPCM: 2048K
<7>[  373.252505] i915 :00:02.0: [drm:intel_uc_init_early [i915]] GT0: 
enable_guc=3 (guc:yes submission:yes huc:no slpc:yes)
<7>[  373.253140] i915 :00:02.0: [drm:intel_gt_probe_all [i915]] GT0: 
Setting up Primary GT
<7>[  373.253556] i915 :00:02.0: [drm:intel_gt_probe_all [i915]] GT1: 
Setting up Standalone Media GT
<7>[  373.253941] i915 :00:02.0: [drm:intel_gt_common_init_early [i915]] 
WOPCM: 2048K
<7>[  373.254365] i915 :00:02.0: [drm:intel_uc_init_early [i915]] GT1: 
enable_guc=3 (guc:yes submission:yes huc:yes slpc:yes)
*<3>[ 375.256235] i915 :00:02.0: [drm] *ERROR* Device is 
non-operational; MMIO access returns 0x!*

<3>[  375.259089] i915 :00:02.0: Device initialization failed (-5)
<3>[  375.260521] i915 :00:02.0: probe with driver i915 failed with error -5
<7>[  375.392209] [IGT] i915_selftest: finished subtest migrate, FAIL

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14724/bat-arls-3/dmesg0.txt




This is a serious issue and should be report as an error.  I think we need
to create a HW ticket to understand

why is FLR reset fails.

Maybe it takes longer and longer to reset. We've been sending
several patches in the latest years to fix the timings.


HW spec says 3 sec but we can try increasing it bit higher to try it out.


Regards,

Nirmoy



Andi

Re: [PATCH 2/2] drm/i915: Don't treat FLR resets as errors

2024-05-17 Thread Andi Shyti
Hi Nirmoy,

On Fri, May 17, 2024 at 04:00:02PM +0200, Nirmoy Das wrote:
> On 5/17/2024 1:25 PM, Andi Shyti wrote:
> > If we timeout while waiting for an FLR reset, there is nothing we
> > can do and i915 doesn't have any control on it. In any case the
> > system is still perfectly usable
> 
> If a FLR reset fails then we will have a dead GPU, I don't think the GPU is
> usable without a cold reboot.

fact is that the GPU keeps going and even though the timeout has
expired, the system moves to the next phase.

> This is a serious issue and should be report as an error.  I think we need
> to create a HW ticket to understand
> 
> why is FLR reset fails.

Maybe it takes longer and longer to reset. We've been sending
several patches in the latest years to fix the timings.

Andi


✓ Fi.CI.BAT: success for drm/i915: Plane register cleanups (rev2)

2024-05-17 Thread Patchwork
== Series Details ==

Series: drm/i915: Plane register cleanups (rev2)
URL   : https://patchwork.freedesktop.org/series/133701/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14783 -> Patchwork_133701v2


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (42 -> 37)
--

  Missing(5): fi-kbl-7567u fi-snb-2520m fi-cfl-8109u fi-kbl-8809g 
bat-dg2-11 

Possible new issues
---

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

### IGT changes ###

 Suppressed 

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

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-nv12@pipe-a-edp-1:
- {bat-twl-1}:[PASS][1] -> [DMESG-WARN][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14783/bat-twl-1/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-n...@pipe-a-edp-1.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133701v2/bat-twl-1/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-n...@pipe-a-edp-1.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_lmem_swapping@parallel-random-engines:
- bat-adlm-1: NOTRUN -> [SKIP][3] ([i915#4613]) +2 other tests skip
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133701v2/bat-adlm-1/igt@gem_lmem_swapp...@parallel-random-engines.html

  * igt@i915_module_load@load:
- bat-arls-3: [PASS][4] -> [ABORT][5] ([i915#11041])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14783/bat-arls-3/igt@i915_module_l...@load.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133701v2/bat-arls-3/igt@i915_module_l...@load.html

  * igt@i915_selftest@live@execlists:
- fi-bsw-nick:[PASS][6] -> [ABORT][7] ([i915#10594])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14783/fi-bsw-nick/igt@i915_selftest@l...@execlists.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133701v2/fi-bsw-nick/igt@i915_selftest@l...@execlists.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-nv12@pipe-b-edp-1:
- bat-mtlp-8: [PASS][8] -> [DMESG-WARN][9] ([i915#9157]) +1 other 
test dmesg-warn
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14783/bat-mtlp-8/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-n...@pipe-b-edp-1.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133701v2/bat-mtlp-8/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-n...@pipe-b-edp-1.html

  
 Possible fixes 

  * igt@i915_pm_rpm@module-reload:
- {bat-mtlp-9}:   [WARN][10] ([i915#10436]) -> [PASS][11]
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14783/bat-mtlp-9/igt@i915_pm_...@module-reload.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133701v2/bat-mtlp-9/igt@i915_pm_...@module-reload.html

  * igt@kms_pm_rpm@basic-pci-d3-state:
- {bat-mtlp-9}:   [DMESG-WARN][12] ([i915#10435]) -> [PASS][13]
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14783/bat-mtlp-9/igt@kms_pm_...@basic-pci-d3-state.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133701v2/bat-mtlp-9/igt@kms_pm_...@basic-pci-d3-state.html

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

  [i915#10435]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10435
  [i915#10436]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10436
  [i915#10594]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10594
  [i915#11041]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11041
  [i915#1982]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1982
  [i915#4613]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4613
  [i915#9157]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9157


Build changes
-

  * Linux: CI_DRM_14783 -> Patchwork_133701v2

  CI-20190529: 20190529
  CI_DRM_14783: bb0d6cdd4afb60a01432f817c52f198f64620728 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7861: 7861
  Patchwork_133701v2: bb0d6cdd4afb60a01432f817c52f198f64620728 @ 
git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133701v2/index.html


✗ Fi.CI.SPARSE: warning for drm/i915: Plane register cleanups (rev2)

2024-05-17 Thread Patchwork
== Series Details ==

Series: drm/i915: Plane register cleanups (rev2)
URL   : https://patchwork.freedesktop.org/series/133701/
State : warning

== Summary ==

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




✗ Fi.CI.CHECKPATCH: warning for drm/i915: Plane register cleanups (rev2)

2024-05-17 Thread Patchwork
== Series Details ==

Series: drm/i915: Plane register cleanups (rev2)
URL   : https://patchwork.freedesktop.org/series/133701/
State : warning

== Summary ==

Error: dim checkpatch failed
6b9d030f5372 drm/i915: Add skl+ plane name aliases to enum plane_id
e764cc62d70e drm/i915: Clean up the cursor register defines
29a094b876cf drm/i915: Add separate define for SEL_FETCH_CUR_CTL()
d32d8a4a18e8 drm/i915: Simplify PIPESRC_ERLY_TPT definition
-:54: WARNING:LONG_LINE: line length of 106 exceeds 100 columns
#54: FILE: drivers/gpu/drm/i915/display/intel_psr_regs.h:252:
+#define PIPE_SRCSZ_ERLY_TPT(pipe)  _MMIO_PIPE((pipe), 
_PIPE_SRCSZ_ERLY_TPT_A, _PIPE_SRCSZ_ERLY_TPT_B)

total: 0 errors, 1 warnings, 0 checks, 26 lines checked
0e608f6cec24 drm/i915: Rename selective fetch plane registers
6b95624ddd17 drm/i915: Define SEL_FETCH_PLANE registers via PICK_EVEN_2RANGES()
-:90: WARNING:LONG_LINE: line length of 105 exceeds 100 columns
#90: FILE: drivers/gpu/drm/i915/display/skl_universal_plane_regs.h:20:
+#define _SEL_FETCH(pipe, plane, reg_1_a, reg_1_b, reg_2_a, reg_2_b, reg_5_a, 
reg_5_b, reg_6_a, reg_6_b) \

-:90: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'pipe' - possible 
side-effects?
#90: FILE: drivers/gpu/drm/i915/display/skl_universal_plane_regs.h:20:
+#define _SEL_FETCH(pipe, plane, reg_1_a, reg_1_b, reg_2_a, reg_2_b, reg_5_a, 
reg_5_b, reg_6_a, reg_6_b) \
+   _PICK_EVEN_2RANGES((plane), PLANE_5, \
+  _PIPE((pipe), (reg_1_a), (reg_1_b)), \
+  _PIPE((pipe), (reg_2_a), (reg_2_b)), \
+  _PIPE((pipe), (reg_5_a), (reg_5_b)), \
+  _PIPE((pipe), (reg_6_a), (reg_6_b)))

-:96: WARNING:LONG_LINE: line length of 110 exceeds 100 columns
#96: FILE: drivers/gpu/drm/i915/display/skl_universal_plane_regs.h:26:
+#define _MMIO_SEL_FETCH(pipe, plane, reg_1_a, reg_1_b, reg_2_a, reg_2_b, 
reg_5_a, reg_5_b, reg_6_a, reg_6_b) \

-:117: WARNING:LONG_LINE: line length of 117 exceeds 100 columns
#117: FILE: drivers/gpu/drm/i915/display/skl_universal_plane_regs.h:390:
+   
_SEL_FETCH_PLANE_CTL_1_A, _SEL_FETCH_PLANE_CTL_1_B, \

-:118: WARNING:LONG_LINE: line length of 117 exceeds 100 columns
#118: FILE: drivers/gpu/drm/i915/display/skl_universal_plane_regs.h:391:
+   
_SEL_FETCH_PLANE_CTL_2_A, _SEL_FETCH_PLANE_CTL_2_B, \

-:119: WARNING:LONG_LINE: line length of 117 exceeds 100 columns
#119: FILE: drivers/gpu/drm/i915/display/skl_universal_plane_regs.h:392:
+   
_SEL_FETCH_PLANE_CTL_5_A, _SEL_FETCH_PLANE_CTL_5_B, \

-:120: WARNING:LONG_LINE: line length of 115 exceeds 100 columns
#120: FILE: drivers/gpu/drm/i915/display/skl_universal_plane_regs.h:393:
+   
_SEL_FETCH_PLANE_CTL_6_A, _SEL_FETCH_PLANE_CTL_6_B)

-:132: WARNING:LONG_LINE: line length of 117 exceeds 100 columns
#132: FILE: drivers/gpu/drm/i915/display/skl_universal_plane_regs.h:405:
+   
_SEL_FETCH_PLANE_POS_1_A, _SEL_FETCH_PLANE_POS_1_B, \

-:133: WARNING:LONG_LINE: line length of 117 exceeds 100 columns
#133: FILE: drivers/gpu/drm/i915/display/skl_universal_plane_regs.h:406:
+   
_SEL_FETCH_PLANE_POS_2_A, _SEL_FETCH_PLANE_POS_2_B, \

-:134: WARNING:LONG_LINE: line length of 117 exceeds 100 columns
#134: FILE: drivers/gpu/drm/i915/display/skl_universal_plane_regs.h:407:
+   
_SEL_FETCH_PLANE_POS_5_A, _SEL_FETCH_PLANE_POS_5_B, \

-:135: WARNING:LONG_LINE: line length of 115 exceeds 100 columns
#135: FILE: drivers/gpu/drm/i915/display/skl_universal_plane_regs.h:408:
+   
_SEL_FETCH_PLANE_POS_6_A, _SEL_FETCH_PLANE_POS_6_B)

-:146: WARNING:LONG_LINE: line length of 117 exceeds 100 columns
#146: FILE: drivers/gpu/drm/i915/display/skl_universal_plane_regs.h:419:
+   
_SEL_FETCH_PLANE_POS_1_A, _SEL_FETCH_PLANE_POS_1_B, \

-:147: WARNING:LONG_LINE: line length of 117 exceeds 100 columns
#147: FILE: drivers/gpu/drm/i915/display/skl_universal_plane_regs.h:420:
+   
_SEL_FETCH_PLANE_POS_2_A, _SEL_FETCH_PLANE_POS_2_B, \

-:148: WARNING:LONG_LINE: line length of 117 exceeds 100 columns
#148: FILE: drivers/gpu/drm/i915/display/skl_universal_plane_regs.h:421:
+   
_SEL_FETCH_PLANE_POS_5_A, _SEL_FETCH_PLANE_POS_5_B, \

-:149: WARNING:LONG_LINE: line length of 115 exceeds 100 columns
#149: FILE: drivers/gpu/drm/i915/display/skl_universal_plane_regs.h:422:
+   

Re: [PATCH] tracing/treewide: Remove second parameter of __assign_str()

2024-05-17 Thread Guenter Roeck

On 5/17/24 10:48, Steven Rostedt wrote:

On Fri, 17 May 2024 10:36:37 -0700
Guenter Roeck  wrote:


Building csky:allmodconfig (and others) ... failed
--
Error log:
In file included from include/trace/trace_events.h:419,
  from include/trace/define_trace.h:102,
  from drivers/cxl/core/trace.h:737,
  from drivers/cxl/core/trace.c:8:
drivers/cxl/core/./trace.h:383:1: error: macro "__assign_str" passed 2 
arguments, but takes just 1

This is with the patch applied on top of v6.9-8410-gff2632d7d08e.
So far that seems to be the only build failure.
Introduced with commit 6aec00139d3a8 ("cxl/core: Add region info to
cxl_general_media and cxl_dram events"). Guess we'll see more of those
towards the end of the commit window.


Looks like I made this patch just before this commit was pulled into
Linus's tree.

Which is why I'll apply and rerun the above again probably on Tuesday of
next week against Linus's latest.

This patch made it through both an allyesconfig and an allmodconfig, but on
the commit I had applied it to, which was:

   1b294a1f3561 ("Merge tag 'net-next-6.10' of 
git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next")

I'll be compiling those two builds after I update it then.



I am currently repeating my test builds with the above errors fixed.
That should take a couple of hours. I'll let you know how it goes.

Guenter



Re: [PATCH] tracing/treewide: Remove second parameter of __assign_str()

2024-05-17 Thread Steven Rostedt
On Fri, 17 May 2024 10:36:37 -0700
Guenter Roeck  wrote:

> Building csky:allmodconfig (and others) ... failed
> --
> Error log:
> In file included from include/trace/trace_events.h:419,
>  from include/trace/define_trace.h:102,
>  from drivers/cxl/core/trace.h:737,
>  from drivers/cxl/core/trace.c:8:
> drivers/cxl/core/./trace.h:383:1: error: macro "__assign_str" passed 2 
> arguments, but takes just 1
> 
> This is with the patch applied on top of v6.9-8410-gff2632d7d08e.
> So far that seems to be the only build failure.
> Introduced with commit 6aec00139d3a8 ("cxl/core: Add region info to
> cxl_general_media and cxl_dram events"). Guess we'll see more of those
> towards the end of the commit window.

Looks like I made this patch just before this commit was pulled into
Linus's tree.

Which is why I'll apply and rerun the above again probably on Tuesday of
next week against Linus's latest.

This patch made it through both an allyesconfig and an allmodconfig, but on
the commit I had applied it to, which was:

  1b294a1f3561 ("Merge tag 'net-next-6.10' of 
git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next")

I'll be compiling those two builds after I update it then.

-- Steve


Re: [PATCH] tracing/treewide: Remove second parameter of __assign_str()

2024-05-17 Thread Guenter Roeck
On Thu, May 16, 2024 at 01:34:54PM -0400, Steven Rostedt wrote:
> From: "Steven Rostedt (Google)" 
> 
> [
>This is a treewide change. I will likely re-create this patch again in
>the second week of the merge window of v6.10 and submit it then. Hoping
>to keep the conflicts that it will cause to a minimum.
> ]
> 
> With the rework of how the __string() handles dynamic strings where it
> saves off the source string in field in the helper structure[1], the
> assignment of that value to the trace event field is stored in the helper
> value and does not need to be passed in again.
> 
> This means that with:
> 
>   __string(field, mystring)
> 
> Which use to be assigned with __assign_str(field, mystring), no longer
> needs the second parameter and it is unused. With this, __assign_str()
> will now only get a single parameter.
> 
> There's over 700 users of __assign_str() and because coccinelle does not
> handle the TRACE_EVENT() macro I ended up using the following sed script:
> 
>   git grep -l __assign_str | while read a ; do
>   sed -e 's/\(__assign_str([^,]*[^ ,]\) *,[^;]*/\1)/' $a > /tmp/test-file;
>   mv /tmp/test-file $a;
>   done
> 
> I then searched for __assign_str() that did not end with ';' as those
> were multi line assignments that the sed script above would fail to catch.
> 

Building csky:allmodconfig (and others) ... failed
--
Error log:
In file included from include/trace/trace_events.h:419,
 from include/trace/define_trace.h:102,
 from drivers/cxl/core/trace.h:737,
 from drivers/cxl/core/trace.c:8:
drivers/cxl/core/./trace.h:383:1: error: macro "__assign_str" passed 2 
arguments, but takes just 1

This is with the patch applied on top of v6.9-8410-gff2632d7d08e.
So far that seems to be the only build failure.
Introduced with commit 6aec00139d3a8 ("cxl/core: Add region info to
cxl_general_media and cxl_dram events"). Guess we'll see more of those
towards the end of the commit window.

Guenter


✓ Fi.CI.BAT: success for Improve drm printer code (rev2)

2024-05-17 Thread Patchwork
== Series Details ==

Series: Improve drm printer code (rev2)
URL   : https://patchwork.freedesktop.org/series/133749/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14782 -> Patchwork_133749v2


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (44 -> 42)
--

  Additional (1): bat-mtlp-6 
  Missing(3): bat-arls-1 fi-snb-2520m fi-kbl-8809g 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@debugfs_test@basic-hwmon:
- bat-mtlp-6: NOTRUN -> [SKIP][1] ([i915#9318])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133749v2/bat-mtlp-6/igt@debugfs_t...@basic-hwmon.html

  * igt@fbdev@info:
- bat-mtlp-6: NOTRUN -> [SKIP][2] ([i915#1849] / [i915#2582])
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133749v2/bat-mtlp-6/igt@fb...@info.html

  * igt@fbdev@write:
- bat-mtlp-6: NOTRUN -> [SKIP][3] ([i915#2582]) +3 other tests skip
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133749v2/bat-mtlp-6/igt@fb...@write.html

  * igt@gem_lmem_swapping@verify-random:
- bat-mtlp-6: NOTRUN -> [SKIP][4] ([i915#4613]) +3 other tests skip
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133749v2/bat-mtlp-6/igt@gem_lmem_swapp...@verify-random.html

  * igt@gem_mmap@basic:
- bat-mtlp-6: NOTRUN -> [SKIP][5] ([i915#4083])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133749v2/bat-mtlp-6/igt@gem_m...@basic.html

  * igt@gem_tiled_blits@basic:
- bat-mtlp-6: NOTRUN -> [SKIP][6] ([i915#4077]) +2 other tests skip
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133749v2/bat-mtlp-6/igt@gem_tiled_bl...@basic.html

  * igt@gem_tiled_pread_basic:
- bat-mtlp-6: NOTRUN -> [SKIP][7] ([i915#4079]) +1 other test skip
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133749v2/bat-mtlp-6/igt@gem_tiled_pread_basic.html

  * igt@i915_module_load@load:
- bat-arls-3: [PASS][8] -> [ABORT][9] ([i915#11041])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14782/bat-arls-3/igt@i915_module_l...@load.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133749v2/bat-arls-3/igt@i915_module_l...@load.html

  * igt@i915_pm_rps@basic-api:
- bat-mtlp-6: NOTRUN -> [SKIP][10] ([i915#6621])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133749v2/bat-mtlp-6/igt@i915_pm_...@basic-api.html

  * igt@kms_addfb_basic@addfb25-x-tiled-legacy:
- bat-mtlp-6: NOTRUN -> [SKIP][11] ([i915#4212] / [i915#9792]) +8 
other tests skip
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133749v2/bat-mtlp-6/igt@kms_addfb_ba...@addfb25-x-tiled-legacy.html

  * igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- bat-mtlp-6: NOTRUN -> [SKIP][12] ([i915#5190] / [i915#9792])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133749v2/bat-mtlp-6/igt@kms_addfb_ba...@addfb25-y-tiled-small-legacy.html

  * igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
- bat-mtlp-6: NOTRUN -> [SKIP][13] ([i915#9792]) +17 other tests 
skip
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133749v2/bat-mtlp-6/igt@kms_cursor_leg...@basic-flip-after-cursor-legacy.html

  * igt@kms_flip@basic-flip-vs-dpms:
- bat-mtlp-6: NOTRUN -> [SKIP][14] ([i915#3637] / [i915#9792]) +3 
other tests skip
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133749v2/bat-mtlp-6/igt@kms_f...@basic-flip-vs-dpms.html

  * igt@kms_force_connector_basic@prune-stale-modes:
- bat-mtlp-6: NOTRUN -> [SKIP][15] ([i915#5274] / [i915#9792])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133749v2/bat-mtlp-6/igt@kms_force_connector_ba...@prune-stale-modes.html

  * igt@kms_frontbuffer_tracking@basic:
- bat-mtlp-6: NOTRUN -> [SKIP][16] ([i915#4342] / [i915#5354] / 
[i915#9792])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133749v2/bat-mtlp-6/igt@kms_frontbuffer_track...@basic.html

  * igt@kms_pm_backlight@basic-brightness:
- bat-mtlp-6: NOTRUN -> [SKIP][17] ([i915#5354] / [i915#9792])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133749v2/bat-mtlp-6/igt@kms_pm_backli...@basic-brightness.html

  * igt@kms_psr@psr-cursor-plane-move:
- bat-mtlp-6: NOTRUN -> [SKIP][18] ([i915#1072] / [i915#9673] / 
[i915#9732] / [i915#9792]) +3 other tests skip
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133749v2/bat-mtlp-6/igt@kms_...@psr-cursor-plane-move.html

  * igt@kms_setmode@basic-clone-single-crtc:
- bat-mtlp-6: NOTRUN -> [SKIP][19] ([i915#3555] / [i915#8809] / 
[i915#9792])
   [19]: 

[PATCH v2 01/13] drm/i915: Add skl+ plane name aliases to enum plane_id

2024-05-17 Thread Ville Syrjala
From: Ville Syrjälä 

Using PLANE_PRIMARY + PLANE_SPRITE? on skl+ results in a bunch
of unnecessary head scratching. Add aliases using the skl+ plane
names.
And for pre-skl we only need to keep PRIMARY,SPRITE0,SPRITE1
as we only ever have 0-2 sprites per pipe on those platforms.

v2: Don't break icl_nv12_y_plane_mask() (Jani)

Cc: Jani Nikula 
Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_crtc.c |  6 ++
 drivers/gpu/drm/i915/display/intel_display.c  |  8 +++
 .../drm/i915/display/intel_display_limits.h   | 21 ---
 .../gpu/drm/i915/display/intel_sprite_uapi.c  |  2 +-
 .../drm/i915/display/skl_universal_plane.c| 19 -
 5 files changed, 30 insertions(+), 26 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c 
b/drivers/gpu/drm/i915/display/intel_crtc.c
index 339010384b86..ca6dc1dc56c8 100644
--- a/drivers/gpu/drm/i915/display/intel_crtc.c
+++ b/drivers/gpu/drm/i915/display/intel_crtc.c
@@ -310,8 +310,7 @@ int intel_crtc_init(struct drm_i915_private *dev_priv, enum 
pipe pipe)
crtc->num_scalers = DISPLAY_RUNTIME_INFO(dev_priv)->num_scalers[pipe];
 
if (DISPLAY_VER(dev_priv) >= 9)
-   primary = skl_universal_plane_create(dev_priv, pipe,
-PLANE_PRIMARY);
+   primary = skl_universal_plane_create(dev_priv, pipe, PLANE_1);
else
primary = intel_primary_plane_create(dev_priv, pipe);
if (IS_ERR(primary)) {
@@ -326,8 +325,7 @@ int intel_crtc_init(struct drm_i915_private *dev_priv, enum 
pipe pipe)
struct intel_plane *plane;
 
if (DISPLAY_VER(dev_priv) >= 9)
-   plane = skl_universal_plane_create(dev_priv, pipe,
-  PLANE_SPRITE0 + 
sprite);
+   plane = skl_universal_plane_create(dev_priv, pipe, 
PLANE_2 + sprite);
else
plane = intel_sprite_plane_create(dev_priv, pipe, 
sprite);
if (IS_ERR(plane)) {
diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index cce1420fb541..ee2df655b0ab 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -4121,13 +4121,13 @@ static int icl_check_nv12_planes(struct 
intel_crtc_state *crtc_state)
linked_state->uapi.dst = plane_state->uapi.dst;
 
if (icl_is_hdr_plane(dev_priv, plane->id)) {
-   if (linked->id == PLANE_SPRITE5)
+   if (linked->id == PLANE_7)
plane_state->cus_ctl |= PLANE_CUS_Y_PLANE_7_ICL;
-   else if (linked->id == PLANE_SPRITE4)
+   else if (linked->id == PLANE_6)
plane_state->cus_ctl |= PLANE_CUS_Y_PLANE_6_ICL;
-   else if (linked->id == PLANE_SPRITE3)
+   else if (linked->id == PLANE_5)
plane_state->cus_ctl |= PLANE_CUS_Y_PLANE_5_RKL;
-   else if (linked->id == PLANE_SPRITE2)
+   else if (linked->id == PLANE_4)
plane_state->cus_ctl |= PLANE_CUS_Y_PLANE_4_RKL;
else
MISSING_CASE(linked->id);
diff --git a/drivers/gpu/drm/i915/display/intel_display_limits.h 
b/drivers/gpu/drm/i915/display/intel_display_limits.h
index 5126d0b5ae5d..c4775c99dc83 100644
--- a/drivers/gpu/drm/i915/display/intel_display_limits.h
+++ b/drivers/gpu/drm/i915/display/intel_display_limits.h
@@ -60,16 +60,23 @@ enum transcoder {
  * (eg. PLANE_CTL(), PS_PLANE_SEL(), etc.) so adjust with care.
  */
 enum plane_id {
-   PLANE_PRIMARY,
-   PLANE_SPRITE0,
-   PLANE_SPRITE1,
-   PLANE_SPRITE2,
-   PLANE_SPRITE3,
-   PLANE_SPRITE4,
-   PLANE_SPRITE5,
+   /* skl+ universal plane names */
+   PLANE_1,
+   PLANE_2,
+   PLANE_3,
+   PLANE_4,
+   PLANE_5,
+   PLANE_6,
+   PLANE_7,
+
PLANE_CURSOR,
 
I915_MAX_PLANES,
+
+   /* pre-skl plane names */
+   PLANE_PRIMARY = PLANE_1,
+   PLANE_SPRITE0,
+   PLANE_SPRITE1,
 };
 
 enum port {
diff --git a/drivers/gpu/drm/i915/display/intel_sprite_uapi.c 
b/drivers/gpu/drm/i915/display/intel_sprite_uapi.c
index a76b48ebc2d3..4853c4806004 100644
--- a/drivers/gpu/drm/i915/display/intel_sprite_uapi.c
+++ b/drivers/gpu/drm/i915/display/intel_sprite_uapi.c
@@ -74,7 +74,7 @@ int intel_sprite_set_colorkey_ioctl(struct drm_device *dev, 
void *data,
 * pipe simultaneously.
 */
if (DISPLAY_VER(dev_priv) >= 9 &&
-   to_intel_plane(plane)->id >= PLANE_SPRITE1 &&
+   to_intel_plane(plane)->id >= PLANE_3 &&
set->flags & I915_SET_COLORKEY_DESTINATION)
return 

✗ Fi.CI.SPARSE: warning for Improve drm printer code (rev2)

2024-05-17 Thread Patchwork
== Series Details ==

Series: Improve drm printer code (rev2)
URL   : https://patchwork.freedesktop.org/series/133749/
State : warning

== Summary ==

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




✗ Fi.CI.CHECKPATCH: warning for Improve drm printer code (rev2)

2024-05-17 Thread Patchwork
== Series Details ==

Series: Improve drm printer code (rev2)
URL   : https://patchwork.freedesktop.org/series/133749/
State : warning

== Summary ==

Error: dim checkpatch failed
3274a9b5ce18 drm/print: Add generic drm dev printk function
-:46: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_ 
facility level
#46: FILE: drivers/gpu/drm/drm_print.c:197:
+   printk("%s" "[" DRM_NAME ":%ps]%s%s %pV",

-:46: WARNING:STRING_FRAGMENTS: Consecutive strings are generally better as a 
single string
#46: FILE: drivers/gpu/drm/drm_print.c:197:
+   printk("%s" "[" DRM_NAME ":%ps]%s%s %pV",

-:49: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_ 
facility level
#49: FILE: drivers/gpu/drm/drm_print.c:200:
+   printk("%s" "[" DRM_NAME "]%s%s %pV",

-:49: WARNING:STRING_FRAGMENTS: Consecutive strings are generally better as a 
single string
#49: FILE: drivers/gpu/drm/drm_print.c:200:
+   printk("%s" "[" DRM_NAME "]%s%s %pV",

total: 0 errors, 4 warnings, 0 checks, 87 lines checked
3432db1c2de2 drm/print: Improve drm_dbg_printer
e7d37f80fdc1 drm/i915: Don't use __func__ as prefix for drm_dbg_printer




[PATCH v2 2/3] drm/print: Improve drm_dbg_printer

2024-05-17 Thread Michal Wajdeczko
With recent introduction of a generic drm dev printk function, we
can now store and use location where drm_dbg_printer was invoked
and output it's symbolic name like we do for all drm debug prints.

Cc: Jani Nikula 
Reviewed-by: Jani Nikula 
Signed-off-by: Michal Wajdeczko 
---
v2: use full cast to match member (Jani)
---
 drivers/gpu/drm/drm_print.c | 3 +--
 include/drm/drm_print.h | 2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c
index 41892491a12c..35d00f0c6d64 100644
--- a/drivers/gpu/drm/drm_print.c
+++ b/drivers/gpu/drm/drm_print.c
@@ -217,8 +217,7 @@ void __drm_printfn_dbg(struct drm_printer *p, struct 
va_format *vaf)
if (!__drm_debug_enabled(category))
return;
 
-   /* Note: __builtin_return_address(0) is useless here. */
-   __drm_dev_vprintk(dev, KERN_DEBUG, NULL, p->prefix, vaf);
+   __drm_dev_vprintk(dev, KERN_DEBUG, p->origin, p->prefix, vaf);
 }
 EXPORT_SYMBOL(__drm_printfn_dbg);
 
diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
index 089950ad8681..bfc5641c6025 100644
--- a/include/drm/drm_print.h
+++ b/include/drm/drm_print.h
@@ -175,6 +175,7 @@ struct drm_printer {
void (*printfn)(struct drm_printer *p, struct va_format *vaf);
void (*puts)(struct drm_printer *p, const char *str);
void *arg;
+   const void *origin;
const char *prefix;
enum drm_debug_category category;
 };
@@ -332,6 +333,7 @@ static inline struct drm_printer drm_dbg_printer(struct 
drm_device *drm,
struct drm_printer p = {
.printfn = __drm_printfn_dbg,
.arg = drm,
+   .origin = (const void *)_THIS_IP_, /* it's fine as we will be 
inlined */
.prefix = prefix,
.category = category,
};
-- 
2.43.0



[PATCH v2 3/3] drm/i915: Don't use __func__ as prefix for drm_dbg_printer

2024-05-17 Thread Michal Wajdeczko
Updated code of drm_dbg_printer() is already printing symbolic
name of the caller like drm_dbg() does.

Reviewed-by: Jani Nikula 
Signed-off-by: Michal Wajdeczko 
---
 drivers/gpu/drm/i915/gt/intel_reset.c  | 2 +-
 drivers/gpu/drm/i915/gt/selftest_context.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c 
b/drivers/gpu/drm/i915/gt/intel_reset.c
index 6161f7a3ff70..735cd23a43c6 100644
--- a/drivers/gpu/drm/i915/gt/intel_reset.c
+++ b/drivers/gpu/drm/i915/gt/intel_reset.c
@@ -1025,7 +1025,7 @@ void intel_gt_set_wedged(struct intel_gt *gt)
 
if (GEM_SHOW_DEBUG()) {
struct drm_printer p = drm_dbg_printer(>i915->drm,
-  DRM_UT_DRIVER, __func__);
+  DRM_UT_DRIVER, NULL);
struct intel_engine_cs *engine;
enum intel_engine_id id;
 
diff --git a/drivers/gpu/drm/i915/gt/selftest_context.c 
b/drivers/gpu/drm/i915/gt/selftest_context.c
index 12eca750f7d0..5eb46700dc4e 100644
--- a/drivers/gpu/drm/i915/gt/selftest_context.c
+++ b/drivers/gpu/drm/i915/gt/selftest_context.c
@@ -286,7 +286,7 @@ static int __live_active_context(struct intel_engine_cs 
*engine)
 
if (intel_engine_pm_is_awake(engine)) {
struct drm_printer p = drm_dbg_printer(>i915->drm,
-  DRM_UT_DRIVER, __func__);
+  DRM_UT_DRIVER, NULL);
 
intel_engine_dump(engine, ,
  "%s is still awake:%d after idle-barriers\n",
-- 
2.43.0



[PATCH v2 1/3] drm/print: Add generic drm dev printk function

2024-05-17 Thread Michal Wajdeczko
We already have some drm printk functions that need to duplicate
a code to get a similar format of the final result, for example:

  [ ] :00:00.0: [drm:foo] bar
  [ ] :00:00.0: [drm] foo bar
  [ ] :00:00.0: [drm] *ERROR* foo

Add a generic __drm_dev_vprintk() function that can format the
final message like all other existing function do and allows us
to keep the formatting code in one place.

Cc: Jani Nikula 
Signed-off-by: Michal Wajdeczko 
---
v2: make it static, keep it simple and use braces (Jani)
---
 drivers/gpu/drm/drm_print.c | 52 +
 1 file changed, 30 insertions(+), 22 deletions(-)

diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c
index cf2efb44722c..41892491a12c 100644
--- a/drivers/gpu/drm/drm_print.c
+++ b/drivers/gpu/drm/drm_print.c
@@ -176,6 +176,32 @@ void __drm_printfn_seq_file(struct drm_printer *p, struct 
va_format *vaf)
 }
 EXPORT_SYMBOL(__drm_printfn_seq_file);
 
+static void __drm_dev_vprintk(const struct device *dev, const char *level,
+ const void *origin, const char *prefix,
+ struct va_format *vaf)
+{
+   const char *prefix_pad = prefix ? " " : "";
+
+   if (!prefix)
+   prefix = "";
+
+   if (dev) {
+   if (origin)
+   dev_printk(level, dev, "[" DRM_NAME ":%ps]%s%s %pV",
+  origin, prefix_pad, prefix, vaf);
+   else
+   dev_printk(level, dev, "[" DRM_NAME "]%s%s %pV",
+  prefix_pad, prefix, vaf);
+   } else {
+   if (origin)
+   printk("%s" "[" DRM_NAME ":%ps]%s%s %pV",
+  level, origin, prefix_pad, prefix, vaf);
+   else
+   printk("%s" "[" DRM_NAME "]%s%s %pV",
+  level, prefix_pad, prefix, vaf);
+   }
+}
+
 void __drm_printfn_info(struct drm_printer *p, struct va_format *vaf)
 {
dev_info(p->arg, "[" DRM_NAME "] %pV", vaf);
@@ -187,19 +213,12 @@ void __drm_printfn_dbg(struct drm_printer *p, struct 
va_format *vaf)
const struct drm_device *drm = p->arg;
const struct device *dev = drm ? drm->dev : NULL;
enum drm_debug_category category = p->category;
-   const char *prefix = p->prefix ?: "";
-   const char *prefix_pad = p->prefix ? " " : "";
 
if (!__drm_debug_enabled(category))
return;
 
/* Note: __builtin_return_address(0) is useless here. */
-   if (dev)
-   dev_printk(KERN_DEBUG, dev, "[" DRM_NAME "]%s%s %pV",
-  prefix_pad, prefix, vaf);
-   else
-   printk(KERN_DEBUG "[" DRM_NAME "]%s%s %pV",
-  prefix_pad, prefix, vaf);
+   __drm_dev_vprintk(dev, KERN_DEBUG, NULL, p->prefix, vaf);
 }
 EXPORT_SYMBOL(__drm_printfn_dbg);
 
@@ -287,12 +306,7 @@ void drm_dev_printk(const struct device *dev, const char 
*level,
vaf.fmt = format;
vaf.va = 
 
-   if (dev)
-   dev_printk(level, dev, "[" DRM_NAME ":%ps] %pV",
-  __builtin_return_address(0), );
-   else
-   printk("%s" "[" DRM_NAME ":%ps] %pV",
-  level, __builtin_return_address(0), );
+   __drm_dev_vprintk(dev, level, __builtin_return_address(0), NULL, );
 
va_end(args);
 }
@@ -312,12 +326,7 @@ void __drm_dev_dbg(struct _ddebug *desc, const struct 
device *dev,
vaf.fmt = format;
vaf.va = 
 
-   if (dev)
-   dev_printk(KERN_DEBUG, dev, "[" DRM_NAME ":%ps] %pV",
-  __builtin_return_address(0), );
-   else
-   printk(KERN_DEBUG "[" DRM_NAME ":%ps] %pV",
-  __builtin_return_address(0), );
+   __drm_dev_vprintk(dev, KERN_DEBUG, __builtin_return_address(0), NULL, 
);
 
va_end(args);
 }
@@ -351,8 +360,7 @@ void __drm_err(const char *format, ...)
vaf.fmt = format;
vaf.va = 
 
-   printk(KERN_ERR "[" DRM_NAME ":%ps] *ERROR* %pV",
-  __builtin_return_address(0), );
+   __drm_dev_vprintk(NULL, KERN_ERR, __builtin_return_address(0), 
"*ERROR*", );
 
va_end(args);
 }
-- 
2.43.0



[PATCH v2 0/3] Improve drm printer code

2024-05-17 Thread Michal Wajdeczko
We already have some drm printk functions that need to duplicate
a code to get a similar format of the final result, for example:

  [ ] :00:00.0: [drm:foo] bar
  [ ] :00:00.0: [drm] foo bar
  [ ] :00:00.0: [drm] *ERROR* foo

Add a generic __drm_dev_vprintk() function that can format the
final message like all other existing function do and allows us
to keep the formatting code in one place.

Above also allows to improve drm_dbg_printer() that today lacks
of outputing symbolic name of the caller, like drm_dbg() does.

v1: https://patchwork.freedesktop.org/series/133749/
v2: make it static, keep it simple and use braces (Jani)

Michal Wajdeczko (3):
  drm/print: Add generic drm dev printk function
  drm/print: Improve drm_dbg_printer
  drm/i915: Don't use __func__ as prefix for drm_dbg_printer

 drivers/gpu/drm/drm_print.c| 53 --
 drivers/gpu/drm/i915/gt/intel_reset.c  |  2 +-
 drivers/gpu/drm/i915/gt/selftest_context.c |  2 +-
 include/drm/drm_print.h|  2 +
 4 files changed, 34 insertions(+), 25 deletions(-)

-- 
2.43.0



Re: [PATCH] tracing/treewide: Remove second parameter of __assign_str()

2024-05-17 Thread Darrick J. Wong
On Thu, May 16, 2024 at 01:34:54PM -0400, Steven Rostedt wrote:
> From: "Steven Rostedt (Google)" 
> 
> [
>This is a treewide change. I will likely re-create this patch again in
>the second week of the merge window of v6.10 and submit it then. Hoping
>to keep the conflicts that it will cause to a minimum.
> ]
> 
> With the rework of how the __string() handles dynamic strings where it
> saves off the source string in field in the helper structure[1], the
> assignment of that value to the trace event field is stored in the helper
> value and does not need to be passed in again.
> 
> This means that with:
> 
>   __string(field, mystring)
> 
> Which use to be assigned with __assign_str(field, mystring), no longer
> needs the second parameter and it is unused. With this, __assign_str()
> will now only get a single parameter.
> 
> There's over 700 users of __assign_str() and because coccinelle does not
> handle the TRACE_EVENT() macro I ended up using the following sed script:
> 
>   git grep -l __assign_str | while read a ; do
>   sed -e 's/\(__assign_str([^,]*[^ ,]\) *,[^;]*/\1)/' $a > /tmp/test-file;
>   mv /tmp/test-file $a;
>   done
> 
> I then searched for __assign_str() that did not end with ';' as those
> were multi line assignments that the sed script above would fail to catch.
> 
> Note, the same updates will need to be done for:
> 
>   __assign_str_len()
>   __assign_rel_str()
>   __assign_rel_str_len()
> 
> I tested this with both an allmodconfig and an allyesconfig (build only for 
> both).
> 
> [1] 
> https://lore.kernel.org/linux-trace-kernel/2024011442.634192...@goodmis.org/
> 
> Cc: Masami Hiramatsu 
> Cc: Mathieu Desnoyers 
> Cc: Linus Torvalds 
> Cc: Julia Lawall 
> Signed-off-by: Steven Rostedt (Google) 

/me finds this pretty magical, but such is the way of macros.
Thanks for being much smarter about them than me. :)

Acked-by: Darrick J. Wong# xfs

--D


✗ Fi.CI.BAT: failure for drm/i915: DSC stuff

2024-05-17 Thread Patchwork
== Series Details ==

Series: drm/i915: DSC stuff
URL   : https://patchwork.freedesktop.org/series/133758/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14781 -> Patchwork_133758v1


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_133758v1 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_133758v1, please notify your bug team 
(i915-ci-in...@lists.freedesktop.org) 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_133758v1/index.html

Participating hosts (45 -> 37)
--

  Missing(8): bat-kbl-2 bat-arls-3 fi-snb-2520m fi-kbl-8809g fi-cfl-8109u 
fi-elk-e7500 bat-mtlp-8 bat-mtlp-6 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@i915_selftest@live@gt_heartbeat:
- fi-bsw-n3050:   [PASS][1] -> [DMESG-FAIL][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14781/fi-bsw-n3050/igt@i915_selftest@live@gt_heartbeat.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133758v1/fi-bsw-n3050/igt@i915_selftest@live@gt_heartbeat.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@i915_module_load@reload:
- fi-kbl-7567u:   [PASS][3] -> [DMESG-WARN][4] ([i915#1982])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14781/fi-kbl-7567u/igt@i915_module_l...@reload.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133758v1/fi-kbl-7567u/igt@i915_module_l...@reload.html

  
 Possible fixes 

  * igt@gem_lmem_swapping@basic@lmem0:
- bat-dg2-8:  [FAIL][5] ([i915#10378]) -> [PASS][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14781/bat-dg2-8/igt@gem_lmem_swapping@ba...@lmem0.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133758v1/bat-dg2-8/igt@gem_lmem_swapping@ba...@lmem0.html

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

  [i915#10378]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10378
  [i915#1982]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1982
  [i915#9157]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9157


Build changes
-

  * Linux: CI_DRM_14781 -> Patchwork_133758v1

  CI-20190529: 20190529
  CI_DRM_14781: d953159dab6ba6800d7316fb516ca2330dcbefe4 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7860: 05b3f5540c6dcaacdf2169dc730c126df9ffd7e2 @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_133758v1: d953159dab6ba6800d7316fb516ca2330dcbefe4 @ 
git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133758v1/index.html


Re: [PATCH 01/13] drm/i915: Add skl+ plane name aliases to enum plane_id

2024-05-17 Thread Ville Syrjälä
On Fri, May 17, 2024 at 06:33:46PM +0300, Jani Nikula wrote:
> On Thu, 16 May 2024, Ville Syrjala  wrote:
> > From: Ville Syrjälä 
> >
> > Using PLANE_PRIMARY + PLANE_SPRITE? on skl+ results in a bunch
> > of unnecessary head scratching. Add aliases using the skl+ plane
> > names.
> > And for pre-skl we only need to keep PRIMARY,SPRITE0,SPRITE1
> > as we only ever have 0-2 sprites per pipe on those platforms.
> 
> Should these be changed too?
> 
> - intel_plane_set_ckey()

I suppose one could consider splitting this to pre-skl
vs. skl+ variants and using the appropriate names
in each. But the whole ckey uapi is really designed
around the pre-skl single primary + single sprite world
view, so using the PLANE_PRIMARY name there seems OK.

> - for_each_plane_id_on_crtc()

There's not really a right answer here I guess. As 
long as it's 0 where we start this will work.


> I'm not sure. But there's one real issue:
> 
> > diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c 
> > b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> > index 32d10e62b2b9..d0bfee2ca643 100644
> > --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
> > +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> > @@ -238,9 +238,9 @@ int skl_format_to_fourcc(int format, bool rgb_order, 
> > bool alpha)
> >  static u8 icl_nv12_y_plane_mask(struct drm_i915_private *i915)
> >  {
> > if (DISPLAY_VER(i915) >= 13 || HAS_D12_PLANE_MINIMIZATION(i915))
> > -   return BIT(PLANE_SPRITE2) | BIT(PLANE_SPRITE3);
> > +   return BIT(PLANE_6) | BIT(PLANE_7);
> > else
> > -   return BIT(PLANE_SPRITE4) | BIT(PLANE_SPRITE5);
> > +   return BIT(PLANE_4) | BIT(PLANE_5);
> 
> The if branches got swapped?

Yeah. Good catch. I suspect my brain was in the
"newer platforms surely have more things" mindset.

-- 
Ville Syrjälä
Intel


Re: [PATCH 1/3] drm/print: Add generic drm dev printk function

2024-05-17 Thread Michal Wajdeczko



On 17.05.2024 15:33, Jani Nikula wrote:
> On Fri, 17 May 2024, Michal Wajdeczko  wrote:
>> We already have some drm printk functions that need to duplicate
>> a code to get a similar format of the final result, for example:
>>
>>   [ ] :00:00.0: [drm:foo] bar
>>   [ ] :00:00.0: [drm] foo bar
>>   [ ] :00:00.0: [drm] *ERROR* foo
>>
>> Add a generic __drm_dev_vprintk() function that can format the
>> final message like all other existing function do and allows us
>> to keep the formatting code in one place.
> 
> Nice idea!
> 
>> Signed-off-by: Michal Wajdeczko 
>> Cc: Jani Nikula 
>> ---
>>  drivers/gpu/drm/drm_print.c | 49 -
>>  include/drm/drm_print.h |  3 +++
>>  2 files changed, 30 insertions(+), 22 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c
>> index cf2efb44722c..a2b60c8245a1 100644
>> --- a/drivers/gpu/drm/drm_print.c
>> +++ b/drivers/gpu/drm/drm_print.c
>> @@ -187,19 +187,12 @@ void __drm_printfn_dbg(struct drm_printer *p, struct 
>> va_format *vaf)
>>  const struct drm_device *drm = p->arg;
>>  const struct device *dev = drm ? drm->dev : NULL;
>>  enum drm_debug_category category = p->category;
>> -const char *prefix = p->prefix ?: "";
>> -const char *prefix_pad = p->prefix ? " " : "";
>>  
>>  if (!__drm_debug_enabled(category))
>>  return;
>>  
>>  /* Note: __builtin_return_address(0) is useless here. */
>> -if (dev)
>> -dev_printk(KERN_DEBUG, dev, "[" DRM_NAME "]%s%s %pV",
>> -   prefix_pad, prefix, vaf);
>> -else
>> -printk(KERN_DEBUG "[" DRM_NAME "]%s%s %pV",
>> -   prefix_pad, prefix, vaf);
>> +__drm_dev_vprintk(dev, KERN_DEBUG, NULL, p->prefix, vaf);
>>  }
>>  EXPORT_SYMBOL(__drm_printfn_dbg);
>>  
>> @@ -277,6 +270,29 @@ void drm_print_bits(struct drm_printer *p, unsigned 
>> long value,
>>  }
>>  EXPORT_SYMBOL(drm_print_bits);
>>  
>> +void __drm_dev_vprintk(const struct device *dev, const char *level,
>> +   const void *origin, const char *prefix,
>> +   struct va_format *vaf)
>> +{
>> +const char *prefix_pad = prefix ? " " : (prefix = "");
> 
> Too clever, please just keep it simple:
> 
>   const char *prefix_pad = prefix ? " " : "";
> 
>   if (!prefix)
>   prefix = "";
> 
>> +
>> +if (dev)
>> +if (origin)
>> +dev_printk(level, dev, "[" DRM_NAME ":%ps]%s%s %pV",
>> +   origin, prefix_pad, prefix, vaf);
>> +else
>> +dev_printk(level, dev, "[" DRM_NAME "]%s%s %pV",
>> +   prefix_pad, prefix, vaf);
>> +else
>> +if (origin)
>> +printk("%s" "[" DRM_NAME ":%ps]%s%s %pV",
>> +   level, origin, prefix_pad, prefix, vaf);
>> +else
>> +printk("%s" "[" DRM_NAME "]%s%s %pV",
>> +   level, prefix_pad, prefix, vaf);
> 
> I'd sprinkle a few curly braces around the top level if-else blocks.
> 
> Side note, feels like using DRM_NAME makes things harder, not
> easier. But that's for another patch.
> 
>> +}
>> +EXPORT_SYMBOL(__drm_dev_vprintk);
> 
> AFAICT this could be a non-exported static function. And probably moved
> earlier in the file to not require a declaration.

true for now, but I was planning to add Xe GT specific printer that
would use this function like this:

+static inline void __xe_gt_printfn_dbg(struct drm_printer *p, struct
va_format *vaf)
+{
+   struct xe_gt *gt = p->arg;
+   const struct device *dev = gt_to_xe(gt)->drm.dev;
+   char prefix[8];
+
+   if (!drm_debug_enabled(DRM_UT_DRIVER))
+   return;
+
+   /* xe_gt_dbg() callsite decorations are unhelpful */
+   snprintf(prefix, sizeof(prefix), "GT%u:", gt->info.id);
+   __drm_dev_vprintk(dev, KERN_DEBUG, p->origin, prefix, vaf);
+}
+

but I can add this new custom printer to the series right now in v2 to
show the usage and avoid any confusion

> 
> BR,
> Jani.
> 
>> +
>>  void drm_dev_printk(const struct device *dev, const char *level,
>>  const char *format, ...)
>>  {
>> @@ -287,12 +303,7 @@ void drm_dev_printk(const struct device *dev, const 
>> char *level,
>>  vaf.fmt = format;
>>  vaf.va = 
>>  
>> -if (dev)
>> -dev_printk(level, dev, "[" DRM_NAME ":%ps] %pV",
>> -   __builtin_return_address(0), );
>> -else
>> -printk("%s" "[" DRM_NAME ":%ps] %pV",
>> -   level, __builtin_return_address(0), );
>> +__drm_dev_vprintk(dev, level, __builtin_return_address(0), NULL, );
>>  
>>  va_end(args);
>>  }
>> @@ -312,12 +323,7 @@ void __drm_dev_dbg(struct _ddebug *desc, const struct 
>> device *dev,
>>  vaf.fmt = format;
>>  vaf.va = 
>>  
>> -if (dev)
>> -dev_printk(KERN_DEBUG, dev, 

✗ Fi.CI.IGT: failure for drm/ci: uprev mesa/IGT and generate testlist

2024-05-17 Thread Patchwork
== Series Details ==

Series: drm/ci: uprev mesa/IGT and generate testlist
URL   : https://patchwork.freedesktop.org/series/133735/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14779_full -> Patchwork_133735v1_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_133735v1_full absolutely need 
to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_133735v1_full, please notify your bug team 
(i915-ci-in...@lists.freedesktop.org) to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (9 -> 9)
--

  No changes in participating hosts

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@i915_selftest@live@gem_contexts:
- shard-dg2:  NOTRUN -> [INCOMPLETE][1]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133735v1/shard-dg2-3/igt@i915_selftest@live@gem_contexts.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@api_intel_bb@blit-reloc-keep-cache:
- shard-dg1:  NOTRUN -> [SKIP][2] ([i915#8411]) +1 other test skip
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133735v1/shard-dg1-17/igt@api_intel...@blit-reloc-keep-cache.html

  * igt@device_reset@unbind-cold-reset-rebind:
- shard-dg1:  NOTRUN -> [SKIP][3] ([i915#11078])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133735v1/shard-dg1-17/igt@device_re...@unbind-cold-reset-rebind.html

  * igt@drm_fdinfo@busy-idle@vcs1:
- shard-dg1:  NOTRUN -> [SKIP][4] ([i915#8414]) +7 other tests skip
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133735v1/shard-dg1-15/igt@drm_fdinfo@busy-i...@vcs1.html

  * igt@drm_fdinfo@virtual-idle:
- shard-rkl:  NOTRUN -> [FAIL][5] ([i915#7742])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133735v1/shard-rkl-3/igt@drm_fdi...@virtual-idle.html

  * igt@gem_ccs@block-copy-compressed:
- shard-tglu: NOTRUN -> [SKIP][6] ([i915#3555] / [i915#9323])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133735v1/shard-tglu-3/igt@gem_...@block-copy-compressed.html

  * igt@gem_ccs@block-multicopy-compressed:
- shard-tglu: NOTRUN -> [SKIP][7] ([i915#9323]) +1 other test skip
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133735v1/shard-tglu-9/igt@gem_...@block-multicopy-compressed.html

  * igt@gem_close_race@multigpu-basic-process:
- shard-rkl:  NOTRUN -> [SKIP][8] ([i915#7697])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133735v1/shard-rkl-2/igt@gem_close_r...@multigpu-basic-process.html

  * igt@gem_create@create-ext-cpu-access-big:
- shard-tglu: NOTRUN -> [SKIP][9] ([i915#6335])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133735v1/shard-tglu-9/igt@gem_cre...@create-ext-cpu-access-big.html

  * igt@gem_ctx_persistence@engines-queued:
- shard-snb:  NOTRUN -> [SKIP][10] ([i915#1099])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133735v1/shard-snb7/igt@gem_ctx_persiste...@engines-queued.html

  * igt@gem_ctx_sseu@invalid-sseu:
- shard-tglu: NOTRUN -> [SKIP][11] ([i915#280])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133735v1/shard-tglu-9/igt@gem_ctx_s...@invalid-sseu.html

  * igt@gem_eio@hibernate:
- shard-rkl:  NOTRUN -> [ABORT][12] ([i915#7975] / [i915#8213])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133735v1/shard-rkl-3/igt@gem_...@hibernate.html

  * igt@gem_exec_balancer@bonded-pair:
- shard-dg1:  NOTRUN -> [SKIP][13] ([i915#4771])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133735v1/shard-dg1-18/igt@gem_exec_balan...@bonded-pair.html

  * igt@gem_exec_balancer@parallel:
- shard-rkl:  NOTRUN -> [SKIP][14] ([i915#4525]) +1 other test skip
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133735v1/shard-rkl-5/igt@gem_exec_balan...@parallel.html

  * igt@gem_exec_capture@many-4k-incremental:
- shard-rkl:  NOTRUN -> [FAIL][15] ([i915#9606])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133735v1/shard-rkl-3/igt@gem_exec_capt...@many-4k-incremental.html

  * igt@gem_exec_fair@basic-none-rrul:
- shard-dg1:  NOTRUN -> [SKIP][16] ([i915#3539] / [i915#4852]) +1 
other test skip
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133735v1/shard-dg1-18/igt@gem_exec_f...@basic-none-rrul.html

  * igt@gem_exec_fair@basic-none-rrul@rcs0:
- shard-glk:  NOTRUN -> [FAIL][17] ([i915#2842])
   [17]: 

✗ Fi.CI.SPARSE: warning for drm/i915: DSC stuff

2024-05-17 Thread Patchwork
== Series Details ==

Series: drm/i915: DSC stuff
URL   : https://patchwork.freedesktop.org/series/133758/
State : warning

== Summary ==

Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: 

Re: [PATCH 01/13] drm/i915: Add skl+ plane name aliases to enum plane_id

2024-05-17 Thread Jani Nikula
On Thu, 16 May 2024, Ville Syrjala  wrote:
> From: Ville Syrjälä 
>
> Using PLANE_PRIMARY + PLANE_SPRITE? on skl+ results in a bunch
> of unnecessary head scratching. Add aliases using the skl+ plane
> names.
> And for pre-skl we only need to keep PRIMARY,SPRITE0,SPRITE1
> as we only ever have 0-2 sprites per pipe on those platforms.

Should these be changed too?

- intel_plane_set_ckey()
- for_each_plane_id_on_crtc()

I'm not sure. But there's one real issue:

> diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c 
> b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> index 32d10e62b2b9..d0bfee2ca643 100644
> --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
> +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> @@ -238,9 +238,9 @@ int skl_format_to_fourcc(int format, bool rgb_order, bool 
> alpha)
>  static u8 icl_nv12_y_plane_mask(struct drm_i915_private *i915)
>  {
>   if (DISPLAY_VER(i915) >= 13 || HAS_D12_PLANE_MINIMIZATION(i915))
> - return BIT(PLANE_SPRITE2) | BIT(PLANE_SPRITE3);
> + return BIT(PLANE_6) | BIT(PLANE_7);
>   else
> - return BIT(PLANE_SPRITE4) | BIT(PLANE_SPRITE5);
> + return BIT(PLANE_4) | BIT(PLANE_5);

The if branches got swapped?

BR,
Jani.


-- 
Jani Nikula, Intel


[PATCH 6/7] drm/i915: Utilize edp_disable_dsc from VBT

2024-05-17 Thread Ville Syrjala
From: Ville Syrjälä 

Disable eDP DSC usage when instructed to do so by the VBT.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_bios.c  | 4 
 drivers/gpu/drm/i915/display/intel_display_types.h | 1 +
 drivers/gpu/drm/i915/display/intel_dp.c| 4 
 3 files changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c 
b/drivers/gpu/drm/i915/display/intel_bios.c
index b0a49b2f957f..97c6fcf0fe2b 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -1512,6 +1512,10 @@ parse_edp(struct drm_i915_private *i915,
if (i915->display.vbt.version >= 244)
panel->vbt.edp.max_link_rate =
edp->edp_max_port_link_rate[panel_type] * 20;
+
+   if (i915->display.vbt.version >= 251)
+   panel->vbt.edp.dsc_disable =
+   panel_bool(edp->edp_dsc_disable, panel_type);
 }
 
 static void
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h 
b/drivers/gpu/drm/i915/display/intel_display_types.h
index 9678c2b157f6..5e0372c14643 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -329,6 +329,7 @@ struct intel_vbt_panel_data {
u8 drrs_msa_timing_delay;
bool low_vswing;
bool hobl;
+   bool dsc_disable;
} edp;
 
struct {
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index a15ef6c015c8..af298d5017d9 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1230,6 +1230,10 @@ bool intel_dp_has_dsc(struct intel_connector *connector)
if (connector->mst_port && !HAS_DSC_MST(i915))
return false;
 
+   if (connector->base.connector_type == DRM_MODE_CONNECTOR_eDP &&
+   connector->panel.vbt.edp.dsc_disable)
+   return false;
+
if (!drm_dp_sink_supports_dsc(connector->dp.dsc_dpcd))
return false;
 
-- 
2.44.1



[PATCH 7/7] drm/i915: Remove bogus MST check in intel_dp_has_audio()

2024-05-17 Thread Ville Syrjala
From: Ville Syrjälä 

No idea what this MST checks is doing in intel_dp_has_audio().
Looks completely pointless, so get rid of it.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_dp.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index af298d5017d9..4a486bb6d48c 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2806,7 +2806,6 @@ intel_dp_drrs_compute_config(struct intel_connector 
*connector,
 }
 
 static bool intel_dp_has_audio(struct intel_encoder *encoder,
-  struct intel_crtc_state *crtc_state,
   const struct drm_connector_state *conn_state)
 {
struct drm_i915_private *i915 = to_i915(encoder->base.dev);
@@ -2815,8 +2814,7 @@ static bool intel_dp_has_audio(struct intel_encoder 
*encoder,
struct intel_connector *connector =
to_intel_connector(conn_state->connector);
 
-   if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST) &&
-   !intel_dp_port_has_audio(i915, encoder->port))
+   if (!intel_dp_port_has_audio(i915, encoder->port))
return false;
 
if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
@@ -2875,7 +2873,7 @@ intel_dp_audio_compute_config(struct intel_encoder 
*encoder,
  struct drm_connector_state *conn_state)
 {
pipe_config->has_audio =
-   intel_dp_has_audio(encoder, pipe_config, conn_state) &&
+   intel_dp_has_audio(encoder, conn_state) &&
intel_audio_compute_config(encoder, pipe_config, conn_state);
 
pipe_config->sdp_split_enable = pipe_config->has_audio &&
-- 
2.44.1



[PATCH 5/7] drm/i915: Reuse intel_dp_supports_dsc() for MST

2024-05-17 Thread Ville Syrjala
From: Ville Syrjälä 

intel_dp_supports_dsc() now works for MST as well, reuse it.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_dp.c |  4 ++--
 drivers/gpu/drm/i915/display/intel_dp.h |  3 +++
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 20 
 3 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index 6dfde22e5f9d..a15ef6c015c8 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1459,8 +1459,8 @@ bool intel_dp_supports_fec(struct intel_dp *intel_dp,
drm_dp_sink_supports_fec(connector->dp.fec_capability);
 }
 
-static bool intel_dp_supports_dsc(struct intel_connector *connector,
- const struct intel_crtc_state *crtc_state)
+bool intel_dp_supports_dsc(struct intel_connector *connector,
+  const struct intel_crtc_state *crtc_state)
 {
if (!intel_dp_has_dsc(connector))
return false;
diff --git a/drivers/gpu/drm/i915/display/intel_dp.h 
b/drivers/gpu/drm/i915/display/intel_dp.h
index c0d3e315559e..f1d90fc458d9 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.h
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
@@ -170,6 +170,9 @@ bool intel_dp_supports_fec(struct intel_dp *intel_dp,
   const struct intel_connector *connector,
   const struct intel_crtc_state *pipe_config);
 
+bool intel_dp_supports_dsc(struct intel_connector *connector,
+  const struct intel_crtc_state *crtc_state);
+
 u32 intel_dp_dsc_nearest_valid_bpp(struct drm_i915_private *i915, u32 bpp, u32 
pipe_bpp);
 
 void intel_ddi_update_pipe(struct intel_atomic_state *state,
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c 
b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index b57753d2d82c..4a624c826604 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -400,18 +400,6 @@ static int intel_dp_mst_update_slots(struct intel_encoder 
*encoder,
return 0;
 }
 
-static bool
-intel_dp_mst_dsc_source_support(const struct intel_crtc_state *crtc_state)
-{
-   struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
-
-   /*
-* FIXME: Enabling DSC on ICL results in blank screen and FIFO pipe /
-* transcoder underruns, re-enable DSC after fixing this issue.
-*/
-   return DISPLAY_VER(i915) >= 12 && intel_dsc_source_support(crtc_state);
-}
-
 static int mode_hblank_period_ns(const struct drm_display_mode *mode)
 {
return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(mode->htotal - mode->hdisplay,
@@ -443,7 +431,7 @@ hblank_expansion_quirk_needs_dsc(const struct 
intel_connector *connector,
 }
 
 static bool
-adjust_limits_for_dsc_hblank_expansion_quirk(const struct intel_connector 
*connector,
+adjust_limits_for_dsc_hblank_expansion_quirk(struct intel_connector *connector,
 const struct intel_crtc_state 
*crtc_state,
 struct link_config_limits *limits,
 bool dsc)
@@ -456,7 +444,7 @@ adjust_limits_for_dsc_hblank_expansion_quirk(const struct 
intel_connector *conne
return true;
 
if (!dsc) {
-   if (intel_dp_mst_dsc_source_support(crtc_state)) {
+   if (intel_dp_supports_dsc(connector, crtc_state)) {
drm_dbg_kms(>drm,
"[CRTC:%d:%s][CONNECTOR:%d:%s] DSC needed 
by hblank expansion quirk\n",
crtc->base.base.id, crtc->base.name,
@@ -503,7 +491,7 @@ adjust_limits_for_dsc_hblank_expansion_quirk(const struct 
intel_connector *conne
 
 static bool
 intel_dp_mst_compute_config_limits(struct intel_dp *intel_dp,
-  const struct intel_connector *connector,
+  struct intel_connector *connector,
   struct intel_crtc_state *crtc_state,
   bool dsc,
   struct link_config_limits *limits)
@@ -602,7 +590,7 @@ static int intel_dp_mst_compute_config(struct intel_encoder 
*encoder,
str_yes_no(ret), str_yes_no(joiner_needs_dsc),
str_yes_no(intel_dp->force_dsc_en));
 
-   if (!intel_dp_mst_dsc_source_support(pipe_config))
+   if (!intel_dp_supports_dsc(connector, pipe_config))
return -EINVAL;
 
if (!intel_dp_mst_compute_config_limits(intel_dp,
-- 
2.44.1



[PATCH 4/7] drm/i915: Use intel_dp_has_dsc() during .compute_config()

2024-05-17 Thread Ville Syrjala
From: Ville Syrjälä 

Reuse intel_dp_has_dsc() during .compute_config() instead of
repeating some of the checks again by hand. We'll be adding
more checks to intel_dp_has_dsc() and this will make sure
we cover both .mode_valid() and .compute_config() with them.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_dp.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index a4703b71c498..6dfde22e5f9d 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1459,14 +1459,16 @@ bool intel_dp_supports_fec(struct intel_dp *intel_dp,
drm_dp_sink_supports_fec(connector->dp.fec_capability);
 }
 
-static bool intel_dp_supports_dsc(const struct intel_connector *connector,
+static bool intel_dp_supports_dsc(struct intel_connector *connector,
  const struct intel_crtc_state *crtc_state)
 {
+   if (!intel_dp_has_dsc(connector))
+   return false;
+
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP) && 
!crtc_state->fec_enable)
return false;
 
-   return intel_dsc_source_support(crtc_state) &&
-   drm_dp_sink_supports_dsc(connector->dp.dsc_dpcd);
+   return intel_dsc_source_support(crtc_state);
 }
 
 static int intel_dp_hdmi_compute_bpc(struct intel_dp *intel_dp,
@@ -2213,7 +2215,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
 {
struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev);
-   const struct intel_connector *connector =
+   struct intel_connector *connector =
to_intel_connector(conn_state->connector);
const struct drm_display_mode *adjusted_mode =
_config->hw.adjusted_mode;
-- 
2.44.1



[PATCH 2/7] drm/i915: Extract intel_dp_has_dsc()

2024-05-17 Thread Ville Syrjala
From: Ville Syrjälä 

Extract a helper to check whether the source+sink combo
supports DSC. That basic check is needed both during mode
validation and compute config. We'll also need to add extra
checks to both places, so having a single place for it is nicer.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_dp.c | 16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index 1e88449fe5f2..7bf283b4df7f 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1220,6 +1220,19 @@ bool intel_dp_need_bigjoiner(struct intel_dp *intel_dp,
   connector->force_bigjoiner_enable;
 }
 
+static bool intel_dp_has_dsc(struct intel_connector *connector)
+{
+   struct drm_i915_private *i915 = to_i915(connector->base.dev);
+
+   if (!HAS_DSC(i915))
+   return false;
+
+   if (!drm_dp_sink_supports_dsc(connector->dp.dsc_dpcd))
+   return false;
+
+   return true;
+}
+
 static enum drm_mode_status
 intel_dp_mode_valid(struct drm_connector *_connector,
struct drm_display_mode *mode)
@@ -1274,8 +1287,7 @@ intel_dp_mode_valid(struct drm_connector *_connector,
mode_rate = intel_dp_link_required(target_clock,
   
intel_dp_mode_min_output_bpp(connector, mode));
 
-   if (HAS_DSC(dev_priv) &&
-   drm_dp_sink_supports_dsc(connector->dp.dsc_dpcd)) {
+   if (intel_dp_has_dsc(connector)) {
enum intel_output_format sink_format, output_format;
int pipe_bpp;
 
-- 
2.44.1



[PATCH 3/7] drm/i915: Handle MST in intel_dp_has_dsc()

2024-05-17 Thread Ville Syrjala
From: Ville Syrjälä 

Utilize intel_dp_has_dsc() for MST as well.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_dp.c | 5 -
 drivers/gpu/drm/i915/display/intel_dp.h | 1 +
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 3 +--
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index 7bf283b4df7f..a4703b71c498 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1220,13 +1220,16 @@ bool intel_dp_need_bigjoiner(struct intel_dp *intel_dp,
   connector->force_bigjoiner_enable;
 }
 
-static bool intel_dp_has_dsc(struct intel_connector *connector)
+bool intel_dp_has_dsc(struct intel_connector *connector)
 {
struct drm_i915_private *i915 = to_i915(connector->base.dev);
 
if (!HAS_DSC(i915))
return false;
 
+   if (connector->mst_port && !HAS_DSC_MST(i915))
+   return false;
+
if (!drm_dp_sink_supports_dsc(connector->dp.dsc_dpcd))
return false;
 
diff --git a/drivers/gpu/drm/i915/display/intel_dp.h 
b/drivers/gpu/drm/i915/display/intel_dp.h
index aad2223df2a3..c0d3e315559e 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.h
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
@@ -90,6 +90,7 @@ bool intel_dp_has_hdmi_sink(struct intel_dp *intel_dp);
 bool intel_dp_is_edp(struct intel_dp *intel_dp);
 bool intel_dp_as_sdp_supported(struct intel_dp *intel_dp);
 bool intel_dp_is_uhbr(const struct intel_crtc_state *crtc_state);
+bool intel_dp_has_dsc(struct intel_connector *connector);
 int intel_dp_link_symbol_size(int rate);
 int intel_dp_link_symbol_clock(int rate);
 bool intel_dp_is_port_edp(struct drm_i915_private *dev_priv, enum port port);
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c 
b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index c772ba19c547..b57753d2d82c 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -1434,8 +1434,7 @@ intel_dp_mst_mode_valid_ctx(struct drm_connector 
*connector,
return 0;
}
 
-   if (HAS_DSC_MST(dev_priv) &&
-   drm_dp_sink_supports_dsc(intel_connector->dp.dsc_dpcd)) {
+   if (intel_dp_has_dsc(intel_connector)) {
/*
 * TBD pass the connector BPC,
 * for now U8_MAX so that max BPC on that platform would be 
picked
-- 
2.44.1



[PATCH 1/7] drm/i915: Drop redundant dsc_decompression_aux check

2024-05-17 Thread Ville Syrjala
From: Ville Syrjälä 

If we have no dsc_decompression_aux (only possible on MST)
then we won't have the dsc_dpcd caps either. So checking
both is not needed.

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_dp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index c0a3b6d50681..1e88449fe5f2 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1451,7 +1451,6 @@ static bool intel_dp_supports_dsc(const struct 
intel_connector *connector,
return false;
 
return intel_dsc_source_support(crtc_state) &&
-   connector->dp.dsc_decompression_aux &&
drm_dp_sink_supports_dsc(connector->dp.dsc_dpcd);
 }
 
-- 
2.44.1



[PATCH 0/7] drm/i915: DSC stuff

2024-05-17 Thread Ville Syrjala
From: Ville Syrjälä 

Respect the VBT's edp_disable_dsc bit, and do a bunch
of refactoring around checking for DSC support.

Also threw in a bonus cleanup to intel_dp_has_audio()
that caught my eye.

Ville Syrjälä (7):
  drm/i915: Drop redundant dsc_decompression_aux check
  drm/i915: Extract intel_dp_has_dsc()
  drm/i915: Handle MST in intel_dp_has_dsc()
  drm/i915: Use intel_dp_has_dsc() during .compute_config()
  drm/i915: Reuse intel_dp_supports_dsc() for MST
  drm/i915: Utilize edp_disable_dsc from VBT
  drm/i915: Remove bogus MST check in intel_dp_has_audio()

 drivers/gpu/drm/i915/display/intel_bios.c |  4 ++
 .../drm/i915/display/intel_display_types.h|  1 +
 drivers/gpu/drm/i915/display/intel_dp.c   | 42 +--
 drivers/gpu/drm/i915/display/intel_dp.h   |  4 ++
 drivers/gpu/drm/i915/display/intel_dp_mst.c   | 23 +++---
 5 files changed, 44 insertions(+), 30 deletions(-)

-- 
2.44.1



✗ Fi.CI.IGT: failure for drm/i915/gt: Fix CCS id's calculation for CCS mode setting

2024-05-17 Thread Patchwork
== Series Details ==

Series: drm/i915/gt: Fix CCS id's calculation for CCS mode setting
URL   : https://patchwork.freedesktop.org/series/133732/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14779_full -> Patchwork_133732v1_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_133732v1_full absolutely need 
to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_133732v1_full, please notify your bug team 
(i915-ci-in...@lists.freedesktop.org) to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (9 -> 9)
--

  No changes in participating hosts

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_clear:
- shard-mtlp: [PASS][1] -> [ABORT][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-mtlp-3/igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_clear.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133732v1/shard-mtlp-4/igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_clear.html

  * igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_range_bias:
- shard-mtlp: [PASS][3] -> [DMESG-FAIL][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-mtlp-3/igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_range_bias.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133732v1/shard-mtlp-4/igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_range_bias.html

  * igt@gem_busy@close-race:
- shard-tglu: [PASS][5] -> [ABORT][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-tglu-7/igt@gem_b...@close-race.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133732v1/shard-tglu-4/igt@gem_b...@close-race.html

  * igt@i915_selftest@live@active:
- shard-dg2:  NOTRUN -> [INCOMPLETE][7]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133732v1/shard-dg2-7/igt@i915_selftest@l...@active.html

  * igt@i915_selftest@live@gtt:
- shard-dg1:  [PASS][8] -> [INCOMPLETE][9]
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-dg1-13/igt@i915_selftest@l...@gtt.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133732v1/shard-dg1-14/igt@i915_selftest@l...@gtt.html

  * igt@kms_vblank@wait-forked-hang@pipe-b-hdmi-a-1:
- shard-snb:  [PASS][10] -> [ABORT][11]
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-snb6/igt@kms_vblank@wait-forked-h...@pipe-b-hdmi-a-1.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133732v1/shard-snb5/igt@kms_vblank@wait-forked-h...@pipe-b-hdmi-a-1.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@api_intel_bb@blit-reloc-keep-cache:
- shard-dg1:  NOTRUN -> [SKIP][12] ([i915#8411])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133732v1/shard-dg1-17/igt@api_intel...@blit-reloc-keep-cache.html

  * igt@device_reset@unbind-cold-reset-rebind:
- shard-dg1:  NOTRUN -> [SKIP][13] ([i915#11078])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133732v1/shard-dg1-17/igt@device_re...@unbind-cold-reset-rebind.html

  * igt@drm_fdinfo@virtual-busy-hang-all:
- shard-dg1:  NOTRUN -> [SKIP][14] ([i915#8414])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133732v1/shard-dg1-17/igt@drm_fdi...@virtual-busy-hang-all.html

  * igt@gem_ccs@block-copy-compressed:
- shard-tglu: NOTRUN -> [SKIP][15] ([i915#3555] / [i915#9323])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133732v1/shard-tglu-8/igt@gem_...@block-copy-compressed.html

  * igt@gem_ccs@block-multicopy-compressed:
- shard-tglu: NOTRUN -> [SKIP][16] ([i915#9323]) +1 other test skip
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133732v1/shard-tglu-2/igt@gem_...@block-multicopy-compressed.html

  * igt@gem_ccs@ctrl-surf-copy:
- shard-rkl:  NOTRUN -> [SKIP][17] ([i915#3555] / [i915#9323])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133732v1/shard-rkl-3/igt@gem_...@ctrl-surf-copy.html

  * igt@gem_create@create-ext-cpu-access-big:
- shard-tglu: NOTRUN -> [SKIP][18] ([i915#6335])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133732v1/shard-tglu-2/igt@gem_cre...@create-ext-cpu-access-big.html

  * igt@gem_create@create-ext-set-pat:
- shard-rkl:  NOTRUN -> [SKIP][19] ([i915#8562])
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133732v1/shard-rkl-3/igt@gem_cre...@create-ext-set-pat.html

  * 

✓ Fi.CI.BAT: success for Improve drm printer code

2024-05-17 Thread Patchwork
== Series Details ==

Series: Improve drm printer code
URL   : https://patchwork.freedesktop.org/series/133749/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14781 -> Patchwork_133749v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (45 -> 43)
--

  Missing(2): fi-snb-2520m fi-kbl-8809g 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@i915_module_load@load:
- bat-arls-3: [PASS][1] -> [ABORT][2] ([i915#11041])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14781/bat-arls-3/igt@i915_module_l...@load.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133749v1/bat-arls-3/igt@i915_module_l...@load.html

  
 Possible fixes 

  * igt@gem_lmem_swapping@basic@lmem0:
- bat-dg2-8:  [FAIL][3] ([i915#10378]) -> [PASS][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14781/bat-dg2-8/igt@gem_lmem_swapping@ba...@lmem0.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133749v1/bat-dg2-8/igt@gem_lmem_swapping@ba...@lmem0.html

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

  [i915#10378]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10378
  [i915#10435]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10435
  [i915#11041]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11041
  [i915#9157]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9157


Build changes
-

  * Linux: CI_DRM_14781 -> Patchwork_133749v1

  CI-20190529: 20190529
  CI_DRM_14781: d953159dab6ba6800d7316fb516ca2330dcbefe4 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7860: 05b3f5540c6dcaacdf2169dc730c126df9ffd7e2 @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_133749v1: d953159dab6ba6800d7316fb516ca2330dcbefe4 @ 
git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133749v1/index.html


✗ Fi.CI.SPARSE: warning for Improve drm printer code

2024-05-17 Thread Patchwork
== Series Details ==

Series: Improve drm printer code
URL   : https://patchwork.freedesktop.org/series/133749/
State : warning

== Summary ==

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




✗ Fi.CI.CHECKPATCH: warning for Improve drm printer code

2024-05-17 Thread Patchwork
== Series Details ==

Series: Improve drm printer code
URL   : https://patchwork.freedesktop.org/series/133749/
State : warning

== Summary ==

Error: dim checkpatch failed
6cab5b4517bb drm/print: Add generic drm dev printk function
-:64: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_ 
facility level
#64: FILE: drivers/gpu/drm/drm_print.c:288:
+   printk("%s" "[" DRM_NAME ":%ps]%s%s %pV",

-:64: WARNING:STRING_FRAGMENTS: Consecutive strings are generally better as a 
single string
#64: FILE: drivers/gpu/drm/drm_print.c:288:
+   printk("%s" "[" DRM_NAME ":%ps]%s%s %pV",

-:67: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_ 
facility level
#67: FILE: drivers/gpu/drm/drm_print.c:291:
+   printk("%s" "[" DRM_NAME "]%s%s %pV",

-:67: WARNING:STRING_FRAGMENTS: Consecutive strings are generally better as a 
single string
#67: FILE: drivers/gpu/drm/drm_print.c:291:
+   printk("%s" "[" DRM_NAME "]%s%s %pV",

total: 0 errors, 4 warnings, 0 checks, 93 lines checked
a4fd3a4ec7e7 drm/print: Improve drm_dbg_printer
6b5b0966356e drm/i915: Don't use __func__ as prefix for drm_dbg_printer




Re: [PATCH 2/2] drm/i915: Don't treat FLR resets as errors

2024-05-17 Thread Nirmoy Das

Hi Andi,

On 5/17/2024 1:25 PM, Andi Shyti wrote:

If we timeout while waiting for an FLR reset, there is nothing we
can do and i915 doesn't have any control on it. In any case the
system is still perfectly usable


If a FLR reset fails then we will have a dead GPU, I don't think the GPU 
is usable without a cold reboot.


This is a serious issue and should be report as an error.  I think we 
need to create a HW ticket to understand


why is FLR reset fails.


Regards,

Nirmoy




  and the function returns void.

We don't need to be alarmed, therefore, print the timeout
expiration as a debug message instead of an error.

Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10955
Signed-off-by: Andi Shyti 
---
  drivers/gpu/drm/i915/intel_uncore.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_uncore.c 
b/drivers/gpu/drm/i915/intel_uncore.c
index 2eba289d88ad..a3fa2ed91aae 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -2637,7 +2637,7 @@ static void driver_initiated_flr(struct intel_uncore 
*uncore)
 */
ret = intel_wait_for_register_fw(uncore, GU_CNTL, DRIVERFLR, 0, 
flr_timeout_ms);
if (ret) {
-   drm_err(>drm,
+   drm_dbg(>drm,
"Failed to wait for Driver-FLR bit to clear! %d\n",
ret);
return;
@@ -2652,7 +2652,7 @@ static void driver_initiated_flr(struct intel_uncore 
*uncore)
 DRIVERFLR, 0,
 flr_timeout_ms);
if (ret) {
-   drm_err(>drm, "Driver-FLR-teardown wait completion failed! 
%d\n", ret);
+   drm_dbg(>drm, "Driver-FLR-teardown wait completion failed! 
%d\n", ret);
return;
}
  
@@ -2661,7 +2661,7 @@ static void driver_initiated_flr(struct intel_uncore *uncore)

 DRIVERFLR_STATUS, DRIVERFLR_STATUS,
 flr_timeout_ms);
if (ret) {
-   drm_err(>drm, "Driver-FLR-reinit wait completion failed! 
%d\n", ret);
+   drm_dbg(>drm, "Driver-FLR-reinit wait completion failed! 
%d\n", ret);
return;
}
  


Re: [PATCH] arch: Fix name collision with ACPI's video.o

2024-05-17 Thread Hans de Goede
Hi,

On 5/17/24 11:14 AM, Thomas Zimmermann wrote:
> Commit 2fd001cd3600 ("arch: Rename fbdev header and source files")
> renames the video source files under arch/ such that they do not
> refer to fbdev any longer. The new files named video.o conflict with
> ACPI's video.ko module. Modprobing the ACPI module can then fail with
> warnings about missing symbols, as shown below.
> 
>   (i915_selftest:1107) igt_kmod-WARNING: i915: Unknown symbol 
> acpi_video_unregister (err -2)
>   (i915_selftest:1107) igt_kmod-WARNING: i915: Unknown symbol 
> acpi_video_register_backlight (err -2)
>   (i915_selftest:1107) igt_kmod-WARNING: i915: Unknown symbol 
> __acpi_video_get_backlight_type (err -2)
>   (i915_selftest:1107) igt_kmod-WARNING: i915: Unknown symbol 
> acpi_video_register (err -2)
> 
> Fix the issue by renaming the architecture's video.o to video-common.o.
> 
> Reported-by: Chaitanya Kumar Borah 
> Closes: 
> https://lore.kernel.org/intel-gfx/9dcac6e9-a3bf-4ace-bbdc-f697f767f...@suse.de/T/#t
> Signed-off-by: Thomas Zimmermann 
> Fixes: 2fd001cd3600 ("arch: Rename fbdev header and source files")
> Cc: Arnd Bergmann 
> Cc: linux-a...@vger.kernel.org
> Cc: linux-fb...@vger.kernel.org
> Cc: dri-de...@lists.freedesktop.org

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede 

Regards,

Hans




> ---
>  arch/sparc/video/Makefile| 2 +-
>  arch/sparc/video/{video.c => video-common.c} | 0
>  arch/x86/video/Makefile  | 2 +-
>  arch/x86/video/{video.c => video-common.c}   | 0
>  4 files changed, 2 insertions(+), 2 deletions(-)
>  rename arch/sparc/video/{video.c => video-common.c} (100%)
>  rename arch/x86/video/{video.c => video-common.c} (100%)
> 
> diff --git a/arch/sparc/video/Makefile b/arch/sparc/video/Makefile
> index fdf83a408d750..dcfbe7a5912c0 100644
> --- a/arch/sparc/video/Makefile
> +++ b/arch/sparc/video/Makefile
> @@ -1,3 +1,3 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  
> -obj-y+= video.o
> +obj-y+= video-common.o
> diff --git a/arch/sparc/video/video.c b/arch/sparc/video/video-common.c
> similarity index 100%
> rename from arch/sparc/video/video.c
> rename to arch/sparc/video/video-common.c
> diff --git a/arch/x86/video/Makefile b/arch/x86/video/Makefile
> index fdf83a408d750..dcfbe7a5912c0 100644
> --- a/arch/x86/video/Makefile
> +++ b/arch/x86/video/Makefile
> @@ -1,3 +1,3 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  
> -obj-y+= video.o
> +obj-y+= video-common.o
> diff --git a/arch/x86/video/video.c b/arch/x86/video/video-common.c
> similarity index 100%
> rename from arch/x86/video/video.c
> rename to arch/x86/video/video-common.c



Re: [PATCH 3/3] drm/i915: Don't use __func__ as prefix for drm_dbg_printer

2024-05-17 Thread Jani Nikula
On Fri, 17 May 2024, Michal Wajdeczko  wrote:
> Updated code of drm_dbg_printer() is already printing symbolic
> name of the caller like drm_dbg() does.
>
> Signed-off-by: Michal Wajdeczko 

Reviewed-by: Jani Nikula 

> ---
>  drivers/gpu/drm/i915/gt/intel_reset.c  | 2 +-
>  drivers/gpu/drm/i915/gt/selftest_context.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c 
> b/drivers/gpu/drm/i915/gt/intel_reset.c
> index 6161f7a3ff70..735cd23a43c6 100644
> --- a/drivers/gpu/drm/i915/gt/intel_reset.c
> +++ b/drivers/gpu/drm/i915/gt/intel_reset.c
> @@ -1025,7 +1025,7 @@ void intel_gt_set_wedged(struct intel_gt *gt)
>  
>   if (GEM_SHOW_DEBUG()) {
>   struct drm_printer p = drm_dbg_printer(>i915->drm,
> -DRM_UT_DRIVER, __func__);
> +DRM_UT_DRIVER, NULL);
>   struct intel_engine_cs *engine;
>   enum intel_engine_id id;
>  
> diff --git a/drivers/gpu/drm/i915/gt/selftest_context.c 
> b/drivers/gpu/drm/i915/gt/selftest_context.c
> index 12eca750f7d0..5eb46700dc4e 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_context.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_context.c
> @@ -286,7 +286,7 @@ static int __live_active_context(struct intel_engine_cs 
> *engine)
>  
>   if (intel_engine_pm_is_awake(engine)) {
>   struct drm_printer p = drm_dbg_printer(>i915->drm,
> -DRM_UT_DRIVER, __func__);
> +DRM_UT_DRIVER, NULL);
>  
>   intel_engine_dump(engine, ,
> "%s is still awake:%d after idle-barriers\n",

-- 
Jani Nikula, Intel


Re: [PATCH 2/3] drm/print: Improve drm_dbg_printer

2024-05-17 Thread Jani Nikula
On Fri, 17 May 2024, Michal Wajdeczko  wrote:
> With recent introduction of a generic drm dev printk function, we
> can now store and use location where drm_dbg_printer was invoked
> and output it's symbolic name like we do for all drm debug prints.
>
> Signed-off-by: Michal Wajdeczko 
> Cc: Jani Nikula 
> ---
>  drivers/gpu/drm/drm_print.c | 3 +--
>  include/drm/drm_print.h | 2 ++
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c
> index a2b60c8245a1..0a205fdee7cf 100644
> --- a/drivers/gpu/drm/drm_print.c
> +++ b/drivers/gpu/drm/drm_print.c
> @@ -191,8 +191,7 @@ void __drm_printfn_dbg(struct drm_printer *p, struct 
> va_format *vaf)
>   if (!__drm_debug_enabled(category))
>   return;
>  
> - /* Note: __builtin_return_address(0) is useless here. */
> - __drm_dev_vprintk(dev, KERN_DEBUG, NULL, p->prefix, vaf);
> + __drm_dev_vprintk(dev, KERN_DEBUG, p->origin, p->prefix, vaf);
>  }
>  EXPORT_SYMBOL(__drm_printfn_dbg);
>  
> diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
> index bb1801c58544..761ce01761b7 100644
> --- a/include/drm/drm_print.h
> +++ b/include/drm/drm_print.h
> @@ -175,6 +175,7 @@ struct drm_printer {
>   void (*printfn)(struct drm_printer *p, struct va_format *vaf);
>   void (*puts)(struct drm_printer *p, const char *str);
>   void *arg;
> + const void *origin;
>   const char *prefix;
>   enum drm_debug_category category;
>  };
> @@ -332,6 +333,7 @@ static inline struct drm_printer drm_dbg_printer(struct 
> drm_device *drm,
>   struct drm_printer p = {
>   .printfn = __drm_printfn_dbg,
>   .arg = drm,
> + .origin = (void *)_THIS_IP_, /* it's fine as we will be inlined 
> */

Not that it makes a difference, but I guess I'd cast to (const void *)
to match the member.

Reviewed-by: Jani Nikula 


>   .prefix = prefix,
>   .category = category,
>   };

-- 
Jani Nikula, Intel


✗ Fi.CI.IGT: failure for LunarLake IO and Fast Wake changes

2024-05-17 Thread Patchwork
== Series Details ==

Series: LunarLake IO and Fast Wake changes
URL   : https://patchwork.freedesktop.org/series/133728/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14779_full -> Patchwork_133728v1_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_133728v1_full absolutely need 
to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_133728v1_full, please notify your bug team 
(i915-ci-in...@lists.freedesktop.org) to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (9 -> 9)
--

  No changes in participating hosts

Possible new issues
---

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

### CI changes ###

 Possible regressions 

  * boot:
- shard-dg1:  ([PASS][1], [PASS][2], [PASS][3], [PASS][4], 
[PASS][5], [PASS][6], [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]) -> ([FAIL][20], [PASS][21], [PASS][22], [PASS][23], 
[PASS][24], [PASS][25], [PASS][26], [PASS][27], [PASS][28], [PASS][29], 
[PASS][30], [PASS][31], [PASS][32], [PASS][33], [PASS][34], [PASS][35], 
[PASS][36], [PASS][37], [PASS][38], [PASS][39])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-dg1-18/boot.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-dg1-18/boot.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-dg1-18/boot.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-dg1-18/boot.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-dg1-17/boot.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-dg1-17/boot.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-dg1-17/boot.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-dg1-17/boot.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-dg1-16/boot.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-dg1-16/boot.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-dg1-16/boot.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-dg1-16/boot.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-dg1-15/boot.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-dg1-15/boot.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-dg1-15/boot.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-dg1-14/boot.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-dg1-13/boot.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-dg1-13/boot.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/shard-dg1-13/boot.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/shard-dg1-18/boot.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/shard-dg1-18/boot.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/shard-dg1-18/boot.html
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/shard-dg1-17/boot.html
   [24]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/shard-dg1-17/boot.html
   [25]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/shard-dg1-17/boot.html
   [26]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/shard-dg1-16/boot.html
   [27]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/shard-dg1-16/boot.html
   [28]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/shard-dg1-16/boot.html
   [29]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/shard-dg1-16/boot.html
   [30]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/shard-dg1-15/boot.html
   [31]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/shard-dg1-15/boot.html
   [32]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/shard-dg1-15/boot.html
   [33]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/shard-dg1-15/boot.html
   [34]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/shard-dg1-14/boot.html
   [35]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/shard-dg1-14/boot.html
   [36]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/shard-dg1-14/boot.html
   [37]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/shard-dg1-13/boot.html
   [38]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/shard-dg1-13/boot.html
   [39]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/shard-dg1-13/boot.html

  

### 

Re: [PATCH 1/3] drm/print: Add generic drm dev printk function

2024-05-17 Thread Jani Nikula
On Fri, 17 May 2024, Michal Wajdeczko  wrote:
> We already have some drm printk functions that need to duplicate
> a code to get a similar format of the final result, for example:
>
>   [ ] :00:00.0: [drm:foo] bar
>   [ ] :00:00.0: [drm] foo bar
>   [ ] :00:00.0: [drm] *ERROR* foo
>
> Add a generic __drm_dev_vprintk() function that can format the
> final message like all other existing function do and allows us
> to keep the formatting code in one place.

Nice idea!

> Signed-off-by: Michal Wajdeczko 
> Cc: Jani Nikula 
> ---
>  drivers/gpu/drm/drm_print.c | 49 -
>  include/drm/drm_print.h |  3 +++
>  2 files changed, 30 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c
> index cf2efb44722c..a2b60c8245a1 100644
> --- a/drivers/gpu/drm/drm_print.c
> +++ b/drivers/gpu/drm/drm_print.c
> @@ -187,19 +187,12 @@ void __drm_printfn_dbg(struct drm_printer *p, struct 
> va_format *vaf)
>   const struct drm_device *drm = p->arg;
>   const struct device *dev = drm ? drm->dev : NULL;
>   enum drm_debug_category category = p->category;
> - const char *prefix = p->prefix ?: "";
> - const char *prefix_pad = p->prefix ? " " : "";
>  
>   if (!__drm_debug_enabled(category))
>   return;
>  
>   /* Note: __builtin_return_address(0) is useless here. */
> - if (dev)
> - dev_printk(KERN_DEBUG, dev, "[" DRM_NAME "]%s%s %pV",
> -prefix_pad, prefix, vaf);
> - else
> - printk(KERN_DEBUG "[" DRM_NAME "]%s%s %pV",
> -prefix_pad, prefix, vaf);
> + __drm_dev_vprintk(dev, KERN_DEBUG, NULL, p->prefix, vaf);
>  }
>  EXPORT_SYMBOL(__drm_printfn_dbg);
>  
> @@ -277,6 +270,29 @@ void drm_print_bits(struct drm_printer *p, unsigned long 
> value,
>  }
>  EXPORT_SYMBOL(drm_print_bits);
>  
> +void __drm_dev_vprintk(const struct device *dev, const char *level,
> +const void *origin, const char *prefix,
> +struct va_format *vaf)
> +{
> + const char *prefix_pad = prefix ? " " : (prefix = "");

Too clever, please just keep it simple:

const char *prefix_pad = prefix ? " " : "";

if (!prefix)
prefix = "";

> +
> + if (dev)
> + if (origin)
> + dev_printk(level, dev, "[" DRM_NAME ":%ps]%s%s %pV",
> +origin, prefix_pad, prefix, vaf);
> + else
> + dev_printk(level, dev, "[" DRM_NAME "]%s%s %pV",
> +prefix_pad, prefix, vaf);
> + else
> + if (origin)
> + printk("%s" "[" DRM_NAME ":%ps]%s%s %pV",
> +level, origin, prefix_pad, prefix, vaf);
> + else
> + printk("%s" "[" DRM_NAME "]%s%s %pV",
> +level, prefix_pad, prefix, vaf);

I'd sprinkle a few curly braces around the top level if-else blocks.

Side note, feels like using DRM_NAME makes things harder, not
easier. But that's for another patch.

> +}
> +EXPORT_SYMBOL(__drm_dev_vprintk);

AFAICT this could be a non-exported static function. And probably moved
earlier in the file to not require a declaration.

BR,
Jani.

> +
>  void drm_dev_printk(const struct device *dev, const char *level,
>   const char *format, ...)
>  {
> @@ -287,12 +303,7 @@ void drm_dev_printk(const struct device *dev, const char 
> *level,
>   vaf.fmt = format;
>   vaf.va = 
>  
> - if (dev)
> - dev_printk(level, dev, "[" DRM_NAME ":%ps] %pV",
> -__builtin_return_address(0), );
> - else
> - printk("%s" "[" DRM_NAME ":%ps] %pV",
> -level, __builtin_return_address(0), );
> + __drm_dev_vprintk(dev, level, __builtin_return_address(0), NULL, );
>  
>   va_end(args);
>  }
> @@ -312,12 +323,7 @@ void __drm_dev_dbg(struct _ddebug *desc, const struct 
> device *dev,
>   vaf.fmt = format;
>   vaf.va = 
>  
> - if (dev)
> - dev_printk(KERN_DEBUG, dev, "[" DRM_NAME ":%ps] %pV",
> -__builtin_return_address(0), );
> - else
> - printk(KERN_DEBUG "[" DRM_NAME ":%ps] %pV",
> -__builtin_return_address(0), );
> + __drm_dev_vprintk(dev, KERN_DEBUG, __builtin_return_address(0), NULL, 
> );
>  
>   va_end(args);
>  }
> @@ -351,8 +357,7 @@ void __drm_err(const char *format, ...)
>   vaf.fmt = format;
>   vaf.va = 
>  
> - printk(KERN_ERR "[" DRM_NAME ":%ps] *ERROR* %pV",
> -__builtin_return_address(0), );
> + __drm_dev_vprintk(NULL, KERN_ERR, __builtin_return_address(0), 
> "*ERROR*", );
>  
>   va_end(args);
>  }
> diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
> index 089950ad8681..bb1801c58544 100644
> --- a/include/drm/drm_print.h
> +++ b/include/drm/drm_print.h

[PATCH 3/3] drm/i915: Don't use __func__ as prefix for drm_dbg_printer

2024-05-17 Thread Michal Wajdeczko
Updated code of drm_dbg_printer() is already printing symbolic
name of the caller like drm_dbg() does.

Signed-off-by: Michal Wajdeczko 
---
 drivers/gpu/drm/i915/gt/intel_reset.c  | 2 +-
 drivers/gpu/drm/i915/gt/selftest_context.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c 
b/drivers/gpu/drm/i915/gt/intel_reset.c
index 6161f7a3ff70..735cd23a43c6 100644
--- a/drivers/gpu/drm/i915/gt/intel_reset.c
+++ b/drivers/gpu/drm/i915/gt/intel_reset.c
@@ -1025,7 +1025,7 @@ void intel_gt_set_wedged(struct intel_gt *gt)
 
if (GEM_SHOW_DEBUG()) {
struct drm_printer p = drm_dbg_printer(>i915->drm,
-  DRM_UT_DRIVER, __func__);
+  DRM_UT_DRIVER, NULL);
struct intel_engine_cs *engine;
enum intel_engine_id id;
 
diff --git a/drivers/gpu/drm/i915/gt/selftest_context.c 
b/drivers/gpu/drm/i915/gt/selftest_context.c
index 12eca750f7d0..5eb46700dc4e 100644
--- a/drivers/gpu/drm/i915/gt/selftest_context.c
+++ b/drivers/gpu/drm/i915/gt/selftest_context.c
@@ -286,7 +286,7 @@ static int __live_active_context(struct intel_engine_cs 
*engine)
 
if (intel_engine_pm_is_awake(engine)) {
struct drm_printer p = drm_dbg_printer(>i915->drm,
-  DRM_UT_DRIVER, __func__);
+  DRM_UT_DRIVER, NULL);
 
intel_engine_dump(engine, ,
  "%s is still awake:%d after idle-barriers\n",
-- 
2.43.0



[PATCH 1/3] drm/print: Add generic drm dev printk function

2024-05-17 Thread Michal Wajdeczko
We already have some drm printk functions that need to duplicate
a code to get a similar format of the final result, for example:

  [ ] :00:00.0: [drm:foo] bar
  [ ] :00:00.0: [drm] foo bar
  [ ] :00:00.0: [drm] *ERROR* foo

Add a generic __drm_dev_vprintk() function that can format the
final message like all other existing function do and allows us
to keep the formatting code in one place.

Signed-off-by: Michal Wajdeczko 
Cc: Jani Nikula 
---
 drivers/gpu/drm/drm_print.c | 49 -
 include/drm/drm_print.h |  3 +++
 2 files changed, 30 insertions(+), 22 deletions(-)

diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c
index cf2efb44722c..a2b60c8245a1 100644
--- a/drivers/gpu/drm/drm_print.c
+++ b/drivers/gpu/drm/drm_print.c
@@ -187,19 +187,12 @@ void __drm_printfn_dbg(struct drm_printer *p, struct 
va_format *vaf)
const struct drm_device *drm = p->arg;
const struct device *dev = drm ? drm->dev : NULL;
enum drm_debug_category category = p->category;
-   const char *prefix = p->prefix ?: "";
-   const char *prefix_pad = p->prefix ? " " : "";
 
if (!__drm_debug_enabled(category))
return;
 
/* Note: __builtin_return_address(0) is useless here. */
-   if (dev)
-   dev_printk(KERN_DEBUG, dev, "[" DRM_NAME "]%s%s %pV",
-  prefix_pad, prefix, vaf);
-   else
-   printk(KERN_DEBUG "[" DRM_NAME "]%s%s %pV",
-  prefix_pad, prefix, vaf);
+   __drm_dev_vprintk(dev, KERN_DEBUG, NULL, p->prefix, vaf);
 }
 EXPORT_SYMBOL(__drm_printfn_dbg);
 
@@ -277,6 +270,29 @@ void drm_print_bits(struct drm_printer *p, unsigned long 
value,
 }
 EXPORT_SYMBOL(drm_print_bits);
 
+void __drm_dev_vprintk(const struct device *dev, const char *level,
+  const void *origin, const char *prefix,
+  struct va_format *vaf)
+{
+   const char *prefix_pad = prefix ? " " : (prefix = "");
+
+   if (dev)
+   if (origin)
+   dev_printk(level, dev, "[" DRM_NAME ":%ps]%s%s %pV",
+  origin, prefix_pad, prefix, vaf);
+   else
+   dev_printk(level, dev, "[" DRM_NAME "]%s%s %pV",
+  prefix_pad, prefix, vaf);
+   else
+   if (origin)
+   printk("%s" "[" DRM_NAME ":%ps]%s%s %pV",
+  level, origin, prefix_pad, prefix, vaf);
+   else
+   printk("%s" "[" DRM_NAME "]%s%s %pV",
+  level, prefix_pad, prefix, vaf);
+}
+EXPORT_SYMBOL(__drm_dev_vprintk);
+
 void drm_dev_printk(const struct device *dev, const char *level,
const char *format, ...)
 {
@@ -287,12 +303,7 @@ void drm_dev_printk(const struct device *dev, const char 
*level,
vaf.fmt = format;
vaf.va = 
 
-   if (dev)
-   dev_printk(level, dev, "[" DRM_NAME ":%ps] %pV",
-  __builtin_return_address(0), );
-   else
-   printk("%s" "[" DRM_NAME ":%ps] %pV",
-  level, __builtin_return_address(0), );
+   __drm_dev_vprintk(dev, level, __builtin_return_address(0), NULL, );
 
va_end(args);
 }
@@ -312,12 +323,7 @@ void __drm_dev_dbg(struct _ddebug *desc, const struct 
device *dev,
vaf.fmt = format;
vaf.va = 
 
-   if (dev)
-   dev_printk(KERN_DEBUG, dev, "[" DRM_NAME ":%ps] %pV",
-  __builtin_return_address(0), );
-   else
-   printk(KERN_DEBUG "[" DRM_NAME ":%ps] %pV",
-  __builtin_return_address(0), );
+   __drm_dev_vprintk(dev, KERN_DEBUG, __builtin_return_address(0), NULL, 
);
 
va_end(args);
 }
@@ -351,8 +357,7 @@ void __drm_err(const char *format, ...)
vaf.fmt = format;
vaf.va = 
 
-   printk(KERN_ERR "[" DRM_NAME ":%ps] *ERROR* %pV",
-  __builtin_return_address(0), );
+   __drm_dev_vprintk(NULL, KERN_ERR, __builtin_return_address(0), 
"*ERROR*", );
 
va_end(args);
 }
diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
index 089950ad8681..bb1801c58544 100644
--- a/include/drm/drm_print.h
+++ b/include/drm/drm_print.h
@@ -366,6 +366,9 @@ static inline struct drm_printer drm_err_printer(struct 
drm_device *drm,
 __printf(3, 4)
 void drm_dev_printk(const struct device *dev, const char *level,
const char *format, ...);
+void __drm_dev_vprintk(const struct device *dev, const char *level,
+  const void *origin, const char *prefix,
+  struct va_format *vaf);
 struct _ddebug;
 __printf(4, 5)
 void __drm_dev_dbg(struct _ddebug *desc, const struct device *dev,
-- 
2.43.0



[PATCH 2/3] drm/print: Improve drm_dbg_printer

2024-05-17 Thread Michal Wajdeczko
With recent introduction of a generic drm dev printk function, we
can now store and use location where drm_dbg_printer was invoked
and output it's symbolic name like we do for all drm debug prints.

Signed-off-by: Michal Wajdeczko 
Cc: Jani Nikula 
---
 drivers/gpu/drm/drm_print.c | 3 +--
 include/drm/drm_print.h | 2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c
index a2b60c8245a1..0a205fdee7cf 100644
--- a/drivers/gpu/drm/drm_print.c
+++ b/drivers/gpu/drm/drm_print.c
@@ -191,8 +191,7 @@ void __drm_printfn_dbg(struct drm_printer *p, struct 
va_format *vaf)
if (!__drm_debug_enabled(category))
return;
 
-   /* Note: __builtin_return_address(0) is useless here. */
-   __drm_dev_vprintk(dev, KERN_DEBUG, NULL, p->prefix, vaf);
+   __drm_dev_vprintk(dev, KERN_DEBUG, p->origin, p->prefix, vaf);
 }
 EXPORT_SYMBOL(__drm_printfn_dbg);
 
diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
index bb1801c58544..761ce01761b7 100644
--- a/include/drm/drm_print.h
+++ b/include/drm/drm_print.h
@@ -175,6 +175,7 @@ struct drm_printer {
void (*printfn)(struct drm_printer *p, struct va_format *vaf);
void (*puts)(struct drm_printer *p, const char *str);
void *arg;
+   const void *origin;
const char *prefix;
enum drm_debug_category category;
 };
@@ -332,6 +333,7 @@ static inline struct drm_printer drm_dbg_printer(struct 
drm_device *drm,
struct drm_printer p = {
.printfn = __drm_printfn_dbg,
.arg = drm,
+   .origin = (void *)_THIS_IP_, /* it's fine as we will be inlined 
*/
.prefix = prefix,
.category = category,
};
-- 
2.43.0



[PATCH 0/3] Improve drm printer code

2024-05-17 Thread Michal Wajdeczko
We already have some drm printk functions that need to duplicate
a code to get a similar format of the final result, for example:

  [ ] :00:00.0: [drm:foo] bar
  [ ] :00:00.0: [drm] foo bar
  [ ] :00:00.0: [drm] *ERROR* foo

Add a generic __drm_dev_vprintk() function that can format the
final message like all other existing function do and allows us
to keep the formatting code in one place.

Above also allows to improve drm_dbg_printer() that today lacks
of outputing symbolic name of the caller, like drm_dbg() does.

Cc: Maxime Ripard 
Cc: Jani Nikula 

Michal Wajdeczko (3):
  drm/print: Add generic drm dev printk function
  drm/print: Improve drm_dbg_printer
  drm/i915: Don't use __func__ as prefix for drm_dbg_printer

 drivers/gpu/drm/drm_print.c| 50 --
 drivers/gpu/drm/i915/gt/intel_reset.c  |  2 +-
 drivers/gpu/drm/i915/gt/selftest_context.c |  2 +-
 include/drm/drm_print.h|  5 +++
 4 files changed, 34 insertions(+), 25 deletions(-)

-- 
2.43.0



Re: [PATCH 2/2] drm/i915/hdcp: Check mst_port to determine connector type

2024-05-17 Thread Imre Deak
On Tue, May 07, 2024 at 09:20:37AM +0530, Suraj Kandpal wrote:
> Check mst_port field in intel_connector to check connector type
> rather than rely on encoder as it may not be attached to connector
> at times.
> 
> Signed-off-by: Suraj Kandpal 
> ---
>  drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c 
> b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> index 551c862ed7a6..2edffe62f360 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> @@ -693,7 +693,7 @@ int intel_dp_hdcp_get_remote_capability(struct 
> intel_connector *connector,
>  
>   *hdcp_capable = false;
>   *hdcp2_capable = false;
> - if (!intel_encoder_is_mst(connector->encoder))
> + if (!connector->mst_port)

I suppose this fixes
https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10898

Could you add the Closes: line for it?

Can this function be called for anything else than an MST connector?

Afaics it's only called from 

intel_connector_info() ->
intel_hdcp_info(..., remote_req = true)

only for MST connectors, which makes sense since only MST connectors
would have remote caps. In that case it would be enough to simply remove
the encoder check which leads to the NULL deref in case the output is
disabled.

>   return -EINVAL;
>  
>   aux = >port->aux;
> -- 
> 2.43.2
> 


Re: [PATCH] drm/i915/selftests: Set always_coherent to false when reading from CPU

2024-05-17 Thread Nirmoy Das



On 5/17/2024 1:53 PM, Jani Nikula wrote:

On Fri, 17 May 2024, Nirmoy Das  wrote:

Hi Jani,

On 5/17/2024 9:39 AM, Jani Nikula wrote:

On Thu, 16 May 2024, Nirmoy Das  wrote:

The previous commit 'commit 8d4ba9fc1c6c ("drm/i915/selftests: Pick

"previous commit" is a fairly vague reference once this gets
committed. It's not going to be "previous" in any meaningful sense.

Please just start with:

Commit 8d4ba9fc1c6c ("drm/i915/selftests: Pick correct caching mode.")
was not complete...

Will do that.



And probably add:

Fixes: 8d4ba9fc1c6c ("drm/i915/selftests: Pick correct caching mode.")

Do we need Fixes for selftest ? I always assumed it is not required as
this code is for debug/CI

Maybe not for stuff that's already in stable, but we do run CI on
drm-next and -rc kernels, and if this causes issues there, why not have
them fixed?


Not sure a commit with Fixes flows from drm-intel-next to drm-next/-rc 
but I see no issue adding Fixes without CC-ing to stable.


Pushed it to drm-intel-next with above modifications.  b4-shazam picked 
Fixes as well which was nice.



Thanks,

Nirmoy



BR,
Jani.



Thanks,

Nirmoy


BR,
Jani.


correct caching mode.")' was not complete as for non LLC  sharing platforms
cpu read can happen from LLC which probably doesn't have the latest
changes made by GPU.

Cc: Andi Shyti 
Cc: Janusz Krzysztofik 
Cc: Jonathan Cavitt 
Signed-off-by: Nirmoy Das 
---
   drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c 
b/drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c
index 65a931ea80e9..3527b8f446fe 100644
--- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c
+++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c
@@ -196,7 +196,7 @@ static int verify_access(struct drm_i915_private *i915,
if (err)
goto out_file;
   
-	mode = intel_gt_coherent_map_type(to_gt(i915), native_obj, true);

+   mode = intel_gt_coherent_map_type(to_gt(i915), native_obj, false);
vaddr = i915_gem_object_pin_map_unlocked(native_obj, mode);
if (IS_ERR(vaddr)) {
err = PTR_ERR(vaddr);


✓ Fi.CI.BAT: success for Don't be alarmed at FLR timeouts

2024-05-17 Thread Patchwork
== Series Details ==

Series: Don't be alarmed at FLR timeouts
URL   : https://patchwork.freedesktop.org/series/133744/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14780 -> Patchwork_133744v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (44 -> 37)
--

  Missing(7): bat-mtlp-8 bat-dg1-7 fi-snb-2520m fi-kbl-8809g bat-dg2-11 
bat-jsl-1 bat-arls-3 

Known issues


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

### IGT changes ###

 Possible fixes 

  * igt@i915_selftest@live@dmabuf:
- {bat-mtlp-9}:   [DMESG-FAIL][1] ([i915#11035]) -> [PASS][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14780/bat-mtlp-9/igt@i915_selftest@l...@dmabuf.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133744v1/bat-mtlp-9/igt@i915_selftest@l...@dmabuf.html

  * igt@i915_selftest@live@execlists:
- fi-bsw-nick:[ABORT][3] ([i915#10594]) -> [PASS][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14780/fi-bsw-nick/igt@i915_selftest@l...@execlists.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133744v1/fi-bsw-nick/igt@i915_selftest@l...@execlists.html

  * igt@kms_flip@basic-flip-vs-modeset@b-dp7:
- {bat-mtlp-9}:   [DMESG-WARN][5] ([i915#10435]) -> [PASS][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14780/bat-mtlp-9/igt@kms_flip@basic-flip-vs-mode...@b-dp7.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133744v1/bat-mtlp-9/igt@kms_flip@basic-flip-vs-mode...@b-dp7.html

  * igt@kms_pipe_crc_basic@hang-read-crc@pipe-a-dp-1:
- {bat-rpls-4}:   [DMESG-WARN][7] ([i915#9970]) -> [PASS][8]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14780/bat-rpls-4/igt@kms_pipe_crc_basic@hang-read-...@pipe-a-dp-1.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133744v1/bat-rpls-4/igt@kms_pipe_crc_basic@hang-read-...@pipe-a-dp-1.html

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

  [i915#10435]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10435
  [i915#10594]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10594
  [i915#10911]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10911
  [i915#11035]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11035
  [i915#9970]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9970


Build changes
-

  * Linux: CI_DRM_14780 -> Patchwork_133744v1

  CI-20190529: 20190529
  CI_DRM_14780: 8ef53c10d150679e3ff5db00d128417dfffb7798 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7860: 05b3f5540c6dcaacdf2169dc730c126df9ffd7e2 @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_133744v1: 8ef53c10d150679e3ff5db00d128417dfffb7798 @ 
git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133744v1/index.html


Re: [PATCH] drm/i915/selftests: Set always_coherent to false when reading from CPU

2024-05-17 Thread Jani Nikula
On Fri, 17 May 2024, Nirmoy Das  wrote:
> Hi Jani,
>
> On 5/17/2024 9:39 AM, Jani Nikula wrote:
>> On Thu, 16 May 2024, Nirmoy Das  wrote:
>>> The previous commit 'commit 8d4ba9fc1c6c ("drm/i915/selftests: Pick
>> "previous commit" is a fairly vague reference once this gets
>> committed. It's not going to be "previous" in any meaningful sense.
>>
>> Please just start with:
>>
>> Commit 8d4ba9fc1c6c ("drm/i915/selftests: Pick correct caching mode.")
>> was not complete...
>
> Will do that.
>
>
>>
>> And probably add:
>>
>> Fixes: 8d4ba9fc1c6c ("drm/i915/selftests: Pick correct caching mode.")
>
> Do we need Fixes for selftest ? I always assumed it is not required as 
> this code is for debug/CI

Maybe not for stuff that's already in stable, but we do run CI on
drm-next and -rc kernels, and if this causes issues there, why not have
them fixed?

BR,
Jani.

>
>
> Thanks,
>
> Nirmoy
>
>>
>> BR,
>> Jani.
>>
>>> correct caching mode.")' was not complete as for non LLC  sharing platforms
>>> cpu read can happen from LLC which probably doesn't have the latest
>>> changes made by GPU.
>>>
>>> Cc: Andi Shyti 
>>> Cc: Janusz Krzysztofik 
>>> Cc: Jonathan Cavitt 
>>> Signed-off-by: Nirmoy Das 
>>> ---
>>>   drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c 
>>> b/drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c
>>> index 65a931ea80e9..3527b8f446fe 100644
>>> --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c
>>> +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c
>>> @@ -196,7 +196,7 @@ static int verify_access(struct drm_i915_private *i915,
>>> if (err)
>>> goto out_file;
>>>   
>>> -   mode = intel_gt_coherent_map_type(to_gt(i915), native_obj, true);
>>> +   mode = intel_gt_coherent_map_type(to_gt(i915), native_obj, false);
>>> vaddr = i915_gem_object_pin_map_unlocked(native_obj, mode);
>>> if (IS_ERR(vaddr)) {
>>> err = PTR_ERR(vaddr);

-- 
Jani Nikula, Intel


[PATCH 2/2] drm/i915: Don't treat FLR resets as errors

2024-05-17 Thread Andi Shyti
If we timeout while waiting for an FLR reset, there is nothing we
can do and i915 doesn't have any control on it. In any case the
system is still perfectly usable and the function returns void.

We don't need to be alarmed, therefore, print the timeout
expiration as a debug message instead of an error.

Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10955
Signed-off-by: Andi Shyti 
---
 drivers/gpu/drm/i915/intel_uncore.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_uncore.c 
b/drivers/gpu/drm/i915/intel_uncore.c
index 2eba289d88ad..a3fa2ed91aae 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -2637,7 +2637,7 @@ static void driver_initiated_flr(struct intel_uncore 
*uncore)
 */
ret = intel_wait_for_register_fw(uncore, GU_CNTL, DRIVERFLR, 0, 
flr_timeout_ms);
if (ret) {
-   drm_err(>drm,
+   drm_dbg(>drm,
"Failed to wait for Driver-FLR bit to clear! %d\n",
ret);
return;
@@ -2652,7 +2652,7 @@ static void driver_initiated_flr(struct intel_uncore 
*uncore)
 DRIVERFLR, 0,
 flr_timeout_ms);
if (ret) {
-   drm_err(>drm, "Driver-FLR-teardown wait completion 
failed! %d\n", ret);
+   drm_dbg(>drm, "Driver-FLR-teardown wait completion 
failed! %d\n", ret);
return;
}
 
@@ -2661,7 +2661,7 @@ static void driver_initiated_flr(struct intel_uncore 
*uncore)
 DRIVERFLR_STATUS, DRIVERFLR_STATUS,
 flr_timeout_ms);
if (ret) {
-   drm_err(>drm, "Driver-FLR-reinit wait completion failed! 
%d\n", ret);
+   drm_dbg(>drm, "Driver-FLR-reinit wait completion failed! 
%d\n", ret);
return;
}
 
-- 
2.43.0



[PATCH 1/2] drm/i915: Increase FLR timeout from 3s to 9s

2024-05-17 Thread Andi Shyti
Following the guidelines it takes 3 seconds to perform an FLR
reset. Let's give it a bit more slack because this time can
change depending on the platform and on the firmware

Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10955
Signed-off-by: Andi Shyti 
---
 drivers/gpu/drm/i915/intel_uncore.c | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_uncore.c 
b/drivers/gpu/drm/i915/intel_uncore.c
index 729409a4bada..2eba289d88ad 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -2614,11 +2614,18 @@ void intel_uncore_prune_engine_fw_domains(struct 
intel_uncore *uncore,
 static void driver_initiated_flr(struct intel_uncore *uncore)
 {
struct drm_i915_private *i915 = uncore->i915;
-   const unsigned int flr_timeout_ms = 3000; /* specs recommend a 3s wait 
*/
+   unsigned int flr_timeout_ms;
int ret;
 
drm_dbg(>drm, "Triggering Driver-FLR\n");
 
+   /*
+* The specification recommends a 3 seconds FLR reset timeout. To be
+* cautious, we will extend this to 9 seconds, three times the specified
+* timeout.
+*/
+   flr_timeout_ms = 9000;
+
/*
 * Make sure any pending FLR requests have cleared by waiting for the
 * FLR trigger bit to go to zero. Also clear GU_DEBUG's DRIVERFLR_STATUS
-- 
2.43.0



[PATCH 0/2] Don't be alarmed at FLR timeouts

2024-05-17 Thread Andi Shyti
Hi,

often, on new platforms or firmware updates, we receive reports
of FLR timeout expiration and we shift the timeout we wait for
the reset to complete.

Let's not be alarmed if we reach a timeout while waiting for FLR
resets and print debugs rather than errors. The function is
anyway a void fucntions without any effect.

While at it, increase the timeout.

Thanks,
Andi

Andi Shyti (2):
  drm/i915: Increase FLR timeout from 3s to 9s
  drm/i915: Don't treat FLR resets as errors

 drivers/gpu/drm/i915/intel_uncore.c | 15 +++
 1 file changed, 11 insertions(+), 4 deletions(-)

-- 
2.43.0



✓ Fi.CI.BAT: success for drm/ci: uprev mesa/IGT and generate testlist

2024-05-17 Thread Patchwork
== Series Details ==

Series: drm/ci: uprev mesa/IGT and generate testlist
URL   : https://patchwork.freedesktop.org/series/133735/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14779 -> Patchwork_133735v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (44 -> 40)
--

  Missing(4): bat-dg1-7 bat-dg2-11 fi-cfl-8109u fi-snb-2520m 

Known issues


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

### IGT changes ###

 Possible fixes 

  * igt@gem_lmem_swapping@basic@lmem0:
- bat-dg2-8:  [FAIL][1] ([i915#10378]) -> [PASS][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/bat-dg2-8/igt@gem_lmem_swapping@ba...@lmem0.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133735v1/bat-dg2-8/igt@gem_lmem_swapping@ba...@lmem0.html

  * igt@i915_pm_rpm@module-reload:
- {bat-mtlp-9}:   [CRASH][3] ([i915#10911]) -> [PASS][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/bat-mtlp-9/igt@i915_pm_...@module-reload.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133735v1/bat-mtlp-9/igt@i915_pm_...@module-reload.html

  * igt@kms_flip@basic-flip-vs-modeset@b-dp7:
- {bat-mtlp-9}:   [DMESG-WARN][5] ([i915#10435]) -> [PASS][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/bat-mtlp-9/igt@kms_flip@basic-flip-vs-mode...@b-dp7.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133735v1/bat-mtlp-9/igt@kms_flip@basic-flip-vs-mode...@b-dp7.html

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

  [i915#10378]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10378
  [i915#10435]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10435
  [i915#10911]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10911
  [i915#11009]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11009


Build changes
-

  * Linux: CI_DRM_14779 -> Patchwork_133735v1

  CI-20190529: 20190529
  CI_DRM_14779: da27b39e5013fa07eda5623ee6b1ddadfc1e1dc3 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7860: 05b3f5540c6dcaacdf2169dc730c126df9ffd7e2 @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_133735v1: da27b39e5013fa07eda5623ee6b1ddadfc1e1dc3 @ 
git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133735v1/index.html


RE: [PATCH v8 3/7] drm/i915: Compute CMRR and calculate vtotal

2024-05-17 Thread Murthy, Arun R


> -Original Message-
> From: Intel-gfx  On Behalf Of Mitul
> Golani
> Sent: Thursday, May 9, 2024 1:28 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Shankar, Uma ; Nikula, Jani
> 
> Subject: [PATCH v8 3/7] drm/i915: Compute CMRR and calculate vtotal
> 
> Compute Fixed Average Vtotal/CMRR with resepect to userspace VRR
> enablement. Also calculate required parameters in case of CMRR is  enabled.
> During intel_vrr_compute_config, CMRR is getting enabled based on userspace
> has enabled Adaptive Sync Vtotal mode (Legacy VRR) or not. Make CMRR as
> small subset of FAVT mode, when Panle is running on Fixed refresh rate and on
> VRR framework then only enable CMRR to match with actual refresh rate.
> 
> --v2:
> - Update is_cmrr_frac_required function return as bool, not int. [Jani]
> - Use signed int math instead of unsigned in cmrr_get_vtotal2. [Jani]
> - Fix typo and usage of camel case in cmrr_get_vtotal. [Jani]
> - Use do_div in cmrr_get_vtotalwhile calculating cmrr_m. [ Jani]
> - Simplify cmrr and vrr compute config in intel_vrr_compute_config. [Jani]
> - Correct valiable name usage in is_cmrr_frac_required. [Ville]
> 
> --v3:
> - Removing RFC tag.
> 
> --v4:
> - Added edp check to address edp usecase for now. (ville)
> - Updated is_cmrr_fraction_required to more simplified calculation.
> - on longterm goal to be worked upon uapi as suggestion from ville.
> 
> --v5:
> - Correct vtotal paramas accuracy and add 2 digit precision.
> - Avoid using DIV_ROUND_UP and improve scanline precision.
> 
> --v6:
> - Make CMRR a small subset of FAVT mode.
> 
> Signed-off-by: Mitul Golani 
> ---
>  drivers/gpu/drm/i915/display/intel_display.c  |  1 +
>  .../drm/i915/display/intel_display_device.h   |  1 +
>  drivers/gpu/drm/i915/display/intel_vrr.c  | 99 ---
>  3 files changed, 89 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c
> b/drivers/gpu/drm/i915/display/intel_display.c
> index 4a5318ab017d..8a76db59c85f 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -5458,6 +5458,7 @@ intel_pipe_config_compare(const struct
> intel_crtc_state *current_config,
>   PIPE_CONF_CHECK_I(vrr.vsync_end);
>   PIPE_CONF_CHECK_LLI(cmrr.cmrr_m);
>   PIPE_CONF_CHECK_LLI(cmrr.cmrr_n);
> + PIPE_CONF_CHECK_BOOL(cmrr.enable);
>   }
> 
>  #undef PIPE_CONF_CHECK_X
> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h
> b/drivers/gpu/drm/i915/display/intel_display_device.h
> index 17ddf82f0b6e..b372b1acc19b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_device.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_device.h
> @@ -71,6 +71,7 @@ struct drm_printer;
> BIT(trans)) != 0)
>  #define HAS_VRR(i915)(DISPLAY_VER(i915) >= 11)
>  #define HAS_AS_SDP(i915) (DISPLAY_VER(i915) >= 13)
> +#define HAS_CMRR(i915)   (DISPLAY_VER(i915) >= 20)
>  #define INTEL_NUM_PIPES(i915)
>   (hweight8(DISPLAY_RUNTIME_INFO(i915)->pipe_mask))
>  #define I915_HAS_HOTPLUG(i915)   (DISPLAY_INFO(i915)-
> >has_hotplug)
>  #define OVERLAY_NEEDS_PHYSICAL(i915) (DISPLAY_INFO(i915)-
> >overlay_needs_physical)
> diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c
> b/drivers/gpu/drm/i915/display/intel_vrr.c
> index 83ae56d22b5f..f5ba87fa00fe 100644
> --- a/drivers/gpu/drm/i915/display/intel_vrr.c
> +++ b/drivers/gpu/drm/i915/display/intel_vrr.c
> @@ -11,6 +11,9 @@
>  #include "intel_vrr.h"
>  #include "intel_dp.h"
> 
> +#define FIXED_POINT_PRECISION100
> +#define CMRR_PRECISION_TOLERANCE 10
> +
>  bool intel_vrr_is_capable(struct intel_connector *connector)  {
>   const struct drm_display_info *info = >base.display_info;
> @@ -106,6 +109,59 @@ int intel_vrr_vmax_vblank_start(const struct
> intel_crtc_state *crtc_state)
>   return crtc_state->vrr.vmax - intel_vrr_vblank_exit_length(crtc_state);
>  }
> 
> +static bool
> +is_cmrr_frac_required(struct intel_crtc_state *crtc_state, bool is_edp)
> +{
> + int calculated_refresh_k, actual_refresh_k, pixel_clock_per_line;
> + struct drm_display_mode *adjusted_mode = _state-
> >hw.adjusted_mode;
> + struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
> +
> + if (!(HAS_CMRR(i915) && is_edp))
> + return false;
> +
> + actual_refresh_k =
> + drm_mode_vrefresh(adjusted_mode) *
> FIXED_POINT_PRECISION;
> + pixel_clock_per_line =
> + adjusted_mode->crtc_clock * 1000 / adjusted_mode-
> >crtc_htotal;
> + calculated_refresh_k =
> + pixel_clock_per_line * FIXED_POINT_PRECISION /
> +adjusted_mode->crtc_vtotal;
> +
> + if ((actual_refresh_k - calculated_refresh_k) <
> CMRR_PRECISION_TOLERANCE)
> + return false;
> +
> + return true;
> +}
> +
> +static unsigned int
> 

Re: [PATCH] drm/i915/gt: Fix CCS id's calculation for CCS mode setting

2024-05-17 Thread Andi Shyti
Hi,

On Fri, May 17, 2024 at 11:06:16AM +0200, Andi Shyti wrote:
> The whole point of the previous fixes has been to change the CCS
> hardware configuration to generate only one stream available to
> the compute users. We did this by changing the info.engine_mask
> that is set during device probe, reset during the detection of
> the fused engines, and finally reset again when choosing the CCS
> mode.
> 
> We can't use the engine_mask variable anymore, as with the
> current configuration, it imposes only one CCS no matter what the
> hardware configuration is.
> 
> Before changing the engine_mask for the third time, save it and
> use it for calculating the CCS mode.
> 
> After the previous changes, the user reported a performance drop
> to around 1/4. We have tested that the compute operations, with
> the current patch, have improved by the same factor.
> 
> Fixes: 6db31251bb26 ("drm/i915/gt: Enable only one CCS for compute workload")
> Cc: Chris Wilson 
> Cc: Gnattu OC 
> Cc: Joonas Lahtinen 
> Cc: Matt Roper 
> Tested-by: Jian Ye 

of course:

Signed-off-by: Andi Shyti 

Andi


Re: [PATCH] drm/i915/selftests: Set always_coherent to false when reading from CPU

2024-05-17 Thread Andi Shyti
Hi Nirmoy,

On Thu, May 16, 2024 at 05:14:03PM +0200, Nirmoy Das wrote:
> The previous commit 'commit 8d4ba9fc1c6c ("drm/i915/selftests: Pick
> correct caching mode.")' was not complete as for non LLC  sharing platforms
> cpu read can happen from LLC which probably doesn't have the latest
> changes made by GPU.
> 
> Cc: Andi Shyti 
> Cc: Janusz Krzysztofik 
> Cc: Jonathan Cavitt 
> Signed-off-by: Nirmoy Das 

you can add:

Reviewed-by: Andi Shyti 

Thanks,
Andi


✗ Fi.CI.IGT: failure for drm/probe-helper: Call drm_mode_validate_ycbcr420() before connector->mode_valid() (rev3)

2024-05-17 Thread Patchwork
== Series Details ==

Series: drm/probe-helper: Call drm_mode_validate_ycbcr420() before 
connector->mode_valid() (rev3)
URL   : https://patchwork.freedesktop.org/series/133709/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14777_full -> Patchwork_133709v3_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_133709v3_full absolutely need 
to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_133709v3_full, please notify your bug team 
(i915-ci-in...@lists.freedesktop.org) to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (9 -> 10)
--

  Additional (1): shard-snb-0 

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_clear:
- shard-mtlp: [PASS][1] -> [ABORT][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14777/shard-mtlp-8/igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_clear.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133709v3/shard-mtlp-3/igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_clear.html

  * igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_range_bias:
- shard-mtlp: [PASS][3] -> [DMESG-FAIL][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14777/shard-mtlp-8/igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_range_bias.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133709v3/shard-mtlp-3/igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_range_bias.html

  * igt@i915_pm_rps@reset:
- shard-tglu: [PASS][5] -> [INCOMPLETE][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14777/shard-tglu-10/igt@i915_pm_...@reset.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133709v3/shard-tglu-3/igt@i915_pm_...@reset.html

  * igt@kms_cursor_legacy@single-bo@pipe-a:
- shard-tglu: [PASS][7] -> [DMESG-WARN][8]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14777/shard-tglu-8/igt@kms_cursor_legacy@single...@pipe-a.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133709v3/shard-tglu-8/igt@kms_cursor_legacy@single...@pipe-a.html

  
 Warnings 

  * igt@kms_big_fb@x-tiled-8bpp-rotate-90:
- shard-tglu: [SKIP][9] -> [INCOMPLETE][10]
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14777/shard-tglu-10/igt@kms_big...@x-tiled-8bpp-rotate-90.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133709v3/shard-tglu-3/igt@kms_big...@x-tiled-8bpp-rotate-90.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@drm_fdinfo@all-busy-idle-check-all:
- shard-dg1:  NOTRUN -> [SKIP][11] ([i915#8414])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133709v3/shard-dg1-14/igt@drm_fdi...@all-busy-idle-check-all.html

  * igt@drm_fdinfo@most-busy-idle-check-all@ccs0:
- shard-mtlp: NOTRUN -> [SKIP][12] ([i915#8414]) +5 other tests skip
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133709v3/shard-mtlp-4/igt@drm_fdinfo@most-busy-idle-check-...@ccs0.html

  * igt@gem_caching@reads:
- shard-mtlp: NOTRUN -> [SKIP][13] ([i915#4873])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133709v3/shard-mtlp-4/igt@gem_cach...@reads.html

  * igt@gem_ccs@block-copy-compressed:
- shard-dg1:  NOTRUN -> [SKIP][14] ([i915#3555] / [i915#9323])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133709v3/shard-dg1-14/igt@gem_...@block-copy-compressed.html

  * igt@gem_ccs@block-multicopy-compressed:
- shard-rkl:  NOTRUN -> [SKIP][15] ([i915#9323])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133709v3/shard-rkl-4/igt@gem_...@block-multicopy-compressed.html
- shard-dg1:  NOTRUN -> [SKIP][16] ([i915#9323])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133709v3/shard-dg1-17/igt@gem_...@block-multicopy-compressed.html

  * igt@gem_ctx_persistence@legacy-engines-mixed:
- shard-snb:  NOTRUN -> [SKIP][17] ([i915#1099])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133709v3/shard-snb4/igt@gem_ctx_persiste...@legacy-engines-mixed.html

  * igt@gem_ctx_sseu@mmap-args:
- shard-rkl:  NOTRUN -> [SKIP][18] ([i915#280])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133709v3/shard-rkl-3/igt@gem_ctx_s...@mmap-args.html

  * igt@gem_eio@kms:
- shard-tglu: [PASS][19] -> [INCOMPLETE][20] ([i915#10513])
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14777/shard-tglu-5/igt@gem_...@kms.html
   [20]: 

✓ Fi.CI.BAT: success for drm/i915/gt: Fix CCS id's calculation for CCS mode setting

2024-05-17 Thread Patchwork
== Series Details ==

Series: drm/i915/gt: Fix CCS id's calculation for CCS mode setting
URL   : https://patchwork.freedesktop.org/series/133732/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14779 -> Patchwork_133732v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (44 -> 38)
--

  Missing(6): bat-mtlp-9 fi-bsw-n3050 fi-snb-2520m bat-jsl-3 bat-dg2-11 
bat-arls-3 

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@i915_selftest@live@gem_contexts:
- bat-mtlp-6: [PASS][1] -> [DMESG-FAIL][2] ([i915#10262]) +20 other 
tests dmesg-fail
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/bat-mtlp-6/igt@i915_selftest@live@gem_contexts.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133732v1/bat-mtlp-6/igt@i915_selftest@live@gem_contexts.html

  
 Possible fixes 

  * igt@gem_lmem_swapping@basic@lmem0:
- bat-dg2-8:  [FAIL][3] ([i915#10378]) -> [PASS][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/bat-dg2-8/igt@gem_lmem_swapping@ba...@lmem0.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133732v1/bat-dg2-8/igt@gem_lmem_swapping@ba...@lmem0.html

  
  [i915#10262]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10262
  [i915#10378]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10378


Build changes
-

  * Linux: CI_DRM_14779 -> Patchwork_133732v1

  CI-20190529: 20190529
  CI_DRM_14779: da27b39e5013fa07eda5623ee6b1ddadfc1e1dc3 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7860: 05b3f5540c6dcaacdf2169dc730c126df9ffd7e2 @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_133732v1: da27b39e5013fa07eda5623ee6b1ddadfc1e1dc3 @ 
git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133732v1/index.html


✗ Fi.CI.IGT: failure for drm/i915: Bump max TMDS bitrate to 6 Gbps on ADL/DG2+

2024-05-17 Thread Patchwork
== Series Details ==

Series: drm/i915: Bump max TMDS bitrate to 6 Gbps on ADL/DG2+
URL   : https://patchwork.freedesktop.org/series/133716/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14777_full -> Patchwork_133716v1_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_133716v1_full absolutely need 
to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_133716v1_full, please notify your bug team 
(i915-ci-in...@lists.freedesktop.org) 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_133716v1/index.html

Participating hosts (9 -> 9)
--

  No changes in participating hosts

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@i915_selftest@live@gt_pm:
- shard-glk:  [PASS][1] -> [DMESG-FAIL][2] +1 other test dmesg-fail
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14777/shard-glk3/igt@i915_selftest@live@gt_pm.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133716v1/shard-glk6/igt@i915_selftest@live@gt_pm.html

  * igt@kms_big_fb@4-tiled-max-hw-stride-32bpp-rotate-0-hflip:
- shard-dg2:  [PASS][3] -> [INCOMPLETE][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14777/shard-dg2-11/igt@kms_big...@4-tiled-max-hw-stride-32bpp-rotate-0-hflip.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133716v1/shard-dg2-7/igt@kms_big...@4-tiled-max-hw-stride-32bpp-rotate-0-hflip.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@api_intel_bb@blit-reloc-purge-cache:
- shard-dg1:  NOTRUN -> [SKIP][5] ([i915#8411])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133716v1/shard-dg1-13/igt@api_intel...@blit-reloc-purge-cache.html

  * igt@device_reset@unbind-cold-reset-rebind:
- shard-dg1:  NOTRUN -> [SKIP][6] ([i915#11078])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133716v1/shard-dg1-13/igt@device_re...@unbind-cold-reset-rebind.html

  * igt@drm_fdinfo@most-busy-check-all@bcs0:
- shard-dg2:  NOTRUN -> [SKIP][7] ([i915#8414]) +6 other tests skip
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133716v1/shard-dg2-7/igt@drm_fdinfo@most-busy-check-...@bcs0.html

  * igt@drm_fdinfo@most-busy-idle-check-all@ccs0:
- shard-mtlp: NOTRUN -> [SKIP][8] ([i915#8414]) +5 other tests skip
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133716v1/shard-mtlp-1/igt@drm_fdinfo@most-busy-idle-check-...@ccs0.html

  * igt@gem_basic@multigpu-create-close:
- shard-dg2:  NOTRUN -> [SKIP][9] ([i915#7697])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133716v1/shard-dg2-7/igt@gem_ba...@multigpu-create-close.html

  * igt@gem_caching@reads:
- shard-mtlp: NOTRUN -> [SKIP][10] ([i915#4873])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133716v1/shard-mtlp-1/igt@gem_cach...@reads.html

  * igt@gem_ccs@block-multicopy-compressed:
- shard-dg1:  NOTRUN -> [SKIP][11] ([i915#9323])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133716v1/shard-dg1-17/igt@gem_...@block-multicopy-compressed.html

  * igt@gem_ctx_persistence@hang:
- shard-dg1:  NOTRUN -> [SKIP][12] ([i915#8555])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133716v1/shard-dg1-13/igt@gem_ctx_persiste...@hang.html

  * igt@gem_ctx_persistence@legacy-engines-mixed:
- shard-snb:  NOTRUN -> [SKIP][13] ([i915#1099])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133716v1/shard-snb5/igt@gem_ctx_persiste...@legacy-engines-mixed.html

  * igt@gem_exec_balancer@bonded-false-hang:
- shard-dg1:  NOTRUN -> [SKIP][14] ([i915#4812]) +1 other test skip
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133716v1/shard-dg1-17/igt@gem_exec_balan...@bonded-false-hang.html

  * igt@gem_exec_balancer@bonded-true-hang:
- shard-mtlp: NOTRUN -> [SKIP][15] ([i915#4812])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133716v1/shard-mtlp-4/igt@gem_exec_balan...@bonded-true-hang.html

  * igt@gem_exec_balancer@noheartbeat:
- shard-dg2:  NOTRUN -> [SKIP][16] ([i915#8555])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133716v1/shard-dg2-7/igt@gem_exec_balan...@noheartbeat.html

  * igt@gem_exec_fair@basic-none-share:
- shard-dg1:  NOTRUN -> [SKIP][17] ([i915#3539] / [i915#4852]) +1 
other test skip
   [17]: 

✗ Fi.CI.CHECKPATCH: warning for drm/ci: uprev mesa/IGT and generate testlist

2024-05-17 Thread Patchwork
== Series Details ==

Series: drm/ci: uprev mesa/IGT and generate testlist
URL   : https://patchwork.freedesktop.org/series/133735/
State : warning

== Summary ==

Error: dim checkpatch failed
f4f172f649c7 drm/ci: uprev mesa version
34b9ee949713 drm/ci: generate testlist from build
-:100: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does 
MAINTAINERS need updating?
#100: 
deleted file mode 100644

total: 0 errors, 1 warnings, 0 checks, 76 lines checked
2ae51618e33e drm/ci: build virtual GPU driver as module
f8399975f3b6 drm/ci: uprev IGT
b1a607e8a327 drm/ci: skip driver specific tests
-:168: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does 
MAINTAINERS need updating?
#168: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 285 lines checked
de1812520818 drm/ci: update xfails for the new testlist
-:211: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does 
MAINTAINERS need updating?
#211: 
new file mode 100644

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




Re: [PATCH] tracing/treewide: Remove second parameter of __assign_str()

2024-05-17 Thread Takashi Iwai
On Thu, 16 May 2024 19:34:54 +0200,
Steven Rostedt wrote:
> 
> From: "Steven Rostedt (Google)" 
> 
> [
>This is a treewide change. I will likely re-create this patch again in
>the second week of the merge window of v6.10 and submit it then. Hoping
>to keep the conflicts that it will cause to a minimum.
> ]
> 
> With the rework of how the __string() handles dynamic strings where it
> saves off the source string in field in the helper structure[1], the
> assignment of that value to the trace event field is stored in the helper
> value and does not need to be passed in again.
> 
> This means that with:
> 
>   __string(field, mystring)
> 
> Which use to be assigned with __assign_str(field, mystring), no longer
> needs the second parameter and it is unused. With this, __assign_str()
> will now only get a single parameter.
> 
> There's over 700 users of __assign_str() and because coccinelle does not
> handle the TRACE_EVENT() macro I ended up using the following sed script:
> 
>   git grep -l __assign_str | while read a ; do
>   sed -e 's/\(__assign_str([^,]*[^ ,]\) *,[^;]*/\1)/' $a > /tmp/test-file;
>   mv /tmp/test-file $a;
>   done
> 
> I then searched for __assign_str() that did not end with ';' as those
> were multi line assignments that the sed script above would fail to catch.
> 
> Note, the same updates will need to be done for:
> 
>   __assign_str_len()
>   __assign_rel_str()
>   __assign_rel_str_len()
> 
> I tested this with both an allmodconfig and an allyesconfig (build only for 
> both).
> 
> [1] 
> https://lore.kernel.org/linux-trace-kernel/2024011442.634192...@goodmis.org/
> 
> Cc: Masami Hiramatsu 
> Cc: Mathieu Desnoyers 
> Cc: Linus Torvalds 
> Cc: Julia Lawall 
> Signed-off-by: Steven Rostedt (Google) 

For the sound part
Acked-by: Takashi Iwai 


thanks,

Takashi


Re: [PATCH] tracing/treewide: Remove second parameter of __assign_str()

2024-05-17 Thread Rafael J. Wysocki
On Thu, May 16, 2024 at 7:35 PM Steven Rostedt  wrote:
>
> From: "Steven Rostedt (Google)" 
>
> [
>This is a treewide change. I will likely re-create this patch again in
>the second week of the merge window of v6.10 and submit it then. Hoping
>to keep the conflicts that it will cause to a minimum.
> ]
>
> With the rework of how the __string() handles dynamic strings where it
> saves off the source string in field in the helper structure[1], the
> assignment of that value to the trace event field is stored in the helper
> value and does not need to be passed in again.
>
> This means that with:
>
>   __string(field, mystring)
>
> Which use to be assigned with __assign_str(field, mystring), no longer
> needs the second parameter and it is unused. With this, __assign_str()
> will now only get a single parameter.
>
> There's over 700 users of __assign_str() and because coccinelle does not
> handle the TRACE_EVENT() macro I ended up using the following sed script:
>
>   git grep -l __assign_str | while read a ; do
>   sed -e 's/\(__assign_str([^,]*[^ ,]\) *,[^;]*/\1)/' $a > /tmp/test-file;
>   mv /tmp/test-file $a;
>   done
>
> I then searched for __assign_str() that did not end with ';' as those
> were multi line assignments that the sed script above would fail to catch.
>
> Note, the same updates will need to be done for:
>
>   __assign_str_len()
>   __assign_rel_str()
>   __assign_rel_str_len()
>
> I tested this with both an allmodconfig and an allyesconfig (build only for 
> both).
>
> [1] 
> https://lore.kernel.org/linux-trace-kernel/2024011442.634192...@goodmis.org/
>
> Cc: Masami Hiramatsu 
> Cc: Mathieu Desnoyers 
> Cc: Linus Torvalds 
> Cc: Julia Lawall 
> Signed-off-by: Steven Rostedt (Google) 

Acked-by: Rafael J. Wysocki  # for thermal


✗ Fi.CI.BUILD: failure for arch: Fix name collision with ACPI's video.o

2024-05-17 Thread Patchwork
== Series Details ==

Series: arch: Fix name collision with ACPI's video.o
URL   : https://patchwork.freedesktop.org/series/133734/
State : failure

== Summary ==

Error: patch 
https://patchwork.freedesktop.org/api/1.0/series/133734/revisions/1/mbox/ not 
applied
Applying: arch: Fix name collision with ACPI's video.o
error: mode change for arch/sparc/video/video.c, which is not in current HEAD
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 arch: Fix name collision with ACPI's video.o
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Build failed, no error log produced




✗ Fi.CI.SPARSE: warning for drm/i915/gt: Fix CCS id's calculation for CCS mode setting

2024-05-17 Thread Patchwork
== Series Details ==

Series: drm/i915/gt: Fix CCS id's calculation for CCS mode setting
URL   : https://patchwork.freedesktop.org/series/133732/
State : warning

== Summary ==

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




✗ Fi.CI.CHECKPATCH: warning for drm/i915/gt: Fix CCS id's calculation for CCS mode setting

2024-05-17 Thread Patchwork
== Series Details ==

Series: drm/i915/gt: Fix CCS id's calculation for CCS mode setting
URL   : https://patchwork.freedesktop.org/series/133732/
State : warning

== Summary ==

Error: dim checkpatch failed
149a7fb4a88d drm/i915/gt: Fix CCS id's calculation for CCS mode setting
-:79: ERROR:MISSING_SIGN_OFF: Missing Signed-off-by: line(s)

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




[PATCH v2 6/6] drm/ci: update xfails for the new testlist

2024-05-17 Thread Vignesh Raman
Now the testlist is used from IGT build, so update
xfails with the new testlist.

Set the timeout of all i915 jobs to 1h30m since some jobs
takes more than 1 hour to complete.

Signed-off-by: Vignesh Raman 
---

v2:
  - Set the timeout of all i915 jobs to 1h30m and updated expectations file.

---
 drivers/gpu/drm/ci/test.yml   |   6 +-
 .../gpu/drm/ci/xfails/amdgpu-stoney-fails.txt |  41 ++--
 .../drm/ci/xfails/amdgpu-stoney-flakes.txt|   6 +
 .../gpu/drm/ci/xfails/amdgpu-stoney-skips.txt |  18 ++
 drivers/gpu/drm/ci/xfails/i915-amly-fails.txt |  31 
 .../gpu/drm/ci/xfails/i915-amly-flakes.txt|   8 +
 drivers/gpu/drm/ci/xfails/i915-amly-skips.txt |  11 ++
 drivers/gpu/drm/ci/xfails/i915-apl-fails.txt  |  46 +++--
 drivers/gpu/drm/ci/xfails/i915-apl-flakes.txt |   5 +
 drivers/gpu/drm/ci/xfails/i915-apl-skips.txt  |  15 ++
 drivers/gpu/drm/ci/xfails/i915-cml-fails.txt  |  38 
 drivers/gpu/drm/ci/xfails/i915-cml-flakes.txt |   5 +
 drivers/gpu/drm/ci/xfails/i915-cml-skips.txt  |  14 ++
 drivers/gpu/drm/ci/xfails/i915-glk-fails.txt  |  41 +++-
 drivers/gpu/drm/ci/xfails/i915-glk-flakes.txt |   6 +
 drivers/gpu/drm/ci/xfails/i915-glk-skips.txt  |  15 ++
 drivers/gpu/drm/ci/xfails/i915-kbl-fails.txt  |  42 ++---
 drivers/gpu/drm/ci/xfails/i915-kbl-flakes.txt |   6 +-
 drivers/gpu/drm/ci/xfails/i915-kbl-skips.txt  |  25 +++
 drivers/gpu/drm/ci/xfails/i915-tgl-fails.txt  |  77 
 drivers/gpu/drm/ci/xfails/i915-tgl-skips.txt  |  16 ++
 drivers/gpu/drm/ci/xfails/i915-whl-fails.txt  |  63 ---
 drivers/gpu/drm/ci/xfails/i915-whl-flakes.txt |   5 +
 drivers/gpu/drm/ci/xfails/i915-whl-skips.txt  |  11 ++
 .../drm/ci/xfails/mediatek-mt8173-fails.txt   |  30 ++-
 .../drm/ci/xfails/mediatek-mt8173-flakes.txt  |  10 +
 .../drm/ci/xfails/mediatek-mt8173-skips.txt   |   4 +
 .../drm/ci/xfails/mediatek-mt8183-fails.txt   |  21 +--
 .../drm/ci/xfails/mediatek-mt8183-skips.txt   |   4 +
 .../gpu/drm/ci/xfails/meson-g12b-fails.txt|  24 +--
 .../gpu/drm/ci/xfails/meson-g12b-skips.txt|   4 +
 .../gpu/drm/ci/xfails/msm-apq8016-fails.txt   |  12 +-
 .../gpu/drm/ci/xfails/msm-apq8016-skips.txt   |   4 +
 .../gpu/drm/ci/xfails/msm-apq8096-fails.txt   |   7 +
 .../gpu/drm/ci/xfails/msm-apq8096-flakes.txt  |   5 +
 .../gpu/drm/ci/xfails/msm-apq8096-skips.txt   |  12 ++
 .../msm-sc7180-trogdor-kingoftown-fails.txt   | 175 +-
 .../msm-sc7180-trogdor-kingoftown-flakes.txt  |   7 +
 .../msm-sc7180-trogdor-kingoftown-skips.txt   |   7 +
 ...sm-sc7180-trogdor-lazor-limozeen-fails.txt | 175 +-
 ...m-sc7180-trogdor-lazor-limozeen-flakes.txt |   5 +
 ...sm-sc7180-trogdor-lazor-limozeen-skips.txt |   4 +
 .../gpu/drm/ci/xfails/msm-sdm845-fails.txt|  38 +---
 .../gpu/drm/ci/xfails/msm-sdm845-flakes.txt   |  26 ++-
 .../gpu/drm/ci/xfails/msm-sdm845-skips.txt|   7 +
 .../drm/ci/xfails/rockchip-rk3288-fails.txt   |  62 +--
 .../drm/ci/xfails/rockchip-rk3288-skips.txt   |   4 +
 .../drm/ci/xfails/rockchip-rk3399-fails.txt   |  83 +
 .../drm/ci/xfails/rockchip-rk3399-flakes.txt  |  12 +-
 .../drm/ci/xfails/rockchip-rk3399-skips.txt   |   4 +
 drivers/gpu/drm/ci/xfails/update-xfails.py|   4 +-
 .../drm/ci/xfails/virtio_gpu-none-fails.txt   |  94 +++---
 .../drm/ci/xfails/virtio_gpu-none-skips.txt   |   4 +
 53 files changed, 1010 insertions(+), 389 deletions(-)
 create mode 100644 drivers/gpu/drm/ci/xfails/i915-amly-flakes.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/i915-apl-flakes.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/i915-cml-flakes.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/i915-glk-flakes.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/i915-whl-flakes.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/mediatek-mt8173-flakes.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/msm-apq8096-flakes.txt
 create mode 100644 
drivers/gpu/drm/ci/xfails/msm-sc7180-trogdor-kingoftown-flakes.txt
 create mode 100644 
drivers/gpu/drm/ci/xfails/msm-sc7180-trogdor-lazor-limozeen-flakes.txt

diff --git a/drivers/gpu/drm/ci/test.yml b/drivers/gpu/drm/ci/test.yml
index 864ac3809d84..7c33bee0b80a 100644
--- a/drivers/gpu/drm/ci/test.yml
+++ b/drivers/gpu/drm/ci/test.yml
@@ -186,6 +186,7 @@ rockchip:rk3399:
   extends:
 - .lava-igt:x86_64
   stage: i915
+  timeout: "1h30m"
   variables:
 DRIVER_NAME: i915
 DTB: ""
@@ -196,7 +197,6 @@ i915:apl:
   extends:
 - .i915
   parallel: 3
-  timeout: "1h30m"
   variables:
 DEVICE_TYPE: asus-C523NA-A20057-coral
 GPU_VERSION: apl
@@ -206,7 +206,6 @@ i915:glk:
   extends:
 - .i915
   parallel: 2
-  timeout: "1h30m"
   variables:
 DEVICE_TYPE: hp-x360-12b-ca0010nr-n4020-octopus
 GPU_VERSION: glk
@@ -216,7 +215,6 @@ i915:amly:
   extends:
 - .i915
   parallel: 2
-  timeout: "1h30m"
   variables:
 DEVICE_TYPE: asus-C433TA-AJ0005-rammus
 GPU_VERSION: amly
@@ -235,7 +233,6 @@ i915:whl:
   extends:
 - .i915
   parallel: 2
-  timeout: "1h30m"
   

[PATCH v2 5/6] drm/ci: skip driver specific tests

2024-05-17 Thread Vignesh Raman
Skip driver specific tests and skip kms tests for
panfrost driver since it is not a kms driver.

Signed-off-by: Vignesh Raman 
---

v2:
  - Skip xe tests for amdgpu and virtio.

---
 .../gpu/drm/ci/xfails/amdgpu-stoney-skips.txt   | 15 ++-
 drivers/gpu/drm/ci/xfails/i915-amly-skips.txt   | 11 ++-
 drivers/gpu/drm/ci/xfails/i915-apl-skips.txt| 11 ++-
 drivers/gpu/drm/ci/xfails/i915-cml-skips.txt|  9 +
 drivers/gpu/drm/ci/xfails/i915-glk-skips.txt| 11 ++-
 drivers/gpu/drm/ci/xfails/i915-kbl-skips.txt| 11 ++-
 drivers/gpu/drm/ci/xfails/i915-tgl-skips.txt| 11 ++-
 drivers/gpu/drm/ci/xfails/i915-whl-skips.txt| 11 ++-
 .../gpu/drm/ci/xfails/mediatek-mt8173-skips.txt | 12 
 .../gpu/drm/ci/xfails/mediatek-mt8183-skips.txt | 14 ++
 drivers/gpu/drm/ci/xfails/meson-g12b-skips.txt  | 14 ++
 drivers/gpu/drm/ci/xfails/msm-apq8016-skips.txt | 11 +++
 drivers/gpu/drm/ci/xfails/msm-apq8096-skips.txt | 14 +-
 .../msm-sc7180-trogdor-kingoftown-skips.txt | 12 
 .../msm-sc7180-trogdor-lazor-limozeen-skips.txt | 12 
 drivers/gpu/drm/ci/xfails/msm-sdm845-skips.txt  | 12 
 .../gpu/drm/ci/xfails/rockchip-rk3288-skips.txt | 17 -
 .../gpu/drm/ci/xfails/rockchip-rk3399-skips.txt | 15 +++
 .../gpu/drm/ci/xfails/virtio_gpu-none-skips.txt | 16 +++-
 19 files changed, 229 insertions(+), 10 deletions(-)
 create mode 100644 drivers/gpu/drm/ci/xfails/mediatek-mt8173-skips.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/mediatek-mt8183-skips.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/meson-g12b-skips.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/msm-apq8016-skips.txt

diff --git a/drivers/gpu/drm/ci/xfails/amdgpu-stoney-skips.txt 
b/drivers/gpu/drm/ci/xfails/amdgpu-stoney-skips.txt
index e2c538a0f954..21d26d5e67c2 100644
--- a/drivers/gpu/drm/ci/xfails/amdgpu-stoney-skips.txt
+++ b/drivers/gpu/drm/ci/xfails/amdgpu-stoney-skips.txt
@@ -1,2 +1,15 @@
 # Suspend to RAM seems to be broken on this machine
-.*suspend.*
\ No newline at end of file
+.*suspend.*
+
+# Skip driver specific tests
+msm_.*
+nouveau_.*
+panfrost_.*
+^v3d.*
+^vc4.*
+^vmwgfx*
+
+# Skip intel specific tests
+gem_.*
+i915_.*
+xe_.*
diff --git a/drivers/gpu/drm/ci/xfails/i915-amly-skips.txt 
b/drivers/gpu/drm/ci/xfails/i915-amly-skips.txt
index fe55540a3f9a..1e80987cf584 100644
--- a/drivers/gpu/drm/ci/xfails/i915-amly-skips.txt
+++ b/drivers/gpu/drm/ci/xfails/i915-amly-skips.txt
@@ -1,4 +1,13 @@
 # Suspend to RAM seems to be broken on this machine
 .*suspend.*
 # This is generating kernel oops with divide error
-kms_plane_scaling@invalid-parameters
\ No newline at end of file
+kms_plane_scaling@invalid-parameters
+
+# Skip driver specific tests
+^amdgpu.*
+msm_.*
+nouveau_.*
+panfrost_.*
+^v3d.*
+^vc4.*
+^vmwgfx*
diff --git a/drivers/gpu/drm/ci/xfails/i915-apl-skips.txt 
b/drivers/gpu/drm/ci/xfails/i915-apl-skips.txt
index 3430b215c06e..0104f2ffa8ba 100644
--- a/drivers/gpu/drm/ci/xfails/i915-apl-skips.txt
+++ b/drivers/gpu/drm/ci/xfails/i915-apl-skips.txt
@@ -3,4 +3,13 @@
 # This is generating kernel oops with divide error
 kms_plane_scaling@invalid-parameters
 # This is cascading issues
-kms_3d
\ No newline at end of file
+kms_3d
+
+# Skip driver specific tests
+^amdgpu.*
+msm_.*
+nouveau_.*
+panfrost_.*
+^v3d.*
+^vc4.*
+^vmwgfx*
diff --git a/drivers/gpu/drm/ci/xfails/i915-cml-skips.txt 
b/drivers/gpu/drm/ci/xfails/i915-cml-skips.txt
index 6d3d7ddc377f..398ebe163ad0 100644
--- a/drivers/gpu/drm/ci/xfails/i915-cml-skips.txt
+++ b/drivers/gpu/drm/ci/xfails/i915-cml-skips.txt
@@ -1,2 +1,11 @@
 # This is generating kernel oops with divide error
 kms_plane_scaling@invalid-parameters
+
+# Skip driver specific tests
+^amdgpu.*
+msm_.*
+nouveau_.*
+panfrost_.*
+^v3d.*
+^vc4.*
+^vmwgfx*
diff --git a/drivers/gpu/drm/ci/xfails/i915-glk-skips.txt 
b/drivers/gpu/drm/ci/xfails/i915-glk-skips.txt
index 4c7d00ce14bc..4f5419d62170 100644
--- a/drivers/gpu/drm/ci/xfails/i915-glk-skips.txt
+++ b/drivers/gpu/drm/ci/xfails/i915-glk-skips.txt
@@ -2,4 +2,13 @@
 .*suspend.*
 
 # This is generating kernel oops with divide error
-kms_plane_scaling@invalid-parameters
\ No newline at end of file
+kms_plane_scaling@invalid-parameters
+
+# Skip driver specific tests
+^amdgpu.*
+msm_.*
+nouveau_.*
+panfrost_.*
+^v3d.*
+^vc4.*
+^vmwgfx*
diff --git a/drivers/gpu/drm/ci/xfails/i915-kbl-skips.txt 
b/drivers/gpu/drm/ci/xfails/i915-kbl-skips.txt
index 4c7d00ce14bc..4f5419d62170 100644
--- a/drivers/gpu/drm/ci/xfails/i915-kbl-skips.txt
+++ b/drivers/gpu/drm/ci/xfails/i915-kbl-skips.txt
@@ -2,4 +2,13 @@
 .*suspend.*
 
 # This is generating kernel oops with divide error
-kms_plane_scaling@invalid-parameters
\ No newline at end of file
+kms_plane_scaling@invalid-parameters
+
+# Skip driver specific tests
+^amdgpu.*
+msm_.*
+nouveau_.*
+panfrost_.*
+^v3d.*
+^vc4.*
+^vmwgfx*
diff 

[PATCH v2 4/6] drm/ci: uprev IGT

2024-05-17 Thread Vignesh Raman
test-list.txt and test-list-full.txt are not generated for
cross-builds and they are required by drm-ci for testing
arm32 targets.

This is fixed in igt-gpu-tools. So uprev IGT to include the
commit which fixes this issue. Disable building xe driver
tests for non-intel platforms.

Signed-off-by: Vignesh Raman 
---

v2:
  - Split IGT uprev to seperate patch.

---
 drivers/gpu/drm/ci/build-igt.sh  | 4 
 drivers/gpu/drm/ci/gitlab-ci.yml | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/ci/build-igt.sh b/drivers/gpu/drm/ci/build-igt.sh
index e62244728613..7aa3ce274c64 100644
--- a/drivers/gpu/drm/ci/build-igt.sh
+++ b/drivers/gpu/drm/ci/build-igt.sh
@@ -45,6 +45,10 @@ MESON_OPTIONS="-Doverlay=disabled\
-Dlibunwind=enabled   \
-Dprefix=/igt"
 
+if [[ "$KERNEL_ARCH" = "arm64" ]] || [[ "$KERNEL_ARCH" = "arm" ]]; then
+MESON_OPTIONS="$MESON_OPTIONS -Dxe_driver=disabled"
+fi
+
 mkdir -p /igt
 meson build $MESON_OPTIONS $EXTRA_MESON_ARGS
 ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1
diff --git a/drivers/gpu/drm/ci/gitlab-ci.yml b/drivers/gpu/drm/ci/gitlab-ci.yml
index 8f32de63d92e..1b29c3b6406b 100644
--- a/drivers/gpu/drm/ci/gitlab-ci.yml
+++ b/drivers/gpu/drm/ci/gitlab-ci.yml
@@ -5,7 +5,7 @@ variables:
   UPSTREAM_REPO: git://anongit.freedesktop.org/drm/drm
   TARGET_BRANCH: drm-next
 
-  IGT_VERSION: d2af13d9f5be5ce23d996e4afd3e45990f5ab977
+  IGT_VERSION: 0df7b9b97f9da0e364f5ee30fe331004b8c86b56
 
   DEQP_RUNNER_GIT_URL: https://gitlab.freedesktop.org/anholt/deqp-runner.git
   DEQP_RUNNER_GIT_TAG: v0.15.0
-- 
2.40.1



[PATCH v2 3/6] drm/ci: build virtual GPU driver as module

2024-05-17 Thread Vignesh Raman
With latest IGT, the tests tries to load the module and it
fails. So build the virtual GPU driver for virtio as module.

Signed-off-by: Vignesh Raman 
---

v2:
  - No changes.

---
 drivers/gpu/drm/ci/build.sh   | 1 -
 drivers/gpu/drm/ci/igt_runner.sh  | 6 +++---
 drivers/gpu/drm/ci/image-tags.yml | 4 ++--
 drivers/gpu/drm/ci/test.yml   | 1 +
 drivers/gpu/drm/ci/x86_64.config  | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/ci/build.sh b/drivers/gpu/drm/ci/build.sh
index a67871fdcd3f..e938074ac8e7 100644
--- a/drivers/gpu/drm/ci/build.sh
+++ b/drivers/gpu/drm/ci/build.sh
@@ -157,7 +157,6 @@ fi
 
 mkdir -p artifacts/install/lib
 mv install/* artifacts/install/.
-rm -rf artifacts/install/modules
 ln -s common artifacts/install/ci-common
 cp .config artifacts/${CI_JOB_NAME}_config
 
diff --git a/drivers/gpu/drm/ci/igt_runner.sh b/drivers/gpu/drm/ci/igt_runner.sh
index 20026612a9bd..55532f79fbdc 100755
--- a/drivers/gpu/drm/ci/igt_runner.sh
+++ b/drivers/gpu/drm/ci/igt_runner.sh
@@ -30,10 +30,10 @@ case "$DRIVER_NAME" in
 export IGT_FORCE_DRIVER="panfrost"
 fi
 ;;
-amdgpu)
+amdgpu|virtio_gpu)
 # Cannot use HWCI_KERNEL_MODULES as at that point we don't have the 
module in /lib
-mv /install/modules/lib/modules/* /lib/modules/.
-modprobe amdgpu
+mv /install/modules/lib/modules/* /lib/modules/. || true
+modprobe --first-time $DRIVER_NAME
 ;;
 esac
 
diff --git a/drivers/gpu/drm/ci/image-tags.yml 
b/drivers/gpu/drm/ci/image-tags.yml
index 60323ebc7304..328f5c560742 100644
--- a/drivers/gpu/drm/ci/image-tags.yml
+++ b/drivers/gpu/drm/ci/image-tags.yml
@@ -4,9 +4,9 @@ variables:
DEBIAN_BASE_TAG: "${CONTAINER_TAG}"
 
DEBIAN_X86_64_BUILD_IMAGE_PATH: "debian/x86_64_build"
-   DEBIAN_BUILD_TAG: "2023-10-08-config"
+   DEBIAN_BUILD_TAG: "2024-05-09-virtio"
 
-   KERNEL_ROOTFS_TAG: "2023-10-06-amd"
+   KERNEL_ROOTFS_TAG: "2024-05-09-virtio"
 
DEBIAN_X86_64_TEST_BASE_IMAGE: "debian/x86_64_test-base"
DEBIAN_X86_64_TEST_IMAGE_GL_PATH: "debian/x86_64_test-gl"
diff --git a/drivers/gpu/drm/ci/test.yml b/drivers/gpu/drm/ci/test.yml
index 612c9ede3507..864ac3809d84 100644
--- a/drivers/gpu/drm/ci/test.yml
+++ b/drivers/gpu/drm/ci/test.yml
@@ -350,6 +350,7 @@ virtio_gpu:none:
   script:
 - ln -sf $CI_PROJECT_DIR/install /install
 - mv install/bzImage /lava-files/bzImage
+- mkdir -p /lib/modules
 - mkdir -p $CI_PROJECT_DIR/results
 - ln -sf $CI_PROJECT_DIR/results /results
 - install/crosvm-runner.sh install/igt_runner.sh
diff --git a/drivers/gpu/drm/ci/x86_64.config b/drivers/gpu/drm/ci/x86_64.config
index 1cbd49a5b23a..78479f063e8e 100644
--- a/drivers/gpu/drm/ci/x86_64.config
+++ b/drivers/gpu/drm/ci/x86_64.config
@@ -91,7 +91,7 @@ CONFIG_KVM=y
 CONFIG_KVM_GUEST=y
 CONFIG_VIRT_DRIVERS=y
 CONFIG_VIRTIO_FS=y
-CONFIG_DRM_VIRTIO_GPU=y
+CONFIG_DRM_VIRTIO_GPU=m
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_VIRTIO_NET=y
 CONFIG_VIRTIO_CONSOLE=y
-- 
2.40.1



[PATCH v2 2/6] drm/ci: generate testlist from build

2024-05-17 Thread Vignesh Raman
Stop vendoring the testlist into the kernel. Instead, use the
testlist from the IGT build to ensure we do not miss renamed
or newly added tests.

Signed-off-by: Vignesh Raman 
---

v2:
  - Fix testlist generation for arm and arm64 builds.

---
 drivers/gpu/drm/ci/build-igt.sh  |   34 +
 drivers/gpu/drm/ci/igt_runner.sh |9 +-
 drivers/gpu/drm/ci/testlist.txt  | 2761 --
 3 files changed, 39 insertions(+), 2765 deletions(-)
 delete mode 100644 drivers/gpu/drm/ci/testlist.txt

diff --git a/drivers/gpu/drm/ci/build-igt.sh b/drivers/gpu/drm/ci/build-igt.sh
index 7859554756c4..e62244728613 100644
--- a/drivers/gpu/drm/ci/build-igt.sh
+++ b/drivers/gpu/drm/ci/build-igt.sh
@@ -3,6 +3,30 @@
 
 set -ex
 
+function generate_testlist {
+set +x
+while read -r line; do
+if [ "$line" = "TESTLIST" ] || [ "$line" = "END TESTLIST" ]; then
+continue
+fi
+
+tests=$(echo "$line" | tr ' ' '\n')
+
+for test in $tests; do
+output=$(/igt/libexec/igt-gpu-tools/"$test" --list-subtests || 
true)
+
+if [ -z "$output" ]; then
+echo "$test"
+else
+echo "$output" | while read -r subtest; do
+echo "$test@$subtest"
+done
+fi
+done
+done < /igt/libexec/igt-gpu-tools/test-list.txt > 
/igt/libexec/igt-gpu-tools/testlist.txt
+set -x
+}
+
 git clone https://gitlab.freedesktop.org/drm/igt-gpu-tools.git --single-branch 
--no-checkout
 cd igt-gpu-tools
 git checkout $IGT_VERSION
@@ -26,6 +50,16 @@ meson build $MESON_OPTIONS $EXTRA_MESON_ARGS
 ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1
 ninja -C build install
 
+if [[ "$KERNEL_ARCH" = "arm64" ]]; then
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/igt/lib/aarch64-linux-gnu
+elif [[ "$KERNEL_ARCH" = "arm" ]]; then
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/igt/lib
+else
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/igt/lib64
+fi
+
+generate_testlist
+
 mkdir -p artifacts/
 tar -cf artifacts/igt.tar /igt
 
diff --git a/drivers/gpu/drm/ci/igt_runner.sh b/drivers/gpu/drm/ci/igt_runner.sh
index f1a08b9b146f..20026612a9bd 100755
--- a/drivers/gpu/drm/ci/igt_runner.sh
+++ b/drivers/gpu/drm/ci/igt_runner.sh
@@ -59,25 +59,26 @@ fi
 
 curl -L --retry 4 -f --retry-all-errors --retry-delay 60 -s 
${FDO_HTTP_CACHE_URI:-}$PIPELINE_ARTIFACTS_BASE/$ARCH/igt.tar.gz | tar --zstd 
-v -x -C /
 
+TESTLIST="/igt/libexec/igt-gpu-tools/testlist.txt"
 
 # If the job is parallel at the gitab job level, take the corresponding 
fraction
 # of the caselist.
 if [ -n "$CI_NODE_INDEX" ]; then
-sed -ni $CI_NODE_INDEX~$CI_NODE_TOTAL"p" /install/testlist.txt
+sed -ni $CI_NODE_INDEX~$CI_NODE_TOTAL"p" $TESTLIST
 fi
 
 # core_getversion checks if the driver is loaded and probed correctly
 # so run it in all shards
-if ! grep -q "core_getversion" /install/testlist.txt; then
+if ! grep -q "core_getversion" $TESTLIST; then
 # Add the line to the file
-echo "core_getversion" >> /install/testlist.txt
+echo "core_getversion" >> $TESTLIST
 fi
 
 set +e
 igt-runner \
 run \
 --igt-folder /igt/libexec/igt-gpu-tools \
---caselist /install/testlist.txt \
+--caselist $TESTLIST \
 --output /results \
 $IGT_SKIPS \
 $IGT_FLAKES \
diff --git a/drivers/gpu/drm/ci/testlist.txt b/drivers/gpu/drm/ci/testlist.txt
deleted file mode 100644
index 3377f002f8c5..
--- a/drivers/gpu/drm/ci/testlist.txt
+++ /dev/null
@@ -1,2761 +0,0 @@
-core_auth@getclient-simple
-core_auth@getclient-master-drop
-core_auth@basic-auth
-core_auth@many-magics
-core_getclient
-core_getstats
-core_getversion
-core_setmaster_vs_auth
-drm_read@invalid-buffer
-drm_read@fault-buffer
-drm_read@empty-block
-drm_read@empty-nonblock
-drm_read@short-buffer-block
-drm_read@short-buffer-nonblock
-drm_read@short-buffer-wakeup
-gem_eio@throttle
-gem_eio@create
-gem_eio@create-ext
-gem_eio@context-create
-gem_eio@execbuf
-gem_eio@banned
-gem_eio@suspend
-gem_eio@hibernate
-gem_eio@in-flight-external
-gem_eio@in-flight-suspend
-gem_eio@reset-stress
-gem_eio@unwedge-stress
-gem_eio@wait-immediate
-gem_eio@wait-wedge-immediate
-gem_eio@in-flight-immediate
-gem_eio@in-flight-contexts-immediate
-gem_eio@in-flight-internal-immediate
-gem_eio@wait-1us
-gem_eio@wait-wedge-1us
-gem_eio@in-flight-1us
-gem_eio@in-flight-contexts-1us
-gem_eio@in-flight-internal-1us
-gem_eio@wait-10ms
-gem_eio@wait-wedge-10ms
-gem_eio@in-flight-10ms
-gem_eio@in-flight-contexts-10ms
-gem_eio@in-flight-internal-10ms
-gem_eio@kms
-kms_3d
-kms_addfb_basic@unused-handle
-kms_addfb_basic@unused-pitches
-kms_addfb_basic@unused-offsets
-kms_addfb_basic@unused-modifier
-kms_addfb_basic@clobberred-modifier
-kms_addfb_basic@invalid-smem-bo-on-discrete
-kms_addfb_basic@legacy-format
-kms_addfb_basic@no-handle
-kms_addfb_basic@basic
-kms_addfb_basic@bad-pitch-0
-kms_addfb_basic@bad-pitch-32
-kms_addfb_basic@bad-pitch-63

[PATCH v2 1/6] drm/ci: uprev mesa version

2024-05-17 Thread Vignesh Raman
zlib.net is not allowing tarball download anymore and results
in below error in kernel+rootfs_arm32 container build,
urllib.error.HTTPError: HTTP Error 403: Forbidden
urllib.error.HTTPError: HTTP Error 415: Unsupported Media Type

Uprev mesa to latest version which includes a fix for this issue.
https://gitlab.freedesktop.org/mesa/mesa/-/commit/908f444e

Use id_tokens for JWT authentication. Since s3 bucket is migrated to
mesa-rootfs, update the variables accordingly. Also copy helper scripts
to install, so that the ci jobs can use these scripts for logging.

Signed-off-by: Vignesh Raman 
---

v2:
  - Uprev to recent version and use id_tokens for JWT authentication

---
 drivers/gpu/drm/ci/build-igt.sh   |  2 +-
 drivers/gpu/drm/ci/build.sh   |  6 +++--
 drivers/gpu/drm/ci/container.yml  | 12 +++--
 drivers/gpu/drm/ci/gitlab-ci.yml  | 44 +--
 drivers/gpu/drm/ci/image-tags.yml |  2 +-
 drivers/gpu/drm/ci/lava-submit.sh |  4 +--
 drivers/gpu/drm/ci/test.yml   |  2 ++
 7 files changed, 44 insertions(+), 28 deletions(-)

diff --git a/drivers/gpu/drm/ci/build-igt.sh b/drivers/gpu/drm/ci/build-igt.sh
index 500fa4f5c30a..7859554756c4 100644
--- a/drivers/gpu/drm/ci/build-igt.sh
+++ b/drivers/gpu/drm/ci/build-igt.sh
@@ -32,4 +32,4 @@ tar -cf artifacts/igt.tar /igt
 # Pass needed files to the test stage
 S3_ARTIFACT_NAME="igt.tar.gz"
 gzip -c artifacts/igt.tar > ${S3_ARTIFACT_NAME}
-ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" ${S3_ARTIFACT_NAME} 
https://${PIPELINE_ARTIFACTS_BASE}/${KERNEL_ARCH}/${S3_ARTIFACT_NAME}
+ci-fairy s3cp --token-file "${S3_JWT_FILE}" ${S3_ARTIFACT_NAME} 
https://${PIPELINE_ARTIFACTS_BASE}/${KERNEL_ARCH}/${S3_ARTIFACT_NAME}
diff --git a/drivers/gpu/drm/ci/build.sh b/drivers/gpu/drm/ci/build.sh
index 106f2d40d222..a67871fdcd3f 100644
--- a/drivers/gpu/drm/ci/build.sh
+++ b/drivers/gpu/drm/ci/build.sh
@@ -128,6 +128,7 @@ fi
 # Pass needed files to the test stage
 mkdir -p install
 cp -rfv .gitlab-ci/* install/.
+cp -rfv ci/*  install/.
 cp -rfv install/common install/ci-common
 cp -rfv drivers/gpu/drm/ci/* install/.
 
@@ -141,14 +142,15 @@ if [[ "$UPLOAD_TO_MINIO" = "1" ]]; then
 FILES_TO_UPLOAD="$FILES_TO_UPLOAD $(basename -a $DEVICE_TREES)"
 fi
 
+ls -l "${S3_JWT_FILE}"
 for f in $FILES_TO_UPLOAD; do
-ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" /lava-files/$f \
+ci-fairy s3cp --token-file "${S3_JWT_FILE}" /lava-files/$f \
 https://${PIPELINE_ARTIFACTS_BASE}/${DEBIAN_ARCH}/$f
 done
 
 S3_ARTIFACT_NAME="kernel-files.tar.zst"
 tar --zstd -cf $S3_ARTIFACT_NAME install
-ci-fairy s3cp --token-file "${CI_JOB_JWT_FILE}" ${S3_ARTIFACT_NAME} 
https://${PIPELINE_ARTIFACTS_BASE}/${DEBIAN_ARCH}/${S3_ARTIFACT_NAME}
+ci-fairy s3cp --token-file "${S3_JWT_FILE}" ${S3_ARTIFACT_NAME} 
https://${PIPELINE_ARTIFACTS_BASE}/${DEBIAN_ARCH}/${S3_ARTIFACT_NAME}
 
 echo "Download vmlinux.xz from 
https://${PIPELINE_ARTIFACTS_BASE}/${DEBIAN_ARCH}/vmlinux.xz;
 fi
diff --git a/drivers/gpu/drm/ci/container.yml b/drivers/gpu/drm/ci/container.yml
index 9764e7921a4f..d6edf3635b23 100644
--- a/drivers/gpu/drm/ci/container.yml
+++ b/drivers/gpu/drm/ci/container.yml
@@ -36,15 +36,15 @@ debian/android_build:
   rules:
 - when: never
 
-debian/x86_64_test-android:
+.debian/x86_64_test-android:
   rules:
 - when: never
 
-windows_build_vs2019:
+windows_build_msvc:
   rules:
 - when: never
 
-windows_test_vs2019:
+windows_test_msvc:
   rules:
 - when: never
 
@@ -56,10 +56,6 @@ rustfmt:
rules:
 - when: never
 
-windows_vs2019:
-   rules:
-- when: never
-
-clang-format:
+windows_msvc:
rules:
 - when: never
\ No newline at end of file
diff --git a/drivers/gpu/drm/ci/gitlab-ci.yml b/drivers/gpu/drm/ci/gitlab-ci.yml
index 084e3ff8e3f4..8f32de63d92e 100644
--- a/drivers/gpu/drm/ci/gitlab-ci.yml
+++ b/drivers/gpu/drm/ci/gitlab-ci.yml
@@ -1,6 +1,6 @@
 variables:
   DRM_CI_PROJECT_PATH:  mesa/mesa
-  DRM_CI_COMMIT_SHA:  
9d162de9a05155e1c4041857a5848842749164cf
+  DRM_CI_COMMIT_SHA:  
e2b9c5a9e3e4f9b532067af8022eaef8d6fc6c00
 
   UPSTREAM_REPO: git://anongit.freedesktop.org/drm/drm
   TARGET_BRANCH: drm-next
@@ -19,33 +19,47 @@ variables:
   bash download-git-cache.sh
   rm download-git-cache.sh
   set +o xtrace
+  S3_JWT_FILE: /s3_jwt
   S3_HOST: s3.freedesktop.org
+  # This bucket is used to fetch the kernel image
+  S3_KERNEL_BUCKET: mesa-rootfs
+  # Bucket for git cache
+  S3_GITCACHE_BUCKET: git-cache
+  # Bucket for the pipeline artifacts pushed to S3
+  S3_ARTIFACTS_BUCKET: artifacts
   # per-pipeline artifact storage on MinIO
-  PIPELINE_ARTIFACTS_BASE: 
${S3_HOST}/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
+  PIPELINE_ARTIFACTS_BASE: 
${S3_HOST}/${S3_ARTIFACTS_BUCKET}/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}
   # per-job artifact storage on MinIO
   JOB_ARTIFACTS_BASE: ${PIPELINE_ARTIFACTS_BASE}/${CI_JOB_ID}
   # default kernel for rootfs before 

[PATCH v2 0/6] drm/ci: uprev mesa/IGT and generate testlist

2024-05-17 Thread Vignesh Raman
Uprev mesa and IGT to the latest version and stop vendoring the
testlist into the kernel. Instead, use the testlist from the
IGT build to ensure we do not miss renamed or newly added tests.
Update the xfails with the latest testlist run.

Also build virtual GPU driver for virtio as module.

The flakes list needs to be reported upsteam. Will send it
after this series is reviewed.

https://gitlab.freedesktop.org/vigneshraman/linux/-/pipelines/1179691

Vignesh Raman (6):
  drm/ci: uprev mesa version
  drm/ci: generate testlist from build
  drm/ci: build virtual GPU driver as module
  drm/ci: uprev IGT
  drm/ci: skip driver specific tests
  drm/ci: update xfails for the new testlist

 drivers/gpu/drm/ci/build-igt.sh   |   40 +-
 drivers/gpu/drm/ci/build.sh   |7 +-
 drivers/gpu/drm/ci/container.yml  |   12 +-
 drivers/gpu/drm/ci/gitlab-ci.yml  |   46 +-
 drivers/gpu/drm/ci/igt_runner.sh  |   15 +-
 drivers/gpu/drm/ci/image-tags.yml |6 +-
 drivers/gpu/drm/ci/lava-submit.sh |4 +-
 drivers/gpu/drm/ci/test.yml   |9 +-
 drivers/gpu/drm/ci/testlist.txt   | 2761 -
 drivers/gpu/drm/ci/x86_64.config  |2 +-
 .../gpu/drm/ci/xfails/amdgpu-stoney-fails.txt |   41 +-
 .../drm/ci/xfails/amdgpu-stoney-flakes.txt|6 +
 .../gpu/drm/ci/xfails/amdgpu-stoney-skips.txt |   33 +-
 drivers/gpu/drm/ci/xfails/i915-amly-fails.txt |   31 +
 .../gpu/drm/ci/xfails/i915-amly-flakes.txt|8 +
 drivers/gpu/drm/ci/xfails/i915-amly-skips.txt |   22 +-
 drivers/gpu/drm/ci/xfails/i915-apl-fails.txt  |   46 +-
 drivers/gpu/drm/ci/xfails/i915-apl-flakes.txt |5 +
 drivers/gpu/drm/ci/xfails/i915-apl-skips.txt  |   26 +-
 drivers/gpu/drm/ci/xfails/i915-cml-fails.txt  |   38 +
 drivers/gpu/drm/ci/xfails/i915-cml-flakes.txt |5 +
 drivers/gpu/drm/ci/xfails/i915-cml-skips.txt  |   23 +
 drivers/gpu/drm/ci/xfails/i915-glk-fails.txt  |   41 +-
 drivers/gpu/drm/ci/xfails/i915-glk-flakes.txt |6 +
 drivers/gpu/drm/ci/xfails/i915-glk-skips.txt  |   26 +-
 drivers/gpu/drm/ci/xfails/i915-kbl-fails.txt  |   42 +-
 drivers/gpu/drm/ci/xfails/i915-kbl-flakes.txt |6 +-
 drivers/gpu/drm/ci/xfails/i915-kbl-skips.txt  |   36 +-
 drivers/gpu/drm/ci/xfails/i915-tgl-fails.txt  |   77 +-
 drivers/gpu/drm/ci/xfails/i915-tgl-skips.txt  |   27 +-
 drivers/gpu/drm/ci/xfails/i915-whl-fails.txt  |   63 +-
 drivers/gpu/drm/ci/xfails/i915-whl-flakes.txt |5 +
 drivers/gpu/drm/ci/xfails/i915-whl-skips.txt  |   22 +-
 .../drm/ci/xfails/mediatek-mt8173-fails.txt   |   30 +-
 .../drm/ci/xfails/mediatek-mt8173-flakes.txt  |   10 +
 .../drm/ci/xfails/mediatek-mt8173-skips.txt   |   16 +
 .../drm/ci/xfails/mediatek-mt8183-fails.txt   |   21 +-
 .../drm/ci/xfails/mediatek-mt8183-skips.txt   |   18 +
 .../gpu/drm/ci/xfails/meson-g12b-fails.txt|   24 +-
 .../gpu/drm/ci/xfails/meson-g12b-skips.txt|   18 +
 .../gpu/drm/ci/xfails/msm-apq8016-fails.txt   |   12 +-
 .../gpu/drm/ci/xfails/msm-apq8016-skips.txt   |   15 +
 .../gpu/drm/ci/xfails/msm-apq8096-fails.txt   |7 +
 .../gpu/drm/ci/xfails/msm-apq8096-flakes.txt  |5 +
 .../gpu/drm/ci/xfails/msm-apq8096-skips.txt   |   26 +-
 .../msm-sc7180-trogdor-kingoftown-fails.txt   |  175 +-
 .../msm-sc7180-trogdor-kingoftown-flakes.txt  |7 +
 .../msm-sc7180-trogdor-kingoftown-skips.txt   |   19 +
 ...sm-sc7180-trogdor-lazor-limozeen-fails.txt |  175 +-
 ...m-sc7180-trogdor-lazor-limozeen-flakes.txt |5 +
 ...sm-sc7180-trogdor-lazor-limozeen-skips.txt |   16 +
 .../gpu/drm/ci/xfails/msm-sdm845-fails.txt|   38 +-
 .../gpu/drm/ci/xfails/msm-sdm845-flakes.txt   |   26 +-
 .../gpu/drm/ci/xfails/msm-sdm845-skips.txt|   19 +
 .../drm/ci/xfails/rockchip-rk3288-fails.txt   |   62 +-
 .../drm/ci/xfails/rockchip-rk3288-skips.txt   |   21 +-
 .../drm/ci/xfails/rockchip-rk3399-fails.txt   |   83 +-
 .../drm/ci/xfails/rockchip-rk3399-flakes.txt  |   12 +-
 .../drm/ci/xfails/rockchip-rk3399-skips.txt   |   19 +
 drivers/gpu/drm/ci/xfails/update-xfails.py|4 +-
 .../drm/ci/xfails/virtio_gpu-none-fails.txt   |   94 +-
 .../drm/ci/xfails/virtio_gpu-none-skips.txt   |   20 +-
 62 files changed, 1334 insertions(+), 3200 deletions(-)
 delete mode 100644 drivers/gpu/drm/ci/testlist.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/i915-amly-flakes.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/i915-apl-flakes.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/i915-cml-flakes.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/i915-glk-flakes.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/i915-whl-flakes.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/mediatek-mt8173-flakes.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/mediatek-mt8173-skips.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/mediatek-mt8183-skips.txt
 create mode 100644 drivers/gpu/drm/ci/xfails/meson-g12b-skips.txt
 create mode 100644 

✓ Fi.CI.BAT: success for LunarLake IO and Fast Wake changes

2024-05-17 Thread Patchwork
== Series Details ==

Series: LunarLake IO and Fast Wake changes
URL   : https://patchwork.freedesktop.org/series/133728/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_14779 -> Patchwork_133728v1


Summary
---

  **SUCCESS**

  No regressions found.

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

Participating hosts (44 -> 38)
--

  Missing(6): bat-kbl-2 fi-snb-2520m fi-elk-e7500 bat-dg2-11 bat-jsl-3 
bat-mtlp-8 

Possible new issues
---

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

### IGT changes ###

 Suppressed 

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

  * igt@kms_pipe_crc_basic@nonblocking-crc@pipe-c-dp-6:
- {bat-mtlp-9}:   [PASS][1] -> [DMESG-FAIL][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/bat-mtlp-9/igt@kms_pipe_crc_basic@nonblocking-...@pipe-c-dp-6.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/bat-mtlp-9/igt@kms_pipe_crc_basic@nonblocking-...@pipe-c-dp-6.html

  * igt@kms_pipe_crc_basic@nonblocking-crc@pipe-d-dp-6:
- {bat-mtlp-9}:   [PASS][3] -> [FAIL][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/bat-mtlp-9/igt@kms_pipe_crc_basic@nonblocking-...@pipe-d-dp-6.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/bat-mtlp-9/igt@kms_pipe_crc_basic@nonblocking-...@pipe-d-dp-6.html

  
Known issues


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

### IGT changes ###

 Issues hit 

  * igt@i915_module_load@load:
- bat-arls-3: [PASS][5] -> [ABORT][6] ([i915#11041])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/bat-arls-3/igt@i915_module_l...@load.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/bat-arls-3/igt@i915_module_l...@load.html

  
 Possible fixes 

  * igt@gem_lmem_swapping@basic@lmem0:
- bat-dg2-8:  [FAIL][7] ([i915#10378]) -> [PASS][8]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/bat-dg2-8/igt@gem_lmem_swapping@ba...@lmem0.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/bat-dg2-8/igt@gem_lmem_swapping@ba...@lmem0.html

  * igt@i915_pm_rpm@module-reload:
- {bat-mtlp-9}:   [CRASH][9] ([i915#10911]) -> [PASS][10]
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/bat-mtlp-9/igt@i915_pm_...@module-reload.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/bat-mtlp-9/igt@i915_pm_...@module-reload.html

  * igt@kms_flip@basic-flip-vs-modeset@b-dp7:
- {bat-mtlp-9}:   [DMESG-WARN][11] ([i915#10435]) -> [PASS][12]
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14779/bat-mtlp-9/igt@kms_flip@basic-flip-vs-mode...@b-dp7.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/bat-mtlp-9/igt@kms_flip@basic-flip-vs-mode...@b-dp7.html

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

  [i915#10378]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10378
  [i915#10435]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10435
  [i915#10580]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10580
  [i915#10911]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10911
  [i915#11009]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11009
  [i915#11041]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11041
  [i915#9157]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9157
  [i915#9224]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9224
  [i915#9413]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9413


Build changes
-

  * Linux: CI_DRM_14779 -> Patchwork_133728v1

  CI-20190529: 20190529
  CI_DRM_14779: da27b39e5013fa07eda5623ee6b1ddadfc1e1dc3 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7860: 05b3f5540c6dcaacdf2169dc730c126df9ffd7e2 @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_133728v1: da27b39e5013fa07eda5623ee6b1ddadfc1e1dc3 @ 
git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133728v1/index.html


[PATCH] arch: Fix name collision with ACPI's video.o

2024-05-17 Thread Thomas Zimmermann
Commit 2fd001cd3600 ("arch: Rename fbdev header and source files")
renames the video source files under arch/ such that they do not
refer to fbdev any longer. The new files named video.o conflict with
ACPI's video.ko module. Modprobing the ACPI module can then fail with
warnings about missing symbols, as shown below.

  (i915_selftest:1107) igt_kmod-WARNING: i915: Unknown symbol 
acpi_video_unregister (err -2)
  (i915_selftest:1107) igt_kmod-WARNING: i915: Unknown symbol 
acpi_video_register_backlight (err -2)
  (i915_selftest:1107) igt_kmod-WARNING: i915: Unknown symbol 
__acpi_video_get_backlight_type (err -2)
  (i915_selftest:1107) igt_kmod-WARNING: i915: Unknown symbol 
acpi_video_register (err -2)

Fix the issue by renaming the architecture's video.o to video-common.o.

Reported-by: Chaitanya Kumar Borah 
Closes: 
https://lore.kernel.org/intel-gfx/9dcac6e9-a3bf-4ace-bbdc-f697f767f...@suse.de/T/#t
Signed-off-by: Thomas Zimmermann 
Fixes: 2fd001cd3600 ("arch: Rename fbdev header and source files")
Cc: Arnd Bergmann 
Cc: linux-a...@vger.kernel.org
Cc: linux-fb...@vger.kernel.org
Cc: dri-de...@lists.freedesktop.org
---
 arch/sparc/video/Makefile| 2 +-
 arch/sparc/video/{video.c => video-common.c} | 0
 arch/x86/video/Makefile  | 2 +-
 arch/x86/video/{video.c => video-common.c}   | 0
 4 files changed, 2 insertions(+), 2 deletions(-)
 rename arch/sparc/video/{video.c => video-common.c} (100%)
 rename arch/x86/video/{video.c => video-common.c} (100%)

diff --git a/arch/sparc/video/Makefile b/arch/sparc/video/Makefile
index fdf83a408d750..dcfbe7a5912c0 100644
--- a/arch/sparc/video/Makefile
+++ b/arch/sparc/video/Makefile
@@ -1,3 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
-obj-y  += video.o
+obj-y  += video-common.o
diff --git a/arch/sparc/video/video.c b/arch/sparc/video/video-common.c
similarity index 100%
rename from arch/sparc/video/video.c
rename to arch/sparc/video/video-common.c
diff --git a/arch/x86/video/Makefile b/arch/x86/video/Makefile
index fdf83a408d750..dcfbe7a5912c0 100644
--- a/arch/x86/video/Makefile
+++ b/arch/x86/video/Makefile
@@ -1,3 +1,3 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
-obj-y  += video.o
+obj-y  += video-common.o
diff --git a/arch/x86/video/video.c b/arch/x86/video/video-common.c
similarity index 100%
rename from arch/x86/video/video.c
rename to arch/x86/video/video-common.c
-- 
2.45.0



[PATCH] drm/i915/gt: Fix CCS id's calculation for CCS mode setting

2024-05-17 Thread Andi Shyti
The whole point of the previous fixes has been to change the CCS
hardware configuration to generate only one stream available to
the compute users. We did this by changing the info.engine_mask
that is set during device probe, reset during the detection of
the fused engines, and finally reset again when choosing the CCS
mode.

We can't use the engine_mask variable anymore, as with the
current configuration, it imposes only one CCS no matter what the
hardware configuration is.

Before changing the engine_mask for the third time, save it and
use it for calculating the CCS mode.

After the previous changes, the user reported a performance drop
to around 1/4. We have tested that the compute operations, with
the current patch, have improved by the same factor.

Fixes: 6db31251bb26 ("drm/i915/gt: Enable only one CCS for compute workload")
Cc: Chris Wilson 
Cc: Gnattu OC 
Cc: Joonas Lahtinen 
Cc: Matt Roper 
Tested-by: Jian Ye 
---
Hi,

This ensures that all four CCS engines work properly. However,
during the tests, Jian detected that the performance during
memory copy assigned to the CCS engines is negatively impacted.

I believe this might be expected, considering that based on the
engines' availability, the media user might decide to reduce the
copy in multitasking.

With the upcoming work that will give the user the chance to
configure the CCS mode, this might improve.

Gnattu, can I use your kindness to ask for a test on this patch
and check whether the performance improve on your side as well?

Thanks,
Andi

 drivers/gpu/drm/i915/gt/intel_engine_cs.c   | 6 ++
 drivers/gpu/drm/i915/gt/intel_gt_ccs_mode.c | 2 +-
 drivers/gpu/drm/i915/gt/intel_gt_types.h| 8 
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c 
b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index 5c8e9ee3b008..3b740ca25000 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -885,6 +885,12 @@ static intel_engine_mask_t init_engine_mask(struct 
intel_gt *gt)
if (IS_DG2(gt->i915)) {
u8 first_ccs = __ffs(CCS_MASK(gt));
 
+   /*
+* Store the number of active cslices before
+* changing the CCS engine configuration
+*/
+   gt->ccs.cslices = CCS_MASK(gt);
+
/* Mask off all the CCS engine */
info->engine_mask &= ~GENMASK(CCS3, CCS0);
/* Put back in the first CCS engine */
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_ccs_mode.c 
b/drivers/gpu/drm/i915/gt/intel_gt_ccs_mode.c
index 99b71bb7da0a..3c62a44e9106 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_ccs_mode.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_ccs_mode.c
@@ -19,7 +19,7 @@ unsigned int intel_gt_apply_ccs_mode(struct intel_gt *gt)
 
/* Build the value for the fixed CCS load balancing */
for (cslice = 0; cslice < I915_MAX_CCS; cslice++) {
-   if (CCS_MASK(gt) & BIT(cslice))
+   if (gt->ccs.cslices & BIT(cslice))
/*
 * If available, assign the cslice
 * to the first available engine...
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_types.h 
b/drivers/gpu/drm/i915/gt/intel_gt_types.h
index def7dd0eb6f1..cfdd2ad5e954 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_types.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt_types.h
@@ -207,6 +207,14 @@ struct intel_gt {
[MAX_ENGINE_INSTANCE + 1];
enum intel_submission_method submission_method;
 
+   struct {
+   /*
+* Mask of the non fused CCS slices
+* to be used for the load balancing
+*/
+   intel_engine_mask_t cslices;
+   } ccs;
+
/*
 * Default address space (either GGTT or ppGTT depending on arch).
 *
-- 
2.43.0



✗ Fi.CI.IGT: failure for drm/i915/selftests: Set always_coherent to false when reading from CPU

2024-05-17 Thread Patchwork
== Series Details ==

Series: drm/i915/selftests: Set always_coherent to false when reading from CPU
URL   : https://patchwork.freedesktop.org/series/133704/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14775_full -> Patchwork_133704v1_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_133704v1_full absolutely need 
to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_133704v1_full, please notify your bug team 
(i915-ci-in...@lists.freedesktop.org) to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (9 -> 9)
--

  No changes in participating hosts

Possible new issues
---

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

### IGT changes ###

 Possible regressions 

  * igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_clear:
- shard-dg2:  [PASS][1] -> [ABORT][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14775/shard-dg2-3/igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_clear.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133704v1/shard-dg2-7/igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_clear.html
- shard-mtlp: [PASS][3] -> [ABORT][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14775/shard-mtlp-1/igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_clear.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133704v1/shard-mtlp-4/igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_clear.html

  * igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_range_bias:
- shard-dg2:  [PASS][5] -> [DMESG-FAIL][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14775/shard-dg2-3/igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_range_bias.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133704v1/shard-dg2-7/igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_range_bias.html
- shard-mtlp: [PASS][7] -> [DMESG-FAIL][8]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14775/shard-mtlp-1/igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_range_bias.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133704v1/shard-mtlp-4/igt@drm_buddy@drm_buddy@drm_test_buddy_alloc_range_bias.html

  * igt@gem_exec_schedule@wide@rcs0:
- shard-glk:  NOTRUN -> [FAIL][9]
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133704v1/shard-glk6/igt@gem_exec_schedule@w...@rcs0.html

  
New tests
-

  New tests have been introduced between CI_DRM_14775_full and 
Patchwork_133704v1_full:

### New IGT tests (4) ###

  * 
igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-5@pipe-a-hdmi-a-1:
- Statuses : 2 pass(s)
- Exec time: [0.11, 0.29] s

  * 
igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-5@pipe-b-hdmi-a-1:
- Statuses : 2 pass(s)
- Exec time: [0.10, 0.32] s

  * 
igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-5@pipe-c-hdmi-a-1:
- Statuses : 1 pass(s)
- Exec time: [0.10] s

  * 
igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-5@pipe-d-hdmi-a-1:
- Statuses : 1 pass(s)
- Exec time: [0.10] s

  

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@drm_fdinfo@idle@rcs0:
- shard-rkl:  [PASS][10] -> [FAIL][11] ([i915#7742])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14775/shard-rkl-5/igt@drm_fdinfo@i...@rcs0.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133704v1/shard-rkl-3/igt@drm_fdinfo@i...@rcs0.html

  * igt@drm_fdinfo@most-busy-idle-check-all@bcs0:
- shard-dg1:  NOTRUN -> [SKIP][12] ([i915#8414]) +4 other tests skip
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133704v1/shard-dg1-18/igt@drm_fdinfo@most-busy-idle-check-...@bcs0.html

  * igt@drm_fdinfo@virtual-busy-hang:
- shard-dg2:  NOTRUN -> [SKIP][13] ([i915#8414])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133704v1/shard-dg2-10/igt@drm_fdi...@virtual-busy-hang.html

  * igt@gem_bad_reloc@negative-reloc-lut:
- shard-rkl:  NOTRUN -> [SKIP][14] ([i915#3281]) +3 other tests skip
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133704v1/shard-rkl-5/igt@gem_bad_re...@negative-reloc-lut.html

  * igt@gem_ccs@ctrl-surf-copy:
- shard-dg1:  NOTRUN -> [SKIP][15] ([i915#3555] / [i915#9323])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_133704v1/shard-dg1-15/igt@gem_...@ctrl-surf-copy.html

  * igt@gem_ccs@suspend-resume@linear-compressed-compfmt0-smem-lmem0:
- shard-dg2:  NOTRUN -> [INCOMPLETE][16] ([i915#7297])
   [16]: 

Re: [PATCH] drm/i915/selftests: Set always_coherent to false when reading from CPU

2024-05-17 Thread Nirmoy Das

Hi Jani,

On 5/17/2024 9:39 AM, Jani Nikula wrote:

On Thu, 16 May 2024, Nirmoy Das  wrote:

The previous commit 'commit 8d4ba9fc1c6c ("drm/i915/selftests: Pick

"previous commit" is a fairly vague reference once this gets
committed. It's not going to be "previous" in any meaningful sense.

Please just start with:

Commit 8d4ba9fc1c6c ("drm/i915/selftests: Pick correct caching mode.")
was not complete...


Will do that.




And probably add:

Fixes: 8d4ba9fc1c6c ("drm/i915/selftests: Pick correct caching mode.")


Do we need Fixes for selftest ? I always assumed it is not required as 
this code is for debug/CI



Thanks,

Nirmoy



BR,
Jani.


correct caching mode.")' was not complete as for non LLC  sharing platforms
cpu read can happen from LLC which probably doesn't have the latest
changes made by GPU.

Cc: Andi Shyti 
Cc: Janusz Krzysztofik 
Cc: Jonathan Cavitt 
Signed-off-by: Nirmoy Das 
---
  drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c 
b/drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c
index 65a931ea80e9..3527b8f446fe 100644
--- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c
+++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c
@@ -196,7 +196,7 @@ static int verify_access(struct drm_i915_private *i915,
if (err)
goto out_file;
  
-	mode = intel_gt_coherent_map_type(to_gt(i915), native_obj, true);

+   mode = intel_gt_coherent_map_type(to_gt(i915), native_obj, false);
vaddr = i915_gem_object_pin_map_unlocked(native_obj, mode);
if (IS_ERR(vaddr)) {
err = PTR_ERR(vaddr);


✗ Fi.CI.SPARSE: warning for LunarLake IO and Fast Wake changes

2024-05-17 Thread Patchwork
== Series Details ==

Series: LunarLake IO and Fast Wake changes
URL   : https://patchwork.freedesktop.org/series/133728/
State : warning

== Summary ==

Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:116:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:147:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:149:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:153:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:155:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:155:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:173:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:175:9: warning: unreplaced symbol 'oldbit'

✗ Fi.CI.CHECKPATCH: warning for LunarLake IO and Fast Wake changes

2024-05-17 Thread Patchwork
== Series Details ==

Series: LunarLake IO and Fast Wake changes
URL   : https://patchwork.freedesktop.org/series/133728/
State : warning

== Summary ==

Error: dim checkpatch failed
433dcbf5f0b3 drm/i915/psr: LunarLake IO and Fast Wake time line count maximums 
are 68
bd0ec1a85c93 drm/i915/psr: LunarLake PSR2_CTL[IO Wake Lines] is 6 bits wide
-:42: WARNING:LONG_LINE: line length of 111 exceeds 100 columns
#42: FILE: drivers/gpu/drm/i915/display/intel_psr_regs.h:178:
+  (lines) - 
LNL_EDP_PSR2_IO_BUFFER_WAKE_MIN_LINES)

total: 0 errors, 1 warnings, 0 checks, 18 lines checked
8a8555748231 drm/i915/psr: PSR2_CTL[Block Count Number] not needed for LunarLake




RE: [PATCH 1/3] drm/i915/psr: LunarLake IO and Fast Wake time line count maximums are 63

2024-05-17 Thread Shankar, Uma


> -Original Message-
> From: Hogander, Jouni 
> Sent: Friday, May 17, 2024 1:02 PM
> To: Shankar, Uma ; intel-gfx@lists.freedesktop.org
> Subject: Re: [PATCH 1/3] drm/i915/psr: LunarLake IO and Fast Wake time line
> count maximums are 63
> 
> On Fri, 2024-05-17 at 06:28 +, Shankar, Uma wrote:
> >
> >
> > > -Original Message-
> > > From: Intel-gfx  On Behalf
> > > Of Jouni Högander
> > > Sent: Friday, May 3, 2024 11:36 AM
> > > To: intel-gfx@lists.freedesktop.org
> > > Cc: Hogander, Jouni 
> > > Subject: [PATCH 1/3] drm/i915/psr: LunarLake IO and Fast Wake time
> > > line count maximums are 63
> > >
> > > On LunarLake maximum for IO and Fast Wake times are 63. Take this
> > > into account in calculation and when writing the IO Wake lines.
> > >
> > > Bspec: 69885, 70294
> > >
> > > Signed-off-by: Jouni Högander 
> > > ---
> > >  drivers/gpu/drm/i915/display/intel_psr.c | 5 +++--
> > >  1 file changed, 3 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > > b/drivers/gpu/drm/i915/display/intel_psr.c
> > > index f5b5a9ae..678987bbe168 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > > @@ -1364,8 +1364,9 @@ static bool _compute_alpm_params(struct
> > > intel_dp *intel_dp,
> > > fast_wake_time = precharge + preamble + phy_wake +
> > > tfw_exit_latency;
> > >
> > > -   if (DISPLAY_VER(i915) >= 12)
> > > -   /* TODO: Check how we can use ALPM_CTL fast wake
> > > extended field */
> > > +   if (DISPLAY_VER(i915) >= 20)
> > > +   max_wake_lines = 63;
> >
> > As per spec, hardware will add 5 extra lines to the programmed value.
> > For prior platforms it was set to 12 as 7 (3bits) + 5. I guess we
> > should make this consistent.
> 
> Thank you Uma for pointing this out. I have fixed this and the typo you 
> mentioned
> on patch 3. Please recheck.

Hi Jouni, 
Looks good, RB'ed now. You can go ahead for merge (seems some unrelated CI 
failures are there).

Regards,
Uma Shankar

> BR,
> 
> Jouni Högander
> >
> > Regards,
> > Uma Shankar
> >
> > > +   else if (DISPLAY_VER(i915) >= 12)
> > > max_wake_lines = 12;
> > > else
> > > max_wake_lines = 8;
> > > --
> > > 2.34.1
> >



RE: [PATCH v2 1/3] drm/i915/psr: LunarLake IO and Fast Wake time line count maximums are 68

2024-05-17 Thread Shankar, Uma


> -Original Message-
> From: Hogander, Jouni 
> Sent: Friday, May 17, 2024 1:00 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Shankar, Uma ; Hogander, Jouni
> 
> Subject: [PATCH v2 1/3] drm/i915/psr: LunarLake IO and Fast Wake time line
> count maximums are 68
> 
> On LunarLake maximum for IO and Fast Wake time line counts are 68: 6 bits +
> 5 lines added by the HW. Take this into account in calculation and when 
> writing
> the IO Wake lines.
> 
> v2: maximum line count is 68 (6 bits + 5 lines added by HW)

Looks Good to me.
Reviewed-by: Uma Shankar 

> Signed-off-by: Jouni Högander 
> ---
>  drivers/gpu/drm/i915/display/intel_psr.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> b/drivers/gpu/drm/i915/display/intel_psr.c
> index df0d14a5023f..f5d3eb776833 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -1421,8 +1421,9 @@ static bool _compute_alpm_params(struct intel_dp
> *intel_dp,
>   fast_wake_time = precharge + preamble + phy_wake +
>   tfw_exit_latency;
> 
> - if (DISPLAY_VER(i915) >= 12)
> - /* TODO: Check how we can use ALPM_CTL fast wake extended
> field */
> + if (DISPLAY_VER(i915) >= 20)
> + max_wake_lines = 68;
> + else if (DISPLAY_VER(i915) >= 12)
>   max_wake_lines = 12;
>   else
>   max_wake_lines = 8;
> --
> 2.34.1



Re: [PATCH] drm/i915/selftests: Set always_coherent to false when reading from CPU

2024-05-17 Thread Jani Nikula
On Thu, 16 May 2024, Nirmoy Das  wrote:
> The previous commit 'commit 8d4ba9fc1c6c ("drm/i915/selftests: Pick

"previous commit" is a fairly vague reference once this gets
committed. It's not going to be "previous" in any meaningful sense.

Please just start with:

Commit 8d4ba9fc1c6c ("drm/i915/selftests: Pick correct caching mode.")
was not complete...

And probably add:

Fixes: 8d4ba9fc1c6c ("drm/i915/selftests: Pick correct caching mode.")

BR,
Jani.

> correct caching mode.")' was not complete as for non LLC  sharing platforms
> cpu read can happen from LLC which probably doesn't have the latest
> changes made by GPU.
>
> Cc: Andi Shyti 
> Cc: Janusz Krzysztofik 
> Cc: Jonathan Cavitt 
> Signed-off-by: Nirmoy Das 
> ---
>  drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c 
> b/drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c
> index 65a931ea80e9..3527b8f446fe 100644
> --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c
> +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c
> @@ -196,7 +196,7 @@ static int verify_access(struct drm_i915_private *i915,
>   if (err)
>   goto out_file;
>  
> - mode = intel_gt_coherent_map_type(to_gt(i915), native_obj, true);
> + mode = intel_gt_coherent_map_type(to_gt(i915), native_obj, false);
>   vaddr = i915_gem_object_pin_map_unlocked(native_obj, mode);
>   if (IS_ERR(vaddr)) {
>   err = PTR_ERR(vaddr);

-- 
Jani Nikula, Intel


Re: [PATCH 1/3] drm/i915/psr: LunarLake IO and Fast Wake time line count maximums are 63

2024-05-17 Thread Hogander, Jouni
On Fri, 2024-05-17 at 06:28 +, Shankar, Uma wrote:
> 
> 
> > -Original Message-
> > From: Intel-gfx  On Behalf
> > Of Jouni
> > Högander
> > Sent: Friday, May 3, 2024 11:36 AM
> > To: intel-gfx@lists.freedesktop.org
> > Cc: Hogander, Jouni 
> > Subject: [PATCH 1/3] drm/i915/psr: LunarLake IO and Fast Wake time
> > line count
> > maximums are 63
> > 
> > On LunarLake maximum for IO and Fast Wake times are 63. Take this
> > into
> > account in calculation and when writing the IO Wake lines.
> > 
> > Bspec: 69885, 70294
> > 
> > Signed-off-by: Jouni Högander 
> > ---
> >  drivers/gpu/drm/i915/display/intel_psr.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > b/drivers/gpu/drm/i915/display/intel_psr.c
> > index f5b5a9ae..678987bbe168 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > @@ -1364,8 +1364,9 @@ static bool _compute_alpm_params(struct
> > intel_dp
> > *intel_dp,
> > fast_wake_time = precharge + preamble + phy_wake +
> > tfw_exit_latency;
> > 
> > -   if (DISPLAY_VER(i915) >= 12)
> > -   /* TODO: Check how we can use ALPM_CTL fast wake
> > extended
> > field */
> > +   if (DISPLAY_VER(i915) >= 20)
> > +   max_wake_lines = 63;
> 
> As per spec, hardware will add 5 extra lines to the programmed value.
> For prior platforms it was set to 12 as 7 (3bits) + 5. I guess we
> should make this
> consistent.

Thank you Uma for pointing this out. I have fixed this and the typo you
mentioned on patch 3. Please recheck.

BR,

Jouni Högander
> 
> Regards,
> Uma Shankar
> 
> > +   else if (DISPLAY_VER(i915) >= 12)
> > max_wake_lines = 12;
> > else
> > max_wake_lines = 8;
> > --
> > 2.34.1
> 



[PATCH v2 0/3] LunarLake IO and Fast Wake changes

2024-05-17 Thread Jouni Högander
There are some changes in LunarLake IO and Fast Wake configuration:

IO Wake Lines configuration is now 6 bits wide
Fast Wake Lines configuration is now 6 bits wide and in ALPM_CTL register
PSR2_CTL[Block count number] is not valid for LunarLake and onwards

This patch set modifies the driver accordingly.

v2: maximum line count is 68 (6 bits + 5 lines added by HW)

Jouni Högander (3):
  drm/i915/psr: LunarLake IO and Fast Wake time line count maximums are
68
  drm/i915/psr: LunarLake PSR2_CTL[IO Wake Lines] is 6 bits wide
  drm/i915/psr: PSR2_CTL[Block Count Number] not needed for LunarLake

 drivers/gpu/drm/i915/display/intel_psr.c  | 9 ++---
 drivers/gpu/drm/i915/display/intel_psr_regs.h | 4 
 2 files changed, 10 insertions(+), 3 deletions(-)

-- 
2.34.1



[PATCH v2 3/3] drm/i915/psr: PSR2_CTL[Block Count Number] not needed for LunarLake

2024-05-17 Thread Jouni Högander
PSR2_CTL[Block Count Number] is not used by LunarLake do not configure it.

Bspec: 69885

Signed-off-by: Jouni Högander 
Reviewed-by: Uma Shankar 
---
 drivers/gpu/drm/i915/display/intel_psr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c 
b/drivers/gpu/drm/i915/display/intel_psr.c
index d2f6488b8fc7..d18baeb971bb 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -927,7 +927,7 @@ static void hsw_activate_psr2(struct intel_dp *intel_dp)
 
val |= intel_psr2_get_tp_time(intel_dp);
 
-   if (DISPLAY_VER(dev_priv) >= 12) {
+   if (DISPLAY_VER(dev_priv) >= 12 && DISPLAY_VER(dev_priv) < 20) {
if (psr2_block_count(intel_dp) > 2)
val |= TGL_EDP_PSR2_BLOCK_COUNT_NUM_3;
else
-- 
2.34.1



[PATCH v2 1/3] drm/i915/psr: LunarLake IO and Fast Wake time line count maximums are 68

2024-05-17 Thread Jouni Högander
On LunarLake maximum for IO and Fast Wake time line counts are 68: 6 bits +
5 lines added by the HW. Take this into account in calculation and when
writing the IO Wake lines.

v2: maximum line count is 68 (6 bits + 5 lines added by HW)

Signed-off-by: Jouni Högander 
---
 drivers/gpu/drm/i915/display/intel_psr.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c 
b/drivers/gpu/drm/i915/display/intel_psr.c
index df0d14a5023f..f5d3eb776833 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1421,8 +1421,9 @@ static bool _compute_alpm_params(struct intel_dp 
*intel_dp,
fast_wake_time = precharge + preamble + phy_wake +
tfw_exit_latency;
 
-   if (DISPLAY_VER(i915) >= 12)
-   /* TODO: Check how we can use ALPM_CTL fast wake extended field 
*/
+   if (DISPLAY_VER(i915) >= 20)
+   max_wake_lines = 68;
+   else if (DISPLAY_VER(i915) >= 12)
max_wake_lines = 12;
else
max_wake_lines = 8;
-- 
2.34.1



[PATCH v2 2/3] drm/i915/psr: LunarLake PSR2_CTL[IO Wake Lines] is 6 bits wide

2024-05-17 Thread Jouni Högander
On LunarLake  PSR2_CTL[IO Wake Lines] contains now bit 13:18. Take this
into account when enabling PSR2_CTL.

Bspec: 69885

Signed-off-by: Jouni Högander 
Reviewed-by: Uma Shankar 
---
 drivers/gpu/drm/i915/display/intel_psr.c  | 2 ++
 drivers/gpu/drm/i915/display/intel_psr_regs.h | 4 
 2 files changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c 
b/drivers/gpu/drm/i915/display/intel_psr.c
index f5d3eb776833..d2f6488b8fc7 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -958,6 +958,8 @@ static void hsw_activate_psr2(struct intel_dp *intel_dp)
 
tmp = map[psr->alpm_parameters.fast_wake_lines - 
TGL_EDP_PSR2_FAST_WAKE_MIN_LINES];
val |= TGL_EDP_PSR2_FAST_WAKE(tmp + 
TGL_EDP_PSR2_FAST_WAKE_MIN_LINES);
+   } else if (DISPLAY_VER(dev_priv) >= 20) {
+   val |= 
LNL_EDP_PSR2_IO_BUFFER_WAKE(psr->alpm_parameters.io_wake_lines);
} else if (DISPLAY_VER(dev_priv) >= 12) {
val |= 
TGL_EDP_PSR2_IO_BUFFER_WAKE(psr->alpm_parameters.io_wake_lines);
val |= 
TGL_EDP_PSR2_FAST_WAKE(psr->alpm_parameters.fast_wake_lines);
diff --git a/drivers/gpu/drm/i915/display/intel_psr_regs.h 
b/drivers/gpu/drm/i915/display/intel_psr_regs.h
index e14cb48f2614..b6a39926ccb6 100644
--- a/drivers/gpu/drm/i915/display/intel_psr_regs.h
+++ b/drivers/gpu/drm/i915/display/intel_psr_regs.h
@@ -172,6 +172,10 @@
 #define   TGL_EDP_PSR2_IO_BUFFER_WAKE_MIN_LINES5
 #define   TGL_EDP_PSR2_IO_BUFFER_WAKE(lines)   
REG_FIELD_PREP(TGL_EDP_PSR2_IO_BUFFER_WAKE_MASK, \
   (lines) - 
TGL_EDP_PSR2_IO_BUFFER_WAKE_MIN_LINES)
+#define   LNL_EDP_PSR2_IO_BUFFER_WAKE_MASK REG_GENMASK(18, 13)
+#define   LNL_EDP_PSR2_IO_BUFFER_WAKE_MIN_LINES5
+#define   LNL_EDP_PSR2_IO_BUFFER_WAKE(lines)   
REG_FIELD_PREP(LNL_EDP_PSR2_IO_BUFFER_WAKE_MASK, \
+  (lines) - 
LNL_EDP_PSR2_IO_BUFFER_WAKE_MIN_LINES)
 #define   EDP_PSR2_FAST_WAKE_MASK  REG_GENMASK(12, 11)
 #define   EDP_PSR2_FAST_WAKE_MAX_LINES 8
 #define   EDP_PSR2_FAST_WAKE(lines)
REG_FIELD_PREP(EDP_PSR2_FAST_WAKE_MASK, \
-- 
2.34.1



RE: [PATCH 3/3] drm/i915/psr: PSR2_CTL[Block Count Number] no needed for LunarLake

2024-05-17 Thread Shankar, Uma


> -Original Message-
> From: Intel-gfx  On Behalf Of Jouni
> Högander
> Sent: Friday, May 3, 2024 11:36 AM
> To: intel-gfx@lists.freedesktop.org
> Cc: Hogander, Jouni 
> Subject: [PATCH 3/3] drm/i915/psr: PSR2_CTL[Block Count Number] no needed
> for LunarLake

Nit: s/no/not

Looks Good to me.
Reviewed-by: Uma Shankar 

> 
> PSR2_CTL[Block Count Number] is not used by LunarLake do not configure it.
> 
> Bspec: 69885
> 
> Signed-off-by: Jouni Högander 
> ---
>  drivers/gpu/drm/i915/display/intel_psr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> b/drivers/gpu/drm/i915/display/intel_psr.c
> index 4d67a384e149..5ebfe4244d51 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -869,7 +869,7 @@ static void hsw_activate_psr2(struct intel_dp *intel_dp)
> 
>   val |= intel_psr2_get_tp_time(intel_dp);
> 
> - if (DISPLAY_VER(dev_priv) >= 12) {
> + if (DISPLAY_VER(dev_priv) >= 12 && DISPLAY_VER(dev_priv) < 20) {
>   if (psr2_block_count(intel_dp) > 2)
>   val |= TGL_EDP_PSR2_BLOCK_COUNT_NUM_3;
>   else
> --
> 2.34.1



RE: [PATCH 2/3] drm/i915/psr: LunarLake PSR2_CTL[IO Wake Lines] is 6 bits wide

2024-05-17 Thread Shankar, Uma


> -Original Message-
> From: Intel-gfx  On Behalf Of Jouni
> Högander
> Sent: Friday, May 3, 2024 11:36 AM
> To: intel-gfx@lists.freedesktop.org
> Cc: Hogander, Jouni 
> Subject: [PATCH 2/3] drm/i915/psr: LunarLake PSR2_CTL[IO Wake Lines] is 6 bits
> wide
> 
> On LunarLake  PSR2_CTL[IO Wake Lines] contains now bit 13:18. Take this into
> account when enabling PSR2_CTL.

Looks Good to me.
Reviewed-by: Uma Shankar 

> Bspec: 69885
> 
> Signed-off-by: Jouni Högander 
> ---
>  drivers/gpu/drm/i915/display/intel_psr.c  | 2 ++
>  drivers/gpu/drm/i915/display/intel_psr_regs.h | 4 
>  2 files changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> b/drivers/gpu/drm/i915/display/intel_psr.c
> index 678987bbe168..4d67a384e149 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -900,6 +900,8 @@ static void hsw_activate_psr2(struct intel_dp *intel_dp)
> 
>   tmp = map[psr->alpm_parameters.fast_wake_lines -
> TGL_EDP_PSR2_FAST_WAKE_MIN_LINES];
>   val |= TGL_EDP_PSR2_FAST_WAKE(tmp +
> TGL_EDP_PSR2_FAST_WAKE_MIN_LINES);
> + } else if (DISPLAY_VER(dev_priv) >= 20) {
> + val |=
> +LNL_EDP_PSR2_IO_BUFFER_WAKE(psr->alpm_parameters.io_wake_lines);
>   } else if (DISPLAY_VER(dev_priv) >= 12) {
>   val |= TGL_EDP_PSR2_IO_BUFFER_WAKE(psr-
> >alpm_parameters.io_wake_lines);
>   val |= TGL_EDP_PSR2_FAST_WAKE(psr-
> >alpm_parameters.fast_wake_lines);
> diff --git a/drivers/gpu/drm/i915/display/intel_psr_regs.h
> b/drivers/gpu/drm/i915/display/intel_psr_regs.h
> index ebc22999572c..68381bbf462e 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr_regs.h
> +++ b/drivers/gpu/drm/i915/display/intel_psr_regs.h
> @@ -172,6 +172,10 @@
>  #define   TGL_EDP_PSR2_IO_BUFFER_WAKE_MIN_LINES  5
>  #define   TGL_EDP_PSR2_IO_BUFFER_WAKE(lines)
>   REG_FIELD_PREP(TGL_EDP_PSR2_IO_BUFFER_WAKE_MASK, \
>  (lines) -
> TGL_EDP_PSR2_IO_BUFFER_WAKE_MIN_LINES)
> +#define   LNL_EDP_PSR2_IO_BUFFER_WAKE_MASK   REG_GENMASK(18, 13)
> +#define   LNL_EDP_PSR2_IO_BUFFER_WAKE_MIN_LINES  5
> +#define   LNL_EDP_PSR2_IO_BUFFER_WAKE(lines)
>   REG_FIELD_PREP(LNL_EDP_PSR2_IO_BUFFER_WAKE_MASK, \
> +(lines) -
> LNL_EDP_PSR2_IO_BUFFER_WAKE_MIN_LINES)
>  #define   EDP_PSR2_FAST_WAKE_MASKREG_GENMASK(12, 11)
>  #define   EDP_PSR2_FAST_WAKE_MAX_LINES   8
>  #define   EDP_PSR2_FAST_WAKE(lines)
>   REG_FIELD_PREP(EDP_PSR2_FAST_WAKE_MASK, \
> --
> 2.34.1



RE: [PATCH 1/3] drm/i915/psr: LunarLake IO and Fast Wake time line count maximums are 63

2024-05-17 Thread Shankar, Uma


> -Original Message-
> From: Intel-gfx  On Behalf Of Jouni
> Högander
> Sent: Friday, May 3, 2024 11:36 AM
> To: intel-gfx@lists.freedesktop.org
> Cc: Hogander, Jouni 
> Subject: [PATCH 1/3] drm/i915/psr: LunarLake IO and Fast Wake time line count
> maximums are 63
> 
> On LunarLake maximum for IO and Fast Wake times are 63. Take this into
> account in calculation and when writing the IO Wake lines.
> 
> Bspec: 69885, 70294
> 
> Signed-off-by: Jouni Högander 
> ---
>  drivers/gpu/drm/i915/display/intel_psr.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> b/drivers/gpu/drm/i915/display/intel_psr.c
> index f5b5a9ae..678987bbe168 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -1364,8 +1364,9 @@ static bool _compute_alpm_params(struct intel_dp
> *intel_dp,
>   fast_wake_time = precharge + preamble + phy_wake +
>   tfw_exit_latency;
> 
> - if (DISPLAY_VER(i915) >= 12)
> - /* TODO: Check how we can use ALPM_CTL fast wake extended
> field */
> + if (DISPLAY_VER(i915) >= 20)
> + max_wake_lines = 63;

As per spec, hardware will add 5 extra lines to the programmed value.
For prior platforms it was set to 12 as 7 (3bits) + 5. I guess we should make 
this
consistent.

Regards,
Uma Shankar

> + else if (DISPLAY_VER(i915) >= 12)
>   max_wake_lines = 12;
>   else
>   max_wake_lines = 8;
> --
> 2.34.1