On Tue, Sep 10, 2019 at 01:06:50PM -0700, David Riley wrote:
> Factor function in preparation to generating scatterlist prior to locking.
Patches are looking good now, but they don't apply. What tree was used
to create them?
Latest virtio-gpu driver bits are in drm-misc-next (see
https://cgit.fr
On Mon, Sep 09, 2019 at 04:06:32PM +0200, Thomas Zimmermann wrote:
> Before updating the display from the console's shadow buffer, the dirty
> worker now waits for vblank. This allows several screen updates to pile
> up and acts as a rate limiter.
>
> Signed-off-by: Thomas Zimmermann
> ---
> dri
On Mon, Sep 09, 2019 at 04:06:33PM +0200, Thomas Zimmermann wrote:
> Support for vblank requires VSYNC to signal an interrupt, which is broken
> on Matrox chipsets. The workaround that is used here and in other free
> Matrox drivers is to program to the value of and
> enable the VLINE interrupt.
VRAM memory manager to GEM VRAM implementation
> drm/vram: Have VRAM MM call GEM VRAM functions directly
> drm/vram: Unexport internal functions of VRAM MM
> drm/vram: Unconditonally set BO call-back functions
Looks all sane.
Acked-by: Gerd Hoffmann
cheers,
Gerd
Hi,
> > + vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTEXPAND |
> > VM_DONTDUMP;
> > + vma->vm_page_prot =
> > pgprot_writecombine(vm_get_page_prot(vma->vm_flags));
> > + vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot);
> > + }
>
> Totall
/dri-devel/2019-September/234308.html
>
> Thomas Zimmermann (4):
> drm/vram: Add kmap ref-counting to GEM VRAM objects
> drm/vram: Acquire lock only once per call to vmap()/vunmap()
> drm/vram: Add infrastructure for move_notify()
> drm/vram: Implement lazy unmapping for G
On Mon, Sep 09, 2019 at 07:02:33AM +, Koenig, Christian wrote:
> Am 05.09.19 um 09:05 schrieb Gerd Hoffmann:
> > No users left. Drivers either setup vma_offset_manager themself
> > (vmwgfx) or pass the gem vma_offset_manager to ttm_bo_device_init
> > (all other drivers).
Hi,
--verbose please. Do you see the same hang? Does the patch fix it?
> --- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c
> +++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c
> @@ -97,8 +97,9 @@ int ttm_eu_reserve_buffers(struct ww_acq
> struct list_head *dups, bool del_lru)
[
I think with that
> we'd have a really solid case to add this ->mmap hook.
Looks easy on a quick glance. So something like the patch below (quick
sketch, not tested yet other than compiling it)?
cheers,
Gerd
From c13b30d776fb593a03473fa3bc93baf470cba728 Mon Sep 17 00:00:00 2001
From:
On Fri, Sep 06, 2019 at 12:37:47PM +0200, Thomas Zimmermann wrote:
> Hi
>
> Am 06.09.19 um 11:39 schrieb Gerd Hoffmann:
> >> +void drm_gem_vram_bo_driver_move_notify(struct ttm_buffer_object *bo,
> >> + bool evict,
> >> +
> +void drm_gem_vram_bo_driver_move_notify(struct ttm_buffer_object *bo,
> + bool evict,
> + struct ttm_mem_reg *new_mem)
> +{
[ ... ]
> + if (!kmap->virtual)
> + return;
> + ttm_bo_kunmap(kmap);
> + kma
> +/* How many bytes left in this page. */
> +static unsigned int rest_of_page(void *data)
> +{
> + return PAGE_SIZE - offset_in_page(data);
> +}
Not needed.
> +/* Create sg_table from a vmalloc'd buffer. */
> +static struct sg_table *vmalloc_to_sgt(char *data, uint32_t size, int
> *sg_ents)
On Thu, Sep 05, 2019 at 10:19:40AM +0200, Thomas Zimmermann wrote:
> Hi
>
> Am 05.09.19 um 09:56 schrieb Daniel Vetter:
> > On Thu, Sep 5, 2019 at 9:01 AM Gerd Hoffmann wrote:
> >>
> >> Hi,
> >>
> >>> - imo we should fix this by using t
On Tue, Aug 06, 2019 at 09:00:10PM +0300, Jaak Ristioja wrote:
> Hello!
>
> I'm writing to report a crash in the QXL / DRM code in the Linux kernel.
> I originally filed the issue on LaunchPad and more details can be found
> there, although I doubt whether these details are useful.
Any change wit
Pass gem vma_offset_manager to ttm_bo_device_init(), so ttm uses it
instead of its own embedded struct. This makes some gem functions
(specifically drm_gem_object_lookup) work on ttm objects.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 +-
1 file changed, 1
Pass gem vma_offset_manager to ttm_bo_device_init(), so ttm uses it
instead of its own embedded struct. This makes some gem functions
(specifically drm_gem_object_lookup) work on ttm objects.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/drm_vram_mm_helper.c | 2 +-
1 file changed, 1
Pass gem vma_offset_manager to ttm_bo_device_init(), so ttm uses it
instead of its own embedded struct. This makes some gem functions
(specifically drm_gem_object_lookup) work on ttm objects.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
1 file changed, 1
Gerd Hoffmann (8):
drm/ttm: turn ttm_bo_device.vma_manager into a pointer
drm/nouveau: switch to gem vma offset manager
drm/vram: switch to gem vma offset manager
drm/radeon: switch to gem vma offset manager
drm/amdgpu: switch to gem vma offset manager
drm/qxl: switch to gem vma
Add struct drm_vma_offset_manager to vma_private, initialize it and
pass it to ttm_bo_device_init().
With this in place the last user of ttm's embedded vma offset manager
is gone and we can remove it (in a separate patch).
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/vmwgfx/vmwgfx_
Pass gem vma_offset_manager to ttm_bo_device_init(), so ttm uses it
instead of its own embedded struct. This makes some gem functions
(specifically drm_gem_object_lookup) work on ttm objects.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_ttm.c | 2 +-
1 file changed, 1 insertion
Pass gem vma_offset_manager to ttm_bo_device_init(), so ttm uses it
instead of its own embedded struct. This makes some gem functions
(specifically drm_gem_object_lookup) work on ttm objects.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +-
1 file changed, 1
No users left. Drivers either setup vma_offset_manager themself
(vmwgfx) or pass the gem vma_offset_manager to ttm_bo_device_init
(all other drivers).
Signed-off-by: Gerd Hoffmann
---
include/drm/ttm/ttm_bo_driver.h | 4 +---
drivers/gpu/drm/ttm/ttm_bo.c| 9 ++---
2 files changed, 3
_vma_manager is used.
All callers are updated to pass NULL, so the behavior doesn't change.
Signed-off-by: Gerd Hoffmann
---
include/drm/ttm/ttm_bo_driver.h | 8 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 +
drivers/gpu/drm/drm_vram_mm_helper.c| 1 +
drivers/gpu/drm/no
Hi,
> - imo we should fix this by using the io_mapping stuff, that avoids
> the overhead of repeated pat checks for map/unmap.
Another idea: IIRC ttm has a move_notify callback. So we could simply
keep mappings active even when the refcount goes down to zero. Then do
the actual unmap either
artman
> Cc: Thomas Gleixner
> Cc: Sam Ravnborg
> Cc: Gerd Hoffmann
> Cc: Oleksandr Andrushchenko
> Cc: CK Hu
> Cc: Daniel Vetter
> Cc: Alex Deucher
> Cc: "Christian König"
> Cc: YueHaibing
> Cc: Sam Bobroff
> Cc: Huang Rui
> Cc: "Y.C. Ch
s Zimmermann
> Cc: Davidlohr Bueso
Reviewed-by: Gerd Hoffmann
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
On Wed, Sep 04, 2019 at 04:10:30PM -0700, Chia-I Wu wrote:
> On Wed, Sep 4, 2019 at 12:48 AM Gerd Hoffmann wrote:
> >
> > Only call virtio_gpu_array_add_fence if we actually have a fence.
> >
> > Fixes: da758d51968a ("drm/virtio: rework virtio_gpu_execbuffer_ioctl
Only call virtio_gpu_array_add_fence if we actually have a fence.
Fixes: da758d51968a ("drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing")
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
di
Switch qxl to use drm_gem_object_funcs callbacks
instead of drm_driver callbacks.
Signed-off-by: Gerd Hoffmann
Acked-by: Thomas Zimmermann
---
drivers/gpu/drm/qxl/qxl_drv.c| 8
drivers/gpu/drm/qxl/qxl_object.c | 12
2 files changed, 12 insertions(+), 8 deletions
select isn't recursive, so we can't turn on DRM_TTM + DRM_TTM_HELPER
in config DRM_VRAM_HELPER, we have to select them on the vram users
instead.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/Kconfig | 2 --
drivers/gpu/drm/ast/Kconfig | 2 ++
drive
debug output.
Signed-off-by: Gerd Hoffmann
Acked-by: Thomas Zimmermann
Reviewed-by: Daniel Vetter
---
include/drm/drm_gem_ttm_helper.h | 19 ++
drivers/gpu/drm/drm_gem_ttm_helper.c | 56
Documentation/gpu/drm-mm.rst | 12 ++
drivers/gpu/drm
Gerd Hoffmann (7):
drm: add drm_print_bits
drm/ttm: add drm gem ttm helpers, starting with
drm_gem_ttm_print_info()
drm/vram: use drm_gem_ttm_print_info
drm/vram: add vram-mm debugfs file
drm/qxl: use drm_gem_object_funcs callbacks
drm/qxl: use drm_gem_ttm_print_info
drm/vram
Signed-off-by: Gerd Hoffmann
Acked-by: Thomas Zimmermann
Reviewed-by: Daniel Vetter
---
drivers/gpu/drm/drm_gem_vram_helper.c | 4 +++-
drivers/gpu/drm/Kconfig | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c
b/drivers
New helper to print named bits of some value (think flags fields).
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_print.h | 3 +++
drivers/gpu/drm/drm_print.c | 33 +
2 files changed, 36 insertions(+)
diff --git a/include/drm/drm_print.h b/include/drm
Signed-off-by: Gerd Hoffmann
Acked-by: Thomas Zimmermann
---
drivers/gpu/drm/qxl/qxl_drv.h| 1 +
drivers/gpu/drm/qxl/qxl_object.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
index 9e034c5fa87d..d4051409ce64 100644
--- a
0x0900-0x0c00: 768: used
0x0c00-0x4000: 13312: free
total: 16384, used 3072 free 13312
Signed-off-by: Gerd Hoffmann
Acked-by: Thomas Zimmermann
---
include/drm/drm_gem_vram_helper.h| 1 +
include/drm/drm_vram_mm_helper.h | 1
0x0900-0x0c00: 768: used
0x0c00-0x4000: 13312: free
total: 16384, used 3072 free 13312
Signed-off-by: Gerd Hoffmann
Acked-by: Thomas Zimmermann
---
include/drm/drm_gem_vram_helper.h| 1 +
include/drm/drm_vram_mm_helper.h | 1
Switch qxl to use drm_gem_object_funcs callbacks
instead of drm_driver callbacks.
Signed-off-by: Gerd Hoffmann
Acked-by: Thomas Zimmermann
---
drivers/gpu/drm/qxl/qxl_drv.c| 8
drivers/gpu/drm/qxl/qxl_object.c | 12
2 files changed, 12 insertions(+), 8 deletions
Signed-off-by: Gerd Hoffmann
Acked-by: Thomas Zimmermann
---
drivers/gpu/drm/drm_gem_vram_helper.c | 4 +++-
drivers/gpu/drm/Kconfig | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c
b/drivers/gpu/drm/drm_gem_vram_helper.c
Signed-off-by: Gerd Hoffmann
Acked-by: Thomas Zimmermann
---
drivers/gpu/drm/qxl/qxl_drv.h| 1 +
drivers/gpu/drm/qxl/qxl_object.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
index 9e034c5fa87d..d4051409ce64 100644
--- a
New helper to print named bits of some value (think flags fields).
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_print.h | 3 +++
drivers/gpu/drm/drm_print.c | 36
2 files changed, 39 insertions(+)
diff --git a/include/drm/drm_print.h b/include/drm
to the debug output.
Signed-off-by: Gerd Hoffmann
Acked-by: Thomas Zimmermann
---
include/drm/drm_gem_ttm_helper.h | 19 ++
drivers/gpu/drm/drm_gem_ttm_helper.c | 53
Documentation/gpu/drm-mm.rst | 12 +++
drivers/gpu/drm/Kconfig
Gerd Hoffmann (6):
drm: add drm_print_bits
drm/ttm: add drm gem ttm helpers, starting with
drm_gem_ttm_print_info()
drm/vram: use drm_gem_ttm_print_info
drm/vram: add vram-mm debugfs file
drm/qxl: use drm_gem_object_funcs callbacks
drm/qxl: use drm_gem_ttm_print_info
drivers
On Mon, Sep 02, 2019 at 04:34:49PM +0200, Thomas Zimmermann wrote:
> This patch seems unrelated.
Well, patch 5/5 depends on it because it hooks the
drm_gem_ttm_print_info helper into the new
qxl_object_funcs added by this patch.
> Am 02.09.19 um 14:41 schrieb Gerd Hoffmann:
> > Switc
Hi,
> > +++ b/include/drm/drm_gem_vram_helper.h
> > @@ -123,6 +123,7 @@ int drm_gem_vram_driver_dumb_mmap_offset(struct
> > drm_file *file,
> > * &struct drm_driver with default functions.
> > */
> > #define DRM_GEM_VRAM_DRIVER \
> > + .debugfs_init = drm_vram_mm_debugfs_init
Hi,
> > @@ -169,6 +169,7 @@ config DRM_VRAM_HELPER
> > tristate
> > depends on DRM
> > select DRM_TTM
> > + select DRM_TTM_HELPER
>
> I thought that VRAM helpers already depend on TTM helpers.
No, they don't. Patch #1 adds them ;)
cheers,
Gerd
___
Hi,
> > + [ TTM_PL_SYSTEM ] = "system",
> > + [ TTM_PL_TT ] = "tt",
> > + [ TTM_PL_VRAM ] = "vram",
> > + [ TTM_PL_PRIV ] = "priv",
> > +
>
> This 'gap' in the array seems to be a problem for drivers that use these
> bits. Could the print logic be
to the debug output.
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_gem_ttm_helper.h | 19
drivers/gpu/drm/drm_gem_ttm_helper.c | 67
Documentation/gpu/drm-mm.rst | 12 +
drivers/gpu/drm/Kconfig | 7 +++
drivers/gpu/drm
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_gem_vram_helper.h | 1 +
drivers/gpu/drm/drm_gem_vram_helper.c | 3 ++-
drivers/gpu/drm/Kconfig | 1 +
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/drm/drm_gem_vram_helper.h
b/include/drm
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_drv.h| 1 +
drivers/gpu/drm/qxl/qxl_object.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
index 9e034c5fa87d..d4051409ce64 100644
--- a/drivers/gpu/drm/qxl
Switch qxl to use drm_gem_object_funcs callbacks
instead of drm_driver callbacks.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_drv.c| 8
drivers/gpu/drm/qxl/qxl_object.c | 12
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm
Gerd Hoffmann (5):
drm/ttm: add drm_gem_ttm_print_info()
drm/vram: use drm_gem_ttm_print_info
drm/vram: add vram-mm debugfs file
drm/qxl: use drm_gem_object_funcs callbacks
drm/qxl: use drm_gem_ttm_print_info
drivers/gpu/drm/qxl/qxl_drv.h | 1 +
include/drm
0x0900-0x0c00: 768: used
0x0c00-0x4000: 13312: free
total: 16384, used 3072 free 13312
Signed-off-by: Gerd Hoffmann
---
include/drm/drm_gem_vram_helper.h| 1 +
include/drm/drm_vram_mm_helper.h | 1 +
drivers/gpu/drm
On Fri, Aug 30, 2019 at 10:49:25AM -0700, David Riley wrote:
> Hi Gerd,
>
> On Fri, Aug 30, 2019 at 4:16 AM Gerd Hoffmann wrote:
> >
> > Hi,
> >
> > > > > - kfree(vbuf->data_buf);
> > > > > + kvfree(vbuf-&g
> > Completely different approach: use get_user_pages() and don't copy the
> > execbuffer at all.
> It would be really nice if execbuffer does not copy.
>
> The user space owns the buffer and may overwrite the contents
> immediately after the ioctl.
Oh, right. The exec ioctl doesn't block. So t
Hi,
> > > - kfree(vbuf->data_buf);
> > > + kvfree(vbuf->data_buf);
> >
> > if (is_vmalloc_addr(vbuf->data_buf)) ...
> >
> > needed here I gues?
> >
>
> kvfree() handles vmalloc/kmalloc/kvmalloc internally by doing that check.
Ok.
> - videobuf_vmalloc_to_sg in drivers/media/v4l2-core/v
Hi,
> {
> if (vbuf->resp_size > MAX_INLINE_RESP_SIZE)
> kfree(vbuf->resp_buf);
> - kfree(vbuf->data_buf);
> + kvfree(vbuf->data_buf);
if (is_vmalloc_addr(vbuf->data_buf)) ...
needed here I gues?
> +/* Create sg_table from a vmalloc'd buffer. */
> +static struct sg
-by: Chia-I Wu
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 8
drivers/gpu/drm/virtio/virtgpu_gem.c | 27 +++
drivers/gpu/drm/virtio/virtgpu_kms.c | 6 ++
drivers/gpu/drm/virtio/virtgpu_vq.c | 2 +-
4 files changed, 42 insertions
On Thu, Aug 29, 2019 at 04:44:49PM -0700, Chia-I Wu wrote:
> The series is
>
> Reviewed-by: Chia-I Wu
Thanks.
> However I ran into a deadlock with one GPU-heavy app. When I exits
> Unigine Valley benchmark with ctrl-c, the entire driver locks up
> probably 8 out of 10 times on my machine. W
No need to do the reservation dance,
we can just wait on the fence directly.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Daniel Vetter
---
drivers/gpu/drm/virtio/virtgpu_plane.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/virtio
Call reservation_object_* directly instead
of using ttm_bo_{reserve,unreserve}.
v4: check for EINTR only.
v3: check for EINTR too.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Daniel Vetter
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff
Switch to the virtio_gpu_array_* helper workflow.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 3 +-
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 40 ++
drivers/gpu/drm/virtio/virtgpu_vq.c| 8 --
3 files changed, 23 insertions(+), 28
the
command is in flight still.
v6: rewrite most of the patch.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h| 2 +
drivers/gpu/drm/virtio/virtgpu_object.c | 74 +++--
drivers/gpu/drm/virtio/virtgpu_vq.c | 4 ++
3 files changed, 37 insertions
No users left.
Signed-off-by: Gerd Hoffmann
Acked-by: Daniel Vetter
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 3 --
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 39 --
2 files changed, 42 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h
b/drivers/gpu/drm
fencing was sorted the switch was surprisingly easy and for the
most part just removing the ttm code.
v4: fix drm_gem_object_funcs name.
Signed-off-by: Gerd Hoffmann
Acked-by: Daniel Vetter
---
drivers/gpu/drm/virtio/virtgpu_drv.h| 52 +---
drivers/gpu/drm/virtio/virtgpu_drv.c| 20
virtio-private instead of generic helpers.
Signed-off-by: Gerd Hoffmann
[fixup] virtio_gpu_array_lock_resv
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 17 +
drivers/gpu/drm/virtio/virtgpu_gem.c | 93
2 files changed, 110 insertions(+)
diff --git a/drivers/gpu/drm
Use drm_gem_reservation_object_wait() in virtio_gpu_wait_ioctl().
This also makes the ioctl run lockless.
v9: fix return value.
v5: handle lookup failure.
v2: use reservation_object_test_signaled_rcu for VIRTGPU_WAIT_NOWAIT.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Daniel Vetter
---
drivers
object references and free virtio_gpu_object_array.
v6: rewrite most of the patch.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 6 ++-
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 56 +-
drivers/gpu/drm/virtio/virtgpu_vq.c| 21 +++---
3
All callers pass no_wait = false.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Daniel Vetter
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 5 ++---
drivers/gpu/drm/virtio/virtgpu_gem.c | 4 ++--
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 4 ++--
3 files changed, 6 insertions(+), 7 deletions
Switch to the virtio_gpu_array_* helper workflow.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 4 +--
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 50 +++---
drivers/gpu/drm/virtio/virtgpu_plane.c | 21 ---
drivers/gpu/drm/virtio
No users left.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 15 ---
1 file changed, 15 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h
b/drivers/gpu/drm/virtio/virtgpu_drv.h
index 3e5b2d1db42d..85f974a9837b 100644
--- a/drivers/gpu/drm
No users left.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 21 -
1 file changed, 21 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h
b/drivers/gpu/drm/virtio/virtgpu_drv.h
index 85f974a9837b..fb35831ed351 100644
--- a/drivers/gpu
Switch to the virtio_gpu_array_* helper workflow.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 4 ++--
drivers/gpu/drm/virtio/virtgpu_gem.c | 24 +++-
drivers/gpu/drm/virtio/virtgpu_vq.c | 12
3 files changed, 21 insertions(+), 19
Thin wrapper around virtio_gpu_object_create(),
but calling that directly works equally well.
Signed-off-by: Gerd Hoffmann
Acked-by: Daniel Vetter
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 4
drivers/gpu/drm/virtio/virtgpu_gem.c | 23 ---
drivers/gpu/drm/virtio
Make sure we don't leak half-initialized fences outside the driver.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_fence.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/virtio/virtgpu_fence.c
b/drivers/gpu/drm/virtio/virtgpu_fence.c
index a0514f5
With this gem and ttm will use the same reservation object,
so mixing and matching ttm / gem reservation helpers should
work fine.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Daniel Vetter
---
drivers/gpu/drm/virtio/virtgpu_object.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff
No users left.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Daniel Vetter
---
drivers/gpu/drm/virtio/virtgpu_drv.h| 1 -
drivers/gpu/drm/virtio/virtgpu_object.c | 13 -
2 files changed, 14 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h
b/drivers/gpu/drm/virtio
es to the series.
v5:
- fence bugfixes.
- minor optimizations.
v4:
- make gem array helpers private to virtio.
- misc minor fixes.
v3:
- add gem array helpers.
- rework fencing.
please review.
thanks,
Gerd
Gerd Hoffmann (18):
drm/virtio: pass gem reservation object to ttm init
drm/v
> I applied the following fix patch:
>
> From: Stephen Rothwell
> Date: Wed, 28 Aug 2019 18:37:40 +1000
> Subject: [PATCH] drm/virtio: module_param_named() requires linux/moduleparam.h
>
> Signed-off-by: Stephen Rothwell
> ---
> drivers/gpu/drm/virtio/virtgpu_object.c | 2 ++
> 1 file changed,
On Mon, Aug 26, 2019 at 03:34:56PM -0700, Chia-I Wu wrote:
> On Thu, Aug 22, 2019 at 2:47 AM Gerd Hoffmann wrote:
> >
> > Use drm_atomic_helper_check_plane_state()
> > to sanity check the plane state.
> >
> > Signed-off-by: Gerd Hoffmann
> > ---
> >
Hi,
> Also this patch series also adjust vram helpers, and I think it has a
> slightly different goal: Just aligning mmap paths a bit more between
> ttm and not-ttm based drivers.
Not just ttm/not-ttm. gem_driver->fops->mmap is the only fops callback
where we can't use a generic gem callback t
On Mon, Aug 26, 2019 at 10:47:07AM +0200, Thomas Zimmermann wrote:
> Hi,
>
> I would have liked to get some context on the purpose of GEM TTM
> helpers. Is is just share-able code?
Yes. Shareable code for drivers which use both ttm and gem (all except
vmgfx).
> From my understanding VRAM helper
fencing was sorted the switch was surprisingly easy and for the
most part just removing the ttm code.
v4: fix drm_gem_object_funcs name.
Signed-off-by: Gerd Hoffmann
Acked-by: Daniel Vetter
---
drivers/gpu/drm/virtio/virtgpu_drv.h| 52 +---
drivers/gpu/drm/virtio/virtgpu_drv.c| 20
helpers.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 17 +
drivers/gpu/drm/virtio/virtgpu_gem.c | 93
2 files changed, 110 insertions(+)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h
b/drivers/gpu/drm/virtio/virtgpu_drv.h
index
Switch to the virtio_gpu_array_* helper workflow.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 4 +--
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 50 +++---
drivers/gpu/drm/virtio/virtgpu_plane.c | 21 ---
drivers/gpu/drm/virtio
object references and free virtio_gpu_object_array.
v6: rewrite most of the patch.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 6 ++-
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 56 +-
drivers/gpu/drm/virtio/virtgpu_vq.c| 21 +++---
3
No users left.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 15 ---
1 file changed, 15 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h
b/drivers/gpu/drm/virtio/virtgpu_drv.h
index 3e5b2d1db42d..85f974a9837b 100644
--- a/drivers/gpu/drm
Thin wrapper around virtio_gpu_object_create(),
but calling that directly works equally well.
Signed-off-by: Gerd Hoffmann
Acked-by: Daniel Vetter
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 4
drivers/gpu/drm/virtio/virtgpu_gem.c | 23 ---
drivers/gpu/drm/virtio
No users left.
Signed-off-by: Gerd Hoffmann
Acked-by: Daniel Vetter
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 3 --
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 39 --
2 files changed, 42 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h
b/drivers/gpu/drm
All callers pass no_wait = false.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Daniel Vetter
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 5 ++---
drivers/gpu/drm/virtio/virtgpu_gem.c | 4 ++--
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 4 ++--
3 files changed, 6 insertions(+), 7 deletions
Switch to the virtio_gpu_array_* helper workflow.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 4 ++--
drivers/gpu/drm/virtio/virtgpu_gem.c | 24 +++-
drivers/gpu/drm/virtio/virtgpu_vq.c | 12
3 files changed, 21 insertions(+), 19
Call reservation_object_* directly instead
of using ttm_bo_{reserve,unreserve}.
v4: check for EINTR only.
v3: check for EINTR too.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Daniel Vetter
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff
the
command is in flight still.
v6: rewrite most of the patch.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h| 2 +
drivers/gpu/drm/virtio/virtgpu_object.c | 74 +++--
drivers/gpu/drm/virtio/virtgpu_vq.c | 4 ++
3 files changed, 37 insertions
Make sure we don't leak half-initialized fences outside the driver.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_fence.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/virtio/virtgpu_fence.c
b/drivers/gpu/drm/virtio/virtgpu_fence.c
index a0514f5
Use drm_gem_reservation_object_wait() in virtio_gpu_wait_ioctl().
This also makes the ioctl run lockless.
v5: handle lookup failure.
v2: use reservation_object_test_signaled_rcu for VIRTGPU_WAIT_NOWAIT.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Daniel Vetter
---
drivers/gpu/drm/virtio
No users left.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 21 -
1 file changed, 21 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h
b/drivers/gpu/drm/virtio/virtgpu_drv.h
index 85f974a9837b..fb35831ed351 100644
--- a/drivers/gpu
With this gem and ttm will use the same reservation object,
so mixing and matching ttm / gem reservation helpers should
work fine.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Daniel Vetter
---
drivers/gpu/drm/virtio/virtgpu_object.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff
No users left.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Daniel Vetter
---
drivers/gpu/drm/virtio/virtgpu_drv.h| 1 -
drivers/gpu/drm/virtio/virtgpu_object.c | 13 -
2 files changed, 14 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h
b/drivers/gpu/drm/virtio
lpers private to virtio.
- misc minor fixes.
v3:
- add gem array helpers.
- rework fencing.
please review.
thanks,
Gerd
Gerd Hoffmann (18):
drm/virtio: pass gem reservation object to ttm init
drm/virtio: switch virtio_gpu_wait_ioctl() to gem helper.
drm/virtio: simplify cursor updates
Switch to the virtio_gpu_array_* helper workflow.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 3 +-
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 40 ++
drivers/gpu/drm/virtio/virtgpu_vq.c| 8 --
3 files changed, 23 insertions(+), 28
701 - 800 of 2019 matches
Mail list logo