[PATCH 11/11] drm/i915/de: remove unnecessary generic wrappers
Rodrigo Vivi
rodrigo.vivi at intel.com
Wed Oct 23 17:28:45 UTC 2024
On Tue, Oct 22, 2024 at 06:57:28PM +0300, Jani Nikula wrote:
> With many of the intel_de_* callers switched over to struct
> intel_display, we can remove some of the unnecessary generic wrappers.
>
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
trusting more your compiler then my tired eyes,
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_de.h | 46 ++++++++++---------------
> 1 file changed, 18 insertions(+), 28 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_de.h b/drivers/gpu/drm/i915/display/intel_de.h
> index e017cd4a8168..bb51f974e9e2 100644
> --- a/drivers/gpu/drm/i915/display/intel_de.h
> +++ b/drivers/gpu/drm/i915/display/intel_de.h
> @@ -32,7 +32,7 @@ __intel_de_read(struct intel_display *display, i915_reg_t reg)
> #define intel_de_read(p,...) __intel_de_read(__to_intel_display(p), __VA_ARGS__)
>
> static inline u8
> -__intel_de_read8(struct intel_display *display, i915_reg_t reg)
> +intel_de_read8(struct intel_display *display, i915_reg_t reg)
> {
> u8 val;
>
> @@ -44,11 +44,10 @@ __intel_de_read8(struct intel_display *display, i915_reg_t reg)
>
> return val;
> }
> -#define intel_de_read8(p,...) __intel_de_read8(__to_intel_display(p), __VA_ARGS__)
>
> static inline u64
> -__intel_de_read64_2x32(struct intel_display *display,
> - i915_reg_t lower_reg, i915_reg_t upper_reg)
> +intel_de_read64_2x32(struct intel_display *display,
> + i915_reg_t lower_reg, i915_reg_t upper_reg)
> {
> u64 val;
>
> @@ -63,7 +62,6 @@ __intel_de_read64_2x32(struct intel_display *display,
>
> return val;
> }
> -#define intel_de_read64_2x32(p,...) __intel_de_read64_2x32(__to_intel_display(p), __VA_ARGS__)
>
> static inline void
> __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)
> #define intel_de_write(p,...) __intel_de_write(__to_intel_display(p), __VA_ARGS__)
>
> static inline u32
> -____intel_de_rmw_nowl(struct intel_display *display, i915_reg_t reg,
> - u32 clear, u32 set)
> +__intel_de_rmw_nowl(struct intel_display *display, i915_reg_t reg,
> + u32 clear, u32 set)
> {
> return intel_uncore_rmw(__to_uncore(display), reg, clear, set);
> }
> -#define __intel_de_rmw_nowl(p,...) ____intel_de_rmw_nowl(__to_intel_display(p), __VA_ARGS__)
>
> static inline u32
> __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,
> #define intel_de_rmw(p,...) __intel_de_rmw(__to_intel_display(p), __VA_ARGS__)
>
> static inline int
> -____intel_de_wait_for_register_nowl(struct intel_display *display,
> - i915_reg_t reg,
> - u32 mask, u32 value, unsigned int timeout)
> +__intel_de_wait_for_register_nowl(struct intel_display *display,
> + i915_reg_t reg,
> + u32 mask, u32 value, unsigned int timeout)
> {
> return intel_wait_for_register(__to_uncore(display), reg, mask,
> value, timeout);
> }
> -#define __intel_de_wait_for_register_nowl(p,...) ____intel_de_wait_for_register_nowl(__to_intel_display(p), __VA_ARGS__)
>
> static inline int
> -__intel_de_wait(struct intel_display *display, i915_reg_t reg,
> - u32 mask, u32 value, unsigned int timeout)
> +intel_de_wait(struct intel_display *display, i915_reg_t reg,
> + u32 mask, u32 value, unsigned int timeout)
> {
> int ret;
>
> @@ -136,11 +132,10 @@ __intel_de_wait(struct intel_display *display, i915_reg_t reg,
>
> return ret;
> }
> -#define intel_de_wait(p,...) __intel_de_wait(__to_intel_display(p), __VA_ARGS__)
>
> static inline int
> -__intel_de_wait_fw(struct intel_display *display, i915_reg_t reg,
> - u32 mask, u32 value, unsigned int timeout)
> +intel_de_wait_fw(struct intel_display *display, i915_reg_t reg,
> + u32 mask, u32 value, unsigned int timeout)
> {
> int ret;
>
> @@ -153,13 +148,12 @@ __intel_de_wait_fw(struct intel_display *display, i915_reg_t reg,
>
> return ret;
> }
> -#define intel_de_wait_fw(p,...) __intel_de_wait_fw(__to_intel_display(p), __VA_ARGS__)
>
> static inline int
> -__intel_de_wait_custom(struct intel_display *display, i915_reg_t reg,
> - u32 mask, u32 value,
> - unsigned int fast_timeout_us,
> - unsigned int slow_timeout_ms, u32 *out_value)
> +intel_de_wait_custom(struct intel_display *display, i915_reg_t reg,
> + u32 mask, u32 value,
> + unsigned int fast_timeout_us,
> + unsigned int slow_timeout_ms, u32 *out_value)
> {
> int ret;
>
> @@ -173,7 +167,6 @@ __intel_de_wait_custom(struct intel_display *display, i915_reg_t reg,
>
> return ret;
> }
> -#define intel_de_wait_custom(p,...) __intel_de_wait_custom(__to_intel_display(p), __VA_ARGS__)
>
> static inline int
> __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)
> #define intel_de_write_fw(p,...) __intel_de_write_fw(__to_intel_display(p), __VA_ARGS__)
>
> static inline u32
> -__intel_de_read_notrace(struct intel_display *display, i915_reg_t reg)
> +intel_de_read_notrace(struct intel_display *display, i915_reg_t reg)
> {
> return intel_uncore_read_notrace(__to_uncore(display), reg);
> }
> -#define intel_de_read_notrace(p,...) __intel_de_read_notrace(__to_intel_display(p), __VA_ARGS__)
>
> static inline void
> -__intel_de_write_notrace(struct intel_display *display, i915_reg_t reg,
> - u32 val)
> +intel_de_write_notrace(struct intel_display *display, i915_reg_t reg, u32 val)
> {
> intel_uncore_write_notrace(__to_uncore(display), reg, val);
> }
> -#define intel_de_write_notrace(p,...) __intel_de_write_notrace(__to_intel_display(p), __VA_ARGS__)
>
> static __always_inline void
> intel_de_write_dsb(struct intel_display *display, struct intel_dsb *dsb,
> --
> 2.39.5
>
More information about the Intel-gfx
mailing list