Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
	Jani Nikula <jani.nikula@linux.intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>,
	intel-xe@lists.freedesktop.org,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [Intel-xe] [PATCH v3] drm/xe/display: Print display ip version
Date: Wed, 13 Sep 2023 13:25:09 +0530	[thread overview]
Message-ID: <ZQFq3Xxr/Uu4m312@bvivekan-mobl> (raw)
In-Reply-To: <eb6q46xjir2vo745evqhy4jzj2jxpkvyipqetrygurhmg3zqcz@k7yott3gcmlj>

On 11.09.2023 09:01, Lucas De Marchi wrote:
> On Mon, Sep 11, 2023 at 02:04:30PM +0300, Jani Nikula wrote:
> > On Mon, 11 Sep 2023, Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com> wrote:
> > > Print display ip version and flags during module load
> > > 
> > > v3:
> > > Use the existing intel_display_device_info_print() function to print the
> > > display information. (Jani)
> > 
> > So this is an improvement in the sense that xe core doesn't poke at
> > display data directly to print the info.
> > 
> > However, I still think the interface between xe (or i915) core and
> > display should be minimal. I don't see why we'd need to add a function
> > at the top level probe to print display stuff... the display code should
> > do it internally, in some other high level probe call, when it's done.
> > 
> > Even having the function adds complexity, because the call site now
> > needs to be aware about display probe order, and ensure it's all done
> > before you can safely and accurately print display info. And that's
> > display code implementation details.
> > 
> > Superficially this is all benign, but this stuff adds up. We've been
> > trying to untangle i915 core and display for a long time, and the i915
> > probe is still a huge mess, with a bunch of random calls to display at
> > random times, and there seems to be no end to this. It's all so
> > intertwined.
> > 
> > Perhaps in the future all of the calls need to go through a framework,
> > maybe aux bus. Do we really want to put all of this to that interface?
> > 
> > So the direction should be to reduce and minimize the interfaces between
> > the high level components, not add more.
> 
> Agreed. I think what is missing here is: what would be a good point
> inside display to call this on. Is it ok in the end of
> intel_display_driver_probe()? Are we ok with display info now showing
> up before than the rest for i915 or should we also move
> i915_welcome_messages() to be before intel_display_driver_probe()?
> 
> Lucas De Marchi

Hi Jani,
   can you please provide your opinion to the Lucas' query? I would send
a new revision based on the conclusion. Thanks.

Regards,
Bala
> 
> > 
> > 
> > BR,
> > Jani.
> > 
> > 
> > > 
> > > Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
> > > ---
> > >  drivers/gpu/drm/xe/xe_display.c | 9 +++++++++
> > >  drivers/gpu/drm/xe/xe_display.h | 4 ++++
> > >  drivers/gpu/drm/xe/xe_pci.c     | 2 ++
> > >  3 files changed, 15 insertions(+)
> > > 
> > > diff --git a/drivers/gpu/drm/xe/xe_display.c b/drivers/gpu/drm/xe/xe_display.c
> > > index a453946ad108..45ffc418e636 100644
> > > --- a/drivers/gpu/drm/xe/xe_display.c
> > > +++ b/drivers/gpu/drm/xe/xe_display.c
> > > @@ -417,6 +417,15 @@ void xe_display_pm_resume(struct xe_device *xe)
> > >  	intel_power_domains_enable(xe);
> > >  }
> > > 
> > > +void xe_display_info_print(struct xe_device *xe)
> > > +{
> > > +	struct drm_printer p = drm_info_printer(xe->drm.dev);
> > > +
> > > +	if (xe->info.enable_display)
> > > +		intel_display_device_info_print(xe->info.display,
> > > +						&xe->info.display_runtime, &p);
> > > +}
> > > +
> > >  /* Display info initialization */
> > >  __diag_push();
> > >  __diag_ignore_all("-Woverride-init", "Allow field overrides in table");
> > > diff --git a/drivers/gpu/drm/xe/xe_display.h b/drivers/gpu/drm/xe/xe_display.h
> > > index 9e29de012df7..b18bf5583229 100644
> > > --- a/drivers/gpu/drm/xe/xe_display.h
> > > +++ b/drivers/gpu/drm/xe/xe_display.h
> > > @@ -19,6 +19,8 @@ int xe_display_create(struct xe_device *xe);
> > > 
> > >  void xe_display_info_init(struct xe_device *xe);
> > > 
> > > +void xe_display_info_print(struct xe_device *xe);
> > > +
> > >  int xe_display_init_nommio(struct xe_device *xe);
> > >  void xe_display_fini_nommio(struct drm_device *dev, void *dummy);
> > > 
> > > @@ -57,6 +59,8 @@ xe_display_create(struct xe_device *xe) { return 0; }
> > > 
> > >  static inline void xe_display_info_init(struct xe_device *xe) { }
> > > 
> > > +static inline void xe_display_info_print(struct xe_device *xe) { }
> > > +
> > >  static inline int
> > >  xe_display_enable(struct pci_dev *pdev, struct drm_driver *driver) { return 0; }
> > > 
> > > diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> > > index 24b16863bf3d..a4886ea8794f 100644
> > > --- a/drivers/gpu/drm/xe/xe_pci.c
> > > +++ b/drivers/gpu/drm/xe/xe_pci.c
> > > @@ -724,6 +724,8 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> > >  		xe_step_name(xe->info.step.display),
> > >  		xe_step_name(xe->info.step.basedie));
> > > 
> > > +	xe_display_info_print(xe);
> > > +
> > >  	err = xe_device_probe(xe);
> > >  	if (err)
> > >  		goto err_pci_disable;
> > 
> > -- 
> > Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2023-09-13  7:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-11 10:41 [Intel-xe] [PATCH v3] drm/xe/display: Print display ip version Balasubramani Vivekanandan
2023-09-11 10:39 ` [Intel-xe] ✓ CI.Patch_applied: success for drm/xe/display: Print display ip version (rev4) Patchwork
2023-09-11 10:39 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-09-11 10:40 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-09-11 10:47 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-09-11 10:48 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-09-11 10:49 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-09-11 11:04 ` [Intel-xe] [PATCH v3] drm/xe/display: Print display ip version Jani Nikula
2023-09-11 14:01   ` Lucas De Marchi
2023-09-13  7:55     ` Balasubramani Vivekanandan [this message]
2023-09-14 14:35       ` Jani Nikula
2023-09-21  7:21         ` Balasubramani Vivekanandan
2023-09-11 11:25 ` [Intel-xe] ✓ CI.BAT: success for drm/xe/display: Print display ip version (rev4) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZQFq3Xxr/Uu4m312@bvivekan-mobl \
    --to=balasubramani.vivekanandan@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=rodrigo.vivi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox