Signed-off-by: Nils Wallménius nils.wallmenius@gmail.com --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - 1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index c28b23c..00dade8 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -1943,7 +1943,6 @@ struct amdgpu_device { int usec_timeout; const struct amdgpu_asic_funcs *asic_funcs; bool shutdown; - bool suspend; bool need_dma32; bool accel_working; struct work_struct reset_work;
Signed-off-by: Nils Wallménius nils.wallmenius@gmail.com --- drivers/gpu/drm/radeon/radeon.h | 1 - 1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 007be29..7bb966d 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -2394,7 +2394,6 @@ struct radeon_device { struct radeon_wb wb; struct radeon_dummy_page dummy_page; bool shutdown; - bool suspend; bool need_dma32; bool accel_working; bool fastfb_working; /* IGP feature*/
It is only used locally in amdgpu_get_bios
Signed-off-by: Nils Wallménius nils.wallmenius@gmail.com --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 00dade8..4d2c335 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -1964,7 +1964,6 @@ struct amdgpu_device { /* BIOS */ uint8_t *bios; bool is_atom_bios; - uint16_t bios_header_start; struct amdgpu_bo *stollen_vga_memory; uint32_t bios_scratch[AMDGPU_BIOS_NUM_SCRATCH];
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c index 80add22..99ca75b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c @@ -349,7 +349,7 @@ static inline bool amdgpu_acpi_vfct_bios(struct amdgpu_device *adev) bool amdgpu_get_bios(struct amdgpu_device *adev) { bool r; - uint16_t tmp; + uint16_t tmp, bios_header_start;
r = amdgpu_atrm_get_bios(adev); if (r == false) @@ -383,11 +383,11 @@ bool amdgpu_get_bios(struct amdgpu_device *adev) goto free_bios; }
- adev->bios_header_start = RBIOS16(0x48); - if (!adev->bios_header_start) { + bios_header_start = RBIOS16(0x48); + if (!bios_header_start) { goto free_bios; } - tmp = adev->bios_header_start + 4; + tmp = bios_header_start + 4; if (!memcmp(adev->bios + tmp, "ATOM", 4) || !memcmp(adev->bios + tmp, "MOTA", 4)) { adev->is_atom_bios = true;
Signed-off-by: Nils Wallménius nils.wallmenius@gmail.com --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 16 ---------------- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 26 -------------------------- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 26 -------------------------- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 26 -------------------------- 4 files changed, 94 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 4d2c335..739a63d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -255,21 +255,6 @@ struct amdgpu_buffer_funcs { uint64_t dst_offset, /* number of byte to transfer */ uint32_t byte_count); - - /* maximum bytes in a single operation */ - uint32_t fill_max_bytes; - - /* number of dw to reserve per operation */ - unsigned fill_num_dw; - - /* used for buffer clearing */ - void (*emit_fill_buffer)(struct amdgpu_ib *ib, - /* value to write to memory */ - uint32_t src_data, - /* dst addr in bytes */ - uint64_t dst_offset, - /* number of byte to fill */ - uint32_t byte_count); };
/* provided by hw blocks that can write ptes, e.g., sdma */ @@ -2239,7 +2224,6 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring) #define amdgpu_display_stop_mc_access(adev, s) (adev)->mode_info.funcs->stop_mc_access((adev), (s)) #define amdgpu_display_resume_mc_access(adev, s) (adev)->mode_info.funcs->resume_mc_access((adev), (s)) #define amdgpu_emit_copy_buffer(adev, ib, s, d, b) (adev)->mman.buffer_funcs->emit_copy_buffer((ib), (s), (d), (b)) -#define amdgpu_emit_fill_buffer(adev, ib, s, d, b) (adev)->mman.buffer_funcs->emit_fill_buffer((ib), (s), (d), (b)) #define amdgpu_dpm_pre_set_power_state(adev) (adev)->pm.funcs->pre_set_power_state((adev)) #define amdgpu_dpm_set_power_state(adev) (adev)->pm.funcs->set_power_state((adev)) #define amdgpu_dpm_post_set_power_state(adev) (adev)->pm.funcs->post_set_power_state((adev)) diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c index 72543f1..28b1b77 100644 --- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c +++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c @@ -1361,36 +1361,10 @@ static void cik_sdma_emit_copy_buffer(struct amdgpu_ib *ib, ib->ptr[ib->length_dw++] = upper_32_bits(dst_offset); }
-/** - * cik_sdma_emit_fill_buffer - fill buffer using the sDMA engine - * - * @ring: amdgpu_ring structure holding ring information - * @src_data: value to write to buffer - * @dst_offset: dst GPU address - * @byte_count: number of bytes to xfer - * - * Fill GPU buffers using the DMA engine (CIK). - */ -static void cik_sdma_emit_fill_buffer(struct amdgpu_ib *ib, - uint32_t src_data, - uint64_t dst_offset, - uint32_t byte_count) -{ - ib->ptr[ib->length_dw++] = SDMA_PACKET(SDMA_OPCODE_CONSTANT_FILL, 0, 0); - ib->ptr[ib->length_dw++] = lower_32_bits(dst_offset); - ib->ptr[ib->length_dw++] = upper_32_bits(dst_offset); - ib->ptr[ib->length_dw++] = src_data; - ib->ptr[ib->length_dw++] = byte_count; -} - static const struct amdgpu_buffer_funcs cik_sdma_buffer_funcs = { .copy_max_bytes = 0x1fffff, .copy_num_dw = 7, .emit_copy_buffer = cik_sdma_emit_copy_buffer, - - .fill_max_bytes = 0x1fffff, - .fill_num_dw = 5, - .emit_fill_buffer = cik_sdma_emit_fill_buffer, };
static void cik_sdma_set_buffer_funcs(struct amdgpu_device *adev) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c index 6e0a86a..b0b939a 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c @@ -1367,36 +1367,10 @@ static void sdma_v2_4_emit_copy_buffer(struct amdgpu_ib *ib, ib->ptr[ib->length_dw++] = upper_32_bits(dst_offset); }
-/** - * sdma_v2_4_emit_fill_buffer - fill buffer using the sDMA engine - * - * @ring: amdgpu_ring structure holding ring information - * @src_data: value to write to buffer - * @dst_offset: dst GPU address - * @byte_count: number of bytes to xfer - * - * Fill GPU buffers using the DMA engine (VI). - */ -static void sdma_v2_4_emit_fill_buffer(struct amdgpu_ib *ib, - uint32_t src_data, - uint64_t dst_offset, - uint32_t byte_count) -{ - ib->ptr[ib->length_dw++] = SDMA_PKT_HEADER_OP(SDMA_OP_CONST_FILL); - ib->ptr[ib->length_dw++] = lower_32_bits(dst_offset); - ib->ptr[ib->length_dw++] = upper_32_bits(dst_offset); - ib->ptr[ib->length_dw++] = src_data; - ib->ptr[ib->length_dw++] = byte_count; -} - static const struct amdgpu_buffer_funcs sdma_v2_4_buffer_funcs = { .copy_max_bytes = 0x1fffff, .copy_num_dw = 7, .emit_copy_buffer = sdma_v2_4_emit_copy_buffer, - - .fill_max_bytes = 0x1fffff, - .fill_num_dw = 7, - .emit_fill_buffer = sdma_v2_4_emit_fill_buffer, };
static void sdma_v2_4_set_buffer_funcs(struct amdgpu_device *adev) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c index 8c8ca98..9521e29 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c @@ -1635,36 +1635,10 @@ static void sdma_v3_0_emit_copy_buffer(struct amdgpu_ib *ib, ib->ptr[ib->length_dw++] = upper_32_bits(dst_offset); }
-/** - * sdma_v3_0_emit_fill_buffer - fill buffer using the sDMA engine - * - * @ring: amdgpu_ring structure holding ring information - * @src_data: value to write to buffer - * @dst_offset: dst GPU address - * @byte_count: number of bytes to xfer - * - * Fill GPU buffers using the DMA engine (VI). - */ -static void sdma_v3_0_emit_fill_buffer(struct amdgpu_ib *ib, - uint32_t src_data, - uint64_t dst_offset, - uint32_t byte_count) -{ - ib->ptr[ib->length_dw++] = SDMA_PKT_HEADER_OP(SDMA_OP_CONST_FILL); - ib->ptr[ib->length_dw++] = lower_32_bits(dst_offset); - ib->ptr[ib->length_dw++] = upper_32_bits(dst_offset); - ib->ptr[ib->length_dw++] = src_data; - ib->ptr[ib->length_dw++] = byte_count; -} - static const struct amdgpu_buffer_funcs sdma_v3_0_buffer_funcs = { .copy_max_bytes = 0x1fffff, .copy_num_dw = 7, .emit_copy_buffer = sdma_v3_0_emit_copy_buffer, - - .fill_max_bytes = 0x1fffff, - .fill_num_dw = 5, - .emit_fill_buffer = sdma_v3_0_emit_fill_buffer, };
static void sdma_v3_0_set_buffer_funcs(struct amdgpu_device *adev)
Clean up some set-but-not-read members and one unused member.
Signed-off-by: Nils Wallménius nils.wallmenius@gmail.com --- drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 5 ----- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 6 ------ 2 files changed, 11 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c index 84b0ce3..a2a15b7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c @@ -599,13 +599,10 @@ int amdgpu_atombios_get_clock_info(struct amdgpu_device *adev)
ppll->min_post_div = 2; ppll->max_post_div = 0x7f; - ppll->min_frac_feedback_div = 0; - ppll->max_frac_feedback_div = 9; ppll->min_ref_div = 2; ppll->max_ref_div = 0x3ff; ppll->min_feedback_div = 4; ppll->max_feedback_div = 0xfff; - ppll->best_vco = 0;
for (i = 1; i < AMDGPU_MAX_PPLL; i++) adev->clock.ppll[i] = *ppll; @@ -635,7 +632,6 @@ int amdgpu_atombios_get_clock_info(struct amdgpu_device *adev) spll->max_ref_div = 0xff; spll->min_feedback_div = 4; spll->max_feedback_div = 0xff; - spll->best_vco = 0;
/* memory clock */ mpll->reference_freq = @@ -667,7 +663,6 @@ int amdgpu_atombios_get_clock_info(struct amdgpu_device *adev) mpll->max_ref_div = 0xff; mpll->min_feedback_div = 4; mpll->max_feedback_div = 0xff; - mpll->best_vco = 0;
/* disp clock */ adev->clock.default_dispclk = diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h index 8d432e6..1dff768 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h @@ -195,7 +195,6 @@ struct amdgpu_pll { uint32_t pll_out_max; uint32_t lcd_pll_out_min; uint32_t lcd_pll_out_max; - uint32_t best_vco;
/* divider limits */ uint32_t min_ref_div; @@ -204,14 +203,9 @@ struct amdgpu_pll { uint32_t max_post_div; uint32_t min_feedback_div; uint32_t max_feedback_div; - uint32_t min_frac_feedback_div; - uint32_t max_frac_feedback_div;
/* flags for the current clock */ uint32_t flags; - - /* pll id */ - uint32_t id; };
struct amdgpu_i2c_chan {
Signed-off-by: Nils Wallménius nils.wallmenius@gmail.com --- drivers/gpu/drm/radeon/radeon_mode.h | 3 --- 1 file changed, 3 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h index bb75201a..b0060f4 100644 --- a/drivers/gpu/drm/radeon/radeon_mode.h +++ b/drivers/gpu/drm/radeon/radeon_mode.h @@ -191,9 +191,6 @@ struct radeon_pll {
/* flags for the current clock */ uint32_t flags; - - /* pll id */ - uint32_t id; };
struct radeon_i2c_chan {
Signed-off-by: Nils Wallménius nils.wallmenius@gmail.com --- drivers/gpu/drm/amd/amdgpu/cik.c | 2 +- drivers/gpu/drm/amd/amdgpu/vi.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/cik.c b/drivers/gpu/drm/amd/amdgpu/cik.c index 5da14a3..9152e71 100644 --- a/drivers/gpu/drm/amd/amdgpu/cik.c +++ b/drivers/gpu/drm/amd/amdgpu/cik.c @@ -962,7 +962,7 @@ static bool cik_read_bios_from_rom(struct amdgpu_device *adev, return true; }
-static struct amdgpu_allowed_register_entry cik_allowed_read_registers[] = { +static const struct amdgpu_allowed_register_entry cik_allowed_read_registers[] = { {mmGRBM_STATUS, false}, {mmGB_ADDR_CONFIG, false}, {mmMC_ARB_RAMCFG, false}, diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c index 9163f59..e1bee10 100644 --- a/drivers/gpu/drm/amd/amdgpu/vi.c +++ b/drivers/gpu/drm/amd/amdgpu/vi.c @@ -414,11 +414,11 @@ static bool vi_read_bios_from_rom(struct amdgpu_device *adev, return true; }
-static struct amdgpu_allowed_register_entry tonga_allowed_read_registers[] = { +static const struct amdgpu_allowed_register_entry tonga_allowed_read_registers[] = { {mmGB_MACROTILE_MODE7, true}, };
-static struct amdgpu_allowed_register_entry cz_allowed_read_registers[] = { +static const struct amdgpu_allowed_register_entry cz_allowed_read_registers[] = { {mmGB_TILE_MODE7, true}, {mmGB_TILE_MODE12, true}, {mmGB_TILE_MODE17, true}, @@ -426,7 +426,7 @@ static struct amdgpu_allowed_register_entry cz_allowed_read_registers[] = { {mmGB_MACROTILE_MODE7, true}, };
-static struct amdgpu_allowed_register_entry vi_allowed_read_registers[] = { +static const struct amdgpu_allowed_register_entry vi_allowed_read_registers[] = { {mmGRBM_STATUS, false}, {mmGRBM_STATUS2, false}, {mmGRBM_STATUS_SE0, false}, @@ -525,8 +525,8 @@ static uint32_t vi_read_indexed_register(struct amdgpu_device *adev, u32 se_num, static int vi_read_register(struct amdgpu_device *adev, u32 se_num, u32 sh_num, u32 reg_offset, u32 *value) { - struct amdgpu_allowed_register_entry *asic_register_table = NULL; - struct amdgpu_allowed_register_entry *asic_register_entry; + const struct amdgpu_allowed_register_entry *asic_register_table = NULL; + const struct amdgpu_allowed_register_entry *asic_register_entry; uint32_t size, i;
*value = 0;
dri-devel@lists.freedesktop.org