From: Gerd Hoffmann <kraxel@redhat.com> To: dri-devel@lists.freedesktop.org Cc: Gerd Hoffmann <kraxel@redhat.com>, Dave Airlie <airlied@redhat.com>, David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>, virtualization@lists.linux-foundation.org (open list:DRM DRIVER FOR QXL VIRTUAL GPU), spice-devel@lists.freedesktop.org (open list:DRM DRIVER FOR QXL VIRTUAL GPU), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 5/5] drm/qxl: allocate small objects top-down Date: Thu, 17 Oct 2019 15:26:38 +0200 [thread overview] Message-ID: <20191017132638.9693-6-kraxel@redhat.com> (raw) In-Reply-To: <20191017132638.9693-1-kraxel@redhat.com> qxl uses small buffer objects for qxl commands. Allocate them top-down to reduce fragmentation. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- drivers/gpu/drm/qxl/qxl_object.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_object.c b/drivers/gpu/drm/qxl/qxl_object.c index 927ab917b834..ad336c98a0cf 100644 --- a/drivers/gpu/drm/qxl/qxl_object.c +++ b/drivers/gpu/drm/qxl/qxl_object.c @@ -54,9 +54,14 @@ bool qxl_ttm_bo_is_qxl_bo(struct ttm_buffer_object *bo) void qxl_ttm_placement_from_domain(struct qxl_bo *qbo, u32 domain, bool pinned) { u32 c = 0; - u32 pflag = pinned ? TTM_PL_FLAG_NO_EVICT : 0; + u32 pflag = 0; unsigned int i; + if (pinned) + pflag |= TTM_PL_FLAG_NO_EVICT; + if (qbo->tbo.base.size <= PAGE_SIZE) + pflag |= TTM_PL_FLAG_TOPDOWN; + qbo->placement.placement = qbo->placements; qbo->placement.busy_placement = qbo->placements; if (domain == QXL_GEM_DOMAIN_VRAM) -- 2.18.1
WARNING: multiple messages have this Message-ID (diff)
From: Gerd Hoffmann <kraxel@redhat.com> To: dri-devel@lists.freedesktop.org Cc: David Airlie <airlied@linux.ie>, open list <linux-kernel@vger.kernel.org>, "open list:DRM DRIVER FOR QXL VIRTUAL GPU" <virtualization@lists.linux-foundation.org>, Gerd Hoffmann <kraxel@redhat.com>, Daniel Vetter <daniel@ffwll.ch>, "open list:DRM DRIVER FOR QXL VIRTUAL GPU" <spice-devel@lists.freedesktop.org>, Dave Airlie <airlied@redhat.com> Subject: [PATCH 5/5] drm/qxl: allocate small objects top-down Date: Thu, 17 Oct 2019 15:26:38 +0200 [thread overview] Message-ID: <20191017132638.9693-6-kraxel@redhat.com> (raw) In-Reply-To: <20191017132638.9693-1-kraxel@redhat.com> qxl uses small buffer objects for qxl commands. Allocate them top-down to reduce fragmentation. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- drivers/gpu/drm/qxl/qxl_object.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_object.c b/drivers/gpu/drm/qxl/qxl_object.c index 927ab917b834..ad336c98a0cf 100644 --- a/drivers/gpu/drm/qxl/qxl_object.c +++ b/drivers/gpu/drm/qxl/qxl_object.c @@ -54,9 +54,14 @@ bool qxl_ttm_bo_is_qxl_bo(struct ttm_buffer_object *bo) void qxl_ttm_placement_from_domain(struct qxl_bo *qbo, u32 domain, bool pinned) { u32 c = 0; - u32 pflag = pinned ? TTM_PL_FLAG_NO_EVICT : 0; + u32 pflag = 0; unsigned int i; + if (pinned) + pflag |= TTM_PL_FLAG_NO_EVICT; + if (qbo->tbo.base.size <= PAGE_SIZE) + pflag |= TTM_PL_FLAG_TOPDOWN; + qbo->placement.placement = qbo->placements; qbo->placement.busy_placement = qbo->placements; if (domain == QXL_GEM_DOMAIN_VRAM) -- 2.18.1 _______________________________________________ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
next prev parent reply other threads:[~2019-10-17 13:27 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-10-17 13:26 [PATCH 0/5] drm/qxl: a collection of small tweaks Gerd Hoffmann 2019-10-17 13:26 ` [PATCH 1/5] drm/qxl: drop qxl_ttm_fault Gerd Hoffmann 2019-10-17 13:26 ` Gerd Hoffmann 2019-10-17 13:26 ` Gerd Hoffmann 2019-10-17 13:26 ` [PATCH 2/5] drm/qxl: switch qxl to &drm_gem_object_funcs.mmap Gerd Hoffmann 2019-10-17 13:26 ` Gerd Hoffmann 2019-10-17 13:26 ` Gerd Hoffmann 2019-10-17 13:26 ` [PATCH 3/5] drm/qxl: drop verify_access Gerd Hoffmann 2019-10-17 13:26 ` Gerd Hoffmann 2019-10-17 13:26 ` [PATCH 4/5] drm/qxl: use DEFINE_DRM_GEM_FOPS() Gerd Hoffmann 2019-10-17 13:26 ` Gerd Hoffmann 2019-10-17 13:26 ` Gerd Hoffmann 2019-10-17 13:26 ` [PATCH 5/5] drm/qxl: allocate small objects top-down Gerd Hoffmann 2019-10-17 13:26 ` Gerd Hoffmann [this message] 2019-10-17 13:26 ` Gerd Hoffmann 2019-10-22 8:53 ` [PATCH 0/5] drm/qxl: a collection of small tweaks Daniel Vetter
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20191017132638.9693-6-kraxel@redhat.com \ --to=kraxel@redhat.com \ --cc=airlied@linux.ie \ --cc=airlied@redhat.com \ --cc=daniel@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-kernel@vger.kernel.org \ --cc=spice-devel@lists.freedesktop.org \ --cc=virtualization@lists.linux-foundation.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.