[Intel-xe] [PATCH v2] drm/xe/display: Print display ip version
Jani Nikula
jani.nikula at linux.intel.com
Wed Sep 6 08:50:10 UTC 2023
On Wed, 06 Sep 2023, Balasubramani Vivekanandan <balasubramani.vivekanandan at intel.com> wrote:
> Print display ip version during module load
>
> Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan at intel.com>
> ---
> drivers/gpu/drm/xe/xe_pci.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> index 60f3474844e2..60927ad7fa27 100644
> --- a/drivers/gpu/drm/xe/xe_pci.c
> +++ b/drivers/gpu/drm/xe/xe_pci.c
> @@ -844,6 +844,13 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> str_yes_no(xe->info.enable_display),
> xe->info.dma_mask_size, xe->info.tile_count);
>
> +#if IS_ENABLED(CONFIG_DRM_XE_DISPLAY)
> + if (xe->info.enable_display)
> + drm_dbg(&xe->drm, "Display: %d.%02d\n",
> + xe->info.display_runtime.ip.ver,
> + xe->info.display_runtime.ip.rel);
> +#endif
Please don't mix non-display and display code.
Absolutely *nothing* in xe top level should touch any display
structures. (xe_display.c is the obvious exception, but that should be
moved under display/ too.)
The display code has intel_display_device_info_print(), i915 uses that
to dump the relevant information, so should xe.
Side note, I also don't think a high level function like xe_pci_probe()
should do any debug printing like it currently does. It should all be
abstracted away.
BR,
Jani.
> +
> drm_dbg(&xe->drm, "Stepping = (G:%s, M:%s, D:%s, B:%s)\n",
> xe_step_name(xe->info.step.graphics),
> xe_step_name(xe->info.step.media),
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-xe
mailing list