mirror of
https://github.com/torvalds/linux.git
synced 2026-04-19 07:13:56 -04:00
Move the panic handling to the display parent interface, making display more independent of i915 and xe driver implementations. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/e27eca5424479e8936b786018d0af19a34f839f6.1765474612.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
36 lines
915 B
C
36 lines
915 B
C
// SPDX-License-Identifier: MIT
|
|
/* Copyright © 2025 Intel Corporation */
|
|
|
|
#include <drm/drm_panic.h>
|
|
#include <drm/intel/display_parent_interface.h>
|
|
|
|
#include "display/intel_display_types.h"
|
|
#include "display/intel_fb.h"
|
|
#include "gem/i915_gem_object.h"
|
|
|
|
#include "i915_panic.h"
|
|
|
|
static struct intel_panic *intel_panic_alloc(void)
|
|
{
|
|
return i915_gem_object_alloc_panic();
|
|
}
|
|
|
|
static int intel_panic_setup(struct intel_panic *panic, struct drm_scanout_buffer *sb)
|
|
{
|
|
struct intel_framebuffer *fb = sb->private;
|
|
struct drm_gem_object *obj = intel_fb_bo(&fb->base);
|
|
|
|
return i915_gem_object_panic_setup(panic, sb, obj, fb->panic_tiling);
|
|
}
|
|
|
|
static void intel_panic_finish(struct intel_panic *panic)
|
|
{
|
|
return i915_gem_object_panic_finish(panic);
|
|
}
|
|
|
|
const struct intel_display_panic_interface i915_display_panic_interface = {
|
|
.alloc = intel_panic_alloc,
|
|
.setup = intel_panic_setup,
|
|
.finish = intel_panic_finish,
|
|
};
|