Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd amdgpu: amdgpu_gfx.c



details:   https://anonhg.NetBSD.org/src/rev/e030ccd90ef7
branches:  trunk
changeset: 1028791:e030ccd90ef7
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 12:02:13 2021 +0000

description:
amdgpu: amdgpu_gfx.c

...plus a bogus stub for sscanf, hoping it's not that important

diffstat:

 sys/external/bsd/common/include/linux/kernel.h         |  8 +++++++-
 sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_gfx.c |  6 +++---
 2 files changed, 10 insertions(+), 4 deletions(-)

diffs (47 lines):

diff -r 80a2be996776 -r e030ccd90ef7 sys/external/bsd/common/include/linux/kernel.h
--- a/sys/external/bsd/common/include/linux/kernel.h    Sun Dec 19 12:02:05 2021 +0000
+++ b/sys/external/bsd/common/include/linux/kernel.h    Sun Dec 19 12:02:13 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kernel.h,v 1.44 2021/12/19 11:35:36 riastradh Exp $    */
+/*     $NetBSD: kernel.h,v 1.45 2021/12/19 12:02:13 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -275,4 +275,10 @@
        return __predict_true(*flagp);
 }
 
+static inline int
+sscanf(const char *fmt, ...)
+{
+       return 0;               /* XXX */
+}
+
 #endif  /* _LINUX_KERNEL_H_ */
diff -r 80a2be996776 -r e030ccd90ef7 sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_gfx.c
--- a/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_gfx.c    Sun Dec 19 12:02:05 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_gfx.c    Sun Dec 19 12:02:13 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amdgpu_gfx.c,v 1.4 2021/12/18 23:44:58 riastradh Exp $ */
+/*     $NetBSD: amdgpu_gfx.c,v 1.5 2021/12/19 12:02:13 riastradh Exp $ */
 
 /*
  * Copyright 2014 Advanced Micro Devices, Inc.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_gfx.c,v 1.4 2021/12/18 23:44:58 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_gfx.c,v 1.5 2021/12/19 12:02:13 riastradh Exp $");
 
 #include "amdgpu.h"
 #include "amdgpu_gfx.h"
@@ -315,7 +315,7 @@
                return r;
 
        ring->eop_gpu_addr = kiq->eop_gpu_addr;
-       sprintf(ring->name, "kiq_%d.%d.%d", ring->me, ring->pipe, ring->queue);
+       snprintf(ring->name, sizeof(ring->name), "kiq_%d.%d.%d", ring->me, ring->pipe, ring->queue);
        r = amdgpu_ring_init(adev, ring, 1024,
                             irq, AMDGPU_CP_KIQ_IRQ_DRIVER0);
        if (r)



Home | Main Index | Thread Index | Old Index