mirror of
https://github.com/torvalds/linux.git
synced 2026-09-27 11:02:03 +02:00
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. Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/672262/ Link: https://lore.kernel.org/r/20250902-assorted-sept-1-v1-3-f3ec9baed513@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
This commit is contained in:
parent
f028bcafb6
commit
3f17991488
|
|
@ -24,6 +24,10 @@ bool disable_acd;
|
||||||
MODULE_PARM_DESC(disable_acd, "Forcefully disable GPU ACD");
|
MODULE_PARM_DESC(disable_acd, "Forcefully disable GPU ACD");
|
||||||
module_param_unsafe(disable_acd, bool, 0400);
|
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 a2xx_gpulist;
|
||||||
extern const struct adreno_gpulist a3xx_gpulist;
|
extern const struct adreno_gpulist a3xx_gpulist;
|
||||||
extern const struct adreno_gpulist a4xx_gpulist;
|
extern const struct adreno_gpulist a4xx_gpulist;
|
||||||
|
|
@ -184,6 +188,9 @@ bool adreno_has_gpu(struct device_node *node)
|
||||||
uint32_t chip_id;
|
uint32_t chip_id;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (skip_gpu)
|
||||||
|
return false;
|
||||||
|
|
||||||
ret = find_chipid(node, &chip_id);
|
ret = find_chipid(node, &chip_id);
|
||||||
if (ret)
|
if (ret)
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -404,10 +411,16 @@ static struct platform_driver adreno_driver = {
|
||||||
|
|
||||||
void __init adreno_register(void)
|
void __init adreno_register(void)
|
||||||
{
|
{
|
||||||
|
if (skip_gpu)
|
||||||
|
return;
|
||||||
|
|
||||||
platform_driver_register(&adreno_driver);
|
platform_driver_register(&adreno_driver);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __exit adreno_unregister(void)
|
void __exit adreno_unregister(void)
|
||||||
{
|
{
|
||||||
|
if (skip_gpu)
|
||||||
|
return;
|
||||||
|
|
||||||
platform_driver_unregister(&adreno_driver);
|
platform_driver_unregister(&adreno_driver);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user