From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Riana Tauro <riana.tauro@intel.com>,
Matthew Auld <matthew.auld@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <anshuman.gupta@intel.com>,
<vinay.belgaumkar@intel.com>
Subject: Re: [PATCH 2/2] drm/xe: move disable_c6 call
Date: Mon, 13 May 2024 11:51:05 -0400 [thread overview]
Message-ID: <ZkI26XXGaplaUrdO@intel.com> (raw)
In-Reply-To: <20240513070546.3754640-3-riana.tauro@intel.com>
On Mon, May 13, 2024 at 12:35:46PM +0530, Riana Tauro wrote:
> disable c6 called from guc pc fini on skipping GuC PC is unreachable.
>
> GuC pc init call returns earlier if skip_guc_pc is true and never
> registers the finish call thus making disable_c6 unreachable.
>
> move this call to gt idle.
>
> Signed-off-by: Riana Tauro <riana.tauro@intel.com>
> ---
> drivers/gpu/drm/xe/xe_gt_idle.c | 11 +++++++++--
> drivers/gpu/drm/xe/xe_guc_pc.c | 5 -----
> 2 files changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt_idle.c b/drivers/gpu/drm/xe/xe_gt_idle.c
> index 2f247cb910d1..0fc865e07965 100644
> --- a/drivers/gpu/drm/xe/xe_gt_idle.c
> +++ b/drivers/gpu/drm/xe/xe_gt_idle.c
> @@ -145,9 +145,16 @@ static const struct attribute *gt_idle_attrs[] = {
> NULL,
> };
>
> -static void gt_idle_sysfs_fini(struct drm_device *drm, void *arg)
> +static void gt_idle_fini(struct drm_device *drm, void *arg)
> {
> struct kobject *kobj = arg;
> + struct xe_gt *gt = kobj_to_gt(kobj->parent);
> +
> + if (gt_to_xe(gt)->info.skip_guc_pc) {
> + xe_gt_WARN_ON(gt, xe_force_wake_get(gt_to_fw(gt), XE_FW_GT));
> + xe_gt_idle_disable_c6(gt);
> + xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
> + }
>
> sysfs_remove_files(kobj, gt_idle_attrs);
> kobject_put(kobj);
> @@ -182,7 +189,7 @@ int xe_gt_idle_sysfs_init(struct xe_gt_idle *gtidle)
> return err;
> }
>
> - return drmm_add_action_or_reset(&xe->drm, gt_idle_sysfs_fini, kobj);
> + return drmm_add_action_or_reset(&xe->drm, gt_idle_fini, kobj);
Cc: Matthew Auld <matthew.auld@intel.com>
gt_idle (RC6 control) is more a hw thing. shouldn't this also be converted
towards devm?
Anyway, it can be a separate patch.
This patch itself is correct
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> }
>
> void xe_gt_idle_enable_c6(struct xe_gt *gt)
> diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c
> index d10aab29651e..d0bc5e3090bd 100644
> --- a/drivers/gpu/drm/xe/xe_guc_pc.c
> +++ b/drivers/gpu/drm/xe/xe_guc_pc.c
> @@ -898,11 +898,6 @@ static void xe_guc_pc_fini(struct drm_device *drm, void *arg)
> struct xe_guc_pc *pc = arg;
> struct xe_device *xe = pc_to_xe(pc);
>
> - if (xe->info.skip_guc_pc) {
> - xe_gt_idle_disable_c6(pc_to_gt(pc));
> - return;
> - }
> -
> if (xe_device_wedged(xe))
> return;
>
> --
> 2.40.0
>
next prev parent reply other threads:[~2024-05-13 15:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 7:05 [PATCH 0/2] xe_gt_idle fixes Riana Tauro
2024-05-13 7:05 ` [PATCH 1/2] drm/xe/xe_gt_idle: use GT forcewake domain assertion Riana Tauro
2024-05-13 15:45 ` Rodrigo Vivi
2024-05-13 7:05 ` [PATCH 2/2] drm/xe: move disable_c6 call Riana Tauro
2024-05-13 15:51 ` Rodrigo Vivi [this message]
2024-05-14 5:05 ` Riana Tauro
2024-05-13 8:51 ` ✓ CI.Patch_applied: success for xe_gt_idle fixes Patchwork
2024-05-13 8:51 ` ✓ CI.checkpatch: " Patchwork
2024-05-13 8:52 ` ✓ CI.KUnit: " Patchwork
2024-05-13 9:04 ` ✓ CI.Build: " Patchwork
2024-05-13 9:07 ` ✓ CI.Hooks: " Patchwork
2024-05-13 9:08 ` ✓ CI.checksparse: " Patchwork
2024-05-13 9:30 ` ✓ CI.BAT: " Patchwork
2024-05-13 10:40 ` ✓ CI.FULL: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZkI26XXGaplaUrdO@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
--cc=riana.tauro@intel.com \
--cc=vinay.belgaumkar@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.