]> Git Repo - linux.git/commitdiff
Merge tag 'drm-intel-gt-next-2024-08-23' of https://gitlab.freedesktop.org/drm/i915...
authorDaniel Vetter <[email protected]>
Tue, 27 Aug 2024 10:55:16 +0000 (12:55 +0200)
committerDaniel Vetter <[email protected]>
Tue, 27 Aug 2024 10:55:17 +0000 (12:55 +0200)
UAPI Changes:

- Limit the number of relocations to INT_MAX (Tvrtko)

  Only impact should be synthetic tests.

Driver Changes:

- Fix for #11396: GPU Hang and rcs0 reset on Cherrytrail platform
- Fix Virtual Memory mapping boundaries calculation (Andi)
- Fix for #11255: Long hangs in buddy allocator with DG2/A380 without
  Resizable BAR since 6.9 (David)
- Mark the GT as dead when mmio is unreliable (Chris, Andi)
- Workaround additions / fixes for MTL, ARL and DG2 (John H, Nitin)
- Enable partial memory mapping of GPU virtual memory (Andi, Chris)

- Prevent NULL deref on intel_memory_regions_hw_probe (Jonathan, Dan)
- Avoid UAF on intel_engines_release (Krzysztof)

- Don't update PWR_CLK_STATE starting Gen12 (Umesh)
- Code and dmesg cleanups (Andi, Jesus, Luca)

Signed-off-by: Daniel Vetter <[email protected]>
From: Joonas Lahtinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1  2 
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
drivers/gpu/drm/i915/gt/intel_reset.c

index d54162ce0f99a0148fe7b098ad8ac935f8674457,8aff06933f5454383d41872e0f2270ffb286adfd..c58290274f971d890ed91f41b5628656775e361f
@@@ -340,7 -340,7 +340,7 @@@ static int eb_create(struct i915_execbu
                 * Without a 1:1 association between relocation handles and
                 * the execobject[] index, we instead create a hashtable.
                 * We size it dynamically based on available memory, starting
 -               * first with 1:1 assocative hash and scaling back until
 +               * first with 1:1 associative hash and scaling back until
                 * the allocation succeeds.
                 *
                 * Later on we use a positive lut_size to indicate we are
@@@ -1533,7 -1533,7 +1533,7 @@@ static int eb_relocate_vma(struct i915_
                u64_to_user_ptr(entry->relocs_ptr);
        unsigned long remain = entry->relocation_count;
  
-       if (unlikely(remain > N_RELOC(ULONG_MAX)))
+       if (unlikely(remain > N_RELOC(INT_MAX)))
                return -EINVAL;
  
        /*
@@@ -1641,7 -1641,7 +1641,7 @@@ static int check_relocations(const stru
        if (size == 0)
                return 0;
  
-       if (size > N_RELOC(ULONG_MAX))
+       if (size > N_RELOC(INT_MAX))
                return -EINVAL;
  
        addr = u64_to_user_ptr(entry->relocs_ptr);
index 735cd23a43c6e3f1996005a6a258d42107b20ad7,76810ebb5e83957aa13ef83d35c817153879a2bf..8f1ea95471efcb0967f134119981327d7dac6a0d
@@@ -1013,6 -1013,15 +1013,15 @@@ static void __intel_gt_set_wedged(struc
        GT_TRACE(gt, "end\n");
  }
  
+ static void set_wedged_work(struct work_struct *w)
+ {
+       struct intel_gt *gt = container_of(w, struct intel_gt, wedge);
+       intel_wakeref_t wf;
+       with_intel_runtime_pm(gt->uncore->rpm, wf)
+               __intel_gt_set_wedged(gt);
+ }
  void intel_gt_set_wedged(struct intel_gt *gt)
  {
        intel_wakeref_t wakeref;
  
        if (GEM_SHOW_DEBUG()) {
                struct drm_printer p = drm_dbg_printer(&gt->i915->drm,
 -                                                     DRM_UT_DRIVER, __func__);
 +                                                     DRM_UT_DRIVER, NULL);
                struct intel_engine_cs *engine;
                enum intel_engine_id id;
  
@@@ -1614,6 -1623,7 +1623,7 @@@ void intel_gt_init_reset(struct intel_g
        init_waitqueue_head(&gt->reset.queue);
        mutex_init(&gt->reset.mutex);
        init_srcu_struct(&gt->reset.backoff_srcu);
+       INIT_WORK(&gt->wedge, set_wedged_work);
  
        /*
         * While undesirable to wait inside the shrinker, complain anyway.
@@@ -1640,7 -1650,7 +1650,7 @@@ static void intel_wedge_me(struct work_
        struct intel_wedge_me *w = container_of(work, typeof(*w), work.work);
  
        gt_err(w->gt, "%s timed out, cancelling all in-flight rendering.\n", w->name);
-       intel_gt_set_wedged(w->gt);
+       set_wedged_work(&w->gt->wedge);
  }
  
  void __intel_init_wedge(struct intel_wedge_me *w,
This page took 0.075386 seconds and 4 git commands to generate.