From 94fe0605d4043c3a84d3532014424df987f896c2 Mon Sep 17 00:00:00 2001 From: SENEMOS patch gate Date: Tue, 15 Sep 2026 21:53:27 +0300 Subject: [PATCH] drm/msm: request legacy GPU regulators as optional Modern Adreno platforms power the GPU through GMU power domains and may omit the legacy vdd and vddcx supplies. Treat only their documented absence as valid while continuing to propagate probe deferral and regulator errors. Signed-off-by: SENEMOS patch gate --- drivers/gpu/drm/msm/msm_gpu.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c index 6437ff471..da10f46cc 100644 --- a/drivers/gpu/drm/msm/msm_gpu.c +++ b/drivers/gpu/drm/msm/msm_gpu.c @@ -951,16 +951,28 @@ int msm_gpu_init(struct drm_device *drm, struct platform_device *pdev, if (IS_ERR(gpu->ebi1_clk)) gpu->ebi1_clk = NULL; - /* Acquire regulators: */ - gpu->gpu_reg = devm_regulator_get(&pdev->dev, "vdd"); + /* + * Regulators are a legacy, optional power path. Modern Adreno platforms + * with a GMU describe power domains instead and intentionally have no + * vdd/vddcx supplies on the GPU node. + */ + gpu->gpu_reg = devm_regulator_get_optional(&pdev->dev, "vdd"); DBG("gpu_reg: %p", gpu->gpu_reg); - if (IS_ERR(gpu->gpu_reg)) + if (PTR_ERR(gpu->gpu_reg) == -ENODEV) { gpu->gpu_reg = NULL; + } else if (IS_ERR(gpu->gpu_reg)) { + ret = PTR_ERR(gpu->gpu_reg); + goto fail; + } - gpu->gpu_cx = devm_regulator_get(&pdev->dev, "vddcx"); + gpu->gpu_cx = devm_regulator_get_optional(&pdev->dev, "vddcx"); DBG("gpu_cx: %p", gpu->gpu_cx); - if (IS_ERR(gpu->gpu_cx)) + if (PTR_ERR(gpu->gpu_cx) == -ENODEV) { gpu->gpu_cx = NULL; + } else if (IS_ERR(gpu->gpu_cx)) { + ret = PTR_ERR(gpu->gpu_cx); + goto fail; + } platform_set_drvdata(pdev, &gpu->adreno_smmu); -- 2.55.0