mbox series

[pull] drm: dma-fence-deadline-core for v6.4

Message ID CAF6AEGvoP9_FERdL6U8S2O-BVt-oAUgAytbE6RvygsoAOwOHvw@mail.gmail.com (mailing list archive)
State New, archived
Headers show
Series [pull] drm: dma-fence-deadline-core for v6.4 | expand

Pull-request

https://gitlab.freedesktop.org/drm/msm.git tags/dma-fence-deadline-core

Message

Rob Clark March 25, 2023, 6:24 p.m. UTC
Hi Dave and Daniel,

Here is the series for dma-fence deadline hint, without driver
specific patches, with the intent that it can be merged into drm-next
as well as -driver next trees to enable landing driver specific
support through their corresponding -next trees.

The following changes since commit eeac8ede17557680855031c6f305ece2378af326:

  Linux 6.3-rc2 (2023-03-12 16:36:44 -0700)

are available in the Git repository at:

  https://gitlab.freedesktop.org/drm/msm.git tags/dma-fence-deadline-core

for you to fetch changes up to 0bcc8f52a8d9d1f9cd5af7f88c6599a89e64284a:

  drm/atomic-helper: Set fence deadline for vblank (2023-03-25 10:55:08 -0700)

----------------------------------------------------------------
Immutable branch with dma-fence deadline hint support between drm-next
and driver -next trees.

----------------------------------------------------------------
Rob Clark (11):
      dma-buf/dma-fence: Add deadline awareness
      dma-buf/fence-array: Add fence deadline support
      dma-buf/fence-chain: Add fence deadline support
      dma-buf/dma-resv: Add a way to set fence deadline
      dma-buf/sync_file: Surface sync-file uABI
      dma-buf/sync_file: Add SET_DEADLINE ioctl
      dma-buf/sw_sync: Add fence deadline support
      drm/scheduler: Add fence deadline support
      drm/syncobj: Add deadline support for syncobj waits
      drm/vblank: Add helper to get next vblank time
      drm/atomic-helper: Set fence deadline for vblank

 Documentation/driver-api/dma-buf.rst    | 16 ++++++-
 drivers/dma-buf/dma-fence-array.c       | 11 +++++
 drivers/dma-buf/dma-fence-chain.c       | 12 +++++
 drivers/dma-buf/dma-fence.c             | 60 ++++++++++++++++++++++++
 drivers/dma-buf/dma-resv.c              | 22 +++++++++
 drivers/dma-buf/sw_sync.c               | 81 +++++++++++++++++++++++++++++++++
 drivers/dma-buf/sync_debug.h            |  2 +
 drivers/dma-buf/sync_file.c             | 19 ++++++++
 drivers/gpu/drm/drm_atomic_helper.c     | 37 +++++++++++++++
 drivers/gpu/drm/drm_syncobj.c           | 64 ++++++++++++++++++++------
 drivers/gpu/drm/drm_vblank.c            | 53 +++++++++++++++++----
 drivers/gpu/drm/scheduler/sched_fence.c | 46 +++++++++++++++++++
 drivers/gpu/drm/scheduler/sched_main.c  |  2 +-
 include/drm/drm_vblank.h                |  1 +
 include/drm/gpu_scheduler.h             | 17 +++++++
 include/linux/dma-fence.h               | 22 +++++++++
 include/linux/dma-resv.h                |  2 +
 include/uapi/drm/drm.h                  | 17 +++++++
 include/uapi/linux/sync_file.h          | 59 +++++++++++++++---------
 19 files changed, 496 insertions(+), 47 deletions(-)

Comments

Daniel Vetter March 28, 2023, 5:19 p.m. UTC | #1
On Sat, Mar 25, 2023 at 11:24:56AM -0700, Rob Clark wrote:
> Hi Dave and Daniel,
> 
> Here is the series for dma-fence deadline hint, without driver
> specific patches, with the intent that it can be merged into drm-next
> as well as -driver next trees to enable landing driver specific
> support through their corresponding -next trees.
> 
> The following changes since commit eeac8ede17557680855031c6f305ece2378af326:
> 
>   Linux 6.3-rc2 (2023-03-12 16:36:44 -0700)
> 
> are available in the Git repository at:
> 
>   https://gitlab.freedesktop.org/drm/msm.git tags/dma-fence-deadline-core
> 
> for you to fetch changes up to 0bcc8f52a8d9d1f9cd5af7f88c6599a89e64284a:
> 
>   drm/atomic-helper: Set fence deadline for vblank (2023-03-25 10:55:08 -0700)

Ok apparently there's only igts for the sync_file uabi and the only only
userspace for syncobj is the mesa mr that is still under discussion :-/

Yes I know there's a clearly established need for something like this, but
also in drm we don't merge conjectured uabi. Especially with tricky stuff
that's meant to improve best effort performance/tuning problems, where you
really have to benchmark the entire thing and make sure you didn't screw
up some interaction.

To make sure this isn't stuck another full cycle, is there a way to wittle
this just down to the kms atomic flip boosting parts? That way we could at
least start landing the core&driver bits ...
-Daniel

> 
> ----------------------------------------------------------------
> Immutable branch with dma-fence deadline hint support between drm-next
> and driver -next trees.
> 
> ----------------------------------------------------------------
> Rob Clark (11):
>       dma-buf/dma-fence: Add deadline awareness
>       dma-buf/fence-array: Add fence deadline support
>       dma-buf/fence-chain: Add fence deadline support
>       dma-buf/dma-resv: Add a way to set fence deadline
>       dma-buf/sync_file: Surface sync-file uABI
>       dma-buf/sync_file: Add SET_DEADLINE ioctl
>       dma-buf/sw_sync: Add fence deadline support
>       drm/scheduler: Add fence deadline support
>       drm/syncobj: Add deadline support for syncobj waits
>       drm/vblank: Add helper to get next vblank time
>       drm/atomic-helper: Set fence deadline for vblank
> 
>  Documentation/driver-api/dma-buf.rst    | 16 ++++++-
>  drivers/dma-buf/dma-fence-array.c       | 11 +++++
>  drivers/dma-buf/dma-fence-chain.c       | 12 +++++
>  drivers/dma-buf/dma-fence.c             | 60 ++++++++++++++++++++++++
>  drivers/dma-buf/dma-resv.c              | 22 +++++++++
>  drivers/dma-buf/sw_sync.c               | 81 +++++++++++++++++++++++++++++++++
>  drivers/dma-buf/sync_debug.h            |  2 +
>  drivers/dma-buf/sync_file.c             | 19 ++++++++
>  drivers/gpu/drm/drm_atomic_helper.c     | 37 +++++++++++++++
>  drivers/gpu/drm/drm_syncobj.c           | 64 ++++++++++++++++++++------
>  drivers/gpu/drm/drm_vblank.c            | 53 +++++++++++++++++----
>  drivers/gpu/drm/scheduler/sched_fence.c | 46 +++++++++++++++++++
>  drivers/gpu/drm/scheduler/sched_main.c  |  2 +-
>  include/drm/drm_vblank.h                |  1 +
>  include/drm/gpu_scheduler.h             | 17 +++++++
>  include/linux/dma-fence.h               | 22 +++++++++
>  include/linux/dma-resv.h                |  2 +
>  include/uapi/drm/drm.h                  | 17 +++++++
>  include/uapi/linux/sync_file.h          | 59 +++++++++++++++---------
>  19 files changed, 496 insertions(+), 47 deletions(-)
Rob Clark March 28, 2023, 10:08 p.m. UTC | #2
On Tue, Mar 28, 2023 at 10:19 AM Daniel Vetter <daniel@ffwll.ch> wrote:
>
> On Sat, Mar 25, 2023 at 11:24:56AM -0700, Rob Clark wrote:
> > Hi Dave and Daniel,
> >
> > Here is the series for dma-fence deadline hint, without driver
> > specific patches, with the intent that it can be merged into drm-next
> > as well as -driver next trees to enable landing driver specific
> > support through their corresponding -next trees.
> >
> > The following changes since commit eeac8ede17557680855031c6f305ece2378af326:
> >
> >   Linux 6.3-rc2 (2023-03-12 16:36:44 -0700)
> >
> > are available in the Git repository at:
> >
> >   https://gitlab.freedesktop.org/drm/msm.git tags/dma-fence-deadline-core
> >
> > for you to fetch changes up to 0bcc8f52a8d9d1f9cd5af7f88c6599a89e64284a:
> >
> >   drm/atomic-helper: Set fence deadline for vblank (2023-03-25 10:55:08 -0700)
>
> Ok apparently there's only igts for the sync_file uabi and the only only
> userspace for syncobj is the mesa mr that is still under discussion :-/
>
> Yes I know there's a clearly established need for something like this, but
> also in drm we don't merge conjectured uabi. Especially with tricky stuff
> that's meant to improve best effort performance/tuning problems, where you
> really have to benchmark the entire thing and make sure you didn't screw
> up some interaction.
>
> To make sure this isn't stuck another full cycle, is there a way to wittle
> this just down to the kms atomic flip boosting parts? That way we could at
> least start landing the core&driver bits ...

I can drop the sync_file part for now.  I'm not sure that there is
really any discussion on the mesa MR which would change the kernel or
uapi side of this, but I can re-order things so the syncobj patch is
last in case you want to pull HEAD~1 and hold off for a few days on
the syncobj patch

BR,
-R


> -Daniel
>
> >
> > ----------------------------------------------------------------
> > Immutable branch with dma-fence deadline hint support between drm-next
> > and driver -next trees.
> >
> > ----------------------------------------------------------------
> > Rob Clark (11):
> >       dma-buf/dma-fence: Add deadline awareness
> >       dma-buf/fence-array: Add fence deadline support
> >       dma-buf/fence-chain: Add fence deadline support
> >       dma-buf/dma-resv: Add a way to set fence deadline
> >       dma-buf/sync_file: Surface sync-file uABI
> >       dma-buf/sync_file: Add SET_DEADLINE ioctl
> >       dma-buf/sw_sync: Add fence deadline support
> >       drm/scheduler: Add fence deadline support
> >       drm/syncobj: Add deadline support for syncobj waits
> >       drm/vblank: Add helper to get next vblank time
> >       drm/atomic-helper: Set fence deadline for vblank
> >
> >  Documentation/driver-api/dma-buf.rst    | 16 ++++++-
> >  drivers/dma-buf/dma-fence-array.c       | 11 +++++
> >  drivers/dma-buf/dma-fence-chain.c       | 12 +++++
> >  drivers/dma-buf/dma-fence.c             | 60 ++++++++++++++++++++++++
> >  drivers/dma-buf/dma-resv.c              | 22 +++++++++
> >  drivers/dma-buf/sw_sync.c               | 81 +++++++++++++++++++++++++++++++++
> >  drivers/dma-buf/sync_debug.h            |  2 +
> >  drivers/dma-buf/sync_file.c             | 19 ++++++++
> >  drivers/gpu/drm/drm_atomic_helper.c     | 37 +++++++++++++++
> >  drivers/gpu/drm/drm_syncobj.c           | 64 ++++++++++++++++++++------
> >  drivers/gpu/drm/drm_vblank.c            | 53 +++++++++++++++++----
> >  drivers/gpu/drm/scheduler/sched_fence.c | 46 +++++++++++++++++++
> >  drivers/gpu/drm/scheduler/sched_main.c  |  2 +-
> >  include/drm/drm_vblank.h                |  1 +
> >  include/drm/gpu_scheduler.h             | 17 +++++++
> >  include/linux/dma-fence.h               | 22 +++++++++
> >  include/linux/dma-resv.h                |  2 +
> >  include/uapi/drm/drm.h                  | 17 +++++++
> >  include/uapi/linux/sync_file.h          | 59 +++++++++++++++---------
> >  19 files changed, 496 insertions(+), 47 deletions(-)
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
Rob Clark March 28, 2023, 10:40 p.m. UTC | #3
On Tue, Mar 28, 2023 at 10:19 AM Daniel Vetter <daniel@ffwll.ch> wrote:
>
> On Sat, Mar 25, 2023 at 11:24:56AM -0700, Rob Clark wrote:
> > Hi Dave and Daniel,
> >
> > Here is the series for dma-fence deadline hint, without driver
> > specific patches, with the intent that it can be merged into drm-next
> > as well as -driver next trees to enable landing driver specific
> > support through their corresponding -next trees.
> >
> > The following changes since commit eeac8ede17557680855031c6f305ece2378af326:
> >
> >   Linux 6.3-rc2 (2023-03-12 16:36:44 -0700)
> >
> > are available in the Git repository at:
> >
> >   https://gitlab.freedesktop.org/drm/msm.git tags/dma-fence-deadline-core
> >
> > for you to fetch changes up to 0bcc8f52a8d9d1f9cd5af7f88c6599a89e64284a:
> >
> >   drm/atomic-helper: Set fence deadline for vblank (2023-03-25 10:55:08 -0700)
>
> Ok apparently there's only igts for the sync_file uabi and the only only
> userspace for syncobj is the mesa mr that is still under discussion :-/
>
> Yes I know there's a clearly established need for something like this, but
> also in drm we don't merge conjectured uabi. Especially with tricky stuff
> that's meant to improve best effort performance/tuning problems, where you
> really have to benchmark the entire thing and make sure you didn't screw
> up some interaction.
>
> To make sure this isn't stuck another full cycle, is there a way to wittle
> this just down to the kms atomic flip boosting parts? That way we could at
> least start landing the core&driver bits ...

I went ahead and sent a PR without the uapi bits.. IMHO I don't think
that any further discussion on the MR would change the uapi, but I
guess it doesn't hurt giving it some extra days while unblocking the
driver parts.  I still kinda hope that we can land at least the
syncobj UAPI this cycle.

BR,
-R

> -Daniel
>
> >
> > ----------------------------------------------------------------
> > Immutable branch with dma-fence deadline hint support between drm-next
> > and driver -next trees.
> >
> > ----------------------------------------------------------------
> > Rob Clark (11):
> >       dma-buf/dma-fence: Add deadline awareness
> >       dma-buf/fence-array: Add fence deadline support
> >       dma-buf/fence-chain: Add fence deadline support
> >       dma-buf/dma-resv: Add a way to set fence deadline
> >       dma-buf/sync_file: Surface sync-file uABI
> >       dma-buf/sync_file: Add SET_DEADLINE ioctl
> >       dma-buf/sw_sync: Add fence deadline support
> >       drm/scheduler: Add fence deadline support
> >       drm/syncobj: Add deadline support for syncobj waits
> >       drm/vblank: Add helper to get next vblank time
> >       drm/atomic-helper: Set fence deadline for vblank
> >
> >  Documentation/driver-api/dma-buf.rst    | 16 ++++++-
> >  drivers/dma-buf/dma-fence-array.c       | 11 +++++
> >  drivers/dma-buf/dma-fence-chain.c       | 12 +++++
> >  drivers/dma-buf/dma-fence.c             | 60 ++++++++++++++++++++++++
> >  drivers/dma-buf/dma-resv.c              | 22 +++++++++
> >  drivers/dma-buf/sw_sync.c               | 81 +++++++++++++++++++++++++++++++++
> >  drivers/dma-buf/sync_debug.h            |  2 +
> >  drivers/dma-buf/sync_file.c             | 19 ++++++++
> >  drivers/gpu/drm/drm_atomic_helper.c     | 37 +++++++++++++++
> >  drivers/gpu/drm/drm_syncobj.c           | 64 ++++++++++++++++++++------
> >  drivers/gpu/drm/drm_vblank.c            | 53 +++++++++++++++++----
> >  drivers/gpu/drm/scheduler/sched_fence.c | 46 +++++++++++++++++++
> >  drivers/gpu/drm/scheduler/sched_main.c  |  2 +-
> >  include/drm/drm_vblank.h                |  1 +
> >  include/drm/gpu_scheduler.h             | 17 +++++++
> >  include/linux/dma-fence.h               | 22 +++++++++
> >  include/linux/dma-resv.h                |  2 +
> >  include/uapi/drm/drm.h                  | 17 +++++++
> >  include/uapi/linux/sync_file.h          | 59 +++++++++++++++---------
> >  19 files changed, 496 insertions(+), 47 deletions(-)
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
Tvrtko Ursulin March 29, 2023, 1:26 p.m. UTC | #4
On 28/03/2023 18:19, Daniel Vetter wrote:
> On Sat, Mar 25, 2023 at 11:24:56AM -0700, Rob Clark wrote:
>> Hi Dave and Daniel,
>>
>> Here is the series for dma-fence deadline hint, without driver
>> specific patches, with the intent that it can be merged into drm-next
>> as well as -driver next trees to enable landing driver specific
>> support through their corresponding -next trees.
>>
>> The following changes since commit eeac8ede17557680855031c6f305ece2378af326:
>>
>>    Linux 6.3-rc2 (2023-03-12 16:36:44 -0700)
>>
>> are available in the Git repository at:
>>
>>    https://gitlab.freedesktop.org/drm/msm.git tags/dma-fence-deadline-core
>>
>> for you to fetch changes up to 0bcc8f52a8d9d1f9cd5af7f88c6599a89e64284a:
>>
>>    drm/atomic-helper: Set fence deadline for vblank (2023-03-25 10:55:08 -0700)
> 
> Ok apparently there's only igts for the sync_file uabi and the only only
> userspace for syncobj is the mesa mr that is still under discussion :-/
> 
> Yes I know there's a clearly established need for something like this, but
> also in drm we don't merge conjectured uabi. Especially with tricky stuff
> that's meant to improve best effort performance/tuning problems, where you
> really have to benchmark the entire thing and make sure you didn't screw
> up some interaction.

Would we consider bypassing any ABI concerns by going with my proposal* 
for the wait boost specific case?

Regards,

Tvrtko

*) https://patchwork.freedesktop.org/series/113846/


> 
> To make sure this isn't stuck another full cycle, is there a way to wittle
> this just down to the kms atomic flip boosting parts? That way we could at
> least start landing the core&driver bits ...
> -Daniel
> 
>>
>> ----------------------------------------------------------------
>> Immutable branch with dma-fence deadline hint support between drm-next
>> and driver -next trees.
>>
>> ----------------------------------------------------------------
>> Rob Clark (11):
>>        dma-buf/dma-fence: Add deadline awareness
>>        dma-buf/fence-array: Add fence deadline support
>>        dma-buf/fence-chain: Add fence deadline support
>>        dma-buf/dma-resv: Add a way to set fence deadline
>>        dma-buf/sync_file: Surface sync-file uABI
>>        dma-buf/sync_file: Add SET_DEADLINE ioctl
>>        dma-buf/sw_sync: Add fence deadline support
>>        drm/scheduler: Add fence deadline support
>>        drm/syncobj: Add deadline support for syncobj waits
>>        drm/vblank: Add helper to get next vblank time
>>        drm/atomic-helper: Set fence deadline for vblank
>>
>>   Documentation/driver-api/dma-buf.rst    | 16 ++++++-
>>   drivers/dma-buf/dma-fence-array.c       | 11 +++++
>>   drivers/dma-buf/dma-fence-chain.c       | 12 +++++
>>   drivers/dma-buf/dma-fence.c             | 60 ++++++++++++++++++++++++
>>   drivers/dma-buf/dma-resv.c              | 22 +++++++++
>>   drivers/dma-buf/sw_sync.c               | 81 +++++++++++++++++++++++++++++++++
>>   drivers/dma-buf/sync_debug.h            |  2 +
>>   drivers/dma-buf/sync_file.c             | 19 ++++++++
>>   drivers/gpu/drm/drm_atomic_helper.c     | 37 +++++++++++++++
>>   drivers/gpu/drm/drm_syncobj.c           | 64 ++++++++++++++++++++------
>>   drivers/gpu/drm/drm_vblank.c            | 53 +++++++++++++++++----
>>   drivers/gpu/drm/scheduler/sched_fence.c | 46 +++++++++++++++++++
>>   drivers/gpu/drm/scheduler/sched_main.c  |  2 +-
>>   include/drm/drm_vblank.h                |  1 +
>>   include/drm/gpu_scheduler.h             | 17 +++++++
>>   include/linux/dma-fence.h               | 22 +++++++++
>>   include/linux/dma-resv.h                |  2 +
>>   include/uapi/drm/drm.h                  | 17 +++++++
>>   include/uapi/linux/sync_file.h          | 59 +++++++++++++++---------
>>   19 files changed, 496 insertions(+), 47 deletions(-)
>