History

accel/ivpu: Remove support for uncached buffers

Usages of DRM_IVPU_BO_UNCACHED should be replaced by DRM_IVPU_BO_WC. There is no functional benefit from DRM_IVPU_BO_UNCACHED if these buffers are never mapped to host VM. This allows to cut the buffer handling code in the kernel driver by half. Usage of DRM_IVPU_BO_UNCACHED buffers was removed from user-space driver and will not be part of first UMD release.

Jacek Lawrynowicz committed 3 years ago

Commit 48d45fa1 parent 48aea7f3 files · +2 −5Browse files

Unified · Split

3 files
  1. drivers/accel/ivpu/ivpu_fw.c +1 −1
  2. drivers/accel/ivpu/ivpu_gem.c +0 −3
  3. include/uapi/drm/ivpu_accel.h +1 −1
drivers/accel/ivpu/ivpu_fw.c+1−1
@@ -286,7 +286,7 @@ static int ivpu_fw_mem_init(struct ivpu_device *vdev) · 285 unmodified lines
286 286
287 if (fw->shave_nn_size) {287 if (fw->shave_nn_size) {
288 fw->mem_shave_nn = ivpu_bo_alloc_internal(vdev, vdev->hw->ranges.shave.start,288 fw->mem_shave_nn = ivpu_bo_alloc_internal(vdev, vdev->hw->ranges.shave.start,
289 fw->shave_nn_size, DRM_IVPU_BO_UNCACHED);289 fw->shave_nn_size, DRM_IVPU_BO_WC);
290 if (!fw->mem_shave_nn) {290 if (!fw->mem_shave_nn) {
291 ivpu_err(vdev, "Failed to allocate shavenn buffer\n");291 ivpu_err(vdev, "Failed to allocate shavenn buffer\n");
292 ret = -ENOMEM;292 ret = -ENOMEM;
drivers/accel/ivpu/ivpu_gem.c+0−3
@@ -89,8 +89,6 @@ static int __must_check shmem_alloc_pages_locked(struct ivpu_bo *bo) · 88 unmodified lines
89 89
90 if (bo->flags & DRM_IVPU_BO_WC)90 if (bo->flags & DRM_IVPU_BO_WC)
91 set_pages_array_wc(pages, npages);91 set_pages_array_wc(pages, npages);
92 else if (bo->flags & DRM_IVPU_BO_UNCACHED)
93 set_pages_array_uc(pages, npages);
94 92
95 bo->pages = pages;93 bo->pages = pages;
96 return 0;94 return 0;
@@ -366,7 +364,6 @@ ivpu_bo_alloc(struct ivpu_device *vdev, u64 size, u32 flags, const struct ivpu_b · 269 unmodified lines
366 364
367 switch (flags & DRM_IVPU_BO_CACHE_MASK) {365 switch (flags & DRM_IVPU_BO_CACHE_MASK) {
368 case DRM_IVPU_BO_CACHED:366 case DRM_IVPU_BO_CACHED:
369 case DRM_IVPU_BO_UNCACHED:
370 case DRM_IVPU_BO_WC:367 case DRM_IVPU_BO_WC:
371 break;368 break;
372 default:369 default:
include/uapi/drm/ivpu_accel.h+1−1
@@ -196,7 +196,7 @@ struct drm_ivpu_bo_create { · 195 unmodified lines
196 *196 *
197 * %DRM_IVPU_BO_UNCACHED:197 * %DRM_IVPU_BO_UNCACHED:
198 *198 *
199 * Allocated BO will not be cached on host side nor snooped on the VPU side.199 * Not supported. Use DRM_IVPU_BO_WC instead.
200 *200 *
201 * %DRM_IVPU_BO_WC:201 * %DRM_IVPU_BO_WC:
202 *202 *

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t