summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/qxl
diff options
context:
space:
mode:
authorbibo mao <maobibo@loongson.cn>2021-09-14 09:23:51 +0300
committerGerd Hoffmann <kraxel@redhat.com>2021-09-15 09:21:32 +0300
commit0b7383331c0032c8f7eab8311b73cdbc534ccdd5 (patch)
treee6a08fc14af142a13d5983ae24962ebe7203730f /drivers/gpu/drm/qxl
parent5ad2d11feafbb9a51291754c66b35e450ac6ee59 (diff)
downloadlinux-0b7383331c0032c8f7eab8311b73cdbc534ccdd5.tar.xz
drm/qxl: User page size macro for qxl release bo
Some architectures have different default page size, this patch replaces hardcoded 4096 with PAGE_SIZE macro, since cmd bo size is page aligned. Signed-off-by: bibo mao <maobibo@loongson.cn> Link: http://patchwork.freedesktop.org/patch/msgid/20210914062352.6102-1-maobibo@loongson.cn Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/qxl')
-rw-r--r--drivers/gpu/drm/qxl/qxl_release.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_release.c b/drivers/gpu/drm/qxl/qxl_release.c
index b19f2f00b215..469979cd0341 100644
--- a/drivers/gpu/drm/qxl/qxl_release.c
+++ b/drivers/gpu/drm/qxl/qxl_release.c
@@ -36,10 +36,10 @@
/* manage releaseables */
/* stack them 16 high for now -drawable object is 191 */
#define RELEASE_SIZE 256
-#define RELEASES_PER_BO (4096 / RELEASE_SIZE)
+#define RELEASES_PER_BO (PAGE_SIZE / RELEASE_SIZE)
/* put an alloc/dealloc surface cmd into one bo and round up to 128 */
#define SURFACE_RELEASE_SIZE 128
-#define SURFACE_RELEASES_PER_BO (4096 / SURFACE_RELEASE_SIZE)
+#define SURFACE_RELEASES_PER_BO (PAGE_SIZE / SURFACE_RELEASE_SIZE)
static const int release_size_per_bo[] = { RELEASE_SIZE, SURFACE_RELEASE_SIZE, RELEASE_SIZE };
static const int releases_per_bo[] = { RELEASES_PER_BO, SURFACE_RELEASES_PER_BO, RELEASES_PER_BO };