[PATCH v3 6/9] drm/xe/gt: Inline gt_fw_domain_init

Maarten Lankhorst dev at lankhorst.se
Wed Jun 18 20:30:25 UTC 2025



On 2025-06-18 21:38, Lucas De Marchi wrote:
> On Tue, Jun 17, 2025 at 08:01:39PM +0200, Maarten Lankhorst wrote:
>> Have only a single init function for whole of GT to keep things
>> readable.
>>
>> Signed-off-by: Maarten Lankhorst <dev at lankhorst.se>
>> ---
>> drivers/gpu/drm/xe/xe_gt.c | 100 +++++++++++++++++--------------------
>> 1 file changed, 45 insertions(+), 55 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
>> index 98360986df7db..1b239d185fc93 100644
>> --- a/drivers/gpu/drm/xe/xe_gt.c
>> +++ b/drivers/gpu/drm/xe/xe_gt.c
>> @@ -440,59 +440,6 @@ static void dump_pat_on_error(struct xe_gt *gt)
>>     xe_pat_dump(gt, &p);
>> }
>>
>> -static int gt_fw_domain_init(struct xe_gt *gt)
> 
> I think the main issue with this function is actually the name. It seems
> to be "initializing the fw domain" when it's actually "doing the
> initialization part that depends on GT forcewake".
> 
> s/gt_fw_domain_init/gt_init_with_gt_forcewake()/
> s/all_fw_domain_init/gt_init_with_all_forcewake()/
> 
> Lucas De Marchi
Yeah, but the nice thing about having a single function for gt_init() is that it became more clearer what was happening during init, with a linear flow. I think there is still a benefit in readability for having a single gt_init function.

Oh well, I'll rename those functions instead, that should work too!

Kind regards,
Maarten


More information about the Intel-xe mailing list