From: Thomas Hellstrom Date: Sun, 27 Aug 2006 17:07:38 +0000 (+0200) Subject: Add TTM map handle on reference. X-Git-Tag: submit/1.0/20121108.012404~1353^2~112 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4fa58aa15242333a635cb590762c6e6312945745;p=profile%2Fivi%2Flibdrm.git Add TTM map handle on reference. --- diff --git a/linux-core/drm_ttm.c b/linux-core/drm_ttm.c index 293b1f8..6e13274 100644 --- a/linux-core/drm_ttm.c +++ b/linux-core/drm_ttm.c @@ -882,7 +882,15 @@ int drm_ttm_ioctl(drm_file_t *priv, drm_ttm_arg_t __user *data) mutex_unlock(&dev->struct_mutex); break; case drm_ttm_reference: - return drm_user_object_ref(priv, arg.handle, drm_ttm_type, &uo); + ret = drm_user_object_ref(priv, arg.handle, drm_ttm_type, &uo); + if (ret) + return ret; + mutex_lock(&dev->struct_mutex); + uo = drm_lookup_user_object(priv, arg.handle); + entry = drm_user_object_entry(uo, drm_ttm_object_t, base); + arg.user_token = entry->map_list.user_token; + mutex_unlock(&dev->struct_mutex); + break; case drm_ttm_unreference: return drm_user_object_unref(priv, arg.handle, drm_ttm_type); case drm_ttm_destroy: