Message ID | 20250109-gpu-acd-v4-4-08a5efaf4a23@quicinc.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Support for GPU ACD feature on Adreno X1-85 | expand |
On 8.01.2025 9:40 PM, Akhil P Oommen wrote: > Add a module param to disable ACD which will help to quickly rule it > out for any GPU issues. > > Signed-off-by: Akhil P Oommen <quic_akhilpo@quicinc.com> > --- > drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 7 +++++++ > drivers/gpu/drm/msm/adreno/adreno_device.c | 4 ++++ > 2 files changed, 11 insertions(+) > > diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c > index 1f213a0fc61b..ce08eed572c8 100644 > --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c > +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c > @@ -1475,6 +1475,13 @@ static int a6xx_gmu_acd_probe(struct a6xx_gmu *gmu) > struct adreno_gpu *adreno_gpu = &a6xx_gpu->base; > struct msm_gpu *gpu = &adreno_gpu->base; > int ret, i, cmd_idx = 0; > + extern bool disable_acd; > + > + /* Skip ACD probe if requested via module param */ > + if (disable_acd) { > + DRM_DEV_ERROR(gmu->dev, "Skipping GPU ACD probe\n"); > + return 0; > + } > > cmd->version = 1; > cmd->stride = 1; > diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c > index 236b25c094cd..f4552b8c6767 100644 > --- a/drivers/gpu/drm/msm/adreno/adreno_device.c > +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c > @@ -24,6 +24,10 @@ int enable_preemption = -1; > MODULE_PARM_DESC(enable_preemption, "Enable preemption (A7xx only) (1=on , 0=disable, -1=auto (default))"); > module_param(enable_preemption, int, 0600); > > +bool disable_acd; > +MODULE_PARM_DESC(disable_acd, "Forcefully disable GPU ACD"); > +module_param_unsafe(disable_acd, bool, 0600); IIUC 0600 makes it sysfs-writeable, which we don't want, as it takes effect during probe (meaning booting with =0 and writing 1 later on has no effect) Konrad
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c index 1f213a0fc61b..ce08eed572c8 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c @@ -1475,6 +1475,13 @@ static int a6xx_gmu_acd_probe(struct a6xx_gmu *gmu) struct adreno_gpu *adreno_gpu = &a6xx_gpu->base; struct msm_gpu *gpu = &adreno_gpu->base; int ret, i, cmd_idx = 0; + extern bool disable_acd; + + /* Skip ACD probe if requested via module param */ + if (disable_acd) { + DRM_DEV_ERROR(gmu->dev, "Skipping GPU ACD probe\n"); + return 0; + } cmd->version = 1; cmd->stride = 1; diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c index 236b25c094cd..f4552b8c6767 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_device.c +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c @@ -24,6 +24,10 @@ int enable_preemption = -1; MODULE_PARM_DESC(enable_preemption, "Enable preemption (A7xx only) (1=on , 0=disable, -1=auto (default))"); module_param(enable_preemption, int, 0600); +bool disable_acd; +MODULE_PARM_DESC(disable_acd, "Forcefully disable GPU ACD"); +module_param_unsafe(disable_acd, bool, 0600); + extern const struct adreno_gpulist a2xx_gpulist; extern const struct adreno_gpulist a3xx_gpulist; extern const struct adreno_gpulist a4xx_gpulist;
Add a module param to disable ACD which will help to quickly rule it out for any GPU issues. Signed-off-by: Akhil P Oommen <quic_akhilpo@quicinc.com> --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 7 +++++++ drivers/gpu/drm/msm/adreno/adreno_device.c | 4 ++++ 2 files changed, 11 insertions(+)