History

drm/i915: Make the physical object coherent with GTT

Currently objects for which the hardware needs a contiguous physical address are allocated a shadow backing storage to satisfy the contraint. This shadow buffer is not wired into the normal obj->pages and so the physical object is incoherent with accesses via the GPU, GTT and CPU. By setting up the appropriate scatter-gather table, we can allow userspace to access the physical object via either a GTT mmaping of or by rendering into the GEM bo. However, keeping the CPU mmap of the shmemfs backing storage coherent with the contiguous shadow is not yet possible. Fortuituously, CPU mmaps of objects requiring physical addresses are not expected to be coherent anyway. This allows the physical constraint of the GEM object to be transparent to userspace and allow it to efficiently render into or update them via the GTT and GPU. v2: Fix leak of pci handle spotted by Ville v3: Remove the now duplicate call to detach_phys_object during free. v4: Wait for rendering before pwrite. As this patch makes it possible to render into the phys object, we should make it correct as well!

Chris Wilson committed 12 years ago

Commit 6a2c4231 parent 132f3f14 files · +150 −67Browse files

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

Unified · Split

include/uapi/drm/i915_drm.h+1−0
@@ -340,6 +340,7 @@ typedef struct drm_i915_irq_wait { · 339 unmodified lines
340340 #define I915_PARAM_HAS_EXEC_HANDLE_LUT 26
341341 #define I915_PARAM_HAS_WT 27
342342 #define I915_PARAM_CMD_PARSER_VERSION 28
343+#define I915_PARAM_HAS_COHERENT_PHYS_GTT 29
343344
344345 typedef struct drm_i915_getparam {
345346 int param;

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