drm/nouveau/bar: only ioremap BAR3 if it exists
authorAlexandre Courbot <acourbot@nvidia.com>
Fri, 2 May 2014 09:32:34 +0000 (18:32 +0900)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 10 Jun 2014 06:05:49 +0000 (16:05 +1000)
commit53d206bb4aadba255d20b70893ed5ba1d89f41e1
tree444b591c66d865081906076161bbdbd268417557
parent4c0dae57873edb1560b738c6519361c5ecd443ae
drm/nouveau/bar: only ioremap BAR3 if it exists

Some chips that use system memory exclusively (e.g. GK20A) do not
expose 2 BAR regions. For them only BAR1 exists, and it should be used
for USERD mapping. Do not map BAR3 if its resource does not exist.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/subdev/bar/base.c