diff options
author | Dave Airlie <airlied@redhat.com> | 2012-03-26 14:36:56 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-05-31 14:13:59 +0100 |
commit | e8aa1d1ebcbcf98fbb20cad83098f25c7d52753f (patch) | |
tree | a4b4cb36871ac3174407c4baafef93c7fdf23f5e /drivers/gpu/drm/udl/udl_fb.c | |
parent | 9a70cc2a7882dfc0d44a623b4a84f279714a6372 (diff) |
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.c | 13 |
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 a029ee39b0c5..ce9a61179925 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(); |