On Wed, Sep 25, 2024 at 4:12 PM Mario Limonciello <mario.limonciello@xxxxxxx> wrote: > > On 9/25/2024 15:09, Alex Deucher wrote: > > On Wed, Sep 25, 2024 at 4:05 PM Mario Limonciello > > <mario.limonciello@xxxxxxx> wrote: > >> > >> Some distributions have been patching amdgpu to enable overdrive by > >> default which may compromise stability. Furthermore when bug reports > >> are brought upstream it's not obvious that the system has been tampered > >> with. > >> > >> When overdrive is enabled taint the kernel and leave a critical message > >> in the logs for users so that it's obvious in a bug report it's been > >> tampered with. > >> > >> Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx> > >> --- > >> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 +++++ > >> 1 file changed, 5 insertions(+) > >> > >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > >> index f57411ed2dc2..99717a1d7f61 100644 > >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > >> @@ -3067,6 +3067,11 @@ static int __init amdgpu_init(void) > >> /* Ignore KFD init failures. Normal when CONFIG_HSA_AMD is not set. */ > >> amdgpu_amdkfd_init(); > >> > >> + if (amdgpu_pp_feature_mask & PP_OVERDRIVE_MASK) { > >> + add_taint(TAINT_CPU_OUT_OF_SPEC, LOCKDEP_STILL_OK); > >> + pr_crit("Overdrive is enabled, please disable it before reporting any bugs.\n"); > > > > Might want to reword this to something like: > > "Overdrive is enabled, please disable it before reporting any bugs > > unrelated to overdrive.\n" > > > Thanks, good suggestion; I'll reword. Are you in agreement with the > selected taint code and location in the driver? Yes, with that change, the patch is: Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx> > > > Alex > > > >> + } > >> + > >> /* let modprobe override vga console setting */ > >> return pci_register_driver(&amdgpu_kms_pci_driver); > >> > >> -- > >> 2.43.0 > >> >