aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-06-26 16:18:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-26 16:18:51 -0400
commit099bfbfc7fbbe22356c02f0caf709ac32e1126ea (patch)
treec2dfe2f9445255d866e9203cff9e9f865ef93513 /include/drm
parent22165fa79814e71e7a5974b3c37a5028ed16c8f9 (diff)
parentc5fd936e992dd2829167d2adc63e151675ca6898 (diff)
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm updates from Dave Airlie: "This is the main drm pull request for v4.2. I've one other new driver from freescale on my radar, it's been posted and reviewed, I'd just like to get someone to give it a last look, so maybe I'll send it or maybe I'll leave it. There is no major nouveau changes in here, Ben was working on something big, and we agreed it was a bit late, there wasn't anything else he considered urgent to merge. There might be another msm pull for some bits that are waiting on arm-soc, I'll see how we time it. This touches some "of" stuff, acks are in place except for the fixes to the build in various configs,t hat I just applied. Summary: New drivers: - virtio-gpu: KMS only pieces of driver for virtio-gpu in qemu. This is just the first part of this driver, enough to run unaccelerated userspace on. As qemu merges more we'll start adding the 3D features for the virgl 3d work. - amdgpu: a new driver from AMD to driver their newer GPUs. (VI+) It contains a new cleaner userspace API, and is a clean break from radeon moving forward, that AMD are going to concentrate on. It also contains a set of register headers auto generated from AMD internal database. core: - atomic modesetting API completed, enabled by default now. - Add support for mode_id blob to atomic ioctl to complete interface. - bunch of Displayport MST fixes - lots of misc fixes. panel: - new simple panels - fix some long-standing build issues with bridge drivers radeon: - VCE1 support - add a GPU reset counter for userspace - lots of fixes. amdkfd: - H/W debugger support module - static user-mode queues - support killing all the waves when a process terminates - use standard DECLARE_BITMAP i915: - Add Broxton support - S3, rotation support for Skylake - RPS booting tuning - CPT modeset sequence fixes - ns2501 dither support - enable cmd parser on haswell - cdclk handling fixes - gen8 dynamic pte allocation - lots of atomic conversion work exynos: - Add atomic modesetting support - Add iommu support - Consolidate drm driver initialization - and MIC, DECON and MIPI-DSI support for exynos5433 omapdrm: - atomic modesetting support (fixes lots of things in rewrite) tegra: - DP aux transaction fixes - iommu support fix msm: - adreno a306 support - various dsi bits - various 64-bit fixes - NV12MT support rcar-du: - atomic and misc fixes sti: - fix HDMI timing complaince tilcdc: - use drm component API to access tda998x driver - fix module unloading qxl: - stability fixes" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (872 commits) drm/nouveau: Pause between setting gpu to D3hot and cutting the power drm/dp/mst: close deadlock in connector destruction. drm: Always enable atomic API drm/vgem: Set unique to "vgem" of: fix a build error to of_graph_get_endpoint_by_regs function drm/dp/mst: take lock around looking up the branch device on hpd irq drm/dp/mst: make sure mst_primary mstb is valid in work function of: add EXPORT_SYMBOL for of_graph_get_endpoint_by_regs ARM: dts: rename the clock of MIPI DSI 'pll_clk' to 'sclk_mipi' drm/atomic: Don't set crtc_state->enable manually drm/exynos: dsi: do not set TE GPIO direction by input drm/exynos: dsi: add support for MIC driver as a bridge drm/exynos: dsi: add support for Exynos5433 drm/exynos: dsi: make use of array for clock access drm/exynos: dsi: make use of driver data for static values drm/exynos: dsi: add macros for register access drm/exynos: dsi: rename pll_clk to sclk_clk drm/exynos: mic: add MIC driver of: add helper for getting endpoint node of specific identifiers drm/exynos: add Exynos5433 decon driver ...
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/bridge/ptn3460.h45
-rw-r--r--include/drm/drmP.h19
-rw-r--r--include/drm/drm_atomic.h95
-rw-r--r--include/drm/drm_atomic_helper.h5
-rw-r--r--include/drm/drm_crtc.h65
-rw-r--r--include/drm/drm_dp_helper.h6
-rw-r--r--include/drm/drm_dp_mst_helper.h4
-rw-r--r--include/drm/drm_modes.h4
-rw-r--r--include/drm/i915_pciids.h4
9 files changed, 171 insertions, 76 deletions
diff --git a/include/drm/bridge/ptn3460.h b/include/drm/bridge/ptn3460.h
deleted file mode 100644
index b11f8e17e72f..000000000000
--- a/include/drm/bridge/ptn3460.h
+++ /dev/null
@@ -1,45 +0,0 @@
1/*
2 * Copyright (C) 2013 Google, Inc.
3 *
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14#ifndef _DRM_BRIDGE_PTN3460_H_
15#define _DRM_BRIDGE_PTN3460_H_
16
17struct drm_device;
18struct drm_bridge;
19struct drm_encoder;
20struct i2c_client;
21struct device_node;
22
23#if defined(CONFIG_DRM_PTN3460) || defined(CONFIG_DRM_PTN3460_MODULE)
24
25int ptn3460_init(struct drm_device *dev, struct drm_encoder *encoder,
26 struct i2c_client *client, struct device_node *node);
27
28void ptn3460_destroy(struct drm_bridge *bridge);
29
30#else
31
32static inline int ptn3460_init(struct drm_device *dev,
33 struct drm_encoder *encoder, struct i2c_client *client,
34 struct device_node *node)
35{
36 return 0;
37}
38
39static inline void ptn3460_destroy(struct drm_bridge *bridge)
40{
41}
42
43#endif
44
45#endif
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 62c40777c009..48db6a56975f 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -326,6 +326,10 @@ struct drm_file {
326 struct list_head fbs; 326 struct list_head fbs;
327 struct mutex fbs_lock; 327 struct mutex fbs_lock;
328 328
329 /** User-created blob properties; this retains a reference on the
330 * property. */
331 struct list_head blobs;
332
329 wait_queue_head_t event_wait; 333 wait_queue_head_t event_wait;
330 struct list_head event_list; 334 struct list_head event_list;
331 int event_space; 335 int event_space;
@@ -355,8 +359,7 @@ struct drm_lock_data {
355 * @minor: Link back to minor char device we are master for. Immutable. 359 * @minor: Link back to minor char device we are master for. Immutable.
356 * @unique: Unique identifier: e.g. busid. Protected by drm_global_mutex. 360 * @unique: Unique identifier: e.g. busid. Protected by drm_global_mutex.
357 * @unique_len: Length of unique field. Protected by drm_global_mutex. 361 * @unique_len: Length of unique field. Protected by drm_global_mutex.
358 * @magiclist: Hash of used authentication tokens. Protected by struct_mutex. 362 * @magic_map: Map of used authentication tokens. Protected by struct_mutex.
359 * @magicfree: List of used authentication tokens. Protected by struct_mutex.
360 * @lock: DRI lock information. 363 * @lock: DRI lock information.
361 * @driver_priv: Pointer to driver-private information. 364 * @driver_priv: Pointer to driver-private information.
362 */ 365 */
@@ -365,8 +368,7 @@ struct drm_master {
365 struct drm_minor *minor; 368 struct drm_minor *minor;
366 char *unique; 369 char *unique;
367 int unique_len; 370 int unique_len;
368 struct drm_open_hash magiclist; 371 struct idr magic_map;
369 struct list_head magicfree;
370 struct drm_lock_data lock; 372 struct drm_lock_data lock;
371 void *driver_priv; 373 void *driver_priv;
372}; 374};
@@ -686,9 +688,13 @@ struct drm_pending_vblank_event {
686struct drm_vblank_crtc { 688struct drm_vblank_crtc {
687 struct drm_device *dev; /* pointer to the drm_device */ 689 struct drm_device *dev; /* pointer to the drm_device */
688 wait_queue_head_t queue; /**< VBLANK wait queue */ 690 wait_queue_head_t queue; /**< VBLANK wait queue */
689 struct timeval time[DRM_VBLANKTIME_RBSIZE]; /**< timestamp of current count */
690 struct timer_list disable_timer; /* delayed disable timer */ 691 struct timer_list disable_timer; /* delayed disable timer */
691 atomic_t count; /**< number of VBLANK interrupts */ 692
693 /* vblank counter, protected by dev->vblank_time_lock for writes */
694 unsigned long count;
695 /* vblank timestamps, protected by dev->vblank_time_lock for writes */
696 struct timeval time[DRM_VBLANKTIME_RBSIZE];
697
692 atomic_t refcount; /* number of users of vblank interruptsper crtc */ 698 atomic_t refcount; /* number of users of vblank interruptsper crtc */
693 u32 last; /* protected by dev->vbl_lock, used */ 699 u32 last; /* protected by dev->vbl_lock, used */
694 /* for wraparound handling */ 700 /* for wraparound handling */
@@ -812,6 +818,7 @@ struct drm_device {
812#endif 818#endif
813 819
814 struct platform_device *platformdev; /**< Platform device struture */ 820 struct platform_device *platformdev; /**< Platform device struture */
821 struct virtio_device *virtdev;
815 822
816 struct drm_sg_mem *sg; /**< Scatter gather memory */ 823 struct drm_sg_mem *sg; /**< Scatter gather memory */
817 unsigned int num_crtcs; /**< Number of CRTCs on this device */ 824 unsigned int num_crtcs; /**< Number of CRTCs on this device */
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index c157103492b0..8a3a913320eb 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -35,6 +35,11 @@ drm_atomic_state_alloc(struct drm_device *dev);
35void drm_atomic_state_clear(struct drm_atomic_state *state); 35void drm_atomic_state_clear(struct drm_atomic_state *state);
36void drm_atomic_state_free(struct drm_atomic_state *state); 36void drm_atomic_state_free(struct drm_atomic_state *state);
37 37
38int __must_check
39drm_atomic_state_init(struct drm_device *dev, struct drm_atomic_state *state);
40void drm_atomic_state_default_clear(struct drm_atomic_state *state);
41void drm_atomic_state_default_release(struct drm_atomic_state *state);
42
38struct drm_crtc_state * __must_check 43struct drm_crtc_state * __must_check
39drm_atomic_get_crtc_state(struct drm_atomic_state *state, 44drm_atomic_get_crtc_state(struct drm_atomic_state *state,
40 struct drm_crtc *crtc); 45 struct drm_crtc *crtc);
@@ -54,6 +59,62 @@ int drm_atomic_connector_set_property(struct drm_connector *connector,
54 struct drm_connector_state *state, struct drm_property *property, 59 struct drm_connector_state *state, struct drm_property *property,
55 uint64_t val); 60 uint64_t val);
56 61
62/**
63 * drm_atomic_get_existing_crtc_state - get crtc state, if it exists
64 * @state: global atomic state object
65 * @crtc: crtc to grab
66 *
67 * This function returns the crtc state for the given crtc, or NULL
68 * if the crtc is not part of the global atomic state.
69 */
70static inline struct drm_crtc_state *
71drm_atomic_get_existing_crtc_state(struct drm_atomic_state *state,
72 struct drm_crtc *crtc)
73{
74 return state->crtc_states[drm_crtc_index(crtc)];
75}
76
77/**
78 * drm_atomic_get_existing_plane_state - get plane state, if it exists
79 * @state: global atomic state object
80 * @plane: plane to grab
81 *
82 * This function returns the plane state for the given plane, or NULL
83 * if the plane is not part of the global atomic state.
84 */
85static inline struct drm_plane_state *
86drm_atomic_get_existing_plane_state(struct drm_atomic_state *state,
87 struct drm_plane *plane)
88{
89 return state->plane_states[drm_plane_index(plane)];
90}
91
92/**
93 * drm_atomic_get_existing_connector_state - get connector state, if it exists
94 * @state: global atomic state object
95 * @connector: connector to grab
96 *
97 * This function returns the connector state for the given connector,
98 * or NULL if the connector is not part of the global atomic state.
99 */
100static inline struct drm_connector_state *
101drm_atomic_get_existing_connector_state(struct drm_atomic_state *state,
102 struct drm_connector *connector)
103{
104 int index = drm_connector_index(connector);
105
106 if (index >= state->num_connector)
107 return NULL;
108
109 return state->connector_states[index];
110}
111
112int __must_check
113drm_atomic_set_mode_for_crtc(struct drm_crtc_state *state,
114 struct drm_display_mode *mode);
115int __must_check
116drm_atomic_set_mode_prop_for_crtc(struct drm_crtc_state *state,
117 struct drm_property_blob *blob);
57int __must_check 118int __must_check
58drm_atomic_set_crtc_for_plane(struct drm_plane_state *plane_state, 119drm_atomic_set_crtc_for_plane(struct drm_plane_state *plane_state,
59 struct drm_crtc *crtc); 120 struct drm_crtc *crtc);
@@ -65,6 +126,10 @@ drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state,
65int __must_check 126int __must_check
66drm_atomic_add_affected_connectors(struct drm_atomic_state *state, 127drm_atomic_add_affected_connectors(struct drm_atomic_state *state,
67 struct drm_crtc *crtc); 128 struct drm_crtc *crtc);
129int __must_check
130drm_atomic_add_affected_planes(struct drm_atomic_state *state,
131 struct drm_crtc *crtc);
132
68int 133int
69drm_atomic_connectors_for_crtc(struct drm_atomic_state *state, 134drm_atomic_connectors_for_crtc(struct drm_atomic_state *state,
70 struct drm_crtc *crtc); 135 struct drm_crtc *crtc);
@@ -77,26 +142,32 @@ int __must_check drm_atomic_async_commit(struct drm_atomic_state *state);
77 142
78#define for_each_connector_in_state(state, connector, connector_state, __i) \ 143#define for_each_connector_in_state(state, connector, connector_state, __i) \
79 for ((__i) = 0; \ 144 for ((__i) = 0; \
80 (connector) = (state)->connectors[__i], \ 145 (__i) < (state)->num_connector && \
81 (connector_state) = (state)->connector_states[__i], \ 146 ((connector) = (state)->connectors[__i], \
82 (__i) < (state)->num_connector; \ 147 (connector_state) = (state)->connector_states[__i], 1); \
83 (__i)++) \ 148 (__i)++) \
84 if (connector) 149 if (connector)
85 150
86#define for_each_crtc_in_state(state, crtc, crtc_state, __i) \ 151#define for_each_crtc_in_state(state, crtc, crtc_state, __i) \
87 for ((__i) = 0; \ 152 for ((__i) = 0; \
88 (crtc) = (state)->crtcs[__i], \ 153 (__i) < (state)->dev->mode_config.num_crtc && \
89 (crtc_state) = (state)->crtc_states[__i], \ 154 ((crtc) = (state)->crtcs[__i], \
90 (__i) < (state)->dev->mode_config.num_crtc; \ 155 (crtc_state) = (state)->crtc_states[__i], 1); \
91 (__i)++) \ 156 (__i)++) \
92 if (crtc_state) 157 if (crtc_state)
93 158
94#define for_each_plane_in_state(state, plane, plane_state, __i) \ 159#define for_each_plane_in_state(state, plane, plane_state, __i) \
95 for ((__i) = 0; \ 160 for ((__i) = 0; \
96 (plane) = (state)->planes[__i], \ 161 (__i) < (state)->dev->mode_config.num_total_plane && \
97 (plane_state) = (state)->plane_states[__i], \ 162 ((plane) = (state)->planes[__i], \
98 (__i) < (state)->dev->mode_config.num_total_plane; \ 163 (plane_state) = (state)->plane_states[__i], 1); \
99 (__i)++) \ 164 (__i)++) \
100 if (plane_state) 165 if (plane_state)
166static inline bool
167drm_atomic_crtc_needs_modeset(struct drm_crtc_state *state)
168{
169 return state->mode_changed || state->active_changed;
170}
171
101 172
102#endif /* DRM_ATOMIC_H_ */ 173#endif /* DRM_ATOMIC_H_ */
diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h
index d665781eb542..cc1fee8a12d0 100644
--- a/include/drm/drm_atomic_helper.h
+++ b/include/drm/drm_atomic_helper.h
@@ -43,6 +43,10 @@ int drm_atomic_helper_commit(struct drm_device *dev,
43void drm_atomic_helper_wait_for_vblanks(struct drm_device *dev, 43void drm_atomic_helper_wait_for_vblanks(struct drm_device *dev,
44 struct drm_atomic_state *old_state); 44 struct drm_atomic_state *old_state);
45 45
46void
47drm_atomic_helper_update_legacy_modeset_state(struct drm_device *dev,
48 struct drm_atomic_state *old_state);
49
46void drm_atomic_helper_commit_modeset_disables(struct drm_device *dev, 50void drm_atomic_helper_commit_modeset_disables(struct drm_device *dev,
47 struct drm_atomic_state *state); 51 struct drm_atomic_state *state);
48void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev, 52void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
@@ -54,6 +58,7 @@ void drm_atomic_helper_commit_planes(struct drm_device *dev,
54 struct drm_atomic_state *state); 58 struct drm_atomic_state *state);
55void drm_atomic_helper_cleanup_planes(struct drm_device *dev, 59void drm_atomic_helper_cleanup_planes(struct drm_device *dev,
56 struct drm_atomic_state *old_state); 60 struct drm_atomic_state *old_state);
61void drm_atomic_helper_commit_planes_on_crtc(struct drm_crtc_state *old_crtc_state);
57 62
58void drm_atomic_helper_swap_state(struct drm_device *dev, 63void drm_atomic_helper_swap_state(struct drm_device *dev,
59 struct drm_atomic_state *state); 64 struct drm_atomic_state *state);
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index ca71c03143d1..57ca8cc383a6 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -216,7 +216,10 @@ struct drm_framebuffer {
216 216
217struct drm_property_blob { 217struct drm_property_blob {
218 struct drm_mode_object base; 218 struct drm_mode_object base;
219 struct list_head head; 219 struct drm_device *dev;
220 struct kref refcount;
221 struct list_head head_global;
222 struct list_head head_file;
220 size_t length; 223 size_t length;
221 unsigned char data[]; 224 unsigned char data[];
222}; 225};
@@ -296,6 +299,9 @@ struct drm_crtc_state {
296 299
297 struct drm_display_mode mode; 300 struct drm_display_mode mode;
298 301
302 /* blob property to expose current mode to atomic userspace */
303 struct drm_property_blob *mode_blob;
304
299 struct drm_pending_vblank_event *event; 305 struct drm_pending_vblank_event *event;
300 306
301 struct drm_atomic_state *state; 307 struct drm_atomic_state *state;
@@ -647,6 +653,7 @@ struct drm_encoder {
647 * @audio_latency: audio latency info from ELD, if found 653 * @audio_latency: audio latency info from ELD, if found
648 * @null_edid_counter: track sinks that give us all zeros for the EDID 654 * @null_edid_counter: track sinks that give us all zeros for the EDID
649 * @bad_edid_counter: track sinks that give us an EDID with invalid checksum 655 * @bad_edid_counter: track sinks that give us an EDID with invalid checksum
656 * @edid_corrupt: indicates whether the last read EDID was corrupt
650 * @debugfs_entry: debugfs directory for this connector 657 * @debugfs_entry: debugfs directory for this connector
651 * @state: current atomic state for this connector 658 * @state: current atomic state for this connector
652 * @has_tile: is this connector connected to a tiled monitor 659 * @has_tile: is this connector connected to a tiled monitor
@@ -719,6 +726,11 @@ struct drm_connector {
719 int null_edid_counter; /* needed to workaround some HW bugs where we get all 0s */ 726 int null_edid_counter; /* needed to workaround some HW bugs where we get all 0s */
720 unsigned bad_edid_counter; 727 unsigned bad_edid_counter;
721 728
729 /* Flag for raw EDID header corruption - used in Displayport
730 * compliance testing - * Displayport Link CTS Core 1.2 rev1.1 4.2.2.6
731 */
732 bool edid_corrupt;
733
722 struct dentry *debugfs_entry; 734 struct dentry *debugfs_entry;
723 735
724 struct drm_connector_state *state; 736 struct drm_connector_state *state;
@@ -731,6 +743,8 @@ struct drm_connector {
731 uint8_t num_h_tile, num_v_tile; 743 uint8_t num_h_tile, num_v_tile;
732 uint8_t tile_h_loc, tile_v_loc; 744 uint8_t tile_h_loc, tile_v_loc;
733 uint16_t tile_h_size, tile_v_size; 745 uint16_t tile_h_size, tile_v_size;
746
747 struct list_head destroy_list;
734}; 748};
735 749
736/** 750/**
@@ -895,6 +909,8 @@ struct drm_bridge_funcs {
895/** 909/**
896 * struct drm_bridge - central DRM bridge control structure 910 * struct drm_bridge - central DRM bridge control structure
897 * @dev: DRM device this bridge belongs to 911 * @dev: DRM device this bridge belongs to
912 * @encoder: encoder to which this bridge is connected
913 * @next: the next bridge in the encoder chain
898 * @of_node: device node pointer to the bridge 914 * @of_node: device node pointer to the bridge
899 * @list: to keep track of all added bridges 915 * @list: to keep track of all added bridges
900 * @base: base mode object 916 * @base: base mode object
@@ -904,6 +920,7 @@ struct drm_bridge_funcs {
904struct drm_bridge { 920struct drm_bridge {
905 struct drm_device *dev; 921 struct drm_device *dev;
906 struct drm_encoder *encoder; 922 struct drm_encoder *encoder;
923 struct drm_bridge *next;
907#ifdef CONFIG_OF 924#ifdef CONFIG_OF
908 struct device_node *of_node; 925 struct device_node *of_node;
909#endif 926#endif
@@ -977,6 +994,9 @@ struct drm_mode_set {
977 * @atomic_check: check whether a given atomic state update is possible 994 * @atomic_check: check whether a given atomic state update is possible
978 * @atomic_commit: commit an atomic state update previously verified with 995 * @atomic_commit: commit an atomic state update previously verified with
979 * atomic_check() 996 * atomic_check()
997 * @atomic_state_alloc: allocate a new atomic state
998 * @atomic_state_clear: clear the atomic state
999 * @atomic_state_free: free the atomic state
980 * 1000 *
981 * Some global (i.e. not per-CRTC, connector, etc) mode setting functions that 1001 * Some global (i.e. not per-CRTC, connector, etc) mode setting functions that
982 * involve drivers. 1002 * involve drivers.
@@ -992,6 +1012,9 @@ struct drm_mode_config_funcs {
992 int (*atomic_commit)(struct drm_device *dev, 1012 int (*atomic_commit)(struct drm_device *dev,
993 struct drm_atomic_state *a, 1013 struct drm_atomic_state *a,
994 bool async); 1014 bool async);
1015 struct drm_atomic_state *(*atomic_state_alloc)(struct drm_device *dev);
1016 void (*atomic_state_clear)(struct drm_atomic_state *state);
1017 void (*atomic_state_free)(struct drm_atomic_state *state);
995}; 1018};
996 1019
997/** 1020/**
@@ -1048,6 +1071,7 @@ struct drm_mode_group {
1048 * @poll_running: track polling status for this device 1071 * @poll_running: track polling status for this device
1049 * @output_poll_work: delayed work for polling in process context 1072 * @output_poll_work: delayed work for polling in process context
1050 * @property_blob_list: list of all the blob property objects 1073 * @property_blob_list: list of all the blob property objects
1074 * @blob_lock: mutex for blob property allocation and management
1051 * @*_property: core property tracking 1075 * @*_property: core property tracking
1052 * @preferred_depth: preferred RBG pixel depth, used by fb helpers 1076 * @preferred_depth: preferred RBG pixel depth, used by fb helpers
1053 * @prefer_shadow: hint to userspace to prefer shadow-fb rendering 1077 * @prefer_shadow: hint to userspace to prefer shadow-fb rendering
@@ -1103,6 +1127,8 @@ struct drm_mode_config {
1103 bool delayed_event; 1127 bool delayed_event;
1104 struct delayed_work output_poll_work; 1128 struct delayed_work output_poll_work;
1105 1129
1130 struct mutex blob_lock;
1131
1106 /* pointers to standard properties */ 1132 /* pointers to standard properties */
1107 struct list_head property_blob_list; 1133 struct list_head property_blob_list;
1108 struct drm_property *edid_property; 1134 struct drm_property *edid_property;
@@ -1122,6 +1148,7 @@ struct drm_mode_config {
1122 struct drm_property *prop_fb_id; 1148 struct drm_property *prop_fb_id;
1123 struct drm_property *prop_crtc_id; 1149 struct drm_property *prop_crtc_id;
1124 struct drm_property *prop_active; 1150 struct drm_property *prop_active;
1151 struct drm_property *prop_mode_id;
1125 1152
1126 /* DVI-I properties */ 1153 /* DVI-I properties */
1127 struct drm_property *dvi_i_subconnector_property; 1154 struct drm_property *dvi_i_subconnector_property;
@@ -1230,6 +1257,17 @@ extern void drm_bridge_remove(struct drm_bridge *bridge);
1230extern struct drm_bridge *of_drm_find_bridge(struct device_node *np); 1257extern struct drm_bridge *of_drm_find_bridge(struct device_node *np);
1231extern int drm_bridge_attach(struct drm_device *dev, struct drm_bridge *bridge); 1258extern int drm_bridge_attach(struct drm_device *dev, struct drm_bridge *bridge);
1232 1259
1260bool drm_bridge_mode_fixup(struct drm_bridge *bridge,
1261 const struct drm_display_mode *mode,
1262 struct drm_display_mode *adjusted_mode);
1263void drm_bridge_disable(struct drm_bridge *bridge);
1264void drm_bridge_post_disable(struct drm_bridge *bridge);
1265void drm_bridge_mode_set(struct drm_bridge *bridge,
1266 struct drm_display_mode *mode,
1267 struct drm_display_mode *adjusted_mode);
1268void drm_bridge_pre_enable(struct drm_bridge *bridge);
1269void drm_bridge_enable(struct drm_bridge *bridge);
1270
1233extern int drm_encoder_init(struct drm_device *dev, 1271extern int drm_encoder_init(struct drm_device *dev,
1234 struct drm_encoder *encoder, 1272 struct drm_encoder *encoder,
1235 const struct drm_encoder_funcs *funcs, 1273 const struct drm_encoder_funcs *funcs,
@@ -1263,6 +1301,7 @@ extern int drm_plane_init(struct drm_device *dev,
1263 bool is_primary); 1301 bool is_primary);
1264extern void drm_plane_cleanup(struct drm_plane *plane); 1302extern void drm_plane_cleanup(struct drm_plane *plane);
1265extern unsigned int drm_plane_index(struct drm_plane *plane); 1303extern unsigned int drm_plane_index(struct drm_plane *plane);
1304extern struct drm_plane * drm_plane_from_index(struct drm_device *dev, int idx);
1266extern void drm_plane_force_disable(struct drm_plane *plane); 1305extern void drm_plane_force_disable(struct drm_plane *plane);
1267extern int drm_plane_check_pixel_format(const struct drm_plane *plane, 1306extern int drm_plane_check_pixel_format(const struct drm_plane *plane,
1268 u32 format); 1307 u32 format);
@@ -1283,6 +1322,8 @@ extern const char *drm_get_dvi_i_select_name(int val);
1283extern const char *drm_get_tv_subconnector_name(int val); 1322extern const char *drm_get_tv_subconnector_name(int val);
1284extern const char *drm_get_tv_select_name(int val); 1323extern const char *drm_get_tv_select_name(int val);
1285extern void drm_fb_release(struct drm_file *file_priv); 1324extern void drm_fb_release(struct drm_file *file_priv);
1325extern void drm_property_destroy_user_blobs(struct drm_device *dev,
1326 struct drm_file *file_priv);
1286extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group); 1327extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group);
1287extern void drm_mode_group_destroy(struct drm_mode_group *group); 1328extern void drm_mode_group_destroy(struct drm_mode_group *group);
1288extern void drm_reinit_primary_mode_group(struct drm_device *dev); 1329extern void drm_reinit_primary_mode_group(struct drm_device *dev);
@@ -1362,6 +1403,13 @@ struct drm_property *drm_property_create_object(struct drm_device *dev,
1362 int flags, const char *name, uint32_t type); 1403 int flags, const char *name, uint32_t type);
1363struct drm_property *drm_property_create_bool(struct drm_device *dev, int flags, 1404struct drm_property *drm_property_create_bool(struct drm_device *dev, int flags,
1364 const char *name); 1405 const char *name);
1406struct drm_property_blob *drm_property_create_blob(struct drm_device *dev,
1407 size_t length,
1408 const void *data);
1409struct drm_property_blob *drm_property_lookup_blob(struct drm_device *dev,
1410 uint32_t id);
1411struct drm_property_blob *drm_property_reference_blob(struct drm_property_blob *blob);
1412void drm_property_unreference_blob(struct drm_property_blob *blob);
1365extern void drm_property_destroy(struct drm_device *dev, struct drm_property *property); 1413extern void drm_property_destroy(struct drm_device *dev, struct drm_property *property);
1366extern int drm_property_add_enum(struct drm_property *property, int index, 1414extern int drm_property_add_enum(struct drm_property *property, int index,
1367 uint64_t value, const char *name); 1415 uint64_t value, const char *name);
@@ -1421,6 +1469,10 @@ extern int drm_mode_getproperty_ioctl(struct drm_device *dev,
1421 void *data, struct drm_file *file_priv); 1469 void *data, struct drm_file *file_priv);
1422extern int drm_mode_getblob_ioctl(struct drm_device *dev, 1470extern int drm_mode_getblob_ioctl(struct drm_device *dev,
1423 void *data, struct drm_file *file_priv); 1471 void *data, struct drm_file *file_priv);
1472extern int drm_mode_createblob_ioctl(struct drm_device *dev,
1473 void *data, struct drm_file *file_priv);
1474extern int drm_mode_destroyblob_ioctl(struct drm_device *dev,
1475 void *data, struct drm_file *file_priv);
1424extern int drm_mode_connector_property_set_ioctl(struct drm_device *dev, 1476extern int drm_mode_connector_property_set_ioctl(struct drm_device *dev,
1425 void *data, struct drm_file *file_priv); 1477 void *data, struct drm_file *file_priv);
1426extern int drm_mode_getencoder(struct drm_device *dev, 1478extern int drm_mode_getencoder(struct drm_device *dev,
@@ -1442,7 +1494,8 @@ extern void drm_set_preferred_mode(struct drm_connector *connector,
1442 int hpref, int vpref); 1494 int hpref, int vpref);
1443 1495
1444extern int drm_edid_header_is_valid(const u8 *raw_edid); 1496extern int drm_edid_header_is_valid(const u8 *raw_edid);
1445extern bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid); 1497extern bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid,
1498 bool *edid_corrupt);
1446extern bool drm_edid_is_valid(struct edid *edid); 1499extern bool drm_edid_is_valid(struct edid *edid);
1447 1500
1448extern struct drm_tile_group *drm_mode_create_tile_group(struct drm_device *dev, 1501extern struct drm_tile_group *drm_mode_create_tile_group(struct drm_device *dev,
@@ -1525,14 +1578,6 @@ static inline struct drm_property *drm_property_find(struct drm_device *dev,
1525 return mo ? obj_to_property(mo) : NULL; 1578 return mo ? obj_to_property(mo) : NULL;
1526} 1579}
1527 1580
1528static inline struct drm_property_blob *
1529drm_property_blob_find(struct drm_device *dev, uint32_t id)
1530{
1531 struct drm_mode_object *mo;
1532 mo = drm_mode_object_find(dev, id, DRM_MODE_OBJECT_BLOB);
1533 return mo ? obj_to_blob(mo) : NULL;
1534}
1535
1536/* Plane list iterator for legacy (overlay only) planes. */ 1581/* Plane list iterator for legacy (overlay only) planes. */
1537#define drm_for_each_legacy_plane(plane, planelist) \ 1582#define drm_for_each_legacy_plane(plane, planelist) \
1538 list_for_each_entry(plane, planelist, head) \ 1583 list_for_each_entry(plane, planelist, head) \
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index 523f04c90dea..2e86f642fc33 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -679,9 +679,9 @@ struct drm_dp_aux_msg {
679 * An AUX channel can also be used to transport I2C messages to a sink. A 679 * An AUX channel can also be used to transport I2C messages to a sink. A
680 * typical application of that is to access an EDID that's present in the 680 * typical application of that is to access an EDID that's present in the
681 * sink device. The .transfer() function can also be used to execute such 681 * sink device. The .transfer() function can also be used to execute such
682 * transactions. The drm_dp_aux_register_i2c_bus() function registers an 682 * transactions. The drm_dp_aux_register() function registers an I2C
683 * I2C adapter that can be passed to drm_probe_ddc(). Upon removal, drivers 683 * adapter that can be passed to drm_probe_ddc(). Upon removal, drivers
684 * should call drm_dp_aux_unregister_i2c_bus() to remove the I2C adapter. 684 * should call drm_dp_aux_unregister() to remove the I2C adapter.
685 * The I2C adapter uses long transfers by default; if a partial response is 685 * The I2C adapter uses long transfers by default; if a partial response is
686 * received, the adapter will drop down to the size given by the partial 686 * received, the adapter will drop down to the size given by the partial
687 * response for this transaction only. 687 * response for this transaction only.
diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h
index a2507817be41..86d0b25ed054 100644
--- a/include/drm/drm_dp_mst_helper.h
+++ b/include/drm/drm_dp_mst_helper.h
@@ -463,6 +463,10 @@ struct drm_dp_mst_topology_mgr {
463 struct work_struct work; 463 struct work_struct work;
464 464
465 struct work_struct tx_work; 465 struct work_struct tx_work;
466
467 struct list_head destroy_connector_list;
468 struct mutex destroy_connector_lock;
469 struct work_struct destroy_connector_work;
466}; 470};
467 471
468int drm_dp_mst_topology_mgr_init(struct drm_dp_mst_topology_mgr *mgr, struct device *dev, struct drm_dp_aux *aux, int max_dpcd_transaction_bytes, int max_payloads, int conn_base_id); 472int drm_dp_mst_topology_mgr_init(struct drm_dp_mst_topology_mgr *mgr, struct device *dev, struct drm_dp_aux *aux, int max_dpcd_transaction_bytes, int max_payloads, int conn_base_id);
diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h
index 0616188c7801..08a8cac9e555 100644
--- a/include/drm/drm_modes.h
+++ b/include/drm/drm_modes.h
@@ -182,6 +182,10 @@ struct drm_cmdline_mode;
182 182
183struct drm_display_mode *drm_mode_create(struct drm_device *dev); 183struct drm_display_mode *drm_mode_create(struct drm_device *dev);
184void drm_mode_destroy(struct drm_device *dev, struct drm_display_mode *mode); 184void drm_mode_destroy(struct drm_device *dev, struct drm_display_mode *mode);
185void drm_mode_convert_to_umode(struct drm_mode_modeinfo *out,
186 const struct drm_display_mode *in);
187int drm_mode_convert_umode(struct drm_display_mode *out,
188 const struct drm_mode_modeinfo *in);
185void drm_mode_probed_add(struct drm_connector *connector, struct drm_display_mode *mode); 189void drm_mode_probed_add(struct drm_connector *connector, struct drm_display_mode *mode);
186void drm_mode_debug_printmodeline(const struct drm_display_mode *mode); 190void drm_mode_debug_printmodeline(const struct drm_display_mode *mode);
187 191
diff --git a/include/drm/i915_pciids.h b/include/drm/i915_pciids.h
index 613372375ada..17c445612e01 100644
--- a/include/drm/i915_pciids.h
+++ b/include/drm/i915_pciids.h
@@ -286,5 +286,9 @@
286 INTEL_SKL_GT2_IDS(info), \ 286 INTEL_SKL_GT2_IDS(info), \
287 INTEL_SKL_GT3_IDS(info) 287 INTEL_SKL_GT3_IDS(info)
288 288
289#define INTEL_BXT_IDS(info) \
290 INTEL_VGA_DEVICE(0x0A84, info), \
291 INTEL_VGA_DEVICE(0x1A84, info), \
292 INTEL_VGA_DEVICE(0x5A84, info)
289 293
290#endif /* _I915_PCIIDS_H */ 294#endif /* _I915_PCIIDS_H */