mbox series

[v2,0/9] drm/i915: Polish plane surface alignment handling

Message ID 20240612204712.31404-1-ville.syrjala@linux.intel.com (mailing list archive)
Headers show
Series drm/i915: Polish plane surface alignment handling | expand

Message

Ville Syrjala June 12, 2024, 8:47 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

intel_surf_alignment() in particular has devolved into
a complete mess. Redesign the code so that we can handle
alignment restrictions in a nicer. Also adjust alignment
for TGL+ to actually match the hardware requirements.

v2: Drop the per-plane vma stuff as it was borked
    Don't temporarily remove the 2MiB DPT alignment for UV on TGL

Ville Syrjälä (9):
  drm: Rename drm_plane_check_pixel_format() to drm_plane_has_format()
  drm: Export drm_plane_has_format()
  drm/i915: Introduce the plane->min_alignment() vfunc
  drm/i915: Introduce fb->min_alignment
  drm/i915: Split cursor alignment to per-platform vfuncs
  drm/i915: Split pre-skl platforms out from intel_surf_alignment()
  drm/i915: Move intel_surf_alignment() into skl_univerals_plane.c
  drm/i915: Update plane alignment requirements for TGL+
  drm/i915: Nuke the TGL+ chroma plane tile row alignment stuff

 drivers/gpu/drm/drm_atomic.c                  |   7 +-
 drivers/gpu/drm/drm_crtc.c                    |   6 +-
 drivers/gpu/drm/drm_crtc_internal.h           |   2 -
 drivers/gpu/drm/drm_plane.c                   |  23 ++-
 drivers/gpu/drm/i915/display/i9xx_plane.c     |  75 ++++++++-
 drivers/gpu/drm/i915/display/intel_cursor.c   |  38 +++++
 .../drm/i915/display/intel_display_types.h    |   5 +
 drivers/gpu/drm/i915/display/intel_fb.c       | 151 ++++--------------
 drivers/gpu/drm/i915/display/intel_fb.h       |   3 -
 drivers/gpu/drm/i915/display/intel_fb_pin.c   |  39 +++--
 drivers/gpu/drm/i915/display/intel_fb_pin.h   |   3 +-
 drivers/gpu/drm/i915/display/intel_fbdev.c    |   5 +-
 drivers/gpu/drm/i915/display/intel_sprite.c   |  26 +++
 .../drm/i915/display/skl_universal_plane.c    |  85 +++++++++-
 drivers/gpu/drm/xe/display/xe_fb_pin.c        |   3 +-
 drivers/gpu/drm/xe/display/xe_plane_initial.c |   4 +-
 include/drm/drm_plane.h                       |   2 +
 17 files changed, 309 insertions(+), 168 deletions(-)

Comments

Ville Syrjala June 19, 2024, 11:38 a.m. UTC | #1
On Wed, Jun 12, 2024 at 11:47:03PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> intel_surf_alignment() in particular has devolved into
> a complete mess. Redesign the code so that we can handle
> alignment restrictions in a nicer. Also adjust alignment
> for TGL+ to actually match the hardware requirements.
> 
> v2: Drop the per-plane vma stuff as it was borked
>     Don't temporarily remove the 2MiB DPT alignment for UV on TGL
> 
> Ville Syrjälä (9):
>   drm: Rename drm_plane_check_pixel_format() to drm_plane_has_format()
>   drm: Export drm_plane_has_format()

Maarten/Maxime/Thomas, can I get an ack for merging these via
drm-intel please?

>   drm/i915: Introduce the plane->min_alignment() vfunc
>   drm/i915: Introduce fb->min_alignment
>   drm/i915: Split cursor alignment to per-platform vfuncs
>   drm/i915: Split pre-skl platforms out from intel_surf_alignment()
>   drm/i915: Move intel_surf_alignment() into skl_univerals_plane.c
>   drm/i915: Update plane alignment requirements for TGL+
>   drm/i915: Nuke the TGL+ chroma plane tile row alignment stuff
> 
>  drivers/gpu/drm/drm_atomic.c                  |   7 +-
>  drivers/gpu/drm/drm_crtc.c                    |   6 +-
>  drivers/gpu/drm/drm_crtc_internal.h           |   2 -
>  drivers/gpu/drm/drm_plane.c                   |  23 ++-
>  drivers/gpu/drm/i915/display/i9xx_plane.c     |  75 ++++++++-
>  drivers/gpu/drm/i915/display/intel_cursor.c   |  38 +++++
>  .../drm/i915/display/intel_display_types.h    |   5 +
>  drivers/gpu/drm/i915/display/intel_fb.c       | 151 ++++--------------
>  drivers/gpu/drm/i915/display/intel_fb.h       |   3 -
>  drivers/gpu/drm/i915/display/intel_fb_pin.c   |  39 +++--
>  drivers/gpu/drm/i915/display/intel_fb_pin.h   |   3 +-
>  drivers/gpu/drm/i915/display/intel_fbdev.c    |   5 +-
>  drivers/gpu/drm/i915/display/intel_sprite.c   |  26 +++
>  .../drm/i915/display/skl_universal_plane.c    |  85 +++++++++-
>  drivers/gpu/drm/xe/display/xe_fb_pin.c        |   3 +-
>  drivers/gpu/drm/xe/display/xe_plane_initial.c |   4 +-

Lucas, can you give me an ack for the merging the xe
changes via drm-intel?

>  include/drm/drm_plane.h                       |   2 +
>  17 files changed, 309 insertions(+), 168 deletions(-)
> 
> -- 
> 2.44.2
Ville Syrjala June 19, 2024, 4:53 p.m. UTC | #2
On Wed, Jun 19, 2024 at 02:38:16PM +0300, Ville Syrjälä wrote:
> On Wed, Jun 12, 2024 at 11:47:03PM +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > intel_surf_alignment() in particular has devolved into
> > a complete mess. Redesign the code so that we can handle
> > alignment restrictions in a nicer. Also adjust alignment
> > for TGL+ to actually match the hardware requirements.
> > 
> > v2: Drop the per-plane vma stuff as it was borked
> >     Don't temporarily remove the 2MiB DPT alignment for UV on TGL
> > 
> > Ville Syrjälä (9):
> >   drm: Rename drm_plane_check_pixel_format() to drm_plane_has_format()
> >   drm: Export drm_plane_has_format()
> 
> Maarten/Maxime/Thomas, can I get an ack for merging these via
> drm-intel please?
> 
> >   drm/i915: Introduce the plane->min_alignment() vfunc
> >   drm/i915: Introduce fb->min_alignment
> >   drm/i915: Split cursor alignment to per-platform vfuncs
> >   drm/i915: Split pre-skl platforms out from intel_surf_alignment()
> >   drm/i915: Move intel_surf_alignment() into skl_univerals_plane.c
> >   drm/i915: Update plane alignment requirements for TGL+
> >   drm/i915: Nuke the TGL+ chroma plane tile row alignment stuff
> > 
> >  drivers/gpu/drm/drm_atomic.c                  |   7 +-
> >  drivers/gpu/drm/drm_crtc.c                    |   6 +-
> >  drivers/gpu/drm/drm_crtc_internal.h           |   2 -
> >  drivers/gpu/drm/drm_plane.c                   |  23 ++-
> >  drivers/gpu/drm/i915/display/i9xx_plane.c     |  75 ++++++++-
> >  drivers/gpu/drm/i915/display/intel_cursor.c   |  38 +++++
> >  .../drm/i915/display/intel_display_types.h    |   5 +
> >  drivers/gpu/drm/i915/display/intel_fb.c       | 151 ++++--------------
> >  drivers/gpu/drm/i915/display/intel_fb.h       |   3 -
> >  drivers/gpu/drm/i915/display/intel_fb_pin.c   |  39 +++--
> >  drivers/gpu/drm/i915/display/intel_fb_pin.h   |   3 +-
> >  drivers/gpu/drm/i915/display/intel_fbdev.c    |   5 +-
> >  drivers/gpu/drm/i915/display/intel_sprite.c   |  26 +++
> >  .../drm/i915/display/skl_universal_plane.c    |  85 +++++++++-
> >  drivers/gpu/drm/xe/display/xe_fb_pin.c        |   3 +-
> >  drivers/gpu/drm/xe/display/xe_plane_initial.c |   4 +-
> 
> Lucas, can you give me an ack for the merging the xe
> changes via drm-intel?

Apparently Lucas is out. Rodrigo, can you ack this?

> 
> >  include/drm/drm_plane.h                       |   2 +
> >  17 files changed, 309 insertions(+), 168 deletions(-)
> > 
> > -- 
> > 2.44.2
> 
> -- 
> Ville Syrjälä
> Intel
Rodrigo Vivi June 19, 2024, 6:59 p.m. UTC | #3
On Wed, Jun 19, 2024 at 07:53:23PM +0300, Ville Syrjälä wrote:
> On Wed, Jun 19, 2024 at 02:38:16PM +0300, Ville Syrjälä wrote:
> > On Wed, Jun 12, 2024 at 11:47:03PM +0300, Ville Syrjala wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > 
> > > intel_surf_alignment() in particular has devolved into
> > > a complete mess. Redesign the code so that we can handle
> > > alignment restrictions in a nicer. Also adjust alignment
> > > for TGL+ to actually match the hardware requirements.
> > > 
> > > v2: Drop the per-plane vma stuff as it was borked
> > >     Don't temporarily remove the 2MiB DPT alignment for UV on TGL
> > > 
> > > Ville Syrjälä (9):
> > >   drm: Rename drm_plane_check_pixel_format() to drm_plane_has_format()
> > >   drm: Export drm_plane_has_format()
> > 
> > Maarten/Maxime/Thomas, can I get an ack for merging these via
> > drm-intel please?
> > 
> > >   drm/i915: Introduce the plane->min_alignment() vfunc
> > >   drm/i915: Introduce fb->min_alignment
> > >   drm/i915: Split cursor alignment to per-platform vfuncs
> > >   drm/i915: Split pre-skl platforms out from intel_surf_alignment()
> > >   drm/i915: Move intel_surf_alignment() into skl_univerals_plane.c
> > >   drm/i915: Update plane alignment requirements for TGL+
> > >   drm/i915: Nuke the TGL+ chroma plane tile row alignment stuff
> > > 
> > >  drivers/gpu/drm/drm_atomic.c                  |   7 +-
> > >  drivers/gpu/drm/drm_crtc.c                    |   6 +-
> > >  drivers/gpu/drm/drm_crtc_internal.h           |   2 -
> > >  drivers/gpu/drm/drm_plane.c                   |  23 ++-
> > >  drivers/gpu/drm/i915/display/i9xx_plane.c     |  75 ++++++++-
> > >  drivers/gpu/drm/i915/display/intel_cursor.c   |  38 +++++
> > >  .../drm/i915/display/intel_display_types.h    |   5 +
> > >  drivers/gpu/drm/i915/display/intel_fb.c       | 151 ++++--------------
> > >  drivers/gpu/drm/i915/display/intel_fb.h       |   3 -
> > >  drivers/gpu/drm/i915/display/intel_fb_pin.c   |  39 +++--
> > >  drivers/gpu/drm/i915/display/intel_fb_pin.h   |   3 +-
> > >  drivers/gpu/drm/i915/display/intel_fbdev.c    |   5 +-
> > >  drivers/gpu/drm/i915/display/intel_sprite.c   |  26 +++
> > >  .../drm/i915/display/skl_universal_plane.c    |  85 +++++++++-
> > >  drivers/gpu/drm/xe/display/xe_fb_pin.c        |   3 +-
> > >  drivers/gpu/drm/xe/display/xe_plane_initial.c |   4 +-
> > 
> > Lucas, can you give me an ack for the merging the xe
> > changes via drm-intel?
> 
> Apparently Lucas is out. Rodrigo, can you ack this?

I wonder if we should start using some tag like
drm/{i915,xe}/display: or drm/{i915,xe}:
in cases like this, to make it easier to spot the patches
that are touching both sides...

anyway, that was just a random thought while seeing this and
searching for the actual patch to ack...


Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
them all...


> 
> > 
> > >  include/drm/drm_plane.h                       |   2 +
> > >  17 files changed, 309 insertions(+), 168 deletions(-)
> > > 
> > > -- 
> > > 2.44.2
> > 
> > -- 
> > Ville Syrjälä
> > Intel
> 
> -- 
> Ville Syrjälä
> Intel
Ville Syrjala June 24, 2024, 2:33 p.m. UTC | #4
On Wed, Jun 19, 2024 at 02:38:16PM +0300, Ville Syrjälä wrote:
> On Wed, Jun 12, 2024 at 11:47:03PM +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > intel_surf_alignment() in particular has devolved into
> > a complete mess. Redesign the code so that we can handle
> > alignment restrictions in a nicer. Also adjust alignment
> > for TGL+ to actually match the hardware requirements.
> > 
> > v2: Drop the per-plane vma stuff as it was borked
> >     Don't temporarily remove the 2MiB DPT alignment for UV on TGL
> > 
> > Ville Syrjälä (9):
> >   drm: Rename drm_plane_check_pixel_format() to drm_plane_has_format()
> >   drm: Export drm_plane_has_format()
> 
> Maarten/Maxime/Thomas, can I get an ack for merging these via
> drm-intel please?

Series pushed to drm-intel-next with Thomas's irc ack.

Thanks for the reviews and acks.

> 
> >   drm/i915: Introduce the plane->min_alignment() vfunc
> >   drm/i915: Introduce fb->min_alignment
> >   drm/i915: Split cursor alignment to per-platform vfuncs
> >   drm/i915: Split pre-skl platforms out from intel_surf_alignment()
> >   drm/i915: Move intel_surf_alignment() into skl_univerals_plane.c
> >   drm/i915: Update plane alignment requirements for TGL+
> >   drm/i915: Nuke the TGL+ chroma plane tile row alignment stuff
> > 
> >  drivers/gpu/drm/drm_atomic.c                  |   7 +-
> >  drivers/gpu/drm/drm_crtc.c                    |   6 +-
> >  drivers/gpu/drm/drm_crtc_internal.h           |   2 -
> >  drivers/gpu/drm/drm_plane.c                   |  23 ++-
> >  drivers/gpu/drm/i915/display/i9xx_plane.c     |  75 ++++++++-
> >  drivers/gpu/drm/i915/display/intel_cursor.c   |  38 +++++
> >  .../drm/i915/display/intel_display_types.h    |   5 +
> >  drivers/gpu/drm/i915/display/intel_fb.c       | 151 ++++--------------
> >  drivers/gpu/drm/i915/display/intel_fb.h       |   3 -
> >  drivers/gpu/drm/i915/display/intel_fb_pin.c   |  39 +++--
> >  drivers/gpu/drm/i915/display/intel_fb_pin.h   |   3 +-
> >  drivers/gpu/drm/i915/display/intel_fbdev.c    |   5 +-
> >  drivers/gpu/drm/i915/display/intel_sprite.c   |  26 +++
> >  .../drm/i915/display/skl_universal_plane.c    |  85 +++++++++-
> >  drivers/gpu/drm/xe/display/xe_fb_pin.c        |   3 +-
> >  drivers/gpu/drm/xe/display/xe_plane_initial.c |   4 +-
> 
> Lucas, can you give me an ack for the merging the xe
> changes via drm-intel?
> 
> >  include/drm/drm_plane.h                       |   2 +
> >  17 files changed, 309 insertions(+), 168 deletions(-)
> > 
> > -- 
> > 2.44.2
> 
> -- 
> Ville Syrjälä
> Intel