diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/init.c b/drivers/gpu/drm/nouveau/core/subdev/bios/init.c index da3bffb..f45ca41 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bios/init.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bios/init.c @@ -2139,6 +2139,15 @@ nvbios_exec(struct nvbios_init *init) return 0; } +#include +MODULE_PARM_DESC(maxscript, ""); +static int nouveau_maxscript = 999; +module_param_named(maxscript, nouveau_maxscript, int, 0400); + +MODULE_PARM_DESC(minscript, ""); +static int nouveau_minscript = 0; +module_param_named(minscript, nouveau_minscript, int, 0400); + int nvbios_init(struct nouveau_subdev *subdev, bool execute) { @@ -2159,7 +2168,14 @@ nvbios_init(struct nouveau_subdev *subdev, bool execute) .execute = execute ? 1 : 0, }; - ret = nvbios_exec(&init); + if (i >= nouveau_minscript && i <= nouveau_maxscript) { + nv_info(bios, "executing script %d, offset: %d\n", i-1, + data); + ret = nvbios_exec(&init); + } else { + nv_info(bios, "skipping script %d, offset: %d\n", i-1, + data); + } } /* the vbios parser will run this right after the normal init @@ -2175,7 +2191,14 @@ nvbios_init(struct nouveau_subdev *subdev, bool execute) .execute = execute ? 1 : 0, }; - ret = nvbios_exec(&init); + if (nouveau_maxscript == 999) { + nv_info(bios, "executing special script, offset: %d\n", + data); + ret = nvbios_exec(&init); + } else { + nv_info(bios, "skipping special script, offset: %d\n", + data); + } } return 0;