[Intel-xe] [PATCH v3 14/31] drm/xe: Move migration from GT to tile
Gustavo Sousa
gustavo.sousa at intel.com
Thu Jun 1 15:21:13 UTC 2023
Quoting Matt Roper (2023-05-31 20:51:36-03:00)
>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.
Okay, got it. Yeah, my concern was for the addition of more non-media GTs.
>
>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.
Alright, thanks for explaining it!
By the way, thanks a lot for the awesome and extensive documentation being added
with this series! It helped me a lot :-)
--
Gustavo Sousa
More information about the Intel-xe
mailing list