File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -43,12 +43,18 @@ static char *ivpu_firmware;
43
43
module_param_named_unsafe (firmware , ivpu_firmware , charp , 0644 );
44
44
MODULE_PARM_DESC (firmware , "VPU firmware binary in /lib/firmware/.." );
45
45
46
+ /* TODO: Remove mtl_vpu.bin from names after transition to generation based FW names */
47
+ static struct {
48
+ int gen ;
49
+ const char * name ;
50
+ } fw_names [] = {
51
+ { IVPU_HW_37XX , "vpu_37xx.bin" },
52
+ { IVPU_HW_37XX , "mtl_vpu.bin" },
53
+ { IVPU_HW_37XX , "intel/vpu/vpu_37xx_v0.0.bin" },
54
+ };
55
+
46
56
static int ivpu_fw_request (struct ivpu_device * vdev )
47
57
{
48
- static const char * const fw_names [] = {
49
- "mtl_vpu.bin" ,
50
- "intel/vpu/mtl_vpu_v0.0.bin"
51
- };
52
58
int ret = - ENOENT ;
53
59
int i ;
54
60
@@ -60,9 +66,12 @@ static int ivpu_fw_request(struct ivpu_device *vdev)
60
66
}
61
67
62
68
for (i = 0 ; i < ARRAY_SIZE (fw_names ); i ++ ) {
63
- ret = firmware_request_nowarn (& vdev -> fw -> file , fw_names [i ], vdev -> drm .dev );
69
+ if (fw_names [i ].gen != ivpu_hw_gen (vdev ))
70
+ continue ;
71
+
72
+ ret = firmware_request_nowarn (& vdev -> fw -> file , fw_names [i ].name , vdev -> drm .dev );
64
73
if (!ret ) {
65
- vdev -> fw -> name = fw_names [i ];
74
+ vdev -> fw -> name = fw_names [i ]. name ;
66
75
return 0 ;
67
76
}
68
77
}
You can’t perform that action at this time.
0 commit comments