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: pass test only parameter to intel_display_reset_finish()
Deduplicate the gpu_reset_clobbers_display() part by passing the information in from gt side. Cc: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/a36481db334fedcde50ae0e66c4d57825cae8cb7.1741001054.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -14,14 +14,6 @@
|
||||
#include "intel_hotplug.h"
|
||||
#include "intel_pps.h"
|
||||
|
||||
static bool gpu_reset_clobbers_display(struct intel_display *display)
|
||||
{
|
||||
struct drm_i915_private *i915 = to_i915(display->drm);
|
||||
|
||||
return (INTEL_INFO(i915)->gpu_reset_clobbers_display &&
|
||||
intel_has_gpu_reset(to_gt(i915)));
|
||||
}
|
||||
|
||||
bool intel_display_reset_test(struct intel_display *display)
|
||||
{
|
||||
return display->params.force_reset_modeset_test;
|
||||
@@ -83,7 +75,7 @@ bool intel_display_reset_prepare(struct intel_display *display)
|
||||
return true;
|
||||
}
|
||||
|
||||
void intel_display_reset_finish(struct intel_display *display)
|
||||
void intel_display_reset_finish(struct intel_display *display, bool test_only)
|
||||
{
|
||||
struct drm_i915_private *i915 = to_i915(display->drm);
|
||||
struct drm_modeset_acquire_ctx *ctx = &display->restore.reset_ctx;
|
||||
@@ -98,7 +90,7 @@ void intel_display_reset_finish(struct intel_display *display)
|
||||
goto unlock;
|
||||
|
||||
/* reset doesn't touch the display */
|
||||
if (!gpu_reset_clobbers_display(display)) {
|
||||
if (test_only) {
|
||||
/* for testing only restore the display */
|
||||
ret = drm_atomic_helper_commit_duplicated_state(state, ctx);
|
||||
if (ret) {
|
||||
|
||||
@@ -12,6 +12,6 @@ struct intel_display;
|
||||
|
||||
bool intel_display_reset_test(struct intel_display *display);
|
||||
bool intel_display_reset_prepare(struct intel_display *display);
|
||||
void intel_display_reset_finish(struct intel_display *display);
|
||||
void intel_display_reset_finish(struct intel_display *display, bool test_only);
|
||||
|
||||
#endif /* __INTEL_RESET_H__ */
|
||||
|
||||
@@ -1437,7 +1437,7 @@ static void intel_gt_reset_global(struct intel_gt *gt,
|
||||
intel_gt_reset(gt, engine_mask, reason);
|
||||
|
||||
if (reset_display)
|
||||
intel_display_reset_finish(display);
|
||||
intel_display_reset_finish(display, !need_display_reset);
|
||||
}
|
||||
|
||||
if (!test_bit(I915_WEDGED, >->reset.flags))
|
||||
|
||||
Reference in New Issue
Block a user