Re: [PATCH v3 12/23] drm/qxl: track primary bo

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Track which bo is used as primary surface. With that in place we don't > need the primary_created flag any more, we can just check the primary bo > pointer instead. > > Also verify we don't already have a primary surface in > qxl_io_create_primary().

Re: [PATCH v3 11/23] drm/qxl: drop unused offset parameter from qxl_io_create_primary()

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v3 10/23] drm/qxl: move qxl_primary_apply_cursor to correct place

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > The cursor must be set again after creating the primary surface. > Also drop the error message. > > Signed-off-by: Gerd Hoffmann > --- > drivers/gpu/drm/qxl/qxl_display.c | 10 +++--- > 1 file changed, 3 insertions(+), 7 deletions(-) > > diff -

Re: [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 other things -- switch qxl

Re: [PATCH net-next V4 5/5] vhost: access vq metadata through kernel virtual address

2019-01-25 Thread Jason Wang
On 2019/1/25 上午11:00, Michael S. Tsirkin wrote: On Thu, Jan 24, 2019 at 12:07:54PM +0800, Jason Wang wrote: Meanwhile, could you pls post data comparing this last patch with the below? This removes the speculation barrier replacing it with a (useless but at least more lightweight) data depende

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

2019-01-25 Thread Gerd Hoffmann
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 other things -- switch qxl over to the generic fbdev emulation and remove the code you are patching

Re: [PATCH net-next V4 5/5] vhost: access vq metadata through kernel virtual address

2019-01-25 Thread Jason Wang
On 2019/1/25 上午11:03, Michael S. Tsirkin wrote: On Wed, Jan 23, 2019 at 05:55:57PM +0800, Jason Wang wrote: It was noticed that the copy_user() friends that was used to access virtqueue metdata tends to be very expensive for dataplane implementation like vhost since it involves lots of software

Re: [PATCH v3 13/23] drm/qxl: use shadow bo directly

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Pass the shadow bo to qxl_io_create_primary() instead of expecting > qxl_io_create_primary to check bo->shadow. Set is_primary flag on the > shadow bo. Move the is_primary tracking into qxl_io_create_primary() > and qxl_io_destroy_primary() functions

Re: [PATCH net-next V4 5/5] vhost: access vq metadata through kernel virtual address

2019-01-25 Thread Jason Wang
On 2019/1/25 上午11:03, Michael S. Tsirkin wrote: +/* Suppress the vma that needs writeback since we can not track dirty + * pages now. + */ +static bool vma_can_vmap(struct vm_area_struct *vma) +{ + return vma_is_anonymous(vma) || is_vm_hugetlb_page(vma) || + vma_is_shmem(vma);

Re: [PATCH v3 14/23] drm/qxl: cover all crtcs in shadow bo.

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > The qxl device supports only a single active framebuffer ("primary > surface" in spice terminology). In multihead configurations are handled > by defining rectangles within the primary surface for each head/crtc. > > Userspace which uses the qxl ioct

Re: [PATCH v3 16/23] drm/qxl: implement prime kmap/kunmap

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Generic fbdev emulation needs this. Also: We must keep track of the > number of mappings now, so we don't unmap early in case two users want a > kmap of the same bo. Add a sanity check to destroy callback to make > sure kmap/kunmap is balanced. > >

Re: [PATCH v3 15/23] drm/qxl: use qxl_num_crtc directly

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > qdev->monitors_config->max_allowed is effectively set by the > qxl.num_heads module parameter, stored in the qxl_num_crtc variable. > Lets get rid of the indirection and use the variable qxl_num_crtc > directly. The kernel doesn't need to dereference

Re: [PATCH v3 17/23] drm/qxl: use generic fbdev emulation

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Switch qxl over to the new generic fbdev emulation. > > Signed-off-by: Gerd Hoffmann > --- > drivers/gpu/drm/qxl/qxl_display.c | 7 --- > drivers/gpu/drm/qxl/qxl_drv.c | 2 ++ > 2 files changed, 2 insertions(+), 7 deletions(-) > > diff --gi

Re: [PATCH v3 18/23] drm/qxl: remove dead qxl fbdev emulation code

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Lovely diffstat, thanks to the new generic fbdev emulation. > > drm/qxl/Makefile |2 > drm/qxl/qxl_draw.c | 232 > drm/qxl/qxl_drv.h | 21 --- > drm/qxl/qxl_fb.c | 300 > -

Re: [PATCH v3 19/23] drm/qxl: implement qxl_gem_prime_(un)pin

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v3 20/23] drm/qxl: add mode/framebuffer check functions

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Add a helper functions to check video modes. Also add a helper to check > framebuffer buffer objects, using the former for consistency. That way > we should not fail in qxl_primary_atomic_check() because video modes > which are too big will not be ad

Re: [PATCH v3 21/23] drm/qxl: add qxl_add_mode helper function

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Add a helper function to add custom video modes to a connector. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ Virtualization mailing list Virtualization@lists.linux-foundation.org ht

Re: [PATCH v3 22/23] drm/qxl: use kernel mode db

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Add all standard modes from the kernel's video mode data base. > Keep a few non-standard modes in the qxl mode list. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ Virtualization mail

Re: [PATCH v3 18/23] drm/qxl: remove dead qxl fbdev emulation code

2019-01-25 Thread Sam Ravnborg
Hi Noralf. > > Lovely diffstat, thanks to the new generic fbdev emulation. > > > > drm/qxl/Makefile |2 > > drm/qxl/qxl_draw.c | 232 > > drm/qxl/qxl_drv.h | 21 --- > > drm/qxl/qxl_fb.c | 300 > >

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

2019-01-25 Thread Emil Velikov
On Thu, 24 Jan 2019 at 16:58, Daniel Vetter wrote: > > 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. ... legacy drivers which issue the IRQ via the DRM_IOCTL_CONTROL legacy IOCTL. At a later stage, we migh

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

2019-01-25 Thread Sam Ravnborg
Hi Daniel. On Thu, Jan 24, 2019 at 05:58:06PM +0100, Daniel Vetter wrote: > 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: Dani

Re: [PATCH v3 01/23] drm/qxl: drop ttm_mem_reg arg from qxl_hw_surface_alloc()

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.19, skrev Gerd Hoffmann: > Not used, is always NULL. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailma

Re: [PATCH v3 04/23] drm/qxl: change the way slot is detected

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > From: Frediano Ziglio > > Instead of relaying on surface type use the actual placement. > This allow to have different placement for a single type of > surface. > > Signed-off-by: Frediano Ziglio > > [ kraxel: rebased, adapted to upstream changes

Re: [PATCH v3 03/23] drm/qxl: simplify slot management

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Drop pointless indirection, remove the mem_slots array and index > variables, drop dynamic allocation. Store memslots in qxl_device > instead. > > Signed-off-by: Gerd Hoffmann > --- Looks sane: Acked-by: Noralf Trønnes ___

Re: [PATCH v3 02/23] drm/qxl: drop unused qxl_fb_virtual_address

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.19, skrev Gerd Hoffmann: > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v3 05/23] drm/qxl: drop unused fields from struct qxl_device

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > slot_id_bits and slot_gen_bits can be read directly from qxlrom instead. > va_slot_mask is never used anywhere. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ Virtualization mailing l

Re: [PATCH v3 06/23] drm/qxl: use separate offset spaces for the two slots / ttm memory types.

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Without that ttm offsets are not unique, they can refer to objects > in both VRAM and PRIV memory (aka main and surfaces slot). > > One of those "why things didn't blow up without this" moments. > Probably offset conflicts are rare enough by pure luck

Re: [PATCH v3 07/23] drm/qxl: allow both PRIV and VRAM placement for QXL_GEM_DOMAIN_SURFACE

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > qxl surfaces (used for framebuffers and gem objects) can live in both > VRAM and PRIV ttm domains. Update placement setup to include both. > Put PRIV first in the list so it is preferred, so VRAM will have more > room for objects which must be allocat

Re: [PATCH v3 08/23] drm/qxl: use QXL_GEM_DOMAIN_SURFACE for shadow bo.

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > The shadow bo is used as qxl surface, so allocate it as > QXL_GEM_DOMAIN_SURFACE. Should usually be allocated in > PRIV ttm domain then, so this reduces VRAM memory pressure. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes

Re: [PATCH v3 18/23] drm/qxl: remove dead qxl fbdev emulation code

2019-01-25 Thread Noralf Trønnes
Den 25.01.2019 19.10, skrev Sam Ravnborg: > Hi Noralf. > >>> Lovely diffstat, thanks to the new generic fbdev emulation. >>> >>> drm/qxl/Makefile |2 >>> drm/qxl/qxl_draw.c | 232 >>> drm/qxl/qxl_drv.h | 21 --- >>> drm/qxl/qxl_fb.c | 300 >

Re: [PATCH v3 09/23] drm/qxl: use QXL_GEM_DOMAIN_SURFACE for dumb gem objects

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > dumb buffers are used as qxl surfaces, so allocate them as > QXL_GEM_DOMAIN_SURFACE. Should usually be allocated in > PRIV ttm domain then, so this reduces VRAM memory pressure. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes _