Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/external/bsd/drm2/dist/drm/radeon Pull up following r...
details: https://anonhg.NetBSD.org/src/rev/74c047466dcd
branches: netbsd-9
changeset: 843777:74c047466dcd
user: martin <martin%NetBSD.org@localhost>
date: Tue Jan 21 15:35:39 2020 +0000
description:
Pull up following revision(s) (requested by jmcneill in ticket #634):
sys/external/bsd/drm2/dist/drm/radeon/radeon_vce.c: revision 1.4
Fix loading TAHITI VCE firmware.
diffstat:
sys/external/bsd/drm2/dist/drm/radeon/radeon_vce.c | 40 ++++++++++++---------
1 files changed, 22 insertions(+), 18 deletions(-)
diffs (73 lines):
diff -r 5a61ba54ee6c -r 74c047466dcd sys/external/bsd/drm2/dist/drm/radeon/radeon_vce.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_vce.c Tue Jan 21 15:33:33 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_vce.c Tue Jan 21 15:35:39 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: radeon_vce.c,v 1.3 2018/08/27 04:58:36 riastradh Exp $ */
+/* $NetBSD: radeon_vce.c,v 1.3.4.1 2020/01/21 15:35:39 martin Exp $ */
/*
* Copyright 2013 Advanced Micro Devices, Inc.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_vce.c,v 1.3 2018/08/27 04:58:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_vce.c,v 1.3.4.1 2020/01/21 15:35:39 martin Exp $");
#include <linux/firmware.h>
#include <linux/module.h>
@@ -53,34 +53,38 @@
#ifdef __NetBSD__ /* XXX Ugh! */
static bool
-scan_2dec_u8(const char **sp, char delim, uint8_t *u8p)
+scan_2dec_uint(const char **sp, char delim, unsigned int *uintp)
{
- char c0, c1;
+ u_int val = 0, n;
+ char c;
- if (!isdigit((unsigned char)(c0 = *(*sp)++)))
- return false;
- if (!isdigit((unsigned char)(c1 = *(*sp)++)))
- return false;
- if (*(*sp)++ != delim)
+ for (n = 0; n < 2; n++) {
+ c = *(*sp)++;
+ if (!isdigit((unsigned char)c))
+ return false;
+ if (n != 0)
+ val *= 10;
+ val += (c - '0');
+ if (*(*sp) == delim)
+ break;
+ }
+ if (*(*sp) != delim)
return false;
- *u8p = ((c0 - '0') * 10) + (c1 - '0');
+ (*sp)++;
+ *uintp = val;
return true;
}
static bool
-scan_2dec_uint(const char **sp, char delim, unsigned int *uintp)
+scan_2dec_u8(const char **sp, char delim, uint8_t *u8p)
{
- char c0, c1;
+ unsigned int val;
- if (!isdigit((unsigned char)(c0 = *(*sp)++)))
- return false;
- if (!isdigit((unsigned char)(c1 = *(*sp)++)))
- return false;
- if (*(*sp)++ != delim)
+ if (!scan_2dec_uint(sp, delim, &val))
return false;
- *uintp = ((c0 - '0') * 10) + (c1 - '0');
+ *u8p = (uint8_t)val;
return true;
}
#endif
Home |
Main Index |
Thread Index |
Old Index