i915 has the Kconfig option DRM_I915_FENCE_TIMEOUT, defaulting to 10
seconds. xe doesn't use it, instead defaulting to
MAX_SCHEDULE_TIMEOUT. Do the same for i915.

Cc: Maarten Lankhorst <[email protected]>
Cc: Ville Syrjälä <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>

---

I am not sure about all the implications here. I'm just wondering if we
need to go through all the trouble of adding an interface to query this
from the parent driver.
---
 drivers/gpu/drm/i915/display/intel_display.c  |  4 +---
 .../drm/xe/compat-i915-headers/i915_config.h  | 19 -------------------
 2 files changed, 1 insertion(+), 22 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 6bca186608ce..cc502dfe8aff 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -49,7 +49,6 @@
 #include "g4x_dp.h"
 #include "g4x_hdmi.h"
 #include "hsw_ips.h"
-#include "i915_config.h"
 #include "i915_drv.h"
 #include "i915_reg.h"
 #include "i9xx_plane.h"
@@ -7150,7 +7149,6 @@ static void skl_commit_modeset_enables(struct 
intel_atomic_state *state)
 
 static void intel_atomic_commit_fence_wait(struct intel_atomic_state 
*intel_state)
 {
-       struct drm_i915_private *i915 = to_i915(intel_state->base.dev);
        struct drm_plane *plane;
        struct drm_plane_state *new_plane_state;
        long ret;
@@ -7159,7 +7157,7 @@ static void intel_atomic_commit_fence_wait(struct 
intel_atomic_state *intel_stat
        for_each_new_plane_in_state(&intel_state->base, plane, new_plane_state, 
i) {
                if (new_plane_state->fence) {
                        ret = dma_fence_wait_timeout(new_plane_state->fence, 
false,
-                                                    i915_fence_timeout(i915));
+                                                    MAX_SCHEDULE_TIMEOUT);
                        if (ret <= 0)
                                break;
 
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 e835bea08d1b..000000000000
--- a/drivers/gpu/drm/xe/compat-i915-headers/i915_config.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* SPDX-License-Identifier: MIT */
-/*
- * Copyright © 2023 Intel Corporation
- */
-
-#ifndef __I915_CONFIG_H__
-#define __I915_CONFIG_H__
-
-#include <linux/sched.h>
-
-struct drm_i915_private;
-
-static inline unsigned long
-i915_fence_timeout(const struct drm_i915_private *i915)
-{
-       return MAX_SCHEDULE_TIMEOUT;
-}
-
-#endif /* __I915_CONFIG_H__ */
-- 
2.47.3

Reply via email to