[Intel-xe] [PATCH v3 14/31] drm/xe: Move migration from GT to tile
Matt Roper
matthew.d.roper at intel.com
Wed May 31 23:51:36 UTC 2023
On Wed, May 31, 2023 at 05:54:57PM -0300, Gustavo Sousa wrote:
> Quoting Matt Roper (2023-05-30 18:15:32-03:00)
...
> >diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
> >index 74023a5dc8b2..aa047db4c937 100644
> >--- a/drivers/gpu/drm/xe/xe_gt.c
> >+++ b/drivers/gpu/drm/xe/xe_gt.c
...
> >@@ -383,13 +375,13 @@ static int all_fw_domain_init(struct xe_gt *gt)
> > }
> >
> > if (!xe_gt_is_media_type(gt)) {
> >- gt->migrate = xe_migrate_init(gt);
> >- if (IS_ERR(gt->migrate)) {
> >- err = PTR_ERR(gt->migrate);
> >+ struct xe_tile *tile = gt_to_tile(gt);
> >+
> >+ tile->migrate = xe_migrate_init(tile);
>
> Couldn't we potentially be calling xe_migrate_init() multiple times for
> the same tile in the future?
This is inside a !xe_gt_is_media_type block, so it will only get called
on the tile's primary GT (i.e., once per tile). If some third type of
GT ever gets added to tiles in the future we might need changes here
(and a lot of other places), but I don't think anything like that is on
our radar for now.
Although migration is a tile-based concept (memory-centric), we have to
use a blitter engine to perform the copy operations and the engine
itself lives inside the primary GT, so we want to do this init while
we're sure the primary GT is under forcewake.
Matt
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
More information about the Intel-xe
mailing list