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
12#define DEVCG_DEV_ALL 4 /* this represents all devices */12#define DEVCG_DEV_ALL 4 /* this represents all devices */
13 13
14#ifdef CONFIG_CGROUP_DEVICE14#ifdef CONFIG_CGROUP_DEVICE
15extern int __devcgroup_check_permission(short type, u32 major, u32 minor,15int devcgroup_check_permission(short type, u32 major, u32 minor,
16 short access);16 short access);
17#else17#else
18static inline int __devcgroup_check_permission(short type, u32 major, u32 minor,18static inline int devcgroup_check_permission(short type, u32 major, u32 minor,
19 short access)19 short access)
20{ return 0; }20{ return 0; }
21#endif21#endif
22 22
23#if defined(CONFIG_CGROUP_DEVICE) || defined(CONFIG_CGROUP_BPF)23#if defined(CONFIG_CGROUP_DEVICE) || defined(CONFIG_CGROUP_BPF)
24static 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
35static inline int devcgroup_inode_permission(struct inode *inode, int mask)24static inline int devcgroup_inode_permission(struct inode *inode, int mask)
36{25{
37 short type, access = 0;26 short type, access = 0;
include/linux/dma-buf.h+57−6
@@ -42,6 +42,18 @@ struct dma_buf_ops { · 41 unmodified lines
42 */42 */
43 bool cache_sgt_mapping;43 bool cache_sgt_mapping;
44 44
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
45 /**57 /**
46 * @attach:58 * @attach:
47 *59 *
@@ -109,6 +121,9 @@ struct dma_buf_ops { · 61 unmodified lines
109 * any other kind of sharing that the exporter might wish to make121 * any other kind of sharing that the exporter might wish to make
110 * available to buffer-users.122 * available to buffer-users.
111 *123 *
124 * This is always called with the dmabuf->resv object locked when
125 * the dynamic_mapping flag is true.
126 *
112 * Returns:127 * Returns:
113 *128 *
114 * A &sg_table scatter list of or the backing storage of the DMA buffer,129 * 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
267 * struct dma_buf - shared buffer object282 * struct dma_buf - shared buffer object
268 * @size: size of the buffer283 * @size: size of the buffer
269 * @file: file pointer used for sharing buffers across, and for refcounting.284 * @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.
271 * @ops: dma_buf_ops associated with this buffer object.287 * @ops: dma_buf_ops associated with this buffer object.
272 * @lock: used internally to serialize list manipulation, attach/detach and288 * @lock: used internally to serialize list manipulation, attach/detach and
273 * vmap/unmap, and accesses to name289 * vmap/unmap
274 * @vmapping_counter: used internally to refcnt the vmaps290 * @vmapping_counter: used internally to refcnt the vmaps
275 * @vmap_ptr: the current vmap ptr if vmapping_counter > 0291 * @vmap_ptr: the current vmap ptr if vmapping_counter > 0
276 * @exp_name: name of the exporter; useful for debugging.292 * @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.
278 * @owner: pointer to exporter module; used for refcounting when exporter is a295 * @owner: pointer to exporter module; used for refcounting when exporter is a
279 * kernel module.296 * kernel module.
280 * @list_node: node for dma_buf accounting and debugging.297 * @list_node: node for dma_buf accounting and debugging.
@@ -323,10 +340,12 @@ struct dma_buf { · 42 unmodified lines
323 * struct dma_buf_attachment - holds device-buffer attachment data340 * struct dma_buf_attachment - holds device-buffer attachment data
324 * @dmabuf: buffer for this attachment.341 * @dmabuf: buffer for this attachment.
325 * @dev: device attached to the buffer.342 * @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.
327 * @sgt: cached mapping.344 * @sgt: cached mapping.
328 * @dir: direction of cached mapping.345 * @dir: direction of cached mapping.
329 * @priv: exporter specific attachment data.346 * @priv: exporter specific attachment data.
347 * @dynamic_mapping: true if dma_buf_map/unmap_attachment() is called with the
348 * dma_resv lock held.
330 *349 *
331 * This structure holds the attachment information between the dma_buf buffer350 * This structure holds the attachment information between the dma_buf buffer
332 * and its user device(s). The list contains one attachment struct per device351 * and its user device(s). The list contains one attachment struct per device
@@ -343,6 +362,7 @@ struct dma_buf_attachment { · 10 unmodified lines
343 struct list_head node;362 struct list_head node;
344 struct sg_table *sgt;363 struct sg_table *sgt;
345 enum dma_data_direction dir;364 enum dma_data_direction dir;
365 bool dynamic_mapping;
346 void *priv;366 void *priv;
347};367};
348 368
@@ -394,10 +414,40 @@ static inline void get_dma_buf(struct dma_buf *dmabuf) · 45 unmodified lines
394 get_file(dmabuf->file);414 get_file(dmabuf->file);
395}415}
396 416
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 */
425static 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 */
438static inline bool
439dma_buf_attachment_is_dynamic(struct dma_buf_attachment *attach)
440{
441 return attach->dynamic_mapping;
442}
443
397struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,444struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
398 struct device *dev);445 struct device *dev);
446struct dma_buf_attachment *
447dma_buf_dynamic_attach(struct dma_buf *dmabuf, struct device *dev,
448 bool dynamic_mapping);
399void dma_buf_detach(struct dma_buf *dmabuf,449void dma_buf_detach(struct dma_buf *dmabuf,
400 struct dma_buf_attachment *dmabuf_attach);450 struct dma_buf_attachment *attach);
401 451
402struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info);452struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info);
403 453
@@ -409,6 +459,7 @@ struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *, · 5 unmodified lines
409 enum dma_data_direction);459 enum dma_data_direction);
410void dma_buf_unmap_attachment(struct dma_buf_attachment *, struct sg_table *,460void dma_buf_unmap_attachment(struct dma_buf_attachment *, struct sg_table *,
411 enum dma_data_direction);461 enum dma_data_direction);
462void dma_buf_move_notify(struct dma_buf *dma_buf);
412int dma_buf_begin_cpu_access(struct dma_buf *dma_buf,463int dma_buf_begin_cpu_access(struct dma_buf *dma_buf,
413 enum dma_data_direction dir);464 enum dma_data_direction dir);
414int dma_buf_end_cpu_access(struct dma_buf *dma_buf,465int 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
607extern int register_framebuffer(struct fb_info *fb_info);607extern int register_framebuffer(struct fb_info *fb_info);
608extern void unregister_framebuffer(struct fb_info *fb_info);608extern void unregister_framebuffer(struct fb_info *fb_info);
609extern void unlink_framebuffer(struct fb_info *fb_info);609extern void unlink_framebuffer(struct fb_info *fb_info);
610extern int remove_conflicting_pci_framebuffers(struct pci_dev *pdev, int res_id,610extern int remove_conflicting_pci_framebuffers(struct pci_dev *pdev,
611 const char *name);611 const char *name);
612extern int remove_conflicting_framebuffers(struct apertures_struct *a,612extern int remove_conflicting_framebuffers(struct apertures_struct *a,
613 const char *name, bool primary);613 const char *name, bool primary);
include/linux/host1x.h+18−8
@@ -18,6 +18,7 @@ enum host1x_class { · 17 unmodified lines
18};18};
19 19
20struct host1x_client;20struct host1x_client;
21struct iommu_group;
21 22
22/**23/**
23 * struct host1x_client_ops - host1x client operations24 * struct host1x_client_ops - host1x client operations
@@ -34,6 +35,7 @@ struct host1x_client_ops { · 10 unmodified lines
34 * @list: list node for the host1x client35 * @list: list node for the host1x client
35 * @parent: pointer to struct device representing the host1x controller36 * @parent: pointer to struct device representing the host1x controller
36 * @dev: pointer to struct device backing this host1x client37 * @dev: pointer to struct device backing this host1x client
38 * @group: IOMMU group that this client is a member of
37 * @ops: host1x client operations39 * @ops: host1x client operations
38 * @class: host1x class represented by this client40 * @class: host1x class represented by this client
39 * @channel: host1x channel associated with this client41 * @channel: host1x channel associated with this client
@@ -44,6 +46,7 @@ struct host1x_client { · 4 unmodified lines
44 struct list_head list;46 struct list_head list;
45 struct device *parent;47 struct device *parent;
46 struct device *dev;48 struct device *dev;
49 struct iommu_group *group;
47 50
48 const struct host1x_client_ops *ops;51 const struct host1x_client_ops *ops;
49 52
@@ -64,8 +67,9 @@ struct sg_table; · 14 unmodified lines
64struct host1x_bo_ops {67struct host1x_bo_ops {
65 struct host1x_bo *(*get)(struct host1x_bo *bo);68 struct host1x_bo *(*get)(struct host1x_bo *bo);
66 void (*put)(struct host1x_bo *bo);69 void (*put)(struct host1x_bo *bo);
67 dma_addr_t (*pin)(struct host1x_bo *bo, struct sg_table **sgt);70 struct sg_table *(*pin)(struct device *dev, struct host1x_bo *bo,
68 void (*unpin)(struct host1x_bo *bo, struct sg_table *sgt);71 dma_addr_t *phys);
72 void (*unpin)(struct device *dev, struct sg_table *sgt);
69 void *(*mmap)(struct host1x_bo *bo);73 void *(*mmap)(struct host1x_bo *bo);
70 void (*munmap)(struct host1x_bo *bo, void *addr);74 void (*munmap)(struct host1x_bo *bo, void *addr);
71 void *(*kmap)(struct host1x_bo *bo, unsigned int pagenum);75 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
92 bo->ops->put(bo);96 bo->ops->put(bo);
93}97}
94 98
95static inline dma_addr_t host1x_bo_pin(struct host1x_bo *bo,99static inline struct sg_table *host1x_bo_pin(struct device *dev,
96 struct sg_table **sgt)100 struct host1x_bo *bo,
101 dma_addr_t *phys)
97{102{
98 return bo->ops->pin(bo, sgt);103 return bo->ops->pin(dev, bo, phys);
99}104}
100 105
101static inline void host1x_bo_unpin(struct host1x_bo *bo, struct sg_table *sgt)106static inline void host1x_bo_unpin(struct device *dev, struct host1x_bo *bo,
107 struct sg_table *sgt)
102{108{
103 bo->ops->unpin(bo, sgt);109 bo->ops->unpin(dev, sgt);
104}110}
105 111
106static inline void *host1x_bo_mmap(struct host1x_bo *bo)112static 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
158struct host1x_channel;164struct host1x_channel;
159struct host1x_job;165struct host1x_job;
160 166
161struct host1x_channel *host1x_channel_request(struct device *dev);167struct host1x_channel *host1x_channel_request(struct host1x_client *client);
162struct host1x_channel *host1x_channel_get(struct host1x_channel *channel);168struct host1x_channel *host1x_channel_get(struct host1x_channel *channel);
163void host1x_channel_put(struct host1x_channel *channel);169void host1x_channel_put(struct host1x_channel *channel);
164int host1x_job_submit(struct host1x_job *job);170int host1x_job_submit(struct host1x_job *job);
@@ -167,6 +173,9 @@ int host1x_job_submit(struct host1x_job *job); · 2 unmodified lines
167 * host1x job173 * host1x job
168 */174 */
169 175
176#define HOST1X_RELOC_READ (1 << 0)
177#define HOST1X_RELOC_WRITE (1 << 1)
178
170struct host1x_reloc {179struct host1x_reloc {
171 struct {180 struct {
172 struct host1x_bo *bo;181 struct host1x_bo *bo;
@@ -177,6 +186,7 @@ struct host1x_reloc { · 4 unmodified lines
177 unsigned long offset;186 unsigned long offset;
178 } target;187 } target;
179 unsigned long shift;188 unsigned long shift;
189 unsigned long flags;
180};190};
181 191
182struct host1x_job {192struct 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