summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/qxl/qxl_drv.h
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2019-01-18 13:20:01 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-01-28 14:24:52 +0100
commita8dc42142a0ebbb5fade13f3e48d89399499d297 (patch)
tree50dceb13e58b97fb87e72623f3d188065e4f2249 /drivers/gpu/drm/qxl/qxl_drv.h
parent2ec6bd67b76ea0afc97eaa22f369738f1a7ad7f3 (diff)
drm/qxl: change the way slot is detected
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 <fziglio@redhat.com> Acked-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Link: http://patchwork.freedesktop.org/patch/msgid/20190118122020.27596-5-kraxel@redhat.com [ kraxel: rebased, adapted to upstream changes ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/qxl/qxl_drv.h')
-rw-r--r--drivers/gpu/drm/qxl/qxl_drv.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
index f9dddfe7d988..d015d4fff158 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.h
+++ b/drivers/gpu/drm/qxl/qxl_drv.h
@@ -311,7 +311,8 @@ static inline uint64_t
qxl_bo_physical_address(struct qxl_device *qdev, struct qxl_bo *bo,
unsigned long offset)
{
- struct qxl_memslot *slot = bo->type == QXL_GEM_DOMAIN_VRAM
+ struct qxl_memslot *slot =
+ (bo->tbo.mem.mem_type == TTM_PL_VRAM)
? &qdev->main_slot : &qdev->surfaces_slot;
/* TODO - need to hold one of the locks to read tbo.offset */