diff options
author | Dave Airlie <airlied@redhat.com> | 2018-11-18 19:40:00 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2018-11-18 19:40:33 -0500 |
commit | d7563c55ef9fc1fd2301b8708b3c1f53509d6745 (patch) | |
tree | d7c8ba37972ecab71b056356366e136d5f2527ec /include/linux | |
parent | 9ff01193a20d391e8dbce4403dd5ef87c7eaaca6 (diff) | |
parent | e7afb623b4fb82089c9a50c733c740522b8220bc (diff) |
Merge tag 'drm-misc-next-2018-11-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for v4.21, part 1:
UAPI Changes:
- Add syncobj timeline support to drm.
Cross-subsystem Changes:
- Remove shared fence staging in dma-buf's fence object, and allow
reserving more than 1 fence and add more paranoia when debugging.
- Constify infoframe functions in video/hdmi.
Core Changes:
- Add vkms todo, and a lot of assorted doc fixes.
- Drop transitional helpers and convert drivers to use drm_atomic_helper_shutdown().
- Move atomic state helper functions to drm_atomic_state_helper.[ch]
- Refactor drm selftests, and add new tests.
- DP MST atomic state cleanups.
- Drop EXPORT_SYMBOL from drm leases.
- Lease cleanups and fixes.
- Create render node for vgem.
Driver Changes:
- Fix build failure in imx without fbdev emulation.
- Add rotation quirk for GPD win2 panel.
- Add support for various CDTech panels, Banana Pi Panel, DLC1010GIG,
Olimex LCD-O-LinuXino, Samsung S6D16D0, Truly NT35597 WQXGA,
Himax HX8357D, simulated RTSM AEMv8.
- Add dw_hdmi support to rockchip driver.
- Fix YUV support in vc4.
- Fix resource id handling in virtio.
- Make rockchip use dw-mipi-dsi bridge driver, and add dual dsi support.
- Advertise that tinydrm only supports DRM_FORMAT_MOD_LINEAR.
- Convert many drivers to use atomic helpers, and drm_fbdev_generic_setup().
- Add Mali linear tiled formats, and enable them in the Mali-DP driver.
- Add support for H6 DE3 mixer 0, DW HDMI, HDMI PHY and TCON TOP.
- Assorted driver cleanups and fixes.
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/be7ebd91-edd9-8fa4-4286-1c57e3165113@linux.intel.com
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/hdmi.h | 24 | ||||
-rw-r--r-- | include/linux/reservation.h | 12 |
2 files changed, 27 insertions, 9 deletions
diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h index 4f3febc0f971..d2bacf502429 100644 --- a/include/linux/hdmi.h +++ b/include/linux/hdmi.h | |||
@@ -163,6 +163,9 @@ struct hdmi_avi_infoframe { | |||
163 | int hdmi_avi_infoframe_init(struct hdmi_avi_infoframe *frame); | 163 | int hdmi_avi_infoframe_init(struct hdmi_avi_infoframe *frame); |
164 | ssize_t hdmi_avi_infoframe_pack(struct hdmi_avi_infoframe *frame, void *buffer, | 164 | ssize_t hdmi_avi_infoframe_pack(struct hdmi_avi_infoframe *frame, void *buffer, |
165 | size_t size); | 165 | size_t size); |
166 | ssize_t hdmi_avi_infoframe_pack_only(const struct hdmi_avi_infoframe *frame, | ||
167 | void *buffer, size_t size); | ||
168 | int hdmi_avi_infoframe_check(struct hdmi_avi_infoframe *frame); | ||
166 | 169 | ||
167 | enum hdmi_spd_sdi { | 170 | enum hdmi_spd_sdi { |
168 | HDMI_SPD_SDI_UNKNOWN, | 171 | HDMI_SPD_SDI_UNKNOWN, |
@@ -194,6 +197,9 @@ int hdmi_spd_infoframe_init(struct hdmi_spd_infoframe *frame, | |||
194 | const char *vendor, const char *product); | 197 | const char *vendor, const char *product); |
195 | ssize_t hdmi_spd_infoframe_pack(struct hdmi_spd_infoframe *frame, void *buffer, | 198 | ssize_t hdmi_spd_infoframe_pack(struct hdmi_spd_infoframe *frame, void *buffer, |
196 | size_t size); | 199 | size_t size); |
200 | ssize_t hdmi_spd_infoframe_pack_only(const struct hdmi_spd_infoframe *frame, | ||
201 | void *buffer, size_t size); | ||
202 | int hdmi_spd_infoframe_check(struct hdmi_spd_infoframe *frame); | ||
197 | 203 | ||
198 | enum hdmi_audio_coding_type { | 204 | enum hdmi_audio_coding_type { |
199 | HDMI_AUDIO_CODING_TYPE_STREAM, | 205 | HDMI_AUDIO_CODING_TYPE_STREAM, |
@@ -272,6 +278,9 @@ struct hdmi_audio_infoframe { | |||
272 | int hdmi_audio_infoframe_init(struct hdmi_audio_infoframe *frame); | 278 | int hdmi_audio_infoframe_init(struct hdmi_audio_infoframe *frame); |
273 | ssize_t hdmi_audio_infoframe_pack(struct hdmi_audio_infoframe *frame, | 279 | ssize_t hdmi_audio_infoframe_pack(struct hdmi_audio_infoframe *frame, |
274 | void *buffer, size_t size); | 280 | void *buffer, size_t size); |
281 | ssize_t hdmi_audio_infoframe_pack_only(const struct hdmi_audio_infoframe *frame, | ||
282 | void *buffer, size_t size); | ||
283 | int hdmi_audio_infoframe_check(struct hdmi_audio_infoframe *frame); | ||
275 | 284 | ||
276 | enum hdmi_3d_structure { | 285 | enum hdmi_3d_structure { |
277 | HDMI_3D_STRUCTURE_INVALID = -1, | 286 | HDMI_3D_STRUCTURE_INVALID = -1, |
@@ -299,6 +308,9 @@ struct hdmi_vendor_infoframe { | |||
299 | int hdmi_vendor_infoframe_init(struct hdmi_vendor_infoframe *frame); | 308 | int hdmi_vendor_infoframe_init(struct hdmi_vendor_infoframe *frame); |
300 | ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame, | 309 | ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame, |
301 | void *buffer, size_t size); | 310 | void *buffer, size_t size); |
311 | ssize_t hdmi_vendor_infoframe_pack_only(const struct hdmi_vendor_infoframe *frame, | ||
312 | void *buffer, size_t size); | ||
313 | int hdmi_vendor_infoframe_check(struct hdmi_vendor_infoframe *frame); | ||
302 | 314 | ||
303 | union hdmi_vendor_any_infoframe { | 315 | union hdmi_vendor_any_infoframe { |
304 | struct { | 316 | struct { |
@@ -330,10 +342,14 @@ union hdmi_infoframe { | |||
330 | struct hdmi_audio_infoframe audio; | 342 | struct hdmi_audio_infoframe audio; |
331 | }; | 343 | }; |
332 | 344 | ||
333 | ssize_t | 345 | ssize_t hdmi_infoframe_pack(union hdmi_infoframe *frame, void *buffer, |
334 | hdmi_infoframe_pack(union hdmi_infoframe *frame, void *buffer, size_t size); | 346 | size_t size); |
335 | int hdmi_infoframe_unpack(union hdmi_infoframe *frame, void *buffer); | 347 | ssize_t hdmi_infoframe_pack_only(const union hdmi_infoframe *frame, |
348 | void *buffer, size_t size); | ||
349 | int hdmi_infoframe_check(union hdmi_infoframe *frame); | ||
350 | int hdmi_infoframe_unpack(union hdmi_infoframe *frame, | ||
351 | const void *buffer, size_t size); | ||
336 | void hdmi_infoframe_log(const char *level, struct device *dev, | 352 | void hdmi_infoframe_log(const char *level, struct device *dev, |
337 | union hdmi_infoframe *frame); | 353 | const union hdmi_infoframe *frame); |
338 | 354 | ||
339 | #endif /* _DRM_HDMI_H */ | 355 | #endif /* _DRM_HDMI_H */ |
diff --git a/include/linux/reservation.h b/include/linux/reservation.h index 02166e815afb..2f0ffca35780 100644 --- a/include/linux/reservation.h +++ b/include/linux/reservation.h | |||
@@ -68,7 +68,6 @@ struct reservation_object_list { | |||
68 | * @seq: sequence count for managing RCU read-side synchronization | 68 | * @seq: sequence count for managing RCU read-side synchronization |
69 | * @fence_excl: the exclusive fence, if there is one currently | 69 | * @fence_excl: the exclusive fence, if there is one currently |
70 | * @fence: list of current shared fences | 70 | * @fence: list of current shared fences |
71 | * @staged: staged copy of shared fences for RCU updates | ||
72 | */ | 71 | */ |
73 | struct reservation_object { | 72 | struct reservation_object { |
74 | struct ww_mutex lock; | 73 | struct ww_mutex lock; |
@@ -76,7 +75,6 @@ struct reservation_object { | |||
76 | 75 | ||
77 | struct dma_fence __rcu *fence_excl; | 76 | struct dma_fence __rcu *fence_excl; |
78 | struct reservation_object_list __rcu *fence; | 77 | struct reservation_object_list __rcu *fence; |
79 | struct reservation_object_list *staged; | ||
80 | }; | 78 | }; |
81 | 79 | ||
82 | #define reservation_object_held(obj) lockdep_is_held(&(obj)->lock.base) | 80 | #define reservation_object_held(obj) lockdep_is_held(&(obj)->lock.base) |
@@ -95,7 +93,6 @@ reservation_object_init(struct reservation_object *obj) | |||
95 | __seqcount_init(&obj->seq, reservation_seqcount_string, &reservation_seqcount_class); | 93 | __seqcount_init(&obj->seq, reservation_seqcount_string, &reservation_seqcount_class); |
96 | RCU_INIT_POINTER(obj->fence, NULL); | 94 | RCU_INIT_POINTER(obj->fence, NULL); |
97 | RCU_INIT_POINTER(obj->fence_excl, NULL); | 95 | RCU_INIT_POINTER(obj->fence_excl, NULL); |
98 | obj->staged = NULL; | ||
99 | } | 96 | } |
100 | 97 | ||
101 | /** | 98 | /** |
@@ -124,7 +121,6 @@ reservation_object_fini(struct reservation_object *obj) | |||
124 | 121 | ||
125 | kfree(fobj); | 122 | kfree(fobj); |
126 | } | 123 | } |
127 | kfree(obj->staged); | ||
128 | 124 | ||
129 | ww_mutex_destroy(&obj->lock); | 125 | ww_mutex_destroy(&obj->lock); |
130 | } | 126 | } |
@@ -218,6 +214,11 @@ reservation_object_trylock(struct reservation_object *obj) | |||
218 | static inline void | 214 | static inline void |
219 | reservation_object_unlock(struct reservation_object *obj) | 215 | reservation_object_unlock(struct reservation_object *obj) |
220 | { | 216 | { |
217 | #ifdef CONFIG_DEBUG_MUTEXES | ||
218 | /* Test shared fence slot reservation */ | ||
219 | if (obj->fence) | ||
220 | obj->fence->shared_max = obj->fence->shared_count; | ||
221 | #endif | ||
221 | ww_mutex_unlock(&obj->lock); | 222 | ww_mutex_unlock(&obj->lock); |
222 | } | 223 | } |
223 | 224 | ||
@@ -265,7 +266,8 @@ reservation_object_get_excl_rcu(struct reservation_object *obj) | |||
265 | return fence; | 266 | return fence; |
266 | } | 267 | } |
267 | 268 | ||
268 | int reservation_object_reserve_shared(struct reservation_object *obj); | 269 | int reservation_object_reserve_shared(struct reservation_object *obj, |
270 | unsigned int num_fences); | ||
269 | void reservation_object_add_shared_fence(struct reservation_object *obj, | 271 | void reservation_object_add_shared_fence(struct reservation_object *obj, |
270 | struct dma_fence *fence); | 272 | struct dma_fence *fence); |
271 | 273 | ||