File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
drivers/gpu/drm/amd/amdgpu Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1320,6 +1320,15 @@ static int amdgpu_discovery_reg_base_init(struct amdgpu_device *adev)
1320
1320
}
1321
1321
}
1322
1322
1323
+ if (le16_to_cpu (ip -> hw_id ) == VPE_HWID ) {
1324
+ if (adev -> vpe .num_instances < AMDGPU_MAX_VPE_INSTANCES )
1325
+ adev -> vpe .num_instances ++ ;
1326
+ else
1327
+ dev_err (adev -> dev , "Too many VPE instances: %d vs %d\n" ,
1328
+ adev -> vpe .num_instances + 1 ,
1329
+ AMDGPU_MAX_VPE_INSTANCES );
1330
+ }
1331
+
1323
1332
if (le16_to_cpu (ip -> hw_id ) == UMC_HWID ) {
1324
1333
adev -> gmc .num_umc ++ ;
1325
1334
adev -> umc .node_inst_num ++ ;
Original file line number Diff line number Diff line change 27
27
#include "amdgpu_irq.h"
28
28
#include "vpe_6_1_fw_if.h"
29
29
30
+ #define AMDGPU_MAX_VPE_INSTANCES 2
31
+
30
32
struct amdgpu_vpe ;
31
33
32
34
struct vpe_funcs {
@@ -74,6 +76,8 @@ struct amdgpu_vpe {
74
76
uint32_t * cmdbuf_cpu_addr ;
75
77
struct delayed_work idle_work ;
76
78
bool context_started ;
79
+
80
+ uint32_t num_instances ;
77
81
};
78
82
79
83
int amdgpu_vpe_psp_update_sram (struct amdgpu_device * adev );
You can’t perform that action at this time.
0 commit comments