Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/linux Update dma-buf API enough to com...
details: https://anonhg.NetBSD.org/src/rev/836a0f98f4c1
branches: trunk
changeset: 1027903:836a0f98f4c1
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 01:14:29 2021 +0000
description:
Update dma-buf API enough to compile drm_prime.c.
diffstat:
sys/external/bsd/drm2/include/linux/dma-buf.h | 12 +++++-------
sys/external/bsd/drm2/linux/linux_dma_buf.c | 7 ++++---
2 files changed, 9 insertions(+), 10 deletions(-)
diffs (71 lines):
diff -r 2206b2129e02 -r 836a0f98f4c1 sys/external/bsd/drm2/include/linux/dma-buf.h
--- a/sys/external/bsd/drm2/include/linux/dma-buf.h Sun Dec 19 01:14:22 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/dma-buf.h Sun Dec 19 01:14:29 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dma-buf.h,v 1.4 2018/08/27 15:25:13 riastradh Exp $ */
+/* $NetBSD: dma-buf.h,v 1.5 2021/12/19 01:14:29 riastradh Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -57,8 +57,7 @@
};
struct dma_buf_ops {
- int (*attach)(struct dma_buf *, struct device *,
- struct dma_buf_attachment *);
+ int (*attach)(struct dma_buf *, struct dma_buf_attachment *);
void (*detach)(struct dma_buf *, struct dma_buf_attachment *);
struct sg_table *
(*map_dma_buf)(struct dma_buf_attachment *,
@@ -70,10 +69,8 @@
enum dma_data_direction);
int (*end_cpu_access)(struct dma_buf *, size_t, size_t,
enum dma_data_direction);
- void * (*kmap_atomic)(struct dma_buf *, unsigned long);
- void (*kunmap_atomic)(struct dma_buf *, unsigned long, void *);
- void * (*kmap)(struct dma_buf *, unsigned long);
- void (*kunmap)(struct dma_buf *, unsigned long, void *);
+ void * (*map)(struct dma_buf *, unsigned long);
+ void (*unmap)(struct dma_buf *, unsigned long, void *);
int (*mmap)(struct dma_buf *, off_t *, size_t, int, int *,
int *, struct uvm_object **, int *);
void * (*vmap)(struct dma_buf *);
@@ -95,6 +92,7 @@
struct dma_buf_attachment {
void *priv;
struct dma_buf *dmabuf;
+ struct device *dev;
};
struct dma_buf_export_info {
diff -r 2206b2129e02 -r 836a0f98f4c1 sys/external/bsd/drm2/linux/linux_dma_buf.c
--- a/sys/external/bsd/drm2/linux/linux_dma_buf.c Sun Dec 19 01:14:22 2021 +0000
+++ b/sys/external/bsd/drm2/linux/linux_dma_buf.c Sun Dec 19 01:14:29 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_dma_buf.c,v 1.7 2021/12/19 00:30:25 riastradh Exp $ */
+/* $NetBSD: linux_dma_buf.c,v 1.8 2021/12/19 01:14:29 riastradh Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_dma_buf.c,v 1.7 2021/12/19 00:30:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_dma_buf.c,v 1.8 2021/12/19 01:14:29 riastradh Exp $");
#include <sys/types.h>
#include <sys/atomic.h>
@@ -184,10 +184,11 @@
attach = kmem_zalloc(sizeof(*attach), KM_SLEEP);
attach->dmabuf = dmabuf;
+ attach->dev = dev;
mutex_enter(&dmabuf->db_lock);
if (dmabuf->ops->attach)
- ret = dmabuf->ops->attach(dmabuf, dev, attach);
+ ret = dmabuf->ops->attach(dmabuf, attach);
mutex_exit(&dmabuf->db_lock);
if (ret)
goto fail0;
Home |
Main Index |
Thread Index |
Old Index