mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
drm/i915/reset: Add "intel_display_reset_count" debugfs file
Expose the number of display resets performed in a new "display_reset_count" debugfs file. kms_busy can use this to confirm that the kernel actually took the full display reset path. v2: Give the file an "intel_" namespace (Jani) Cc: Jouni Högander <jouni.hogander@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Testcase: igt/kms_busy/*-with-reset Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20260415210411.24750-7-ville.syrjala@linux.intel.com
This commit is contained in:
parent
a9f8901e40
commit
584fff57f5
|
|
@ -559,6 +559,10 @@ struct intel_display {
|
|||
unsigned long mask;
|
||||
} quirks;
|
||||
|
||||
struct {
|
||||
u32 count;
|
||||
} reset;
|
||||
|
||||
struct {
|
||||
/* restore state for suspend/resume and display reset */
|
||||
struct drm_atomic_state *modeset_state;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#include "intel_display_power.h"
|
||||
#include "intel_display_power_well.h"
|
||||
#include "intel_display_regs.h"
|
||||
#include "intel_display_reset.h"
|
||||
#include "intel_display_rpm.h"
|
||||
#include "intel_display_types.h"
|
||||
#include "intel_dmc.h"
|
||||
|
|
@ -838,6 +839,7 @@ void intel_display_debugfs_register(struct intel_display *display)
|
|||
|
||||
intel_bios_debugfs_register(display);
|
||||
intel_cdclk_debugfs_register(display);
|
||||
intel_display_reset_debugfs_register(display);
|
||||
intel_dmc_debugfs_register(display);
|
||||
intel_dp_test_debugfs_register(display);
|
||||
intel_fbc_debugfs_register(display);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
* Copyright © 2023 Intel Corporation
|
||||
*/
|
||||
|
||||
#include <linux/debugfs.h>
|
||||
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_print.h>
|
||||
|
||||
|
|
@ -66,6 +68,7 @@ void intel_display_reset_prepare(struct intel_display *display)
|
|||
return;
|
||||
}
|
||||
|
||||
display->reset.count++;
|
||||
display->restore.modeset_state = state;
|
||||
state->acquire_ctx = ctx;
|
||||
}
|
||||
|
|
@ -114,3 +117,10 @@ void intel_display_reset_finish(struct intel_display *display, bool test_only)
|
|||
drm_modeset_acquire_fini(ctx);
|
||||
mutex_unlock(&display->drm->mode_config.mutex);
|
||||
}
|
||||
|
||||
void intel_display_reset_debugfs_register(struct intel_display *display)
|
||||
{
|
||||
debugfs_create_u32("intel_display_reset_count", 0400,
|
||||
display->drm->debugfs_root,
|
||||
&display->reset.count);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,4 +15,6 @@ bool intel_display_reset_test(struct intel_display *display);
|
|||
void intel_display_reset_prepare(struct intel_display *display);
|
||||
void intel_display_reset_finish(struct intel_display *display, bool test_only);
|
||||
|
||||
void intel_display_reset_debugfs_register(struct intel_display *display);
|
||||
|
||||
#endif /* __INTEL_RESET_H__ */
|
||||
|
|
|
|||
|
|
@ -260,6 +260,7 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \
|
|||
i915-display/intel_display_power.o \
|
||||
i915-display/intel_display_power_map.o \
|
||||
i915-display/intel_display_power_well.o \
|
||||
i915-display/intel_display_reset.o \
|
||||
i915-display/intel_display_rpm.o \
|
||||
i915-display/intel_display_rps.o \
|
||||
i915-display/intel_display_trace.o \
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user