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/dist/drm/ttm restore #ifndef __NetBSD_...
details: https://anonhg.NetBSD.org/src/rev/98993dabd2ce
branches: trunk
changeset: 366498:98993dabd2ce
user: mrg <mrg%NetBSD.org@localhost>
date: Wed Aug 29 19:30:46 2018 +0000
description:
restore #ifndef __NetBSD__ code so drm on nouveau has a chance.
from @riastradh.
display is still black, but tools some times try to work now.
diffstat:
sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diffs (33 lines):
diff -r 4d8f24bd150e -r 98993dabd2ce sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c
--- a/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c Wed Aug 29 16:51:51 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c Wed Aug 29 19:30:46 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ttm_bo_util.c,v 1.12 2018/08/27 14:51:33 riastradh Exp $ */
+/* $NetBSD: ttm_bo_util.c,v 1.13 2018/08/29 19:30:46 mrg Exp $ */
/**************************************************************************
*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ttm_bo_util.c,v 1.12 2018/08/27 14:51:33 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttm_bo_util.c,v 1.13 2018/08/29 19:30:46 mrg Exp $");
#include <drm/ttm/ttm_bo_driver.h>
#include <drm/ttm/ttm_placement.h>
@@ -703,12 +703,10 @@
return -EINVAL;
if (start_page > bo->num_pages)
return -EINVAL;
-#ifdef __NetBSD__
- if (num_pages > 1 && !DRM_SUSER())
-#else
+#ifndef __NetBSD__
if (num_pages > 1 && !capable(CAP_SYS_ADMIN))
+ return -EPERM;
#endif
- return -EPERM;
(void) ttm_mem_io_lock(man, false);
ret = ttm_mem_io_reserve(bo->bdev, &bo->mem);
ttm_mem_io_unlock(man);
Home |
Main Index |
Thread Index |
Old Index