forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-20 e636c8d336489bf3eed5878299e6cc045bbad077
kernel/drivers/gpu/drm/exynos/exynos_drm_gem.h
....@@ -1,12 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /* exynos_drm_gem.h
23 *
34 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
45 * Authoer: Inki Dae <inki.dae@samsung.com>
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms of the GNU General Public License as published by the
8
- * Free Software Foundation; either version 2 of the License, or (at your
9
- * option) any later version.
106 */
117
128 #ifndef _EXYNOS_DRM_GEM_H_
....@@ -25,20 +21,15 @@
2521 * @base: a gem object.
2622 * - a new handle to this gem object would be created
2723 * by drm_gem_handle_create().
28
- * @buffer: a pointer to exynos_drm_gem_buffer object.
29
- * - contain the information to memory region allocated
30
- * by user request or at framebuffer creation.
31
- * continuous memory region allocated by user request
32
- * or at framebuffer creation.
3324 * @flags: indicate memory type to allocated buffer and cache attruibute.
3425 * @size: size requested from user, in bytes and this size is aligned
3526 * in page unit.
3627 * @cookie: cookie returned by dma_alloc_attrs
37
- * @kvaddr: kernel virtual address to allocated memory region.
28
+ * @kvaddr: kernel virtual address to allocated memory region (for fbdev)
3829 * @dma_addr: bus address(accessed by dma) to allocated memory region.
3930 * - this address could be physical address without IOMMU and
4031 * device address with IOMMU.
41
- * @pages: Array of backing pages.
32
+ * @dma_attrs: attrs passed dma mapping framework
4233 * @sgt: Imported sg_table.
4334 *
4435 * P.S. this object would be transferred to user as kms_bo.handle so
....@@ -49,10 +40,9 @@
4940 unsigned int flags;
5041 unsigned long size;
5142 void *cookie;
52
- void __iomem *kvaddr;
43
+ void *kvaddr;
5344 dma_addr_t dma_addr;
5445 unsigned long dma_attrs;
55
- struct page **pages;
5646 struct sg_table *sgt;
5747 };
5848
....@@ -62,7 +52,8 @@
6252 /* create a new buffer with gem object */
6353 struct exynos_drm_gem *exynos_drm_gem_create(struct drm_device *dev,
6454 unsigned int flags,
65
- unsigned long size);
55
+ unsigned long size,
56
+ bool kvmap);
6657
6758 /*
6859 * request gem object creation and buffer allocation as the size
....@@ -90,7 +81,7 @@
9081 */
9182 static inline void exynos_drm_gem_put(struct exynos_drm_gem *exynos_gem)
9283 {
93
- drm_gem_object_put_unlocked(&exynos_gem->base);
84
+ drm_gem_object_put(&exynos_gem->base);
9485 }
9586
9687 /* get buffer information to memory region allocated by gem. */
....@@ -104,9 +95,6 @@
10495 int exynos_drm_gem_dumb_create(struct drm_file *file_priv,
10596 struct drm_device *dev,
10697 struct drm_mode_create_dumb *args);
107
-
108
-/* page fault handler and mmap fault address(virtual) to physical memory. */
109
-vm_fault_t exynos_drm_gem_fault(struct vm_fault *vmf);
11098
11199 /* set vm_flags and we can change the vm attribute to other one at here. */
112100 int exynos_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma);