[PULL] drm-xe-next

2024-06-06 Thread Rodrigo Vivi
Hi Dave and Sima,

Here goes our first Xe pull request targeting 6.11.

A very active round, with highlight to many changes targeting
SR-IOV support and many different clean-ups.

Thanks,
Rodrigo.

drm-xe-next-2024-06-06:
UAPI Changes:
- Expose the L3 bank mask (Francois)

Cross-subsystem Changes:
- Update Xe driver maintainers (Oded)

Display (i915):
- Add missing include to intel_vga.c (Michal Wajdeczko)

Driver Changes:
- Fix Display (xe-only) detection for ADL-N (Lucas)
- Runtime PM fixes that enabled PC-10 and D3Cold (Francois, Rodrigo)
- Fix unexpected silent drm backmerge issues (Thomas)
- More (a lot more) preparation for SR-IOV support (Michal Wajdeczko)
- Devcoredump fixes and improvements (Jose, Tejas, Matt Brost)
- Introduce device 'wedged' state (Rodrigo)
- Improve debug and info messages (Michal Wajdeczko, Rodrigo, Nirmoy)
- Adding or fixing workarounds (Tejas, Shekhar, Lucas, Bommu)
- Check result of drmm_mutex_init (Michal Wajdeczko)
- Enlarge the critical dma fence area for preempt fences (Matt Auld)
- Prevent UAF in VM's rebind work (Matt Auld)
- GuC submit related clean-ups and fixes (Matt Brost, Himal, Jonathan, 
Niranjana)
- Prefer local helpers to perform dma reservation locking (Himal)
- Spelling and typo fixes (Colin, Francois)
- Prep patches for 1 job per VM bind IOCTL (no uapi change yet) (Matt Brost)
- Remove uninitialized end var from xe_gt_tlb_invalidation_range (Nirmoy)
- GSC related changes targeting LNL support (Daniele)
- Fix assert in L3 bank mask generation (Francois)
- Perform dma_map when moving system buffer objects to TT (Thomas)
- Add helpers for manipulating macro arguments (Michal Wajdeczko)
- Refactor default device atomic settings (Nirmoy)
- Add debugfs node to dump mocs (Janga)
- Use ordered WQ for G2H handler (Matt Brost)
- Clean up and fixes in header includes (Michal Wajdeczko)
- Prefer flexible-array over deprecated zero-lenght ones (Lucas)
- Add Indirect Ring State support (Niranjana)
- Fix UBSAN shift-out-of-bounds failure (Shuicheng)
- HWMon fixes and additions (Karthik)
- Clean-up refactor around probe init functions (Lucas, Michal Wajdeczko)
- Fix PCODE init function (Himal)
- Only use reserved BCS instances for usm migrate exec queue (Matt Brost)
- Only zap PTEs as needed (Matt Brost)
- Per client usage info (Lucas)
- Core hotunplug improvements converting stuff towards devm (Matt Auld)
- Don't emit false error if running in execlist mode (Michal Wajdeczko)
- Remove unused struct (Dr. David)
- Support/debug for slow GuC loads (John Harrison)
- Decouple job seqno and lrc seqno (Matt Brost)
- Allow migrate vm gpu submissions from reclaim context (Thomas)
- Rename drm-client running time to run_ticks and fix a UAF (Umesh)
- Check empty pinned BO list with lock held (Nirmoy)
- Drop undesired prefix from the platform name (Michal Wajdeczko)
- Remove unwanted mutex locking on xe file close (Niranjana)
- Replace format-less snprintf() with strscpy() (Arnd)
- Other general clean-ups on registers definitions and function names (Michal 
Wajdeczko)
- Add kernel-doc to some xe_lrc interfaces (Niranajana)
- Use missing lock in relay_needs_worker (Nirmoy)
- Drop redundant W=1 warnings from Makefile (Jani)
- Simplify if condition in preempt fences code (Thorsten)
- Flush engine buffers before signalling user fence on all engines (Andrzej)
- Don't overmap identity VRAM mapping (Matt Brost)
- Do not dereference NULL job->fence in trace points (Matt Brost)
- Add synchronous gt reset debugfs (Jonathan)
- Xe gt_idle fixes (Riana)

The following changes since commit 4a56c0ed5aa0bcbe1f5f7d755fb1fe1ebf48ae9c:

  Merge tag 'amd-drm-next-6.10-2024-04-26' of 
https://gitlab.freedesktop.org/agd5f/linux into drm-next (2024-04-30 14:43:00 
+1000)

are available in the Git repository at:

  https://gitlab.freedesktop.org/drm/xe/kernel.git tags/drm-xe-next-2024-06-06

for you to fetch changes up to 6800e63cf97bae62bca56d8e691544540d945f53:

  drm/xe: move disable_c6 call (2024-06-06 15:07:19 -0400)


UAPI Changes:
- Expose the L3 bank mask (Francois)

Cross-subsystem Changes:
- Update Xe driver maintainers (Oded)

Display (i915):
- Add missing include to intel_vga.c (Michal Wajdeczko)

Driver Changes:
- Fix Display (xe-only) detection for ADL-N (Lucas)
- Runtime PM fixes that enabled PC-10 and D3Cold (Francois, Rodrigo)
- Fix unexpected silent drm backmerge issues (Thomas)
- More (a lot more) preparation for SR-IOV support (Michal Wajdeczko)
- Devcoredump fixes and improvements (Jose, Tejas, Matt Brost)
- Introduce device 'wedged' state (Rodrigo)
- Improve debug and info messages (Michal Wajdeczko, Rodrigo, Nirmoy)
- Adding or fixing workarounds (Tejas, Shekhar, Lucas, Bommu)
- Check result of drmm_mutex_init (Michal Wajdeczko)
- Enlarge the critical dma fence area for preempt fences (Matt Auld)
- Prevent UAF in VM's rebind work (Matt Auld)
- GuC submit related clean-ups and fixes (Matt Brost, Himal, Jonathan, 

[PULL] drm-xe-next-fixes

2024-05-09 Thread Thomas Hellstrom
Hi, Dave & Sima

This weeks -next-fixes. Two fixes breifly described below.

Driver Changes:
- Use ordered WQ for G2H handler. (Matthew Brost)
- Use flexible-array rather than zero-sized (Lucas De Marchi)

Thanks,
Thomas

The following changes since commit 3bc8848bb7f7478e6806e4522b06b63f40a53e1e:

  drm/xe: Merge 16021540221 and 18034896535 WAs (2024-05-02 11:29:42 +0200)

are available in the Git repository at:

  https://gitlab.freedesktop.org/drm/xe/kernel.git 
tags/drm-xe-next-fixes-2024-05-09-1

for you to fetch changes up to d69c3d4b53829097b8948d6791ea32c07de3faab:

  drm/xe/ads: Use flexible-array (2024-05-09 17:51:46 +0200)


Driver Changes:
- Use ordered WQ for G2H handler. (Matthew Brost)
- Use flexible-array rather than zero-sized (Lucas De Marchi)


Lucas De Marchi (1):
  drm/xe/ads: Use flexible-array

Matthew Brost (1):
  drm/xe: Use ordered WQ for G2H handler

 drivers/gpu/drm/xe/xe_guc_ads.c  | 2 +-
 drivers/gpu/drm/xe/xe_guc_ct.c   | 5 +
 drivers/gpu/drm/xe/xe_guc_ct.h   | 2 +-
 drivers/gpu/drm/xe/xe_guc_ct_types.h | 2 ++
 4 files changed, 9 insertions(+), 2 deletions(-)


[PULL] drm-xe-next-fixes

2024-05-02 Thread Thomas Hellstrom
Dave, Sima

This week's small set of fixes for drm-next.

drm-xe-next-fixes-2024-05-02:
Driver Changes:
- Fix for a backmerge going slightly wrong.
- An UAF fix
- Avoid a WA error on LNL.

Thanks,
Thomas

The following changes since commit 4a56c0ed5aa0bcbe1f5f7d755fb1fe1ebf48ae9c:

  Merge tag 'amd-drm-next-6.10-2024-04-26' of 
https://gitlab.freedesktop.org/agd5f/linux into drm-next (2024-04-30 14:43:00 
+1000)

are available in the Git repository at:

  https://gitlab.freedesktop.org/drm/xe/kernel.git 
tags/drm-xe-next-fixes-2024-05-02

for you to fetch changes up to 3bc8848bb7f7478e6806e4522b06b63f40a53e1e:

  drm/xe: Merge 16021540221 and 18034896535 WAs (2024-05-02 11:29:42 +0200)


Driver Changes:
- Fix for a backmerge going slightly wrong.
- An UAF fix
- Avoid a WA error on LNL.


Lucas De Marchi (1):
  drm/xe: Merge 16021540221 and 18034896535 WAs

Matthew Auld (1):
  drm/xe/vm: prevent UAF in rebind_work_func()

Thomas Hellström (1):
  drm/xe: Fix unexpected backmerge results

 drivers/gpu/drm/xe/xe_vm.c   | 16 ++--
 drivers/gpu/drm/xe/xe_vm_types.h |  4 
 drivers/gpu/drm/xe/xe_wa.c   |  7 +--
 3 files changed, 15 insertions(+), 12 deletions(-)


[PULL] drm-xe-next

2024-04-23 Thread Thomas Hellstrom
Hi, Dave, Sima

The main -next 6.10 pull request for the xe driver. I scanned through the 
patches and
tried to provide a somewhat condensed log below.

Nothing spectacular in the uAPI changes. Among other things there are some flags
that are reinstated now that we have published UMD for them. Unfortunately some
of the underlying implementation got somehow lost in a backmerge but there is a
patch pending to reinstate that. Will send another pull-request this week, or
if you want I can resend this one when the patch passes review and CI with the
patch included.

Some hickups unfortunately in that we carry a couple of i915 patches.
One that got mistakenly commited to drm-xe-next, but was later acked-by
Rodrigo for carrying in drm-xe-next to simplify handling. There is also one
that was part of the PM rework, and a fix for that patch.

Thanks,
Thomas

drm-xe-next-2024-04-23:
UAPI Changes:
- Remove unused flags (Francois Dugast)
- Extend uAPI to query HuC micro-controler firmware version (Francois Dugast)
- drm/xe/uapi: Define topology types as indexes rather than masks
  (Francois Dugast)
- drm/xe/uapi: Restore flags VM_BIND_FLAG_READONLY and VM_BIND_FLAG_IMMEDIATE
  (Francois Dugast)
- devcoredump updates. Some touching the output format.
  (José Roberto de Souza, Matthew Brost)
- drm/xe/hwmon: Add infra to support card power and energy attributes
- Improve LRC, HWSP and HWCTX error capture. (Maarten Lankhorst)
- drm/xe/uapi: Add IP version and stepping to GT list query (Matt roper)
- Invalidate userptr VMA on page pin fault (Matthew Brost)
- Improve xe_bo_move tracepoint (Priyanka Danamudi)
- Align fence output format in ftrace log

Cross-driver Changes:
- drm/i915/hwmon: Get rid of devm (Ashutosh Dixit)
  (Acked-by: Rodrigo Vivi )
- drm/i915/display: convert inner wakeref get towards get_if_in_use
  (SOB Rodrigo Vivi)
- drm/i915: Convert intel_runtime_pm_get_noresume towards raw wakeref
  (Committer, SOB Jani Nikula)

Driver Changes:
- Fix for unneeded CCS metadata allocation (Akshata Jahagirdar)
- Fix for fix multicast support for Xe_LP platforms (Andrzej Hajda)
- A couple of build fixes (Arnd Bergmann)
- Fix register definition (Ashutosh Dixit)
- Add BMG mocs table (Balasubramani Vivekanandan)
- Replace sprintf() across driver (Bommu Krishnaiah)
- Add an xe2 workaround (Bommu Krishnaiah)
- Makefile fix (Dafna Hirschfeld)
- force_wake_get error value check (Daniele Ceraolo Spurio)
- Handle GSCCS ER interrupt (Daniele Ceraolo Spurio)
- GSC Workaround (Daniele Ceraolo Spurio)
- Build error fix (Dawei Li)
- drm/xe/gt: Add L3 bank mask to GT topology (Francois Dugast)
- Implement xe2- and GuC workarounds (Gustavo Sousa, Haridhar Kalvala,
  Himal rasad Ghimiray, John Harrison, Matt Roper, Radhakrishna Sripada,
  Vinay Belgaumkar, Badal Nilawar)
- xe2hpg compression (Himal Ghimiray Prasad)
- Error code cleanups and fixes (Himal Prasad Ghimiray)
- struct xe_device cleanup (Jani Nikula)
- Avoid validating bos when only requesting an exec dma-fence
  (José Roberto de Souza)
- Remove debug message from migrate_clear (José Roberto de Souza)
- Nuke EXEC_QUEUE_FLAG_PERSISTENT leftover internal flag (José Roberto de Souza)
- Mark dpt and related vma as uncached (Juha-Pekka Heikkila)
- Hwmon updates (Karthik Poosa)
- KConfig fix when ACPI_WMI selcted (Lu Yao)
- Update intel_uncore_read*() return types (Luca Coelho)
- Mocs updates (Lucas De Marchi, Matt Roper)
- Drop dynamic load-balancing workaround (Lucas De Marchi)
- Fix a PVC workaround (Lucas De Marchi)
- Group live kunit tests into a single module (Lucas De Marchi)
- Various code cleanups (Lucas De Marchi)
- Fix a ggtt init error patch and move ggtt invalidate out of ggtt lock
  (Maarten Lankhorst)
- Fix a bo leak (Marten Lankhorst)
- Add LRC parsing for more GPU instructions (Matt Roper)
- Add various definitions for hardware and IP (Matt Roper)
- Define all possible engines in media IP descriptors (Matt Roper)
- Various cleanups, asserts and code fixes (Matthew Auld)
- Various cleanups and code fixes (Matthew Brost)
- Increase VM_BIND number of per-ioctl Ops (Matthew Brost, Paulo Zanoni)
- Don't support execlists in xe_gt_tlb_invalidation layer (Matthew Brost)
- Handle timing out of already signaled jobs gracefully (Matthew Brost)
- Pipeline evict / restore of pinned BOs during suspend / resume (Matthew Brost)
- Do not grab forcewakes when issuing GGTT TLB invalidation via GuC
  (Matthew Brost)
- Drop ggtt invalidate from display code (Matthew Brost)
- drm/xe: Add XE_BO_GGTT_INVALIDATE flag (Matthew Brost)
- Add debug messages for MMU notifier and VMA invalidate (Matthew Brost)
- Use ordered wq for preempt fence waiting (Matthew Brost)
- Initial development for SR-IOV support including some refactoring
  (Michal Wajdeczko)
- Various GuC- and GT- related cleanups and fixes (Michal Wajdeczko)
- Move userptr over to start using hmm_range_fault (Oak Zeng)
- Add new PCI IDs to DG2 platform (Ravi Kumar Vodapalli)
- Pcode - and VRAM initialization check update (Riana 

[PULL] drm-xe-next-fixes

2024-03-14 Thread Lucas De Marchi

Hi Dave and Sima,

Here are the drm-xe fixes for the 6.9 cycle. Just 3 fixes: one trivial
fix for error path handling, one to avoid pinning all VMAs in
drm_gpuvm_exec_lock() when num_batch_buffer passed to xe_exec is 0 and
the other to allow userspace to free userptr while still having
bindings.

Lucas De Marchi

drm-xe-next-fixes-2024-03-14:
Driver changes:

- Invalidate userptr VMA on page pin fault, allowing userspace
  to free userptr while still having bindings
- Fail early on sysfs file creation error
- Skip VMA pinning on xe_exec with num_batch_buffer == 0

The following changes since commit e62d2e00780b4a465c77d2229837495fcbc480d3:

  drm/xe: Replace 'grouped target' in Makefile with pattern rule (2024-03-04 
08:41:28 -0600)

are available in the Git repository at:

  https://gitlab.freedesktop.org/drm/xe/kernel.git 
tags/drm-xe-next-fixes-2024-03-14

for you to fetch changes up to dd8a07f06dfd946e0eea1a3323d52e7c28a6ed80:

  drm/xe: Skip VMAs pin when requesting signal to the last XE_EXEC (2024-03-14 
14:29:42 -0500)


Driver changes:

- Invalidate userptr VMA on page pin fault, allowing userspace
  to free userptr while still having bindings
- Fail early on sysfs file creation error
- Skip VMA pinning on xe_exec with num_batch_buffer == 0


Himal Prasad Ghimiray (1):
  drm/xe: Return if kobj creation is failed

José Roberto de Souza (1):
  drm/xe: Skip VMAs pin when requesting signal to the last XE_EXEC

Matthew Brost (1):
  drm/xe: Invalidate userptr VMA on page pin fault

 drivers/gpu/drm/xe/xe_exec.c | 41 
 drivers/gpu/drm/xe/xe_gt_pagefault.c |  4 ++--
 drivers/gpu/drm/xe/xe_trace.h|  2 +-
 drivers/gpu/drm/xe/xe_vm.c   | 32 +---
 drivers/gpu/drm/xe/xe_vm_types.h |  7 ++
 drivers/gpu/drm/xe/xe_vram_freq.c|  4 +++-
 6 files changed, 55 insertions(+), 35 deletions(-)


[PULL] drm-xe-next-fixes

2024-03-04 Thread Lucas De Marchi

Hi Dave and Sima,

A few xe fixes for 6.9.

drm-xe-next-fixes-2024-03-04:
Driver Changes:

- Fix kunit link failure with built-in xe
- Fix one more 32-bit build failure with ARM compiler
- Fix initialization order of topology struct
- Cleanup unused fields in struct xe_vm
- Fix xe_vm leak when handling page fault on a VM not in fault mode
- Drop use of "grouped target" feature in Makefile since that's
  only available in make >= 4.3

thanks,
Lucas De Marchi

The following changes since commit c6d6a82d8a9f8f9326b760accaa532b839b80140:

  Merge tag 'drm-misc-next-fixes-2024-02-29' of 
https://anongit.freedesktop.org/git/drm/drm-misc into drm-next (2024-03-01 
19:38:13 +1000)

are available in the Git repository at:

  ssh://g...@gitlab.freedesktop.org/drm/xe/kernel.git 
tags/drm-xe-next-fixes-2024-03-04

for you to fetch changes up to e62d2e00780b4a465c77d2229837495fcbc480d3:

  drm/xe: Replace 'grouped target' in Makefile with pattern rule (2024-03-04 
08:41:28 -0600)


Driver Changes:

- Fix kunit link failure with built-in xe
- Fix one more 32-bit build failure with ARM compiler
- Fix initialization order of topology struct
- Cleanup unused fields in struct xe_vm
- Fix xe_vm leak when handling page fault on a VM not in fault mode
- Drop use of "grouped target" feature in Makefile since that's
  only available in make >= 4.3


Arnd Bergmann (2):
  drm/xe/kunit: fix link failure with built-in xe
  drm/xe/xe2: fix 64-bit division in pte_update_size

Dafna Hirschfeld (1):
  drm/xe: Replace 'grouped target' in Makefile with pattern rule

Matthew Brost (1):
  drm/xe: Fix ref counting leak on page fault

Mika Kuoppala (1):
  drm/xe: Remove obsolete async_ops from struct xe_vm

Zhanjun Dong (1):
  drm/xe/guc: Fix missing topology init

 drivers/gpu/drm/xe/Kconfig   |  1 +
 drivers/gpu/drm/xe/Kconfig.debug |  1 -
 drivers/gpu/drm/xe/Makefile  |  9 ++---
 drivers/gpu/drm/xe/xe_gt.c   |  3 +--
 drivers/gpu/drm/xe/xe_gt_pagefault.c |  6 --
 drivers/gpu/drm/xe/xe_migrate.c  |  2 +-
 drivers/gpu/drm/xe/xe_vm_types.h | 24 
 7 files changed, 13 insertions(+), 33 deletions(-)


Re: [PULL] drm-xe-next

2024-02-26 Thread Lucas De Marchi

On Mon, Feb 26, 2024 at 10:46:43AM +, Daniel Stone wrote:

Hi,

On Mon, 26 Feb 2024 at 03:21, Lucas De Marchi  wrote:

All of this should be fixed by now: dim is used for applying and pushing
patches, which has additional checks so that doesn't happen again. Still
pending confirmation from Daniel Stone if the git server hooks are ready
in gitlab so we properly forbid pushes without dim, like we do with the
git.fd.o infra.


Yeah, I did that last week.


thanks!

Lucas De Marchi



Cheers,
Daniel


Re: [PULL] drm-xe-next

2024-02-26 Thread Daniel Stone
Hi,

On Mon, 26 Feb 2024 at 03:21, Lucas De Marchi  wrote:
> All of this should be fixed by now: dim is used for applying and pushing
> patches, which has additional checks so that doesn't happen again. Still
> pending confirmation from Daniel Stone if the git server hooks are ready
> in gitlab so we properly forbid pushes without dim, like we do with the
> git.fd.o infra.

Yeah, I did that last week.

Cheers,
Daniel


Re: [PULL] drm-xe-next

2024-02-26 Thread Daniel Vetter
On Sun, Feb 25, 2024 at 09:21:00PM -0600, Lucas De Marchi wrote:
> Hi Dave and Sima,
> 
> Here's the PR for drm-xe-next for Linux v6.9. It's a big list of
> changes, but it contains several fixes for things noticed throughout the
> v6.8 cycle after being merged upstream, added to the linux-next, etc.
> Approximately 30% are fixes already sent or on its way to v6.8.
> 
> First, the bad part: this still shows some issues of not being properly
> integrated with our tooling, with this one being the worst:
> https://lore.kernel.org/all/20240221173645.225a9...@canb.auug.org.au/.
> Some of the committers didn't add their s-o-b while applying patches.  I
> checked that all the affected patches do contain the s-o-b by the author
> and come from the same company (Intel).
> 
> Also due to the same reason, some commits are missing a Link trailer to
> the mailing list discussion. Often these patches were applied with bare
> git-am or b4.
> 
> All of this should be fixed by now: dim is used for applying and pushing
> patches, which has additional checks so that doesn't happen again. Still
> pending confirmation from Daniel Stone if the git server hooks are ready
> in gitlab so we properly forbid pushes without dim, like we do with the
> git.fd.o infra.
> 
> Finally, we enabled again building for 32b, but on Friday we received
> bug reports that it still fails with clang. There are some fixes being
> reviewed and we should have them ready next week.
> 
> Summary of the changes are below.
> 
> drm-xe-next-2024-02-25:
> drm/xe feature pull for v6.9:
> 
> UAPI Changes:
> 
> - New query to the GuC firmware submission version. (José Roberto de Souza)
> - Remove unused persistent exec_queues (Thomas Hellström)
> - Add vram frequency sysfs attributes (Sujaritha Sundaresan, Rodrigo Vivi)
> - Add the flag XE_VM_BIND_FLAG_DUMPABLE to notify devcoredump that mapping
>   should be dumped (Maarten Lankhorst)
> 
> Cross-drivers Changes:
> 
> - Make sure intel_wakeref_t is treated as opaque type on i915-display
>   and fix its type on xe
> 
> Driver Changes:
> 
> - Drop pre-production workarounds (Matt Roper)
> - Drop kunit tests for unsuported platforms: PVC and pre-production DG2 
> (Lucas De Marchi)
> - Start pumbling SR-IOV support with memory based interrupts
>   for VF (Michal Wajdeczko)
> - Allow to map BO in GGTT with PAT index corresponding to
>   XE_CACHE_UC to work with memory based interrupts (Michal Wajdeczko)
> - Improve logging with GT-oriented drm_printers (Michal Wajdeczko)
> - Add GuC Doorbells Manager as prep work SR-IOV during
>   VF provisioning ((Michal Wajdeczko)
> - Refactor fake device handling in kunit integration ((Michal Wajdeczko)
> - Implement additional workarounds for xe2 and MTL (Tejas Upadhyay,
>   Lucas De Marchi, Shekhar Chauhan, Karthik Poosa)
> - Program a few registers according to perfomance guide spec for Xe2 (Shekhar 
> Chauhan)
> - Add error handling for non-blocking communication with GuC (Daniele Ceraolo 
> Spurio)
> - Fix remaining 32b build issues and enable it back (Lucas De  Marchi)
> - Fix build with CONFIG_DEBUG_FS=n (Jani Nikula)
> - Fix warnings from GuC ABI headers (Matthew Brost)
> - Introduce Relay Communication for SR-IOV for VF <-> GuC <-> PF (Michal 
> Wajdeczko)
> - Add mocs reset kunit (Ruthuvikas Ravikumar)
> - Fix spellings (Colin Ian King)
> - Disable mid-thread preemption when not properly supported by hardware 
> (Nirmoy Das)
> - Release mmap mappings on rpm suspend (Badal Nilawar)
> - Fix BUG_ON on xe_exec by moving fence reservation to the validate stage 
> (Matthew Auld)
> - Fix xe_exec by reserving extra fence slot for CPU bind (Matthew Brost)
> - Fix xe_exec with full long running exec queue, now returning
>   -EWOULDBLOCK to userspace (Matthew Brost)
> - Fix CT irq handler when CT is disabled (Matthew Brost)
> - Fix VM_BIND_OP_UNMAP_ALL without any bound vmas (Thomas Hellström)
> - Fix missing __iomem annotations (Thomas Hellström)
> - Fix exec queue priority handling with GuC (Brian Welty)
> - Fix setting SLPC flag to GuC when it's not supported (Vinay Belgaumkar)
> - Fix C6 disabling without SLPC (Matt Roper)
> - Drop -Wstringop-overflow to fix build with GCC11 (Paul E. McKenney)
> - Circumvent bogus -Wstringop-overflow in one case (Arnd Bergmann)
> - Refactor exec_queue user extensions handling and fix USM attributes
>   being applied too late (Brian Welty)
> - Use circ_buf head/tail convention (Matthew Brost)
> - Fail build if circ_buf-related defines are modified with incompatible values
>   (Matthew Brost)
> - Fix several error paths (Dan Carpenter)
> - Fix CCS copy for small VRAM copy chunks (Thomas Hellström)
> - Rework driver initialization order and paths to account for driver running
>   in VF mode (Michal Wajdeczko)
> - Initialize GuC earlier during probe to handle driver in VF mode (Michał 
> Winiarski)
> - Fix migration use of MI_STORE_DATA_IMM to write PTEs (Matt Roper)
> - Fix bounds checking in __xe_bo_placement_for_flags (Brian Welty)
> - Drop 

[PULL] drm-xe-next

2024-02-25 Thread Lucas De Marchi

Hi Dave and Sima,

Here's the PR for drm-xe-next for Linux v6.9. It's a big list of
changes, but it contains several fixes for things noticed throughout the
v6.8 cycle after being merged upstream, added to the linux-next, etc.
Approximately 30% are fixes already sent or on its way to v6.8.

First, the bad part: this still shows some issues of not being properly
integrated with our tooling, with this one being the worst:
https://lore.kernel.org/all/20240221173645.225a9...@canb.auug.org.au/.
Some of the committers didn't add their s-o-b while applying patches.  I
checked that all the affected patches do contain the s-o-b by the author
and come from the same company (Intel).

Also due to the same reason, some commits are missing a Link trailer to
the mailing list discussion. Often these patches were applied with bare
git-am or b4.

All of this should be fixed by now: dim is used for applying and pushing
patches, which has additional checks so that doesn't happen again. Still
pending confirmation from Daniel Stone if the git server hooks are ready
in gitlab so we properly forbid pushes without dim, like we do with the
git.fd.o infra.

Finally, we enabled again building for 32b, but on Friday we received
bug reports that it still fails with clang. There are some fixes being
reviewed and we should have them ready next week.

Summary of the changes are below.

drm-xe-next-2024-02-25:
drm/xe feature pull for v6.9: 


UAPI Changes:

- New query to the GuC firmware submission version. (José Roberto de Souza)
- Remove unused persistent exec_queues (Thomas Hellström)
- Add vram frequency sysfs attributes (Sujaritha Sundaresan, Rodrigo Vivi)
- Add the flag XE_VM_BIND_FLAG_DUMPABLE to notify devcoredump that mapping
  should be dumped (Maarten Lankhorst)

Cross-drivers Changes:

- Make sure intel_wakeref_t is treated as opaque type on i915-display
  and fix its type on xe

Driver Changes:

- Drop pre-production workarounds (Matt Roper)
- Drop kunit tests for unsuported platforms: PVC and pre-production DG2 (Lucas 
De Marchi)
- Start pumbling SR-IOV support with memory based interrupts
  for VF (Michal Wajdeczko)
- Allow to map BO in GGTT with PAT index corresponding to
  XE_CACHE_UC to work with memory based interrupts (Michal Wajdeczko)
- Improve logging with GT-oriented drm_printers (Michal Wajdeczko)
- Add GuC Doorbells Manager as prep work SR-IOV during
  VF provisioning ((Michal Wajdeczko)
- Refactor fake device handling in kunit integration ((Michal Wajdeczko)
- Implement additional workarounds for xe2 and MTL (Tejas Upadhyay,
  Lucas De Marchi, Shekhar Chauhan, Karthik Poosa)
- Program a few registers according to perfomance guide spec for Xe2 (Shekhar 
Chauhan)
- Add error handling for non-blocking communication with GuC (Daniele Ceraolo 
Spurio)
- Fix remaining 32b build issues and enable it back (Lucas De  Marchi)
- Fix build with CONFIG_DEBUG_FS=n (Jani Nikula)
- Fix warnings from GuC ABI headers (Matthew Brost)
- Introduce Relay Communication for SR-IOV for VF <-> GuC <-> PF (Michal 
Wajdeczko)
- Add mocs reset kunit (Ruthuvikas Ravikumar)
- Fix spellings (Colin Ian King)
- Disable mid-thread preemption when not properly supported by hardware (Nirmoy 
Das)
- Release mmap mappings on rpm suspend (Badal Nilawar)
- Fix BUG_ON on xe_exec by moving fence reservation to the validate stage 
(Matthew Auld)
- Fix xe_exec by reserving extra fence slot for CPU bind (Matthew Brost)
- Fix xe_exec with full long running exec queue, now returning
  -EWOULDBLOCK to userspace (Matthew Brost)
- Fix CT irq handler when CT is disabled (Matthew Brost)
- Fix VM_BIND_OP_UNMAP_ALL without any bound vmas (Thomas Hellström)
- Fix missing __iomem annotations (Thomas Hellström)
- Fix exec queue priority handling with GuC (Brian Welty)
- Fix setting SLPC flag to GuC when it's not supported (Vinay Belgaumkar)
- Fix C6 disabling without SLPC (Matt Roper)
- Drop -Wstringop-overflow to fix build with GCC11 (Paul E. McKenney)
- Circumvent bogus -Wstringop-overflow in one case (Arnd Bergmann)
- Refactor exec_queue user extensions handling and fix USM attributes
  being applied too late (Brian Welty)
- Use circ_buf head/tail convention (Matthew Brost)
- Fail build if circ_buf-related defines are modified with incompatible values
  (Matthew Brost)
- Fix several error paths (Dan Carpenter)
- Fix CCS copy for small VRAM copy chunks (Thomas Hellström)
- Rework driver initialization order and paths to account for driver running
  in VF mode (Michal Wajdeczko)
- Initialize GuC earlier during probe to handle driver in VF mode (Michał 
Winiarski)
- Fix migration use of MI_STORE_DATA_IMM to write PTEs (Matt Roper)
- Fix bounds checking in __xe_bo_placement_for_flags (Brian Welty)
- Drop display dependency on CONFIG_EXPERT (Jani Nikula)
- Do not hand-roll kstrdup when creating snapshot (Michal Wajdeczko)
- Stop creating one kunit module per kunit suite (Lucas De Marchi)
- Reduce scope and constify variables (Thomas Hellström, Jani Nikula, Michal 

[PULL] drm-xe-next-fixes

2024-01-16 Thread Thomas Hellström
Hi Maintainers,

Various fixes for the Xe driver, as described below, for -rc1.

Thanks,
Thomas


The following changes since commit 315acff5196f4e2f84a2a2d093000e0c6b0b4d1c:

  drm/xe: Fix warning on impossible condition (2023-12-26 12:53:26 -0500)

are available in the Git repository at:

  https://gitlab.freedesktop.org/drm/xe/kernel.git 
tags/drm-xe-next-fixes-2024-01-16

for you to fetch changes up to bf3ff145df184698a8a80b33265064638572366f:

  drm/xe: display support should not depend on EXPERT (2024-01-15 21:40:32 
+0100)


Driver Changes:
- Fix for definition of wakeref_t
- Fix for an error code aliasing
- Fix for VM_UNBIND_ALL in the case there are no bound VMAs
- Fixes for a number of __iomem address space mismatches reported by sparse
- Fixes for the assignment of exec_queue priority
- A Fix for skip_guc_pc not taking effect
- Workaround for a build problem on GCC 11
- A couple of fixes for error paths
- Fix a Flat CCS compression metadata copy issue
- Fix a misplace array bounds checking
- Don't have display support depend on EXPERT (as discussed on IRC)


Brian Welty (3):
  drm/xe: Fix guc_exec_queue_set_priority
  drm/xe: Fix modifying exec_queue priority in xe_migrate_init
  drm/xe: Fix bounds checking in __xe_bo_placement_for_flags()

Dan Carpenter (3):
  drm/xe/device: clean up on error in probe()
  drm/xe/selftests: Fix an error pointer dereference bug
  drm/xe: unlock on error path in xe_vm_add_compute_exec_queue()

Jani Nikula (1):
  drm/xe: display support should not depend on EXPERT

José Roberto de Souza (1):
  drm/xe: Fix definition of intel_wakeref_t

Matthew Brost (1):
  drm/xe: Fix exec IOCTL long running exec queue ring full condition

Paul E. McKenney (1):
  drm/xe: Fix build bug for GCC 11

Thomas Hellström (6):
  drm/xe/vm: Fix an error path
  drm/xe: Use __iomem for the regs pointer
  drm/xe: Annotate xe_mem_region::mapping with __iomem
  drm/xe: Annotate multiple mmio pointers with __iomem
  drm/xe: Annotate xe_ttm_stolen_mgr::mapping with __iomem
  drm/xe/migrate: Fix CCS copy for small VRAM copy chunks

Vinay Belgaumkar (1):
  drm/xe: Check skip_guc_pc before setting SLPC flag

 drivers/gpu/drm/xe/Kconfig |   2 +-
 drivers/gpu/drm/xe/Makefile|   1 -
 .../gpu/drm/xe/compat-i915-headers/intel_wakeref.h |   2 +-
 drivers/gpu/drm/xe/tests/xe_bo.c   |   5 +-
 drivers/gpu/drm/xe/tests/xe_migrate.c  |   2 +-
 drivers/gpu/drm/xe/xe_bo.c |  16 +--
 drivers/gpu/drm/xe/xe_device.c |   2 +-
 drivers/gpu/drm/xe/xe_device_types.h   |   8 +-
 drivers/gpu/drm/xe/xe_exec.c   |   7 +-
 drivers/gpu/drm/xe/xe_exec_queue.c |   5 +
 drivers/gpu/drm/xe/xe_exec_queue_types.h   |   6 +-
 drivers/gpu/drm/xe/xe_gt_freq.c|   3 +
 drivers/gpu/drm/xe/xe_guc.c|   7 +-
 drivers/gpu/drm/xe/xe_guc_submit.c |   7 +-
 drivers/gpu/drm/xe/xe_migrate.c| 133 +
 drivers/gpu/drm/xe/xe_mmio.c   |   2 +-
 drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c |   4 +-
 drivers/gpu/drm/xe/xe_vm.c |  15 ++-
 18 files changed, 136 insertions(+), 91 deletions(-)