[Spice-devel] [PATCH 0/5] Clean up TTM mmap offsets

2019-02-07 Thread Thomas Zimmermann
code is located within TTM. TTM and GEM share the same range for mmap-able BOs. Thomas Zimmermann (5): staging/vboxvideo: Use same BO mmap offset as other drivers drm/ttm: Define a single DRM_FILE_PAGE_OFFSET constant drm/ttm: Remove file_page_offset parameter from ttm_bo_device_init() drm

[Spice-devel] [PATCH 3/5] drm/ttm: Remove file_page_offset parameter from ttm_bo_device_init()

2019-02-07 Thread Thomas Zimmermann
The parameter file_page_offset is a constant shared by all drivers. Just replace it with the constant itself. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 - drivers/gpu/drm/ast/ast_ttm.c | 1 - drivers/gpu/drm/bochs/bochs_mm.c

[Spice-devel] [PATCH 1/5] staging/vboxvideo: Use same BO mmap offset as other drivers

2019-02-07 Thread Thomas Zimmermann
The vboxvideo driver mmaps BOs at 0x1000 or higher. Changing the offset to 0x1 aligns the driver with all other DRM drivers. Signed-off-by: Thomas Zimmermann --- drivers/staging/vboxvideo/vbox_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging

Re: [Spice-devel] [PATCH 2/5] drm/ttm: Define a single DRM_FILE_PAGE_OFFSET constant

2019-02-07 Thread Thomas Zimmermann
Hi Am 07.02.19 um 09:59 schrieb Thomas Zimmermann: > Most TTM drivers define the constant DRM_FILE_PAGE_OFFSET of the same > value. The only exception is vboxvideo, which is being converted to the > new offset by this patch. Unifying the constants in a single place > simplifies the

[Spice-devel] [PATCH 2/5] drm/ttm: Define a single DRM_FILE_PAGE_OFFSET constant

2019-02-07 Thread Thomas Zimmermann
Most TTM drivers define the constant DRM_FILE_PAGE_OFFSET of the same value. The only exception is vboxvideo, which is being converted to the new offset by this patch. Unifying the constants in a single place simplifies the driver code. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd

[Spice-devel] [PATCH 4/5] drm/ttm: Quick-test mmap offset in ttm_bo_mmap()

2019-02-07 Thread Thomas Zimmermann
A BO's address has to be at least the minimum offset. Sharing this test in ttm_bo_mmap() removes code from drivers. A full buffer-address validation is still done within drm_vma_offset_lockup_locked(). Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 9

Re: [Spice-devel] [PATCH 0/5] Clean up TTM mmap offsets

2019-02-07 Thread Thomas Zimmermann
Am 07.02.19 um 10:36 schrieb Koenig, Christian: > Am 07.02.19 um 09:59 schrieb Thomas Zimmermann: >> Almost all TTM-based drivers use the same values for the mmap-able >> range of BO addresses. Each driver therefore duplicates the >> DRM_FILE_PAGE_OFFSET constant. OTOH,

[Spice-devel] [PATCH 5/5] drm: Use the same mmap-range offset and size for GEM and TTM

2019-02-07 Thread Thomas Zimmermann
GEM defines DRM_FILE_PAGE_OFFSET_{START,SIZE} constants for the mmap-able range of addresses. TTM can use them as well. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_gem.c | 17 - drivers/gpu/drm/ttm/ttm_bo.c| 4 ++-- drivers/gpu/drm/ttm/ttm_bo_vm.c | 2

Re: [Spice-devel] [PATCH 2/5] drm/ttm: Define a single DRM_FILE_PAGE_OFFSET constant

2019-02-10 Thread Thomas Zimmermann
func { > _______ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel > -- Thomas Zimmermann Graphics Driver Developer SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnbe

Re: [Spice-devel] [PATCH 4/5] drm/qxl: use drm_gem_object_funcs callbacks

2019-09-03 Thread Thomas Zimmermann
Hi Am 03.09.19 um 08:24 schrieb Gerd Hoffmann: > 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

Re: [Spice-devel] [PATCH 5/5] drm/qxl: use drm_gem_ttm_print_info

2019-09-02 Thread Thomas Zimmermann
Acked-by: Thomas Zimmermann Am 02.09.19 um 14:41 schrieb Gerd Hoffmann: > 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_dr

Re: [Spice-devel] [PATCH 4/5] drm/qxl: use drm_gem_object_funcs callbacks

2019-09-02 Thread Thomas Zimmermann
*surf, > @@ -100,6 +111,7 @@ int qxl_bo_create(struct qxl_device *qdev, > kfree(bo); > return r; > } > + bo->tbo.base.funcs = _object_funcs; > bo->type = domain; > bo->pin_count = pinned ? 1 : 0; > bo->

[Spice-devel] [PATCH v3 4/4] drm/qxl: Use simple encoder

2020-02-26 Thread Thomas Zimmermann
The qxl driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. v2: * rebase onto new simple-encoder interface Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Acked-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 18

[Spice-devel] [PATCH v3 3/4] drm/mgag200: Use simple encoder

2020-02-26 Thread Thomas Zimmermann
The mgag200 driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. v3: * init pre-allocated encoder with drm_simple_encoder_init() v2: * rebase onto new simple-encoder interface Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm

[Spice-devel] [PATCH v3 0/4] drm: Provide a simple encoder

2020-02-26 Thread Thomas Zimmermann
) * provide more precise documentation (Sam) v2: * move simple encoder to KMS helpers (Daniel) * remove name argument; simplifies implementation (Gerd) * don't allocate with devm_ interfaces; unsafe with DRM (Noralf) Thomas Zimmermann (4): drm/simple-kms: Add

[Spice-devel] [PATCH v3 2/4] drm/ast: Use simple encoder

2020-02-26 Thread Thomas Zimmermann
The ast driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. v2: * rebase onto new simple-encoder interface Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg --- drivers/gpu/drm/ast/ast_drv.h | 6 +- drivers/gpu/drm/ast

[Spice-devel] [PATCH v3 1/4] drm/simple-kms: Add drm_simple_encoder_{init, create}()

2020-02-26 Thread Thomas Zimmermann
argument; simplifies implementation * don't allocate with devm_ interfaces; unsafe with DRM Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_simple_kms_helper.c | 34 ++--- include/drm/drm_simple_kms_helper.h | 4 +++ 2 files changed, 35 insertions(+), 3

Re: [Spice-devel] [PATCH v3 4/4] drm/qxl: Use simple encoder

2020-02-27 Thread Thomas Zimmermann
Hi Sam Am 27.02.20 um 21:45 schrieb Sam Ravnborg: > Hi Thomas. > > On Tue, Feb 25, 2020 at 02:10:55PM +0100, Thomas Zimmermann wrote: >> The qxl driver uses an empty implementation for its encoder. Replace >> the code with the generic simple encoder. >> >> v2:

[Spice-devel] [PATCH v4 2/4] drm/ast: Use simple encoder

2020-02-28 Thread Thomas Zimmermann
The ast driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. v2: * rebase onto new simple-encoder interface Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg --- drivers/gpu/drm/ast/ast_drv.h | 6 +- drivers/gpu/drm/ast

[Spice-devel] [PATCH v4 3/4] drm/mgag200: Use simple encoder

2020-02-28 Thread Thomas Zimmermann
Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg --- drivers/gpu/drm/mgag200/mgag200_drv.h | 9 +-- drivers/gpu/drm/mgag200/mgag200_mode.c | 86 -- 2 files changed, 13 insertions(+), 82 deletions(-) diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.h b/drivers/gpu

[Spice-devel] [PATCH v4 4/4] drm/qxl: Use simple encoder

2020-02-28 Thread Thomas Zimmermann
The qxl driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. v4: * handle errors returned from drm_simple_encoder_init() v2: * rebase onto new simple-encoder interface Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg

[Spice-devel] [PATCH v4 1/4] drm/simple-kms: Add drm_simple_encoder_{init, create}()

2020-02-28 Thread Thomas Zimmermann
argument; simplifies implementation * don't allocate with devm_ interfaces; unsafe with DRM Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg --- drivers/gpu/drm/drm_simple_kms_helper.c | 34 ++--- include/drm/drm_simple_kms_helper.h | 4 +++ 2 files changed

[Spice-devel] [PATCH v4 0/4] drm: Provide a simple encoder

2020-02-28 Thread Thomas Zimmermann
) * don't allocate with devm_ interfaces; unsafe with DRM (Noralf) Thomas Zimmermann (4): drm/simple-kms: Add drm_simple_encoder_{init,create}() drm/ast: Use simple encoder drm/mgag200: Use simple encoder drm/qxl: Use simple encoder drivers/gpu/drm/ast/ast_drv.h | 6 +- drivers/gpu/drm

Re: [Spice-devel] [PATCH 2/6] drm: Add drm_simple_encoder_{init, create}()

2020-02-07 Thread Thomas Zimmermann
ou want to save a few lines in the implementation of drm_simple_encoder_init() (?) If so, I'd rather try to share more internal code among the various init and create functions. Best regards Thomas > > cheers, > Gerd > -- Thomas Zimmermann Graphics Driver Developer SUSE Softwa

[Spice-devel] [PATCH 4/6] drm/mgag200: Use simple encoder

2020-02-07 Thread Thomas Zimmermann
The mgag200 driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/mgag200/mgag200_drv.h | 7 --- drivers/gpu/drm/mgag200/mgag200_mode.c | 60 +- 2 files changed, 2

[Spice-devel] [PATCH 5/6] drm/qxl: Use simple encoder

2020-02-07 Thread Thomas Zimmermann
The qxl driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_display.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/qxl

[Spice-devel] [PATCH 0/6] drm: Provide a simple encoder

2020-02-07 Thread Thomas Zimmermann
encoder instances to use the simple-encoder helpers. But there are at least 11 other drivers which can use the helper and I think I did not examine all drivers yet. The patchset was smoke-tested on mgag200 by running the fbdev console and Gnome on X11. Thomas Zimmermann (6): drm: Move initialization

[Spice-devel] [PATCH 3/6] drm/ast: Use simple encoder

2020-02-07 Thread Thomas Zimmermann
The ast driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ast/ast_drv.h | 6 +- drivers/gpu/drm/ast/ast_mode.c | 25 - 2 files changed, 9 insertions(+), 22

[Spice-devel] [PATCH 6/6] drm/simple-pipe: Use simple encoder

2020-02-07 Thread Thomas Zimmermann
The simple-pipe helpers use an empty implementation for the encoder. Replace the code with the generic simple encoder. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_simple_kms_helper.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm

[Spice-devel] [PATCH 2/6] drm: Add drm_simple_encoder_{init, create}()

2020-02-07 Thread Thomas Zimmermann
instance. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_encoder.c | 116 ++ include/drm/drm_encoder.h | 10 +++ 2 files changed, 126 insertions(+) diff --git a/drivers/gpu/drm/drm_encoder.c b/drivers/gpu/drm/drm_encoder.c index ffe691a1bf34

[Spice-devel] [PATCH 1/6] drm: Move initialization of encoder into an internal function

2020-02-07 Thread Thomas Zimmermann
Moving encoder init code into an internal function, so it can be reused. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_encoder.c | 78 +++ 1 file changed, 52 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/drm_encoder.c b/drivers/gpu/drm

Re: [Spice-devel] [PATCH 2/6] drm: Add drm_simple_encoder_{init, create}()

2020-02-07 Thread Thomas Zimmermann
Hi Am 07.02.20 um 14:37 schrieb Daniel Vetter: > On Fri, Feb 07, 2020 at 09:41:31AM +0100, Thomas Zimmermann wrote: >> The simple-encoder helpers initialize an encoder with an empty >> implementation. This covers the requirements of most of the existing >>

Re: [Spice-devel] [PATCH] drm/qxl: add drm_driver.release callback.

2020-02-07 Thread Thomas Zimmermann
;cursor_ring); > - qxl_ring_free(qdev->release_ring); > qxl_gem_fini(qdev); > qxl_bo_fini(qdev); > + flush_work(>gc_work); > + qxl_ring_free(qdev->command_ring); > + qxl_ring_free(qdev->cursor_ring); > + qxl_ring_free(qdev->release_ring); >

[Spice-devel] [PATCH v2 4/4] drm/qxl: Use simple encoder

2020-02-18 Thread Thomas Zimmermann
The qxl driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. v2: * rebase onto new simple-encoder interface Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_display.c | 18 +++--- 1 file changed, 3 insertions

[Spice-devel] [PATCH v2 2/4] drm/ast: Use simple encoder

2020-02-18 Thread Thomas Zimmermann
The ast driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. v2: * rebase onto new simple-encoder interface Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ast/ast_drv.h | 6 +- drivers/gpu/drm/ast/ast_mode.c | 25

[Spice-devel] [PATCH v2 0/4] drm: Provide a simple encoder

2020-02-18 Thread Thomas Zimmermann
(Daniel) * remove name argument; simplifies implementation (Gerd) * don't allocate with devm_ interfaces; unsafe with DRM (Noralf) Thomas Zimmermann (4): drm/simple-kms: Add drm_simple_encoder_{init,create}() drm/ast: Use simple encoder drm/mgag200: Use simple encoder drm/qxl

[Spice-devel] [PATCH v2 1/4] drm/simple-kms: Add drm_simple_encoder_{init, create}()

2020-02-18 Thread Thomas Zimmermann
-by: Thomas Zimmermann --- drivers/gpu/drm/drm_simple_kms_helper.c | 83 - include/drm/drm_simple_kms_helper.h | 7 +++ 2 files changed, 87 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c index

[Spice-devel] [PATCH v2 3/4] drm/mgag200: Use simple encoder

2020-02-18 Thread Thomas Zimmermann
The mgag200 driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. v2: * rebase onto new simple-encoder interface Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/mgag200/mgag200_drv.h | 7 --- drivers/gpu/drm/mgag200/mgag200_mode.c

Re: [Spice-devel] [PATCH v2 3/4] drm/mgag200: Use simple encoder

2020-02-23 Thread Thomas Zimmermann
Hi Sam thanks for reviewing the patch set. Am 20.02.20 um 19:56 schrieb Sam Ravnborg: > Hi Thomas. > > On Tue, Feb 18, 2020 at 09:48:14AM +0100, Thomas Zimmermann wrote: >> The mgag200 driver uses an empty implementation for its encoder. Replace >> the code with the g

Re: [Spice-devel] [PATCH][next] drm: Replace zero-length array with flexible-array member

2020-03-09 Thread Thomas Zimmermann
vboxvideo/vboxvideo.h | 2 +- >>> drivers/gpu/drm/vc4/vc4_drv.h | 2 +- >>> drivers/gpu/drm/vmwgfx/vmwgfx_page_dirty.c| 2 +- >>> drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 2 +- >>> include/drm/bridge/mhl.h

Re: [Spice-devel] [PATCH 30/44] drm/qxl: Use devm_drm_dev_alloc

2020-04-06 Thread Thomas Zimmermann
qxl_device *qdev, > qdev->vram_mapping = io_mapping_create_wc(qdev->vram_base, > pci_resource_len(pdev, 0)); > if (!qdev->vram_mapping) { > pr_err("Unable to create vram_mapping"); > - r = -ENOMEM; > - goto error; &

Re: [Spice-devel] [PATCH v3 2/7] drm/ttm: Add ttm_kmap_obj_to_dma_buf_map() for type conversion

2020-10-07 Thread Thomas Zimmermann
20 at 10:34:31AM +0200, Christian König wrote: >>>>> Am 30.09.20 um 10:19 schrieb Thomas Zimmermann: >>>>>> Hi >>>>>> >>>>>> Am 30.09.20 um 10:05 schrieb Christian König: >>>>>>> Am 29.09.20 um 19:49 schrieb

Re: [Spice-devel] [PATCH v3 2/7] drm/ttm: Add ttm_kmap_obj_to_dma_buf_map() for type conversion

2020-10-07 Thread Thomas Zimmermann
Hi Am 07.10.20 um 15:10 schrieb Daniel Vetter: > On Wed, Oct 7, 2020 at 2:57 PM Thomas Zimmermann wrote: >> >> Hi >> >> Am 02.10.20 um 11:58 schrieb Daniel Vetter: >>> On Wed, Sep 30, 2020 at 02:51:46PM +0200, Daniel Vetter wrote: >>>> On Wed, Sep

[Spice-devel] [PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory

2020-10-15 Thread Thomas Zimmermann
of struct dma_buf_map, this is not required any longer. The patch removes the rsp code from both, bochs and fbdev. v4: * move dma_buf_map changes into separate patch (Daniel) * TODO list: comment on fbdev updates (Daniel) Signed-off-by: Thomas Zimmermann --- Documentation/gpu

[Spice-devel] [PATCH v4 00/10] Support GEM object mappings from I/O memory

2020-10-15 Thread Thomas Zimmermann
on top of struct dma_buf_map v2: * RFC patchset Thomas Zimmermann (10): drm/vram-helper: Remove invariant parameters from internal kmap function drm/cma-helper: Remove empty drm_gem_cma_prime_vunmap() drm/etnaviv: Remove empty etnaviv_gem_prime_vunmap() drm/exynos: Remove

[Spice-devel] [PATCH v4 02/10] drm/cma-helper: Remove empty drm_gem_cma_prime_vunmap()

2020-10-15 Thread Thomas Zimmermann
The function drm_gem_cma_prime_vunmap() is empty. Remove it before changing the interface to use struct drm_buf_map. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_gem_cma_helper.c | 17 - drivers/gpu/drm/vc4/vc4_bo.c | 1 - include/drm/drm_gem_cma_helper.h

[Spice-devel] [PATCH v4 03/10] drm/etnaviv: Remove empty etnaviv_gem_prime_vunmap()

2020-10-15 Thread Thomas Zimmermann
The function etnaviv_gem_prime_vunmap() is empty. Remove it before changing the interface to use struct drm_buf_map. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/etnaviv/etnaviv_drv.h | 1 - drivers/gpu/drm/etnaviv/etnaviv_gem.c | 1 - drivers/gpu/drm/etnaviv

[Spice-devel] [PATCH v4 05/10] drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers

2020-10-15 Thread Thomas Zimmermann
, Christian) Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_gem_ttm_helper.c | 38 +++ drivers/gpu/drm/ttm/ttm_bo_util.c| 72 include/drm/drm_gem_ttm_helper.h | 6 +++ include/drm/ttm/ttm_bo_api.h | 28

[Spice-devel] [PATCH v4 06/10] drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends

2020-10-15 Thread Thomas Zimmermann
{ in drm_gem_vmap() * remove several empty functions instead of converting them (Daniel) * comment uses of raw pointers with a TODO (Daniel) * TODO list: convert more helpers to use struct dma_buf_map Signed-off-by: Thomas Zimmermann --- Documentation/gpu/todo.rst | 18

[Spice-devel] [PATCH v4 09/10] dma-buf-map: Add memcpy and pointer-increment interfaces

2020-10-15 Thread Thomas Zimmermann
To do framebuffer updates, one needs memcpy from system memory and a pointer-increment function. Add both interfaces with documentation. Signed-off-by: Thomas Zimmermann --- include/linux/dma-buf-map.h | 72 +++-- 1 file changed, 62 insertions(+), 10 deletions

[Spice-devel] [PATCH v4 01/10] drm/vram-helper: Remove invariant parameters from internal kmap function

2020-10-15 Thread Thomas Zimmermann
The parameters map and is_iomem are always of the same value. Removed them to prepares the function for conversion to struct dma_buf_map. v4: * don't check for !kmap->virtual; will always be false Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter --- drivers/gpu/

[Spice-devel] [PATCH v4 07/10] drm/gem: Update internal GEM vmap/vunmap interfaces to use struct dma_buf_map

2020-10-15 Thread Thomas Zimmermann
GEM's vmap and vunmap interfaces now wrap memory pointers in struct dma_buf_map. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_client.c | 18 +++--- drivers/gpu/drm/drm_gem.c | 26 +- drivers/gpu/drm

[Spice-devel] [PATCH v4 04/10] drm/exynos: Remove empty exynos_drm_gem_prime_{vmap, vunmap}()

2020-10-15 Thread Thomas Zimmermann
The functions exynos_drm_gem_prime_{vmap,vunmap}() are empty. Remove them before changing the interface to use struct drm_buf_map. As a side effect of removing drm_gem_prime_vmap(), the error code changes from ENOMEM to EOPNOTSUPP. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/exynos

[Spice-devel] [PATCH v4 08/10] drm/gem: Store client buffer mappings as struct dma_buf_map

2020-10-15 Thread Thomas Zimmermann
and modified with dma_buf_map interfaces. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_client.c| 34 +++-- drivers/gpu/drm/drm_fb_helper.c | 23 +- include/drm/drm_client.h| 7 --- 3 files changed

Re: [Spice-devel] [PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory

2020-10-16 Thread Thomas Zimmermann
Hi On Fri, 16 Oct 2020 14:03:47 +0200 Sam Ravnborg wrote: > Hi Thomas. > > On Thu, Oct 15, 2020 at 02:38:06PM +0200, Thomas Zimmermann wrote: > > At least sparc64 requires I/O-specific access to framebuffers. This > > patch updates the fbdev console accordingly.

Re: [Spice-devel] [PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory

2020-10-16 Thread Thomas Zimmermann
Hi On Fri, 16 Oct 2020 12:58:54 +0200 Sam Ravnborg wrote: > Hi Thomas. > > On Thu, Oct 15, 2020 at 02:38:06PM +0200, Thomas Zimmermann wrote: > > At least sparc64 requires I/O-specific access to framebuffers. This > > patch updates the fbdev console accordingly.

Re: [Spice-devel] [PATCH v4 09/10] dma-buf-map: Add memcpy and pointer-increment interfaces

2020-10-16 Thread Thomas Zimmermann
Hi Sam On Fri, 16 Oct 2020 12:08:54 +0200 Sam Ravnborg wrote: > Hi Thomas. > > On Thu, Oct 15, 2020 at 02:38:05PM +0200, Thomas Zimmermann wrote: > > To do framebuffer updates, one needs memcpy from system memory and a > > pointer-increment function. Add both interfac

Re: [Spice-devel] [PATCH v4 05/10] drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers

2020-10-16 Thread Thomas Zimmermann
Hi On Thu, 15 Oct 2020 18:49:09 +0200 Daniel Vetter wrote: > On Thu, Oct 15, 2020 at 04:08:13PM +0200, Christian König wrote: > > Am 15.10.20 um 14:38 schrieb Thomas Zimmermann: > > > The new functions ttm_bo_{vmap,vunmap}() map and unmap a TTM BO in > > > kernel a

Re: [Spice-devel] [PATCH v4 05/10] drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers

2020-10-16 Thread Thomas Zimmermann
Hi On Thu, 15 Oct 2020 16:08:13 +0200 Christian König wrote: > Am 15.10.20 um 14:38 schrieb Thomas Zimmermann: > > The new functions ttm_bo_{vmap,vunmap}() map and unmap a TTM BO in kernel > > address space. The mapping's address is returned as struct dma_buf_map. &g

Re: [Spice-devel] [PATCH v4 05/10] drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers

2020-10-19 Thread Thomas Zimmermann
Hi Christian On 15.10.20 16:08, Christian König wrote: > Am 15.10.20 um 14:38 schrieb Thomas Zimmermann: >> The new functions ttm_bo_{vmap,vunmap}() map and unmap a TTM BO in kernel >> address space. The mapping's address is returned as struct dma_buf_map. >> Each function is

[Spice-devel] [PATCH v5 06/10] drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends

2020-10-20 Thread Thomas Zimmermann
, Christian) * fix a trailing { in drm_gem_vmap() * remove several empty functions instead of converting them (Daniel) * comment uses of raw pointers with a TODO (Daniel) * TODO list: convert more helpers to use struct dma_buf_map Signed-off-by: Thomas Zimmermann Acked

[Spice-devel] [PATCH v5 10/10] drm/fb_helper: Support framebuffers in I/O memory

2020-10-20 Thread Thomas Zimmermann
into separate patch (Daniel) * TODO list: comment on fbdev updates (Daniel) Signed-off-by: Thomas Zimmermann Tested-by: Sam Ravnborg --- Documentation/gpu/todo.rst| 19 ++- drivers/gpu/drm/bochs/bochs_kms.c | 1 - drivers/gpu/drm/drm_fb_helper.c | 227

[Spice-devel] [PATCH v5 09/10] dma-buf-map: Add memcpy and pointer-increment interfaces

2020-10-20 Thread Thomas Zimmermann
To do framebuffer updates, one needs memcpy from system memory and a pointer-increment function. Add both interfaces with documentation. v5: * include to build on sparc64 (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Tested-by: Sam Ravnborg --- include/linux/dma

[Spice-devel] [PATCH v5 04/10] drm/exynos: Remove empty exynos_drm_gem_prime_{vmap, vunmap}()

2020-10-20 Thread Thomas Zimmermann
The functions exynos_drm_gem_prime_{vmap,vunmap}() are empty. Remove them before changing the interface to use struct drm_buf_map. As a side effect of removing drm_gem_prime_vmap(), the error code changes from ENOMEM to EOPNOTSUPP. Signed-off-by: Thomas Zimmermann Acked-by: Christian König

[Spice-devel] [PATCH v5 02/10] drm/cma-helper: Remove empty drm_gem_cma_prime_vunmap()

2020-10-20 Thread Thomas Zimmermann
The function drm_gem_cma_prime_vunmap() is empty. Remove it before changing the interface to use struct drm_buf_map. Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Tested-by: Sam Ravnborg --- drivers/gpu/drm/drm_gem_cma_helper.c | 17 - drivers/gpu/drm/vc4

[Spice-devel] [PATCH v5 00/10] Support GEM object mappings from I/O memory

2020-10-20 Thread Thomas Zimmermann
GEM helpers and convert drivers over (Christian, Daniel) * remove several empty functions * more TODOs and documentation (Daniel) v3: * recreate the whole patchset on top of struct dma_buf_map v2: * RFC patchset Thomas Zimmermann (10): drm/vram-helper

[Spice-devel] [PATCH v5 05/10] drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers

2020-10-20 Thread Thomas Zimmermann
) * ignore premapped memory areas correctly in ttm_bo_vunmap() * rebase onto latest TTM interfaces (Christian) * remove BUG() from ttm_bo_vmap() (Christian) v4: * drop ttm_kmap_obj_to_dma_buf() in favor of vmap helpers (Daniel, Christian) Signed-off-by: Thomas Zimmermann

[Spice-devel] [PATCH v5 07/10] drm/gem: Update internal GEM vmap/vunmap interfaces to use struct dma_buf_map

2020-10-20 Thread Thomas Zimmermann
GEM's vmap and vunmap interfaces now wrap memory pointers in struct dma_buf_map. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Tested-by: Sam Ravnborg --- drivers/gpu/drm/drm_client.c | 18 +++--- drivers/gpu/drm/drm_gem.c | 26

[Spice-devel] [PATCH v5 01/10] drm/vram-helper: Remove invariant parameters from internal kmap function

2020-10-20 Thread Thomas Zimmermann
The parameters map and is_iomem are always of the same value. Removed them to prepares the function for conversion to struct dma_buf_map. v4: * don't check for !kmap->virtual; will always be false Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Reviewed-by: Christian Kö

[Spice-devel] [PATCH v5 03/10] drm/etnaviv: Remove empty etnaviv_gem_prime_vunmap()

2020-10-20 Thread Thomas Zimmermann
The function etnaviv_gem_prime_vunmap() is empty. Remove it before changing the interface to use struct drm_buf_map. Signed-off-by: Thomas Zimmermann Acked-by: Christian König Tested-by: Sam Ravnborg --- drivers/gpu/drm/etnaviv/etnaviv_drv.h | 1 - drivers/gpu/drm/etnaviv/etnaviv_gem.c

Re: [Spice-devel] [PATCH v3 2/7] drm/ttm: Add ttm_kmap_obj_to_dma_buf_map() for type conversion

2020-10-08 Thread Thomas Zimmermann
Hi Am 07.10.20 um 16:30 schrieb Daniel Vetter: > On Wed, Oct 7, 2020 at 3:25 PM Christian König > wrote: >> >> Am 07.10.20 um 15:20 schrieb Thomas Zimmermann: >>> Hi >>> >>> Am 07.10.20 um 15:10 schrieb Daniel Vetter: >>>> On Wed, Oct 7,

Re: [Spice-devel] [PATCH v3 6/7] drm/fb_helper: Support framebuffers in I/O memory

2020-10-08 Thread Thomas Zimmermann
Hi Am 02.10.20 um 20:44 schrieb Daniel Vetter: > On Fri, Oct 2, 2020 at 8:05 PM Daniel Vetter wrote: >> >> On Tue, Sep 29, 2020 at 05:14:36PM +0200, Thomas Zimmermann wrote: >>> At least sparc64 requires I/O-specific access to framebuffers. This >>> patch upda

[Spice-devel] [PATCH v3 3/7] drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends

2020-09-29 Thread Thomas Zimmermann
address is in system or I/O memory. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 14 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.h | 4 +- drivers/gpu/drm/ast/ast_cursor.c| 29 +++ drivers/gpu/drm/ast/ast_drv.h | 7

[Spice-devel] [PATCH v3 5/7] drm/gem: Store client buffer mappings as struct dma_buf_map

2020-09-29 Thread Thomas Zimmermann
and modified with dma_buf_map interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_client.c| 34 +++-- drivers/gpu/drm/drm_fb_helper.c | 23 +- include/drm/drm_client.h| 7 --- 3 files changed, 38 insertions(+), 26

[Spice-devel] [PATCH v3 4/7] drm/gem: Update internal GEM vmap/vunmap interfaces to use struct dma_buf_map

2020-09-29 Thread Thomas Zimmermann
GEM's vmap and vunmap interfaces now wrap memory pointers in struct dma_buf_map. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_client.c | 18 +++--- drivers/gpu/drm/drm_gem.c | 28 ++-- drivers/gpu/drm/drm_internal.h | 5 +++-- drivers/gpu

[Spice-devel] [PATCH v3 2/7] drm/ttm: Add ttm_kmap_obj_to_dma_buf_map() for type conversion

2020-09-29 Thread Thomas Zimmermann
The new helper ttm_kmap_obj_to_dma_buf() extracts address and location from and instance of TTM's kmap_obj and initializes struct dma_buf_map with these values. Helpful for TTM-based drivers. Signed-off-by: Thomas Zimmermann --- include/drm/ttm/ttm_bo_api.h | 24

[Spice-devel] [PATCH v3 6/7] drm/fb_helper: Support framebuffers in I/O memory

2020-09-29 Thread Thomas Zimmermann
of struct dma_buf_map, this is not required any longer. The patch removes the rsp code from both, bochs and fbdev. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/bochs/bochs_kms.c | 1 - drivers/gpu/drm/drm_fb_helper.c | 217 -- include/drm/drm_mode_config.h

[Spice-devel] [PATCH v3 7/7] drm/todo: Update entries around struct dma_buf_map

2020-09-29 Thread Thomas Zimmermann
Instances of struct dma_buf_map should be useful throughout DRM's memory management code. Furthermore, several drivers can now use generic fbdev emulation. Signed-off-by: Thomas Zimmermann --- Documentation/gpu/todo.rst | 24 ++-- 1 file changed, 22 insertions(+), 2

[Spice-devel] [PATCH v3 0/7] Support GEM object mappings from I/O memory

2020-09-29 Thread Thomas Zimmermann
improvements v3: * recreate the whole patchset on top of struct dma_buf_map v2: * RFC patchset Thomas Zimmermann (7): drm/vram-helper: Remove invariant parameters from internal kmap function drm/ttm: Add ttm_kmap_obj_to_dma_buf_map() for type conversion drm/gem: Use

[Spice-devel] [PATCH v3 1/7] drm/vram-helper: Remove invariant parameters from internal kmap function

2020-09-29 Thread Thomas Zimmermann
The parameters map and is_iomem are always of the same value. Removed them to prepares the function for conversion to struct dma_buf_map. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_gem_vram_helper.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff

Re: [Spice-devel] [PATCH v3 2/7] drm/ttm: Add ttm_kmap_obj_to_dma_buf_map() for type conversion

2020-09-29 Thread Thomas Zimmermann
Hi Christian Am 29.09.20 um 17:35 schrieb Christian König: > Am 29.09.20 um 17:14 schrieb Thomas Zimmermann: >> The new helper ttm_kmap_obj_to_dma_buf() extracts address and location >> from and instance of TTM's kmap_obj and initializes struct dma_buf_map >> with these va

Re: [Spice-devel] [PATCH v3 2/7] drm/ttm: Add ttm_kmap_obj_to_dma_buf_map() for type conversion

2020-09-30 Thread Thomas Zimmermann
Hi Am 30.09.20 um 10:05 schrieb Christian König: > Am 29.09.20 um 19:49 schrieb Thomas Zimmermann: >> Hi Christian >> >> Am 29.09.20 um 17:35 schrieb Christian König: >>> Am 29.09.20 um 17:14 schrieb Thomas Zimmermann: >>>> The new helper ttm_kmap_obj_

[Spice-devel] [PATCH v6 10/10] drm/fb_helper: Support framebuffers in I/O memory

2020-10-28 Thread Thomas Zimmermann
into separate patch (Daniel) * TODO list: comment on fbdev updates (Daniel) Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Reviewed-by: Sam Ravnborg Tested-by: Sam Ravnborg --- Documentation/gpu/todo.rst| 19 ++- drivers/gpu/drm/bochs/bochs_kms.c | 1 - drivers/gpu

[Spice-devel] [PATCH v6 00/10] Support GEM object mappings from I/O memory

2020-10-28 Thread Thomas Zimmermann
patchset on top of struct dma_buf_map v2: * RFC patchset Thomas Zimmermann (10): drm/vram-helper: Remove invariant parameters from internal kmap function drm/cma-helper: Remove empty drm_gem_cma_prime_vunmap() drm/etnaviv: Remove empty etnaviv_gem_prime_vunmap() drm/exynos: Remove

[Spice-devel] [PATCH v6 08/10] drm/gem: Store client buffer mappings as struct dma_buf_map

2020-10-28 Thread Thomas Zimmermann
and modified with dma_buf_map interfaces. v6: * don't call page_to_phys() on framebuffers in I/O memory; warn instead (Daniel) Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Tested-by: Sam Ravnborg --- drivers/gpu/drm/drm_client.c| 34

[Spice-devel] [PATCH v6 01/10] drm/vram-helper: Remove invariant parameters from internal kmap function

2020-10-28 Thread Thomas Zimmermann
The parameters map and is_iomem are always of the same value. Removed them to prepares the function for conversion to struct dma_buf_map. v4: * don't check for !kmap->virtual; will always be false Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Reviewed-by: Christian Kö

[Spice-devel] [PATCH v6 07/10] drm/gem: Update internal GEM vmap/vunmap interfaces to use struct dma_buf_map

2020-10-28 Thread Thomas Zimmermann
GEM's vmap and vunmap interfaces now wrap memory pointers in struct dma_buf_map. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Tested-by: Sam Ravnborg --- drivers/gpu/drm/drm_client.c | 18 +++--- drivers/gpu/drm/drm_gem.c | 26

[Spice-devel] [PATCH v6 06/10] drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends

2020-10-28 Thread Thomas Zimmermann
, Christian) * fix a trailing { in drm_gem_vmap() * remove several empty functions instead of converting them (Daniel) * comment uses of raw pointers with a TODO (Daniel) * TODO list: convert more helpers to use struct dma_buf_map Signed-off-by: Thomas Zimmermann Acked

[Spice-devel] [PATCH v6 03/10] drm/etnaviv: Remove empty etnaviv_gem_prime_vunmap()

2020-10-28 Thread Thomas Zimmermann
The function etnaviv_gem_prime_vunmap() is empty. Remove it before changing the interface to use struct drm_buf_map. Signed-off-by: Thomas Zimmermann Acked-by: Christian König Tested-by: Sam Ravnborg --- drivers/gpu/drm/etnaviv/etnaviv_drv.h | 1 - drivers/gpu/drm/etnaviv/etnaviv_gem.c

[Spice-devel] [PATCH v6 09/10] dma-buf-map: Add memcpy and pointer-increment interfaces

2020-10-28 Thread Thomas Zimmermann
To do framebuffer updates, one needs memcpy from system memory and a pointer-increment function. Add both interfaces with documentation. v5: * include to build on sparc64 (Sam) Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Tested-by: Sam Ravnborg --- include/linux/dma

[Spice-devel] [PATCH v6 05/10] drm/ttm: Add vmap/vunmap to TTM and TTM GEM helpers

2020-10-28 Thread Thomas Zimmermann
) * ignore premapped memory areas correctly in ttm_bo_vunmap() * rebase onto latest TTM interfaces (Christian) * remove BUG() from ttm_bo_vmap() (Christian) v4: * drop ttm_kmap_obj_to_dma_buf() in favor of vmap helpers (Daniel, Christian) Signed-off-by: Thomas Zimmermann

[Spice-devel] [PATCH v6 04/10] drm/exynos: Remove empty exynos_drm_gem_prime_{vmap, vunmap}()

2020-10-28 Thread Thomas Zimmermann
The functions exynos_drm_gem_prime_{vmap,vunmap}() are empty. Remove them before changing the interface to use struct drm_buf_map. As a side effect of removing drm_gem_prime_vmap(), the error code changes from ENOMEM to EOPNOTSUPP. Signed-off-by: Thomas Zimmermann Acked-by: Christian König

[Spice-devel] [PATCH v6 02/10] drm/cma-helper: Remove empty drm_gem_cma_prime_vunmap()

2020-10-28 Thread Thomas Zimmermann
The function drm_gem_cma_prime_vunmap() is empty. Remove it before changing the interface to use struct drm_buf_map. Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Tested-by: Sam Ravnborg --- drivers/gpu/drm/drm_gem_cma_helper.c | 17 - drivers/gpu/drm/vc4

Re: [Spice-devel] [PATCH v5 10/10] drm/fb_helper: Support framebuffers in I/O memory

2020-10-26 Thread Thomas Zimmermann
Hi Am 24.10.20 um 22:38 schrieb Sam Ravnborg: > Hi Thomas. > > On Tue, Oct 20, 2020 at 02:20:46PM +0200, Thomas Zimmermann wrote: >> At least sparc64 requires I/O-specific access to framebuffers. This >> patch updates the fbdev console accordingly. >> >&g

Re: [Spice-devel] [PATCH 07/15] drm/i915: Remove references to struct drm_device.pdev

2020-11-27 Thread Thomas Zimmermann
Hi Am 27.11.20 um 14:20 schrieb Joonas Lahtinen: Quoting Thomas Zimmermann (2020-11-24 13:38:16) Using struct drm_device.pdev is deprecated. Convert i915 to struct drm_device.dev. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi

Re: [Spice-devel] [PATCH v2 09/20] drm/i915: Remove references to struct drm_device.pdev

2020-12-08 Thread Thomas Zimmermann
ping for a review of the i915 patches Am 01.12.20 um 11:35 schrieb Thomas Zimmermann: Using struct drm_device.pdev is deprecated. Convert i915 to struct drm_device.dev. No functional changes. v2: * move gt/ and gvt/ changes into separate patches Signed-off-by: Thomas Zimmermann Cc

Re: [Spice-devel] [PATCH v2 13/20] drm/nouveau: Remove references to struct drm_device.pdev

2020-12-08 Thread Thomas Zimmermann
ping for a review of the nouveau patch Am 01.12.20 um 11:35 schrieb Thomas Zimmermann: Using struct drm_device.pdev is deprecated. Convert nouveau to struct drm_device.dev. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Ben Skeggs --- drivers/gpu/drm/nouveau/dispnv04/arb.c

[Spice-devel] [PATCH 02/15] drm/ast: Remove references to struct drm_device.pdev

2020-11-24 Thread Thomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert ast to struct drm_device.dev. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ast/ast_drv.c | 4 ++-- drivers/gpu/drm/ast/ast_main.c | 25 + drivers/gpu/drm/ast/ast_mm.c | 17

[Spice-devel] [PATCH 15/15] drm: Upcast struct drm_device.dev to struct pci_device; replace pdev

2020-11-24 Thread Thomas Zimmermann
-specific code can use dev_is_pci() to test for a PCI device. This patch changes the DRM core code and documentation accordingly. Struct drm_device.pdev is being moved to legacy status. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_agpsupport.c | 9 ++--- drivers/gpu/drm/drm_bufs.c

[Spice-devel] [PATCH 04/15] drm/cirrus: Remove references to struct drm_device.pdev

2020-11-24 Thread Thomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert cirrus to struct drm_device.dev. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Gerd Hoffmann --- drivers/gpu/drm/tiny/cirrus.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/tiny/cirrus.c b/drivers/gpu/drm

  1   2   3   4   >