Skip to content

Commit d62e8b2

Browse files
akhilpo-qcomquic-rajeshk
authored andcommitted
FROMLIST: drm/msm/adreno: Add a modparam to skip GPU
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. Link: https://lore.kernel.org/all/[email protected]/ Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Akhil P Oommen <[email protected]> Signed-off-by: Puranam V G Tejaswi <[email protected]>
1 parent f125a29 commit d62e8b2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ bool disable_acd;
2424
MODULE_PARM_DESC(disable_acd, "Forcefully disable GPU ACD");
2525
module_param_unsafe(disable_acd, bool, 0400);
2626

27+
static bool skip_gpu;
28+
MODULE_PARM_DESC(no_gpu, "Disable GPU driver register (0=enable GPU driver register (default), 1=skip GPU driver register");
29+
module_param(skip_gpu, bool, 0400);
30+
2731
extern const struct adreno_gpulist a2xx_gpulist;
2832
extern const struct adreno_gpulist a3xx_gpulist;
2933
extern const struct adreno_gpulist a4xx_gpulist;
@@ -184,6 +188,9 @@ bool adreno_has_gpu(struct device_node *node)
184188
uint32_t chip_id;
185189
int ret;
186190

191+
if (skip_gpu)
192+
return false;
193+
187194
ret = find_chipid(node, &chip_id);
188195
if (ret)
189196
return false;
@@ -404,10 +411,16 @@ static struct platform_driver adreno_driver = {
404411

405412
void __init adreno_register(void)
406413
{
414+
if (skip_gpu)
415+
return;
416+
407417
platform_driver_register(&adreno_driver);
408418
}
409419

410420
void __exit adreno_unregister(void)
411421
{
422+
if (skip_gpu)
423+
return;
424+
412425
platform_driver_unregister(&adreno_driver);
413426
}

0 commit comments

Comments
 (0)