History

Merge tag 'drm-next-2019-11-27' of git://anongit.freedesktop.org/drm/drm

Pull drm updates from Dave Airlie: "Lots of stuff in here, though it hasn't been too insane this merge apart from dealing with the security fun. uapi: - export different colorspace properties on DP vs HDMI - new fourcc for ARM 16x16 block format - syncobj: allow querying last submitted timeline value - DRM_FORMAT_BIG_ENDIAN defined as unsigned core: - allow using gem vma manager in ttm - connector/encoder/bridge doc fixes - allow more than 3 encoders for a connector - displayport mst suspend/resume reprobing support - vram lazy unmapping, uniform vram mm and gem vram - edid cleanups + AVI informframe bar info - displayport helpers - dpcd parser added dp_cec: - Allow a connector to be associated with a cec device ttm: - pipelining with no_gpu_wait fix - always keep BOs on the LRU sched: - allow free_job routine to sleep i915: - Block userptr from mappable GTT - i915 perf uapi versioning - OA stream dynamic reconfiguration - make context persistence optional - introduce DRM_I915_UNSTABLE Kconfig - add fake lmem testing under unstable - BT.2020 support for DP MSA - struct mutex elimination - Tigerlake display/PLL/power management improvements - Jasper Lake PCH support - refactor PMU for multiple GPUs - Icelake firmware update - Split out vga + switcheroo code amdgpu: - implement dma-buf import/export without helpers - vega20 RAS enablement - DC i2c over aux fixes - renoir GPU reset - DC HDCP support - BACO support for CI/VI asics - MSI-X support - Arcturus EEPROM support - Arcturus VCN encode support - VCN dynamic powergating on RV/RV2 amdkfd: - add navi12/14/renoir support to kfd radeon: - SI dpm fix ported from amdgpu - fix bad DMA on ppc platforms gma500: - memory leak fixes qxl: - convert to new gem mmap exynos: - build warning fix komeda: - add aclk sysfs attribute v3d: - userspace cleanup uapi change i810: - fix for underflow in dispatch ioctls ast: - refactor show_cursor mgag200: - refactor show_cursor arcgpu: - encoder finding improvements mediatek: - mipi_tx, dsi and partial crtc support for MT8183 SoC - rotation support meson: - add suspend/resume support omap: - misc refactors tegra: - DisplayPort support for Tegra 210, 186 and 194. - IOMMU-backed DMA API fixes panfrost: - fix lockdep issue - simplify devfreq integration rcar-du: - R8A774B1 SoC support - fixes for H2 ES2.0 sun4i: - vcc-dsi regulator support virtio-gpu: - vmexit vs spinlock fix - move to gem shmem helpers - handle large command buffers with cma" * tag 'drm-next-2019-11-27' of git://anongit.freedesktop.org/drm/drm: (1855 commits) drm/amdgpu: invalidate mmhub semaphore workaround in gmc9/gmc10 drm/amdgpu: initialize vm_inv_eng0_sem for gfxhub and mmhub drm/amd/amdgpu/sriov skip RLCG s/r list for arcturus VF. drm/amd/amdgpu/sriov temporarily skip ras,dtm,hdcp for arcturus VF drm/amdgpu/gfx10: re-init clear state buffer after gpu reset merge fix for "ftrace: Rework event_create_dir()" drm/amdgpu: Update Arcturus golden registers drm/amdgpu/gfx10: fix out-of-bound mqd_backup array access drm/amdgpu/gfx10: explicitly wait for cp idle after halt/unhalt Revert "drm/amd/display: enable S/G for RAVEN chip" drm/amdgpu: disable gfxoff on original raven drm/amdgpu: remove experimental flag for Navi14 drm/amdgpu: disable gfxoff when using register read interface drm/amdgpu/powerplay: properly set PP_GFXOFF_MASK (v2) drm/amdgpu: fix bad DMA from INTERRUPT_CNTL2 drm/radeon: fix bad DMA from INTERRUPT_CNTL2 drm/amd/display: Fix debugfs on MST connectors drm/amdgpu/nv: add asic func for fetching vbios from rom directly drm/amdgpu: put flush_delayed_work at first drm/amdgpu/vcn2.5: fix the enc loop with hw fini ...

Linus Torvalds committed 6 years ago

Commit a6ed68d2 parents 8c39f71 acc61b81122 files · +61274 −29902Browse files

Showing the changes to include/linux (4 of 1122 files). Show all

Unified · Split

4 files
  1. include/linux/device_cgroup.h +4 −15
  2. include/linux/dma-buf.h +57 −6
  3. include/linux/fb.h +1 −1
  4. include/linux/host1x.h +18 −8
include/linux/device_cgroup.h+4−15
@@ -12,26 +12,15 @@ · 11 unmodified lines
1212 #define DEVCG_DEV_ALL 4 /* this represents all devices */
1313
1414 #ifdef CONFIG_CGROUP_DEVICE
15−extern int __devcgroup_check_permission(short type, u32 major, u32 minor,
16− short access);
15+int devcgroup_check_permission(short type, u32 major, u32 minor,
16+ short access);
1717 #else
18−static inline int __devcgroup_check_permission(short type, u32 major, u32 minor,
19− short access)
18+static inline int devcgroup_check_permission(short type, u32 major, u32 minor,
19+ short access)
2020 { return 0; }
2121 #endif
2222
2323 #if defined(CONFIG_CGROUP_DEVICE) || defined(CONFIG_CGROUP_BPF)
24−static inline int devcgroup_check_permission(short type, u32 major, u32 minor,
25− short access)
26−{
27− int rc = BPF_CGROUP_RUN_PROG_DEVICE_CGROUP(type, major, minor, access);
28−
29− if (rc)
30− return -EPERM;
31−
32− return __devcgroup_check_permission(type, major, minor, access);
33−}
34−
3524 static inline int devcgroup_inode_permission(struct inode *inode, int mask)
3625 {
3726 short type, access = 0;
include/linux/dma-buf.h+57−6
@@ -42,6 +42,18 @@ struct dma_buf_ops { · 41 unmodified lines
4242 */
4343 bool cache_sgt_mapping;
4444
45+ /**
46+ * @dynamic_mapping:
47+ *
48+ * If true the framework makes sure that the map/unmap_dma_buf
49+ * callbacks are always called with the dma_resv object locked.
50+ *
51+ * If false the framework makes sure that the map/unmap_dma_buf
52+ * callbacks are always called without the dma_resv object locked.
53+ * Mutual exclusive with @cache_sgt_mapping.
54+ */
55+ bool dynamic_mapping;
56+
4557 /**
4658 * @attach:
4759 *
@@ -109,6 +121,9 @@ struct dma_buf_ops { · 61 unmodified lines
109121 * any other kind of sharing that the exporter might wish to make
110122 * available to buffer-users.
111123 *
124+ * This is always called with the dmabuf->resv object locked when
125+ * the dynamic_mapping flag is true.
126+ *
112127 * Returns:
113128 *
114129 * A &sg_table scatter list of or the backing storage of the DMA buffer,
@@ -267,14 +282,16 @@ struct dma_buf_ops { · 152 unmodified lines
267282 * struct dma_buf - shared buffer object
268283 * @size: size of the buffer
269284 * @file: file pointer used for sharing buffers across, and for refcounting.
270− * @attachments: list of dma_buf_attachment that denotes all devices attached.
285+ * @attachments: list of dma_buf_attachment that denotes all devices attached,
286+ * protected by dma_resv lock.
271287 * @ops: dma_buf_ops associated with this buffer object.
272288 * @lock: used internally to serialize list manipulation, attach/detach and
273− * vmap/unmap, and accesses to name
289+ * vmap/unmap
274290 * @vmapping_counter: used internally to refcnt the vmaps
275291 * @vmap_ptr: the current vmap ptr if vmapping_counter > 0
276292 * @exp_name: name of the exporter; useful for debugging.
277− * @name: userspace-provided name; useful for accounting and debugging.
293+ * @name: userspace-provided name; useful for accounting and debugging,
294+ * protected by @resv.
278295 * @owner: pointer to exporter module; used for refcounting when exporter is a
279296 * kernel module.
280297 * @list_node: node for dma_buf accounting and debugging.
@@ -323,10 +340,12 @@ struct dma_buf { · 42 unmodified lines
323340 * struct dma_buf_attachment - holds device-buffer attachment data
324341 * @dmabuf: buffer for this attachment.
325342 * @dev: device attached to the buffer.
326− * @node: list of dma_buf_attachment.
343+ * @node: list of dma_buf_attachment, protected by dma_resv lock of the dmabuf.
327344 * @sgt: cached mapping.
328345 * @dir: direction of cached mapping.
329346 * @priv: exporter specific attachment data.
347+ * @dynamic_mapping: true if dma_buf_map/unmap_attachment() is called with the
348+ * dma_resv lock held.
330349 *
331350 * This structure holds the attachment information between the dma_buf buffer
332351 * and its user device(s). The list contains one attachment struct per device
@@ -343,6 +362,7 @@ struct dma_buf_attachment { · 10 unmodified lines
343362 struct list_head node;
344363 struct sg_table *sgt;
345364 enum dma_data_direction dir;
365+ bool dynamic_mapping;
346366 void *priv;
347367 };
348368
@@ -394,10 +414,40 @@ static inline void get_dma_buf(struct dma_buf *dmabuf) · 45 unmodified lines
394414 get_file(dmabuf->file);
395415 }
396416
417+/**
418+ * dma_buf_is_dynamic - check if a DMA-buf uses dynamic mappings.
419+ * @dmabuf: the DMA-buf to check
420+ *
421+ * Returns true if a DMA-buf exporter wants to be called with the dma_resv
422+ * locked for the map/unmap callbacks, false if it doesn't wants to be called
423+ * with the lock held.
424+ */
425+static inline bool dma_buf_is_dynamic(struct dma_buf *dmabuf)
426+{
427+ return dmabuf->ops->dynamic_mapping;
428+}
429+
430+/**
431+ * dma_buf_attachment_is_dynamic - check if a DMA-buf attachment uses dynamic
432+ * mappinsg
433+ * @attach: the DMA-buf attachment to check
434+ *
435+ * Returns true if a DMA-buf importer wants to call the map/unmap functions with
436+ * the dma_resv lock held.
437+ */
438+static inline bool
439+dma_buf_attachment_is_dynamic(struct dma_buf_attachment *attach)
440+{
441+ return attach->dynamic_mapping;
442+}
443+
397444 struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
398− struct device *dev);
445+ struct device *dev);
446+struct dma_buf_attachment *
447+dma_buf_dynamic_attach(struct dma_buf *dmabuf, struct device *dev,
448+ bool dynamic_mapping);
399449 void dma_buf_detach(struct dma_buf *dmabuf,
400− struct dma_buf_attachment *dmabuf_attach);
450+ struct dma_buf_attachment *attach);
401451
402452 struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info);
403453
@@ -409,6 +459,7 @@ struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *, · 5 unmodified lines
409459 enum dma_data_direction);
410460 void dma_buf_unmap_attachment(struct dma_buf_attachment *, struct sg_table *,
411461 enum dma_data_direction);
462+void dma_buf_move_notify(struct dma_buf *dma_buf);
412463 int dma_buf_begin_cpu_access(struct dma_buf *dma_buf,
413464 enum dma_data_direction dir);
414465 int dma_buf_end_cpu_access(struct dma_buf *dma_buf,
include/linux/fb.h+1−1
@@ -607,7 +607,7 @@ extern ssize_t fb_sys_write(struct fb_info *info, const char __user *buf, · 606 unmodified lines
607607 extern int register_framebuffer(struct fb_info *fb_info);
608608 extern void unregister_framebuffer(struct fb_info *fb_info);
609609 extern void unlink_framebuffer(struct fb_info *fb_info);
610−extern int remove_conflicting_pci_framebuffers(struct pci_dev *pdev, int res_id,
610+extern int remove_conflicting_pci_framebuffers(struct pci_dev *pdev,
611611 const char *name);
612612 extern int remove_conflicting_framebuffers(struct apertures_struct *a,
613613 const char *name, bool primary);
include/linux/host1x.h+18−8
@@ -18,6 +18,7 @@ enum host1x_class { · 17 unmodified lines
1818 };
1919
2020 struct host1x_client;
21+struct iommu_group;
2122
2223 /**
2324 * struct host1x_client_ops - host1x client operations
@@ -34,6 +35,7 @@ struct host1x_client_ops { · 10 unmodified lines
3435 * @list: list node for the host1x client
3536 * @parent: pointer to struct device representing the host1x controller
3637 * @dev: pointer to struct device backing this host1x client
38+ * @group: IOMMU group that this client is a member of
3739 * @ops: host1x client operations
3840 * @class: host1x class represented by this client
3941 * @channel: host1x channel associated with this client
@@ -44,6 +46,7 @@ struct host1x_client { · 4 unmodified lines
4446 struct list_head list;
4547 struct device *parent;
4648 struct device *dev;
49+ struct iommu_group *group;
4750
4851 const struct host1x_client_ops *ops;
4952
@@ -64,8 +67,9 @@ struct sg_table; · 14 unmodified lines
6467 struct host1x_bo_ops {
6568 struct host1x_bo *(*get)(struct host1x_bo *bo);
6669 void (*put)(struct host1x_bo *bo);
67− dma_addr_t (*pin)(struct host1x_bo *bo, struct sg_table **sgt);
68− void (*unpin)(struct host1x_bo *bo, struct sg_table *sgt);
70+ struct sg_table *(*pin)(struct device *dev, struct host1x_bo *bo,
71+ dma_addr_t *phys);
72+ void (*unpin)(struct device *dev, struct sg_table *sgt);
6973 void *(*mmap)(struct host1x_bo *bo);
7074 void (*munmap)(struct host1x_bo *bo, void *addr);
7175 void *(*kmap)(struct host1x_bo *bo, unsigned int pagenum);
@@ -92,15 +96,17 @@ static inline void host1x_bo_put(struct host1x_bo *bo) · 20 unmodified lines
9296 bo->ops->put(bo);
9397 }
9498
95−static inline dma_addr_t host1x_bo_pin(struct host1x_bo *bo,
96− struct sg_table **sgt)
99+static inline struct sg_table *host1x_bo_pin(struct device *dev,
100+ struct host1x_bo *bo,
101+ dma_addr_t *phys)
97102 {
98− return bo->ops->pin(bo, sgt);
103+ return bo->ops->pin(dev, bo, phys);
99104 }
100105
101−static inline void host1x_bo_unpin(struct host1x_bo *bo, struct sg_table *sgt)
106+static inline void host1x_bo_unpin(struct device *dev, struct host1x_bo *bo,
107+ struct sg_table *sgt)
102108 {
103− bo->ops->unpin(bo, sgt);
109+ bo->ops->unpin(dev, sgt);
104110 }
105111
106112 static inline void *host1x_bo_mmap(struct host1x_bo *bo)
@@ -158,7 +164,7 @@ u32 host1x_syncpt_base_id(struct host1x_syncpt_base *base); · 51 unmodified lines
158164 struct host1x_channel;
159165 struct host1x_job;
160166
161−struct host1x_channel *host1x_channel_request(struct device *dev);
167+struct host1x_channel *host1x_channel_request(struct host1x_client *client);
162168 struct host1x_channel *host1x_channel_get(struct host1x_channel *channel);
163169 void host1x_channel_put(struct host1x_channel *channel);
164170 int host1x_job_submit(struct host1x_job *job);
@@ -167,6 +173,9 @@ int host1x_job_submit(struct host1x_job *job); · 2 unmodified lines
167173 * host1x job
168174 */
169175
176+#define HOST1X_RELOC_READ (1 << 0)
177+#define HOST1X_RELOC_WRITE (1 << 1)
178+
170179 struct host1x_reloc {
171180 struct {
172181 struct host1x_bo *bo;
@@ -177,6 +186,7 @@ struct host1x_reloc { · 4 unmodified lines
177186 unsigned long offset;
178187 } target;
179188 unsigned long shift;
189+ unsigned long flags;
180190 };
181191
182192 struct host1x_job {

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