Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/external/bsd/drm2/dist/drm/radeon Pull up following r...
details: https://anonhg.NetBSD.org/src/rev/84ab0b7a95d0
branches: netbsd-8
changeset: 852771:84ab0b7a95d0
user: martin <martin%NetBSD.org@localhost>
date: Mon Mar 23 10:16:01 2020 +0000
description:
Pull up following revision(s) (requested by mrg in ticket #1523):
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 | 36 ++++++++++++---------
1 files changed, 20 insertions(+), 16 deletions(-)
diffs (58 lines):
diff -r c4a385eaa631 -r 84ab0b7a95d0 sys/external/bsd/drm2/dist/drm/radeon/radeon_vce.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_vce.c Mon Mar 23 10:13:21 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_vce.c Mon Mar 23 10:16:01 2020 +0000
@@ -46,34 +46,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