aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-11 21:12:22 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-11 21:12:22 -0400
commit6b25e21fa6f26d0f0d45f161d169029411c84286 (patch)
treefdff805ecd81ec46951f49577efe450ddb7d060a /include/uapi
parenta379f71a30dddbd2e7393624e455ce53c87965d1 (diff)
parent69405d3da98b48633b78a49403e4f9cdb7c6a0f5 (diff)
Merge tag 'drm-for-v4.9' of git://people.freedesktop.org/~airlied/linux
Pull drm updates from Dave Airlie: "Core: - Fence destaging work - DRIVER_LEGACY to split off legacy drm drivers - drm_mm refactoring - Splitting drm_crtc.c into chunks and documenting better - Display info fixes - rbtree support for prime buffer lookup - Simple VGA DAC driver Panel: - Add Nexus 7 panel - More simple panels i915: - Refactoring GEM naming - Refactored vma/active tracking - Lockless request lookups - Better stolen memory support - FBC fixes - SKL watermark fixes - VGPU improvements - dma-buf fencing support - Better DP dongle support amdgpu: - Powerplay for Iceland asics - Improved GPU reset support - UVD/VEC powergating support for CZ/ST - Preinitialised VRAM buffer support - Virtual display support - Initial SI support - GTT rework - PCI shutdown callback support - HPD IRQ storm fixes amdkfd: - bugfixes tilcdc: - Atomic modesetting support mediatek: - AAL + GAMMA engine support - Hook up gamma LUT - Temporal dithering support imx: - Pixel clock from devicetree - drm bridge support for LVDS bridges - active plane reconfiguration - VDIC deinterlacer support - Frame synchronisation unit support - Color space conversion support analogix: - PSR support - Better panel on/off support rockchip: - rk3399 vop/crtc support - PSR support vc4: - Interlaced vblank timing - 3D rendering CPU overhead reduction - HDMI output fixes tda998x: - HDMI audio ASoC support sunxi: - Allwinner A33 support - better TCON support msm: - DT binding cleanups - Explicit fence-fd support sti: - remove sti415/416 support etnaviv: - MMUv2 refactoring - GC3000 support exynos: - Refactoring HDMI DCC/PHY - G2D pm regression fix - Page fault issues with wait for vblank There is no nouveau work in this tree, as Ben didn't get a pull request in, and he was fighting moving to atomic and adding mst support, so maybe best it waits for a cycle" * tag 'drm-for-v4.9' of git://people.freedesktop.org/~airlied/linux: (1412 commits) drm/crtc: constify drm_crtc_index parameter drm/i915: Fix conflict resolution from backmerge of v4.8-rc8 to drm-next drm/i915/guc: Unwind GuC workqueue reservation if request construction fails drm/i915: Reset the breadcrumbs IRQ more carefully drm/i915: Force relocations via cpu if we run out of idle aperture drm/i915: Distinguish last emitted request from last submitted request drm/i915: Allow DP to work w/o EDID drm/i915: Move long hpd handling into the hotplug work drm/i915/execlists: Reinitialise context image after GPU hang drm/i915: Use correct index for backtracking HUNG semaphores drm/i915: Unalias obj->phys_handle and obj->userptr drm/i915: Just clear the mmiodebug before a register access drm/i915/gen9: only add the planes actually affected by ddb changes drm/i915: Allow PCH DPLL sharing regardless of DPLL_SDVO_HIGH_SPEED drm/i915/bxt: Fix HDMI DPLL configuration drm/i915/gen9: fix the watermark res_blocks value drm/i915/gen9: fix plane_blocks_per_line on watermarks calculations drm/i915/gen9: minimum scanlines for Y tile is not always 4 drm/i915/gen9: fix the WaWmMemoryReadLatency implementation drm/i915/kbl: KBL also needs to run the SAGV code ...
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/drm/amdgpu_drm.h7
-rw-r--r--include/uapi/drm/drm.h1
-rw-r--r--include/uapi/drm/drm_mode.h39
-rw-r--r--include/uapi/drm/i915_drm.h59
-rw-r--r--include/uapi/drm/msm_drm.h22
-rw-r--r--include/uapi/linux/Kbuild1
-rw-r--r--include/uapi/linux/sync_file.h13
7 files changed, 123 insertions, 19 deletions
diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
index 462246aa200e..d6b5a21f3d3c 100644
--- a/include/uapi/drm/amdgpu_drm.h
+++ b/include/uapi/drm/amdgpu_drm.h
@@ -77,6 +77,10 @@ extern "C" {
77#define AMDGPU_GEM_CREATE_NO_CPU_ACCESS (1 << 1) 77#define AMDGPU_GEM_CREATE_NO_CPU_ACCESS (1 << 1)
78/* Flag that USWC attributes should be used for GTT */ 78/* Flag that USWC attributes should be used for GTT */
79#define AMDGPU_GEM_CREATE_CPU_GTT_USWC (1 << 2) 79#define AMDGPU_GEM_CREATE_CPU_GTT_USWC (1 << 2)
80/* Flag that the memory should be in VRAM and cleared */
81#define AMDGPU_GEM_CREATE_VRAM_CLEARED (1 << 3)
82/* Flag that create shadow bo(GTT) while allocating vram bo */
83#define AMDGPU_GEM_CREATE_SHADOW (1 << 4)
80 84
81struct drm_amdgpu_gem_create_in { 85struct drm_amdgpu_gem_create_in {
82 /** the requested memory size */ 86 /** the requested memory size */
@@ -481,6 +485,8 @@ struct drm_amdgpu_cs_chunk_data {
481#define AMDGPU_INFO_DEV_INFO 0x16 485#define AMDGPU_INFO_DEV_INFO 0x16
482/* visible vram usage */ 486/* visible vram usage */
483#define AMDGPU_INFO_VIS_VRAM_USAGE 0x17 487#define AMDGPU_INFO_VIS_VRAM_USAGE 0x17
488/* number of TTM buffer evictions */
489#define AMDGPU_INFO_NUM_EVICTIONS 0x18
484 490
485#define AMDGPU_INFO_MMR_SE_INDEX_SHIFT 0 491#define AMDGPU_INFO_MMR_SE_INDEX_SHIFT 0
486#define AMDGPU_INFO_MMR_SE_INDEX_MASK 0xff 492#define AMDGPU_INFO_MMR_SE_INDEX_MASK 0xff
@@ -643,6 +649,7 @@ struct drm_amdgpu_info_hw_ip {
643 * Supported GPU families 649 * Supported GPU families
644 */ 650 */
645#define AMDGPU_FAMILY_UNKNOWN 0 651#define AMDGPU_FAMILY_UNKNOWN 0
652#define AMDGPU_FAMILY_SI 110 /* Hainan, Oland, Verde, Pitcairn, Tahiti */
646#define AMDGPU_FAMILY_CI 120 /* Bonaire, Hawaii */ 653#define AMDGPU_FAMILY_CI 120 /* Bonaire, Hawaii */
647#define AMDGPU_FAMILY_KV 125 /* Kaveri, Kabini, Mullins */ 654#define AMDGPU_FAMILY_KV 125 /* Kaveri, Kabini, Mullins */
648#define AMDGPU_FAMILY_VI 130 /* Iceland, Tonga */ 655#define AMDGPU_FAMILY_VI 130 /* Iceland, Tonga */
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
index 452675fb55d9..b2c52843bc70 100644
--- a/include/uapi/drm/drm.h
+++ b/include/uapi/drm/drm.h
@@ -646,6 +646,7 @@ struct drm_gem_open {
646#define DRM_CAP_CURSOR_WIDTH 0x8 646#define DRM_CAP_CURSOR_WIDTH 0x8
647#define DRM_CAP_CURSOR_HEIGHT 0x9 647#define DRM_CAP_CURSOR_HEIGHT 0x9
648#define DRM_CAP_ADDFB2_MODIFIERS 0x10 648#define DRM_CAP_ADDFB2_MODIFIERS 0x10
649#define DRM_CAP_PAGE_FLIP_TARGET 0x11
649 650
650/** DRM_IOCTL_GET_CAP ioctl argument type */ 651/** DRM_IOCTL_GET_CAP ioctl argument type */
651struct drm_get_cap { 652struct drm_get_cap {
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index 49a72659b801..df0e3504c349 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -520,7 +520,13 @@ struct drm_color_lut {
520 520
521#define DRM_MODE_PAGE_FLIP_EVENT 0x01 521#define DRM_MODE_PAGE_FLIP_EVENT 0x01
522#define DRM_MODE_PAGE_FLIP_ASYNC 0x02 522#define DRM_MODE_PAGE_FLIP_ASYNC 0x02
523#define DRM_MODE_PAGE_FLIP_FLAGS (DRM_MODE_PAGE_FLIP_EVENT|DRM_MODE_PAGE_FLIP_ASYNC) 523#define DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4
524#define DRM_MODE_PAGE_FLIP_TARGET_RELATIVE 0x8
525#define DRM_MODE_PAGE_FLIP_TARGET (DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE | \
526 DRM_MODE_PAGE_FLIP_TARGET_RELATIVE)
527#define DRM_MODE_PAGE_FLIP_FLAGS (DRM_MODE_PAGE_FLIP_EVENT | \
528 DRM_MODE_PAGE_FLIP_ASYNC | \
529 DRM_MODE_PAGE_FLIP_TARGET)
524 530
525/* 531/*
526 * Request a page flip on the specified crtc. 532 * Request a page flip on the specified crtc.
@@ -543,8 +549,7 @@ struct drm_color_lut {
543 * 'as soon as possible', meaning that it not delay waiting for vblank. 549 * 'as soon as possible', meaning that it not delay waiting for vblank.
544 * This may cause tearing on the screen. 550 * This may cause tearing on the screen.
545 * 551 *
546 * The reserved field must be zero until we figure out something 552 * The reserved field must be zero.
547 * clever to use it for.
548 */ 553 */
549 554
550struct drm_mode_crtc_page_flip { 555struct drm_mode_crtc_page_flip {
@@ -555,6 +560,34 @@ struct drm_mode_crtc_page_flip {
555 __u64 user_data; 560 __u64 user_data;
556}; 561};
557 562
563/*
564 * Request a page flip on the specified crtc.
565 *
566 * Same as struct drm_mode_crtc_page_flip, but supports new flags and
567 * re-purposes the reserved field:
568 *
569 * The sequence field must be zero unless either of the
570 * DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags is specified. When
571 * the ABSOLUTE flag is specified, the sequence field denotes the absolute
572 * vblank sequence when the flip should take effect. When the RELATIVE
573 * flag is specified, the sequence field denotes the relative (to the
574 * current one when the ioctl is called) vblank sequence when the flip
575 * should take effect. NOTE: DRM_IOCTL_WAIT_VBLANK must still be used to
576 * make sure the vblank sequence before the target one has passed before
577 * calling this ioctl. The purpose of the
578 * DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags is merely to clarify
579 * the target for when code dealing with a page flip runs during a
580 * vertical blank period.
581 */
582
583struct drm_mode_crtc_page_flip_target {
584 __u32 crtc_id;
585 __u32 fb_id;
586 __u32 flags;
587 __u32 sequence;
588 __u64 user_data;
589};
590
558/* create a dumb scanout buffer */ 591/* create a dumb scanout buffer */
559struct drm_mode_create_dumb { 592struct drm_mode_create_dumb {
560 __u32 height; 593 __u32 height;
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index d7e81a3886fd..03725fe89859 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -62,6 +62,30 @@ extern "C" {
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 use 91#define I915_NR_TEX_REGIONS 255 /* table size 2k - maximum due to use
@@ -363,6 +387,7 @@ typedef struct drm_i915_irq_wait {
363#define I915_PARAM_HAS_EXEC_SOFTPIN 37 387#define I915_PARAM_HAS_EXEC_SOFTPIN 37
364#define I915_PARAM_HAS_POOLED_EU 38 388#define I915_PARAM_HAS_POOLED_EU 38
365#define I915_PARAM_MIN_EU_IN_POOL 39 389#define I915_PARAM_MIN_EU_IN_POOL 39
390#define I915_PARAM_MMAP_GTT_VERSION 40
366 391
367typedef struct drm_i915_getparam { 392typedef struct drm_i915_getparam {
368 __s32 param; 393 __s32 param;
@@ -698,15 +723,20 @@ struct drm_i915_gem_exec_object2 {
698 */ 723 */
699 __u64 offset; 724 __u64 offset;
700 725
701#define EXEC_OBJECT_NEEDS_FENCE (1<<0) 726#define EXEC_OBJECT_NEEDS_FENCE (1<<0)
702#define EXEC_OBJECT_NEEDS_GTT (1<<1) 727#define EXEC_OBJECT_NEEDS_GTT (1<<1)
703#define EXEC_OBJECT_WRITE (1<<2) 728#define EXEC_OBJECT_WRITE (1<<2)
704#define EXEC_OBJECT_SUPPORTS_48B_ADDRESS (1<<3) 729#define EXEC_OBJECT_SUPPORTS_48B_ADDRESS (1<<3)
705#define EXEC_OBJECT_PINNED (1<<4) 730#define EXEC_OBJECT_PINNED (1<<4)
706#define __EXEC_OBJECT_UNKNOWN_FLAGS -(EXEC_OBJECT_PINNED<<1) 731#define EXEC_OBJECT_PAD_TO_SIZE (1<<5)
732/* All remaining bits are MBZ and RESERVED FOR FUTURE USE */
733#define __EXEC_OBJECT_UNKNOWN_FLAGS -(EXEC_OBJECT_PAD_TO_SIZE<<1)
707 __u64 flags;