search for: qxl_gem_domain_surface

Displaying 17 results from an estimated 17 matches for "qxl_gem_domain_surface".

2018 Dec 06
0
[PATCH 3/3] drm/qxl: use QXL_GEM_DOMAIN_SURFACE for dumb gem objects
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 <kraxel at redhat.com> --- drivers/gpu/drm/qxl/qxl_dumb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_dumb.c b/drivers/gp...
2018 Dec 06
0
[PATCH 2/3] drm/qxl: use QXL_GEM_DOMAIN_SURFACE for shadow bo.
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 <kraxel at redhat.com> --- drivers/gpu/drm/qxl/qxl_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/driv...
2018 Dec 06
0
[PATCH 1/3] drm/qxl: allow both PRIV and VRAM placement for QXL_GEM_DOMAIN_SURFACE
...m_domain(struct qxl_bo *qbo, u32 domain, bool pinned) qbo->placement.placement = qbo->placements; qbo->placement.busy_placement = qbo->placements; - if (domain == QXL_GEM_DOMAIN_VRAM) - qbo->placements[c++].flags = TTM_PL_FLAG_CACHED | TTM_PL_FLAG_VRAM | pflag; if (domain == QXL_GEM_DOMAIN_SURFACE) qbo->placements[c++].flags = TTM_PL_FLAG_CACHED | TTM_PL_FLAG_PRIV | pflag; + if (domain == QXL_GEM_DOMAIN_SURFACE || domain == QXL_GEM_DOMAIN_VRAM) + qbo->placements[c++].flags = TTM_PL_FLAG_CACHED | TTM_PL_FLAG_VRAM | pflag; if (domain == QXL_GEM_DOMAIN_CPU) qbo->placements[c++...
2018 Dec 12
0
[PATCH v2 07/18] drm/qxl: allow both PRIV and VRAM placement for QXL_GEM_DOMAIN_SURFACE
...object.c @@ -60,8 +60,10 @@ void qxl_ttm_placement_from_domain(struct qxl_bo *qbo, u32 domain, bool pinned) qbo->placement.busy_placement = qbo->placements; if (domain == QXL_GEM_DOMAIN_VRAM) qbo->placements[c++].flags = TTM_PL_FLAG_CACHED | TTM_PL_FLAG_VRAM | pflag; - if (domain == QXL_GEM_DOMAIN_SURFACE) + if (domain == QXL_GEM_DOMAIN_SURFACE) { qbo->placements[c++].flags = TTM_PL_FLAG_CACHED | TTM_PL_FLAG_PRIV | pflag; + qbo->placements[c++].flags = TTM_PL_FLAG_CACHED | TTM_PL_FLAG_VRAM | pflag; + } if (domain == QXL_GEM_DOMAIN_CPU) qbo->placements[c++].flags = TTM_PL_MASK_CACHI...
2018 Dec 12
0
[PATCH v2 09/18] drm/qxl: use QXL_GEM_DOMAIN_SURFACE for dumb gem objects
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 <kraxel at redhat.com> --- drivers/gpu/drm/qxl/qxl_dumb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_dumb.c b/drivers/gp...
2018 Dec 12
0
[PATCH v2 08/18] drm/qxl: use QXL_GEM_DOMAIN_SURFACE for shadow bo.
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 <kraxel at redhat.com> --- drivers/gpu/drm/qxl/qxl_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/driv...
2018 Dec 06
0
[Spice-devel] [PATCH 1/3] drm/qxl: allow both PRIV and VRAM placement for QXL_GEM_DOMAIN_SURFACE
On Thu, Dec 06, 2018 at 05:55:58AM -0500, Frediano Ziglio wrote: > > > 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 allocated there. > > > >
2018 Dec 07
0
[Spice-devel] [PATCH 1/3] drm/qxl: allow both PRIV and VRAM placement for QXL_GEM_DOMAIN_SURFACE
...migration > > > fails. I proposed similar patches years ago and they were rejected > > > for these reasons. > > > > Pointer? > > I think is this: > https://patchwork.kernel.org/patch/7374931/ Ok, problem is you are doing it for both QXL_GEM_DOMAIN_VRAM and QXL_GEM_DOMAIN_SURFACE. Surfaces can be in both VRAM and PRIV ttm domains, so for the later this is fine. Most other allocations must be in VRAM ttm domain though, so allowing PRIV for QXL_GEM_DOMAIN_VRAM is *not* ok. Noticed I need patch 1/2 of that series, otherwise things will break when we run out of space in PRIV...
2018 Dec 12
0
[PATCH v2 13/18] drm/qxl: use shadow bo directly
...te_primary(qdev, primary); + qxl_primary_apply_cursor(plane); } qxl_draw_dirty_fb(qdev, plane->state->fb, bo, 0, 0, &norect, 1, 1); @@ -756,6 +744,7 @@ static int qxl_plane_prepare_fb(struct drm_plane *plane, qxl_bo_create(qdev, user_bo->gem_base.size, true, true, QXL_GEM_DOMAIN_SURFACE, NULL, &user_bo->shadow); + user_bo->shadow->surf = user_bo->surf; } } @@ -784,7 +773,7 @@ static void qxl_plane_cleanup_fb(struct drm_plane *plane, user_bo = gem_to_qxl_bo(obj); qxl_bo_unpin(user_bo); - if (user_bo->shadow && !user_bo->is_pri...
2018 Dec 12
0
[PATCH v2 14/18] drm/qxl: cover all crtcs in shadow bo.
...qdev->dumb_shadow_bo->surf.height != surf.height) { + if (qdev->dumb_shadow_bo) { + drm_gem_object_put_unlocked + (&qdev->dumb_shadow_bo->gem_base); + qdev->dumb_shadow_bo = NULL; + } + qxl_bo_create(qdev, surf.height * surf.stride, true, true, QXL_GEM_DOMAIN_SURFACE, NULL, - &user_bo->shadow); - user_bo->shadow->surf = user_bo->surf; + &qdev->dumb_shadow_bo); + qdev->dumb_shadow_bo->surf = surf; + } + if (user_bo->shadow != qdev->dumb_shadow_bo) { + if (user_bo->shadow) { + drm_gem_object_put_u...
2018 Dec 12
0
[PATCH v2 18/18] drm/qxl: remove dead qxl fbdev emulation code
..._cmd->height; - - size = mode_cmd->pitches[0] * height; - aligned_size = ALIGN(size, PAGE_SIZE); - /* TODO: unallocate and reallocate surface0 for real. Hack to just - * have a large enough surface0 for 1024x768 Xorg 32bpp mode */ - ret = qxl_gem_object_create(qdev, aligned_size, 0, - QXL_GEM_DOMAIN_SURFACE, - false, /* is discardable */ - false, /* is kernel (false means device) */ - NULL, - &gobj); - if (ret) { - pr_err("failed to allocate framebuffer (%d)\n", - aligned_size); - return -ENOMEM; - } - qbo = gem_to_qxl_bo(gobj); - - qbo->surf.widt...
2014 Jul 09
0
[PATCH 10/17] drm/qxl: rework to new fence interface
...ases == 0) - return 0; + struct qxl_bo *bo = (struct qxl_bo *)sync_obj; + struct qxl_device *qdev = bo->gem_base.dev->dev_private; + struct reservation_object_list *fobj; + int count = 0, sc = 0, num_release = 0; + bool have_drawable_releases; retry: if (sc == 0) { if (bo->type == QXL_GEM_DOMAIN_SURFACE) - qxl_update_surface(qfence->qdev, bo); + qxl_update_surface(qdev, bo); } else if (sc >= 1) { - qxl_io_notify_oom(qfence->qdev); + qxl_io_notify_oom(qdev); } sc++; for (count = 0; count < 10; count++) { - bool ret; - ret = qxl_queue_garbage_collect(qfence->qdev,...
2014 May 14
0
[RFC PATCH v1 12/16] drm/ttm: flip the switch, and convert to dma_fence
...bool interruptible) -{ - struct qxl_bo *bo = (struct qxl_bo *)sync_obj; - struct qxl_device *qdev = bo->gem_base.dev->dev_private; - struct reservation_object_list *fobj; - int count = 0, sc = 0, num_release = 0; - bool have_drawable_releases; - -retry: - if (sc == 0) { - if (bo->type == QXL_GEM_DOMAIN_SURFACE) - qxl_update_surface(qdev, bo); - } else if (sc >= 1) { - qxl_io_notify_oom(qdev); - } - - sc++; - - for (count = 0; count < 10; count++) { - if (qxl_sync_obj_signaled(sync_obj)) - return 0; - - if (!qxl_queue_garbage_collect(qdev, true)) - break; - } - - have_drawable_releases = fa...
2014 Jul 09
0
[PATCH 13/17] drm/ttm: flip the switch, and convert to dma_fence
...bool interruptible) -{ - struct qxl_bo *bo = (struct qxl_bo *)sync_obj; - struct qxl_device *qdev = bo->gem_base.dev->dev_private; - struct reservation_object_list *fobj; - int count = 0, sc = 0, num_release = 0; - bool have_drawable_releases; - -retry: - if (sc == 0) { - if (bo->type == QXL_GEM_DOMAIN_SURFACE) - qxl_update_surface(qdev, bo); - } else if (sc >= 1) { - qxl_io_notify_oom(qdev); - } - - sc++; - - for (count = 0; count < 10; count++) { - if (qxl_sync_obj_signaled(sync_obj)) - return 0; - - if (!qxl_queue_garbage_collect(qdev, true)) - break; - } - - have_drawable_releases = fa...
2014 May 14
17
[RFC PATCH v1 00/16] Convert all ttm drivers to use the new reservation interface
This series depends on the previously posted reservation api patches. 2 of them are not yet in for-next-fences branch of git://git.linaro.org/people/sumit.semwal/linux-3.x.git The missing patches are still in my vmwgfx_wip branch at git://people.freedesktop.org/~mlankhorst/linux All ttm drivers are converted to the fence api, fence_lock is removed and rcu is used in its place. qxl is the first
2014 Jul 31
19
[PATCH 01/19] fence: add debugging lines to fence_is_signaled for the callback
fence_is_signaled callback should support being run in atomic context, but not in irq context. Signed-off-by: Maarten Lankhorst <maarten.lankhorst at canonical.com> --- include/linux/fence.h | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/include/linux/fence.h b/include/linux/fence.h index d174585b874b..c1a4519ba2f5 100644 ---
2014 Jul 09
22
[PATCH 00/17] Convert TTM to the new fence interface.
This series applies on top of the driver-core-next branch of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git Before converting ttm to the new fence interface I had to fix some drivers to require a reservation before poking with fence_obj. After flipping the switch RCU becomes available instead, and the extra reservations can be dropped again. :-) I've done at least basic