mirror of
https://github.com/torvalds/linux.git
synced 2026-10-31 20:24:02 +01:00
drm/amdgpu: add get_rom_offset callback for NBIO 6.3.2
Add the get_rom_offset callback to retrieve the VBIOS ROM offset from REGS_ROM_OFFSET_CTRL for vbios imaging fetching from spirom. Signed-off-by: Le Ma <le.ma@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
e37e02f74b
commit
73a2a3b172
|
|
@ -83,6 +83,21 @@ static u32 nbio_v6_3_2_get_memsize(struct amdgpu_device *adev)
|
|||
return RREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF0_RCC_CONFIG_MEMSIZE);
|
||||
}
|
||||
|
||||
static u32 nbio_v6_3_2_get_rom_offset(struct amdgpu_device *adev)
|
||||
{
|
||||
u32 data, rom_offset;
|
||||
|
||||
data = RREG32_SOC15(NBIO, 0, regREGS_ROM_OFFSET_CTRL);
|
||||
rom_offset = REG_GET_FIELD(data, REGS_ROM_OFFSET_CTRL, ROM_OFFSET);
|
||||
|
||||
/* Temp W/A for nbio v6.3.2. Retrieving rom_offset as 1 but vbios
|
||||
* image is actually located from offset 2
|
||||
*/
|
||||
rom_offset += 1;
|
||||
|
||||
return rom_offset;
|
||||
}
|
||||
|
||||
static void nbio_v6_3_2_enable_doorbell_aperture(struct amdgpu_device *adev,
|
||||
bool enable)
|
||||
{
|
||||
|
|
@ -366,4 +381,5 @@ const struct amdgpu_nbio_funcs nbio_v6_3_2_funcs = {
|
|||
.sdma_doorbell_range = nbio_v6_3_2_sdma_doorbell_range,
|
||||
.vcn_doorbell_range = nbio_v6_3_2_vcn_doorbell_range,
|
||||
.init_registers = nbio_v6_3_2_init_registers,
|
||||
.get_rom_offset = nbio_v6_3_2_get_rom_offset,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user