Gerd Hoffmann
2021-Feb-04 14:57 UTC
[PATCH v6 10/10] drm/qxl: allocate dumb buffers in ram
dumb buffers are shadowed anyway, so there is no need to store them in device memory. Use QXL_GEM_DOMAIN_CPU (TTM_PL_SYSTEM) instead. 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/gpu/drm/qxl/qxl_dumb.c index c04cd5a2553c..48a58ba1db96 100644 --- a/drivers/gpu/drm/qxl/qxl_dumb.c +++ b/drivers/gpu/drm/qxl/qxl_dumb.c @@ -59,7 +59,7 @@ int qxl_mode_dumb_create(struct drm_file *file_priv, surf.stride = pitch; surf.format = format; r = qxl_gem_object_create_with_handle(qdev, file_priv, - QXL_GEM_DOMAIN_SURFACE, + QXL_GEM_DOMAIN_CPU, args->size, &surf, &qobj, &handle); if (r) -- 2.29.2
Thomas Zimmermann
2021-Feb-04 18:22 UTC
[PATCH v6 10/10] drm/qxl: allocate dumb buffers in ram
Am 04.02.21 um 15:57 schrieb Gerd Hoffmann:> dumb buffers are shadowed anyway, so there is no need to store them > in device memory. Use QXL_GEM_DOMAIN_CPU (TTM_PL_SYSTEM) instead.Makes sense. I had similar issues in other drivers about the placement of buffers. For them, all new buffers now go into system ram by default, and only move into device memory when they have to.> > Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>Acked-by: Thomas Zimmermann <tzimmermann at suse.de>> --- > 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/gpu/drm/qxl/qxl_dumb.c > index c04cd5a2553c..48a58ba1db96 100644 > --- a/drivers/gpu/drm/qxl/qxl_dumb.c > +++ b/drivers/gpu/drm/qxl/qxl_dumb.c > @@ -59,7 +59,7 @@ int qxl_mode_dumb_create(struct drm_file *file_priv, > surf.stride = pitch; > surf.format = format; > r = qxl_gem_object_create_with_handle(qdev, file_priv, > - QXL_GEM_DOMAIN_SURFACE, > + QXL_GEM_DOMAIN_CPU, > args->size, &surf, &qobj, > &handle); > if (r) >-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 N?rnberg, Germany (HRB 36809, AG N?rnberg) Gesch?ftsf?hrer: Felix Imend?rffer -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature Type: application/pgp-signature Size: 840 bytes Desc: OpenPGP digital signature URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20210204/af1d444b/attachment.sig>