aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm_atomic_helper.h2
-rw-r--r--include/drm/drm_blend.h6
-rw-r--r--include/drm/drm_crtc.h41
-rw-r--r--include/drm/drm_dp_helper.h5
-rw-r--r--include/drm/drm_fb_cma_helper.h1
-rw-r--r--include/drm/drm_fb_helper.h12
-rw-r--r--include/drm/drm_panel.h1
-rw-r--r--include/drm/drm_plane.h16
-rw-r--r--include/drm/drm_print.h2
-rw-r--r--include/drm/drm_syncobj.h5
-rw-r--r--include/linux/fb.h2
-rw-r--r--include/uapi/drm/drm_fourcc.h36
-rw-r--r--include/uapi/linux/udmabuf.h33
13 files changed, 151 insertions, 11 deletions
diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h
index 99e2a5297c69..f4c7ed876c97 100644
--- a/include/drm/drm_atomic_helper.h
+++ b/include/drm/drm_atomic_helper.h
@@ -156,6 +156,8 @@ void __drm_atomic_helper_crtc_destroy_state(struct drm_crtc_state *state);
156void drm_atomic_helper_crtc_destroy_state(struct drm_crtc *crtc, 156void drm_atomic_helper_crtc_destroy_state(struct drm_crtc *crtc,
157 struct drm_crtc_state *state); 157 struct drm_crtc_state *state);
158 158
159void __drm_atomic_helper_plane_reset(struct drm_plane *plane,
160 struct drm_plane_state *state);
159void drm_atomic_helper_plane_reset(struct drm_plane *plane); 161void drm_atomic_helper_plane_reset(struct drm_plane *plane);
160void __drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane, 162void __drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane,
161 struct drm_plane_state *state); 163 struct drm_plane_state *state);
diff --git a/include/drm/drm_blend.h b/include/drm/drm_blend.h
index 330c561c4c11..88bdfec3bd88 100644
--- a/include/drm/drm_blend.h
+++ b/include/drm/drm_blend.h
@@ -27,6 +27,10 @@
27#include <linux/ctype.h> 27#include <linux/ctype.h>
28#include <drm/drm_mode.h> 28#include <drm/drm_mode.h>
29 29
30#define DRM_MODE_BLEND_PREMULTI 0
31#define DRM_MODE_BLEND_COVERAGE 1
32#define DRM_MODE_BLEND_PIXEL_NONE 2
33
30struct drm_device; 34struct drm_device;
31struct drm_atomic_state; 35struct drm_atomic_state;
32struct drm_plane; 36struct drm_plane;
@@ -52,4 +56,6 @@ int drm_plane_create_zpos_immutable_property(struct drm_plane *plane,
52 unsigned int zpos); 56 unsigned int zpos);
53int drm_atomic_normalize_zpos(struct drm_device *dev, 57int drm_atomic_normalize_zpos(struct drm_device *dev,
54 struct drm_atomic_state *state); 58 struct drm_atomic_state *state);
59int drm_plane_create_blend_mode_property(struct drm_plane *plane,
60 unsigned int supported_modes);
55#endif 61#endif
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 92e7fc7f05a4..b21437bc95bf 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -744,8 +744,45 @@ struct drm_crtc_funcs {
744 * 744 *
745 * 0 on success or a negative error code on failure. 745 * 0 on success or a negative error code on failure.
746 */ 746 */
747 int (*set_crc_source)(struct drm_crtc *crtc, const char *source, 747 int (*set_crc_source)(struct drm_crtc *crtc, const char *source);
748 size_t *values_cnt); 748 /**
749 * @verify_crc_source:
750 *
751 * verifies the source of CRC checksums of frames before setting the
752 * source for CRC and during crc open. Source parameter can be NULL
753 * while disabling crc source.
754 *
755 * This callback is optional if the driver does not support any CRC
756 * generation functionality.
757 *
758 * RETURNS:
759 *
760 * 0 on success or a negative error code on failure.
761 */
762 int (*verify_crc_source)(struct drm_crtc *crtc, const char *source,
763 size_t *values_cnt);
764 /**
765 * @get_crc_sources:
766 *
767 * Driver callback for getting a list of all the available sources for
768 * CRC generation. This callback depends upon verify_crc_source, So
769 * verify_crc_source callback should be implemented before implementing
770 * this. Driver can pass full list of available crc sources, this
771 * callback does the verification on each crc-source before passing it
772 * to userspace.
773 *
774 * This callback is optional if the driver does not support exporting of
775 * possible CRC sources list.
776 *
777 * RETURNS:
778 *
779 * a constant character pointer to the list of all the available CRC
780 * sources. On failure driver should return NULL. count should be
781 * updated with number of sources in list. if zero we don't process any
782 * source from the list.
783 */
784 const char *const *(*get_crc_sources)(struct drm_crtc *crtc,
785 size_t *count);
749 786
750 /** 787 /**
751 * @atomic_print_state: 788 * @atomic_print_state:
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index 05cc31b5db16..698082a02b97 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -123,8 +123,9 @@
123# define DP_FRAMING_CHANGE_CAP (1 << 1) 123# define DP_FRAMING_CHANGE_CAP (1 << 1)
124# define DP_DPCD_DISPLAY_CONTROL_CAPABLE (1 << 3) /* edp v1.2 or higher */ 124# define DP_DPCD_DISPLAY_CONTROL_CAPABLE (1 << 3) /* edp v1.2 or higher */
125 125
126#define DP_TRAINING_AUX_RD_INTERVAL 0x00e /* XXX 1.2? */ 126#define DP_TRAINING_AUX_RD_INTERVAL 0x00e /* XXX 1.2? */
127# define DP_TRAINING_AUX_RD_MASK 0x7F /* XXX 1.2? */ 127# define DP_TRAINING_AUX_RD_MASK 0x7F /* DP 1.3 */
128# define DP_EXTENDED_RECEIVER_CAP_FIELD_PRESENT (1 << 7) /* DP 1.3 */
128 129
129#define DP_ADAPTER_CAP 0x00f /* 1.2 */ 130#define DP_ADAPTER_CAP 0x00f /* 1.2 */
130# define DP_FORCE_LOAD_SENSE_CAP (1 << 0) 131# define DP_FORCE_LOAD_SENSE_CAP (1 << 0)
diff --git a/include/drm/drm_fb_cma_helper.h b/include/drm/drm_fb_cma_helper.h
index 96e26e3b9a0c..4a65f0d155b0 100644
--- a/include/drm/drm_fb_cma_helper.h
+++ b/include/drm/drm_fb_cma_helper.h
@@ -26,7 +26,6 @@ void drm_fbdev_cma_fini(struct drm_fbdev_cma *fbdev_cma);
26 26
27void drm_fbdev_cma_restore_mode(struct drm_fbdev_cma *fbdev_cma); 27void drm_fbdev_cma_restore_mode(struct drm_fbdev_cma *fbdev_cma);
28void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma); 28void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma);
29void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, bool state);
30void drm_fbdev_cma_set_suspend_unlocked(struct drm_fbdev_cma *fbdev_cma, 29void drm_fbdev_cma_set_suspend_unlocked(struct drm_fbdev_cma *fbdev_cma,
31 bool state); 30 bool state);
32 31
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index 5db08c8f1d25..8b6ab3200a2c 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -615,4 +615,16 @@ drm_fb_helper_remove_conflicting_framebuffers(struct apertures_struct *a,
615#endif 615#endif
616} 616}
617 617
618static inline int
619drm_fb_helper_remove_conflicting_pci_framebuffers(struct pci_dev *pdev,
620 int resource_id,
621 const char *name)
622{
623#if IS_REACHABLE(CONFIG_FB)
624 return remove_conflicting_pci_framebuffers(pdev, resource_id, name);
625#else
626 return 0;
627#endif
628}
629
618#endif 630#endif
diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
index 582a0ec0aa70..a82c292af6c5 100644
--- a/include/drm/drm_panel.h
+++ b/include/drm/drm_panel.h
@@ -82,6 +82,7 @@ struct drm_panel_funcs {
82 * @drm: DRM device owning the panel 82 * @drm: DRM device owning the panel
83 * @connector: DRM connector that the panel is attached to 83 * @connector: DRM connector that the panel is attached to
84 * @dev: parent device of the panel 84 * @dev: parent device of the panel
85 * @link: link from panel device (supplier) to DRM device (consumer)
85 * @funcs: operations that can be performed on the panel 86 * @funcs: operations that can be performed on the panel
86 * @list: panel entry in registry 87 * @list: panel entry in registry
87 */ 88 */
diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
index 8a152dc16ea5..16f5b66684ca 100644
--- a/include/drm/drm_plane.h
+++ b/include/drm/drm_plane.h
@@ -119,6 +119,14 @@ struct drm_plane_state {
119 u16 alpha; 119 u16 alpha;
120 120
121 /** 121 /**
122 * @pixel_blend_mode:
123 * The alpha blending equation selection, describing how the pixels from
124 * the current plane are composited with the background. Value can be
125 * one of DRM_MODE_BLEND_*
126 */
127 uint16_t pixel_blend_mode;
128
129 /**
122 * @rotation: 130 * @rotation:
123 * Rotation of the plane. See drm_plane_create_rotation_property() for 131 * Rotation of the plane. See drm_plane_create_rotation_property() for
124 * more details. 132 * more details.
@@ -659,6 +667,14 @@ struct drm_plane {
659 * drm_plane_create_rotation_property(). 667 * drm_plane_create_rotation_property().
660 */ 668 */
661 struct drm_property *rotation_property; 669 struct drm_property *rotation_property;
670 /**
671 * @blend_mode_property:
672 * Optional "pixel blend mode" enum property for this plane.
673 * Blend mode property represents the alpha blending equation selection,
674 * describing how the pixels from the current plane are composited with
675 * the background.
676 */
677 struct drm_property *blend_mode_property;
662 678
663 /** 679 /**
664 * @color_encoding_property: 680 * @color_encoding_property:
diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
index f3e6eed3e79c..afbc3beef089 100644
--- a/include/drm/drm_print.h
+++ b/include/drm/drm_print.h
@@ -381,7 +381,7 @@ void drm_err(const char *format, ...);
381 381
382#define DRM_DEV_DEBUG_DP(dev, fmt, ...) \ 382#define DRM_DEV_DEBUG_DP(dev, fmt, ...) \
383 drm_dev_dbg(dev, DRM_UT_DP, fmt, ## __VA_ARGS__) 383 drm_dev_dbg(dev, DRM_UT_DP, fmt, ## __VA_ARGS__)
384#define DRM_DEBUG_DP(dev, fmt, ...) \ 384#define DRM_DEBUG_DP(fmt, ...) \
385 drm_dbg(DRM_UT_DP, fmt, ## __VA_ARGS__) 385 drm_dbg(DRM_UT_DP, fmt, ## __VA_ARGS__)
386 386
387#define _DRM_DEV_DEFINE_DEBUG_RATELIMITED(dev, category, fmt, ...) \ 387#define _DRM_DEV_DEFINE_DEBUG_RATELIMITED(dev, category, fmt, ...) \
diff --git a/include/drm/drm_syncobj.h b/include/drm/drm_syncobj.h
index 3980602472c0..e419c79ba94d 100644
--- a/include/drm/drm_syncobj.h
+++ b/include/drm/drm_syncobj.h
@@ -131,11 +131,6 @@ drm_syncobj_fence_get(struct drm_syncobj *syncobj)
131 131
132struct drm_syncobj *drm_syncobj_find(struct drm_file *file_private, 132struct drm_syncobj *drm_syncobj_find(struct drm_file *file_private,
133 u32 handle); 133 u32 handle);
134void drm_syncobj_add_callback(struct drm_syncobj *syncobj,
135 struct drm_syncobj_cb *cb,
136 drm_syncobj_func_t func);
137void drm_syncobj_remove_callback(struct drm_syncobj *syncobj,
138 struct drm_syncobj_cb *cb);
139void drm_syncobj_replace_fence(struct drm_syncobj *syncobj, 134void drm_syncobj_replace_fence(struct drm_syncobj *syncobj,
140 struct dma_fence *fence); 135 struct dma_fence *fence);
141int drm_syncobj_find_fence(struct drm_file *file_private, 136int drm_syncobj_find_fence(struct drm_file *file_private,
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 3e7e75383d32..3cd375dafd0e 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -632,6 +632,8 @@ extern ssize_t fb_sys_write(struct fb_info *info, const char __user *buf,
632extern int register_framebuffer(struct fb_info *fb_info); 632extern int register_framebuffer(struct fb_info *fb_info);
633extern int unregister_framebuffer(struct fb_info *fb_info); 633extern int unregister_framebuffer(struct fb_info *fb_info);
634extern int unlink_framebuffer(struct fb_info *fb_info); 634extern int unlink_framebuffer(struct fb_info *fb_info);
635extern int remove_conflicting_pci_framebuffers(struct pci_dev *pdev, int res_id,
636 const char *name);
635extern int remove_conflicting_framebuffers(struct apertures_struct *a, 637extern int remove_conflicting_framebuffers(struct apertures_struct *a,
636 const char *name, bool primary); 638 const char *name, bool primary);
637extern int fb_prepare_logo(struct fb_info *fb_info, int rotate); 639extern int fb_prepare_logo(struct fb_info *fb_info, int rotate);
diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
index 721ab7e54d96..2ed46e9ae16a 100644
--- a/include/uapi/drm/drm_fourcc.h
+++ b/include/uapi/drm/drm_fourcc.h
@@ -30,6 +30,42 @@
30extern "C" { 30extern "C" {
31#endif 31#endif
32 32
33/**
34 * DOC: overview
35 *
36 * In the DRM subsystem, framebuffer pixel formats are described using the
37 * fourcc codes defined in `include/uapi/drm/drm_fourcc.h`. In addition to the
38 * fourcc code, a Format Modifier may optionally be provided, in order to
39 * further describe the buffer's format - for example tiling or compression.
40 *
41 * Format Modifiers
42 * ----------------
43 *
44 * Format modifiers are used in conjunction with a fourcc code, forming a
45 * unique fourcc:modifier pair. This format:modifier pair must fully define the
46 * format and data layout of the buffer, and should be the only way to describe
47 * that particular buffer.
48 *
49 * Having multiple fourcc:modifier pairs which describe the same layout should
50 * be avoided, as such aliases run the risk of different drivers exposing
51 * different names for the same data format, forcing userspace to understand
52 * that they are aliases.
53 *
54 * Format modifiers may change any property of the buffer, including the number
55 * of planes and/or the required allocation size. Format modifiers are
56 * vendor-namespaced, and as such the relationship between a fourcc code and a
57 * modifier is specific to the modifer being used. For example, some modifiers
58 * may preserve meaning - such as number of planes - from the fourcc code,
59 * whereas others may not.
60 *
61 * Vendors should document their modifier usage in as much detail as
62 * possible, to ensure maximum compatibility across devices, drivers and
63 * applications.
64 *
65 * The authoritative list of format modifier codes is found in
66 * `include/uapi/drm/drm_fourcc.h`
67 */
68
33#define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \ 69#define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \
34 ((__u32)(c) << 16) | ((__u32)(d) << 24)) 70 ((__u32)(c) << 16) | ((__u32)(d) << 24))
35 71
diff --git a/include/uapi/linux/udmabuf.h b/include/uapi/linux/udmabuf.h
new file mode 100644
index 000000000000..46b6532ed855
--- /dev/null
+++ b/include/uapi/linux/udmabuf.h
@@ -0,0 +1,33 @@
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef _UAPI_LINUX_UDMABUF_H
3#define _UAPI_LINUX_UDMABUF_H
4
5#include <linux/types.h>
6#include <linux/ioctl.h>
7
8#define UDMABUF_FLAGS_CLOEXEC 0x01
9
10struct udmabuf_create {
11 __u32 memfd;
12 __u32 flags;
13 __u64 offset;
14 __u64 size;
15};
16
17struct udmabuf_create_item {
18 __u32 memfd;
19 __u32 __pad;
20 __u64 offset;
21 __u64 size;
22};
23
24struct udmabuf_create_list {
25 __u32 flags;
26 __u32 count;
27 struct udmabuf_create_item list[];
28};
29
30#define UDMABUF_CREATE _IOW('u', 0x42, struct udmabuf_create)
31#define UDMABUF_CREATE_LIST _IOW('u', 0x43, struct udmabuf_create_list)
32
33#endif /* _UAPI_LINUX_UDMABUF_H */