amdgpu: Wrap dev_err() calls on vm faults with printk_ratelimit()
authorEdward O'Callaghan <funfunctor@folklore1984.net>
Mon, 7 Nov 2016 04:35:09 +0000 (15:35 +1100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 23 Nov 2016 20:08:43 +0000 (15:08 -0500)
commit01615881ff4f529cd9af02bfe46f1adf1b7d5793
tree9568f974d19cdec5e961f229d4ceabb9c2895a89
parentb01dd025ca63a9dda9908f0c487b4ef5e724ad29
amdgpu: Wrap dev_err() calls on vm faults with printk_ratelimit()

It can be the case that upon GPU page faults we start trashing
the logs, and so let us ratelimit here to avoid that.

V2. Fix issue where calling dev_err_ratelimited separately for
    each line means that some lines corresponding to a single
    VM fault may or may not appear depending on the rate.
    - Michel Dänzer.

Reviewed-by: Christian König <christian.koenig@amd.com> (v1)
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c