]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915/overlay: Remove GPU hang snapshot stuff
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 26 Feb 2026 10:07:20 +0000 (12:07 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 27 Feb 2026 08:13:00 +0000 (10:13 +0200)
The overlay snapshot stuff is a bit annoying because some of
it more or less of belongs on the gt side, and some on the
display side. Remove the whole thing to avoid having to deal
with it when splitting the overlay code around the i915
vs. display boundary. I don't think I've ever actually used
this for anything, so no real loss from my POV. And it can
always be resurrected later should the need arise.

v2: Rebase due to kmalloc_obj()

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260226100738.29997-2-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_display_snapshot.c
drivers/gpu/drm/i915/display/intel_overlay.c
drivers/gpu/drm/i915/display/intel_overlay.h

index f650f15ad39474a1f88661a5dc2b1aba89eccd1e..7f423182aa29acf77fa9d7c1a59aa718674975ad 100644 (file)
@@ -19,7 +19,6 @@ struct intel_display_snapshot {
        struct intel_display_device_info info;
        struct intel_display_runtime_info runtime_info;
        struct intel_display_params params;
-       struct intel_overlay_snapshot *overlay;
        struct intel_dmc_snapshot *dmc;
        struct intel_display_irq_snapshot *irq;
 };
@@ -41,7 +40,6 @@ struct intel_display_snapshot *intel_display_snapshot_capture(struct intel_displ
        intel_display_params_copy(&snapshot->params);
 
        snapshot->irq = intel_display_irq_snapshot_capture(display);
-       snapshot->overlay = intel_overlay_snapshot_capture(display);
        snapshot->dmc = intel_dmc_snapshot_capture(display);
 
        return snapshot;
@@ -61,7 +59,6 @@ void intel_display_snapshot_print(const struct intel_display_snapshot *snapshot,
        intel_display_params_dump(&snapshot->params, display->drm->driver->name, p);
 
        intel_display_irq_snapshot_print(snapshot->irq, p);
-       intel_overlay_snapshot_print(snapshot->overlay, p);
        intel_dmc_snapshot_print(snapshot->dmc, p);
 }
 
@@ -73,7 +70,6 @@ void intel_display_snapshot_free(struct intel_display_snapshot *snapshot)
        intel_display_params_free(&snapshot->params);
 
        kfree(snapshot->irq);
-       kfree(snapshot->overlay);
        kfree(snapshot->dmc);
        kfree(snapshot);
 }
index 9cd368d6ef596a1b0783e9ebddfe0a24bebe2f9b..6cea82ecc3ecb8c0e90f53b3f65fa833709a77f2 100644 (file)
@@ -1464,92 +1464,3 @@ void intel_overlay_cleanup(struct intel_display *display)
 
        kfree(overlay);
 }
-
-#if IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR)
-
-struct intel_overlay_snapshot {
-       struct overlay_registers regs;
-       unsigned long base;
-       u32 dovsta;
-       u32 isr;
-};
-
-struct intel_overlay_snapshot *
-intel_overlay_snapshot_capture(struct intel_display *display)
-{
-       struct intel_overlay *overlay = display->overlay;
-       struct intel_overlay_snapshot *error;
-
-       if (!overlay || !overlay->active)
-               return NULL;
-
-       error = kmalloc_obj(*error, GFP_ATOMIC);
-       if (error == NULL)
-               return NULL;
-
-       error->dovsta = intel_de_read(display, DOVSTA);
-       error->isr = intel_de_read(display, GEN2_ISR);
-       error->base = overlay->flip_addr;
-
-       memcpy_fromio(&error->regs, overlay->regs, sizeof(error->regs));
-
-       return error;
-}
-
-void
-intel_overlay_snapshot_print(const struct intel_overlay_snapshot *error,
-                            struct drm_printer *p)
-{
-       if (!error)
-               return;
-
-       drm_printf(p, "Overlay, status: 0x%08x, interrupt: 0x%08x\n",
-                  error->dovsta, error->isr);
-       drm_printf(p, "  Register file at 0x%08lx:\n", error->base);
-
-#define P(x) drm_printf(p, "    " #x ": 0x%08x\n", error->regs.x)
-       P(OBUF_0Y);
-       P(OBUF_1Y);
-       P(OBUF_0U);
-       P(OBUF_0V);
-       P(OBUF_1U);
-       P(OBUF_1V);
-       P(OSTRIDE);
-       P(YRGB_VPH);
-       P(UV_VPH);
-       P(HORZ_PH);
-       P(INIT_PHS);
-       P(DWINPOS);
-       P(DWINSZ);
-       P(SWIDTH);
-       P(SWIDTHSW);
-       P(SHEIGHT);
-       P(YRGBSCALE);
-       P(UVSCALE);
-       P(OCLRC0);
-       P(OCLRC1);
-       P(DCLRKV);
-       P(DCLRKM);
-       P(SCLRKVH);
-       P(SCLRKVL);
-       P(SCLRKEN);
-       P(OCONFIG);
-       P(OCMD);
-       P(OSTART_0Y);
-       P(OSTART_1Y);
-       P(OSTART_0U);
-       P(OSTART_0V);
-       P(OSTART_1U);
-       P(OSTART_1V);
-       P(OTILEOFF_0Y);
-       P(OTILEOFF_1Y);
-       P(OTILEOFF_0U);
-       P(OTILEOFF_0V);
-       P(OTILEOFF_1U);
-       P(OTILEOFF_1V);
-       P(FASTHSCALE);
-       P(UVSCALEV);
-#undef P
-}
-
-#endif
index d259e4c74b0317079c50e0077040b0ae81e0c456..4ef6882b9acb48f3ef551c07c544e3f82b2f29c6 100644 (file)
@@ -13,7 +13,6 @@ struct drm_file;
 struct drm_printer;
 struct intel_display;
 struct intel_overlay;
-struct intel_overlay_snapshot;
 
 #ifdef I915
 void intel_overlay_setup(struct intel_display *display);
@@ -55,21 +54,4 @@ static inline void intel_overlay_reset(struct intel_display *display)
 }
 #endif
 
-#if IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR) && defined(I915)
-struct intel_overlay_snapshot *
-intel_overlay_snapshot_capture(struct intel_display *display);
-void intel_overlay_snapshot_print(const struct intel_overlay_snapshot *error,
-                                 struct drm_printer *p);
-#else
-static inline struct intel_overlay_snapshot *
-intel_overlay_snapshot_capture(struct intel_display *display)
-{
-       return NULL;
-}
-static inline void intel_overlay_snapshot_print(const struct intel_overlay_snapshot *error,
-                                               struct drm_printer *p)
-{
-}
-#endif
-
 #endif /* __INTEL_OVERLAY_H__ */