drm/nouveau/bar/gf100: ensure BAR is mapped
authorJon Derrick <jonathan.derrick@intel.com>
Sat, 16 Mar 2019 00:05:17 +0000 (18:05 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jan 2020 07:21:37 +0000 (08:21 +0100)
commit3579293f6bace77815ca2ebe47d98ad73b469c95
treece487d9d75c3cf486cd0fe790d8579e8bda27804
parente9f3e2ef01140ab2dd3f5db51ca37db91134dfff
drm/nouveau/bar/gf100: ensure BAR is mapped

commit 12e08beb32d64b6070b718630490db83dd321c8c upstream.

If the BAR is zero size, it indicates it was never successfully mapped.
Ensure that the BAR is valid during initialization before attempting to
use it.

Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Sushma Kalakota <sushmax.kalakota@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c