Re: [PATCH] drm/qxl: Pin buffer objects for internal mappings

2024-07-08 Thread Daniel Vetter
places where we want the vmap only for the duration of the dma_resv locked section, so really can't do that. And your patch removes the unlocked vmap implementation, which would be the only place really. Reviewed-by: Daniel Vetter > > Best regards > Thomas > > Am 02.07.24

Re: [Spice-devel] [PATCH] drm/qxl: Fix missing free_irq

2022-11-08 Thread Daniel Vetter
@@ -305,6 +307,7 @@ void qxl_device_fini(struct qxl_device *qdev) > wait_event_timeout(qdev->release_event, > atomic_read(&qdev->release_count) == 0, > HZ); > + free_irq(pdev->irq, ddev); > flush_work(&qdev->gc_work); > qxl_surf_evict(qdev); > qxl_vram_evict(qdev); > -- > 2.25.1 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch

Re: [Spice-devel] [PATCH v2 1/8] drm: Disable the cursor plane on atomic contexts with virtualized drivers

2022-08-10 Thread Daniel Vetter
;drm: Allow userspace to ask for universal plane list > (v2)") > Cc: # v5.4+ > Cc: Maarten Lankhorst > Cc: Maxime Ripard > Cc: Thomas Zimmermann > Cc: David Airlie > Cc: Daniel Vetter > Cc: Dave Airlie > Cc: Gerd Hoffmann > Cc: Hans de Goede > Cc: Gurchetan

Re: [Spice-devel] [PATCH 4/4] drm/qxl: add drm_gem_plane_helper_prepare_fb

2022-05-04 Thread Daniel Vetter
ktop.org Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/qxl/qxl_display.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/qxl/qxl_display.c > b/drivers/gpu/drm/qxl/qxl_display.c > index 9a9c29b1d3e1..9a64fa4c7530 100644

Re: [Spice-devel] [PATCH 0/4] drm: Generic dumb_map_offset for TTM-based drivers

2021-04-08 Thread Daniel Vetter
clude/drm/drm_gem_ttm_helper.h | 5 ++- > include/drm/drm_gem_vram_helper.h | 7 +--- > 12 files changed, 45 insertions(+), 103 deletions(-) > > -- > 2.30.2 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ___

Re: [Spice-devel] [PATCH 0/4] drm: Generic dumb_map_offset for TTM-based drivers

2021-04-08 Thread Daniel Vetter
On Thu, Apr 08, 2021 at 01:34:03PM +0200, Thomas Zimmermann wrote: > Hi > > Am 08.04.21 um 13:16 schrieb Daniel Vetter: > > On Tue, Apr 06, 2021 at 10:29:38AM +0200, Thomas Zimmermann wrote: > > > The implementation of drm_driver.dumb_map_offset is the same for several

Re: [Spice-devel] [PATCH v4 5/5] drm/qxl: properly free qxl releases

2021-02-03 Thread Daniel Vetter
atomic_dec(&qdev->release_count); > } > > static int qxl_release_bo_alloc(struct qxl_device *qdev, > @@ -344,6 +345,7 @@ int qxl_alloc_release_reserved(struct qxl_device *qdev, > unsigned long size, > *rbo = NULL; >

Re: [Spice-devel] [PATCH v3 2/4] drm/qxl: unpin release objects

2021-01-22 Thread Daniel Vetter
h other pin leaks if you have them. Setting it to 0 kinda defeats the warning. -Daniel > > Not calling ttm_bo_unpin() makes ttm_bo_release() throw > a WARN() because of the pin. > > Clearing pin_count (which is how ttm fixes things up > in

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

2020-12-02 Thread Daniel Vetter
t. If you're OK with that, I'd merge the vmwgfx patch through > > drm-misc-next as well. > > Sounds good. I’ll make sure to rebase our latest patch set on top of it when > it’s in. Thanks! btw if you want to avoid multi-tree coordination headaches, we can also m

Re: [Spice-devel] [PATCH] drm/qxl: Remove fbcon acceleration leftovers

2020-11-17 Thread Daniel Vetter
On Thu, Oct 29, 2020 at 02:33:47PM +0100, Daniel Vetter wrote: > These are leftovers from 13aff184ed9f ("drm/qxl: remove dead qxl fbdev > emulation code"). > > v2: Somehow these structs provided the struct qxl_device pre-decl, > reorder the header to not anger compi

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

2020-11-05 Thread Daniel Vetter
ightmare. And when an oops happens, this might be the only thing that manages to get the oops to the user. Unless someone really starts caring about fbcon acceleration I really wouldn't bother. Ok maybe it also matters for fbdev, but the problem is that the page fault intercepting alone is

[Spice-devel] [PATCH] drm/qxl: Remove fbcon acceleration leftovers

2020-10-29 Thread Daniel Vetter
These are leftovers from 13aff184ed9f ("drm/qxl: remove dead qxl fbdev emulation code"). v2: Somehow these structs provided the struct qxl_device pre-decl, reorder the header to not anger compilers. Acked-by: Gerd Hoffmann Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Ho

[Spice-devel] [PATCH 3/3] drm/qxl: Remove fbcon acceleration leftovers

2020-10-29 Thread Daniel Vetter
These are leftovers from 13aff184ed9f ("drm/qxl: remove dead qxl fbdev emulation code"). Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualizat...@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org --- drivers/gpu/drm/qxl/qxl_drv.h | 14 ---

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

2020-10-22 Thread Daniel Vetter
fer_vmap() receive a copy of the value in > the call's supplied arguments. It can be accessed and modified with > dma_buf_map interfaces. > > Signed-off-by: Thomas Zimmermann > Reviewed-by: Daniel Vetter > Tested-by: Sam Ravnborg &g

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

2020-10-22 Thread Daniel Vetter
en without dependencies on the fbdev module. Some of the > +helpers could further benefit from using struct dma_buf_map instead of > +raw pointers. > + > +Contact: Thomas Zimmermann , Daniel Vetter > + > +Level: Advanced > + > + > drm_framebuffer_funcs and drm_mode_conf

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

2020-10-22 Thread Daniel Vetter
On Thu, Oct 22, 2020 at 11:18 AM Thomas Zimmermann wrote: > > Hi > > On 22.10.20 10:49, Daniel Vetter wrote: > > On Tue, Oct 20, 2020 at 02:20:44PM +0200, Thomas Zimmermann wrote: > >> Kernel DRM clients now store their framebuffer address in an instance > >>

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

2020-10-22 Thread Daniel Vetter
On Thu, Oct 22, 2020 at 10:37:56AM +0200, Thomas Zimmermann wrote: > Hi > > On 22.10.20 10:05, Daniel Vetter wrote: > > On Tue, Oct 20, 2020 at 02:20:46PM +0200, Thomas Zimmermann wrote: > >> At least sparc64 requires I/O-specific access to framebuffers. This > >>

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

2020-10-20 Thread Daniel Vetter
> > >   /** > > > >    * ttm_bo_mmap_obj - mmap memory backed by a ttm buffer object. > > > >    * > > > > diff --git a/include/linux/dma-buf-map.h b/include/linux/dma-buf-map.h > > > > index fd1aba545f

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

2020-10-15 Thread Daniel Vetter
pers to map an invidual page (again using the dma_buf_map stuff). I'll let Christian with the details, but at a high level this is definitely Acked-by: Daniel Vetter Thanks a lot for doing all this. -Daniel > > > > > Signed-off-by: Thomas

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

2020-10-08 Thread Daniel Vetter
On Thu, Oct 8, 2020 at 11:25 AM Thomas Zimmermann wrote: > > 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: > >>&g

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

2020-10-07 Thread 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, 2020 at 2:57 PM Thomas Zimmermann > >> wrote: > >>> Hi

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

2020-10-07 Thread 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 30, 2020 at 2:34 PM Christian König > >> wrote: > >&g

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

2020-10-02 Thread 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 updates the fbdev console accordingly. > > > > For dri

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

2020-10-02 Thread Daniel Vetter
On Tue, Sep 29, 2020 at 05:14:37PM +0200, Thomas Zimmermann wrote: > 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 Ack

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

2020-10-02 Thread Daniel Vetter
nctionality, the type could be generalized > - * and moved to a more prominent header file. > + * .. code-block:: c > + * > + * const void *src = ...; // source buffer > + * size_t len = ...; // length of src > + * > + * dma_buf_map_memcpy_to(&map, src, len); > +

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

2020-10-02 Thread Daniel Vetter
rns 0 on success or a negative errno code otherwise. > */ > int drm_gem_dmabuf_vmap(struct dma_buf *dma_buf, struct dma_buf_map *map) > { > struct drm_gem_object *obj = dma_buf->priv; > - void *vaddr; > > - vaddr = drm_gem_vmap(obj); > - if (IS_ERR

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

2020-10-02 Thread Daniel Vetter
On Fri, Oct 2, 2020 at 1:30 PM Christian König wrote: > > 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 30, 2020 at 2:34 PM Christian König > >> wrote: > >>> Am 30.09.20

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

2020-10-02 Thread Daniel Vetter
On Tue, Sep 29, 2020 at 05:14:33PM +0200, Thomas Zimmermann wrote: > This patch replaces the vmap/vunmap's use of raw pointers in GEM object > functions with instances of struct dma_buf_map. GEM backends are > converted as well. > > For most GEM backends, this simply change the returned type. GEM

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

2020-10-02 Thread Daniel Vetter
t; @@ -141,9 +142,9 @@ struct drm_client_buffer { > struct drm_gem_object *gem; > > /** > - * @vaddr: Virtual address for the buffer > + * @map: Virtual address for the buffer >*/ > - void *vaddr; > +

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

2020-10-02 Thread Daniel Vetter
On Wed, Sep 30, 2020 at 02:51:46PM +0200, Daniel Vetter wrote: > On Wed, Sep 30, 2020 at 2:34 PM Christian König > wrote: > > > > Am 30.09.20 um 11:47 schrieb Daniel Vetter: > > > On Wed, Sep 30, 2020 at 10:34:31AM +0200, Christian König wrote: > > >&

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

2020-10-02 Thread Daniel Vetter
On Tue, Sep 29, 2020 at 05:14:31PM +0200, Thomas Zimmermann wrote: > 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 Reviewed-by: Daniel Vetter > ---

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

2020-09-30 Thread Daniel Vetter
On Wed, Sep 30, 2020 at 2:34 PM Christian König wrote: > > Am 30.09.20 um 11:47 schrieb Daniel Vetter: > > On Wed, Sep 30, 2020 at 10:34:31AM +0200, Christian König wrote: > >> Am 30.09.20 um 10:19 schrieb Thomas Zimmermann: > >>> Hi > >>> >

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

2020-09-30 Thread Daniel Vetter
> > > > + * .. code-block:: c > > > > > > + * > > > > > > + *    dma_buf_map_set_vaddr_iomem(&map. 0xdeadbeaf); > > > > > > + * > > > > > >    * Test if a mapping is valid with either dma_buf_map_is_set(

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

2020-09-29 Thread Daniel Vetter
map->is_iomem = false; > > } > > > > +/** > > + * dma_buf_map_set_vaddr_iomem - Sets a dma-buf mapping structure to an > > address in I/O memory > > + * @map: The dma-buf mapping structure > > + * @vaddr_iomem: An I/O-memory address

Re: [Spice-devel] [PATCH v2 4/4] drm/qxl: use qxl pin function

2020-09-29 Thread Daniel Vetter
_init_reserved, then ttm_bo_pin, then ttm_bo_unreserve, all explicitly. -Daniel > *bo_ptr = bo; > return 0; > } > -- > 2.27.0 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ___ Spice-devel ma

Re: [Spice-devel] [PATCH 1/3] drm/qxl: use drmm_mode_config_init

2020-09-08 Thread Daniel Vetter
On Tue, Sep 08, 2020 at 11:39:10AM +0200, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann Btw going all in on devm_drm_dev_alloc and managed functions might be good cleanup for virtio. Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/qxl/qxl_display.c | 5 +++-- > 1 fil

Re: [Spice-devel] [PATCH v2] drm/qxl: don't take vga ports on rev5+

2020-08-07 Thread Daniel Vetter
the > vga ports any more to avoid that happening. > > Signed-off-by: Gerd Hoffmann Does what it says on the label. Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/qxl/qxl_drv.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/

Re: [Spice-devel] [PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc

2020-04-30 Thread Daniel Vetter
On Tue, Apr 28, 2020 at 07:00:26PM +0200, Sam Ravnborg wrote: > On Tue, Apr 28, 2020 at 04:00:11PM +0200, Daniel Vetter wrote: > > On Fri, Apr 24, 2020 at 05:09:11PM +0200, Sam Ravnborg wrote: > > > Hi Daniel > > > > > > On Wed, Apr 15, 2020 at 09:40:01AM +020

Re: [Spice-devel] [PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc

2020-04-28 Thread Daniel Vetter
On Fri, Apr 24, 2020 at 05:09:11PM +0200, Sam Ravnborg wrote: > Hi Daniel > > On Wed, Apr 15, 2020 at 09:40:01AM +0200, Daniel Vetter wrote: > > Also need to remove the drm_dev_put from the remove hook. > > > > Acked-by: Gerd Hoffmann > > Signed-off-by: D

[Spice-devel] [PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc

2020-04-15 Thread Daniel Vetter
Also need to remove the drm_dev_put from the remove hook. Acked-by: Gerd Hoffmann Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualizat...@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org --- drivers/gpu/drm/qxl/qxl_drv.c | 15 --- drivers

[Spice-devel] [PATCH 27/59] drm/qxl: Don't use drm_device->dev_private

2020-04-15 Thread Daniel Vetter
Upcasting using a container_of macro is more typesafe, faster and easier for the compiler to optimize. Acked-by: Gerd Hoffmann Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualizat...@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org --- drivers/gpu

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

2020-04-07 Thread Daniel Vetter
On Mon, Apr 6, 2020 at 7:29 PM Thomas Zimmermann wrote: > > > > Am 03.04.20 um 15:58 schrieb Daniel Vetter: > > Also need to remove the drm_dev_put from the remove hook. > > > > Signed-off-by: Daniel Vetter > > Cc: Dave Airlie > > Cc: Gerd Ho

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

2020-04-03 Thread Daniel Vetter
Also need to remove the drm_dev_put from the remove hook. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualizat...@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org --- drivers/gpu/drm/qxl/qxl_drv.c | 15 --- drivers/gpu/drm/qxl/qxl_drv.h

[Spice-devel] [PATCH 31/44] drm/qxl: Don't use drm_device->dev_private

2020-04-03 Thread Daniel Vetter
Upcasting using a container_of macro is more typesafe, faster and easier for the compiler to optimize. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualizat...@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org --- drivers/gpu/drm/qxl/qxl_debugfs.c | 7

[Spice-devel] [PATCH 07/51] drm/qxl: Use drmm_add_final_kfree

2020-03-23 Thread Daniel Vetter
With this we can drop the final kfree from the release function. Acked-by: Gerd Hoffmann Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualizat...@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org --- drivers/gpu/drm/qxl/qxl_drv.c | 2 -- drivers/gpu

[Spice-devel] [PATCH 07/51] drm/qxl: Use drmm_add_final_kfree

2020-03-02 Thread Daniel Vetter
With this we can drop the final kfree from the release function. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualizat...@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org --- drivers/gpu/drm/qxl/qxl_drv.c | 2 -- drivers/gpu/drm/qxl/qxl_kms.c | 2 ++ 2

[Spice-devel] [PATCH 07/51] drm/qxl: Use drmm_add_final_kfree

2020-02-28 Thread Daniel Vetter
With this we can drop the final kfree from the release function. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualizat...@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org --- drivers/gpu/drm/qxl/qxl_drv.c | 2 -- drivers/gpu/drm/qxl/qxl_kms.c | 2 ++ 2

[Spice-devel] [PATCH 07/51] drm/qxl: Use drmm_add_final_kfree

2020-02-21 Thread Daniel Vetter
With this we can drop the final kfree from the release function. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualizat...@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org --- drivers/gpu/drm/qxl/qxl_drv.c | 2 -- drivers/gpu/drm/qxl/qxl_kms.c | 2 ++ 2

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

2020-02-21 Thread Daniel Vetter
gt;> - > > >> - > > >> struct mga_i2c_chan { > > >> struct i2c_adapter adapter; > > >> struct drm_device *dev; > > > > > > Any particular reason why the drm_encoder is not embedded in struct > >

[Spice-devel] [PATCH 08/52] drm/qxl: Use drmm_add_final_kfree

2020-02-19 Thread Daniel Vetter
With this we can drop the final kfree from the release function. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualizat...@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org --- drivers/gpu/drm/qxl/qxl_drv.c | 2 -- drivers/gpu/drm/qxl/qxl_kms.c | 2 ++ 2

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

2020-02-10 Thread Daniel Vetter
gt; + qxl_modeset_fini(qdev); So the drm_mode_config_cleanup call in here belongs in ->release, but the qxl_destroy_monitors_object feels like should be perfectly fine in the remove hook. You might need to sprinkle a few drm_dev_enter/exit around to protect code paths thought. Aside from this lgtm, for the s

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

2020-02-09 Thread Daniel Vetter
> + ret = -ENOMEM; > > + goto err_devm_kfree; > > + } > > + } > > + > > + ret = __drm_encoder_init(dev, encoder, > > +&drm_simple_encoder_funcs_destroy, > > +

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

2020-02-09 Thread Daniel Vetter
On Fri, Feb 07, 2020 at 03:02:00PM +0100, Thomas Zimmermann wrote: > 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 > >>

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

2020-02-07 Thread Daniel Vetter
encoder_type, const char *name, ...); > > +__printf(4, 5) > +int drm_simple_encoder_init(struct drm_device *dev, > + struct drm_encoder *encoder, > + int encoder_type, const char *name, ...); > + > +__printf(3, 4) > +struct

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

2020-02-07 Thread Daniel Vetter
qxl_ring_free(qdev->command_ring); > - qxl_ring_free(qdev->cursor_ring); > - qxl_ring_free(qdev->release_ring); > qxl_gem_fini(qdev); > qxl_bo_fini(qdev); > + flush_work(&qdev->gc_work); > + qxl_ring_free(qdev->command_r

Re: [Spice-devel] [PATCH 2/3] drm: drop resource_id parameter from drm_fb_helper_remove_conflicting_pci_framebuffers

2019-08-22 Thread Daniel Vetter
On Thu, Aug 22, 2019 at 11:06:44AM +0200, Gerd Hoffmann wrote: > Not needed any more for remove_conflicting_pci_framebuffers calls. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter > --- > include/drm/drm_fb_helper.h | 4 +--- > drivers/gpu/drm/amd/a

Re: [Spice-devel] [PATCH] gpu: drm: qxl: Fix possible null-pointer dereferences in qxl_crtc_atomic_flush()

2019-07-25 Thread Daniel Vetter
-382,7 +382,8 @@ static void qxl_crtc_atomic_flush(struct drm_crtc *crtc, > spin_unlock_irqrestore(&dev->event_lock, flags); > } > > - qxl_crtc_update_monitors_config(crtc, "flush"); > + if (crtc->state) > + qxl_crtc_update_monitors_config(

[Spice-devel] [PATCH] drm/prime: Actually remove DRIVER_PRIME everywhere

2019-06-17 Thread Daniel Vetter
Split out to make the functional changes stick out more. v2: amdgpu gained DRIVER_SYNCOBJ_TIMELINE. v3: amdgpu lost DRIVER_SYNCOBJ_TIMELINE. v4: Don't add a space in i915_drv.c (Sam) Cc: Sam Ravnborg Reviewed-by: Eric Anholt Signed-off-by: Daniel Vetter Cc: amd-...@lists.freedesktop.o

[Spice-devel] [PATCH 06/59] drm/prime: Actually remove DRIVER_PRIME everywhere

2019-06-15 Thread Daniel Vetter
Split out to make the functional changes stick out more. v2: amdgpu gained DRIVER_SYNCOBJ_TIMELINE. v3: amdgpu lost DRIVER_SYNCOBJ_TIMELINE. Signed-off-by: Daniel Vetter Cc: amd-...@lists.freedesktop.org Cc: etna...@lists.freedesktop.org Cc: freedr...@lists.freedesktop.org Cc: intel

[Spice-devel] [PATCH 25/59] drm/qxl: Drop drm_gem_prime_export/import

2019-06-14 Thread Daniel Vetter
They're the default. Aside: Would be really nice to switch the others over to drm_gem_object_funcs. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualizat...@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org --- drivers/gpu/drm/qxl/qxl_drv.c | 2

Re: [Spice-devel] [PATCH] drm/qxl: drop WARN_ONCE()

2019-05-24 Thread Daniel Vetter
Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/qxl/qxl_prime.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/gpu/drm/qxl/qxl_prime.c b/drivers/gpu/drm/qxl/qxl_prime.c > index 114653b471c6..7d3816fca5a8 100644 > --- a/drivers/gpu/drm/qxl/qxl_pr

Re: [Spice-devel] [PATCH] Revert "drm/qxl: drop prime import/export callbacks"

2019-04-29 Thread Daniel Vetter
over that not working. Or I do not set > > > DRM_PRIME_CAP_{IMPORT,EXPORT}, which breaks DRI3 ... > > > > Yeah that's not an option. > > Good. Can I get an ack for this patch then, as it unbreaks DRI3 with qxl? Oh sure, acked-by

Re: [Spice-devel] [PATCH] Revert "drm/qxl: drop prime import/export callbacks"

2019-04-29 Thread Daniel Vetter
On Mon, Apr 29, 2019 at 9:54 AM Gerd Hoffmann wrote: > > On Fri, Apr 26, 2019 at 04:21:37PM +0200, Daniel Vetter wrote: > > On Fri, Apr 26, 2019 at 7:33 AM Gerd Hoffmann wrote: > > > > > > This reverts commit f4c34b1e2a37d5676180901fa6ff188bcb6371f8. > > &g

Re: [Spice-devel] [PATCH] Revert "drm/qxl: drop prime import/export callbacks"

2019-04-29 Thread Daniel Vetter
On Fri, Apr 26, 2019 at 05:42:23PM +0200, Thomas Hellstrom wrote: > On 4/26/19 4:21 PM, Daniel Vetter wrote: > > On Fri, Apr 26, 2019 at 7:33 AM Gerd Hoffmann wrote: > > > This reverts commit f4c34b1e2a37d5676180901fa6ff188bcb6371f8. > > > > > > Simliar to co

Re: [Spice-devel] [PATCH] Revert "drm/qxl: drop prime import/export callbacks"

2019-04-26 Thread Daniel Vetter
device *dev, struct dma_buf_attachment *attach, > + struct sg_table *table) > +{ > + return ERR_PTR(-ENOSYS); > +} > + > void *qxl_gem_prime_vmap(struct drm_gem_object *obj) > { > struct qxl_bo *bo = gem_to_qxl_bo(obj); > -- > 2.18.1 > -- Daniel Ve

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

2019-03-12 Thread Daniel Vetter
flict. - Do a topic branch, pull it into both trees. - Really stuff ttm into a shared tree if it's meant to be shared infrastructure :-P Waiting+rebasing is imo the worst option, and usually not needed. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH v4 2/2] drm/qxl: remove conflicting framebuffers earlier

2019-02-22 Thread Daniel Vetter
On Fri, Feb 22, 2019 at 08:16:04AM +0100, Gerd Hoffmann wrote: > Add error checking while being at it. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/qxl/qxl_drv.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > >

Re: [Spice-devel] [PATCH v2 2/2] drm/qxl: kick out vgacon

2019-02-21 Thread Daniel Vetter
an extract that logic from vgaarb.c (yes this is all a bit spiralling out of control). -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch ___ Spice-devel mailing list Spice-devel@lists.freedesk

Re: [Spice-devel] [PATCH v2 2/2] drm/qxl: kick out vgacon

2019-02-21 Thread Daniel Vetter
On Thu, Feb 21, 2019 at 02:06:23PM +0100, Gerd Hoffmann wrote: > On Thu, Feb 21, 2019 at 01:20:11PM +0100, Daniel Vetter wrote: > > On Thu, Feb 21, 2019 at 12:35:34PM +0100, Gerd Hoffmann wrote: > > > Problem: qxl switches from native mode back into vga compatibility mode >

Re: [Spice-devel] [PATCH v2 2/2] drm/qxl: kick out vgacon

2019-02-21 Thread Daniel Vetter
, and those who don't can open code it. Or is there an issue with that? -Daniel > drm_fbdev_generic_setup(&qdev->ddev, 32); > return 0; > > -- > 2.9.3 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch __

Re: [Spice-devel] [PATCH] drm/qxl: unbind vgacon

2019-02-21 Thread Daniel Vetter
_conflicting_pci_framebuffers, by checking whether that pci device can decode VGA and kick out vgacon in that case. Instead of sprinkling the same logic over all drivers. -Daniel > + > /* Complete initialization. */ > ret = drm_

[Spice-devel] [PATCH 1/3] drm/irq: Don't check for DRIVER_HAVE_IRQ in drm_irq_(un)install

2019-01-29 Thread Daniel Vetter
devel@lists.freedesktop.org Cc: amd-...@lists.freedesktop.org Cc: linux-renesas-...@vger.kernel.org Reviewed-by: Emil Velikov Reviewed-by: Sam Ravnborg Signed-off-by: Daniel Vetter --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- drivers/gpu/drm/arm/hdlcd_drv.c | 2 +- dr

[Spice-devel] [PATCH 01/26] drm/irq: Don't check for DRIVER_HAVE_IRQ in drm_irq_(un)install

2019-01-27 Thread Daniel Vetter
If a non-legacy driver calls these it's valid to assume there is interrupt support. The flag is really only needed for legacy drivers. Also remove all the flag usage from non-legacy drivers. Signed-off-by: Daniel Vetter Cc: linux-arm-ker...@lists.infradead.org Cc:

[Spice-devel] [PATCH 19/26] drm/qxl: Use drm_fb_helper_fill_info

2019-01-27 Thread Daniel Vetter
This should not result in any changes. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualizat...@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org --- drivers/gpu/drm/qxl/qxl_fb.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git

Re: [Spice-devel] [PATCH 19/26] drm/qxl: Use drm_fb_helper_fill_info

2019-01-25 Thread Daniel Vetter
On Fri, Jan 25, 2019 at 07:39:26AM +0100, Gerd Hoffmann wrote: > On Thu, Jan 24, 2019 at 05:58:24PM +0100, Daniel Vetter wrote: > > This should not result in any changes. > > I'd love to merge https://patchwork.freedesktop.org/series/53951/ > instead (which will -- among

Re: [Spice-devel] [PATCH] drm: Split out drm_probe_helper.h

2019-01-24 Thread Daniel Vetter
On Thu, Jan 24, 2019 at 10:46:47AM +0100, Daniel Vetter wrote: > On Wed, Jan 23, 2019 at 06:00:15PM +0100, Sam Ravnborg wrote: > > Hi Daniel. > > > > On Thu, Jan 17, 2019 at 10:03:34PM +0100, Daniel Vetter wrote: > > > Having the probe helper stuff (which pretty muc

Re: [Spice-devel] [PATCH] drm: Split out drm_probe_helper.h

2019-01-24 Thread Daniel Vetter
On Wed, Jan 23, 2019 at 06:00:15PM +0100, Sam Ravnborg wrote: > Hi Daniel. > > On Thu, Jan 17, 2019 at 10:03:34PM +0100, Daniel Vetter wrote: > > Having the probe helper stuff (which pretty much everyone needs) in > > the drm_crtc_helper.h file (which atomic drivers

Re: [Spice-devel] [PATCH] drm: Split out drm_probe_helper.h

2019-01-22 Thread Daniel Vetter
eah in the process of splitting up drmP.h we've created a few smaller such piles of headers. I think in some cases it's just not going to be worth it to fully split them up, e.g. drm_crtc_helper.h is going to be a pure legacy helper, only needed by pre-atomic drivers. Splitting that up doe

Re: [Spice-devel] [PATCH v3 23/23] drm/qxl: add overflow checks to qxl_mode_dumb_create()

2019-01-18 Thread Daniel Vetter
On Fri, Jan 18, 2019 at 5:32 PM Ville Syrjälä wrote: > > On Fri, Jan 18, 2019 at 04:49:44PM +0100, Daniel Vetter wrote: > > On Fri, Jan 18, 2019 at 01:20:20PM +0100, Gerd Hoffmann wrote: > > > Signed-off-by: Gerd Hoffmann > > > > We already do

Re: [Spice-devel] [PATCH v3 23/23] drm/qxl: add overflow checks to qxl_mode_dumb_create()

2019-01-18 Thread Daniel Vetter
), &pitch)) > + return -EINVAL; > + if (check_mul_overflow(pitch, args->height, &size)) > + return -EINVAL; > + args->size = ALIGN(size, PAGE_SIZE); > > switch (args->bpp) { > case 16: > -- > 2.9.3 > -- Dan

Re: [Spice-devel] [PATCH] drm: Split out drm_probe_helper.h

2019-01-18 Thread Daniel Vetter
_helper.h| 27 +++ > This on the other hand is fine - as expected as this is a new file. > > But the above is just some random comments so: > > Acked-by: Sam Ravnborg -- Daniel Vetter Software Engineer, Intel Corporation http:

Re: [Spice-devel] [PATCH 1/3] drm/qxl: add mode/framebuffer check functions

2019-01-16 Thread Daniel Vetter
t > qdev->vram_size) { > > > - DRM_ERROR("Mode doesn't fit in vram size (vgamem)"); > > > - return -EINVAL; > > > - } > > ... that check moved into the new function. > > cheers, > Gerd > -- Daniel Vetter Software Engineer

Re: [Spice-devel] [PATCH 7/7] drm: Split out drm_probe_helper.h

2018-12-12 Thread Daniel Vetter
On Mon, Dec 10, 2018 at 02:40:25PM +0100, Benjamin Gaignard wrote: > Le lun. 10 déc. 2018 à 12:10, Benjamin Gaignard > a écrit : > > > > Le lun. 10 déc. 2018 à 11:24, Thierry Reding > > a écrit : > > > > > > On Mon, Dec 10, 2018 at 11:11:33AM +0100, Dan

[Spice-devel] [PATCH 7/7] drm: Split out drm_probe_helper.h

2018-12-11 Thread Daniel Vetter
drm_crtc_helper.h includes. Signed-off-by: Daniel Vetter Cc: linux-arm-ker...@lists.infradead.org Cc: virtualizat...@lists.linux-foundation.org Cc: etna...@lists.freedesktop.org Cc: linux-samsung-...@vger.kernel.org Cc: intel-...@lists.freedesktop.org Cc: linux-media...@lists.infradead.org Cc: linux-amlo

[Spice-devel] [PATCH 5/7] drm/qxl: Don't set the dpms hook

2018-12-11 Thread Daniel Vetter
Doesn't do anything with atomic. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualizat...@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org --- drivers/gpu/drm/qxl/qxl_display.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/dr

[Spice-devel] [PATCH 7/7] drm: Split out drm_probe_helper.h

2018-12-11 Thread Daniel Vetter
drm_crtc_helper.h includes. Signed-off-by: Daniel Vetter Cc: linux-arm-ker...@lists.infradead.org Cc: virtualizat...@lists.linux-foundation.org Cc: etna...@lists.freedesktop.org Cc: linux-samsung-...@vger.kernel.org Cc: intel-...@lists.freedesktop.org Cc: linux-media...@lists.infradead.org Cc: linux-amlo

Re: [Spice-devel] [PATCH] drm/qxl: add spice-devel list to MAINTAINERS

2018-11-21 Thread Daniel Vetter
On Wed, Nov 21, 2018 at 10:01:29AM +0100, Gerd Hoffmann wrote: > So qxl kernel patches are sent to the spice-devel list for review. > > Signed-off-by: Gerd Hoffmann Makes sense. Acked-by: Daniel Vetter > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) > > di