Skip to content
Snippets Groups Projects
Verified Commit e4236b14 authored by Matt Coster's avatar Matt Coster
Browse files

drm/imagination: Ensure PVR_MIPS_PT_PAGE_COUNT is never zero


When the host page size was more than 4 times larger than the FW page
size, this macro evaluated to zero resulting in zero-sized arrays.

Use DIV_ROUND_UP() to ensure the correct behavior.

Reported-by: default avatar <20240228012313.5934-1-yaolu@kylinos.cn>
Closes: https://lore.kernel.org/dri-devel/20240228012313.5934-1-yaolu@kylinos.cn
Link: https://lore.kernel.org/dri-devel/20240228012313.5934-1-yaolu@kylinos.cn


Fixes: 927f3e02 ("drm/imagination: Implement MIPS firmware processor and MMU support")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarMatt Coster <matt.coster@imgtec.com>
Reviewed-by: default avatarFrank Binns <frank.binns@imgtec.com>
parent 27906e5d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment