History

drm/panfrost: Add support for GPU heap allocations

The midgard/bifrost GPUs need to allocate GPU heap memory which is allocated on GPU page faults and not pinned in memory. The vendor driver calls this functionality GROW_ON_GPF. This implementation assumes that BOs allocated with the PANFROST_BO_NOEXEC flag are never mmapped or exported. Both of those may actually work, but I'm unsure if there's some interaction there. It would cause the whole object to be pinned in memory which would defeat the point of this. On faults, we map in 2MB at a time in order to utilize huge pages (if enabled). Currently, once we've mapped pages in, they are only unmapped if the BO is freed. Once we add shrinker support, we can unmap pages with the shrinker.

Rob Herring committed 7 years ago

Commit 187d2921 parent b31bdd16 files · +172 −17Browse files

Showing the changes to include/uapi (1 of 6 files). Show all

Unified · Split

include/uapi/drm/panfrost_drm.h+1−0
@@ -85,6 +85,7 @@ struct drm_panfrost_wait_bo { · 84 unmodified lines
85};85};
86 86
87#define PANFROST_BO_NOEXEC 187#define PANFROST_BO_NOEXEC 1
88#define PANFROST_BO_HEAP 2
88 89
89/**90/**
90 * struct drm_panfrost_create_bo - ioctl argument for creating Panfrost BOs.91 * struct drm_panfrost_create_bo - ioctl argument for creating Panfrost BOs.

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