forked from Minki/linux
drm/qxl: allocate small objects top-down
qxl uses small buffer objects for qxl commands. Allocate them top-down to reduce fragmentation. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20191017132638.9693-6-kraxel@redhat.com
This commit is contained in:
parent
db26208783
commit
8ee2f956c9
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user