drm/qxl: use ttm_tt
qxl device will not dma, so we don't need ttm_dma_tt. Go use ttm_tt instead, to avoid wasting resources (swiotlb bounce buffers for example). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Noralf Trønnes <noralf@tronnes.org> Link: http://patchwork.freedesktop.org/patch/msgid/20190129082541.1392-1-kraxel@redhat.com
This commit is contained in:
parent
1ff494813b
commit
11ca1b663a
|
@ -204,7 +204,7 @@ static void qxl_ttm_io_mem_free(struct ttm_bo_device *bdev,
|
||||||
* TTM backend functions.
|
* TTM backend functions.
|
||||||
*/
|
*/
|
||||||
struct qxl_ttm_tt {
|
struct qxl_ttm_tt {
|
||||||
struct ttm_dma_tt ttm;
|
struct ttm_tt ttm;
|
||||||
struct qxl_device *qdev;
|
struct qxl_device *qdev;
|
||||||
u64 offset;
|
u64 offset;
|
||||||
};
|
};
|
||||||
|
@ -233,7 +233,7 @@ static void qxl_ttm_backend_destroy(struct ttm_tt *ttm)
|
||||||
{
|
{
|
||||||
struct qxl_ttm_tt *gtt = (void *)ttm;
|
struct qxl_ttm_tt *gtt = (void *)ttm;
|
||||||
|
|
||||||
ttm_dma_tt_fini(>t->ttm);
|
ttm_tt_fini(>t->ttm);
|
||||||
kfree(gtt);
|
kfree(gtt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,13 +253,13 @@ static struct ttm_tt *qxl_ttm_tt_create(struct ttm_buffer_object *bo,
|
||||||
gtt = kzalloc(sizeof(struct qxl_ttm_tt), GFP_KERNEL);
|
gtt = kzalloc(sizeof(struct qxl_ttm_tt), GFP_KERNEL);
|
||||||
if (gtt == NULL)
|
if (gtt == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
gtt->ttm.ttm.func = &qxl_backend_func;
|
gtt->ttm.func = &qxl_backend_func;
|
||||||
gtt->qdev = qdev;
|
gtt->qdev = qdev;
|
||||||
if (ttm_dma_tt_init(>t->ttm, bo, page_flags)) {
|
if (ttm_tt_init(>t->ttm, bo, page_flags)) {
|
||||||
kfree(gtt);
|
kfree(gtt);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return >t->ttm.ttm;
|
return >t->ttm;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void qxl_move_null(struct ttm_buffer_object *bo,
|
static void qxl_move_null(struct ttm_buffer_object *bo,
|
||||||
|
|
Loading…
Reference in New Issue