diff mbox series

drm/i915/display: Print display info inside driver display initialization

Message ID 20230921071820.1969102-1-balasubramani.vivekanandan@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/display: Print display info inside driver display initialization | expand

Commit Message

Vivekanandan, Balasubramani Sept. 21, 2023, 7:18 a.m. UTC
Separate the printing of display version and feature flags from the main
driver probe to inside the display initialization. This is in alignment
with isolating the display code from the main driver and helps Xe driver
to resuse it.

Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_driver.c | 5 +++++
 drivers/gpu/drm/i915/i915_driver.c                  | 2 --
 2 files changed, 5 insertions(+), 2 deletions(-)

Comments

Jani Nikula Sept. 21, 2023, 7:38 a.m. UTC | #1
On Thu, 21 Sep 2023, Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com> wrote:
> Separate the printing of display version and feature flags from the main
> driver probe to inside the display initialization. This is in alignment
> with isolating the display code from the main driver and helps Xe driver
> to resuse it.
>
> Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display_driver.c | 5 +++++
>  drivers/gpu/drm/i915/i915_driver.c                  | 2 --
>  2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index 9d9b034b9bdc..2fbb3c956336 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> @@ -380,6 +380,8 @@ int intel_display_driver_probe(struct drm_i915_private *i915)
>  
>  void intel_display_driver_register(struct drm_i915_private *i915)
>  {
> +	struct drm_printer p = drm_info_printer(i915->drm.dev);

It needs to be a debug printer, not info printer, maybe:

	struct drm_printer p = drm_debug_printer("display info:");

Unfortunately, it's not device specific, but that's for another set of
patches another day.

BR,
Jani.

> +
>  	if (!HAS_DISPLAY(i915))
>  		return;
>  
> @@ -407,6 +409,9 @@ void intel_display_driver_register(struct drm_i915_private *i915)
>  	 * fbdev->async_cookie.
>  	 */
>  	drm_kms_helper_poll_init(&i915->drm);
> +
> +	intel_display_device_info_print(DISPLAY_INFO(i915),
> +					DISPLAY_RUNTIME_INFO(i915), &p);
>  }
>  
>  /* part #1: call before irq uninstall */
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index e5d693904123..d50347e5773a 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -699,8 +699,6 @@ static void i915_welcome_messages(struct drm_i915_private *dev_priv)
>  
>  		intel_device_info_print(INTEL_INFO(dev_priv),
>  					RUNTIME_INFO(dev_priv), &p);
> -		intel_display_device_info_print(DISPLAY_INFO(dev_priv),
> -						DISPLAY_RUNTIME_INFO(dev_priv), &p);
>  		i915_print_iommu_status(dev_priv, &p);
>  		for_each_gt(gt, dev_priv, i)
>  			intel_gt_info_print(&gt->info, &p);
Vivekanandan, Balasubramani Sept. 21, 2023, 8:41 a.m. UTC | #2
On 21.09.2023 10:38, Jani Nikula wrote:
> On Thu, 21 Sep 2023, Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com> wrote:
> > Separate the printing of display version and feature flags from the main
> > driver probe to inside the display initialization. This is in alignment
> > with isolating the display code from the main driver and helps Xe driver
> > to resuse it.
> >
> > Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_display_driver.c | 5 +++++
> >  drivers/gpu/drm/i915/i915_driver.c                  | 2 --
> >  2 files changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
> > index 9d9b034b9bdc..2fbb3c956336 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> > @@ -380,6 +380,8 @@ int intel_display_driver_probe(struct drm_i915_private *i915)
> >  
> >  void intel_display_driver_register(struct drm_i915_private *i915)
> >  {
> > +	struct drm_printer p = drm_info_printer(i915->drm.dev);
> 
> It needs to be a debug printer, not info printer, maybe:
> 
> 	struct drm_printer p = drm_debug_printer("display info:");
> 
> Unfortunately, it's not device specific, but that's for another set of
> patches another day.

Yeah, thats' the reason I deliberately used info printer.  Anyway I will
resend the patch changing to debug printer.

Regards,
Bala

> 
> BR,
> Jani.
> 
> > +
> >  	if (!HAS_DISPLAY(i915))
> >  		return;
> >  
> > @@ -407,6 +409,9 @@ void intel_display_driver_register(struct drm_i915_private *i915)
> >  	 * fbdev->async_cookie.
> >  	 */
> >  	drm_kms_helper_poll_init(&i915->drm);
> > +
> > +	intel_display_device_info_print(DISPLAY_INFO(i915),
> > +					DISPLAY_RUNTIME_INFO(i915), &p);
> >  }
> >  
> >  /* part #1: call before irq uninstall */
> > diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> > index e5d693904123..d50347e5773a 100644
> > --- a/drivers/gpu/drm/i915/i915_driver.c
> > +++ b/drivers/gpu/drm/i915/i915_driver.c
> > @@ -699,8 +699,6 @@ static void i915_welcome_messages(struct drm_i915_private *dev_priv)
> >  
> >  		intel_device_info_print(INTEL_INFO(dev_priv),
> >  					RUNTIME_INFO(dev_priv), &p);
> > -		intel_display_device_info_print(DISPLAY_INFO(dev_priv),
> > -						DISPLAY_RUNTIME_INFO(dev_priv), &p);
> >  		i915_print_iommu_status(dev_priv, &p);
> >  		for_each_gt(gt, dev_priv, i)
> >  			intel_gt_info_print(&gt->info, &p);
> 
> -- 
> Jani Nikula, Intel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
index 9d9b034b9bdc..2fbb3c956336 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.c
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
@@ -380,6 +380,8 @@  int intel_display_driver_probe(struct drm_i915_private *i915)
 
 void intel_display_driver_register(struct drm_i915_private *i915)
 {
+	struct drm_printer p = drm_info_printer(i915->drm.dev);
+
 	if (!HAS_DISPLAY(i915))
 		return;
 
@@ -407,6 +409,9 @@  void intel_display_driver_register(struct drm_i915_private *i915)
 	 * fbdev->async_cookie.
 	 */
 	drm_kms_helper_poll_init(&i915->drm);
+
+	intel_display_device_info_print(DISPLAY_INFO(i915),
+					DISPLAY_RUNTIME_INFO(i915), &p);
 }
 
 /* part #1: call before irq uninstall */
diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
index e5d693904123..d50347e5773a 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -699,8 +699,6 @@  static void i915_welcome_messages(struct drm_i915_private *dev_priv)
 
 		intel_device_info_print(INTEL_INFO(dev_priv),
 					RUNTIME_INFO(dev_priv), &p);
-		intel_display_device_info_print(DISPLAY_INFO(dev_priv),
-						DISPLAY_RUNTIME_INFO(dev_priv), &p);
 		i915_print_iommu_status(dev_priv, &p);
 		for_each_gt(gt, dev_priv, i)
 			intel_gt_info_print(&gt->info, &p);