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/drm Include newly split off headers Do...



details:   https://anonhg.NetBSD.org/src/rev/b602a0ebdcdd
branches:  trunk
changeset: 1028184:b602a0ebdcdd
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 09:46:40 2021 +0000

description:
Include newly split off headers Don't initialize struct members that no longer exist. Make DRIVER_PRIME code unconditional, similar to upstream drm_file.c


Author: Maya Rashish <maya%NetBSD.org@localhost>

diffstat:

 sys/external/bsd/drm2/drm/drm_file.c |  17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diffs (63 lines):

diff -r c5e1faad05f9 -r b602a0ebdcdd sys/external/bsd/drm2/drm/drm_file.c
--- a/sys/external/bsd/drm2/drm/drm_file.c      Sun Dec 19 09:46:33 2021 +0000
+++ b/sys/external/bsd/drm2/drm/drm_file.c      Sun Dec 19 09:46:40 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_file.c,v 1.2 2021/12/19 00:58:04 riastradh Exp $   */
+/*     $NetBSD: drm_file.c,v 1.3 2021/12/19 09:46:40 riastradh Exp $   */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,14 +30,15 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_file.c,v 1.2 2021/12/19 00:58:04 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_file.c,v 1.3 2021/12/19 09:46:40 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/select.h>
 
 #include <drm/drmP.h>
-#include <drm/drm_internal.h>
+#include <drm/drm_drv.h>
 #include <drm/drm_legacy.h>
+#include <drm/drm_file.h>
 
 #include "../dist/drm/drm_crtc_internal.h"
 #include "../dist/drm/drm_internal.h"
@@ -85,14 +86,12 @@
        /* file->prime is initialized by drm_prime_init_file_private.  */
        file->event_read_lock = NULL;
        DRM_INIT_WAITQUEUE(&file->event_read_wq, "drmevtrd");
-       file->lock_count = 0;
 
        if (drm_core_check_feature(dev, DRIVER_GEM))
                drm_gem_open(dev, file);
        if (drm_core_check_feature(dev, DRIVER_SYNCOBJ))
                drm_syncobj_open(file);
-       if (drm_core_check_feature(dev, DRIVER_PRIME))
-               drm_prime_init_file_private(&file->prime);
+       drm_prime_init_file_private(&file->prime);
 
        if (dev->driver->open) {
                ret = (*dev->driver->open)(dev, file);
@@ -119,8 +118,7 @@
            dev->driver->preclose)
                (*dev->driver->preclose)(dev, file);
 fail0:
-       if (drm_core_check_feature(dev, DRIVER_PRIME))
-               drm_prime_destroy_file_private(&file->prime);
+       drm_prime_destroy_file_private(&file->prime);
        if (drm_core_check_feature(dev, DRIVER_SYNCOBJ))
                drm_syncobj_release(file);
        if (drm_core_check_feature(dev, DRIVER_GEM))
@@ -175,8 +173,7 @@
        if (dev->driver->postclose)
                dev->driver->postclose(dev, file);
 
-       if (drm_core_check_feature(dev, DRIVER_PRIME))
-               drm_prime_destroy_file_private(&file->prime);
+       drm_prime_destroy_file_private(&file->prime);
 
        KASSERT(list_empty(&file->event_list));
 



Home | Main Index | Thread Index | Old Index