i915 has a configurable fence wait timeout, defaulting to 10 seconds,
and xe uses MAX_SCHEDULE_TIMEOUT i.e. it has no timeout.

With the fence wait timeout now limited to a) platforms where GPU reset
clobbers display, and b) force testing display resets, let's unify the
timeouts across drivers. Use a fixed 10 second timeout for both drivers
instead of having them do different things. Ditch the now unused compat
header from xe.

For i915, this means no longer being able to configure the timeout. The
new fixed timeout is the same as the old default.

For xe, this means adding a timeout for forced display reset tests only
(as xe does not support platforms where GPU reset clobbers display).

Cc: Ville Syrjälä <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_display.c     |  3 +--
 .../gpu/drm/xe/compat-i915-headers/i915_config.h | 16 ----------------
 2 files changed, 1 insertion(+), 18 deletions(-)
 delete mode 100644 drivers/gpu/drm/xe/compat-i915-headers/i915_config.h

diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index 76ec9161aaa3..aa765d617702 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -50,7 +50,6 @@
 #include "g4x_dp.h"
 #include "g4x_hdmi.h"
 #include "hsw_ips.h"
-#include "i915_config.h"
 #include "i9xx_plane.h"
 #include "i9xx_plane_regs.h"
 #include "i9xx_wm.h"
@@ -7283,7 +7282,7 @@ static void intel_atomic_commit_fence_wait(struct 
intel_atomic_state *state)
 
        if (intel_display_reset_needed_after_gpu_reset(display) ||
            intel_display_reset_test(display))
-               timeout = i915_fence_timeout();
+               timeout = 10 * HZ;
        else
                timeout = MAX_SCHEDULE_TIMEOUT;
 
diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_config.h 
b/drivers/gpu/drm/xe/compat-i915-headers/i915_config.h
deleted file mode 100644
index d4522203e2dd..000000000000
--- a/drivers/gpu/drm/xe/compat-i915-headers/i915_config.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* SPDX-License-Identifier: MIT */
-/*
- * Copyright © 2023 Intel Corporation
- */
-
-#ifndef __I915_CONFIG_H__
-#define __I915_CONFIG_H__
-
-#include <linux/sched.h>
-
-static inline unsigned long i915_fence_timeout(void)
-{
-       return MAX_SCHEDULE_TIMEOUT;
-}
-
-#endif /* __I915_CONFIG_H__ */
-- 
2.47.3

Reply via email to