Skip to content

Commit 75cb60d

Browse files
konradybciorobclark
authored andcommitted
drm/msm/a6xx: Fix unknown speedbin case
When opp-supported-hw is present under an OPP node, but no form of opp_set_supported_hw() has been called, that OPP is ignored by the API and marked as unsupported. Before Commit c928a05 ("drm/msm/adreno: Move speedbin mapping to device table"), an unknown speedbin would result in marking all OPPs as available, but it's better to avoid potentially overclocking the silicon - the GMU will simply refuse to power up the chip. Currently, the Adreno speedbin code does just that (AND returns an invalid error, (int)UINT_MAX). Fix that by defaulting to speedbin 0 (which is conveniently always bound to fuseval == 0). Fixes: c928a05 ("drm/msm/adreno: Move speedbin mapping to device table") Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/559604/ Signed-off-by: Rob Clark <robdclark@chromium.org>
1 parent beb3542 commit 75cb60d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2730,7 +2730,7 @@ static int a6xx_set_supported_hw(struct device *dev, const struct adreno_info *i
27302730
DRM_DEV_ERROR(dev,
27312731
"missing support for speed-bin: %u. Some OPPs may not be supported by hardware\n",
27322732
speedbin);
2733-
return UINT_MAX;
2733+
supp_hw = BIT(0); /* Default */
27342734
}
27352735

27362736
ret = devm_pm_opp_set_supported_hw(dev, &supp_hw, 1);

0 commit comments

Comments
 (0)