aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/imagination/pvr_device.c
diff options
context:
space:
mode:
authorGravatar Sarah Walker <sarah.walker@imgtec.com> 2023-11-22 16:34:35 +0000
committerGravatar Maxime Ripard <mripard@kernel.org> 2023-11-23 09:01:46 +0100
commit927f3e0253c11276f0237ca1a14e77c48957c069 (patch)
treebe2affa0933b13116137dee0d73ebc88bc0ca16b /drivers/gpu/drm/imagination/pvr_device.c
parentdrm/imagination: Implement firmware infrastructure and META FW support (diff)
downloadlinux-927f3e0253c1.tar.gz
linux-927f3e0253c1.tar.bz2
linux-927f3e0253c1.zip
drm/imagination: Implement MIPS firmware processor and MMU support
Add support for the MIPS firmware processor, used in the Series AXE GPU. The MIPS firmware processor uses a separate MMU to the rest of the GPU, so this patch adds support for that as well. Changes since v8: - Corrected license identifiers Changes since v6: - Fix integer overflow in VM map error path Changes since v5: - Use alloc_page() when allocating MIPS pagetable Changes since v3: - Get regs resource (removed from GPU resources commit) Signed-off-by: Sarah Walker <sarah.walker@imgtec.com> Signed-off-by: Donald Robson <donald.robson@imgtec.com> Link: https://lore.kernel.org/r/a114f7b3e97cb07460c7f2842901716a9207b0c4.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/imagination/pvr_device.c')
-rw-r--r--drivers/gpu/drm/imagination/pvr_device.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/imagination/pvr_device.c b/drivers/gpu/drm/imagination/pvr_device.c
index 1be14cdbdace..2d6db4715f85 100644
--- a/drivers/gpu/drm/imagination/pvr_device.c
+++ b/drivers/gpu/drm/imagination/pvr_device.c
@@ -50,16 +50,19 @@ pvr_device_reg_init(struct pvr_device *pvr_dev)
{
struct drm_device *drm_dev = from_pvr_device(pvr_dev);
struct platform_device *plat_dev = to_platform_device(drm_dev->dev);
+ struct resource *regs_resource;
void __iomem *regs;
+ pvr_dev->regs_resource = NULL;
pvr_dev->regs = NULL;
- regs = devm_platform_ioremap_resource(plat_dev, 0);
+ regs = devm_platform_get_and_ioremap_resource(plat_dev, 0, &regs_resource);
if (IS_ERR(regs))
return dev_err_probe(drm_dev->dev, PTR_ERR(regs),
"failed to ioremap gpu registers\n");
pvr_dev->regs = regs;
+ pvr_dev->regs_resource = regs_resource;
return 0;
}