mbox series

[0/4] drm/xe/display: Clean-up PM sequences

Message ID 20240903223803.380711-1-rodrigo.vivi@intel.com (mailing list archive)
Headers show
Series drm/xe/display: Clean-up PM sequences | expand

Message

Vivi, Rodrigo Sept. 3, 2024, 10:37 p.m. UTC
This series aim to bring a bit of clarity in the display PM
sequences and start a clean-up around the runtime_pm ones.

Specially around D3Cold. There are some ongoing discussions
that we wouldn't need all the sequences that we currently have.

So, let's at least split them up to separate functions so
we can individually scrutinize.

For now, I removed what I'm sure that we don't need in a
d3cold scenario where we lose power and that I could
validate in my DG2. Any other attempt to clean-up further
at my end failed badly DG2's d3cold.

But again, let's at least bring some clarity on the
sequences before we go even further.

Cc: Vinod Govindapillai <vinod.govindapillai@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>


Rodrigo Vivi (4):
  drm/xe/display: Spin-off xe_display runtime/d3cold sequences
  drm/xe/display: Remove i915_drv.h include
  drm/xe/display: Kill useless has_display
  drm/xe/display: Reduce and streamline d3cold display sequence

 drivers/gpu/drm/xe/display/xe_display.c | 109 ++++++++++++++----------
 drivers/gpu/drm/xe/display/xe_display.h |   8 +-
 drivers/gpu/drm/xe/xe_pm.c              |   8 +-
 3 files changed, 74 insertions(+), 51 deletions(-)

Comments

Jani Nikula Sept. 4, 2024, 9:02 a.m. UTC | #1
On Tue, 03 Sep 2024, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> This series aim to bring a bit of clarity in the display PM
> sequences and start a clean-up around the runtime_pm ones.
>
> Specially around D3Cold. There are some ongoing discussions
> that we wouldn't need all the sequences that we currently have.
>
> So, let's at least split them up to separate functions so
> we can individually scrutinize.
>
> For now, I removed what I'm sure that we don't need in a
> d3cold scenario where we lose power and that I could
> validate in my DG2. Any other attempt to clean-up further
> at my end failed badly DG2's d3cold.
>
> But again, let's at least bring some clarity on the
> sequences before we go even further.

Taking a step back, I can't help but feel this is stuff that should
really happen at i915 display level.

Yes, i915 calls display all over the place in i915_driver.c. Just look
at the display/ includes there.

xe now duplicates that in xe_display.c. It's kind of better, but really
not.

We should have one clean interface to display probe/cleanup and
(runtime) suspend/resume used by both drivers, instead of adding
slightly different glue layers to both, each directly calling various
parts of display.

I get that this clarifies xe_display.c, but that should also ditch
almost all of the direct display includes.


BR,
Jani.



>
> Cc: Vinod Govindapillai <vinod.govindapillai@intel.com>
> Cc: Imre Deak <imre.deak@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
>
> Rodrigo Vivi (4):
>   drm/xe/display: Spin-off xe_display runtime/d3cold sequences
>   drm/xe/display: Remove i915_drv.h include
>   drm/xe/display: Kill useless has_display
>   drm/xe/display: Reduce and streamline d3cold display sequence
>
>  drivers/gpu/drm/xe/display/xe_display.c | 109 ++++++++++++++----------
>  drivers/gpu/drm/xe/display/xe_display.h |   8 +-
>  drivers/gpu/drm/xe/xe_pm.c              |   8 +-
>  3 files changed, 74 insertions(+), 51 deletions(-)
Vivi, Rodrigo Sept. 4, 2024, 3:16 p.m. UTC | #2
On Wed, Sep 04, 2024 at 12:02:28PM +0300, Jani Nikula wrote:
> On Tue, 03 Sep 2024, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> > This series aim to bring a bit of clarity in the display PM
> > sequences and start a clean-up around the runtime_pm ones.
> >
> > Specially around D3Cold. There are some ongoing discussions
> > that we wouldn't need all the sequences that we currently have.
> >
> > So, let's at least split them up to separate functions so
> > we can individually scrutinize.
> >
> > For now, I removed what I'm sure that we don't need in a
> > d3cold scenario where we lose power and that I could
> > validate in my DG2. Any other attempt to clean-up further
> > at my end failed badly DG2's d3cold.
> >
> > But again, let's at least bring some clarity on the
> > sequences before we go even further.
> 
> Taking a step back, I can't help but feel this is stuff that should
> really happen at i915 display level.
> 
> Yes, i915 calls display all over the place in i915_driver.c. Just look
> at the display/ includes there.
> 
> xe now duplicates that in xe_display.c. It's kind of better, but really
> not.
> 
> We should have one clean interface to display probe/cleanup and
> (runtime) suspend/resume used by both drivers, instead of adding
> slightly different glue layers to both, each directly calling various
> parts of display.
> 
> I get that this clarifies xe_display.c, but that should also ditch
> almost all of the direct display includes.

Yeap, very good point. I'm going to try to start wit this
only to get visibility of the sequences, but then try to align
everything inside i915/display/...

> 
> 
> BR,
> Jani.
> 
> 
> 
> >
> > Cc: Vinod Govindapillai <vinod.govindapillai@intel.com>
> > Cc: Imre Deak <imre.deak@intel.com>
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> >
> >
> > Rodrigo Vivi (4):
> >   drm/xe/display: Spin-off xe_display runtime/d3cold sequences
> >   drm/xe/display: Remove i915_drv.h include
> >   drm/xe/display: Kill useless has_display
> >   drm/xe/display: Reduce and streamline d3cold display sequence
> >
> >  drivers/gpu/drm/xe/display/xe_display.c | 109 ++++++++++++++----------
> >  drivers/gpu/drm/xe/display/xe_display.h |   8 +-
> >  drivers/gpu/drm/xe/xe_pm.c              |   8 +-
> >  3 files changed, 74 insertions(+), 51 deletions(-)
> 
> -- 
> Jani Nikula, Intel