1. 23 Feb, 2024 3 commits
    • Matthew Brost's avatar
      drm/xe: Fix execlist splat · ddadc712
      Matthew Brost authored
      Although execlist submission is not supported it should be kept in a
      basic working state as it can be used for very early hardware bring up.
      Fix the below splat.
      
      WARNING: CPU: 3 PID: 11 at drivers/gpu/drm/xe/xe_execlist.c:217 execlist_run_job+0x1c2/0x220 [xe]
      Modules linked in: xe drm_kunit_helpers drm_gpuvm drm_ttm_helper ttm drm_exec drm_suballoc_helper drm_buddy gpu_sched mei_pxp mei_hdcp wmi_bmof x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul snd_hda_intel ghash_clmulni_intel snd_intel_dspcfg snd_hda_codec snd_hwdep snd_hda_core video snd_pcm mei_me mei wmi fuse e1000e i2c_i801 ptp i2c_smbus pps_core intel_lpss_pci
      CPU: 3 PID: 11 Comm: kworker/u16:0 Tainted: G     U             6.8.0-rc3-guc+ #1046
      Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.R00.3243.A01.2006102133 06/10/2020
      Workqueue: rcs0 drm_sched_run_job_work [gpu_sched]
      RIP: 0010:execlist_run_job+0x1c2/0x220 [xe]
      Code: 8b f8 03 00 00 4c 89 39 e9 e2 fe ff ff 49 8d 7d 20 be ff ff ff ff e8 ed fd a6 e1 85 c0 0f 85 e1 fe ff ff 0f 0b e9 da fe ff ff <0f> 0b 0f 0b 41 83 fc 03 0f 86 8a fe ff ff 0f 0b e9 83 fe ff ff be
      RSP: 0018:ffffc9000013bdb8 EFLAGS: 00010246
      RAX: ffff888105021a00 RBX: ffff888105078400 RCX: 0000000000000000
      RDX: 0000000000000001 RSI: ffffc9000013bd14 RDI: ffffc90001609090
      RBP: ffff88811e3f0040 R08: 0000000000000088 R09: 00000000ffffff81
      R10: 0000000000000001 R11: ffff88810c10c000 R12: 00000000fffffffe
      R13: ffff888109b72c28 R14: ffff8881050784a0 R15: ffff888105078408
      FS:  0000000000000000(0000) GS:ffff88849f980000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000563459d130f8 CR3: 000000000563a001 CR4: 0000000000f70ef0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      PKRU: 55555554
      Call Trace:
       <TASK>
       ? __warn+0x7f/0x170
       ? execlist_run_job+0x1c2/0x220 [xe]
       ? report_bug+0x1c7/0x1d0
       ? handle_bug+0x3c/0x70
       ? exc_invalid_op+0x18/0x70
       ? asm_exc_invalid_op+0x1a/0x20
       ? execlist_run_job+0x1c2/0x220 [xe]
       ? execlist_run_job+0x2c/0x220 [xe]
       drm_sched_run_job_work+0x246/0x3f0 [gpu_sched]
       ? process_one_work+0x18d/0x4e0
       process_one_work+0x1f7/0x4e0
       worker_thread+0x1da/0x3e0
       ? __pfx_worker_thread+0x10/0x10
       kthread+0xfe/0x130
       ? __pfx_kthread+0x10/0x10
       ret_from_fork+0x2c/0x50
       ? __pfx_kthread+0x10/0x10
       ret_from_fork_asm+0x1b/0x30
       </TASK>
      
      Fixes: 9b9529ce ("drm/xe: Rename engine to exec_queue")
      Signed-off-by: default avatarMatthew Brost <matthew.brost@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240222232021.3911545-2-matthew.brost@intel.com
      ddadc712
    • Francois Dugast's avatar
      drm/xe/uapi: Remove unused flags · 84a1ed5e
      Francois Dugast authored
      Those cases missed in previous uAPI cleanups were mostly accidentally
      brought in from i915 or created to exercise the possibilities of gpuvm
      but they are not used by userspace yet, so let's remove them. They can
      still be brought back later if needed.
      
      v2:
      - Fix XE_VM_FLAG_FAULT_MODE support in xe_lrc.c (Brian Welty)
      - Leave DRM_XE_VM_BIND_OP_UNMAP_ALL (José Roberto de Souza)
      - Ensure invalid flag values are rejected (Rodrigo Vivi)
      
      v3: Rebase after removal of persistent exec_queues (Francois Dugast)
      
      v4: Rodrigo: Rebase after the new dumpable flag.
      
      Fixes: dd08ebf6 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
      Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarFrancois Dugast <francois.dugast@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240222232356.175431-1-rodrigo.vivi@intel.com
      84a1ed5e
    • Erick Archer's avatar
      drm/xe: Prefer struct_size over open coded arithmetic · a7a3d736
      Erick Archer authored
      This is an effort to get rid of all multiplications from allocation
      functions in order to prevent integer overflows [1].
      
      As the "q" variable is a pointer to "struct xe_exec_queue" and this
      structure ends in a flexible array:
      
      struct xe_exec_queue {
      	[...]
      	struct xe_lrc lrc[];
      };
      
      the preferred way in the kernel is to use the struct_size() helper to
      do the arithmetic instead of the argument "size + size * count" in the
      kzalloc() function.
      
      This way, the code is more readable and more safer.
      
      Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments [1]
      Link: https://github.com/KSPP/linux/issues/160 [2]
      Signed-off-by: default avatarErick Archer <erick.archer@gmx.com>
      Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240210141913.6611-1-erick.archer@gmx.com
      a7a3d736
  2. 22 Feb, 2024 3 commits
  3. 21 Feb, 2024 6 commits
  4. 20 Feb, 2024 13 commits
  5. 19 Feb, 2024 1 commit
  6. 16 Feb, 2024 2 commits
    • Dave Airlie's avatar
      Merge tag 'drm-misc-next-2024-02-15' of git://anongit.freedesktop.org/drm/drm-misc into drm-next · 9ac4beb7
      Dave Airlie authored
      drm-misc-next for v6.9:
      
      UAPI Changes:
      
      Cross-subsystem Changes:
      
      arch:
      - powerpc/ps3: select CONFIG_VIDEO
      
      Core Changes:
      
      ci:
      - msm: fix apq8016 runner
      
      display:
      - use newer DRM print helpers
      
      documentation:
      - fix typos
      
      print:
      - add device-specific error and debug printers
      
      sysfb:
      - set Linux parent device for firmware framebuffer
      
      tests:
      - mm: use newer DRM print helpers
      
      Driver Changes:
      
      bridge:
      - switch to ->read_edid callback throughout the bridge
      drivers
      - remove old ->get_edid callback
      
      i915:
      - use newer DRM print helpers
      
      lima:
      - improve stability by fixes to error handling and recovery
      
      mediathek:
      - switch to ->read_edid callback
      
      msm:
      - switch to ->read_edid callback
      
      omap:
      - switch to ->read_edid callback
      
      panel:
      - add Powkiddy RGB10MAX3 plus DT bindings
      - st7703: support panel rotation plus DT bindings
      
      rockchip:
      - DT bindings: remove port, add power-domains
      
      xe:
      - use newer DRM print helpers
      
      xlnx:
      - switch to ->read_edid callback
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQEzBAABCgAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAmXOD/oACgkQaA3BHVML
      # eiMWMAgArTVXF4UQ+FUxYZB5QTm2veYIpilvwmzaQLNxsM9SsWpzwMIVAi+xf93g
      # uqUqkl6QvZ9pJg6bxuXRNcJw/GObIO4x6tn+LkbccczgHiHwvn6ydNdUoMx8ulne
      # EsGC0z8bb5Gpwh9b/pnBul2AoIE7PHAJltgH271/O2xnhFMUbchQ0ckHvWnn8/GA
      # Nef145ySX4gkYtY8u2TRr4r6Bkp7Tpiyv6ipU7Cpu7KqyveTDMx3c9r5FaiHnJT/
      # Hx/5s87q0Bx2m+iNjlBLJzYjF2UWth+pbfiu3xwyWOE7hdkPLwCQ5mqHWcFFqxfb
      # Vuj9jP+Vb68L7EvGpq2LArLdhZjHIQ==
      # =SsjX
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Thu 15 Feb 2024 23:22:02 AEST
      # gpg:                using RSA key 7217FBAC8CE9CF6344A168E5680DC11D530B7A23
      # gpg: Can't check signature: No public key
      From: Thomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240215132610.GA1464@localhost.localdomain
      9ac4beb7
    • Dave Airlie's avatar
      Merge tag 'drm-intel-gt-next-2024-02-15' of... · 6f167a36
      Dave Airlie authored
      Merge tag 'drm-intel-gt-next-2024-02-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
      
      UAPI Changes:
      
      - Add GuC submission interface version query (Tvrtko Ursulin)
      
      Driver Changes:
      
      Fixes/improvements/new stuff:
      
      - Atomically invalidate userptr on mmu-notifier (Jonathan Cavitt)
      - Update handling of MMIO triggered reports (Umesh Nerlige Ramappa)
      - Don't make assumptions about intel_wakeref_t type (Jani Nikula)
      - Add workaround 14019877138 [xelpg] (Tejas Upadhyay)
      - Allow for very slow HuC loading [huc] (John Harrison)
      - Flush context destruction worker at suspend [guc] (Alan Previn)
      - Close deregister-context race against CT-loss [guc] (Alan Previn)
      - Avoid circular locking issue on busyness flush [guc] (John Harrison)
      - Use rc6.supported flag from intel_gt for rc6_enable sysfs (Juan Escamilla)
      - Reflect the true and current status of rc6_enable (Juan Escamilla)
      - Wake GT before sending H2G message [mtl] (Vinay Belgaumkar)
      - Restart the heartbeat timer when forcing a pulse (John Harrison)
      
      Future platform enablement:
      
      - Extend driver code of Xe_LPG to Xe_LPG+ [xelpg] (Harish Chegondi)
      - Extend some workarounds/tuning to gfx version 12.74 [xelpg] (Matt Roper)
      
      Miscellaneous:
      
      - Reconcile Excess struct member kernel-doc warnings (Randy Dunlap)
      - Change wa and EU_PERF_CNTL registers to MCR type [guc] (Shuicheng Lin)
      - Add flex arrays to struct i915_syncmap (Erick Archer)
      - Increasing the sleep time for live_rc6_manual [selftests] (Anirban Sk)
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/Zc3iIVsiAwo+bu10@tursulin-desk
      6f167a36
  7. 15 Feb, 2024 3 commits
    • Dave Airlie's avatar
      Merge tag 'drm-intel-next-2024-02-07' of git://anongit.freedesktop.org/drm/drm-intel into drm-next · b13cfb44
      Dave Airlie authored
      drm/i915 feature pull for v6.9:
      
      Features and functionality:
      - Early transport for panel replay and PSR (Jouni)
      - New ARL PCI IDs (Matt)
      - DP TPS4 PHY test pattern support (Khaled)
      
      Refactoring and cleanups:
      - Unify and improve VSC SDP for PSR and non-PSR cases (Jouni)
      - Refactor memory regions and improve debug logging (Ville)
      - Rework global state serialization (Ville)
      - Remove unused CDCLK divider fields (Gustavo)
      - Unify HDCP connector logging format (Jani)
      - Use display instead of graphics version in display code (Jani)
      - Move VBT and opregion debugfs next to the implementation (Jani)
      - Abstract opregion interface, use opaque type (Jani)
      
      Fixes:
      - Fix MTL stolen memory access (Ville)
      - Fix initial display plane readout for MTL (Ville)
      - Fix HPD handling during driver init/shutdown (Imre)
      - Cursor vblank evasion fixes (Ville)
      - Various VSC SDP fixes (Jouni)
      - Allow PSR mode changes without full modeset (Jouni)
      - Fix CDCLK sanitization on module load for Xe2_LPD (Gustavo)
      - Fix the max DSC bpc supported by the source (Ankit)
      - Add missing LNL ALPM AUX wake configuration (Jouni)
      - Cx0 PHY state readout and verify fixes (Mika)
      - Fix PSR (panel replay) debugfs for MST connectors (Imre)
      - Fail HDCP repeater authentication if Type1 device not present (Suraj)
      - Ratelimit debug logging in vm_fault_ttm (Nirmoy)
      - Use a fake PCH for MTL because south display is not on the PCH (Haridhar)
      - Disable DSB for Xe driver for now (José)
      - Fix some LNL display register changes (Lucas)
      - Fix build on ChromeOS (Paz Zcharya)
      - Preserve current shared DPLL for fastsets on Type-C ports (Ville)
      - Fix state checker warnings for MG/TC/TBT PLLs (Ville)
      - Fix HDCP repeater ctl register value on errors (Jani)
      - Allow FBC with CCS modifiers on SKL+ (Ville)
      - Fix HDCP GGTT pinning (Ville)
      
      DRM core changes:
      - Add ratelimited drm dbg print (Nirmoy)
      - DPCD PSR early transport macro (Jouni)
      
      Merges:
      - Backmerge drm-next to bring Xe driver to drm-intel-next (Jani)
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Jani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/87cyt8cxsh.fsf@intel.com
      b13cfb44
    • Arnd Bergmann's avatar
      drm/xe: avoid function cast warnings · f2c9364d
      Arnd Bergmann authored
      clang-16 warns about a cast between incompatible function types:
      
      drivers/gpu/drm/xe/xe_range_fence.c:155:10: error: cast from 'void (*)(const void *)' to 'void (*)(struct xe_range_fence *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict]
        155 |         .free = (void (*)(struct xe_range_fence *rfence)) kfree,
            |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Avoid this with a trivial helper function that calls kfree() here.
      
      v2:
      - s/* rfence/*rfence/ (Thomas)
      
      Fixes: 845f64bd ("drm/xe: Introduce a range-fence utility")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarThomas Hellström <thomas.hellstrom@linux.intel.com>
      Signed-off-by: default avatarThomas Hellström <thomas.hellstrom@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240213095719.454865-1-arnd@kernel.org
      f2c9364d
    • John Harrison's avatar
      drm/i915/gt: Restart the heartbeat timer when forcing a pulse · eb927f01
      John Harrison authored
      The context persistence code does things like send super high priority
      heartbeat pulses to ensure any leaked context can still be pre-empted
      and thus isn't a total denial of service but only a minor denial of
      service. Unfortunately, it wasn't bothering to restart the heartbeat
      worker with a fresh timeout. Thus, if a persistent context happened to
      be closed just before the heartbeat was going to go ping anyway then
      the forced pulse would get a negligble execution time. And as the
      forced pulse is super high priority, the worker thread's next step is
      a reset. Which means a potentially innocent system randomly goes boom
      when attempting to close a context. So, force a re-schedule of the
      worker thread with the appropriate timeout.
      Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240110210216.4125092-1-John.C.Harrison@Intel.com
      eb927f01
  8. 14 Feb, 2024 9 commits