... for all by exynos.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
#include <string.h>
#include "internal.h"
-#include <sys/mman.h>
#include <sys/ioctl.h>
#include "xf86drm.h"
-
-#include "i915_drm.h"
+#include "libdrm.h"
struct dumb_bo
{
if (ret)
return ret;
- map = mmap(0, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, arg.offset);
+ map = drm_mmap(0, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, arg.offset);
if (map == MAP_FAILED)
return -errno;
if (bo->base.ptr) {
/* XXX Sanity check map_count */
- munmap(bo->base.ptr, bo->base.size);
+ drm_munmap(bo->base.ptr, bo->base.size);
bo->base.ptr = NULL;
}
#include <string.h>
#include "internal.h"
-#include <sys/mman.h>
#include <sys/ioctl.h>
#include "xf86drm.h"
+#include "libdrm.h"
#include "i915_drm.h"
if (ret)
return ret;
- map = mmap(0, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, arg.offset);
+ map = drm_mmap(0, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, arg.offset);
if (map == MAP_FAILED)
return -errno;
if (bo->base.ptr) {
/* XXX Sanity check map_count */
- munmap(bo->base.ptr, bo->base.size);
+ drm_munmap(bo->base.ptr, bo->base.size);
bo->base.ptr = NULL;
}
#include <string.h>
#include "internal.h"
-#include <sys/mman.h>
#include <sys/ioctl.h>
#include "xf86drm.h"
+#include "libdrm.h"
#include "nouveau_drm.h"
return 0;
}
- map = mmap(0, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, bo->map_handle);
+ map = drm_mmap(0, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, bo->map_handle);
if (map == MAP_FAILED)
return -errno;
if (bo->base.ptr) {
/* XXX Sanity check map_count */
- munmap(bo->base.ptr, bo->base.size);
+ drm_munmap(bo->base.ptr, bo->base.size);
bo->base.ptr = NULL;
}
#include <string.h>
#include "internal.h"
-#include <sys/mman.h>
#include <sys/ioctl.h>
#include "xf86drm.h"
+#include "libdrm.h"
#include "radeon_drm.h"
if (ret)
return -errno;
- map = mmap(0, arg.size, PROT_READ | PROT_WRITE, MAP_SHARED,
+ map = drm_mmap(0, arg.size, PROT_READ | PROT_WRITE, MAP_SHARED,
bo->base.kms->fd, arg.addr_ptr);
if (map == MAP_FAILED)
return -errno;
{
struct radeon_bo *bo = (struct radeon_bo *)_bo;
if (--bo->map_count == 0) {
- munmap(bo->base.ptr, bo->base.size);
+ drm_munmap(bo->base.ptr, bo->base.size);
bo->base.ptr = NULL;
}
return 0;
if (bo->base.ptr) {
/* XXX Sanity check map_count */
- munmap(bo->base.ptr, bo->base.size);
+ drm_munmap(bo->base.ptr, bo->base.size);
bo->base.ptr = NULL;
}
#include <string.h>
#include "internal.h"
-#include <sys/mman.h>
#include "xf86drm.h"
+#include "libdrm.h"
#include "vmwgfx_drm.h"
struct vmwgfx_bo
return 0;
}
- map = mmap(NULL, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, bo->map_handle);
+ map = drm_mmap(NULL, bo->base.size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->base.kms->fd, bo->map_handle);
if (map == MAP_FAILED)
return -errno;
if (bo->base.ptr) {
/* XXX Sanity check map_count */
- munmap(bo->base.ptr, bo->base.size);
+ drm_munmap(bo->base.ptr, bo->base.size);
bo->base.ptr = NULL;
}