Skip to content

Commit a34ab10

Browse files
committed
Merge tag 'drm-fixes-for-v4.12-rc1' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie: "AMD, nouveau, one i915, and one EDID fix for v4.12-rc1 Some fixes that it would be good to have in rc1. It contains the i915 quiet fix that you reported. It also has an amdgpu fixes pull, with lots of ongoing work on Vega10 which is new in this kernel and is preliminary support so may have a fair bit of movement. Otherwise a few non-Vega10 AMD fixes, one EDID fix and some nouveau regression fixers" * tag 'drm-fixes-for-v4.12-rc1' of git://people.freedesktop.org/~airlied/linux: (144 commits) drm/i915: Make vblank evade warnings optional drm/nouveau/therm: remove ineffective workarounds for alarm bugs drm/nouveau/tmr: avoid processing completed alarms when adding a new one drm/nouveau/tmr: fix corruption of the pending list when rescheduling an alarm drm/nouveau/tmr: handle races with hw when updating the next alarm time drm/nouveau/tmr: ack interrupt before processing alarms drm/nouveau/core: fix static checker warning drm/nouveau/fb/ram/gf100-: remove 0x10f200 read drm/nouveau/kms/nv50: skip core channel cursor update on position-only changes drm/nouveau/kms/nv50: fix source-rect-only plane updates drm/nouveau/kms/nv50: remove pointless argument to window atomic_check_acquire() drm/amd/powerplay: refine pwm1_enable callback functions for CI. drm/amd/powerplay: refine pwm1_enable callback functions for vi. drm/amd/powerplay: refine pwm1_enable callback functions for Vega10. drm/amdgpu: refine amdgpu pwm1_enable sysfs interface. drm/amdgpu: add amd fan ctrl mode enums. drm/amd/powerplay: add more smu message on Vega10. drm/amdgpu: fix dependency issue drm/amd: fix init order of sched job drm/amdgpu: add some additional vega10 pci ids ...
2 parents bd1286f + 7b8cd33 commit a34ab10

File tree

108 files changed

+2431
-2120
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+2431
-2120
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ extern int amdgpu_pos_buf_per_se;
110110
extern int amdgpu_cntl_sb_buf_per_se;
111111
extern int amdgpu_param_buf_per_se;
112112

113+
#define AMDGPU_DEFAULT_GTT_SIZE_MB 3072ULL /* 3GB by default */
113114
#define AMDGPU_WAIT_IDLE_TIMEOUT_IN_MS 3000
114115
#define AMDGPU_MAX_USEC_TIMEOUT 100000 /* 100 ms */
115116
#define AMDGPU_FENCE_JIFFIES_TIMEOUT (HZ / 2)
@@ -966,6 +967,8 @@ struct amdgpu_gfx_config {
966967
unsigned mc_arb_ramcfg;
967968
unsigned gb_addr_config;
968969
unsigned num_rbs;
970+
unsigned gs_vgt_table_depth;
971+
unsigned gs_prim_buffer_depth;
969972

970973
uint32_t tile_mode_array[32];
971974
uint32_t macrotile_mode_array[16];
@@ -980,6 +983,7 @@ struct amdgpu_gfx_config {
980983
struct amdgpu_cu_info {
981984
uint32_t number; /* total active CU number */
982985
uint32_t ao_cu_mask;
986+
uint32_t wave_front_size;
983987
uint32_t bitmap[4][4];
984988
};
985989

@@ -1000,10 +1004,10 @@ struct amdgpu_ngg_buf {
10001004
};
10011005

10021006
enum {
1003-
PRIM = 0,
1004-
POS,
1005-
CNTL,
1006-
PARAM,
1007+
NGG_PRIM = 0,
1008+
NGG_POS,
1009+
NGG_CNTL,
1010+
NGG_PARAM,
10071011
NGG_BUF_MAX
10081012
};
10091013

@@ -1125,6 +1129,7 @@ struct amdgpu_job {
11251129
void *owner;
11261130
uint64_t fence_ctx; /* the fence_context this job uses */
11271131
bool vm_needs_flush;
1132+
bool need_pipeline_sync;
11281133
unsigned vm_id;
11291134
uint64_t vm_pd_addr;
11301135
uint32_t gds_base, gds_size;
@@ -1704,9 +1709,6 @@ void amdgpu_mm_wdoorbell64(struct amdgpu_device *adev, u32 index, u64 v);
17041709
#define WREG32_FIELD_OFFSET(reg, offset, field, val) \
17051710
WREG32(mm##reg + offset, (RREG32(mm##reg + offset) & ~REG_FIELD_MASK(reg, field)) | (val) << REG_FIELD_SHIFT(reg, field))
17061711

1707-
#define WREG32_FIELD15(ip, idx, reg, field, val) \
1708-
WREG32(SOC15_REG_OFFSET(ip, idx, mm##reg), (RREG32(SOC15_REG_OFFSET(ip, idx, mm##reg)) & ~REG_FIELD_MASK(reg, field)) | (val) << REG_FIELD_SHIFT(reg, field))
1709-
17101712
/*
17111713
* BIOS helpers.
17121714
*/

drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,6 +1727,12 @@ void amdgpu_atombios_scratch_regs_restore(struct amdgpu_device *adev)
17271727
{
17281728
int i;
17291729

1730+
/*
1731+
* VBIOS will check ASIC_INIT_COMPLETE bit to decide if
1732+
* execute ASIC_Init posting via driver
1733+
*/
1734+
adev->bios_scratch[7] &= ~ATOM_S7_ASIC_INIT_COMPLETE_MASK;
1735+
17301736
for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++)
17311737
WREG32(mmBIOS_SCRATCH_0 + i, adev->bios_scratch[i]);
17321738
}

drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "atomfirmware.h"
2727
#include "amdgpu_atomfirmware.h"
2828
#include "atom.h"
29+
#include "atombios.h"
2930

3031
#define get_index_into_master_table(master_table, table_name) (offsetof(struct master_table, table_name) / sizeof(uint16_t))
3132

@@ -77,10 +78,29 @@ void amdgpu_atomfirmware_scratch_regs_restore(struct amdgpu_device *adev)
7778
{
7879
int i;
7980

81+
/*
82+
* VBIOS will check ASIC_INIT_COMPLETE bit to decide if
83+
* execute ASIC_Init posting via driver
84+
*/
85+
adev->bios_scratch[7] &= ~ATOM_S7_ASIC_INIT_COMPLETE_MASK;
86+
8087
for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++)
8188
WREG32(adev->bios_scratch_reg_offset + i, adev->bios_scratch[i]);
8289
}
8390

91+
void amdgpu_atomfirmware_scratch_regs_engine_hung(struct amdgpu_device *adev,
92+
bool hung)
93+
{
94+
u32 tmp = RREG32(adev->bios_scratch_reg_offset + 3);
95+
96+
if (hung)
97+
tmp |= ATOM_S3_ASIC_GUI_ENGINE_HUNG;
98+
else
99+
tmp &= ~ATOM_S3_ASIC_GUI_ENGINE_HUNG;
100+
101+
WREG32(adev->bios_scratch_reg_offset + 3, tmp);
102+
}
103+
84104
int amdgpu_atomfirmware_allocate_fb_scratch(struct amdgpu_device *adev)
85105
{
86106
struct atom_context *ctx = adev->mode_info.atom_context;

drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ bool amdgpu_atomfirmware_gpu_supports_virtualization(struct amdgpu_device *adev)
2828
void amdgpu_atomfirmware_scratch_regs_init(struct amdgpu_device *adev);
2929
void amdgpu_atomfirmware_scratch_regs_save(struct amdgpu_device *adev);
3030
void amdgpu_atomfirmware_scratch_regs_restore(struct amdgpu_device *adev);
31+
void amdgpu_atomfirmware_scratch_regs_engine_hung(struct amdgpu_device *adev,
32+
bool hung);
3133
int amdgpu_atomfirmware_allocate_fb_scratch(struct amdgpu_device *adev);
3234

3335
#endif

drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,26 +117,27 @@ static void amdgpu_benchmark_move(struct amdgpu_device *adev, unsigned size,
117117
}
118118

119119
out_cleanup:
120+
/* Check error value now. The value can be overwritten when clean up.*/
121+
if (r) {
122+
DRM_ERROR("Error while benchmarking BO move.\n");
123+
}
124+
120125
if (sobj) {
121-
r = amdgpu_bo_reserve(sobj, false);
126+
r = amdgpu_bo_reserve(sobj, true);
122127
if (likely(r == 0)) {
123128
amdgpu_bo_unpin(sobj);
124129
amdgpu_bo_unreserve(sobj);
125130
}
126131
amdgpu_bo_unref(&sobj);
127132
}
128133
if (dobj) {
129-
r = amdgpu_bo_reserve(dobj, false);
134+
r = amdgpu_bo_reserve(dobj, true);
130135
if (likely(r == 0)) {
131136
amdgpu_bo_unpin(dobj);
132137
amdgpu_bo_unreserve(dobj);
133138
}
134139
amdgpu_bo_unref(&dobj);
135140
}
136-
137-
if (r) {
138-
DRM_ERROR("Error while benchmarking BO move.\n");
139-
}
140141
}
141142

142143
void amdgpu_benchmark(struct amdgpu_device *adev, int test_number)

0 commit comments

Comments
 (0)