[RFC PATCH v3 2/4] drm/ipvr: drm driver for VED

Cheng, Yao yao.cheng at intel.com
Sun Nov 23 05:29:53 PST 2014


> -----Original Message-----
> From: Cheng, Yao
> Sent: Saturday, November 22, 2014 3:07
> To: intel-gfx at lists.freedesktop.org; dri-devel at lists.freedesktop.org;
> daniel.vetter at ffwll.ch; Kelley, Sean V; Chehab, John
> Cc: Jiang, Fei; dh.herrmann at gmail.com; jani.nikula at linux.intel.com;
> emil.l.velikov at gmail.com; ville.syrjala at linux.intel.com;
> jbarnes at virtuousgeek.org; daniel at fooishbar.org; Cheng, Yao
> Subject: [RFC PATCH v3 2/4] drm/ipvr: drm driver for VED
> 
> +
> +int ipvr_gem_mmap_offset_ioctl(struct drm_device *dev,
> +				void *data, struct drm_file *file_priv)
> +{
> +	int ret;
> +	struct drm_ipvr_gem_mmap_offset *args = data;
> +	struct drm_ipvr_gem_object *obj;
> +
> +	IPVR_DEBUG_ENTRY("getting mmap offset for BO %u.\n", args-
> >handle);
> +	obj = to_ipvr_bo(drm_gem_object_lookup(dev, file_priv, args-
> >handle));
> +
> +	/* create map offset */
> +	ret = drm_gem_create_mmap_offset(&obj->base);
> +	if (ret) {
> +		IPVR_ERROR("could not allocate mmap offset: %d\n", ret);
> +		return ret;
> +	}
> +	args->offset = drm_vma_node_offset_addr(&obj->base.vma_node);
> +	return 0;
> +}

I missed an unreferenced here.


More information about the dri-devel mailing list