omap_obj          151 drivers/gpu/drm/omapdrm/omap_gem.c static bool omap_gem_is_contiguous(struct omap_gem_object *omap_obj)
omap_obj          153 drivers/gpu/drm/omapdrm/omap_gem.c 	if (omap_obj->flags & OMAP_BO_MEM_DMA_API)
omap_obj          156 drivers/gpu/drm/omapdrm/omap_gem.c 	if ((omap_obj->flags & OMAP_BO_MEM_DMABUF) && omap_obj->sgt->nents == 1)
omap_obj          169 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj          175 drivers/gpu/drm/omapdrm/omap_gem.c 	const int m = DIV_ROUND_UP(omap_obj->width << fmt, PAGE_SIZE);
omap_obj          196 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj          199 drivers/gpu/drm/omapdrm/omap_gem.c 	if (omap_obj->flags & OMAP_BO_TILED) {
omap_obj          200 drivers/gpu/drm/omapdrm/omap_gem.c 		enum tiler_fmt fmt = gem2fmt(omap_obj->flags);
omap_obj          224 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj          230 drivers/gpu/drm/omapdrm/omap_gem.c 	lockdep_assert_held(&omap_obj->lock);
omap_obj          236 drivers/gpu/drm/omapdrm/omap_gem.c 	if (!(omap_obj->flags & OMAP_BO_MEM_SHMEM) || omap_obj->pages)
omap_obj          248 drivers/gpu/drm/omapdrm/omap_gem.c 	if (omap_obj->flags & (OMAP_BO_WC|OMAP_BO_UNCACHED)) {
omap_obj          280 drivers/gpu/drm/omapdrm/omap_gem.c 	omap_obj->dma_addrs = addrs;
omap_obj          281 drivers/gpu/drm/omapdrm/omap_gem.c 	omap_obj->pages = pages;
omap_obj          296 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj          300 drivers/gpu/drm/omapdrm/omap_gem.c 	lockdep_assert_held(&omap_obj->lock);
omap_obj          303 drivers/gpu/drm/omapdrm/omap_gem.c 		if (omap_obj->dma_addrs[i])
omap_obj          304 drivers/gpu/drm/omapdrm/omap_gem.c 			dma_unmap_page(obj->dev->dev, omap_obj->dma_addrs[i],
omap_obj          308 drivers/gpu/drm/omapdrm/omap_gem.c 	kfree(omap_obj->dma_addrs);
omap_obj          309 drivers/gpu/drm/omapdrm/omap_gem.c 	omap_obj->dma_addrs = NULL;
omap_obj          311 drivers/gpu/drm/omapdrm/omap_gem.c 	drm_gem_put_pages(obj, omap_obj->pages, true, false);
omap_obj          312 drivers/gpu/drm/omapdrm/omap_gem.c 	omap_obj->pages = NULL;
omap_obj          324 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj          327 drivers/gpu/drm/omapdrm/omap_gem.c 	if (omap_obj->flags & OMAP_BO_TILED) {
omap_obj          334 drivers/gpu/drm/omapdrm/omap_gem.c 		size = tiler_vsize(gem2fmt(omap_obj->flags),
omap_obj          335 drivers/gpu/drm/omapdrm/omap_gem.c 				omap_obj->width, omap_obj->height);
omap_obj          349 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj          356 drivers/gpu/drm/omapdrm/omap_gem.c 	if (omap_obj->pages) {
omap_obj          358 drivers/gpu/drm/omapdrm/omap_gem.c 		pfn = page_to_pfn(omap_obj->pages[pgoff]);
omap_obj          360 drivers/gpu/drm/omapdrm/omap_gem.c 		BUG_ON(!omap_gem_is_contiguous(omap_obj));
omap_obj          361 drivers/gpu/drm/omapdrm/omap_gem.c 		pfn = (omap_obj->dma_addr >> PAGE_SHIFT) + pgoff;
omap_obj          375 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj          378 drivers/gpu/drm/omapdrm/omap_gem.c 	enum tiler_fmt fmt = gem2fmt(omap_obj->flags);
omap_obj          400 drivers/gpu/drm/omapdrm/omap_gem.c 	const int m = DIV_ROUND_UP(omap_obj->width << fmt, PAGE_SIZE);
omap_obj          412 drivers/gpu/drm/omapdrm/omap_gem.c 	slots = omap_obj->width >> priv->usergart[fmt].slot_shift;
omap_obj          445 drivers/gpu/drm/omapdrm/omap_gem.c 	memcpy(pages, &omap_obj->pages[base_pgoff],
omap_obj          494 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj          501 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_lock(&omap_obj->lock);
omap_obj          516 drivers/gpu/drm/omapdrm/omap_gem.c 	if (omap_obj->flags & OMAP_BO_TILED)
omap_obj          523 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_unlock(&omap_obj->lock);
omap_obj          544 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj          549 drivers/gpu/drm/omapdrm/omap_gem.c 	if (omap_obj->flags & OMAP_BO_WC) {
omap_obj          551 drivers/gpu/drm/omapdrm/omap_gem.c 	} else if (omap_obj->flags & OMAP_BO_UNCACHED) {
omap_obj          646 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj          655 drivers/gpu/drm/omapdrm/omap_gem.c 	omap_obj->roll = roll;
omap_obj          657 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_lock(&omap_obj->lock);
omap_obj          660 drivers/gpu/drm/omapdrm/omap_gem.c 	if (omap_obj->block) {
omap_obj          665 drivers/gpu/drm/omapdrm/omap_gem.c 		ret = tiler_pin(omap_obj->block, omap_obj->pages, npages,
omap_obj          672 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_unlock(&omap_obj->lock);
omap_obj          693 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj          695 drivers/gpu/drm/omapdrm/omap_gem.c 	return !((omap_obj->flags & OMAP_BO_MEM_SHMEM) &&
omap_obj          696 drivers/gpu/drm/omapdrm/omap_gem.c 		((omap_obj->flags & OMAP_BO_CACHE_MASK) == OMAP_BO_CACHED));
omap_obj          705 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj          710 drivers/gpu/drm/omapdrm/omap_gem.c 	if (omap_obj->dma_addrs[pgoff]) {
omap_obj          711 drivers/gpu/drm/omapdrm/omap_gem.c 		dma_unmap_page(dev->dev, omap_obj->dma_addrs[pgoff],
omap_obj          713 drivers/gpu/drm/omapdrm/omap_gem.c 		omap_obj->dma_addrs[pgoff] = 0;
omap_obj          722 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj          724 drivers/gpu/drm/omapdrm/omap_gem.c 	struct page **pages = omap_obj->pages;
omap_obj          731 drivers/gpu/drm/omapdrm/omap_gem.c 		if (!omap_obj->dma_addrs[i]) {
omap_obj          743 drivers/gpu/drm/omapdrm/omap_gem.c 			omap_obj->dma_addrs[i] = addr;
omap_obj          770 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj          773 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_lock(&omap_obj->lock);
omap_obj          775 drivers/gpu/drm/omapdrm/omap_gem.c 	if (!omap_gem_is_contiguous(omap_obj) && priv->has_dmm) {
omap_obj          776 drivers/gpu/drm/omapdrm/omap_gem.c 		if (omap_obj->dma_addr_cnt == 0) {
omap_obj          778 drivers/gpu/drm/omapdrm/omap_gem.c 			enum tiler_fmt fmt = gem2fmt(omap_obj->flags);
omap_obj          781 drivers/gpu/drm/omapdrm/omap_gem.c 			BUG_ON(omap_obj->block);
omap_obj          787 drivers/gpu/drm/omapdrm/omap_gem.c 			if (omap_obj->flags & OMAP_BO_TILED) {
omap_obj          789 drivers/gpu/drm/omapdrm/omap_gem.c 						omap_obj->width,
omap_obj          790 drivers/gpu/drm/omapdrm/omap_gem.c 						omap_obj->height, 0);
omap_obj          803 drivers/gpu/drm/omapdrm/omap_gem.c 			ret = tiler_pin(block, omap_obj->pages, npages,
omap_obj          804 drivers/gpu/drm/omapdrm/omap_gem.c 					omap_obj->roll, true);
omap_obj          812 drivers/gpu/drm/omapdrm/omap_gem.c 			omap_obj->dma_addr = tiler_ssptr(block);
omap_obj          813 drivers/gpu/drm/omapdrm/omap_gem.c 			omap_obj->block = block;
omap_obj          815 drivers/gpu/drm/omapdrm/omap_gem.c 			DBG("got dma address: %pad", &omap_obj->dma_addr);
omap_obj          818 drivers/gpu/drm/omapdrm/omap_gem.c 		omap_obj->dma_addr_cnt++;
omap_obj          820 drivers/gpu/drm/omapdrm/omap_gem.c 		*dma_addr = omap_obj->dma_addr;
omap_obj          821 drivers/gpu/drm/omapdrm/omap_gem.c 	} else if (omap_gem_is_contiguous(omap_obj)) {
omap_obj          822 drivers/gpu/drm/omapdrm/omap_gem.c 		*dma_addr = omap_obj->dma_addr;
omap_obj          829 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_unlock(&omap_obj->lock);
omap_obj          844 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj          847 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_lock(&omap_obj->lock);
omap_obj          849 drivers/gpu/drm/omapdrm/omap_gem.c 	if (omap_obj->dma_addr_cnt > 0) {
omap_obj          850 drivers/gpu/drm/omapdrm/omap_gem.c 		omap_obj->dma_addr_cnt--;
omap_obj          851 drivers/gpu/drm/omapdrm/omap_gem.c 		if (omap_obj->dma_addr_cnt == 0) {
omap_obj          852 drivers/gpu/drm/omapdrm/omap_gem.c 			ret = tiler_unpin(omap_obj->block);
omap_obj          857 drivers/gpu/drm/omapdrm/omap_gem.c 			ret = tiler_release(omap_obj->block);
omap_obj          862 drivers/gpu/drm/omapdrm/omap_gem.c 			omap_obj->dma_addr = 0;
omap_obj          863 drivers/gpu/drm/omapdrm/omap_gem.c 			omap_obj->block = NULL;
omap_obj          867 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_unlock(&omap_obj->lock);
omap_obj          877 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj          880 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_lock(&omap_obj->lock);
omap_obj          882 drivers/gpu/drm/omapdrm/omap_gem.c 	if ((omap_obj->dma_addr_cnt > 0) && omap_obj->block &&
omap_obj          883 drivers/gpu/drm/omapdrm/omap_gem.c 			(omap_obj->flags & OMAP_BO_TILED)) {
omap_obj          884 drivers/gpu/drm/omapdrm/omap_gem.c 		*dma_addr = tiler_tsptr(omap_obj->block, orient, x, y);
omap_obj          888 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_unlock(&omap_obj->lock);
omap_obj          896 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj          898 drivers/gpu/drm/omapdrm/omap_gem.c 	if (omap_obj->flags & OMAP_BO_TILED)
omap_obj          899 drivers/gpu/drm/omapdrm/omap_gem.c 		ret = tiler_stride(gem2fmt(omap_obj->flags), orient);
omap_obj          916 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj          919 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_lock(&omap_obj->lock);
omap_obj          927 drivers/gpu/drm/omapdrm/omap_gem.c 	if (!omap_obj->pages) {
omap_obj          932 drivers/gpu/drm/omapdrm/omap_gem.c 	*pages = omap_obj->pages;
omap_obj          935 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_unlock(&omap_obj->lock);
omap_obj          957 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj          961 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_lock(&omap_obj->lock);
omap_obj          963 drivers/gpu/drm/omapdrm/omap_gem.c 	if (!omap_obj->vaddr) {
omap_obj          970 drivers/gpu/drm/omapdrm/omap_gem.c 		omap_obj->vaddr = vmap(omap_obj->pages, obj->size >> PAGE_SHIFT,
omap_obj          974 drivers/gpu/drm/omapdrm/omap_gem.c 	vaddr = omap_obj->vaddr;
omap_obj          977 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_unlock(&omap_obj->lock);
omap_obj          991 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj;
omap_obj          995 drivers/gpu/drm/omapdrm/omap_gem.c 	list_for_each_entry(omap_obj, &priv->obj_list, mm_list) {
omap_obj          996 drivers/gpu/drm/omapdrm/omap_gem.c 		if (omap_obj->block) {
omap_obj          997 drivers/gpu/drm/omapdrm/omap_gem.c 			struct drm_gem_object *obj = &omap_obj->base;
omap_obj         1000 drivers/gpu/drm/omapdrm/omap_gem.c 			WARN_ON(!omap_obj->pages);  /* this can't happen */
omap_obj         1001 drivers/gpu/drm/omapdrm/omap_gem.c 			ret = tiler_pin(omap_obj->block,
omap_obj         1002 drivers/gpu/drm/omapdrm/omap_gem.c 					omap_obj->pages, npages,
omap_obj         1003 drivers/gpu/drm/omapdrm/omap_gem.c 					omap_obj->roll, true);
omap_obj         1024 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj         1029 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_lock(&omap_obj->lock);
omap_obj         1032 drivers/gpu/drm/omapdrm/omap_gem.c 			omap_obj->flags, obj->name, kref_read(&obj->refcount),
omap_obj         1033 drivers/gpu/drm/omapdrm/omap_gem.c 			off, &omap_obj->dma_addr, omap_obj->dma_addr_cnt,
omap_obj         1034 drivers/gpu/drm/omapdrm/omap_gem.c 			omap_obj->vaddr, omap_obj->roll);
omap_obj         1036 drivers/gpu/drm/omapdrm/omap_gem.c 	if (omap_obj->flags & OMAP_BO_TILED) {
omap_obj         1037 drivers/gpu/drm/omapdrm/omap_gem.c 		seq_printf(m, " %dx%d", omap_obj->width, omap_obj->height);
omap_obj         1038 drivers/gpu/drm/omapdrm/omap_gem.c 		if (omap_obj->block) {
omap_obj         1039 drivers/gpu/drm/omapdrm/omap_gem.c 			struct tcm_area *area = &omap_obj->block->area;
omap_obj         1048 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_unlock(&omap_obj->lock);
omap_obj         1055 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj;
omap_obj         1059 drivers/gpu/drm/omapdrm/omap_gem.c 	list_for_each_entry(omap_obj, list, mm_list) {
omap_obj         1060 drivers/gpu/drm/omapdrm/omap_gem.c 		struct drm_gem_object *obj = &omap_obj->base;
omap_obj         1079 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj = to_omap_bo(obj);
omap_obj         1084 drivers/gpu/drm/omapdrm/omap_gem.c 	list_del(&omap_obj->mm_list);
omap_obj         1093 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_lock(&omap_obj->lock);
omap_obj         1096 drivers/gpu/drm/omapdrm/omap_gem.c 	WARN_ON(omap_obj->dma_addr_cnt > 0);
omap_obj         1098 drivers/gpu/drm/omapdrm/omap_gem.c 	if (omap_obj->pages) {
omap_obj         1099 drivers/gpu/drm/omapdrm/omap_gem.c 		if (omap_obj->flags & OMAP_BO_MEM_DMABUF)
omap_obj         1100 drivers/gpu/drm/omapdrm/omap_gem.c 			kfree(omap_obj->pages);
omap_obj         1105 drivers/gpu/drm/omapdrm/omap_gem.c 	if (omap_obj->flags & OMAP_BO_MEM_DMA_API) {
omap_obj         1106 drivers/gpu/drm/omapdrm/omap_gem.c 		dma_free_wc(dev->dev, obj->size, omap_obj->vaddr,
omap_obj         1107 drivers/gpu/drm/omapdrm/omap_gem.c 			    omap_obj->dma_addr);
omap_obj         1108 drivers/gpu/drm/omapdrm/omap_gem.c 	} else if (omap_obj->vaddr) {
omap_obj         1109 drivers/gpu/drm/omapdrm/omap_gem.c 		vunmap(omap_obj->vaddr);
omap_obj         1111 drivers/gpu/drm/omapdrm/omap_gem.c 		drm_prime_gem_destroy(obj, omap_obj->sgt);
omap_obj         1114 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_unlock(&omap_obj->lock);
omap_obj         1118 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_destroy(&omap_obj->lock);
omap_obj         1120 drivers/gpu/drm/omapdrm/omap_gem.c 	kfree(omap_obj);
omap_obj         1128 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj;
omap_obj         1169 drivers/gpu/drm/omapdrm/omap_gem.c 	omap_obj = kzalloc(sizeof(*omap_obj), GFP_KERNEL);
omap_obj         1170 drivers/gpu/drm/omapdrm/omap_gem.c 	if (!omap_obj)
omap_obj         1173 drivers/gpu/drm/omapdrm/omap_gem.c 	obj = &omap_obj->base;
omap_obj         1174 drivers/gpu/drm/omapdrm/omap_gem.c 	omap_obj->flags = flags;
omap_obj         1175 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_init(&omap_obj->lock);
omap_obj         1188 drivers/gpu/drm/omapdrm/omap_gem.c 		omap_obj->width = gsize.tiled.width;
omap_obj         1189 drivers/gpu/drm/omapdrm/omap_gem.c 		omap_obj->height = gsize.tiled.height;
omap_obj         1208 drivers/gpu/drm/omapdrm/omap_gem.c 		omap_obj->vaddr = dma_alloc_wc(dev->dev, size,
omap_obj         1209 drivers/gpu/drm/omapdrm/omap_gem.c 					       &omap_obj->dma_addr,
omap_obj         1211 drivers/gpu/drm/omapdrm/omap_gem.c 		if (!omap_obj->vaddr)
omap_obj         1216 drivers/gpu/drm/omapdrm/omap_gem.c 	list_add(&omap_obj->mm_list, &priv->obj_list);
omap_obj         1224 drivers/gpu/drm/omapdrm/omap_gem.c 	kfree(omap_obj);
omap_obj         1232 drivers/gpu/drm/omapdrm/omap_gem.c 	struct omap_gem_object *omap_obj;
omap_obj         1245 drivers/gpu/drm/omapdrm/omap_gem.c 	omap_obj = to_omap_bo(obj);
omap_obj         1247 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_lock(&omap_obj->lock);
omap_obj         1249 drivers/gpu/drm/omapdrm/omap_gem.c 	omap_obj->sgt = sgt;
omap_obj         1252 drivers/gpu/drm/omapdrm/omap_gem.c 		omap_obj->dma_addr = sg_dma_address(sgt->sgl);
omap_obj         1268 drivers/gpu/drm/omapdrm/omap_gem.c 		omap_obj->pages = pages;
omap_obj         1284 drivers/gpu/drm/omapdrm/omap_gem.c 	mutex_unlock(&omap_obj->lock);