drm/i915/pps: convert intel_wakeref_t to struct ref_tracker *

Under the hood, intel_wakeref_t is just struct ref_tracker *. Use the
actual underlying type both for clarity (we *are* using intel_wakeref_t
as a pointer though it doesn't look like one) and to help i915, xe and
display coexistence without custom types.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://patch.msgid.link/e7afaea1a609485f91669a7d3c5d3fde0e0dbf8b.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:40 +02:00
parent 9a8c267b87
commit aa51f0309a
3 changed files with 8 additions and 10 deletions

View file

@ -248,7 +248,7 @@ intel_dp_aux_xfer(struct intel_dp *intel_dp,
u32 aux_clock_divider;
enum intel_display_power_domain aux_domain;
intel_wakeref_t aux_wakeref;
intel_wakeref_t pps_wakeref = NULL;
struct ref_tracker *pps_wakeref = NULL;
int i, ret, recv_bytes;
int try, clock = 0;
u32 status;

View file

@ -67,10 +67,10 @@ static const char *pps_name(struct intel_dp *intel_dp)
return "PPS <invalid>";
}
intel_wakeref_t intel_pps_lock(struct intel_dp *intel_dp)
struct ref_tracker *intel_pps_lock(struct intel_dp *intel_dp)
{
struct intel_display *display = to_intel_display(intel_dp);
intel_wakeref_t wakeref;
struct ref_tracker *wakeref;
/*
* See vlv_pps_reset_all() why we need a power domain reference here.
@ -81,8 +81,7 @@ intel_wakeref_t intel_pps_lock(struct intel_dp *intel_dp)
return wakeref;
}
intel_wakeref_t intel_pps_unlock(struct intel_dp *intel_dp,
intel_wakeref_t wakeref)
struct ref_tracker *intel_pps_unlock(struct intel_dp *intel_dp, struct ref_tracker *wakeref)
{
struct intel_display *display = to_intel_display(intel_dp);

View file

@ -8,20 +8,19 @@
#include <linux/types.h>
#include "intel_wakeref.h"
enum pipe;
struct intel_connector;
struct intel_crtc_state;
struct intel_display;
struct intel_dp;
struct intel_encoder;
struct ref_tracker;
intel_wakeref_t intel_pps_lock(struct intel_dp *intel_dp);
intel_wakeref_t intel_pps_unlock(struct intel_dp *intel_dp, intel_wakeref_t wakeref);
struct ref_tracker *intel_pps_lock(struct intel_dp *intel_dp);
struct ref_tracker *intel_pps_unlock(struct intel_dp *intel_dp, struct ref_tracker *wakeref);
#define __with_intel_pps_lock(dp, wf) \
for (intel_wakeref_t (wf) = intel_pps_lock(dp); (wf); (wf) = intel_pps_unlock((dp), (wf)))
for (struct ref_tracker *(wf) = intel_pps_lock(dp); (wf); (wf) = intel_pps_unlock((dp), (wf)))
#define with_intel_pps_lock(dp) \
__with_intel_pps_lock((dp), __UNIQUE_ID(wakeref))