nouveau: map_range returning -EBUSY isn't necessarily an error
This commit is contained in:
parent
84166a021f
commit
625bc0cfa2
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
#include <util/u_memory.h>
|
#include <util/u_memory.h>
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
#include "nouveau/nouveau_bo.h"
|
#include "nouveau/nouveau_bo.h"
|
||||||
#include "nouveau_winsys.h"
|
#include "nouveau_winsys.h"
|
||||||
#include "nouveau_screen.h"
|
#include "nouveau_screen.h"
|
||||||
|
@ -141,11 +143,12 @@ nouveau_screen_bo_map_range(struct pipe_screen *pscreen, struct pipe_buffer *pb,
|
||||||
unsigned offset, unsigned length, unsigned usage)
|
unsigned offset, unsigned length, unsigned usage)
|
||||||
{
|
{
|
||||||
struct nouveau_bo *bo = nouveau_bo(pb);
|
struct nouveau_bo *bo = nouveau_bo(pb);
|
||||||
|
uint32_t flags = nouveau_screen_map_flags(usage);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = nouveau_bo_map_range(bo, offset, length,
|
ret = nouveau_bo_map_range(bo, offset, length, flags);
|
||||||
nouveau_screen_map_flags(usage));
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
if (!(flags & NOUVEAU_BO_NOWAIT) || ret != -EBUSY)
|
||||||
debug_printf("map_range failed: %d\n", ret);
|
debug_printf("map_range failed: %d\n", ret);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue