Commit 4c3c6cbe authored by Dave Airlie's avatar Dave Airlie Committed by Zheng Zengkai
Browse files

nouveau: find the smallest page allocation to cover a buffer alloc.

stable inclusion
from stable-v6.6.5
commit 59ae50ebf09e55672d7fae31ee7ed414916116ec
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8N21P

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=59ae50ebf09e55672d7fae31ee7ed414916116ec



--------------------------------

commit e9ba37d9f9a6872b069dd893bd86a7d77ba8c153 upstream.

With the new uapi we don't have the comp flags on the allocation,
so we shouldn't be using the first size that works, we should be
iterating until we get the correct one.

This reduces allocations from 2MB to 64k in lots of places.

Fixes dEQP-VK.memory.allocation.basic.size_8KiB.forward.count_4000
on my ampere/gsp system.

Cc: stable@vger.kernel.org # v6.6
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Reviewed-by: default avatarFaith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: default avatarDanilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230811031520.248341-1-airlied@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent b627176a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment