History

Merge tag 'drm-misc-next-2022-01-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next

[airlied: add two missing Kconfig] drm-misc-next for v5.18: UAPI Changes: - Fix invalid IN_FORMATS blob when plane->format_mod_supported is NULL. Cross-subsystem Changes: - Assorted dt bindings updates. - Fix vga16fb vga checking on x86. - Fix extra semicolon in rwsem.h's _down_write_nest_lock. - Assorted small fixes to agp and fbdev drivers. - Fix oops in creating a udmabuf with 0 pages. - Hot-unplug firmware fb devices on forced removal - Reqquest memory region in simplefb and simpledrm, and don't make the ioresource as busy. Core Changes: - Mock a drm_plane in drm-plane-helper selftest. - Assorted bug fixes to device logging, dbi. - Use DP helper for sink count in mst. - Assorted documentation fixes. - Assorted small fixes. - Move DP headers to drm/dp, and add a drm dp helper module. - Move the buddy allocator from i915 to common drm. - Add simple pci and platform module init macros to remove a lot of boilerplate from some drivers. - Support microsoft extension for HMDs and specialized monitors. - Improve edid parser's deep color handling. - Add type 7 timing support to edid parser. - Add a weak backpointer to the ttm_bo from ttm_resource - Add 3 eDP panels. Driver Changes: - Add support for HDMI and JZ4780 to ingenic. - Add support for higher DP/eDP bitrates to nouveau. - Assorted driver fixes to tilcdc, vmwgfx, sn65dsi83, meson, stm, panfrost, v3d, gma500, vc4, virtio, mgag200, ast, radeon, amdgpu, nouveau, various bridge drivers. - Convert and revert exynos dsi support to bridge driver. - Add vcc supply regulator support for sn65dsi83. - More conversion of bridge/chipone-icn6211 to atomic. - Remove conflicting fb's from stm, and add support for new hw version. - Add device link in parade-ps8640 to fix suspend/resume. - Update Boe-tv110c9m init sequence. - Add wide screen support to AST2600. - Fix omapdrm implicit dma_buf fencing. - Add support for multiple overlay planes to vkms. - Convert bridge/anx7625 to atomic, add HDCP support, add eld support for audio, and fix HPD. - Add driver for ChromeOS privacy screen. - Handover display from firmware to vc4 more gracefully, and support nomodeset. - Add flexible and ycbcr pixel formats to stm/ltdc. - Convert exynos mipi dsi to atomic. - Add initial dual core group GPUs support to panfrost. - No longer add exclusive fence in amdgpu as shared fence. - Add CSC and full range supoprt to vc4. - Shutdown the display on system shutdown and unbind. - Add Multi-Inno Technology MI0700S4T-6 simple panel. Signed-off-by: Dave Airlie <airlied@redhat.com>

Dave Airlie committed 4 years ago

Commit 53dbee42 parents 26291c5 a5d092d233 files · +5377 −2613Browse files

Showing the changes to include (22 of 233 files). Show all

Unified · Split

22 files
  1. include/drm/bridge/dw_mipi_dsi.h +3 −1
  2. include/drm/dp/drm_dp_aux_bus.h +0 −0
  3. include/drm/dp/drm_dp_dual_mode_helper.h +0 −0
  4. include/drm/dp/drm_dp_helper.h +2 −5
  5. include/drm/dp/drm_dp_mst_helper.h +1 −1
  6. include/drm/drm_buddy.h +150 −0
  7. include/drm/drm_connector.h +12 −6
  8. include/drm/drm_crtc.h +10 −0
  9. include/drm/drm_dsc.h +1 −1
  10. include/drm/drm_edid.h +2 −2
  11. include/drm/drm_mipi_dbi.h +1 −1
  12. include/drm/drm_modeset_lock.h +1 −0
  13. include/drm/drm_module.h +125 −0
  14. include/drm/drm_plane.h +1 −1
  15. include/drm/drm_privacy_screen_driver.h +12 −1
  16. include/drm/ttm/ttm_resource.h +16 −7
  17. include/linux/dma-buf-map.h +2 −2
  18. include/linux/dma-resv.h +2 −2
  19. include/linux/fb.h +1 −0
  20. include/linux/rwsem.h +1 −1
  21. include/soc/bcm2835/raspberrypi-firmware.h +1 −0
  22. include/uapi/drm/panfrost_drm.h +2 −2
include/drm/bridge/dw_mipi_dsi.h+3−1
@@ -51,7 +51,9 @@ struct dw_mipi_dsi_plat_data { · 50 unmodified lines
5151 unsigned int max_data_lanes;
5252
5353 enum drm_mode_status (*mode_valid)(void *priv_data,
54− const struct drm_display_mode *mode);
54+ const struct drm_display_mode *mode,
55+ unsigned long mode_flags,
56+ u32 lanes, u32 format);
5557
5658 const struct dw_mipi_dsi_phy_ops *phy_ops;
5759 const struct dw_mipi_dsi_host_ops *host_ops;
include/drm/dp/drm_dp_aux_bus.hrenamed from include/drm/drm_dp_aux_bus.h+0−0

File renamed without changes.

include/drm/dp/drm_dp_dual_mode_helper.hrenamed from include/drm/drm_dp_dual_mode_helper.h+0−0

File renamed without changes.

include/drm/dp/drm_dp_helper.hrenamed from include/drm/drm_dp_helper.h+2−5
@@ -1038,11 +1038,8 @@ struct drm_panel; · 1037 unmodified lines
10381038 #define DP_SIDEBAND_MSG_UP_REQ_BASE 0x1600 /* 1.2 MST */
10391039
10401040 /* DPRX Event Status Indicator */
1041−#define DP_SINK_COUNT_ESI 0x2002 /* 1.2 */
1042−/* 0-5 sink count */
1043−# define DP_SINK_COUNT_CP_READY (1 << 6)
1044−
1045−#define DP_DEVICE_SERVICE_IRQ_VECTOR_ESI0 0x2003 /* 1.2 */
1041+#define DP_SINK_COUNT_ESI 0x2002 /* same as 0x200 */
1042+#define DP_DEVICE_SERVICE_IRQ_VECTOR_ESI0 0x2003 /* same as 0x201 */
10461043
10471044 #define DP_DEVICE_SERVICE_IRQ_VECTOR_ESI1 0x2004 /* 1.2 */
10481045 # define DP_RX_GTC_MSTR_REQ_STATUS_CHANGE (1 << 0)
include/drm/dp/drm_dp_mst_helper.hrenamed from include/drm/drm_dp_mst_helper.h+1−1
@@ -23,7 +23,7 @@ · 22 unmodified lines
2323 #define _DRM_DP_MST_HELPER_H_
2424
2525 #include <linux/types.h>
26−#include <drm/drm_dp_helper.h>
26+#include <drm/dp/drm_dp_helper.h>
2727 #include <drm/drm_atomic.h>
2828
2929 #if IS_ENABLED(CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS)
include/drm/drm_buddy.h+150−0
@@ -0,0 +1,150 @@
1+/* SPDX-License-Identifier: MIT */
2+/*
3+ * Copyright © 2021 Intel Corporation
4+ */
5+
6+#ifndef __DRM_BUDDY_H__
7+#define __DRM_BUDDY_H__
8+
9+#include <linux/bitops.h>
10+#include <linux/list.h>
11+#include <linux/slab.h>
12+#include <linux/sched.h>
13+
14+#include <drm/drm_print.h>
15+
16+#define range_overflows(start, size, max) ({ \
17+ typeof(start) start__ = (start); \
18+ typeof(size) size__ = (size); \
19+ typeof(max) max__ = (max); \
20+ (void)(&start__ == &size__); \
21+ (void)(&start__ == &max__); \
22+ start__ >= max__ || size__ > max__ - start__; \
23+})
24+
25+struct drm_buddy_block {
26+#define DRM_BUDDY_HEADER_OFFSET GENMASK_ULL(63, 12)
27+#define DRM_BUDDY_HEADER_STATE GENMASK_ULL(11, 10)
28+#define DRM_BUDDY_ALLOCATED (1 << 10)
29+#define DRM_BUDDY_FREE (2 << 10)
30+#define DRM_BUDDY_SPLIT (3 << 10)
31+/* Free to be used, if needed in the future */
32+#define DRM_BUDDY_HEADER_UNUSED GENMASK_ULL(9, 6)
33+#define DRM_BUDDY_HEADER_ORDER GENMASK_ULL(5, 0)
34+ u64 header;
35+
36+ struct drm_buddy_block *left;
37+ struct drm_buddy_block *right;
38+ struct drm_buddy_block *parent;
39+
40+ void *private; /* owned by creator */
41+
42+ /*
43+ * While the block is allocated by the user through drm_buddy_alloc*,
44+ * the user has ownership of the link, for example to maintain within
45+ * a list, if so desired. As soon as the block is freed with
46+ * drm_buddy_free* ownership is given back to the mm.
47+ */
48+ struct list_head link;
49+ struct list_head tmp_link;
50+};
51+
52+/* Order-zero must be at least PAGE_SIZE */
53+#define DRM_BUDDY_MAX_ORDER (63 - PAGE_SHIFT)
54+
55+/*
56+ * Binary Buddy System.
57+ *
58+ * Locking should be handled by the user, a simple mutex around
59+ * drm_buddy_alloc* and drm_buddy_free* should suffice.
60+ */
61+struct drm_buddy {
62+ /* Maintain a free list for each order. */
63+ struct list_head *free_list;
64+
65+ /*
66+ * Maintain explicit binary tree(s) to track the allocation of the
67+ * address space. This gives us a simple way of finding a buddy block
68+ * and performing the potentially recursive merge step when freeing a
69+ * block. Nodes are either allocated or free, in which case they will
70+ * also exist on the respective free list.
71+ */
72+ struct drm_buddy_block **roots;
73+
74+ /*
75+ * Anything from here is public, and remains static for the lifetime of
76+ * the mm. Everything above is considered do-not-touch.
77+ */
78+ unsigned int n_roots;
79+ unsigned int max_order;
80+
81+ /* Must be at least PAGE_SIZE */
82+ u64 chunk_size;
83+ u64 size;
84+ u64 avail;
85+};
86+
87+static inline u64
88+drm_buddy_block_offset(struct drm_buddy_block *block)
89+{
90+ return block->header & DRM_BUDDY_HEADER_OFFSET;
91+}
92+
93+static inline unsigned int
94+drm_buddy_block_order(struct drm_buddy_block *block)
95+{
96+ return block->header & DRM_BUDDY_HEADER_ORDER;
97+}
98+
99+static inline unsigned int
100+drm_buddy_block_state(struct drm_buddy_block *block)
101+{
102+ return block->header & DRM_BUDDY_HEADER_STATE;
103+}
104+
105+static inline bool
106+drm_buddy_block_is_allocated(struct drm_buddy_block *block)
107+{
108+ return drm_buddy_block_state(block) == DRM_BUDDY_ALLOCATED;
109+}
110+
111+static inline bool
112+drm_buddy_block_is_free(struct drm_buddy_block *block)
113+{
114+ return drm_buddy_block_state(block) == DRM_BUDDY_FREE;
115+}
116+
117+static inline bool
118+drm_buddy_block_is_split(struct drm_buddy_block *block)
119+{
120+ return drm_buddy_block_state(block) == DRM_BUDDY_SPLIT;
121+}
122+
123+static inline u64
124+drm_buddy_block_size(struct drm_buddy *mm,
125+ struct drm_buddy_block *block)
126+{
127+ return mm->chunk_size << drm_buddy_block_order(block);
128+}
129+
130+int drm_buddy_init(struct drm_buddy *mm, u64 size, u64 chunk_size);
131+
132+void drm_buddy_fini(struct drm_buddy *mm);
133+
134+struct drm_buddy_block *
135+drm_buddy_alloc_blocks(struct drm_buddy *mm, unsigned int order);
136+
137+int drm_buddy_alloc_range(struct drm_buddy *mm,
138+ struct list_head *blocks,
139+ u64 start, u64 size);
140+
141+void drm_buddy_free_block(struct drm_buddy *mm, struct drm_buddy_block *block);
142+
143+void drm_buddy_free_list(struct drm_buddy *mm, struct list_head *objects);
144+
145+void drm_buddy_print(struct drm_buddy *mm, struct drm_printer *p);
146+void drm_buddy_block_print(struct drm_buddy *mm,
147+ struct drm_buddy_block *block,
148+ struct drm_printer *p);
149+
150+#endif
include/drm/drm_connector.h+12−6
@@ -522,9 +522,9 @@ struct drm_display_info { · 521 unmodified lines
522522 enum subpixel_order subpixel_order;
523523
524524 #define DRM_COLOR_FORMAT_RGB444 (1<<0)
525−#define DRM_COLOR_FORMAT_YCRCB444 (1<<1)
526−#define DRM_COLOR_FORMAT_YCRCB422 (1<<2)
527−#define DRM_COLOR_FORMAT_YCRCB420 (1<<3)
525+#define DRM_COLOR_FORMAT_YCBCR444 (1<<1)
526+#define DRM_COLOR_FORMAT_YCBCR422 (1<<2)
527+#define DRM_COLOR_FORMAT_YCBCR420 (1<<3)
528528
529529 /**
530530 * @panel_orientation: Read only connector property for built-in panels,
@@ -592,10 +592,16 @@ struct drm_display_info { · 61 unmodified lines
592592 bool rgb_quant_range_selectable;
593593
594594 /**
595− * @edid_hdmi_dc_modes: Mask of supported hdmi deep color modes. Even
596− * more stuff redundant with @bus_formats.
595+ * @edid_hdmi_dc_rgb444_modes: Mask of supported hdmi deep color modes
596+ * in RGB 4:4:4. Even more stuff redundant with @bus_formats.
597597 */
598− u8 edid_hdmi_dc_modes;
598+ u8 edid_hdmi_rgb444_dc_modes;
599+
600+ /**
601+ * @edid_hdmi_dc_ycbcr444_modes: Mask of supported hdmi deep color
602+ * modes in YCbCr 4:4:4. Even more stuff redundant with @bus_formats.
603+ */
604+ u8 edid_hdmi_ycbcr444_dc_modes;
599605
600606 /**
601607 * @cea_rev: CEA revision of the HDMI sink.
include/drm/drm_crtc.h+10−0
@@ -285,6 +285,10 @@ struct drm_crtc_state { · 284 unmodified lines
285285 * Lookup table for converting pixel data after the color conversion
286286 * matrix @ctm. See drm_crtc_enable_color_mgmt(). The blob (if not
287287 * NULL) is an array of &struct drm_color_lut.
288+ *
289+ * Note that for mostly historical reasons stemming from Xorg heritage,
290+ * this is also used to store the color map (also sometimes color lut,
291+ * CLUT or color palette) for indexed formats like DRM_FORMAT_C8.
288292 */
289293 struct drm_property_blob *gamma_lut;
290294
@@ -1075,12 +1079,18 @@ struct drm_crtc { · 784 unmodified lines
10751079 /**
10761080 * @gamma_size: Size of legacy gamma ramp reported to userspace. Set up
10771081 * by calling drm_mode_crtc_set_gamma_size().
1082+ *
1083+ * Note that atomic drivers need to instead use
1084+ * &drm_crtc_state.gamma_lut. See drm_crtc_enable_color_mgmt().
10781085 */
10791086 uint32_t gamma_size;
10801087
10811088 /**
10821089 * @gamma_store: Gamma ramp values used by the legacy SETGAMMA and
10831090 * GETGAMMA IOCTls. Set up by calling drm_mode_crtc_set_gamma_size().
1091+ *
1092+ * Note that atomic drivers need to instead use
1093+ * &drm_crtc_state.gamma_lut. See drm_crtc_enable_color_mgmt().
10841094 */
10851095 uint16_t *gamma_store;
10861096
include/drm/drm_dsc.h+1−1
@@ -8,7 +8,7 @@ · 7 unmodified lines
88 #ifndef DRM_DSC_H_
99 #define DRM_DSC_H_
1010
11−#include <drm/drm_dp_helper.h>
11+#include <drm/dp/drm_dp_helper.h>
1212
1313 /* VESA Display Stream Compression DSC 1.2 constants */
1414 #define DSC_NUM_BUF_RANGES 15
include/drm/drm_edid.h+2−2
@@ -401,8 +401,8 @@ drm_hdmi_vendor_infoframe_from_display_mode(struct hdmi_vendor_infoframe *frame, · 400 unmodified lines
401401 const struct drm_display_mode *mode);
402402
403403 void
404−drm_hdmi_avi_infoframe_colorspace(struct hdmi_avi_infoframe *frame,
405− const struct drm_connector_state *conn_state);
404+drm_hdmi_avi_infoframe_colorimetry(struct hdmi_avi_infoframe *frame,
405+ const struct drm_connector_state *conn_state);
406406
407407 void
408408 drm_hdmi_avi_infoframe_bars(struct hdmi_avi_infoframe *frame,
include/drm/drm_mipi_dbi.h+1−1
@@ -194,7 +194,7 @@ int mipi_dbi_buf_copy(void *dst, struct drm_framebuffer *fb, · 193 unmodified lines
194194 #ifdef CONFIG_DEBUG_FS
195195 void mipi_dbi_debugfs_init(struct drm_minor *minor);
196196 #else
197−#define mipi_dbi_debugfs_init NULL
197+static inline void mipi_dbi_debugfs_init(struct drm_minor *minor) {}
198198 #endif
199199
200200 #endif /* __LINUX_MIPI_DBI_H */
include/drm/drm_modeset_lock.h+1−0
@@ -34,6 +34,7 @@ struct drm_modeset_lock; · 33 unmodified lines
3434 * struct drm_modeset_acquire_ctx - locking context (see ww_acquire_ctx)
3535 * @ww_ctx: base acquire ctx
3636 * @contended: used internally for -EDEADLK handling
37+ * @stack_depot: used internally for contention debugging
3738 * @locked: list of held locks
3839 * @trylock_only: trylock mode used in atomic contexts/panic notifiers
3940 * @interruptible: whether interruptible locking should be used.
include/drm/drm_module.h+125−0
@@ -0,0 +1,125 @@
1+/* SPDX-License-Identifier: MIT */
2+
3+#ifndef DRM_MODULE_H
4+#define DRM_MODULE_H
5+
6+#include <linux/pci.h>
7+#include <linux/platform_device.h>
8+
9+#include <drm/drm_drv.h>
10+
11+/**
12+ * DOC: overview
13+ *
14+ * This library provides helpers registering DRM drivers during module
15+ * initialization and shutdown. The provided helpers act like bus-specific
16+ * module helpers, such as module_pci_driver(), but respect additional
17+ * parameters that control DRM driver registration.
18+ *
19+ * Below is an example of initializing a DRM driver for a device on the
20+ * PCI bus.
21+ *
22+ * .. code-block:: c
23+ *
24+ * struct pci_driver my_pci_drv = {
25+ * };
26+ *
27+ * drm_module_pci_driver(my_pci_drv);
28+ *
29+ * The generated code will test if DRM drivers are enabled and register
30+ * the PCI driver my_pci_drv. For more complex module initialization, you
31+ * can still use module_init() and module_exit() in your driver.
32+ */
33+
34+/*
35+ * PCI drivers
36+ */
37+
38+static inline int __init drm_pci_register_driver(struct pci_driver *pci_drv)
39+{
40+ if (drm_firmware_drivers_only())
41+ return -ENODEV;
42+
43+ return pci_register_driver(pci_drv);
44+}
45+
46+/**
47+ * drm_module_pci_driver - Register a DRM driver for PCI-based devices
48+ * @__pci_drv: the PCI driver structure
49+ *
50+ * Registers a DRM driver for devices on the PCI bus. The helper
51+ * macro behaves like module_pci_driver() but tests the state of
52+ * drm_firmware_drivers_only(). For more complex module initialization,
53+ * use module_init() and module_exit() directly.
54+ *
55+ * Each module may only use this macro once. Calling it replaces
56+ * module_init() and module_exit().
57+ */
58+#define drm_module_pci_driver(__pci_drv) \
59+ module_driver(__pci_drv, drm_pci_register_driver, pci_unregister_driver)
60+
61+static inline int __init
62+drm_pci_register_driver_if_modeset(struct pci_driver *pci_drv, int modeset)
63+{
64+ if (drm_firmware_drivers_only() && modeset == -1)
65+ return -ENODEV;
66+ if (modeset == 0)
67+ return -ENODEV;
68+
69+ return pci_register_driver(pci_drv);
70+}
71+
72+static inline void __exit
73+drm_pci_unregister_driver_if_modeset(struct pci_driver *pci_drv, int modeset)
74+{
75+ pci_unregister_driver(pci_drv);
76+}
77+
78+/**
79+ * drm_module_pci_driver_if_modeset - Register a DRM driver for PCI-based devices
80+ * @__pci_drv: the PCI driver structure
81+ * @__modeset: an additional parameter that disables the driver
82+ *
83+ * This macro is deprecated and only provided for existing drivers. For
84+ * new drivers, use drm_module_pci_driver().
85+ *
86+ * Registers a DRM driver for devices on the PCI bus. The helper macro
87+ * behaves like drm_module_pci_driver() with an additional driver-specific
88+ * flag. If __modeset is 0, the driver has been disabled, if __modeset is
89+ * -1 the driver state depends on the global DRM state. For all other
90+ * values, the PCI driver has been enabled. The default should be -1.
91+ */
92+#define drm_module_pci_driver_if_modeset(__pci_drv, __modeset) \
93+ module_driver(__pci_drv, drm_pci_register_driver_if_modeset, \
94+ drm_pci_unregister_driver_if_modeset, __modeset)
95+
96+/*
97+ * Platform drivers
98+ */
99+
100+static inline int __init
101+drm_platform_driver_register(struct platform_driver *platform_drv)
102+{
103+ if (drm_firmware_drivers_only())
104+ return -ENODEV;
105+
106+ return platform_driver_register(platform_drv);
107+}
108+
109+/**
110+ * drm_module_platform_driver - Register a DRM driver for platform devices
111+ * @__platform_drv: the platform driver structure
112+ *
113+ * Registers a DRM driver for devices on the platform bus. The helper
114+ * macro behaves like module_platform_driver() but tests the state of
115+ * drm_firmware_drivers_only(). For more complex module initialization,
116+ * use module_init() and module_exit() directly.
117+ *
118+ * Each module may only use this macro once. Calling it replaces
119+ * module_init() and module_exit().
120+ */
121+#define drm_module_platform_driver(__platform_drv) \
122+ module_driver(__platform_drv, drm_platform_driver_register, \
123+ platform_driver_unregister)
124+
125+#endif
include/drm/drm_plane.h+1−1
@@ -516,7 +516,7 @@ struct drm_plane_funcs { · 515 unmodified lines
516516 * This optional hook is used for the DRM to determine if the given
517517 * format/modifier combination is valid for the plane. This allows the
518518 * DRM to generate the correct format bitmask (which formats apply to
519− * which modifier), and to valdiate modifiers at atomic_check time.
519+ * which modifier), and to validate modifiers at atomic_check time.
520520 *
521521 * If not present, then any modifier in the plane's modifier
522522 * list is allowed with any of the plane's formats.
include/drm/drm_privacy_screen_driver.h+12−1
@@ -73,10 +73,21 @@ struct drm_privacy_screen { · 72 unmodified lines
7373 * for more info.
7474 */
7575 enum drm_privacy_screen_status hw_state;
76+ /**
77+ * @drvdata: Private data owned by the privacy screen provider
78+ */
79+ void *drvdata;
7680 };
7781
82+static inline
83+void *drm_privacy_screen_get_drvdata(struct drm_privacy_screen *priv)
84+{
85+ return priv->drvdata;
86+}
87+
7888 struct drm_privacy_screen *drm_privacy_screen_register(
79− struct device *parent, const struct drm_privacy_screen_ops *ops);
89+ struct device *parent, const struct drm_privacy_screen_ops *ops,
90+ void *data);
8091 void drm_privacy_screen_unregister(struct drm_privacy_screen *priv);
8192
8293 void drm_privacy_screen_call_notifier_chain(struct drm_privacy_screen *priv);
include/drm/ttm/ttm_resource.h+16−7
@@ -105,11 +105,11 @@ struct ttm_resource_manager_func { · 104 unmodified lines
105105 * @use_type: The memory type is enabled.
106106 * @use_tt: If a TT object should be used for the backing store.
107107 * @size: Size of the managed region.
108+ * @bdev: ttm device this manager belongs to
108109 * @func: structure pointer implementing the range manager. See above
109110 * @move_lock: lock for move fence
110− * static information. bdev::driver::io_mem_free is never used.
111− * @lru: The lru list for this memory type.
112111 * @move: The fence of the last pipelined move operation.
112+ * @lru: The lru list for this memory type.
113113 *
114114 * This structure is used to identify and manage memory types for a device.
115115 */
@@ -119,20 +119,21 @@ struct ttm_resource_manager { · 3 unmodified lines
119119 */
120120 bool use_type;
121121 bool use_tt;
122+ struct ttm_device *bdev;
122123 uint64_t size;
123124 const struct ttm_resource_manager_func *func;
124125 spinlock_t move_lock;
125126
126127 /*
127− * Protected by the global->lru_lock.
128+ * Protected by @move_lock.
128129 */
129−
130− struct list_head lru[TTM_MAX_BO_PRIORITY];
130+ struct dma_fence *move;
131131
132132 /*
133− * Protected by @move_lock.
133+ * Protected by the global->lru_lock.
134134 */
135− struct dma_fence *move;
135+
136+ struct list_head lru[TTM_MAX_BO_PRIORITY];
136137 };
137138
138139 /**
@@ -160,6 +161,7 @@ struct ttm_bus_placement { · 21 unmodified lines
160161 * @mem_type: Resource type of the allocation.
161162 * @placement: Placement flags.
162163 * @bus: Placement on io bus accessible to the CPU
164+ * @bo: weak reference to the BO, protected by ttm_device::lru_lock
163165 *
164166 * Structure indicating the placement and space resources used by a
165167 * buffer object.
@@ -170,6 +172,7 @@ struct ttm_resource { · 4 unmodified lines
170172 uint32_t mem_type;
171173 uint32_t placement;
172174 struct ttm_bus_placement bus;
175+ struct ttm_buffer_object *bo;
173176 };
174177
175178 /**
@@ -261,14 +264,20 @@ ttm_resource_manager_cleanup(struct ttm_resource_manager *man) · 85 unmodified lines
261264 void ttm_resource_init(struct ttm_buffer_object *bo,
262265 const struct ttm_place *place,
263266 struct ttm_resource *res);
267+void ttm_resource_fini(struct ttm_resource_manager *man,
268+ struct ttm_resource *res);
269+
264270 int ttm_resource_alloc(struct ttm_buffer_object *bo,
265271 const struct ttm_place *place,
266272 struct ttm_resource **res);
267273 void ttm_resource_free(struct ttm_buffer_object *bo, struct ttm_resource **res);
268274 bool ttm_resource_compat(struct ttm_resource *res,
269275 struct ttm_placement *placement);
276+void ttm_resource_set_bo(struct ttm_resource *res,
277+ struct ttm_buffer_object *bo);
270278
271279 void ttm_resource_manager_init(struct ttm_resource_manager *man,
280+ struct ttm_device *bdev,
272281 unsigned long p_size);
273282
274283 int ttm_resource_manager_evict_all(struct ttm_device *bdev,
include/linux/dma-buf-map.h+2−2
@@ -52,13 +52,13 @@ · 51 unmodified lines
5252 *
5353 * struct dma_buf_map map = DMA_BUF_MAP_INIT_VADDR(0xdeadbeaf);
5454 *
55− * dma_buf_map_set_vaddr(&map. 0xdeadbeaf);
55+ * dma_buf_map_set_vaddr(&map, 0xdeadbeaf);
5656 *
5757 * To set an address in I/O memory, use dma_buf_map_set_vaddr_iomem().
5858 *
5959 * .. code-block:: c
6060 *
61− * dma_buf_map_set_vaddr_iomem(&map. 0xdeadbeaf);
61+ * dma_buf_map_set_vaddr_iomem(&map, 0xdeadbeaf);
6262 *
6363 * Instances of struct dma_buf_map do not have to be cleaned up, but
6464 * can be cleared to NULL with dma_buf_map_clear(). Cleared mappings
include/linux/dma-resv.h+2−2
@@ -458,8 +458,8 @@ void dma_resv_fini(struct dma_resv *obj); · 457 unmodified lines
458458 int dma_resv_reserve_shared(struct dma_resv *obj, unsigned int num_fences);
459459 void dma_resv_add_shared_fence(struct dma_resv *obj, struct dma_fence *fence);
460460 void dma_resv_add_excl_fence(struct dma_resv *obj, struct dma_fence *fence);
461−int dma_resv_get_fences(struct dma_resv *obj, struct dma_fence **pfence_excl,
462− unsigned *pshared_count, struct dma_fence ***pshared);
461+int dma_resv_get_fences(struct dma_resv *obj, bool write,
462+ unsigned int *num_fences, struct dma_fence ***fences);
463463 int dma_resv_copy_fences(struct dma_resv *dst, struct dma_resv *src);
464464 long dma_resv_wait_timeout(struct dma_resv *obj, bool wait_all, bool intr,
465465 unsigned long timeout);
include/linux/fb.h+1−0
@@ -502,6 +502,7 @@ struct fb_info { · 501 unmodified lines
502502 } *apertures;
503503
504504 bool skip_vt_switch; /* no VT switch on suspend/resume required */
505+ bool forced_out; /* set when being removed by another driver */
505506 };
506507
507508 static inline struct apertures_struct *alloc_apertures(unsigned int max_num) {
include/linux/rwsem.h+1−1
@@ -230,7 +230,7 @@ extern void _down_write_nest_lock(struct rw_semaphore *sem, struct lockdep_map * · 229 unmodified lines
230230 do { \
231231 typecheck(struct lockdep_map *, &(nest_lock)->dep_map); \
232232 _down_write_nest_lock(sem, &(nest_lock)->dep_map); \
233−} while (0);
233+} while (0)
234234
235235 /*
236236 * Take/release a lock when not the owner will release it.
include/soc/bcm2835/raspberrypi-firmware.h+1−0
@@ -91,6 +91,7 @@ enum rpi_firmware_property_tag { · 90 unmodified lines
9191 RPI_FIRMWARE_GET_POE_HAT_VAL = 0x00030049,
9292 RPI_FIRMWARE_SET_POE_HAT_VAL = 0x00030050,
9393 RPI_FIRMWARE_NOTIFY_XHCI_RESET = 0x00030058,
94+ RPI_FIRMWARE_NOTIFY_DISPLAY_DONE = 0x00030066,
9495
9596 /* Dispmanx TAGS */
9697 RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001,
include/uapi/drm/panfrost_drm.h+2−2
@@ -84,14 +84,14 @@ struct drm_panfrost_wait_bo { · 83 unmodified lines
8484 __s64 timeout_ns; /* absolute */
8585 };
8686
87+/* Valid flags to pass to drm_panfrost_create_bo */
8788 #define PANFROST_BO_NOEXEC 1
8889 #define PANFROST_BO_HEAP 2
8990
9091 /**
9192 * struct drm_panfrost_create_bo - ioctl argument for creating Panfrost BOs.
9293 *
93− * There are currently no values for the flags argument, but it may be
94− * used in a future extension.
94+ * The flags argument is a bit mask of PANFROST_BO_* flags.
9595 */
9696 struct drm_panfrost_create_bo {
9797 __u32 size;

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