drm/{i915,xe}/display: drop intel_wakeref.h usage

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.

v2: Define INTEL_WAKEREF_DEF in intel_display_power.h

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://patch.msgid.link/3599d0ec168d7ce7030582706acba66b616ab9f3.1764076995.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
Jani Nikula
2025-11-25 15:24:43 +02:00
parent e1c727e628
commit 450f04569f
3 changed files with 6 additions and 9 deletions

View File

@@ -9,8 +9,6 @@
#include <linux/mutex.h>
#include <linux/workqueue.h>
#include "intel_wakeref.h"
enum aux_ch;
enum port;
struct i915_power_well;
@@ -19,6 +17,9 @@ struct intel_encoder;
struct ref_tracker;
struct seq_file;
/* -ENOENT means we got the ref, but there's no tracking */
#define INTEL_WAKEREF_DEF ERR_PTR(-ENOENT)
/*
* Keep the pipe, transcoder, port (DDI_LANES,DDI_IO,AUX) domain instances
* consecutive, so that the pipe,transcoder,port -> power domain macros

View File

@@ -1,6 +0,0 @@
/* SPDX-License-Identifier: MIT */
/*
* Copyright © 2023 Intel Corporation
*/
#define INTEL_WAKEREF_DEF ERR_PTR(-ENOENT)

View File

@@ -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;