From: Jakob Bornecrantz Date: Fri, 28 May 2010 09:22:05 +0000 (+0200) Subject: drm/vmwgfx: Print warnings in kernel log about bo pinning that fails. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=316ab13ae2ad603fd5e3a909524e68d98db1b1b6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/vmwgfx: Print warnings in kernel log about bo pinning that fails. Signed-off-by: Jakob Bornecrantz Signed-off-by: Thomas Hellstrom Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c index 06f431442e92..181f47222580 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c @@ -630,6 +630,10 @@ int vmw_dmabuf_to_start_of_vram(struct vmw_private *vmw_priv, goto err_unlock; ret = ttm_bo_validate(bo, &ne_placement, false, false, false); + + /* Could probably bug on */ + WARN_ON(bo->offset != 0); + ttm_bo_unreserve(bo); err_unlock: ttm_write_unlock(&vmw_priv->active_master->lock); diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 250282fee9c8..b78dcf001858 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -640,6 +640,8 @@ static int vmw_framebuffer_dmabuf_pin(struct vmw_framebuffer *vfb) vmw_overlay_resume_all(dev_priv); + WARN_ON(ret != 0); + return 0; }