drm/amdgpu: used cached pcie gen info for SI (v2)
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 26 Feb 2018 16:05:10 +0000 (11:05 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Mar 2018 09:54:31 +0000 (10:54 +0100)
commit20f3ff9738c04226209f606e239ad013e95f43b6
treeadc2c879f74ebb5f140629afb069f4b4beb3e19f
parent26078a2d862d99f296f25165a429536c2a8a7f38
drm/amdgpu: used cached pcie gen info for SI (v2)

commit 05656e5e4917a08296300dc0530aed1539202c25 upstream.

Rather than querying it every time we need it.
Also fixes a crash in VM pass through if there is no
root bridge because the cached value fetch already checks
this properly.

v2: fix includes

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=105244
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Rex Zhu<rezhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/si.c
drivers/gpu/drm/amd/amdgpu/si_dpm.c