| .. | .. |
|---|
| 13 | 13 | * GNU General Public License for more details. |
|---|
| 14 | 14 | * |
|---|
| 15 | 15 | */ |
|---|
| 16 | | -#include <drm/drmP.h> |
|---|
| 16 | +#include <drm/drm_device.h> |
|---|
| 17 | 17 | #include <linux/dma-iommu.h> |
|---|
| 18 | 18 | #include <linux/dma-buf.h> |
|---|
| 19 | 19 | #include <linux/dma-mapping.h> |
|---|
| 20 | 20 | #include <linux/iommu.h> |
|---|
| 21 | 21 | #include <linux/kref.h> |
|---|
| 22 | +#include <linux/slab.h> |
|---|
| 22 | 23 | |
|---|
| 23 | 24 | #include "iep_iommu_ops.h" |
|---|
| 24 | 25 | |
|---|
| .. | .. |
|---|
| 229 | 230 | struct device *dev = session_info->dev; |
|---|
| 230 | 231 | struct iep_drm_buffer *drm_buffer; |
|---|
| 231 | 232 | |
|---|
| 232 | | - /* Force to flush iommu table */ |
|---|
| 233 | | - if (of_machine_is_compatible("rockchip,rk3288")) |
|---|
| 234 | | - rockchip_iovmm_invalidate_tlb(session_info->mmu_dev); |
|---|
| 235 | | - |
|---|
| 236 | 233 | mutex_lock(&session_info->list_mutex); |
|---|
| 237 | 234 | drm_buffer = iep_drm_get_buffer_no_lock(session_info, idx); |
|---|
| 238 | 235 | mutex_unlock(&session_info->list_mutex); |
|---|
| .. | .. |
|---|
| 254 | 251 | { |
|---|
| 255 | 252 | struct device *dev = session_info->dev; |
|---|
| 256 | 253 | struct iep_drm_buffer *drm_buffer; |
|---|
| 257 | | - |
|---|
| 258 | | - /* Force to flush iommu table */ |
|---|
| 259 | | - if (of_machine_is_compatible("rockchip,rk3288")) |
|---|
| 260 | | - rockchip_iovmm_invalidate_tlb(session_info->mmu_dev); |
|---|
| 261 | 254 | |
|---|
| 262 | 255 | mutex_lock(&session_info->list_mutex); |
|---|
| 263 | 256 | drm_buffer = iep_drm_get_buffer_no_lock(session_info, idx); |
|---|