diff options
author | Dave Airlie <airlied@redhat.com> | 2020-04-08 09:16:14 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-04-08 09:16:21 +1000 |
commit | 9c346968b862fe6e1203de456836dd90134ea01e (patch) | |
tree | 0397d30afc89db6bfce9a40b8f269e3435c39d40 /drivers/gpu/drm/nouveau/nouveau_bo.c | |
parent | 3208a24f2ba2e666908619d51173ca62b08f3a75 (diff) | |
parent | 374b55802cd567e9f340b7f27d2c5e20b069ac3c (diff) |
Merge branch 'linux-5.7' of git://github.com/skeggsb/linux into drm-next
A couple of misc fixes/workarounds for some issues that are causing a
lot of pain for people.
Of most interest are the PCI power management and GR init WARs, which
effect a rather significant number of laptop systems that are in use
today.
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Ben Skeggs <skeggsb@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ <CACAvsv5Ef5YKS9EPBH3YUubzvVr++_rzjgSqV_B5nC0L2kB6-Q@mail.gmail.com
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bo.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 2b4b21b02e40..c40f127de3d0 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -1494,8 +1494,13 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *reg) ret = nvif_object_map_handle(&mem->mem.object, &args, argc, &handle, &length); - if (ret != 1) - return ret ? ret : -EINVAL; + if (ret != 1) { + if (WARN_ON(ret == 0)) + return -EINVAL; + if (ret == -ENOSPC) + return -EAGAIN; + return ret; + } reg->bus.base = 0; reg->bus.offset = handle; |