During bringup of a new GPU support, it is convenient to have knob to
quickly disable GPU, but keep the display support. This helps to
fallback to 'kms_swrast' in case of bootup issues due to GPU. Add a
modparam to support this.
Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
---
drivers/gpu/drm/msm/adreno/adreno_device.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
index 50945bfe9b4992118f23db3cd17ac348be9f9c9d..28f744f3caf7c59412aab06f912cd09a01e185ea 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_device.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
@@ -24,6 +24,10 @@ bool disable_acd;
MODULE_PARM_DESC(disable_acd, "Forcefully disable GPU ACD");
module_param_unsafe(disable_acd, bool, 0400);
+static bool skip_gpu;
+MODULE_PARM_DESC(no_gpu, "Disable GPU driver register (0=enable GPU driver register (default), 1=skip GPU driver register");
+module_param(skip_gpu, bool, 0400);
+
extern const struct adreno_gpulist a2xx_gpulist;
extern const struct adreno_gpulist a3xx_gpulist;
extern const struct adreno_gpulist a4xx_gpulist;
@@ -184,6 +188,9 @@ bool adreno_has_gpu(struct device_node *node)
uint32_t chip_id;
int ret;
+ if (skip_gpu)
+ return false;
+
ret = find_chipid(node, &chip_id);
if (ret)
return false;
@@ -404,10 +411,16 @@ static struct platform_driver adreno_driver = {
void __init adreno_register(void)
{
+ if (skip_gpu)
+ return;
+
platform_driver_register(&adreno_driver);
}
void __exit adreno_unregister(void)
{
+ if (skip_gpu)
+ return;
+
platform_driver_unregister(&adreno_driver);
}
--
2.50.1
On 9/2/25 1:50 PM, Akhil P Oommen wrote: > During bringup of a new GPU support, it is convenient to have knob to > quickly disable GPU, but keep the display support. This helps to > fallback to 'kms_swrast' in case of bootup issues due to GPU. Add a > modparam to support this. I'm not entirely opposed, but slapping a // in front of the compatible in the dt works just as well Konrad
On Tue, Sep 02, 2025 at 02:30:48PM +0200, Konrad Dybcio wrote: > On 9/2/25 1:50 PM, Akhil P Oommen wrote: > > During bringup of a new GPU support, it is convenient to have knob to > > quickly disable GPU, but keep the display support. This helps to > > fallback to 'kms_swrast' in case of bootup issues due to GPU. Add a > > modparam to support this. > > I'm not entirely opposed, but slapping a // in front of the compatible > in the dt works just as well Which requires rebuilding and reprovisioning > > Konrad -- With best wishes Dmitry
On 9/2/25 3:02 PM, Dmitry Baryshkov wrote: > On Tue, Sep 02, 2025 at 02:30:48PM +0200, Konrad Dybcio wrote: >> On 9/2/25 1:50 PM, Akhil P Oommen wrote: >>> During bringup of a new GPU support, it is convenient to have knob to >>> quickly disable GPU, but keep the display support. This helps to >>> fallback to 'kms_swrast' in case of bootup issues due to GPU. Add a >>> modparam to support this. >> >> I'm not entirely opposed, but slapping a // in front of the compatible >> in the dt works just as well > > Which requires rebuilding and reprovisioning Fair Konrad
On Wed, Sep 03, 2025 at 11:25:49AM +0200, Konrad Dybcio wrote: > On 9/2/25 3:02 PM, Dmitry Baryshkov wrote: > > On Tue, Sep 02, 2025 at 02:30:48PM +0200, Konrad Dybcio wrote: > >> On 9/2/25 1:50 PM, Akhil P Oommen wrote: > >>> During bringup of a new GPU support, it is convenient to have knob to > >>> quickly disable GPU, but keep the display support. This helps to > >>> fallback to 'kms_swrast' in case of bootup issues due to GPU. Add a > >>> modparam to support this. > >> > >> I'm not entirely opposed, but slapping a // in front of the compatible > >> in the dt works just as well > > > > Which requires rebuilding and reprovisioning > > Fair Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> -- With best wishes Dmitry
© 2016 - 2025 Red Hat, Inc.