[PATCH] drm/xe: Use GT-oriented printer to dump topology on init
Michal Wajdeczko
michal.wajdeczko at intel.com
Mon Jun 2 17:18:37 UTC 2025
On 30.05.2025 23:46, Cavitt, Jonathan wrote:
> -----Original Message-----
> From: Intel-xe <intel-xe-bounces at lists.freedesktop.org> On Behalf Of Michal Wajdeczko
> Sent: Friday, May 30, 2025 2:05 PM
> To: intel-xe at lists.freedesktop.org
> Cc: Wajdeczko, Michal <Michal.Wajdeczko at intel.com>; Roper, Matthew D <matthew.d.roper at intel.com>
> Subject: [PATCH] drm/xe: Use GT-oriented printer to dump topology on init
>>
>> During the probe we dump the discovered GT topology, but instead
>> of a generic printer we can use our own GT-oriented printer which
>> contains information about the source GT.
>>
>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
>> Cc: Matt Roper <matthew.d.roper at intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_gt_topology.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_gt_topology.c b/drivers/gpu/drm/xe/xe_gt_topology.c
>> index 516c81e3b8dd..acec6559e2f2 100644
>> --- a/drivers/gpu/drm/xe/xe_gt_topology.c
>> +++ b/drivers/gpu/drm/xe/xe_gt_topology.c
>> @@ -12,6 +12,7 @@
>> #include "regs/xe_gt_regs.h"
>> #include "xe_assert.h"
>> #include "xe_gt.h"
>> +#include "xe_gt_printk.h"
>> #include "xe_mmio.h"
>> #include "xe_wa.h"
>>
>> @@ -243,8 +244,7 @@ xe_gt_topology_init(struct xe_gt *gt)
>> load_eu_mask(gt, gt->fuse_topo.eu_mask_per_dss, >->fuse_topo.eu_type);
>> load_l3_bank_mask(gt, gt->fuse_topo.l3_bank_mask);
>>
>> - p = drm_dbg_printer(>_to_xe(gt)->drm, DRM_UT_DRIVER, "GT topology");
>> -
>> + p = xe_gt_dbg_printer(gt);
>
> LGTM, though the lack of a .prefix field might be a bit of a dealbreaker for some.
there is already function name included by drm_dbg()
[drm:xe_gt_topology_init [xe]]
so this extra "GT topology" prefix was already redundant
> Maybe we can update xe_gt_dbg_printer to include an optional prefix string?
> It shouldn't be too difficult to update the function to have such a field, since
> xe_gt_dbg_printer is currently only used in one other place in the code, as far
> as I can tell.
> Though, if that's not necessary, you can have my
> Reviewed-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
thanks!
> -Jonathan Cavitt
>
>> xe_gt_topology_dump(gt, &p);
>> }
>>
>> --
>> 2.47.1
>>
>>
More information about the Intel-xe
mailing list