drm/amdgpu: simplify nv and soc21 read_register functions
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 5 May 2022 03:24:00 +0000 (23:24 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 6 May 2022 20:56:57 +0000 (16:56 -0400)
commitbf1781e17f30a594f959671af59a253e9313a9b9
tree9d7f25cc5234e90d102b0c2a57ded8dd3bdd1a72
parent98f561884683cdca65bec80ef4dddfc3fe7aca63
drm/amdgpu: simplify nv and soc21 read_register functions

Check of the base offset for the IP exists rather than
explicitly checking for how many instances of a particular
IP there are.  This is what soc15.c already does.  Expand
this to nv.c and soc21.c.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/nv.c
drivers/gpu/drm/amd/amdgpu/soc21.c