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 drm: Omit half-baked dma_buf_fil...



details:   https://anonhg.NetBSD.org/src/rev/868d991b9e92
branches:  trunk
changeset: 1028663:868d991b9e92
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:37:29 2021 +0000

description:
drm: Omit half-baked dma_buf_file indirection.

diffstat:

 sys/external/bsd/drm2/linux/linux_dma_buf.c |  20 ++++++--------------
 1 files changed, 6 insertions(+), 14 deletions(-)

diffs (69 lines):

diff -r 509a08ca9af1 -r 868d991b9e92 sys/external/bsd/drm2/linux/linux_dma_buf.c
--- a/sys/external/bsd/drm2/linux/linux_dma_buf.c       Sun Dec 19 11:37:23 2021 +0000
+++ b/sys/external/bsd/drm2/linux/linux_dma_buf.c       Sun Dec 19 11:37:29 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_dma_buf.c,v 1.11 2021/12/19 11:37:14 riastradh Exp $     */
+/*     $NetBSD: linux_dma_buf.c,v 1.12 2021/12/19 11:37: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.11 2021/12/19 11:37:14 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_dma_buf.c,v 1.12 2021/12/19 11:37:29 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/atomic.h>
@@ -43,10 +43,6 @@
 #include <linux/err.h>
 #include <linux/dma-resv.h>
 
-struct dma_buf_file {
-       struct dma_buf  *dbf_dmabuf;
-};
-
 static int     dmabuf_fop_poll(struct file *, int);
 static int     dmabuf_fop_close(struct file *);
 static int     dmabuf_fop_kqfilter(struct file *, struct knote *);
@@ -231,8 +227,7 @@
 static int
 dmabuf_fop_close(struct file *file)
 {
-       struct dma_buf_file *dbf = file->f_data;
-       struct dma_buf *dmabuf = dbf->dbf_dmabuf;
+       struct dma_buf *dmabuf = file->f_data;
 
        dma_buf_put(dmabuf);
        return 0;
@@ -241,8 +236,7 @@
 static int
 dmabuf_fop_poll(struct file *file, int events)
 {
-       struct dma_buf_file *dbf = file->f_data;
-       struct dma_buf *dmabuf = dbf->dbf_dmabuf;
+       struct dma_buf *dmabuf = file->f_data;
        struct dma_resv_poll *rpoll = &dmabuf->db_resv_poll;
 
        return dma_resv_do_poll(dmabuf->resv, events, rpoll);
@@ -251,8 +245,7 @@
 static int
 dmabuf_fop_kqfilter(struct file *file, struct knote *kn)
 {
-       struct dma_buf_file *dbf = file->f_data;
-       struct dma_buf *dmabuf = dbf->dbf_dmabuf;
+       struct dma_buf *dmabuf = file->f_data;
        struct dma_resv_poll *rpoll = &dmabuf->db_resv_poll;
 
        return dma_resv_kqfilter(dmabuf->resv, kn, rpoll);
@@ -262,8 +255,7 @@
 dmabuf_fop_mmap(struct file *file, off_t *offp, size_t size, int prot,
     int *flagsp, int *advicep, struct uvm_object **uobjp, int *maxprotp)
 {
-       struct dma_buf_file *dbf = file->f_data;
-       struct dma_buf *dmabuf = dbf->dbf_dmabuf;
+       struct dma_buf *dmabuf = file->f_data;
 
        if (size > dmabuf->size)
                return EINVAL;



Home | Main Index | Thread Index | Old Index