From: Matthew Brost <matthew.brost@intel.com>
To: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
Lucas De Marchi <lucas.demarchi@intel.com>,
Matt Roper <matthew.d.roper@intel.com>
Subject: Re: [PATCH v2 2/3] drm/xe: Save the gt pointer in lrc and drop the tile
Date: Fri, 25 Apr 2025 21:43:08 -0700 [thread overview]
Message-ID: <aAxkXAWRnKORzDiA@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <20250426002951.1795492-3-umesh.nerlige.ramappa@intel.com>
On Fri, Apr 25, 2025 at 05:29:50PM -0700, Umesh Nerlige Ramappa wrote:
> Save the gt pointer in the lrc so that it can used for gt based helpers.
>
> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
> ---
> drivers/gpu/drm/xe/xe_lrc.c | 4 ++--
> drivers/gpu/drm/xe/xe_lrc_types.h | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_lrc.c b/drivers/gpu/drm/xe/xe_lrc.c
> index 855c8acaf3f1..089b195e2635 100644
> --- a/drivers/gpu/drm/xe/xe_lrc.c
> +++ b/drivers/gpu/drm/xe/xe_lrc.c
> @@ -867,7 +867,7 @@ static void *empty_lrc_data(struct xe_hw_engine *hwe)
>
> static void xe_lrc_set_ppgtt(struct xe_lrc *lrc, struct xe_vm *vm)
> {
> - u64 desc = xe_vm_pdp4_descriptor(vm, lrc->tile);
> + u64 desc = xe_vm_pdp4_descriptor(vm, gt_to_tile(lrc->gt));
>
> xe_lrc_write_ctx_reg(lrc, CTX_PDP0_UDW, upper_32_bits(desc));
> xe_lrc_write_ctx_reg(lrc, CTX_PDP0_LDW, lower_32_bits(desc));
> @@ -900,6 +900,7 @@ static int xe_lrc_init(struct xe_lrc *lrc, struct xe_hw_engine *hwe,
> int err;
>
> kref_init(&lrc->refcount);
> + lrc->gt = gt;
> lrc->flags = 0;
> lrc_size = ring_size + xe_gt_lrc_size(gt, hwe->class);
> if (xe_gt_has_indirect_ring_state(gt))
> @@ -921,7 +922,6 @@ static int xe_lrc_init(struct xe_lrc *lrc, struct xe_hw_engine *hwe,
> return PTR_ERR(lrc->bo);
>
> lrc->size = lrc_size;
> - lrc->tile = gt_to_tile(hwe->gt);
> lrc->ring.size = ring_size;
> lrc->ring.tail = 0;
> lrc->ctx_timestamp = 0;
> diff --git a/drivers/gpu/drm/xe/xe_lrc_types.h b/drivers/gpu/drm/xe/xe_lrc_types.h
> index 71ecb453f811..cd38586ae989 100644
> --- a/drivers/gpu/drm/xe/xe_lrc_types.h
> +++ b/drivers/gpu/drm/xe/xe_lrc_types.h
> @@ -25,8 +25,8 @@ struct xe_lrc {
> /** @size: size of lrc including any indirect ring state page */
> u32 size;
>
> - /** @tile: tile which this LRC belongs to */
> - struct xe_tile *tile;
> + /** @gt: gt which this LRC belongs to */
> + struct xe_gt *gt;
>
> /** @flags: LRC flags */
> #define XE_LRC_FLAG_INDIRECT_RING_STATE 0x1
> --
> 2.43.0
>
next prev parent reply other threads:[~2025-04-26 4:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-26 0:29 [PATCH v2 0/3] Support active context utilization Umesh Nerlige Ramappa
2025-04-26 0:29 ` [PATCH v2 1/3] drm/xe: Save CTX_TIMESTAMP mmio value instead of LRC value Umesh Nerlige Ramappa
2025-04-26 4:42 ` Matthew Brost
2025-04-26 0:29 ` [PATCH v2 2/3] drm/xe: Save the gt pointer in lrc and drop the tile Umesh Nerlige Ramappa
2025-04-26 4:43 ` Matthew Brost [this message]
2025-04-26 0:29 ` [PATCH v2 3/3] drm/xe: Add WA BB to capture active context utilization Umesh Nerlige Ramappa
2025-04-26 4:54 ` Matthew Brost
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=aAxkXAWRnKORzDiA@lstrano-desk.jf.intel.com \
--to=matthew.brost@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=umesh.nerlige.ramappa@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.