summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/udl/udl_dmabuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/udl/udl_dmabuf.c')
-rw-r--r--drivers/gpu/drm/udl/udl_dmabuf.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/udl/udl_dmabuf.c b/drivers/gpu/drm/udl/udl_dmabuf.c
index 1d85c3a9151d..2425b76dc44c 100644
--- a/drivers/gpu/drm/udl/udl_dmabuf.c
+++ b/drivers/gpu/drm/udl/udl_dmabuf.c
@@ -90,8 +90,11 @@ static struct sg_table *udl_map_dma_buf(struct dma_buf_attachment *attach,
return &udl_attach->sgt;
if (!obj->pages) {
- DRM_ERROR("pages is null.\n");
- return ERR_PTR(-ENOMEM);
+ ret = udl_gem_get_pages(obj);
+ if (ret) {
+ DRM_ERROR("failed to map pages.\n");
+ return ERR_PTR(ret);
+ }
}
page_count = obj->base.size / PAGE_SIZE;