Skip to content

Commit 8a86b00

Browse files
committed
Merge tag 'drm-next-5.5-2019-11-01' of git://people.freedesktop.org/~agd5f/linux into drm-next
drm-next-5.5-2019-11-01: amdgpu: - Add EEPROM support for Arcturus - Enable VCN encode support for Arcturus - Misc PSP fixes - Misc DC fixes - swSMU cleanup amdkfd: - Misc cleanups - Fix typo in cu bitmap parsing Signed-off-by: Dave Airlie <[email protected]> From: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 2ef4144 + 5ab5e4e commit 8a86b00

File tree

100 files changed

+3131
-1153
lines changed

Some content is hidden

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

100 files changed

+3131
-1153
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ struct amdgpu_mgpu_info
107107
uint32_t num_apu;
108108
};
109109

110-
#define AMDGPU_MAX_TIMEOUT_PARAM_LENTH 256
110+
#define AMDGPU_MAX_TIMEOUT_PARAM_LENGTH 256
111111

112112
/*
113113
* Modules parameters.
@@ -125,7 +125,7 @@ extern int amdgpu_disp_priority;
125125
extern int amdgpu_hw_i2c;
126126
extern int amdgpu_pcie_gen2;
127127
extern int amdgpu_msi;
128-
extern char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENTH];
128+
extern char amdgpu_lockup_timeout[AMDGPU_MAX_TIMEOUT_PARAM_LENGTH];
129129
extern int amdgpu_dpm;
130130
extern int amdgpu_fw_load_type;
131131
extern int amdgpu_aspm;
@@ -139,6 +139,7 @@ extern int amdgpu_vm_fragment_size;
139139
extern int amdgpu_vm_fault_stop;
140140
extern int amdgpu_vm_debug;
141141
extern int amdgpu_vm_update_mode;
142+
extern int amdgpu_exp_hw_support;
142143
extern int amdgpu_dc;
143144
extern int amdgpu_sched_jobs;
144145
extern int amdgpu_sched_hw_submission;

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,6 @@ void amdgpu_amdkfd_device_init(struct amdgpu_device *adev)
130130
adev->gfx.mec.queue_bitmap,
131131
KGD_MAX_QUEUES);
132132

133-
/* remove the KIQ bit as well */
134-
if (adev->gfx.kiq.ring.sched.ready)
135-
clear_bit(amdgpu_gfx_mec_queue_to_bit(adev,
136-
adev->gfx.kiq.ring.me - 1,
137-
adev->gfx.kiq.ring.pipe,
138-
adev->gfx.kiq.ring.queue),
139-
gpu_resources.queue_bitmap);
140-
141133
/* According to linux/bitmap.h we shouldn't use bitmap_clear if
142134
* nbits is not compile time constant
143135
*/

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2020
* OTHER DEALINGS IN THE SOFTWARE.
2121
*/
22-
23-
#undef pr_fmt
24-
#define pr_fmt(fmt) "kfd2kgd: " fmt
25-
2622
#include <linux/module.h>
2723
#include <linux/fdtable.h>
2824
#include <linux/uaccess.h>

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2020
* OTHER DEALINGS IN THE SOFTWARE.
2121
*/
22-
#undef pr_fmt
23-
#define pr_fmt(fmt) "kfd2kgd: " fmt
24-
2522
#include <linux/mmu_context.h>
2623
#include "amdgpu.h"
2724
#include "amdgpu_amdkfd.h"

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2020
* OTHER DEALINGS IN THE SOFTWARE.
2121
*/
22-
23-
#define pr_fmt(fmt) "kfd2kgd: " fmt
24-
2522
#include <linux/mmu_context.h>
2623

2724
#include "amdgpu.h"

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2020
* OTHER DEALINGS IN THE SOFTWARE.
2121
*/
22-
23-
#define pr_fmt(fmt) "kfd2kgd: " fmt
24-
2522
#include <linux/dma-buf.h>
2623
#include <linux/list.h>
2724
#include <linux/pagemap.h>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,8 +1089,8 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev)
10891089
{
10901090
adev->debugfs_preempt =
10911091
debugfs_create_file("amdgpu_preempt_ib", 0600,
1092-
adev->ddev->primary->debugfs_root,
1093-
(void *)adev, &fops_ib_preempt);
1092+
adev->ddev->primary->debugfs_root, adev,
1093+
&fops_ib_preempt);
10941094
if (!(adev->debugfs_preempt)) {
10951095
DRM_ERROR("unable to create amdgpu_preempt_ib debugsfs file\n");
10961096
return -EIO;

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

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1877,6 +1877,19 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)
18771877
if (r)
18781878
goto init_failed;
18791879

1880+
/*
1881+
* retired pages will be loaded from eeprom and reserved here,
1882+
* it should be called after amdgpu_device_ip_hw_init_phase2 since
1883+
* for some ASICs the RAS EEPROM code relies on SMU fully functioning
1884+
* for I2C communication which only true at this point.
1885+
* recovery_init may fail, but it can free all resources allocated by
1886+
* itself and its failure should not stop amdgpu init process.
1887+
*
1888+
* Note: theoretically, this should be called before all vram allocations
1889+
* to protect retired page from abusing
1890+
*/
1891+
amdgpu_ras_recovery_init(adev);
1892+
18801893
if (adev->gmc.xgmi.num_physical_nodes > 1)
18811894
amdgpu_xgmi_add_device(adev);
18821895
amdgpu_amdkfd_device_init(adev);
@@ -2258,6 +2271,12 @@ static int amdgpu_device_ip_suspend_phase2(struct amdgpu_device *adev)
22582271
/* displays are handled in phase1 */
22592272
if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_DCE)
22602273
continue;
2274+
/* PSP lost connection when err_event_athub occurs */
2275+
if (amdgpu_ras_intr_triggered() &&
2276+
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_PSP) {
2277+
adev->ip_blocks[i].status.hw = false;
2278+
continue;
2279+
}
22612280
/* XXX handle errors */
22622281
r = adev->ip_blocks[i].version->funcs->suspend(adev);
22632282
/* XXX handle errors */
@@ -2615,9 +2634,9 @@ static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev)
26152634
else
26162635
adev->compute_timeout = MAX_SCHEDULE_TIMEOUT;
26172636

2618-
if (strnlen(input, AMDGPU_MAX_TIMEOUT_PARAM_LENTH)) {
2637+
if (strnlen(input, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH)) {
26192638
while ((timeout_setting = strsep(&input, ",")) &&
2620-
strnlen(timeout_setting, AMDGPU_MAX_TIMEOUT_PARAM_LENTH)) {
2639+
strnlen(timeout_setting, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH)) {
26212640
ret = kstrtol(timeout_setting, 0, &timeout);
26222641
if (ret)
26232642
return ret;

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,8 @@ int amdgpu_dpm_get_sclk(struct amdgpu_device *adev, bool low)
911911
if (is_support_sw_smu(adev)) {
912912
ret = smu_get_dpm_freq_range(&adev->smu, SMU_GFXCLK,
913913
low ? &clk_freq : NULL,
914-
!low ? &clk_freq : NULL);
914+
!low ? &clk_freq : NULL,
915+
true);
915916
if (ret)
916917
return 0;
917918
return clk_freq * 100;
@@ -928,7 +929,8 @@ int amdgpu_dpm_get_mclk(struct amdgpu_device *adev, bool low)
928929
if (is_support_sw_smu(adev)) {
929930
ret = smu_get_dpm_freq_range(&adev->smu, SMU_UCLK,
930931
low ? &clk_freq : NULL,
931-
!low ? &clk_freq : NULL);
932+
!low ? &clk_freq : NULL,
933+
true);
932934
if (ret)
933935
return 0;
934936
return clk_freq * 100;

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -298,12 +298,6 @@ enum amdgpu_pcie_gen {
298298
#define amdgpu_dpm_get_current_power_state(adev) \
299299
((adev)->powerplay.pp_funcs->get_current_power_state((adev)->powerplay.pp_handle))
300300

301-
#define amdgpu_smu_get_current_power_state(adev) \
302-
((adev)->smu.ppt_funcs->get_current_power_state(&((adev)->smu)))
303-
304-
#define amdgpu_smu_set_power_state(adev) \
305-
((adev)->smu.ppt_funcs->set_power_state(&((adev)->smu)))
306-
307301
#define amdgpu_dpm_get_pp_num_states(adev, data) \
308302
((adev)->powerplay.pp_funcs->get_pp_num_states((adev)->powerplay.pp_handle, data))
309303

0 commit comments

Comments
 (0)