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 drm: Unstub drm_client slightly more.



details:   https://anonhg.NetBSD.org/src/rev/e8d3f65f0ff4
branches:  trunk
changeset: 1028474:e8d3f65f0ff4
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:07:55 2021 +0000

description:
drm: Unstub drm_client slightly more.

diffstat:

 sys/external/bsd/drm2/drm/drm_client.c |  16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diffs (52 lines):

diff -r a17a3f2e9e2a -r e8d3f65f0ff4 sys/external/bsd/drm2/drm/drm_client.c
--- a/sys/external/bsd/drm2/drm/drm_client.c    Sun Dec 19 11:07:49 2021 +0000
+++ b/sys/external/bsd/drm2/drm/drm_client.c    Sun Dec 19 11:07:55 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_client.c,v 1.2 2021/12/19 11:07:49 riastradh Exp $ */
+/*     $NetBSD: drm_client.c,v 1.3 2021/12/19 11:07:55 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -30,22 +30,31 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_client.c,v 1.2 2021/12/19 11:07:49 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_client.c,v 1.3 2021/12/19 11:07:55 riastradh Exp $");
 
 #include <sys/kmem.h>
 
 #include <linux/err.h>
 
 #include <drm/drm_client.h>
+#include <drm/drm_drv.h>
 
 int
 drm_client_init(struct drm_device *dev, struct drm_client_dev *client,
     const char *name, const struct drm_client_funcs *funcs)
 {
+       int ret;
 
        client->dev = dev;
 
+       ret = drm_client_modeset_create(client);
+       if (ret)
+               goto out0;
+
+       drm_dev_get(dev);
        return 0;
+
+out0:  return ret;
 }
 
 void
@@ -56,6 +65,9 @@
 void
 drm_client_release(struct drm_client_dev *client)
 {
+
+       drm_client_modeset_free(client);
+       drm_dev_put(client->dev);
 }
 
 void



Home | Main Index | Thread Index | Old Index