[AMD Official Use Only - AMD Internal Distribution Only] > -----Original Message----- > From: Lazar, Lijo <Lijo.Lazar@xxxxxxx> > Sent: Tuesday, September 10, 2024 1:21 PM > To: Zhou1, Tao <Tao.Zhou1@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx > Subject: Re: [PATCH] drm/amdgpu: disable GPU RAS bad page feature for specific > ASIC > > > > On 9/10/2024 9:29 AM, Tao Zhou wrote: > > The feature is not applicable to specific app platform. > > > > v2: update the disablement condition and commit description > > > > Signed-off-by: Tao Zhou <tao.zhou1@xxxxxxx> > > --- > > drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > > index dbfc41ddc3c7..08efc9121adc 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > > @@ -2055,6 +2055,11 @@ static int amdgpu_ras_fs_init(struct amdgpu_device > *adev) > > con->event_state_attr = dev_attr_event_state; > > sysfs_attr_init(attrs[3]); > > > > + /* bad page feature is not applicable to specific app platform */ > > + if (adev->gmc.is_app_apu && > > + amdgpu_ip_version(adev, UMC_HWIP, 0) == IP_VERSION(12, 0, 0)) > > + amdgpu_bad_page_threshold = 0; > > I think sysfs file creation is not the right place to do this. It should be done > probably much earlier at a place where it says what features are supported for > the SOC. > > Thanks, > Lijo [Tao] thanks for your suggestion, will update it in v3. > > > + > > if (amdgpu_bad_page_threshold != 0) { > > /* add bad_page_features entry */ > > bin_attr_gpu_vram_bad_pages.private = NULL;