History

drm/i915: Give proper names to MOCS entries

The purpose for each MOCS entry isn't well defined atm. Defining these is important to remove any uncertainty about the use of these entries for example in terms of performance and GPU/CPU coherency. Suggested by Ville. v4: - Rename I915_MOCS_AUTO to I915_MOCS_PTE. (Chris)

Imre Deak committed 10 years ago

Commit 3373ce21 parent 6bee14e2 files · +31 −6Browse files

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

Unified · Split

include/uapi/drm/i915_drm.h+24−0
@@ -62,6 +62,30 @@ extern "C" { · 61 unmodified lines
62#define I915_ERROR_UEVENT "ERROR"62#define I915_ERROR_UEVENT "ERROR"
63#define I915_RESET_UEVENT "RESET"63#define I915_RESET_UEVENT "RESET"
64 64
65/*
66 * MOCS indexes used for GPU surfaces, defining the cacheability of the
67 * surface data and the coherency for this data wrt. CPU vs. GPU accesses.
68 */
69enum i915_mocs_table_index {
70 /*
71 * Not cached anywhere, coherency between CPU and GPU accesses is
72 * guaranteed.
73 */
74 I915_MOCS_UNCACHED,
75 /*
76 * Cacheability and coherency controlled by the kernel automatically
77 * based on the DRM_I915_GEM_SET_CACHING IOCTL setting and the current
78 * usage of the surface (used for display scanout or not).
79 */
80 I915_MOCS_PTE,
81 /*
82 * Cached in all GPU caches available on the platform.
83 * Coherency between CPU and GPU accesses to the surface is not
84 * guaranteed without extra synchronization.
85 */
86 I915_MOCS_CACHED,
87};
88
65/* Each region is a minimum of 16k, and there are at most 255 of them.89/* Each region is a minimum of 16k, and there are at most 255 of them.
66 */90 */
67#define I915_NR_TEX_REGIONS 255 /* table size 2k - maximum due to use91#define I915_NR_TEX_REGIONS 255 /* table size 2k - maximum due to use

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