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
3939
4040 /**
4141 * 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.
4942 * @vmap: [optional] creates a virtual mapping for the buffer into kernel
5043 * address space. Same restrictions as for vmap and friends apply.
5144 * @vunmap: [optional] unmaps a vmap from the buffer
5245 */
5346 struct 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+
5456 /**
5557 * @attach:
5658 *
@@ -205,8 +207,6 @@ struct dma_buf_ops { · 148 unmodified lines
205207 * to be restarted.
206208 */
207209 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 *);
210210
211211 /**
212212 * @mmap:
@@ -245,6 +245,31 @@ struct dma_buf_ops { · 32 unmodified lines
245245 */
246246 int (*mmap)(struct dma_buf *, struct vm_area_struct *vma);
247247
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+
248273 void *(*vmap)(struct dma_buf *);
249274 void (*vunmap)(struct dma_buf *, void *vaddr);
250275 };
@@ -307,6 +332,8 @@ struct dma_buf { · 56 unmodified lines
307332 * @dmabuf: buffer for this attachment.
308333 * @dev: device attached to the buffer.
309334 * @node: list of dma_buf_attachment.
335+ * @sgt: cached mapping.
336+ * @dir: direction of cached mapping.
310337 * @priv: exporter specific attachment data.
311338 *
312339 * This structure holds the attachment information between the dma_buf buffer
@@ -322,6 +349,8 @@ struct dma_buf_attachment { · 9 unmodified lines
322349 struct dma_buf *dmabuf;
323350 struct device *dev;
324351 struct list_head node;
352+ struct sg_table *sgt;
353+ enum dma_data_direction dir;
325354 void *priv;
326355 };
327356
include/linux/hdmi.h+55−0
@@ -47,6 +47,7 @@ enum hdmi_infoframe_type { · 46 unmodified lines
4747 HDMI_INFOFRAME_TYPE_AVI = 0x82,
4848 HDMI_INFOFRAME_TYPE_SPD = 0x83,
4949 HDMI_INFOFRAME_TYPE_AUDIO = 0x84,
50+ HDMI_INFOFRAME_TYPE_DRM = 0x87,
5051 };
5152
5253 #define HDMI_IEEE_OUI 0x000c03
@@ -55,6 +56,7 @@ enum hdmi_infoframe_type { · 2 unmodified lines
5556 #define HDMI_AVI_INFOFRAME_SIZE 13
5657 #define HDMI_SPD_INFOFRAME_SIZE 25
5758 #define HDMI_AUDIO_INFOFRAME_SIZE 10
59+#define HDMI_DRM_INFOFRAME_SIZE 26
5860
5961 #define HDMI_INFOFRAME_SIZE(type) \
6062 (HDMI_INFOFRAME_HEADER_SIZE + HDMI_ ## type ## _INFOFRAME_SIZE)
@@ -152,6 +154,17 @@ enum hdmi_content_type { · 91 unmodified lines
152154 HDMI_CONTENT_TYPE_GAME,
153155 };
154156
157+enum hdmi_metadata_type {
158+ HDMI_STATIC_METADATA_TYPE1 = 1,
159+};
160+
161+enum 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+
155168 struct hdmi_avi_infoframe {
156169 enum hdmi_infoframe_type type;
157170 unsigned char version;
@@ -175,12 +188,37 @@ struct hdmi_avi_infoframe { · 17 unmodified lines
175188 unsigned short right_bar;
176189 };
177190
191+/* DRM Infoframe as per CTA 861.G spec */
192+struct 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+
178210 int hdmi_avi_infoframe_init(struct hdmi_avi_infoframe *frame);
179211 ssize_t hdmi_avi_infoframe_pack(struct hdmi_avi_infoframe *frame, void *buffer,
180212 size_t size);
181213 ssize_t hdmi_avi_infoframe_pack_only(const struct hdmi_avi_infoframe *frame,
182214 void *buffer, size_t size);
183215 int hdmi_avi_infoframe_check(struct hdmi_avi_infoframe *frame);
216+int hdmi_drm_infoframe_init(struct hdmi_drm_infoframe *frame);
217+ssize_t hdmi_drm_infoframe_pack(struct hdmi_drm_infoframe *frame, void *buffer,
218+ size_t size);
219+ssize_t hdmi_drm_infoframe_pack_only(const struct hdmi_drm_infoframe *frame,
220+ void *buffer, size_t size);
221+int hdmi_drm_infoframe_check(struct hdmi_drm_infoframe *frame);
184222
185223 enum hdmi_spd_sdi {
186224 HDMI_SPD_SDI_UNKNOWN,
@@ -320,6 +358,22 @@ struct hdmi_vendor_infoframe { · 133 unmodified lines
320358 unsigned int s3d_ext_data;
321359 };
322360
361+/* HDR Metadata as per 861.G spec */
362+struct hdr_static_metadata {
363+ __u8 eotf;
364+ __u8 metadata_type;
365+ __u16 max_cll;
366+ __u16 max_fall;
367+ __u16 min_cll;
368+};
369+
370+struct hdr_sink_metadata {
371+ __u32 metadata_type;
372+ union {
373+ struct hdr_static_metadata hdmi_type1;
374+ };
375+};
376+
323377 int hdmi_vendor_infoframe_init(struct hdmi_vendor_infoframe *frame);
324378 ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame,
325379 void *buffer, size_t size);
@@ -355,6 +409,7 @@ union hdmi_infoframe { · 29 unmodified lines
355409 struct hdmi_spd_infoframe spd;
356410 union hdmi_vendor_any_infoframe vendor;
357411 struct hdmi_audio_infoframe audio;
412+ struct hdmi_drm_infoframe drm;
358413 };
359414
360415 ssize_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