[PATCH v10 14/15] drm/msm/atomic: Switch to vblank_start helper

2023-03-08 Thread Rob Clark
From: Rob Clark Drop our custom thing and switch to drm_crtc_next_vblank_start() for calculating the time of the start of the next vblank period. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 15 --- drivers/gpu/drm/msm/msm_atomic.c| 8

[PATCH v10 10/15] drm/vblank: Add helper to get next vblank time

2023-03-08 Thread Rob Clark
From: Rob Clark Will be used in the next commit to set a deadline on fences that an atomic update is waiting on. v2: Calculate time at *start* of vblank period, not end v3: Fix kbuild complaints Signed-off-by: Rob Clark Reviewed-by: Mario Kleiner --- drivers/gpu/drm/drm_vblank.c | 53

[PATCH v10 13/15] drm/msm: Add wait-boost support

2023-03-08 Thread Rob Clark
From: Rob Clark Add a way for various userspace waits to signal urgency. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_drv.c | 12 drivers/gpu/drm/msm/msm_gem.c | 5 + include/uapi/drm/msm_drm.h| 14 -- 3 files changed, 25 insertions(+), 6 deletions

[PATCH v10 08/15] drm/scheduler: Add fence deadline support

2023-03-08 Thread Rob Clark
a thread calling drm_sched_fence_set_deadline_finished() sees fence->parent set before drm_sched_fence_set_parent() does this test_bit(DMA_FENCE_FLAG_HAS_DEADLINE_BIT). Signed-off-by: Rob Clark Acked-by: Luben Tuikov --- drivers/gpu/drm/scheduler/sched_fence.c |

[PATCH v10 12/15] drm/msm: Add deadline based boost support

2023-03-08 Thread Rob Clark
From: Rob Clark Track the nearest deadline on a fence timeline and set a timer to expire shortly before to trigger boost if the fence has not yet been signaled. v2: rebase Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_fence.c | 74 + drivers/gpu/drm/msm

[PATCH v10 11/15] drm/atomic-helper: Set fence deadline for vblank

2023-03-08 Thread Rob Clark
From: Rob Clark For an atomic commit updating a single CRTC (ie. a pageflip) calculate the next vblank time, and inform the fence(s) of that deadline. v2: Comment typo fix (danvet) v3: If there are multiple CRTCs, consider the time of the soonest vblank Signed-off-by: Rob Clark Reviewed

[PATCH v10 09/15] drm/syncobj: Add deadline support for syncobj waits

2023-03-08 Thread Rob Clark
From: Rob Clark Add a new flag to let userspace provide a deadline as a hint for syncobj and timeline waits. This gives a hint to the driver signaling the backing fences about how soon userspace needs it to compete work, so it can addjust GPU frequency accordingly. An immediate deadline can

[PATCH v10 07/15] dma-buf/sw_sync: Add fence deadline support

2023-03-08 Thread Rob Clark
From: Rob Clark This consists of simply storing the most recent deadline, and adding an ioctl to retrieve the deadline. This can be used in conjunction with the SET_DEADLINE ioctl on a fence fd for testing. Ie. create various sw_sync fences, merge them into a fence-array, set deadline

[PATCH v10 05/15] dma-buf/sync_file: Surface sync-file uABI

2023-03-08 Thread Rob Clark
From: Rob Clark We had all of the internal driver APIs, but not the all important userspace uABI, in the dma-buf doc. Fix that. And re-arrange the comments slightly as otherwise the comments for the ioctl nr defines would not show up. v2: Fix docs build warning coming from newly including

[PATCH v10 06/15] dma-buf/sync_file: Add SET_DEADLINE ioctl

2023-03-08 Thread Rob Clark
From: Rob Clark The initial purpose is for igt tests, but this would also be useful for compositors that wait until close to vblank deadline to make decisions about which frame to show. The igt tests can be found at: https://gitlab.freedesktop.org/robclark/igt-gpu-tools/-/commits/fence

[PATCH v10 04/15] dma-buf/dma-resv: Add a way to set fence deadline

2023-03-08 Thread Rob Clark
From: Rob Clark Add a way to set a deadline on remaining resv fences according to the requested usage. Signed-off-by: Rob Clark Reviewed-by: Christian König --- drivers/dma-buf/dma-resv.c | 22 ++ include/linux/dma-resv.h | 2 ++ 2 files changed, 24 insertions(+) diff

[PATCH v10 03/15] dma-buf/fence-chain: Add fence deadline support

2023-03-08 Thread Rob Clark
From: Rob Clark Propagate the deadline to all the fences in the chain. v2: Use dma_fence_chain_contained [Tvrtko] Signed-off-by: Rob Clark Reviewed-by: Christian König for this one. --- drivers/dma-buf/dma-fence-chain.c | 12 1 file changed, 12 insertions(+) diff --git

[PATCH v10 02/15] dma-buf/fence-array: Add fence deadline support

2023-03-08 Thread Rob Clark
From: Rob Clark Propagate the deadline to all the fences in the array. Signed-off-by: Rob Clark Reviewed-by: Christian König --- drivers/dma-buf/dma-fence-array.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/dma-buf/dma-fence-array.c b/drivers/dma-buf/dma-fence

[PATCH v10 01/15] dma-buf/dma-fence: Add deadline awareness

2023-03-08 Thread Rob Clark
From: Rob Clark Add a way to hint to the fence signaler of an upcoming deadline, such as vblank, which the fence waiter would prefer not to miss. This is to aid the fence signaler in making power management decisions, like boosting frequency as the deadline approaches and awareness of missing

[PATCH v10 00/15] dma-fence: Deadline awareness

2023-03-08 Thread Rob Clark
From: Rob Clark This series adds a deadline hint to fences, so realtime deadlines such as vblank can be communicated to the fence signaller for power/ frequency management decisions. This is partially inspired by a trick i915 does, but implemented via dma-fence for a couple of reasons: 1

Re: [Freedreno] [PATCH] drm/msm: fix PM_DEVFREQ kconfig dependency warning

2023-03-07 Thread Rob Clark
t; (QCOM_COMMAND_DB [=y] || QCOM_COMMAND_DB [=y]=n) > > > > Fixes: 6563f60f14cb ("drm/msm/gpu: Add devfreq tuning debugfs") > > Signed-off-by: Randy Dunlap > > Reported-by: kernel test robot > > Link: lore.kernel.org/r/202303071922.wjqdwqpe-...@intel.com &

Re: [PATCH] MAINTAINERS: Update the URI for MSM DRM bugs

2023-03-04 Thread Rob Clark
On Sat, Mar 4, 2023 at 3:27 PM Abhinav Kumar wrote: > > Update the URI for MSM DRM bugs for users to be able > to file bugs at a centralized location. > > Signed-off-by: Abhinav Kumar Acked-by: Rob Clark > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) >

Re: [PATCH v9 12/15] drm/msm: Add deadline based boost support

2023-03-03 Thread Rob Clark
On Fri, Mar 3, 2023 at 2:10 AM Dmitry Baryshkov wrote: > > On 03/03/2023 01:53, Rob Clark wrote: > > From: Rob Clark > > > > Track the nearest deadline on a fence timeline and set a timer to expire > > shortly before to trigger boost if the fence has not yet bee

Re: [PATCH v9 11/15] drm/atomic-helper: Set fence deadline for vblank

2023-03-03 Thread Rob Clark
On Fri, Mar 3, 2023 at 7:12 AM Ville Syrjälä wrote: > > On Thu, Mar 02, 2023 at 03:53:33PM -0800, Rob Clark wrote: > > From: Rob Clark > > > > For an atomic commit updating a single CRTC (ie. a pageflip) calculate > > the next vblank time, and inform the fence(s

Re: [PATCH v9 15/15] drm/i915: Add deadline based boost support

2023-03-03 Thread Rob Clark
On Fri, Mar 3, 2023 at 7:20 AM Ville Syrjälä wrote: > > On Fri, Mar 03, 2023 at 05:00:03PM +0200, Ville Syrjälä wrote: > > On Fri, Mar 03, 2023 at 06:48:43AM -0800, Rob Clark wrote: > > > On Fri, Mar 3, 2023 at 1:58 AM Tvrtko Ursulin > > > wrote: > > >

Re: [Freedreno] [PATCH v9 15/15] drm/i915: Add deadline based boost support

2023-03-03 Thread Rob Clark
On Fri, Mar 3, 2023 at 7:08 AM Tvrtko Ursulin wrote: > > > On 03/03/2023 14:48, Rob Clark wrote: > > On Fri, Mar 3, 2023 at 1:58 AM Tvrtko Ursulin > > wrote: > >> > >> > >> On 03/03/2023 03:21, Rodrigo Vivi wrote: > >>> On Thu, Mar 02,

Re: [PATCH v9 15/15] drm/i915: Add deadline based boost support

2023-03-03 Thread Rob Clark
On Thu, Mar 2, 2023 at 7:21 PM Rodrigo Vivi wrote: > > On Thu, Mar 02, 2023 at 03:53:37PM -0800, Rob Clark wrote: > > From: Rob Clark > > > > missing some wording here... the wording should be "Pls replace this patch, kthx" ;-) > > >

Re: [PATCH v9 15/15] drm/i915: Add deadline based boost support

2023-03-03 Thread Rob Clark
On Fri, Mar 3, 2023 at 1:58 AM Tvrtko Ursulin wrote: > > > On 03/03/2023 03:21, Rodrigo Vivi wrote: > > On Thu, Mar 02, 2023 at 03:53:37PM -0800, Rob Clark wrote: > >> From: Rob Clark > >> > > > > missing some wording here... > >

[PATCH v9 12/15] drm/msm: Add deadline based boost support

2023-03-02 Thread Rob Clark
From: Rob Clark Track the nearest deadline on a fence timeline and set a timer to expire shortly before to trigger boost if the fence has not yet been signaled. v2: rebase Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_fence.c | 74 + drivers/gpu/drm/msm

[PATCH v9 15/15] drm/i915: Add deadline based boost support

2023-03-02 Thread Rob Clark
From: Rob Clark v2: rebase Signed-off-by: Rob Clark --- drivers/gpu/drm/i915/i915_request.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c index 7503dcb9043b..44491e7e214c 100644

[PATCH v9 14/15] drm/msm/atomic: Switch to vblank_start helper

2023-03-02 Thread Rob Clark
From: Rob Clark Drop our custom thing and switch to drm_crtc_next_vblank_start() for calculating the time of the start of the next vblank period. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 15 --- drivers/gpu/drm/msm/msm_atomic.c| 8

[PATCH v9 13/15] drm/msm: Add wait-boost support

2023-03-02 Thread Rob Clark
From: Rob Clark Add a way for various userspace waits to signal urgency. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_drv.c | 12 drivers/gpu/drm/msm/msm_gem.c | 5 + include/uapi/drm/msm_drm.h| 14 -- 3 files changed, 25 insertions(+), 6 deletions

[PATCH v9 10/15] drm/vblank: Add helper to get next vblank time

2023-03-02 Thread Rob Clark
From: Rob Clark Will be used in the next commit to set a deadline on fences that an atomic update is waiting on. v2: Calculate time at *start* of vblank period, not end v3: Fix kbuild complaints Signed-off-by: Rob Clark Reviewed-by: Mario Kleiner --- drivers/gpu/drm/drm_vblank.c | 53

[PATCH v9 11/15] drm/atomic-helper: Set fence deadline for vblank

2023-03-02 Thread Rob Clark
From: Rob Clark For an atomic commit updating a single CRTC (ie. a pageflip) calculate the next vblank time, and inform the fence(s) of that deadline. v2: Comment typo fix (danvet) Signed-off-by: Rob Clark Reviewed-by: Daniel Vetter Signed-off-by: Rob Clark --- drivers/gpu/drm

[PATCH v9 09/15] drm/syncobj: Add deadline support for syncobj waits

2023-03-02 Thread Rob Clark
From: Rob Clark Add a new flag to let userspace provide a deadline as a hint for syncobj and timeline waits. This gives a hint to the driver signaling the backing fences about how soon userspace needs it to compete work, so it can addjust GPU frequency accordingly. An immediate deadline can

[PATCH v9 08/15] drm/scheduler: Add fence deadline support

2023-03-02 Thread Rob Clark
a thread calling drm_sched_fence_set_deadline_finished() sees fence->parent set before drm_sched_fence_set_parent() does this test_bit(DMA_FENCE_FLAG_HAS_DEADLINE_BIT). Signed-off-by: Rob Clark Acked-by: Luben Tuikov --- drivers/gpu/drm/scheduler/sched_fence.c |

[PATCH v9 07/15] dma-buf/sw_sync: Add fence deadline support

2023-03-02 Thread Rob Clark
From: Rob Clark This consists of simply storing the most recent deadline, and adding an ioctl to retrieve the deadline. This can be used in conjunction with the SET_DEADLINE ioctl on a fence fd for testing. Ie. create various sw_sync fences, merge them into a fence-array, set deadline

[PATCH v9 06/15] dma-buf/sync_file: Add SET_DEADLINE ioctl

2023-03-02 Thread Rob Clark
From: Rob Clark The initial purpose is for igt tests, but this would also be useful for compositors that wait until close to vblank deadline to make decisions about which frame to show. The igt tests can be found at: https://gitlab.freedesktop.org/robclark/igt-gpu-tools/-/commits/fence

[PATCH v9 05/15] dma-buf/sync_file: Surface sync-file uABI

2023-03-02 Thread Rob Clark
From: Rob Clark We had all of the internal driver APIs, but not the all important userspace uABI, in the dma-buf doc. Fix that. And re-arrange the comments slightly as otherwise the comments for the ioctl nr defines would not show up. v2: Fix docs build warning coming from newly including

[PATCH v9 04/15] dma-buf/dma-resv: Add a way to set fence deadline

2023-03-02 Thread Rob Clark
From: Rob Clark Add a way to set a deadline on remaining resv fences according to the requested usage. Signed-off-by: Rob Clark Reviewed-by: Christian König --- drivers/dma-buf/dma-resv.c | 22 ++ include/linux/dma-resv.h | 2 ++ 2 files changed, 24 insertions(+) diff

[PATCH v9 03/15] dma-buf/fence-chain: Add fence deadline support

2023-03-02 Thread Rob Clark
From: Rob Clark Propagate the deadline to all the fences in the chain. v2: Use dma_fence_chain_contained [Tvrtko] Signed-off-by: Rob Clark Reviewed-by: Christian König for this one. --- drivers/dma-buf/dma-fence-chain.c | 12 1 file changed, 12 insertions(+) diff --git

[PATCH v9 02/15] dma-buf/fence-array: Add fence deadline support

2023-03-02 Thread Rob Clark
From: Rob Clark Propagate the deadline to all the fences in the array. Signed-off-by: Rob Clark Reviewed-by: Christian König --- drivers/dma-buf/dma-fence-array.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/dma-buf/dma-fence-array.c b/drivers/dma-buf/dma-fence

[PATCH v9 01/15] dma-buf/dma-fence: Add deadline awareness

2023-03-02 Thread Rob Clark
From: Rob Clark Add a way to hint to the fence signaler of an upcoming deadline, such as vblank, which the fence waiter would prefer not to miss. This is to aid the fence signaler in making power management decisions, like boosting frequency as the deadline approaches and awareness of missing

[PATCH v9 00/15] dma-fence: Deadline awareness

2023-03-02 Thread Rob Clark
From: Rob Clark This series adds a deadline hint to fences, so realtime deadlines such as vblank can be communicated to the fence signaller for power/ frequency management decisions. This is partially inspired by a trick i915 does, but implemented via dma-fence for a couple of reasons: 1

[PATCH v6] drm/virtio: Add option to disable KMS support

2023-03-02 Thread Rob Clark
From: Rob Clark Add a build option to disable modesetting support. This is useful in cases where the guest only needs to use the GPU in a headless mode, or (such as in the CrOS usage) window surfaces are proxied to a host compositor. As the modesetting ioctls are a big surface area

Re: [PATCH v5] drm/virtio: Add option to disable KMS support

2023-03-02 Thread Rob Clark
On Wed, Mar 1, 2023 at 11:25 PM Gerd Hoffmann wrote: > > On Thu, Mar 02, 2023 at 12:39:33AM +0300, Dmitry Osipenko wrote: > > On 3/1/23 21:54, Rob Clark wrote: > > > /* virtgpu_display.c */ > > > +#if defined(CONFIG_DRM_VIRTIO_GPU_KMS) > > > int virtio_gp

[PATCH v5] drm/virtio: Add option to disable KMS support

2023-03-01 Thread Rob Clark
From: Rob Clark Add a build option to disable modesetting support. This is useful in cases where the guest only needs to use the GPU in a headless mode, or (such as in the CrOS usage) window surfaces are proxied to a host compositor. As the modesetting ioctls are a big surface area

Re: [PATCH v4 06/14] dma-buf/sync_file: Support (E)POLLPRI

2023-03-01 Thread Rob Clark
On Wed, Mar 1, 2023 at 7:31 AM Sebastian Wick wrote: > > On Tue, Feb 28, 2023 at 11:52 PM Rob Clark wrote: > > > > On Tue, Feb 28, 2023 at 6:30 AM Sebastian Wick > > wrote: > > > > > > On Tue, Feb 28, 2023 at 12:48 AM Rob Clark wrote: > > >

[PATCH v8 16/16] drm/i915: Add deadline based boost support

2023-02-28 Thread Rob Clark
From: Rob Clark v2: rebase Signed-off-by: Rob Clark --- drivers/gpu/drm/i915/i915_request.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c index 7503dcb9043b..44491e7e214c 100644

[PATCH v8 15/16] drm/msm/atomic: Switch to vblank_start helper

2023-02-28 Thread Rob Clark
From: Rob Clark Drop our custom thing and switch to drm_crtc_next_vblank_start() for calculating the time of the start of the next vblank period. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 15 --- drivers/gpu/drm/msm/msm_atomic.c| 8

[PATCH v8 14/16] drm/msm: Add wait-boost support

2023-02-28 Thread Rob Clark
From: Rob Clark Add a way for various userspace waits to signal urgency. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_drv.c | 12 drivers/gpu/drm/msm/msm_gem.c | 5 + include/uapi/drm/msm_drm.h| 14 -- 3 files changed, 25 insertions(+), 6 deletions

[PATCH v8 11/16] drm/vblank: Add helper to get next vblank time

2023-02-28 Thread Rob Clark
From: Rob Clark Will be used in the next commit to set a deadline on fences that an atomic update is waiting on. v2: Calculate time at *start* of vblank period, not end v3: Fix kbuild complaints Signed-off-by: Rob Clark Reviewed-by: Mario Kleiner --- drivers/gpu/drm/drm_vblank.c | 53

[PATCH v8 13/16] drm/msm: Add deadline based boost support

2023-02-28 Thread Rob Clark
From: Rob Clark Track the nearest deadline on a fence timeline and set a timer to expire shortly before to trigger boost if the fence has not yet been signaled. v2: rebase Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_fence.c | 74 + drivers/gpu/drm/msm

[PATCH v8 12/16] drm/atomic-helper: Set fence deadline for vblank

2023-02-28 Thread Rob Clark
From: Rob Clark For an atomic commit updating a single CRTC (ie. a pageflip) calculate the next vblank time, and inform the fence(s) of that deadline. v2: Comment typo fix (danvet) Signed-off-by: Rob Clark Reviewed-by: Daniel Vetter Signed-off-by: Rob Clark --- drivers/gpu/drm

[PATCH v8 09/16] drm/scheduler: Add fence deadline support

2023-02-28 Thread Rob Clark
a thread calling drm_sched_fence_set_deadline_finished() sees fence->parent set before drm_sched_fence_set_parent() does this test_bit(DMA_FENCE_FLAG_HAS_DEADLINE_BIT). Signed-off-by: Rob Clark Acked-by: Luben Tuikov --- drivers/gpu/drm/scheduler/sched_fence.c |

[PATCH v8 10/16] drm/syncobj: Add deadline support for syncobj waits

2023-02-28 Thread Rob Clark
From: Rob Clark Add a new flag to let userspace provide a deadline as a hint for syncobj and timeline waits. This gives a hint to the driver signaling the backing fences about how soon userspace needs it to compete work, so it can addjust GPU frequency accordingly. An immediate deadline can

[PATCH v8 06/16] dma-buf/sync_file: Add SET_DEADLINE ioctl

2023-02-28 Thread Rob Clark
From: Rob Clark The initial purpose is for igt tests, but this would also be useful for compositors that wait until close to vblank deadline to make decisions about which frame to show. The igt tests can be found at: https://gitlab.freedesktop.org/robclark/igt-gpu-tools/-/commits/fence

[PATCH v8 02/16] dma-buf/fence-array: Add fence deadline support

2023-02-28 Thread Rob Clark
From: Rob Clark Propagate the deadline to all the fences in the array. Signed-off-by: Rob Clark Reviewed-by: Christian König --- drivers/dma-buf/dma-fence-array.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/dma-buf/dma-fence-array.c b/drivers/dma-buf/dma-fence

[PATCH v8 07/16] dma-buf/sync_file: Support (E)POLLPRI

2023-02-28 Thread Rob Clark
From: Rob Clark Allow userspace to use the EPOLLPRI/POLLPRI flag to indicate an urgent wait (as opposed to a "housekeeping" wait to know when to cleanup after some work has completed). Usermode components of GPU driver stacks often poll() on fence fd's to know when it is safe to do t

[PATCH v8 08/16] dma-buf/sw_sync: Add fence deadline support

2023-02-28 Thread Rob Clark
From: Rob Clark This consists of simply storing the most recent deadline, and adding an ioctl to retrieve the deadline. This can be used in conjunction with the SET_DEADLINE ioctl on a fence fd for testing. Ie. create various sw_sync fences, merge them into a fence-array, set deadline

[PATCH v8 05/16] dma-buf/sync_file: Surface sync-file uABI

2023-02-28 Thread Rob Clark
From: Rob Clark We had all of the internal driver APIs, but not the all important userspace uABI, in the dma-buf doc. Fix that. And re-arrange the comments slightly as otherwise the comments for the ioctl nr defines would not show up. Signed-off-by: Rob Clark --- Documentation/driver-api

[PATCH v8 04/16] dma-buf/dma-resv: Add a way to set fence deadline

2023-02-28 Thread Rob Clark
From: Rob Clark Add a way to set a deadline on remaining resv fences according to the requested usage. Signed-off-by: Rob Clark Reviewed-by: Christian König --- drivers/dma-buf/dma-resv.c | 22 ++ include/linux/dma-resv.h | 2 ++ 2 files changed, 24 insertions(+) diff

[PATCH v8 03/16] dma-buf/fence-chain: Add fence deadline support

2023-02-28 Thread Rob Clark
From: Rob Clark Propagate the deadline to all the fences in the chain. v2: Use dma_fence_chain_contained [Tvrtko] Signed-off-by: Rob Clark Reviewed-by: Christian König for this one. --- drivers/dma-buf/dma-fence-chain.c | 12 1 file changed, 12 insertions(+) diff --git

[PATCH v8 01/16] dma-buf/dma-fence: Add deadline awareness

2023-02-28 Thread Rob Clark
From: Rob Clark Add a way to hint to the fence signaler of an upcoming deadline, such as vblank, which the fence waiter would prefer not to miss. This is to aid the fence signaler in making power management decisions, like boosting frequency as the deadline approaches and awareness of missing

[PATCH v8 00/16] dma-fence: Deadline awareness

2023-02-28 Thread Rob Clark
From: Rob Clark This series adds a deadline hint to fences, so realtime deadlines such as vblank can be communicated to the fence signaller for power/ frequency management decisions. This is partially inspired by a trick i915 does, but implemented via dma-fence for a couple of reasons: 1

Re: [PATCH v4 06/14] dma-buf/sync_file: Support (E)POLLPRI

2023-02-28 Thread Rob Clark
On Tue, Feb 28, 2023 at 6:30 AM Sebastian Wick wrote: > > On Tue, Feb 28, 2023 at 12:48 AM Rob Clark wrote: > > > > On Mon, Feb 27, 2023 at 2:44 PM Sebastian Wick > > wrote: > > > > > > On Mon, Feb 27, 2023 at 11:20 PM Rob Clark wrote: > > >

Re: [PATCH v7 07/15] dma-buf/sw_sync: Add fence deadline support

2023-02-28 Thread Rob Clark
On Tue, Feb 28, 2023 at 1:23 AM Pekka Paalanen wrote: > > On Mon, 27 Feb 2023 11:35:13 -0800 > Rob Clark wrote: > > > From: Rob Clark > > > > This consists of simply storing the most recent deadline, and adding an > > ioctl to retrieve the deadli

Re: [PATCH v7 05/15] dma-buf/sync_file: Add SET_DEADLINE ioctl

2023-02-28 Thread Rob Clark
On Tue, Feb 28, 2023 at 1:22 AM Pekka Paalanen wrote: > > On Mon, 27 Feb 2023 11:35:11 -0800 > Rob Clark wrote: > > > From: Rob Clark > > > > The initial purpose is for igt tests, but this would also be useful for > > compositors that wait until close

Re: [PATCH v7 01/15] dma-buf/dma-fence: Add deadline awareness

2023-02-28 Thread Rob Clark
On Tue, Feb 28, 2023 at 1:21 AM Pekka Paalanen wrote: > > On Mon, 27 Feb 2023 11:35:07 -0800 > Rob Clark wrote: > > > From: Rob Clark > > > > Add a way to hint to the fence signaler of an upcoming deadline, such as > > vblank, which the fence waiter would

Re: [PATCH v2 1/1] drm/doc: Document DRM device reset expectations

2023-02-28 Thread Rob Clark
On Mon, Feb 27, 2023 at 12:40 PM André Almeida wrote: > > Create a section that specifies how to deal with DRM device resets for > kernel and userspace drivers. > > Signed-off-by: André Almeida > --- > Documentation/gpu/drm-uapi.rst | 51 ++ > 1 file changed, 51

[PATCH v4] drm/virtio: Add option to disable KMS support

2023-02-28 Thread Rob Clark
From: Rob Clark Add a build option to disable modesetting support. This is useful in cases where the guest only needs to use the GPU in a headless mode, or (such as in the CrOS usage) window surfaces are proxied to a host compositor. As the modesetting ioctls are a big surface area

Re: [PATCH v7 00/15] dma-fence: Deadline awareness

2023-02-28 Thread Rob Clark
On Tue, Feb 28, 2023 at 4:43 AM Bagas Sanjaya wrote: > > On Mon, Feb 27, 2023 at 11:35:06AM -0800, Rob Clark wrote: > > From: Rob Clark > > > > This series adds a deadline hint to fences, so realtime deadlines > > such as vblank can be communicated to the fence sign

Re: [PATCH v3] drm/virtio: Add option to disable KMS support

2023-02-28 Thread Rob Clark
On Tue, Feb 28, 2023 at 4:34 AM Thomas Zimmermann wrote: > > Hi > > Am 27.02.23 um 19:15 schrieb Rob Clark: > > On Mon, Feb 27, 2023 at 9:57 AM Dmitry Osipenko > > wrote: > >> > >> On 2/27/23 20:38, Rob Clark wrote: > >> ... &

Re: [PATCH v4 06/14] dma-buf/sync_file: Support (E)POLLPRI

2023-02-27 Thread Rob Clark
On Mon, Feb 27, 2023 at 2:44 PM Sebastian Wick wrote: > > On Mon, Feb 27, 2023 at 11:20 PM Rob Clark wrote: > > > > On Mon, Feb 27, 2023 at 1:36 PM Rodrigo Vivi wrote: > > > > > > On Fri, Feb 24, 2023 at 09:59:57AM -0800, Rob Clark wrote: > > > &

Re: [PATCH v4 06/14] dma-buf/sync_file: Support (E)POLLPRI

2023-02-27 Thread Rob Clark
On Mon, Feb 27, 2023 at 1:36 PM Rodrigo Vivi wrote: > > On Fri, Feb 24, 2023 at 09:59:57AM -0800, Rob Clark wrote: > > On Fri, Feb 24, 2023 at 7:27 AM Luben Tuikov wrote: > > > > > > On 2023-02-24 06:37, Tvrtko Ursulin wrote: > > > > > &g

[PATCH v7 14/15] drm/msm/atomic: Switch to vblank_start helper

2023-02-27 Thread Rob Clark
From: Rob Clark Drop our custom thing and switch to drm_crtc_next_vblank_start() for calculating the time of the start of the next vblank period. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 15 --- drivers/gpu/drm/msm/msm_atomic.c| 8

[PATCH v7 15/15] drm/i915: Add deadline based boost support

2023-02-27 Thread Rob Clark
From: Rob Clark v2: rebase Signed-off-by: Rob Clark --- drivers/gpu/drm/i915/i915_request.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c index 7503dcb9043b..44491e7e214c 100644

[PATCH v7 13/15] drm/msm: Add wait-boost support

2023-02-27 Thread Rob Clark
From: Rob Clark Add a way for various userspace waits to signal urgency. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_drv.c | 12 drivers/gpu/drm/msm/msm_gem.c | 5 + include/uapi/drm/msm_drm.h| 14 -- 3 files changed, 25 insertions(+), 6 deletions

[PATCH v7 12/15] drm/msm: Add deadline based boost support

2023-02-27 Thread Rob Clark
From: Rob Clark Track the nearest deadline on a fence timeline and set a timer to expire shortly before to trigger boost if the fence has not yet been signaled. v2: rebase Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_fence.c | 74 + drivers/gpu/drm/msm

[PATCH v7 10/15] drm/vblank: Add helper to get next vblank time

2023-02-27 Thread Rob Clark
From: Rob Clark Will be used in the next commit to set a deadline on fences that an atomic update is waiting on. v2: Calculate time at *start* of vblank period, not end v3: Fix kbuild complaints Signed-off-by: Rob Clark --- drivers/gpu/drm/drm_vblank.c | 53

[PATCH v7 11/15] drm/atomic-helper: Set fence deadline for vblank

2023-02-27 Thread Rob Clark
From: Rob Clark For an atomic commit updating a single CRTC (ie. a pageflip) calculate the next vblank time, and inform the fence(s) of that deadline. v2: Comment typo fix (danvet) Signed-off-by: Rob Clark Reviewed-by: Daniel Vetter Signed-off-by: Rob Clark --- drivers/gpu/drm

[PATCH v7 09/15] drm/syncobj: Add deadline support for syncobj waits

2023-02-27 Thread Rob Clark
From: Rob Clark Add a new flag to let userspace provide a deadline as a hint for syncobj and timeline waits. This gives a hint to the driver signaling the backing fences about how soon userspace needs it to compete work, so it can addjust GPU frequency accordingly. An immediate deadline can

[PATCH v7 05/15] dma-buf/sync_file: Add SET_DEADLINE ioctl

2023-02-27 Thread Rob Clark
From: Rob Clark The initial purpose is for igt tests, but this would also be useful for compositors that wait until close to vblank deadline to make decisions about which frame to show. The igt tests can be found at: https://gitlab.freedesktop.org/robclark/igt-gpu-tools/-/commits/fence

[PATCH v7 08/15] drm/scheduler: Add fence deadline support

2023-02-27 Thread Rob Clark
a thread calling drm_sched_fence_set_deadline_finished() sees fence->parent set before drm_sched_fence_set_parent() does this test_bit(DMA_FENCE_FLAG_HAS_DEADLINE_BIT). Signed-off-by: Rob Clark Acked-by: Luben Tuikov --- drivers/gpu/drm/scheduler/sched_fence.c |

[PATCH v7 06/15] dma-buf/sync_file: Support (E)POLLPRI

2023-02-27 Thread Rob Clark
From: Rob Clark Allow userspace to use the EPOLLPRI/POLLPRI flag to indicate an urgent wait (as opposed to a "housekeeping" wait to know when to cleanup after some work has completed). Usermode components of GPU driver stacks often poll() on fence fd's to know when it is safe to do t

[PATCH v7 07/15] dma-buf/sw_sync: Add fence deadline support

2023-02-27 Thread Rob Clark
From: Rob Clark This consists of simply storing the most recent deadline, and adding an ioctl to retrieve the deadline. This can be used in conjunction with the SET_DEADLINE ioctl on a fence fd for testing. Ie. create various sw_sync fences, merge them into a fence-array, set deadline

[PATCH v7 04/15] dma-buf/dma-resv: Add a way to set fence deadline

2023-02-27 Thread Rob Clark
From: Rob Clark Add a way to set a deadline on remaining resv fences according to the requested usage. Signed-off-by: Rob Clark Reviewed-by: Christian König --- drivers/dma-buf/dma-resv.c | 22 ++ include/linux/dma-resv.h | 2 ++ 2 files changed, 24 insertions(+) diff

[PATCH v7 03/15] dma-buf/fence-chain: Add fence deadline support

2023-02-27 Thread Rob Clark
From: Rob Clark Propagate the deadline to all the fences in the chain. v2: Use dma_fence_chain_contained [Tvrtko] Signed-off-by: Rob Clark Reviewed-by: Christian König for this one. --- drivers/dma-buf/dma-fence-chain.c | 12 1 file changed, 12 insertions(+) diff --git

[PATCH v7 01/15] dma-buf/dma-fence: Add deadline awareness

2023-02-27 Thread Rob Clark
From: Rob Clark Add a way to hint to the fence signaler of an upcoming deadline, such as vblank, which the fence waiter would prefer not to miss. This is to aid the fence signaler in making power management decisions, like boosting frequency as the deadline approaches and awareness of missing

[PATCH v7 02/15] dma-buf/fence-array: Add fence deadline support

2023-02-27 Thread Rob Clark
From: Rob Clark Propagate the deadline to all the fences in the array. Signed-off-by: Rob Clark Reviewed-by: Christian König --- drivers/dma-buf/dma-fence-array.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/dma-buf/dma-fence-array.c b/drivers/dma-buf/dma-fence

[PATCH v7 00/15] dma-fence: Deadline awareness

2023-02-27 Thread Rob Clark
From: Rob Clark This series adds a deadline hint to fences, so realtime deadlines such as vblank can be communicated to the fence signaller for power/ frequency management decisions. This is partially inspired by a trick i915 does, but implemented via dma-fence for a couple of reasons: 1

Re: [PATCH v4 06/14] dma-buf/sync_file: Support (E)POLLPRI

2023-02-27 Thread Rob Clark
On Mon, Feb 27, 2023 at 1:34 AM Pekka Paalanen wrote: > > On Fri, 24 Feb 2023 11:44:53 -0800 > Rob Clark wrote: > > > On Fri, Feb 24, 2023 at 2:24 AM Pekka Paalanen wrote: > > > > > > On Fri, 24 Feb 2023 09:41:46 + > > > Tvrtko Ursulin wr

Re: [PATCH v3] drm/virtio: Add option to disable KMS support

2023-02-27 Thread Rob Clark
On Mon, Feb 27, 2023 at 9:57 AM Dmitry Osipenko wrote: > > On 2/27/23 20:38, Rob Clark wrote: > ... > > + if (IS_ENABLED(CONFIG_DRM_VIRTIO_GPU_KMS)) { > > + /* get display info */ > > + virtio_cread_le(vgdev->

[PATCH v3] drm/virtio: Add option to disable KMS support

2023-02-27 Thread Rob Clark
From: Rob Clark Add a build option to disable modesetting support. This is useful in cases where the guest only needs to use the GPU in a headless mode, or (such as in the CrOS usage) window surfaces are proxied to a host compositor. v2: Use more if (IS_ENABLED(...)) v3: Also permit the host

Re: [PATCH v2] drm/virtio: Add option to disable KMS support

2023-02-27 Thread Rob Clark
On Mon, Feb 27, 2023 at 8:16 AM Daniel Vetter wrote: > > On Mon, Feb 27, 2023 at 08:01:13AM -0800, Rob Clark wrote: > > From: Rob Clark > > > > Add a build option to disable modesetting support. This is useful in > > cases where the guest only needs to

[PATCH v2] drm/virtio: Add option to disable KMS support

2023-02-27 Thread Rob Clark
From: Rob Clark Add a build option to disable modesetting support. This is useful in cases where the guest only needs to use the GPU in a headless mode, or (such as in the CrOS usage) window surfaces are proxied to a host compositor. v2: Use more if (IS_ENABLED(...)) Signed-off-by: Rob Clark

Re: [PATCH] drm/virtio: Add option to disable KMS support

2023-02-27 Thread Rob Clark
On Sun, Feb 26, 2023 at 10:38 PM Gerd Hoffmann wrote: > > On Fri, Feb 24, 2023 at 10:02:24AM -0800, Rob Clark wrote: > > From: Rob Clark > > > > Add a build option to disable modesetting support. This is useful in > > cases where the guest only needs to

[PATCH v6 15/15] drm/i915: Add deadline based boost support

2023-02-24 Thread Rob Clark
From: Rob Clark v2: rebase Signed-off-by: Rob Clark --- drivers/gpu/drm/i915/i915_request.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c index 7503dcb9043b..44491e7e214c 100644

[PATCH v6 09/15] drm/syncobj: Add deadline support for syncobj waits

2023-02-24 Thread Rob Clark
From: Rob Clark Add a new flag to let userspace provide a deadline as a hint for syncobj and timeline waits. This gives a hint to the driver signaling the backing fences about how soon userspace needs it to compete work, so it can addjust GPU frequency accordingly. An immediate deadline can

[PATCH v6 11/15] drm/atomic-helper: Set fence deadline for vblank

2023-02-24 Thread Rob Clark
From: Rob Clark For an atomic commit updating a single CRTC (ie. a pageflip) calculate the next vblank time, and inform the fence(s) of that deadline. v2: Comment typo fix (danvet) Signed-off-by: Rob Clark Reviewed-by: Daniel Vetter Signed-off-by: Rob Clark --- drivers/gpu/drm

[PATCH v6 10/15] drm/vblank: Add helper to get next vblank time

2023-02-24 Thread Rob Clark
From: Rob Clark Will be used in the next commit to set a deadline on fences that an atomic update is waiting on. v2: Calculate time at *start* of vblank period, not end Signed-off-by: Rob Clark --- drivers/gpu/drm/drm_vblank.c | 52 +--- include/drm

[PATCH v6 14/15] drm/msm/atomic: Switch to vblank_start helper

2023-02-24 Thread Rob Clark
From: Rob Clark Drop our custom thing and switch to drm_crtc_next_vblank_start() for calculating the time of the start of the next vblank period. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 15 --- drivers/gpu/drm/msm/msm_atomic.c| 8

[PATCH v6 12/15] drm/msm: Add deadline based boost support

2023-02-24 Thread Rob Clark
From: Rob Clark Track the nearest deadline on a fence timeline and set a timer to expire shortly before to trigger boost if the fence has not yet been signaled. v2: rebase Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_fence.c | 74 + drivers/gpu/drm/msm

[PATCH v6 13/15] drm/msm: Add wait-boost support

2023-02-24 Thread Rob Clark
From: Rob Clark Add a way for various userspace waits to signal urgency. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_drv.c | 12 drivers/gpu/drm/msm/msm_gem.c | 5 + include/uapi/drm/msm_drm.h| 14 -- 3 files changed, 25 insertions(+), 6 deletions

[PATCH v6 08/15] drm/scheduler: Add fence deadline support

2023-02-24 Thread Rob Clark
a thread calling drm_sched_fence_set_deadline_finished() sees fence->parent set before drm_sched_fence_set_parent() does this test_bit(DMA_FENCE_FLAG_HAS_DEADLINE_BIT). Signed-off-by: Rob Clark Acked-by: Luben Tuikov --- drivers/gpu/drm/scheduler/sched_fence.c |

<    2   3   4   5   6   7   8   9   10   11   >