summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/imagination/pvr_fw_mips.h
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2024-05-23 17:07:12 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2024-05-23 17:07:13 +0200
commit36f53d622a216ce80e568b8ca899bfbacb2592d4 (patch)
tree861cf410adf7058826343833ad579181ab19f061 /drivers/gpu/drm/imagination/pvr_fw_mips.h
parent32a0bb7ef217aa37e6b67ca7950f5e504312ed72 (diff)
parentaed9a1a4f7106ff99a882ad06318cebfa71016a2 (diff)
Merge tag 'drm-misc-fixes-2024-05-16' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next
Short summary of fixes pull: nouveau: - use tile_mode and pte_kind for VM_BIND bo allocations Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20240516072658.GA8395@linux.fritz.box
Diffstat (limited to 'drivers/gpu/drm/imagination/pvr_fw_mips.h')
-rw-r--r--drivers/gpu/drm/imagination/pvr_fw_mips.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/imagination/pvr_fw_mips.h b/drivers/gpu/drm/imagination/pvr_fw_mips.h
index 408dbe63a90c..a0c5c41c8aa2 100644
--- a/drivers/gpu/drm/imagination/pvr_fw_mips.h
+++ b/drivers/gpu/drm/imagination/pvr_fw_mips.h
@@ -7,13 +7,14 @@
#include "pvr_rogue_mips.h"
#include <asm/page.h>
+#include <linux/math.h>
#include <linux/types.h>
/* Forward declaration from pvr_gem.h. */
struct pvr_gem_object;
-#define PVR_MIPS_PT_PAGE_COUNT ((ROGUE_MIPSFW_MAX_NUM_PAGETABLE_PAGES * ROGUE_MIPSFW_PAGE_SIZE_4K) \
- >> PAGE_SHIFT)
+#define PVR_MIPS_PT_PAGE_COUNT DIV_ROUND_UP(ROGUE_MIPSFW_MAX_NUM_PAGETABLE_PAGES * ROGUE_MIPSFW_PAGE_SIZE_4K, PAGE_SIZE)
+
/**
* struct pvr_fw_mips_data - MIPS-specific data
*/