Rev 4768 | Rev 5068 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4768 | Rev 5022 | ||
---|---|---|---|
Line 31... | Line 31... | ||
31 | 31 | ||
32 | /* Please note that modifications to all structs defined here are |
32 | /* Please note that modifications to all structs defined here are |
33 | * subject to backwards-compatibility constraints. |
33 | * subject to backwards-compatibility constraints. |
Line -... | Line 34... | ||
- | 34 | */ |
|
- | 35 | ||
- | 36 | /** |
|
- | 37 | * DOC: uevents generated by i915 on it's device node |
|
- | 38 | * |
|
- | 39 | * I915_L3_PARITY_UEVENT - Generated when the driver receives a parity mismatch |
|
- | 40 | * event from the gpu l3 cache. Additional information supplied is ROW, |
|
- | 41 | * BANK, SUBBANK, SLICE of the affected cacheline. Userspace should keep |
|
- | 42 | * track of these events and if a specific cache-line seems to have a |
|
- | 43 | * persistent error remap it with the l3 remapping tool supplied in |
|
- | 44 | * intel-gpu-tools. The value supplied with the event is always 1. |
|
- | 45 | * |
|
- | 46 | * I915_ERROR_UEVENT - Generated upon error detection, currently only via |
|
- | 47 | * hangcheck. The error detection event is a good indicator of when things |
|
- | 48 | * began to go badly. The value supplied with the event is a 1 upon error |
|
- | 49 | * detection, and a 0 upon reset completion, signifying no more error |
|
- | 50 | * exists. NOTE: Disabling hangcheck or reset via module parameter will |
|
- | 51 | * cause the related events to not be seen. |
|
- | 52 | * |
|
- | 53 | * I915_RESET_UEVENT - Event is generated just before an attempt to reset the |
|
- | 54 | * the GPU. The value supplied with the event is always 1. NOTE: Disable |
|
- | 55 | * reset via module parameter will cause this event to not be seen. |
|
- | 56 | */ |
|
- | 57 | #define I915_L3_PARITY_UEVENT "L3_PARITY_ERROR" |
|
Line 34... | Line 58... | ||
34 | */ |
58 | #define I915_ERROR_UEVENT "ERROR" |
35 | 59 | #define I915_RESET_UEVENT "RESET" |
|
36 | 60 | ||
37 | /* Each region is a minimum of 16k, and there are at most 255 of them. |
61 | /* Each region is a minimum of 16k, and there are at most 255 of them. |
Line 193... | Line 217... | ||
193 | #define DRM_I915_GET_SPRITE_COLORKEY 0x2a |
217 | #define DRM_I915_GET_SPRITE_COLORKEY 0x2a |
194 | #define DRM_I915_SET_SPRITE_COLORKEY 0x2b |
218 | #define DRM_I915_SET_SPRITE_COLORKEY 0x2b |
195 | #define DRM_I915_GEM_WAIT 0x2c |
219 | #define DRM_I915_GEM_WAIT 0x2c |
196 | #define DRM_I915_GEM_CONTEXT_CREATE 0x2d |
220 | #define DRM_I915_GEM_CONTEXT_CREATE 0x2d |
197 | #define DRM_I915_GEM_CONTEXT_DESTROY 0x2e |
221 | #define DRM_I915_GEM_CONTEXT_DESTROY 0x2e |
198 | #define DRM_I915_GEM_SET_CACHEING 0x2f |
222 | #define DRM_I915_GEM_SET_CACHING 0x2f |
199 | #define DRM_I915_GEM_GET_CACHEING 0x30 |
223 | #define DRM_I915_GEM_GET_CACHING 0x30 |
200 | #define DRM_I915_REG_READ 0x31 |
224 | #define DRM_I915_REG_READ 0x31 |
201 | #define DRM_I915_GET_RESET_STATS 0x32 |
225 | #define DRM_I915_GET_RESET_STATS 0x32 |
Line 202... | Line 226... | ||
202 | 226 | ||
203 | #define DRM_IOCTL_I915_INIT |
227 | #define DRM_IOCTL_I915_INIT |
Line 303... | Line 327... | ||
303 | #define I915_PARAM_HAS_RELAXED_DELTA 15 |
327 | #define I915_PARAM_HAS_RELAXED_DELTA 15 |
304 | #define I915_PARAM_HAS_GEN7_SOL_RESET 16 |
328 | #define I915_PARAM_HAS_GEN7_SOL_RESET 16 |
305 | #define I915_PARAM_HAS_LLC 17 |
329 | #define I915_PARAM_HAS_LLC 17 |
306 | #define I915_PARAM_HAS_ALIASING_PPGTT 18 |
330 | #define I915_PARAM_HAS_ALIASING_PPGTT 18 |
307 | #define I915_PARAM_HAS_WAIT_TIMEOUT 19 |
331 | #define I915_PARAM_HAS_WAIT_TIMEOUT 19 |
- | 332 | #define I915_PARAM_HAS_SEMAPHORES 20 |
|
- | 333 | #define I915_PARAM_HAS_PRIME_VMAP_FLUSH 21 |
|
308 | #define I915_PARAM_HAS_VEBOX 22 |
334 | #define I915_PARAM_HAS_VEBOX 22 |
- | 335 | #define I915_PARAM_HAS_SECURE_BATCHES 23 |
|
- | 336 | #define I915_PARAM_HAS_PINNED_BATCHES 24 |
|
- | 337 | #define I915_PARAM_HAS_EXEC_NO_RELOC 25 |
|
- | 338 | #define I915_PARAM_HAS_EXEC_HANDLE_LUT 26 |
|
- | 339 | #define I915_PARAM_HAS_WT 27 |
|
- | 340 | #define I915_PARAM_CMD_PARSER_VERSION 28 |
|
Line 309... | Line 341... | ||
309 | 341 | ||
310 | typedef struct drm_i915_getparam { |
342 | typedef struct drm_i915_getparam { |
311 | int param; |
343 | int param; |
312 | int *value; |
344 | int *value; |
Line 624... | Line 656... | ||
624 | * presumed_offset writes. |
656 | * presumed_offset writes. |
625 | */ |
657 | */ |
626 | __u64 offset; |
658 | __u64 offset; |
Line 627... | Line 659... | ||
627 | 659 | ||
- | 660 | #define EXEC_OBJECT_NEEDS_FENCE (1<<0) |
|
- | 661 | #define EXEC_OBJECT_NEEDS_GTT (1<<1) |
|
- | 662 | #define EXEC_OBJECT_WRITE (1<<2) |
|
628 | #define EXEC_OBJECT_NEEDS_FENCE (1<<0) |
663 | #define __EXEC_OBJECT_UNKNOWN_FLAGS -(EXEC_OBJECT_WRITE<<1) |
- | 664 | __u64 flags; |
|
629 | __u64 flags; |
665 | |
630 | __u64 rsvd1; |
666 | __u64 rsvd1; |
631 | __u64 rsvd2; |
667 | __u64 rsvd2; |
Line 632... | Line 668... | ||
632 | }; |
668 | }; |
Line 670... | Line 706... | ||
670 | }; |
706 | }; |
Line 671... | Line 707... | ||
671 | 707 | ||
672 | /** Resets the SO write offset registers for transform feedback on gen7. */ |
708 | /** Resets the SO write offset registers for transform feedback on gen7. */ |
Line -... | Line 709... | ||
- | 709 | #define I915_EXEC_GEN7_SOL_RESET (1<<8) |
|
- | 710 | ||
- | 711 | /** Request a privileged ("secure") batch buffer. Note only available for |
|
- | 712 | * DRM_ROOT_ONLY | DRM_MASTER processes. |
|
- | 713 | */ |
|
- | 714 | #define I915_EXEC_SECURE (1<<9) |
|
- | 715 | ||
- | 716 | /** Inform the kernel that the batch is and will always be pinned. This |
|
- | 717 | * negates the requirement for a workaround to be performed to avoid |
|
- | 718 | * an incoherent CS (such as can be found on 830/845). If this flag is |
|
- | 719 | * not passed, the kernel will endeavour to make sure the batch is |
|
- | 720 | * coherent with the CS before execution. If this flag is passed, |
|
- | 721 | * userspace assumes the responsibility for ensuring the same. |
|
- | 722 | */ |
|
- | 723 | #define I915_EXEC_IS_PINNED (1<<10) |
|
- | 724 | ||
- | 725 | /** Provide a hint to the kernel that the command stream and auxiliary |
|
- | 726 | * state buffers already holds the correct presumed addresses and so the |
|
- | 727 | * relocation process may be skipped if no buffers need to be moved in |
|
- | 728 | * preparation for the execbuffer. |
|
- | 729 | */ |
|
- | 730 | #define I915_EXEC_NO_RELOC (1<<11) |
|
- | 731 | ||
- | 732 | /** Use the reloc.handle as an index into the exec object array rather |
|
- | 733 | * than as the per-file handle. |
|
- | 734 | */ |
|
- | 735 | #define I915_EXEC_HANDLE_LUT (1<<12) |
|
- | 736 | ||
673 | #define I915_EXEC_GEN7_SOL_RESET (1<<8) |
737 | #define __I915_EXEC_UNKNOWN_FLAGS -(I915_EXEC_HANDLE_LUT<<1) |
674 | 738 | ||
675 | #define I915_EXEC_CONTEXT_ID_MASK (0xffffffff) |
739 | #define I915_EXEC_CONTEXT_ID_MASK (0xffffffff) |
676 | #define i915_execbuffer2_set_context_id(eb2, context) \ |
740 | #define i915_execbuffer2_set_context_id(eb2, context) \ |
677 | (eb2).rsvd1 = context & I915_EXEC_CONTEXT_ID_MASK |
741 | (eb2).rsvd1 = context & I915_EXEC_CONTEXT_ID_MASK |
Line 706... | Line 770... | ||
706 | * 16:31 - busy (r or r/w) rings (16 render, 17 bsd, 18 blt, etc) |
770 | * 16:31 - busy (r or r/w) rings (16 render, 17 bsd, 18 blt, etc) |
707 | */ |
771 | */ |
708 | __u32 busy; |
772 | __u32 busy; |
709 | }; |
773 | }; |
Line -... | Line 774... | ||
- | 774 | ||
- | 775 | /** |
|
- | 776 | * I915_CACHING_NONE |
|
- | 777 | * |
|
- | 778 | * GPU access is not coherent with cpu caches. Default for machines without an |
|
- | 779 | * LLC. |
|
710 | 780 | */ |
|
- | 781 | #define I915_CACHING_NONE 0 |
|
- | 782 | /** |
|
- | 783 | * I915_CACHING_CACHED |
|
- | 784 | * |
|
- | 785 | * GPU access is coherent with cpu caches and furthermore the data is cached in |
|
- | 786 | * last-level caches shared between cpu cores and the gpu GT. Default on |
|
- | 787 | * machines with HAS_LLC. |
|
711 | #define I915_CACHEING_NONE 0 |
788 | */ |
- | 789 | #define I915_CACHING_CACHED 1 |
|
- | 790 | /** |
|
- | 791 | * I915_CACHING_DISPLAY |
|
- | 792 | * |
|
- | 793 | * Special GPU caching mode which is coherent with the scanout engines. |
|
- | 794 | * Transparently falls back to I915_CACHING_NONE on platforms where no special |
|
- | 795 | * cache mode (like write-through or gfdt flushing) is available. The kernel |
|
- | 796 | * automatically sets this mode when using a buffer as a scanout target. |
|
- | 797 | * Userspace can manually set this mode to avoid a costly stall and clflush in |
|
- | 798 | * the hotpath of drawing the first frame. |
|
- | 799 | */ |
|
Line 712... | Line 800... | ||
712 | #define I915_CACHEING_CACHED 1 |
800 | #define I915_CACHING_DISPLAY 2 |
713 | 801 | ||
714 | struct drm_i915_gem_cacheing { |
802 | struct drm_i915_gem_caching { |
715 | /** |
803 | /** |
Line 716... | Line 804... | ||
716 | * Handle of the buffer to set/get the cacheing level of. */ |
804 | * Handle of the buffer to set/get the caching level of. */ |
717 | __u32 handle; |
805 | __u32 handle; |
718 | 806 | ||
719 | /** |
807 | /** |
720 | * Cacheing level to apply or return value |
808 | * Cacheing level to apply or return value |
721 | * |
809 | * |
722 | * bits0-15 are for generic cacheing control (i.e. the above defined |
810 | * bits0-15 are for generic caching control (i.e. the above defined |
723 | * values). bits16-31 are reserved for platform-specific variations |
811 | * values). bits16-31 are reserved for platform-specific variations |
Line 724... | Line 812... | ||
724 | * (e.g. l3$ caching on gen7). */ |
812 | * (e.g. l3$ caching on gen7). */ |
725 | __u32 cacheing; |
813 | __u32 caching; |
726 | }; |
814 | }; |
Line 960... | Line 1048... | ||
960 | __u32 batch_pending; |
1048 | __u32 batch_pending; |
Line 961... | Line 1049... | ||
961 | 1049 | ||
962 | __u32 pad; |
1050 | __u32 pad; |
Line -... | Line 1051... | ||
- | 1051 | }; |
|
- | 1052 | ||
- | 1053 | struct drm_i915_mask { |
|
- | 1054 | __u32 handle; |
|
- | 1055 | __u32 width; |
|
- | 1056 | __u32 height; |
|
- | 1057 | __u32 bo_size; |
|
- | 1058 | __u32 bo_pitch; |
|
- | 1059 | __u32 bo_map; |
|
963 | }; |
1060 | }; |
964 | 1061 | ||
965 | struct drm_i915_fb_info { |
1062 | struct drm_i915_fb_info { |
966 | __u32 name; |
1063 | __u32 name; |
967 | __u32 width; |
1064 | __u32 width; |