mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-08-31 14:13:39 +00:00

Newer PowerVR GPUs (such as the BXS-4-64 MC1) use a RISC-V firmware processor instead of the previous MIPS or META. The current version of this patch depends on a patch[1] which exists in drm-misc-fixes, but has not yet made it back to drm-misc-next (the target of this patch). That patch adds the function pvr_vm_unmap_obj() which is used here. [1]: https://lore.kernel.org/r/20250226-hold-drm_gem_gpuva-lock-for-unmap-v2-1-3fdacded227f@imgtec.com Signed-off-by: Sarah Walker <sarah.walker@imgtec.com> Reviewed-by: Frank Binns <frank.binns@imgtec.com> Link: https://lore.kernel.org/r/20250410-sets-bxs-4-64-patch-v1-v6-14-eda620c5865f@imgtec.com Signed-off-by: Matt Coster <matt.coster@imgtec.com>
42 lines
1.2 KiB
C
42 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0 OR MIT */
|
|
/* Copyright (c) 2024 Imagination Technologies Ltd. */
|
|
|
|
#ifndef PVR_ROGUE_RISCV_H
|
|
#define PVR_ROGUE_RISCV_H
|
|
|
|
#include "pvr_rogue_cr_defs.h"
|
|
|
|
#include <linux/bitops.h>
|
|
#include <linux/sizes.h>
|
|
#include <linux/types.h>
|
|
|
|
#define ROGUE_RISCVFW_REGION_SIZE SZ_256M
|
|
#define ROGUE_RISCVFW_REGION_SHIFT __ffs(ROGUE_RISCVFW_REGION_SIZE)
|
|
|
|
enum rogue_riscvfw_region {
|
|
ROGUE_RISCV_REGION__RESERVED_0 = 0,
|
|
ROGUE_RISCV_REGION__RESERVED_1,
|
|
ROGUE_RISCV_REGION_SOCIF,
|
|
ROGUE_RISCV_REGION__RESERVED_3,
|
|
ROGUE_RISCV_REGION__RESERVED_4,
|
|
ROGUE_RISCV_REGION_BOOTLDR_DATA,
|
|
ROGUE_RISCV_REGION_SHARED_CACHED_DATA,
|
|
ROGUE_RISCV_REGION__RESERVED_7,
|
|
ROGUE_RISCV_REGION_COREMEM,
|
|
ROGUE_RISCV_REGION__RESERVED_9,
|
|
ROGUE_RISCV_REGION__RESERVED_A,
|
|
ROGUE_RISCV_REGION__RESERVED_B,
|
|
ROGUE_RISCV_REGION_BOOTLDR_CODE,
|
|
ROGUE_RISCV_REGION_SHARED_UNCACHED_DATA,
|
|
ROGUE_RISCV_REGION__RESERVED_E,
|
|
ROGUE_RISCV_REGION__RESERVED_F,
|
|
|
|
ROGUE_RISCV_REGION__COUNT,
|
|
};
|
|
|
|
#define ROGUE_RISCVFW_REGION_BASE(r) ((u32)(ROGUE_RISCV_REGION_##r) << ROGUE_RISCVFW_REGION_SHIFT)
|
|
#define ROGUE_RISCVFW_REGION_REMAP_CR(r) \
|
|
(ROGUE_CR_FWCORE_ADDR_REMAP_CONFIG0 + (u32)(ROGUE_RISCV_REGION_##r) * 8U)
|
|
|
|
#endif /* PVR_ROGUE_RISCV_H */
|