Drop the display dependency on intel_wakeref.h header. The contract in the parent interface is that -ENOENT means there's no tracking. It doesn't actually require us to use a shared macro for it. Duplicate the macro in the few places that need this instead of inlining, primarily for documentation reasons.
This allows us to remove the xe compat intel_wakeref.h header. Signed-off-by: Jani Nikula <[email protected]> --- drivers/gpu/drm/i915/display/intel_display_power.c | 4 +++- drivers/gpu/drm/xe/compat-i915-headers/intel_wakeref.h | 6 ------ drivers/gpu/drm/xe/display/xe_display_rpm.c | 4 +++- 3 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 drivers/gpu/drm/xe/compat-i915-headers/intel_wakeref.h diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c index 506bc8269827..b58bee61f313 100644 --- a/drivers/gpu/drm/i915/display/intel_display_power.c +++ b/drivers/gpu/drm/i915/display/intel_display_power.c @@ -31,7 +31,6 @@ #include "intel_pmdemand.h" #include "intel_pps_regs.h" #include "intel_snps_phy.h" -#include "intel_wakeref.h" #include "skl_watermark.h" #include "skl_watermark_regs.h" #include "vlv_sideband.h" @@ -918,6 +917,9 @@ intel_display_power_get_in_set_if_enabled(struct intel_display *display, return true; } +/* -ENOENT means we got the ref, but there's no tracking */ +#define INTEL_WAKEREF_DEF ERR_PTR(-ENOENT) + void intel_display_power_put_mask_in_set(struct intel_display *display, struct intel_display_power_domain_set *power_domain_set, diff --git a/drivers/gpu/drm/xe/compat-i915-headers/intel_wakeref.h b/drivers/gpu/drm/xe/compat-i915-headers/intel_wakeref.h deleted file mode 100644 index 910a8a60da64..000000000000 --- a/drivers/gpu/drm/xe/compat-i915-headers/intel_wakeref.h +++ /dev/null @@ -1,6 +0,0 @@ -/* SPDX-License-Identifier: MIT */ -/* - * Copyright © 2023 Intel Corporation - */ - -#define INTEL_WAKEREF_DEF ERR_PTR(-ENOENT) diff --git a/drivers/gpu/drm/xe/display/xe_display_rpm.c b/drivers/gpu/drm/xe/display/xe_display_rpm.c index 9416ec784e39..b3db40035499 100644 --- a/drivers/gpu/drm/xe/display/xe_display_rpm.c +++ b/drivers/gpu/drm/xe/display/xe_display_rpm.c @@ -5,11 +5,13 @@ #include "intel_display_core.h" #include "intel_display_rpm.h" -#include "intel_wakeref.h" #include "xe_device.h" #include "xe_device_types.h" #include "xe_pm.h" +/* -ENOENT means we got the ref, but there's no tracking */ +#define INTEL_WAKEREF_DEF ERR_PTR(-ENOENT) + static struct ref_tracker *xe_display_rpm_get(const struct drm_device *drm) { return xe_pm_runtime_resume_and_get(to_xe_device(drm)) ? INTEL_WAKEREF_DEF : NULL; -- 2.47.3
