Skip to content

Commit 3522b4b

Browse files
committed
drm/msm: allow zapfw to not be specified in gpulist
For newer devices we want to require the path to come from the firmware-name property in the zap-shader dt node. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jordan Crouse <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]>
1 parent 6a0dea0 commit 3522b4b

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

drivers/gpu/drm/msm/adreno/adreno_gpu.c

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,21 @@ static int zap_shader_load_mdt(struct msm_gpu *gpu, const char *fwname,
7979
ret = request_firmware_direct(&fw, fwname, gpu->dev->dev);
8080
if (ret)
8181
fw = ERR_PTR(ret);
82-
} else {
82+
} else if (fwname) {
8383
/* Request the MDT file from the default location: */
8484
fw = adreno_request_fw(to_adreno_gpu(gpu), fwname);
85+
} else {
86+
/*
87+
* For new targets, we require the firmware-name property,
88+
* if a zap-shader is required, rather than falling back
89+
* to a firmware name specified in gpulist.
90+
*
91+
* Because the firmware is signed with a (potentially)
92+
* device specific key, having the name come from gpulist
93+
* was a bad idea, and is only provided for backwards
94+
* compatibility for older targets.
95+
*/
96+
return -ENODEV;
8597
}
8698

8799
if (IS_ERR(fw)) {
@@ -170,14 +182,6 @@ int adreno_zap_shader_load(struct msm_gpu *gpu, u32 pasid)
170182
return -EPROBE_DEFER;
171183
}
172184

173-
/* Each GPU has a target specific zap shader firmware name to use */
174-
if (!adreno_gpu->info->zapfw) {
175-
zap_available = false;
176-
DRM_DEV_ERROR(&pdev->dev,
177-
"Zap shader firmware file not specified for this target\n");
178-
return -ENODEV;
179-
}
180-
181185
return zap_shader_load_mdt(gpu, adreno_gpu->info->zapfw, pasid);
182186
}
183187

0 commit comments

Comments
 (0)