drm/amdgpu: shut up #warning for compile testing
Subsystems (2)
PATCH 1/1 drm/amdgpu: shut up #warning for compile testing
My randconfig tests on linux-next showed a newly introduced warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c: In function 'amdgpu_bo_create_restricted':drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:377:2: error: #warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance thanks to write-combining [-Werror=cpp]
Generally speaking, warnings about bad kernel configuration are not particularly helpful. We could enforce the selection of X86_PAT through Kconfig, so the driver cannot even be used unless it is enabled, or we could just rely on the runtime warning that is also there.
In this version, I'm making the warning conditional on CONFIG_COMPILE_TEST, which shuts it up for me, but not people that may actually want to run the kernel as a compromize.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +2 -0
@@ -374,8 +374,10 @@ int amdgpu_bo_create_restricted(struct amdgpu_device *adev,* See https://bugs.freedesktop.org/show_bug.cgi?id=88758 */ +#ifndef CONFIG_COMPILE_TEST #warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance \ thanks to write-combining +#endif if (bo->flags &AMDGPU_GEM_CREATE_CPU_GTT_USWC ) DRM_INFO_ONCE("Please enable CONFIG_MTRR and CONFIG_X86_PAT for "
Signature · 6 lines
2.9.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 8 lines · Arnd Bergmann
My randconfig tests on linux-next showed a newly introduced warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c: In function 'amdgpu_bo_create_restricted':drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:377:2: error: #warning Please enableCONFIG_MTRRandCONFIG_X86_PATfor better performance thanks to write-combining [-Werror=cpp]Generally speaking, warnings about bad kernel configuration are not particularly helpful. We could enforce the selection of
X86_PATthroughKconfig, so the driver cannot even be used unless it is enabled,
Making AMDGPU depend on X86_PAT would be wrong I think, and any fancier Kconfig solution might be overkill.
Quoted 1 line
or we could just rely on the runtime warning that is also there.
That might make sense, since the runtime warning is only triggered when the lack of PAT actually makes a difference.
OTOH the people running the kernel aren't always the same people building it, so the downside is that this would potentially delay getting X86_PAT enabled.
Quoted 3 lines
In this version, I'm making the warning conditional on
CONFIG_COMPILE_TEST, which shuts it up for me, but not people that may actually want to run the kernel as a compromize.
This is fine with me as well.
Whichever way we end up going for this, it should be applied to the radeon driver as well.
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Christian König
maintainerAm 02.02.2017 um 07:09 schrieb Michel Dänzer:
Quoted 4 lines
[SNIP]
OTOH the people running the kernel aren't always the same people building it, so the downside is that this would potentially delay gettingX86_PATenabled.
And exactly for this reason I would rather like to keep the warning.
Regards,
Christian.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Michel Dänzer
Reviewed-byQuoted 7 lines · Christian König
Am 02.02.2017 um 07:09 schrieb Michel Dänzer:
Quoted 4 lines
[SNIP]
OTOH the people running the kernel aren't always the same people building it, so the downside is that this would potentially delay gettingX86_PATenabled.And exactly for this reason I would rather like to keep the warning.
Right, so let's take the patch as is:
Arnd, can you make the corresponding patch for radeon as well? Otherwise I can probably do it next week.
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Alex Deucher
AppliedQuoted 7 lines · Michel Dänzer
Quoted 6 lines · Christian König
Am 02.02.2017 um 07:09 schrieb Michel Dänzer:
Quoted 4 lines
[SNIP]
OTOH the people running the kernel aren't always the same people building it, so the downside is that this would potentially delay gettingX86_PATenabled.
Quoted 6 lines
Quoted 1 line
And exactly for this reason I would rather like to keep the warning.
Right, so let's take the patch as is:
Reviewed-by Michel Dänzer <[email protected]>
Applied. thanks!
Alex
Quoted 5 lines
Arnd, can you make the corresponding patch for radeon as well? Otherwise I can probably do it next week.
Quoted 7 lines
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel