Skip to content

Commit 3291b74

Browse files
committed
drm/i915/de: remove unnecessary generic wrappers
With many of the intel_de_* callers switched over to struct intel_display, we can remove some of the unnecessary generic wrappers. Reviewed-by: Rodrigo Vivi <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/82da66027a122b336278daa2c9a9eb39843082ba.1730146000.git.jani.nikula@intel.com
1 parent 7c05c58 commit 3291b74

File tree

1 file changed

+18
-28
lines changed

1 file changed

+18
-28
lines changed

drivers/gpu/drm/i915/display/intel_de.h

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ __intel_de_read(struct intel_display *display, i915_reg_t reg)
3232
#define intel_de_read(p,...) __intel_de_read(__to_intel_display(p), __VA_ARGS__)
3333

3434
static inline u8
35-
__intel_de_read8(struct intel_display *display, i915_reg_t reg)
35+
intel_de_read8(struct intel_display *display, i915_reg_t reg)
3636
{
3737
u8 val;
3838

@@ -44,11 +44,10 @@ __intel_de_read8(struct intel_display *display, i915_reg_t reg)
4444

4545
return val;
4646
}
47-
#define intel_de_read8(p,...) __intel_de_read8(__to_intel_display(p), __VA_ARGS__)
4847

4948
static inline u64
50-
__intel_de_read64_2x32(struct intel_display *display,
51-
i915_reg_t lower_reg, i915_reg_t upper_reg)
49+
intel_de_read64_2x32(struct intel_display *display,
50+
i915_reg_t lower_reg, i915_reg_t upper_reg)
5251
{
5352
u64 val;
5453

@@ -63,7 +62,6 @@ __intel_de_read64_2x32(struct intel_display *display,
6362

6463
return val;
6564
}
66-
#define intel_de_read64_2x32(p,...) __intel_de_read64_2x32(__to_intel_display(p), __VA_ARGS__)
6765

6866
static inline void
6967
__intel_de_posting_read(struct intel_display *display, i915_reg_t reg)
@@ -88,12 +86,11 @@ __intel_de_write(struct intel_display *display, i915_reg_t reg, u32 val)
8886
#define intel_de_write(p,...) __intel_de_write(__to_intel_display(p), __VA_ARGS__)
8987

9088
static inline u32
91-
____intel_de_rmw_nowl(struct intel_display *display, i915_reg_t reg,
92-
u32 clear, u32 set)
89+
__intel_de_rmw_nowl(struct intel_display *display, i915_reg_t reg,
90+
u32 clear, u32 set)
9391
{
9492
return intel_uncore_rmw(__to_uncore(display), reg, clear, set);
9593
}
96-
#define __intel_de_rmw_nowl(p,...) ____intel_de_rmw_nowl(__to_intel_display(p), __VA_ARGS__)
9794

9895
static inline u32
9996
__intel_de_rmw(struct intel_display *display, i915_reg_t reg, u32 clear,
@@ -112,18 +109,17 @@ __intel_de_rmw(struct intel_display *display, i915_reg_t reg, u32 clear,
112109
#define intel_de_rmw(p,...) __intel_de_rmw(__to_intel_display(p), __VA_ARGS__)
113110

114111
static inline int
115-
____intel_de_wait_for_register_nowl(struct intel_display *display,
116-
i915_reg_t reg,
117-
u32 mask, u32 value, unsigned int timeout)
112+
__intel_de_wait_for_register_nowl(struct intel_display *display,
113+
i915_reg_t reg,
114+
u32 mask, u32 value, unsigned int timeout)
118115
{
119116
return intel_wait_for_register(__to_uncore(display), reg, mask,
120117
value, timeout);
121118
}
122-
#define __intel_de_wait_for_register_nowl(p,...) ____intel_de_wait_for_register_nowl(__to_intel_display(p), __VA_ARGS__)
123119

124120
static inline int
125-
__intel_de_wait(struct intel_display *display, i915_reg_t reg,
126-
u32 mask, u32 value, unsigned int timeout)
121+
intel_de_wait(struct intel_display *display, i915_reg_t reg,
122+
u32 mask, u32 value, unsigned int timeout)
127123
{
128124
int ret;
129125

@@ -136,11 +132,10 @@ __intel_de_wait(struct intel_display *display, i915_reg_t reg,
136132

137133
return ret;
138134
}
139-
#define intel_de_wait(p,...) __intel_de_wait(__to_intel_display(p), __VA_ARGS__)
140135

141136
static inline int
142-
__intel_de_wait_fw(struct intel_display *display, i915_reg_t reg,
143-
u32 mask, u32 value, unsigned int timeout)
137+
intel_de_wait_fw(struct intel_display *display, i915_reg_t reg,
138+
u32 mask, u32 value, unsigned int timeout)
144139
{
145140
int ret;
146141

@@ -153,13 +148,12 @@ __intel_de_wait_fw(struct intel_display *display, i915_reg_t reg,
153148

154149
return ret;
155150
}
156-
#define intel_de_wait_fw(p,...) __intel_de_wait_fw(__to_intel_display(p), __VA_ARGS__)
157151

158152
static inline int
159-
__intel_de_wait_custom(struct intel_display *display, i915_reg_t reg,
160-
u32 mask, u32 value,
161-
unsigned int fast_timeout_us,
162-
unsigned int slow_timeout_ms, u32 *out_value)
153+
intel_de_wait_custom(struct intel_display *display, i915_reg_t reg,
154+
u32 mask, u32 value,
155+
unsigned int fast_timeout_us,
156+
unsigned int slow_timeout_ms, u32 *out_value)
163157
{
164158
int ret;
165159

@@ -173,7 +167,6 @@ __intel_de_wait_custom(struct intel_display *display, i915_reg_t reg,
173167

174168
return ret;
175169
}
176-
#define intel_de_wait_custom(p,...) __intel_de_wait_custom(__to_intel_display(p), __VA_ARGS__)
177170

178171
static inline int
179172
__intel_de_wait_for_set(struct intel_display *display, i915_reg_t reg,
@@ -220,19 +213,16 @@ __intel_de_write_fw(struct intel_display *display, i915_reg_t reg, u32 val)
220213
#define intel_de_write_fw(p,...) __intel_de_write_fw(__to_intel_display(p), __VA_ARGS__)
221214

222215
static inline u32
223-
__intel_de_read_notrace(struct intel_display *display, i915_reg_t reg)
216+
intel_de_read_notrace(struct intel_display *display, i915_reg_t reg)
224217
{
225218
return intel_uncore_read_notrace(__to_uncore(display), reg);
226219
}
227-
#define intel_de_read_notrace(p,...) __intel_de_read_notrace(__to_intel_display(p), __VA_ARGS__)
228220

229221
static inline void
230-
__intel_de_write_notrace(struct intel_display *display, i915_reg_t reg,
231-
u32 val)
222+
intel_de_write_notrace(struct intel_display *display, i915_reg_t reg, u32 val)
232223
{
233224
intel_uncore_write_notrace(__to_uncore(display), reg, val);
234225
}
235-
#define intel_de_write_notrace(p,...) __intel_de_write_notrace(__to_intel_display(p), __VA_ARGS__)
236226

237227
static __always_inline void
238228
intel_de_write_dsb(struct intel_display *display, struct intel_dsb *dsb,

0 commit comments

Comments
 (0)