Skip to content

Commit 5745d64

Browse files
committed
Merge tag 'amd-drm-next-5.14-2021-06-02' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
amd-drm-next-5.14-2021-06-02: amdgpu: - GC/MM register access macro clean up for SR-IOV - Beige Goby updates - W=1 Fixes - Aldebaran fixes - Misc display fixes - ACPI ATCS/ATIF handling rework - SR-IOV fixes - RAS fixes - 16bpc fixed point format support - Initial smartshift support - RV/PCO power tuning fixes for suspend/resume - More buffer object subclassing work - Add new INFO query for additional vbios information - Add new placement for preemptable SG buffers amdkfd: - Misc fixes radeon: - W=1 Fixes - Misc cleanups UAPI: - Add new INFO query for additional vbios information Useful for debugging vbios related issues. Proposed umr patch: https://patchwork.freedesktop.org/patch/433297/ - 16bpc fixed point format support IGT test: https://lists.freedesktop.org/archives/igt-dev/2021-May/031507.html Proposed Vulkan patch: kleinerm/pal@a25d480 - Add a new GEM flag which is only used internally in the kernel driver. Userspace is not allowed to set it. drm: - 16bpc fixed point format fourcc Signed-off-by: Dave Airlie <[email protected]> From: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents ccd1950 + 7d9c70d commit 5745d64

File tree

164 files changed

+2705
-1498
lines changed

Some content is hidden

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

164 files changed

+2705
-1498
lines changed

drivers/gpu/drm/amd/amdgpu/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ amdgpu-y += amdgpu_device.o amdgpu_kms.o \
5151
atombios_encoders.o amdgpu_sa.o atombios_i2c.o \
5252
amdgpu_dma_buf.o amdgpu_vm.o amdgpu_ib.o amdgpu_pll.o \
5353
amdgpu_ucode.o amdgpu_bo_list.o amdgpu_ctx.o amdgpu_sync.o \
54-
amdgpu_gtt_mgr.o amdgpu_vram_mgr.o amdgpu_virt.o amdgpu_atomfirmware.o \
55-
amdgpu_vf_error.o amdgpu_sched.o amdgpu_debugfs.o amdgpu_ids.o \
56-
amdgpu_gmc.o amdgpu_mmhub.o amdgpu_xgmi.o amdgpu_csa.o amdgpu_ras.o amdgpu_vm_cpu.o \
54+
amdgpu_gtt_mgr.o amdgpu_preempt_mgr.o amdgpu_vram_mgr.o amdgpu_virt.o \
55+
amdgpu_atomfirmware.o amdgpu_vf_error.o amdgpu_sched.o \
56+
amdgpu_debugfs.o amdgpu_ids.o amdgpu_gmc.o amdgpu_mmhub.o \
57+
amdgpu_xgmi.o amdgpu_csa.o amdgpu_ras.o amdgpu_vm_cpu.o \
5758
amdgpu_vm_sdma.o amdgpu_discovery.o amdgpu_ras_eeprom.o amdgpu_nbio.o \
5859
amdgpu_umc.o smu_v11_0_i2c.o amdgpu_fru_eeprom.o amdgpu_rap.o \
5960
amdgpu_fw_attestation.o amdgpu_securedisplay.o amdgpu_hdp.o

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ static int aldebaran_mode2_restore_ip(struct amdgpu_device *adev)
227227
break;
228228
default:
229229
break;
230-
};
230+
}
231231
}
232232

233233
/* Reinit NBIF block */

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

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@ struct amdgpu_mgpu_info
130130
bool pending_reset;
131131
};
132132

133+
enum amdgpu_ss {
134+
AMDGPU_SS_DRV_LOAD,
135+
AMDGPU_SS_DEV_D0,
136+
AMDGPU_SS_DEV_D3,
137+
AMDGPU_SS_DRV_UNLOAD
138+
};
139+
133140
struct amdgpu_watchdog_timer
134141
{
135142
bool timeout_fatal_disable;
@@ -268,7 +275,6 @@ struct amdgpu_job;
268275
struct amdgpu_irq_src;
269276
struct amdgpu_fpriv;
270277
struct amdgpu_bo_va_mapping;
271-
struct amdgpu_atif;
272278
struct kfd_vm_fault_info;
273279
struct amdgpu_hive_info;
274280
struct amdgpu_reset_context;
@@ -682,20 +688,6 @@ struct amdgpu_vram_scratch {
682688
u64 gpu_addr;
683689
};
684690

685-
/*
686-
* ACPI
687-
*/
688-
struct amdgpu_atcs_functions {
689-
bool get_ext_state;
690-
bool pcie_perf_req;
691-
bool pcie_dev_rdy;
692-
bool pcie_bus_width;
693-
};
694-
695-
struct amdgpu_atcs {
696-
struct amdgpu_atcs_functions functions;
697-
};
698-
699691
/*
700692
* CGS
701693
*/
@@ -825,8 +817,6 @@ struct amdgpu_device {
825817
struct notifier_block acpi_nb;
826818
struct amdgpu_i2c_chan *i2c_bus[AMDGPU_MAX_I2C_BUS];
827819
struct debugfs_blob_wrapper debugfs_vbios_blob;
828-
struct amdgpu_atif *atif;
829-
struct amdgpu_atcs atcs;
830820
struct mutex srbm_mutex;
831821
/* GRBM index mutex. Protects concurrent access to GRBM index */
832822
struct mutex grbm_idx_mutex;
@@ -1146,6 +1136,7 @@ int emu_soc_asic_init(struct amdgpu_device *adev);
11461136
* Registers read & write functions.
11471137
*/
11481138
#define AMDGPU_REGS_NO_KIQ (1<<1)
1139+
#define AMDGPU_REGS_RLC (1<<2)
11491140

11501141
#define RREG32_NO_KIQ(reg) amdgpu_device_rreg(adev, (reg), AMDGPU_REGS_NO_KIQ)
11511142
#define WREG32_NO_KIQ(reg, v) amdgpu_device_wreg(adev, (reg), (v), AMDGPU_REGS_NO_KIQ)
@@ -1282,6 +1273,7 @@ int amdgpu_device_mode1_reset(struct amdgpu_device *adev);
12821273
bool amdgpu_device_supports_atpx(struct drm_device *dev);
12831274
bool amdgpu_device_supports_px(struct drm_device *dev);
12841275
bool amdgpu_device_supports_boco(struct drm_device *dev);
1276+
bool amdgpu_device_supports_smart_shift(struct drm_device *dev);
12851277
bool amdgpu_device_supports_baco(struct drm_device *dev);
12861278
bool amdgpu_device_is_peer_accessible(struct amdgpu_device *adev,
12871279
struct amdgpu_device *peer_adev);
@@ -1356,21 +1348,38 @@ struct amdgpu_afmt_acr {
13561348
struct amdgpu_afmt_acr amdgpu_afmt_acr(uint32_t clock);
13571349

13581350
/* amdgpu_acpi.c */
1351+
1352+
/* ATCS Device/Driver State */
1353+
#define AMDGPU_ATCS_PSC_DEV_STATE_D0 0
1354+
#define AMDGPU_ATCS_PSC_DEV_STATE_D3_HOT 3
1355+
#define AMDGPU_ATCS_PSC_DRV_STATE_OPR 0
1356+
#define AMDGPU_ATCS_PSC_DRV_STATE_NOT_OPR 1
1357+
13591358
#if defined(CONFIG_ACPI)
13601359
int amdgpu_acpi_init(struct amdgpu_device *adev);
13611360
void amdgpu_acpi_fini(struct amdgpu_device *adev);
13621361
bool amdgpu_acpi_is_pcie_performance_request_supported(struct amdgpu_device *adev);
1362+
bool amdgpu_acpi_is_power_shift_control_supported(void);
13631363
int amdgpu_acpi_pcie_performance_request(struct amdgpu_device *adev,
13641364
u8 perf_req, bool advertise);
1365+
int amdgpu_acpi_power_shift_control(struct amdgpu_device *adev,
1366+
u8 dev_state, bool drv_state);
1367+
int amdgpu_acpi_smart_shift_update(struct drm_device *dev, enum amdgpu_ss ss_state);
13651368
int amdgpu_acpi_pcie_notify_device_ready(struct amdgpu_device *adev);
13661369

1367-
void amdgpu_acpi_get_backlight_caps(struct amdgpu_device *adev,
1368-
struct amdgpu_dm_backlight_caps *caps);
1370+
void amdgpu_acpi_get_backlight_caps(struct amdgpu_dm_backlight_caps *caps);
13691371
bool amdgpu_acpi_is_s0ix_supported(struct amdgpu_device *adev);
1372+
void amdgpu_acpi_detect(void);
13701373
#else
13711374
static inline int amdgpu_acpi_init(struct amdgpu_device *adev) { return 0; }
13721375
static inline void amdgpu_acpi_fini(struct amdgpu_device *adev) { }
13731376
static inline bool amdgpu_acpi_is_s0ix_supported(struct amdgpu_device *adev) { return false; }
1377+
static inline void amdgpu_acpi_detect(void) { }
1378+
static inline bool amdgpu_acpi_is_power_shift_control_supported(void) { return false; }
1379+
static inline int amdgpu_acpi_power_shift_control(struct amdgpu_device *adev,
1380+
u8 dev_state, bool drv_state) { return 0; }
1381+
static inline int amdgpu_acpi_smart_shift_update(struct drm_device *dev,
1382+
enum amdgpu_ss ss_state) { return 0; }
13741383
#endif
13751384

13761385
int amdgpu_cs_find_mapping(struct amdgpu_cs_parser *parser,

0 commit comments

Comments
 (0)