Displaying 20 results from an estimated 60 matches for "drmioctl".
Did you mean:
  drm_ioctl
  
2015 Nov 26
0
[libdrm 08/13] nouveau: make use of nouveau_drm::fd instead of nouveau_device::fd
...v *nvdev = nouveau_device(bo->device);
 	struct nouveau_bo_priv *nvbo = nouveau_bo(bo);
 	struct drm_gem_close req = { .handle = bo->handle };
@@ -433,11 +425,11 @@ nouveau_bo_del(struct nouveau_bo *bo)
 			 * might cause the bo to be closed accidentally while
 			 * re-importing.
 			 */
-			drmIoctl(bo->device->fd, DRM_IOCTL_GEM_CLOSE, &req);
+			drmIoctl(drm->fd, DRM_IOCTL_GEM_CLOSE, &req);
 		}
 		pthread_mutex_unlock(&nvdev->lock);
 	} else {
-		drmIoctl(bo->device->fd, DRM_IOCTL_GEM_CLOSE, &req);
+		drmIoctl(drm->fd, DRM_IOCTL_GEM_CLOSE, &req);
 	}...
2014 Apr 08
0
[PATCH] libdrm/nouveau: safen up nouveau libdrm against concurrent access
...* This bo has to be closed with the lock held because gem
+		 * handles are not refcounted. If a shared bo is closed and
+		 * re-opened in another thread a race against
+		 * DRM_IOCTL_GEM_OPEN or drmPrimeFDToHandle might cause the
+		 * bo to be closed accidentally while re-importing.
+		 */
+		drmIoctl(bo->device->fd, DRM_IOCTL_GEM_CLOSE, &req);
+		pthread_mutex_unlock(&nvdev->lock);
+	} else {
+		DRMLISTDEL(&nvbo->head);
+		pthread_mutex_unlock(&nvdev->lock);
+		drmIoctl(bo->device->fd, DRM_IOCTL_GEM_CLOSE, &req);
+	}
  	if (bo->map)
  		munmap(bo->...
2014 Mar 13
2
[PATCH] nouveau: safen up nouveau_device list usage against concurrent access
...u_device(bo->device);
 	struct nouveau_bo_priv *nvbo = nouveau_bo(bo);
 	struct drm_gem_close req = { bo->handle };
+	pthread_mutex_lock(&nvdev->lock);
 	DRMLISTDEL(&nvbo->head);
+	pthread_mutex_unlock(&nvdev->lock);
 	if (bo->map)
 		munmap(bo->map, bo->size);
 	drmIoctl(bo->device->fd, DRM_IOCTL_GEM_CLOSE, &req);
@@ -363,7 +380,9 @@ nouveau_bo_new(struct nouveau_device *dev, uint32_t flags, uint32_t align,
 		return ret;
 	}
 
+	pthread_mutex_lock(&nvdev->lock);
 	DRMLISTADD(&nvbo->head, &nvdev->bo_list);
+	pthread_mutex_unlock(&...
2015 Feb 24
4
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...es are not refcounted. If a shared bo is
+			 * closed and re-opened in another thread a race
+			 * against DRM_IOCTL_GEM_OPEN or drmPrimeFDToHandle
+			 * might cause the bo to be closed accidentally while
+			 * re-importing.
 			 */
-			pthread_mutex_unlock(&nvdev->lock);
-			return;
+			drmIoctl(bo->device->fd, DRM_IOCTL_GEM_CLOSE, &req);
 		}
-		DRMLISTDEL(&nvbo->head);
-		/*
-		 * This bo has to be closed with the lock held because gem
-		 * handles are not refcounted. If a shared bo is closed and
-		 * re-opened in another thread a race against
-		 * DRM_IOCTL_GEM_OPEN...
2015 Feb 26
4
[PATCH v2 1/4] Add atomic_inc_return to atomics.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at ubuntu.com>
---
 xf86atomic.h | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/xf86atomic.h b/xf86atomic.h
index 8c4b696..17fb088 100644
--- a/xf86atomic.h
+++ b/xf86atomic.h
@@ -49,6 +49,7 @@ typedef struct {
 # define atomic_read(x) ((x)->atomic)
 # define atomic_set(x, val) ((x)->atomic = (val))
 # define atomic_inc(x)
2015 Feb 25
2
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...65,8 +365,6 @@ nouveau_bo_del(struct nouveau_bo *bo)
>                 }
>                 pthread_mutex_unlock(&nvdev->lock);
>         } else {
> -               DRMLISTDEL(&nvbo->head);
> -               pthread_mutex_unlock(&nvdev->lock);
>                 drmIoctl(bo->device->fd, DRM_IOCTL_GEM_CLOSE, &req);
>         }
>         if (bo->map)
> @@ -379,7 +377,6 @@ nouveau_bo_new(struct nouveau_device *dev, uint32_t flags, uint32_t align,
>                uint64_t size, union nouveau_bo_config *config,
>                struct nouvea...
2015 Feb 24
0
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...k);
 		if (atomic_read(&nvbo->refcnt) == 0) {
 			DRMLISTDEL(&nvbo->head);
 			/*
@@ -365,8 +365,6 @@ nouveau_bo_del(struct nouveau_bo *bo)
 		}
 		pthread_mutex_unlock(&nvdev->lock);
 	} else {
-		DRMLISTDEL(&nvbo->head);
-		pthread_mutex_unlock(&nvdev->lock);
 		drmIoctl(bo->device->fd, DRM_IOCTL_GEM_CLOSE, &req);
 	}
 	if (bo->map)
@@ -379,7 +377,6 @@ nouveau_bo_new(struct nouveau_device *dev, uint32_t flags, uint32_t align,
 	       uint64_t size, union nouveau_bo_config *config,
 	       struct nouveau_bo **pbo)
 {
-	struct nouveau_device_priv *nvde...
2015 Feb 25
2
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...gt; >>                 }
> >>                 pthread_mutex_unlock(&nvdev->lock);
> >>         } else {
> >> -               DRMLISTDEL(&nvbo->head);
> >> -               pthread_mutex_unlock(&nvdev->lock);
> >>                 drmIoctl(bo->device->fd, DRM_IOCTL_GEM_CLOSE, &req);
> >>         }
> >>         if (bo->map)
> >> @@ -379,7 +377,6 @@ nouveau_bo_new(struct nouveau_device *dev, uint32_t
> flags, uint32_t align,
> >>                uint64_t size, union nouveau_bo_config *...
2012 Apr 09
1
[Bug 48454] New: Xorg hang and have to kill X from ssh
...r/bin/Xorg (0x7f0102b8b000+0x8a947) [0x7f0102c15947]
5: /usr/bin/Xorg (0x7f0102b8b000+0xb052e) [0x7f0102c3b52e]
6: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f0101eb3000+0xf030)
[0x7f0101ec2030]
7: /lib/x86_64-linux-gnu/libc.so.6 (ioctl+0x7) [0x7f0100c8e957]
8: /usr/lib/x86_64-linux-gnu/libdrm.so.2 (drmIoctl+0x28) [0x7f00ff00ca68]
9: /usr/lib/x86_64-linux-gnu/libdrm.so.2 (drmCommandWrite+0x1b)
[0x7f00ff00ed5b]
10: /usr/lib/x86_64-linux-gnu/libdrm_nouveau.so.1 (0x7f00fe9bd000+0x3197)
[0x7f00fe9c0197]
11: /usr/lib/x86_64-linux-gnu/libdrm_nouveau.so.1 (nouveau_bo_map_range+0x109)
[0x7f00fe9c07b9]
12: /usr...
2015 Feb 25
0
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...> +                        * might cause the bo to be closed accidentally while
> +                        * re-importing.
>                          */
> -                       pthread_mutex_unlock(&nvdev->lock);
> -                       return;
> +                       drmIoctl(bo->device->fd, DRM_IOCTL_GEM_CLOSE, &req);
>                 }
> -               DRMLISTDEL(&nvbo->head);
> -               /*
> -                * This bo has to be closed with the lock held because gem
> -                * handles are not refcounted. If a shared b...
2015 Feb 25
3
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...>>>                 pthread_mutex_unlock(&nvdev->lock);
> >>>>         } else {
> >>>> -               DRMLISTDEL(&nvbo->head);
> >>>> -               pthread_mutex_unlock(&nvdev->lock);
> >>>>                 drmIoctl(bo->device->fd, DRM_IOCTL_GEM_CLOSE, &req);
> >>>>         }
> >>>>         if (bo->map)
> >>>> @@ -379,7 +377,6 @@ nouveau_bo_new(struct nouveau_device *dev,
> uint32_t
> >> flags, uint32_t align,
> >>>>...
2015 Feb 25
1
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...* might cause the bo to be closed accidentally while
>> +                        * re-importing.
>>                          */
>> -                       pthread_mutex_unlock(&nvdev->lock);
>> -                       return;
>> +                       drmIoctl(bo->device->fd, DRM_IOCTL_GEM_CLOSE, &req);
>>                 }
>> -               DRMLISTDEL(&nvbo->head);
>> -               /*
>> -                * This bo has to be closed with the lock held because gem
>> -                * handles are not refco...
2015 May 25
1
[Bug 90630] New: random driver crashes mostly after screen lock
...0x7fbea7e0f000+0x96708) [0x7fbea7ea5708]
(EE) 5: /usr/bin/X (0x7fbea7e0f000+0xbfa79) [0x7fbea7ecea79]
(EE) 6: /lib/x86_64-linux-gnu/libc.so.6 (0x7fbea5ad5000+0x352f0)
[0x7fbea5b0a2f0]
(EE) 7: /lib/x86_64-linux-gnu/libc.so.6 (ioctl+0x7) [0x7fbea5bd20b7]
(EE) 8: /usr/lib/x86_64-linux-gnu/libdrm.so.2 (drmIoctl+0x28) [0x7fbea6eb97e8]
(EE) 9: /usr/lib/x86_64-linux-gnu/libdrm.so.2 (drmCommandWrite+0x1b)
[0x7fbea6ebc4ab]
(EE) 10: /usr/lib/x86_64-linux-gnu/libdrm_nouveau.so.2 (nouveau_bo_wait+0x8c)
[0x7fbea200c53c]
(EE) 11: /usr/lib/xorg/modules/drivers/nouveau_drv.so (0x7fbea2211000+0xceb9)
[0x7fbea221deb9]...
2010 May 30
8
[Bug 28320] New: Xserver hangs in an infinite loop
...pmgr)
but after disabling it the problem persisted.This bug happens spontaneous  and
completely at random. The Xserver stops redrawing anything but the mouse is
still moving (hwcursor). I could login through ssh  from another computer and
attach  gdb to the server, to find me inside a tight loop in
drmIoctl()@xf86drm.c making ioctl() and getting -1 and  errno==EINTR every
time. After killing and restarting the server I reliably get a hard lock (ssh
server stops answering my requests, kernel hangs).
[This bug happens in standalone and dualhead mode...]
Till now I have not found any way to reliably re...
2009 Sep 22
7
[Bug 24092] New: X with nouveau hangs in nouveau_bo_map_range when doing anything
...r i detach from it, the odds seem to rise
the more i have used stepi in gdb.
Backtrace: (gdb's parameter string expansions removed, as they contained
garbage. They are visible in the attached gdb-full.log, though)
#0  0x00007fc4c3af5127 in ioctl () from /lib/libc.so.6
#1  0x00007fc4c2d8bb26 in drmIoctl (fd=9, request=1074291845,
arg=0x7fffec89f5c0) at xf86drm.c:188
#2  0x00007fc4c2d8bd3f in drmCommandWrite (fd=9, drmCommandIndex=<value
optimized out>, data=0x7fffec89f5c0, size=18446744073709551615) at
xf86drm.c:2402
#3  0x00007fc4c2930011 in nouveau_bo_wait (bo=0x2397790, cpu_write=0,
no_wa...
2014 Jun 17
1
GPU lockup - switching to software fbcon
...(0x7ff5f046c000+0x6f32) [0x7ff5f0472f32]
(EE) 6: /usr/bin/X (0x400000+0x7a087) [0x47a087]
(EE) 7: /usr/bin/X (0x400000+0xa3518) [0x4a3518]
(EE) 8: /lib64/libpthread.so.0 (0x7ff5f6f47000+0x10b10) [0x7ff5f6f57b10]
(EE) 9: /lib64/libc.so.6 (ioctl+0x7) [0x7ff5f5c8e897]
(EE) 10: /usr/lib64/libdrm.so.2 (drmIoctl+0x28) [0x7ff5f6d3f258]
(EE) 11: /usr/lib64/libdrm.so.2 (drmCommandWrite+0x1b) [0x7ff5f6d4162b]
(EE) 12: /usr/lib64/libdrm_nouveau.so.2 (nouveau_bo_wait+0x89)
[0x7ff5f301b959]
(EE) 13: /usr/lib64/xorg/modules/drivers/nouveau_drv.so
(0x7ff5f3220000+0x7bb3) [0x7ff5f3227bb3]
(EE) 14: /usr/lib64/xorg/mo...
2015 Feb 25
0
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...o_del(struct nouveau_bo *bo)
>>                 }
>>                 pthread_mutex_unlock(&nvdev->lock);
>>         } else {
>> -               DRMLISTDEL(&nvbo->head);
>> -               pthread_mutex_unlock(&nvdev->lock);
>>                 drmIoctl(bo->device->fd, DRM_IOCTL_GEM_CLOSE, &req);
>>         }
>>         if (bo->map)
>> @@ -379,7 +377,6 @@ nouveau_bo_new(struct nouveau_device *dev, uint32_t flags, uint32_t align,
>>                uint64_t size, union nouveau_bo_config *config,
>>...
2015 Feb 25
0
[PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
...}
>>>>                 pthread_mutex_unlock(&nvdev->lock);
>>>>         } else {
>>>> -               DRMLISTDEL(&nvbo->head);
>>>> -               pthread_mutex_unlock(&nvdev->lock);
>>>>                 drmIoctl(bo->device->fd, DRM_IOCTL_GEM_CLOSE, &req);
>>>>         }
>>>>         if (bo->map)
>>>> @@ -379,7 +377,6 @@ nouveau_bo_new(struct nouveau_device *dev, uint32_t
>> flags, uint32_t align,
>>>>                uint64_t size, union nou...
2015 Nov 27
14
[libdrm v2 01/14] nouveau: import and install a selection of nvif headers from the kernel
From: Ben Skeggs <bskeggs at redhat.com>
This commit also modifies the install path of the main libdrm_nouveau
header to be under a nouveau/ subdirectory.
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
---
 include/drm/nouveau_drm.h    |   1 +
 nouveau/Makefile.am          |  11 +++-
 nouveau/libdrm_nouveau.pc.in |   2 +-
 nouveau/nvif/cl0080.h        |  45 ++++++++++++++
2015 Nov 26
18
[libdrm 01/13] nouveau: move more abi16-specific logic into abi16.c
From: Ben Skeggs <bskeggs at redhat.com>
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
---
 nouveau/abi16.c   | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++-----
 nouveau/nouveau.c | 56 +++++++------------------------------------------
 nouveau/private.h |  7 ++-----
 3 files changed, 67 insertions(+), 58 deletions(-)
diff --git a/nouveau/abi16.c b/nouveau/abi16.c
index