summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/udl/udl_fb.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-03-26 14:36:56 +0100
committerDave Airlie <airlied@redhat.com>2012-05-31 14:13:59 +0100
commite8aa1d1ebcbcf98fbb20cad83098f25c7d52753f (patch)
treea4b4cb36871ac3174407c4baafef93c7fdf23f5e /drivers/gpu/drm/udl/udl_fb.c
parent9a70cc2a7882dfc0d44a623b4a84f279714a6372 (diff)
downloadop-kernel-dev-e8aa1d1ebcbcf98fbb20cad83098f25c7d52753f.zip
op-kernel-dev-e8aa1d1ebcbcf98fbb20cad83098f25c7d52753f.tar.gz
udl: support vmapping imported dma-bufs
This allows udl to get a vmapping of an imported buffer for scanout. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/udl/udl_fb.c')
-rw-r--r--drivers/gpu/drm/udl/udl_fb.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
index a029ee3..ce9a611 100644
--- a/drivers/gpu/drm/udl/udl_fb.c
+++ b/drivers/gpu/drm/udl/udl_fb.c
@@ -156,8 +156,17 @@ int udl_handle_damage(struct udl_framebuffer *fb, int x, int y,
if (!fb->active_16)
return 0;
- if (!fb->obj->vmapping)
- udl_gem_vmap(fb->obj);
+ if (!fb->obj->vmapping) {
+ ret = udl_gem_vmap(fb->obj);
+ if (ret == -ENOMEM) {
+ DRM_ERROR("failed to vmap fb\n");
+ return 0;
+ }
+ if (!fb->obj->vmapping) {
+ DRM_ERROR("failed to vmapping\n");
+ return 0;
+ }
+ }
start_cycles = get_cycles();
OpenPOWER on IntegriCloud