History

Merge tag 'drm-misc-next-2019-05-24' of git://anongit.freedesktop.org/drm/drm-misc into drm-next

drm-misc-next for v5.3, try #2: UAPI Changes: - Add HDR source metadata property. - Make drm.h compile on GNU/kFreeBSD by including stdint.h - Clarify how the userspace reviewer has to review new kernel UAPI. - Clarify that for using new UAPI, merging to drm-next or drm-misc-next should be enough. Cross-subsystem Changes: - video/hdmi: Add unpack function for DRM infoframes. - Device tree bindings: * Updating a property for Mali Midgard GPUs * Updating a property for STM32 DSI panel * Adding support for FriendlyELEC HD702E 800x1280 panel * Adding support for Evervision VGG804821 800x480 5.0" WVGA TFT panel * Adding support for the EDT ET035012DM6 3.5" 320x240 QVGA 24-bit RGB TFT. * Adding support for Three Five displays TFC S9700RTWV43TR-01B 800x480 panel with resistive touch found on TI's AM335X-EVM. * Adding support for EDT ETM0430G0DH6 480x272 panel. - Add OSD101T2587-53TS driver with DT bindings. - Add Samsung S6E63M0 panel driver with DT bindings. - Add VXT VL050-8048NT-C01 800x480 panel with DT bindings. - Dma-buf: - Make mmap callback actually optional. - Documentation updates. - Fix debugfs refcount inbalance. - Remove unused sync_dump function. - Fix device tree bindings in drm-misc-next after a botched merge. Core Changes: - Add support for HDR infoframes and related EDID parsing. - Remove prime sg_table caching, now done inside dma-buf. - Add shiny new drm_gem_vram helpers for simple VRAM drivers; with some fixes to the new API on top. - Small fix to job cleanup without timeout handler. - Documentation fixes to drm_fourcc. - Replace lookups of drm_format with struct drm_format_info; remove functions that become obsolete by this conversion. - Remove double include in bridge/panel.c and some drivers. - Remove drmP.h include from drm/edid and drm/dp. - Fix null pointer deref in drm_fb_helper_hotplug_event(). - Remove most members from drm_fb_helper_crtc, only mode_set is kept. - Remove race of fb helpers with userspace; only restore mode when userspace is not master. - Move legacy setup from drm_file.c to drm_legacy_misc.c - Rework scheduler job destruction. - drm/bus was removed, remove from TODO. - Add __drm_atomic_helper_crtc_reset() to subclass crtc_state, and convert some drivers to use it (conversion is not complete yet). - Bump vblank timeout wait to 100 ms for atomic. - Docbook fix for drm_hdmi_infoframe_set_hdr_metadata. Driver Changes: - sun4i: Use DRM_GEM_CMA_VMAP_DRIVER_OPS instead of definining manually. - v3d: Small cleanups, adding support for compute shaders, reservation/synchronization fixes and job management refactoring, fixes MMU and debugfs. - lima: Fix null pointer in irq handler on startup, set default timeout for scheduled jobs. - stm/ltdc: Assorted fixes and adding FB modifier support. - amdgpu: Avoid hw reset if guilty job was already signaled. - virtio: Add seqno to fences, add trace events, use correct flags for fence allocation. - Convert AST, bochs, mgag200, vboxvideo, hisilicon to the new drm_gem_vram API. - sun6i_mipi_dsi: Support DSI GENERIC_SHORT_WRITE_2 transfers. - bochs: Small fix to use PTR_RET_OR_ZERO and driver unload. - gma500: header fixes - cirrus: Remove unused files. - mediatek: Fix compiler warning after merging the HDR series. - vc4: Rework binner bo handling. Signed-off-by: Dave Airlie <airlied@redhat.com>

Dave Airlie committed 7 years ago

Commit 88cd7a22 parents cd6c84d 909fa33220 files · +5943 −4593Browse files

Showing the changes to include/linux (2 of 220 files). Show all

Unified · Split

2 files
  1. include/linux/dma-buf.h +38 −9
  2. include/linux/hdmi.h +55 −0
include/linux/dma-buf.h+38−9
@@ -39,18 +39,20 @@ struct dma_buf_attachment; · 38 unmodified lines
39 39
40/**40/**
41 * struct dma_buf_ops - operations possible on struct dma_buf41 * struct dma_buf_ops - operations possible on struct dma_buf
42 * @map_atomic: [optional] maps a page from the buffer into kernel address
43 * space, users may not block until the subsequent unmap call.
44 * This callback must not sleep.
45 * @unmap_atomic: [optional] unmaps a atomically mapped page from the buffer.
46 * This Callback must not sleep.
47 * @map: [optional] maps a page from the buffer into kernel address space.
48 * @unmap: [optional] unmaps a page from the buffer.
49 * @vmap: [optional] creates a virtual mapping for the buffer into kernel42 * @vmap: [optional] creates a virtual mapping for the buffer into kernel
50 * address space. Same restrictions as for vmap and friends apply.43 * address space. Same restrictions as for vmap and friends apply.
51 * @vunmap: [optional] unmaps a vmap from the buffer44 * @vunmap: [optional] unmaps a vmap from the buffer
52 */45 */
53struct dma_buf_ops {46struct dma_buf_ops {
47 /**
48 * @cache_sgt_mapping:
49 *
50 * If true the framework will cache the first mapping made for each
51 * attachment. This avoids creating mappings for attachments multiple
52 * times.
53 */
54 bool cache_sgt_mapping;
55
54 /**56 /**
55 * @attach:57 * @attach:
56 *58 *
@@ -205,8 +207,6 @@ struct dma_buf_ops { · 148 unmodified lines
205 * to be restarted.207 * to be restarted.
206 */208 */
207 int (*end_cpu_access)(struct dma_buf *, enum dma_data_direction);209 int (*end_cpu_access)(struct dma_buf *, enum dma_data_direction);
208 void *(*map)(struct dma_buf *, unsigned long);
209 void (*unmap)(struct dma_buf *, unsigned long, void *);
210 210
211 /**211 /**
212 * @mmap:212 * @mmap:
@@ -245,6 +245,31 @@ struct dma_buf_ops { · 32 unmodified lines
245 */245 */
246 int (*mmap)(struct dma_buf *, struct vm_area_struct *vma);246 int (*mmap)(struct dma_buf *, struct vm_area_struct *vma);
247 247
248 /**
249 * @map:
250 *
251 * Maps a page from the buffer into kernel address space. The page is
252 * specified by offset into the buffer in PAGE_SIZE units.
253 *
254 * This callback is optional.
255 *
256 * Returns:
257 *
258 * Virtual address pointer where requested page can be accessed. NULL
259 * on error or when this function is unimplemented by the exporter.
260 */
261 void *(*map)(struct dma_buf *, unsigned long);
262
263 /**
264 * @unmap:
265 *
266 * Unmaps a page from the buffer. Page offset and address pointer should
267 * be the same as the one passed to and returned by matching call to map.
268 *
269 * This callback is optional.
270 */
271 void (*unmap)(struct dma_buf *, unsigned long, void *);
272
248 void *(*vmap)(struct dma_buf *);273 void *(*vmap)(struct dma_buf *);
249 void (*vunmap)(struct dma_buf *, void *vaddr);274 void (*vunmap)(struct dma_buf *, void *vaddr);
250};275};
@@ -307,6 +332,8 @@ struct dma_buf { · 56 unmodified lines
307 * @dmabuf: buffer for this attachment.332 * @dmabuf: buffer for this attachment.
308 * @dev: device attached to the buffer.333 * @dev: device attached to the buffer.
309 * @node: list of dma_buf_attachment.334 * @node: list of dma_buf_attachment.
335 * @sgt: cached mapping.
336 * @dir: direction of cached mapping.
310 * @priv: exporter specific attachment data.337 * @priv: exporter specific attachment data.
311 *338 *
312 * This structure holds the attachment information between the dma_buf buffer339 * This structure holds the attachment information between the dma_buf buffer
@@ -322,6 +349,8 @@ struct dma_buf_attachment { · 9 unmodified lines
322 struct dma_buf *dmabuf;349 struct dma_buf *dmabuf;
323 struct device *dev;350 struct device *dev;
324 struct list_head node;351 struct list_head node;
352 struct sg_table *sgt;
353 enum dma_data_direction dir;
325 void *priv;354 void *priv;
326};355};
327 356
include/linux/hdmi.h+55−0
@@ -47,6 +47,7 @@ enum hdmi_infoframe_type { · 46 unmodified lines
47 HDMI_INFOFRAME_TYPE_AVI = 0x82,47 HDMI_INFOFRAME_TYPE_AVI = 0x82,
48 HDMI_INFOFRAME_TYPE_SPD = 0x83,48 HDMI_INFOFRAME_TYPE_SPD = 0x83,
49 HDMI_INFOFRAME_TYPE_AUDIO = 0x84,49 HDMI_INFOFRAME_TYPE_AUDIO = 0x84,
50 HDMI_INFOFRAME_TYPE_DRM = 0x87,
50};51};
51 52
52#define HDMI_IEEE_OUI 0x000c0353#define HDMI_IEEE_OUI 0x000c03
@@ -55,6 +56,7 @@ enum hdmi_infoframe_type { · 2 unmodified lines
55#define HDMI_AVI_INFOFRAME_SIZE 1356#define HDMI_AVI_INFOFRAME_SIZE 13
56#define HDMI_SPD_INFOFRAME_SIZE 2557#define HDMI_SPD_INFOFRAME_SIZE 25
57#define HDMI_AUDIO_INFOFRAME_SIZE 1058#define HDMI_AUDIO_INFOFRAME_SIZE 10
59#define HDMI_DRM_INFOFRAME_SIZE 26
58 60
59#define HDMI_INFOFRAME_SIZE(type) \61#define HDMI_INFOFRAME_SIZE(type) \
60 (HDMI_INFOFRAME_HEADER_SIZE + HDMI_ ## type ## _INFOFRAME_SIZE)62 (HDMI_INFOFRAME_HEADER_SIZE + HDMI_ ## type ## _INFOFRAME_SIZE)
@@ -152,6 +154,17 @@ enum hdmi_content_type { · 91 unmodified lines
152 HDMI_CONTENT_TYPE_GAME,154 HDMI_CONTENT_TYPE_GAME,
153};155};
154 156
157enum hdmi_metadata_type {
158 HDMI_STATIC_METADATA_TYPE1 = 1,
159};
160
161enum hdmi_eotf {
162 HDMI_EOTF_TRADITIONAL_GAMMA_SDR,
163 HDMI_EOTF_TRADITIONAL_GAMMA_HDR,
164 HDMI_EOTF_SMPTE_ST2084,
165 HDMI_EOTF_BT_2100_HLG,
166};
167
155struct hdmi_avi_infoframe {168struct hdmi_avi_infoframe {
156 enum hdmi_infoframe_type type;169 enum hdmi_infoframe_type type;
157 unsigned char version;170 unsigned char version;
@@ -175,12 +188,37 @@ struct hdmi_avi_infoframe { · 17 unmodified lines
175 unsigned short right_bar;188 unsigned short right_bar;
176};189};
177 190
191/* DRM Infoframe as per CTA 861.G spec */
192struct hdmi_drm_infoframe {
193 enum hdmi_infoframe_type type;
194 unsigned char version;
195 unsigned char length;
196 enum hdmi_eotf eotf;
197 enum hdmi_metadata_type metadata_type;
198 struct {
199 u16 x, y;
200 } display_primaries[3];
201 struct {
202 u16 x, y;
203 } white_point;
204 u16 max_display_mastering_luminance;
205 u16 min_display_mastering_luminance;
206 u16 max_cll;
207 u16 max_fall;
208};
209
178int hdmi_avi_infoframe_init(struct hdmi_avi_infoframe *frame);210int hdmi_avi_infoframe_init(struct hdmi_avi_infoframe *frame);
179ssize_t hdmi_avi_infoframe_pack(struct hdmi_avi_infoframe *frame, void *buffer,211ssize_t hdmi_avi_infoframe_pack(struct hdmi_avi_infoframe *frame, void *buffer,
180 size_t size);212 size_t size);
181ssize_t hdmi_avi_infoframe_pack_only(const struct hdmi_avi_infoframe *frame,213ssize_t hdmi_avi_infoframe_pack_only(const struct hdmi_avi_infoframe *frame,
182 void *buffer, size_t size);214 void *buffer, size_t size);
183int hdmi_avi_infoframe_check(struct hdmi_avi_infoframe *frame);215int hdmi_avi_infoframe_check(struct hdmi_avi_infoframe *frame);
216int hdmi_drm_infoframe_init(struct hdmi_drm_infoframe *frame);
217ssize_t hdmi_drm_infoframe_pack(struct hdmi_drm_infoframe *frame, void *buffer,
218 size_t size);
219ssize_t hdmi_drm_infoframe_pack_only(const struct hdmi_drm_infoframe *frame,
220 void *buffer, size_t size);
221int hdmi_drm_infoframe_check(struct hdmi_drm_infoframe *frame);
184 222
185enum hdmi_spd_sdi {223enum hdmi_spd_sdi {
186 HDMI_SPD_SDI_UNKNOWN,224 HDMI_SPD_SDI_UNKNOWN,
@@ -320,6 +358,22 @@ struct hdmi_vendor_infoframe { · 133 unmodified lines
320 unsigned int s3d_ext_data;358 unsigned int s3d_ext_data;
321};359};
322 360
361/* HDR Metadata as per 861.G spec */
362struct hdr_static_metadata {
363 __u8 eotf;
364 __u8 metadata_type;
365 __u16 max_cll;
366 __u16 max_fall;
367 __u16 min_cll;
368};
369
370struct hdr_sink_metadata {
371 __u32 metadata_type;
372 union {
373 struct hdr_static_metadata hdmi_type1;
374 };
375};
376
323int hdmi_vendor_infoframe_init(struct hdmi_vendor_infoframe *frame);377int hdmi_vendor_infoframe_init(struct hdmi_vendor_infoframe *frame);
324ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame,378ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame,
325 void *buffer, size_t size);379 void *buffer, size_t size);
@@ -355,6 +409,7 @@ union hdmi_infoframe { · 29 unmodified lines
355 struct hdmi_spd_infoframe spd;409 struct hdmi_spd_infoframe spd;
356 union hdmi_vendor_any_infoframe vendor;410 union hdmi_vendor_any_infoframe vendor;
357 struct hdmi_audio_infoframe audio;411 struct hdmi_audio_infoframe audio;
412 struct hdmi_drm_infoframe drm;
358};413};
359 414
360ssize_t hdmi_infoframe_pack(union hdmi_infoframe *frame, void *buffer,415ssize_t hdmi_infoframe_pack(union hdmi_infoframe *frame, void *buffer,

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