[PATCH v3 2/5] drm/xe: Kill fw_to_gt() helper
Francois Dugast
francois.dugast at intel.com
Tue Jun 11 16:41:05 UTC 2024
On Tue, Jun 11, 2024 at 06:35:34PM +0200, Michal Wajdeczko wrote:
> It's too simple to deserve separate helper.
>
> Suggested-by: Lucas De Marchi <lucas.demarchi at intel.com>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
Reviewed-by: Francois Dugast <francois.dugast at intel.com>
> ---
> drivers/gpu/drm/xe/xe_force_wake.c | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_force_wake.c b/drivers/gpu/drm/xe/xe_force_wake.c
> index 13ddabd90eed..8799a2544648 100644
> --- a/drivers/gpu/drm/xe/xe_force_wake.c
> +++ b/drivers/gpu/drm/xe/xe_force_wake.c
> @@ -15,12 +15,6 @@
>
> #define XE_FORCE_WAKE_ACK_TIMEOUT_MS 50
>
> -static struct xe_gt *
> -fw_to_gt(struct xe_force_wake *fw)
> -{
> - return fw->gt;
> -}
> -
> static void domain_init(struct xe_force_wake_domain *domain,
> enum xe_force_wake_domain_id id,
> struct xe_reg reg, struct xe_reg ack)
> @@ -130,7 +124,7 @@ static int domain_sleep_wait(struct xe_gt *gt,
> int xe_force_wake_get(struct xe_force_wake *fw,
> enum xe_force_wake_domains domains)
> {
> - struct xe_gt *gt = fw_to_gt(fw);
> + struct xe_gt *gt = fw->gt;
> struct xe_force_wake_domain *domain;
> enum xe_force_wake_domains tmp, woken = 0;
> unsigned long flags;
> @@ -159,7 +153,7 @@ int xe_force_wake_get(struct xe_force_wake *fw,
> int xe_force_wake_put(struct xe_force_wake *fw,
> enum xe_force_wake_domains domains)
> {
> - struct xe_gt *gt = fw_to_gt(fw);
> + struct xe_gt *gt = fw->gt;
> struct xe_force_wake_domain *domain;
> enum xe_force_wake_domains tmp, sleep = 0;
> unsigned long flags;
> --
> 2.43.0
>
More information about the Intel-xe
mailing list