[PATCH v3 08/13] drm/xe: Cleanup extra calls to xe_hw_fence_irq_finish()
Ghimiray, Himal Prasad
himal.prasad.ghimiray at intel.com
Mon Feb 10 18:56:04 UTC 2025
On 08-02-2025 03:49, Lucas De Marchi wrote:
> Now that xe_gt_remove is handled entirely by xe_gt, it's clear there are
> some extra calls to xe_hw_fence_irq_finish() that aren't necessary.
> Neither all_fw_domain_init() or gt_fw_domain_init() need to do that
> since it's handled by the caller on any error.
>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
> ---
> drivers/gpu/drm/xe/xe_gt.c | 15 ++++-----------
> 1 file changed, 4 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
> index c33040278e1aa..bd16ca070dd20 100644
> --- a/drivers/gpu/drm/xe/xe_gt.c
> +++ b/drivers/gpu/drm/xe/xe_gt.c
> @@ -389,13 +389,11 @@ static void dump_pat_on_error(struct xe_gt *gt)
> static int gt_fw_domain_init(struct xe_gt *gt)
> {
> unsigned int fw_ref;
> - int err, i;
> + int err;
>
> fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
> - if (!fw_ref) {
> - err = -ETIMEDOUT;
> - goto err_hw_fence_irq;
> - }
> + if (!fw_ref)
> + return -ETIMEDOUT;
>
> if (!xe_gt_is_media_type(gt)) {
> err = xe_ggtt_init(gt_to_tile(gt)->mem.ggtt);
> @@ -436,9 +434,6 @@ static int gt_fw_domain_init(struct xe_gt *gt)
> err_force_wake:
> dump_pat_on_error(gt);
> xe_force_wake_put(gt_to_fw(gt), fw_ref);
> -err_hw_fence_irq:
> - for (i = 0; i < XE_ENGINE_CLASS_MAX; ++i)
> - xe_hw_fence_irq_finish(>->fence_irq[i]);
>
> return err;
> }
> @@ -446,7 +441,7 @@ static int gt_fw_domain_init(struct xe_gt *gt)
> static int all_fw_domain_init(struct xe_gt *gt)
> {
> unsigned int fw_ref;
> - int err, i;
> + int err;
>
> fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
> if (!xe_force_wake_ref_has_domain(fw_ref, XE_FORCEWAKE_ALL)) {
> @@ -524,8 +519,6 @@ static int all_fw_domain_init(struct xe_gt *gt)
>
> err_force_wake:
> xe_force_wake_put(gt_to_fw(gt), fw_ref);
> - for (i = 0; i < XE_ENGINE_CLASS_MAX; ++i)
> - xe_hw_fence_irq_finish(>->fence_irq[i]);
LGTM
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>
>
> return err;
> }
More information about the Intel-xe
mailing list