exynos_gem 26 drivers/gpu/drm/exynos/exynos_drm_fb.c struct exynos_drm_gem *exynos_gem) exynos_gem 37 drivers/gpu/drm/exynos/exynos_drm_fb.c flags = exynos_gem->flags; exynos_gem 60 drivers/gpu/drm/exynos/exynos_drm_fb.c struct exynos_drm_gem **exynos_gem, exynos_gem 72 drivers/gpu/drm/exynos/exynos_drm_fb.c ret = check_fb_gem_memory_type(dev, exynos_gem[i]); exynos_gem 76 drivers/gpu/drm/exynos/exynos_drm_fb.c fb->obj[i] = &exynos_gem[i]->base; exynos_gem 100 drivers/gpu/drm/exynos/exynos_drm_fb.c struct exynos_drm_gem *exynos_gem[MAX_FB_BUFFER]; exynos_gem 111 drivers/gpu/drm/exynos/exynos_drm_fb.c exynos_gem[i] = exynos_drm_gem_get(file_priv, exynos_gem 113 drivers/gpu/drm/exynos/exynos_drm_fb.c if (!exynos_gem[i]) { exynos_gem 120 drivers/gpu/drm/exynos/exynos_drm_fb.c if (size > exynos_gem[i]->size) { exynos_gem 127 drivers/gpu/drm/exynos/exynos_drm_fb.c fb = exynos_drm_framebuffer_init(dev, mode_cmd, exynos_gem, i); exynos_gem 137 drivers/gpu/drm/exynos/exynos_drm_fb.c exynos_drm_gem_put(exynos_gem[i]); exynos_gem 144 drivers/gpu/drm/exynos/exynos_drm_fb.c struct exynos_drm_gem *exynos_gem; exynos_gem 149 drivers/gpu/drm/exynos/exynos_drm_fb.c exynos_gem = to_exynos_gem(fb->obj[index]); exynos_gem 150 drivers/gpu/drm/exynos/exynos_drm_fb.c return exynos_gem->dma_addr + fb->offsets[index]; exynos_gem 18 drivers/gpu/drm/exynos/exynos_drm_fb.h struct exynos_drm_gem **exynos_gem, exynos_gem 33 drivers/gpu/drm/exynos/exynos_drm_fbdev.c struct exynos_drm_gem *exynos_gem; exynos_gem 41 drivers/gpu/drm/exynos/exynos_drm_fbdev.c struct exynos_drm_gem *exynos_gem = exynos_fbd->exynos_gem; exynos_gem 49 drivers/gpu/drm/exynos/exynos_drm_fbdev.c if (vm_size > exynos_gem->size) exynos_gem 52 drivers/gpu/drm/exynos/exynos_drm_fbdev.c ret = dma_mmap_attrs(to_dma_dev(helper->dev), vma, exynos_gem->cookie, exynos_gem 53 drivers/gpu/drm/exynos/exynos_drm_fbdev.c exynos_gem->dma_addr, exynos_gem->size, exynos_gem 54 drivers/gpu/drm/exynos/exynos_drm_fbdev.c exynos_gem->dma_attrs); exynos_gem 74 drivers/gpu/drm/exynos/exynos_drm_fbdev.c struct exynos_drm_gem *exynos_gem) exynos_gem 93 drivers/gpu/drm/exynos/exynos_drm_fbdev.c nr_pages = exynos_gem->size >> PAGE_SHIFT; exynos_gem 95 drivers/gpu/drm/exynos/exynos_drm_fbdev.c exynos_gem->kvaddr = (void __iomem *) vmap(exynos_gem->pages, nr_pages, exynos_gem 97 drivers/gpu/drm/exynos/exynos_drm_fbdev.c if (!exynos_gem->kvaddr) { exynos_gem 106 drivers/gpu/drm/exynos/exynos_drm_fbdev.c fbi->screen_base = exynos_gem->kvaddr + offset; exynos_gem 117 drivers/gpu/drm/exynos/exynos_drm_fbdev.c struct exynos_drm_gem *exynos_gem; exynos_gem 136 drivers/gpu/drm/exynos/exynos_drm_fbdev.c exynos_gem = exynos_drm_gem_create(dev, EXYNOS_BO_CONTIG, size); exynos_gem 142 drivers/gpu/drm/exynos/exynos_drm_fbdev.c if (IS_ERR(exynos_gem) && is_drm_iommu_supported(dev)) { exynos_gem 144 drivers/gpu/drm/exynos/exynos_drm_fbdev.c exynos_gem = exynos_drm_gem_create(dev, EXYNOS_BO_NONCONTIG, exynos_gem 148 drivers/gpu/drm/exynos/exynos_drm_fbdev.c if (IS_ERR(exynos_gem)) exynos_gem 149 drivers/gpu/drm/exynos/exynos_drm_fbdev.c return PTR_ERR(exynos_gem); exynos_gem 151 drivers/gpu/drm/exynos/exynos_drm_fbdev.c exynos_fbdev->exynos_gem = exynos_gem; exynos_gem 154 drivers/gpu/drm/exynos/exynos_drm_fbdev.c exynos_drm_framebuffer_init(dev, &mode_cmd, &exynos_gem, 1); exynos_gem 161 drivers/gpu/drm/exynos/exynos_drm_fbdev.c ret = exynos_drm_fbdev_update(helper, sizes, exynos_gem); exynos_gem 170 drivers/gpu/drm/exynos/exynos_drm_fbdev.c exynos_drm_gem_destroy(exynos_gem); exynos_gem 241 drivers/gpu/drm/exynos/exynos_drm_fbdev.c struct exynos_drm_gem *exynos_gem = exynos_fbd->exynos_gem; exynos_gem 244 drivers/gpu/drm/exynos/exynos_drm_fbdev.c vunmap(exynos_gem->kvaddr); exynos_gem 718 drivers/gpu/drm/exynos/exynos_drm_g2d.c struct exynos_drm_gem *exynos_gem; exynos_gem 720 drivers/gpu/drm/exynos/exynos_drm_g2d.c exynos_gem = exynos_drm_gem_get(file, handle); exynos_gem 721 drivers/gpu/drm/exynos/exynos_drm_g2d.c if (!exynos_gem) { exynos_gem 727 drivers/gpu/drm/exynos/exynos_drm_g2d.c reg_type, exynos_gem->size)) { exynos_gem 728 drivers/gpu/drm/exynos/exynos_drm_g2d.c exynos_drm_gem_put(exynos_gem); exynos_gem 733 drivers/gpu/drm/exynos/exynos_drm_g2d.c addr = &exynos_gem->dma_addr; exynos_gem 734 drivers/gpu/drm/exynos/exynos_drm_g2d.c buf_info->obj[reg_type] = exynos_gem; exynos_gem 20 drivers/gpu/drm/exynos/exynos_drm_gem.c static int exynos_drm_alloc_buf(struct exynos_drm_gem *exynos_gem) exynos_gem 22 drivers/gpu/drm/exynos/exynos_drm_gem.c struct drm_device *dev = exynos_gem->base.dev; exynos_gem 28 drivers/gpu/drm/exynos/exynos_drm_gem.c if (exynos_gem->dma_addr) { exynos_gem 33 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->dma_attrs = 0; exynos_gem 40 drivers/gpu/drm/exynos/exynos_drm_gem.c if (!(exynos_gem->flags & EXYNOS_BO_NONCONTIG)) exynos_gem 41 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->dma_attrs |= DMA_ATTR_FORCE_CONTIGUOUS; exynos_gem 47 drivers/gpu/drm/exynos/exynos_drm_gem.c if (exynos_gem->flags & EXYNOS_BO_WC || exynos_gem 48 drivers/gpu/drm/exynos/exynos_drm_gem.c !(exynos_gem->flags & EXYNOS_BO_CACHABLE)) exynos_gem 53 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->dma_attrs |= attr; exynos_gem 54 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->dma_attrs |= DMA_ATTR_NO_KERNEL_MAPPING; exynos_gem 56 drivers/gpu/drm/exynos/exynos_drm_gem.c nr_pages = exynos_gem->size >> PAGE_SHIFT; exynos_gem 58 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->pages = kvmalloc_array(nr_pages, sizeof(struct page *), exynos_gem 60 drivers/gpu/drm/exynos/exynos_drm_gem.c if (!exynos_gem->pages) { exynos_gem 65 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->cookie = dma_alloc_attrs(to_dma_dev(dev), exynos_gem->size, exynos_gem 66 drivers/gpu/drm/exynos/exynos_drm_gem.c &exynos_gem->dma_addr, GFP_KERNEL, exynos_gem 67 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->dma_attrs); exynos_gem 68 drivers/gpu/drm/exynos/exynos_drm_gem.c if (!exynos_gem->cookie) { exynos_gem 73 drivers/gpu/drm/exynos/exynos_drm_gem.c ret = dma_get_sgtable_attrs(to_dma_dev(dev), &sgt, exynos_gem->cookie, exynos_gem 74 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->dma_addr, exynos_gem->size, exynos_gem 75 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->dma_attrs); exynos_gem 81 drivers/gpu/drm/exynos/exynos_drm_gem.c if (drm_prime_sg_to_page_addr_arrays(&sgt, exynos_gem->pages, NULL, exynos_gem 91 drivers/gpu/drm/exynos/exynos_drm_gem.c (unsigned long)exynos_gem->dma_addr, exynos_gem->size); exynos_gem 98 drivers/gpu/drm/exynos/exynos_drm_gem.c dma_free_attrs(to_dma_dev(dev), exynos_gem->size, exynos_gem->cookie, exynos_gem 99 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->dma_addr, exynos_gem->dma_attrs); exynos_gem 101 drivers/gpu/drm/exynos/exynos_drm_gem.c kvfree(exynos_gem->pages); exynos_gem 106 drivers/gpu/drm/exynos/exynos_drm_gem.c static void exynos_drm_free_buf(struct exynos_drm_gem *exynos_gem) exynos_gem 108 drivers/gpu/drm/exynos/exynos_drm_gem.c struct drm_device *dev = exynos_gem->base.dev; exynos_gem 110 drivers/gpu/drm/exynos/exynos_drm_gem.c if (!exynos_gem->dma_addr) { exynos_gem 116 drivers/gpu/drm/exynos/exynos_drm_gem.c (unsigned long)exynos_gem->dma_addr, exynos_gem->size); exynos_gem 118 drivers/gpu/drm/exynos/exynos_drm_gem.c dma_free_attrs(to_dma_dev(dev), exynos_gem->size, exynos_gem->cookie, exynos_gem 119 drivers/gpu/drm/exynos/exynos_drm_gem.c (dma_addr_t)exynos_gem->dma_addr, exynos_gem 120 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->dma_attrs); exynos_gem 122 drivers/gpu/drm/exynos/exynos_drm_gem.c kvfree(exynos_gem->pages); exynos_gem 147 drivers/gpu/drm/exynos/exynos_drm_gem.c void exynos_drm_gem_destroy(struct exynos_drm_gem *exynos_gem) exynos_gem 149 drivers/gpu/drm/exynos/exynos_drm_gem.c struct drm_gem_object *obj = &exynos_gem->base; exynos_gem 161 drivers/gpu/drm/exynos/exynos_drm_gem.c drm_prime_gem_destroy(obj, exynos_gem->sgt); exynos_gem 163 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_drm_free_buf(exynos_gem); exynos_gem 168 drivers/gpu/drm/exynos/exynos_drm_gem.c kfree(exynos_gem); exynos_gem 174 drivers/gpu/drm/exynos/exynos_drm_gem.c struct exynos_drm_gem *exynos_gem; exynos_gem 178 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem = kzalloc(sizeof(*exynos_gem), GFP_KERNEL); exynos_gem 179 drivers/gpu/drm/exynos/exynos_drm_gem.c if (!exynos_gem) exynos_gem 182 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->size = size; exynos_gem 183 drivers/gpu/drm/exynos/exynos_drm_gem.c obj = &exynos_gem->base; exynos_gem 188 drivers/gpu/drm/exynos/exynos_drm_gem.c kfree(exynos_gem); exynos_gem 195 drivers/gpu/drm/exynos/exynos_drm_gem.c kfree(exynos_gem); exynos_gem 201 drivers/gpu/drm/exynos/exynos_drm_gem.c return exynos_gem; exynos_gem 208 drivers/gpu/drm/exynos/exynos_drm_gem.c struct exynos_drm_gem *exynos_gem; exynos_gem 224 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem = exynos_drm_gem_init(dev, size); exynos_gem 225 drivers/gpu/drm/exynos/exynos_drm_gem.c if (IS_ERR(exynos_gem)) exynos_gem 226 drivers/gpu/drm/exynos/exynos_drm_gem.c return exynos_gem; exynos_gem 238 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->flags = flags; exynos_gem 240 drivers/gpu/drm/exynos/exynos_drm_gem.c ret = exynos_drm_alloc_buf(exynos_gem); exynos_gem 242 drivers/gpu/drm/exynos/exynos_drm_gem.c drm_gem_object_release(&exynos_gem->base); exynos_gem 243 drivers/gpu/drm/exynos/exynos_drm_gem.c kfree(exynos_gem); exynos_gem 247 drivers/gpu/drm/exynos/exynos_drm_gem.c return exynos_gem; exynos_gem 254 drivers/gpu/drm/exynos/exynos_drm_gem.c struct exynos_drm_gem *exynos_gem; exynos_gem 257 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem = exynos_drm_gem_create(dev, args->flags, args->size); exynos_gem 258 drivers/gpu/drm/exynos/exynos_drm_gem.c if (IS_ERR(exynos_gem)) exynos_gem 259 drivers/gpu/drm/exynos/exynos_drm_gem.c return PTR_ERR(exynos_gem); exynos_gem 261 drivers/gpu/drm/exynos/exynos_drm_gem.c ret = exynos_drm_gem_handle_create(&exynos_gem->base, file_priv, exynos_gem 264 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_drm_gem_destroy(exynos_gem); exynos_gem 291 drivers/gpu/drm/exynos/exynos_drm_gem.c static int exynos_drm_gem_mmap_buffer(struct exynos_drm_gem *exynos_gem, exynos_gem 294 drivers/gpu/drm/exynos/exynos_drm_gem.c struct drm_device *drm_dev = exynos_gem->base.dev; exynos_gem 304 drivers/gpu/drm/exynos/exynos_drm_gem.c if (vm_size > exynos_gem->size) exynos_gem 307 drivers/gpu/drm/exynos/exynos_drm_gem.c ret = dma_mmap_attrs(to_dma_dev(drm_dev), vma, exynos_gem->cookie, exynos_gem 308 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->dma_addr, exynos_gem->size, exynos_gem 309 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->dma_attrs); exynos_gem 321 drivers/gpu/drm/exynos/exynos_drm_gem.c struct exynos_drm_gem *exynos_gem; exynos_gem 331 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem = to_exynos_gem(obj); exynos_gem 333 drivers/gpu/drm/exynos/exynos_drm_gem.c args->flags = exynos_gem->flags; exynos_gem 334 drivers/gpu/drm/exynos/exynos_drm_gem.c args->size = exynos_gem->size; exynos_gem 350 drivers/gpu/drm/exynos/exynos_drm_gem.c struct exynos_drm_gem *exynos_gem; exynos_gem 368 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem = exynos_drm_gem_create(dev, flags, args->size); exynos_gem 369 drivers/gpu/drm/exynos/exynos_drm_gem.c if (IS_ERR(exynos_gem)) { exynos_gem 371 drivers/gpu/drm/exynos/exynos_drm_gem.c return PTR_ERR(exynos_gem); exynos_gem 374 drivers/gpu/drm/exynos/exynos_drm_gem.c ret = exynos_drm_gem_handle_create(&exynos_gem->base, file_priv, exynos_gem 377 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_drm_gem_destroy(exynos_gem); exynos_gem 388 drivers/gpu/drm/exynos/exynos_drm_gem.c struct exynos_drm_gem *exynos_gem = to_exynos_gem(obj); exynos_gem 394 drivers/gpu/drm/exynos/exynos_drm_gem.c if (page_offset >= (exynos_gem->size >> PAGE_SHIFT)) { exynos_gem 399 drivers/gpu/drm/exynos/exynos_drm_gem.c pfn = page_to_pfn(exynos_gem->pages[page_offset]); exynos_gem 407 drivers/gpu/drm/exynos/exynos_drm_gem.c struct exynos_drm_gem *exynos_gem = to_exynos_gem(obj); exynos_gem 411 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->flags); exynos_gem 414 drivers/gpu/drm/exynos/exynos_drm_gem.c if (exynos_gem->flags & EXYNOS_BO_CACHABLE) exynos_gem 416 drivers/gpu/drm/exynos/exynos_drm_gem.c else if (exynos_gem->flags & EXYNOS_BO_WC) exynos_gem 423 drivers/gpu/drm/exynos/exynos_drm_gem.c ret = exynos_drm_gem_mmap_buffer(exynos_gem, vma); exynos_gem 464 drivers/gpu/drm/exynos/exynos_drm_gem.c struct exynos_drm_gem *exynos_gem = to_exynos_gem(obj); exynos_gem 467 drivers/gpu/drm/exynos/exynos_drm_gem.c npages = exynos_gem->size >> PAGE_SHIFT; exynos_gem 469 drivers/gpu/drm/exynos/exynos_drm_gem.c return drm_prime_pages_to_sg(exynos_gem->pages, npages); exynos_gem 477 drivers/gpu/drm/exynos/exynos_drm_gem.c struct exynos_drm_gem *exynos_gem; exynos_gem 481 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem = exynos_drm_gem_init(dev, attach->dmabuf->size); exynos_gem 482 drivers/gpu/drm/exynos/exynos_drm_gem.c if (IS_ERR(exynos_gem)) { exynos_gem 483 drivers/gpu/drm/exynos/exynos_drm_gem.c ret = PTR_ERR(exynos_gem); exynos_gem 487 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->dma_addr = sg_dma_address(sgt->sgl); exynos_gem 489 drivers/gpu/drm/exynos/exynos_drm_gem.c npages = exynos_gem->size >> PAGE_SHIFT; exynos_gem 490 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->pages = kvmalloc_array(npages, sizeof(struct page *), GFP_KERNEL); exynos_gem 491 drivers/gpu/drm/exynos/exynos_drm_gem.c if (!exynos_gem->pages) { exynos_gem 496 drivers/gpu/drm/exynos/exynos_drm_gem.c ret = drm_prime_sg_to_page_addr_arrays(sgt, exynos_gem->pages, NULL, exynos_gem 501 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->sgt = sgt; exynos_gem 505 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->flags |= EXYNOS_BO_CONTIG; exynos_gem 513 drivers/gpu/drm/exynos/exynos_drm_gem.c exynos_gem->flags |= EXYNOS_BO_NONCONTIG; exynos_gem 516 drivers/gpu/drm/exynos/exynos_drm_gem.c return &exynos_gem->base; exynos_gem 519 drivers/gpu/drm/exynos/exynos_drm_gem.c kvfree(exynos_gem->pages); exynos_gem 521 drivers/gpu/drm/exynos/exynos_drm_gem.c drm_gem_object_release(&exynos_gem->base); exynos_gem 522 drivers/gpu/drm/exynos/exynos_drm_gem.c kfree(exynos_gem); exynos_gem 56 drivers/gpu/drm/exynos/exynos_drm_gem.h void exynos_drm_gem_destroy(struct exynos_drm_gem *exynos_gem); exynos_gem 87 drivers/gpu/drm/exynos/exynos_drm_gem.h static inline void exynos_drm_gem_put(struct exynos_drm_gem *exynos_gem) exynos_gem 89 drivers/gpu/drm/exynos/exynos_drm_gem.h drm_gem_object_put_unlocked(&exynos_gem->base); exynos_gem 363 drivers/gpu/drm/exynos/exynos_drm_ipp.c buf->exynos_gem[i] = gem; exynos_gem 365 drivers/gpu/drm/exynos/exynos_drm_ipp.c if (size + buf->buf.offset[i] > buf->exynos_gem[i]->size) { exynos_gem 370 drivers/gpu/drm/exynos/exynos_drm_ipp.c buf->dma_addr[i] = buf->exynos_gem[i]->dma_addr + exynos_gem 377 drivers/gpu/drm/exynos/exynos_drm_ipp.c exynos_drm_gem_put(buf->exynos_gem[i]); exynos_gem 378 drivers/gpu/drm/exynos/exynos_drm_ipp.c buf->exynos_gem[i] = NULL; exynos_gem 387 drivers/gpu/drm/exynos/exynos_drm_ipp.c if (!buf->exynos_gem[0]) exynos_gem 390 drivers/gpu/drm/exynos/exynos_drm_ipp.c exynos_drm_gem_put(buf->exynos_gem[i]); exynos_gem 73 drivers/gpu/drm/exynos/exynos_drm_ipp.h struct exynos_drm_gem *exynos_gem[MAX_FB_BUFFER];