aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3529-drm-amdgpu-Fix-none-powerplay-issue-when-load-driver.patch
blob: f68cc4c23282a806d1251d231e57bec58a204fac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 56ee0f9d6f5da1c2370b7609f6c7e7cfe748d31c Mon Sep 17 00:00:00 2001
From: Shaoyun Liu <Shaoyun.Liu@amd.com>
Date: Mon, 5 Feb 2018 16:41:33 -0500
Subject: [PATCH 3529/4131] drm/amdgpu: Fix none-powerplay issue when load
 driver on emulation mode

On emulation mode , driver will be loaded with powerplay disabled

Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Kalyan Alle <kalyan.alle@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 1aab1a3..99bbfac 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1416,6 +1416,9 @@ static bool amdgpu_device_check_vram_lost(struct amdgpu_device *adev)
 static int amdgpu_device_ip_late_set_cg_state(struct amdgpu_device *adev)
 {
 	int i = 0, r;
+	
+	if (amdgpu_emu_mode == 1)
+		return 0;
 
 	for (i = 0; i < adev->num_ip_blocks; i++) {
 		if (!adev->ip_blocks[i].status.valid)
-- 
2.7.4