mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
drm/i915/reset: add intel_display_reset_test()
Add a helper for checking if we want to test display reset regardless of whether it's strictly necessary. This will come in handy in follow-up work where we want to check this from gt reset side. v2: Drop superfluous newline Cc: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/487dec72f753302cd565c3a8164afa7fc1e12ed7.1741001054.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -22,6 +22,11 @@ static bool gpu_reset_clobbers_display(struct intel_display *display)
|
||||
intel_has_gpu_reset(to_gt(i915)));
|
||||
}
|
||||
|
||||
bool intel_display_reset_test(struct intel_display *display)
|
||||
{
|
||||
return display->params.force_reset_modeset_test;
|
||||
}
|
||||
|
||||
void intel_display_reset_prepare(struct intel_display *display)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = to_i915(display->drm);
|
||||
@@ -33,7 +38,7 @@ void intel_display_reset_prepare(struct intel_display *display)
|
||||
return;
|
||||
|
||||
/* reset doesn't touch the display */
|
||||
if (!display->params.force_reset_modeset_test &&
|
||||
if (!intel_display_reset_test(display) &&
|
||||
!gpu_reset_clobbers_display(display))
|
||||
return;
|
||||
|
||||
|
||||
@@ -6,8 +6,11 @@
|
||||
#ifndef __INTEL_RESET_H__
|
||||
#define __INTEL_RESET_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct intel_display;
|
||||
|
||||
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user