OSDN Git Service

drm/nouveau/bar/nv50: ensure BAR is mapped
authorJon Derrick <jonathan.derrick@intel.com>
Sat, 16 Mar 2019 00:05:16 +0000 (18:05 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:46:11 +0000 (06:46 -0700)
commit5744fd7fa1d164a8fcbb1a65def927cab84c9a68
tree1fcec945ec29c866564a49406f33b3946140d5b3
parent07bb9a71ee27929127f0dd434edaa9f22e378884
drm/nouveau/bar/nv50: ensure BAR is mapped

[ Upstream commit f10b83de1fd49216a4c657816f48001437e4bdd5 ]

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: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c