swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit 4d5f85b4675e588bf7c0c09ab00f40c5395695c9
parent 7e04c8a3ae82b90c8957707c4ff572dd32b29562
Author: Michael Forney <mforney@mforney.org>
Date:   Fri, 21 Jun 2013 22:16:16 -0700

intel: Remove unused bo.{c,h}

Diffstat:
Mintel/Makefile.am | 1-
Mintel/batch.c | 1-
Mintel/batch.h | 2--
Dintel/bo.c | 52----------------------------------------------------
Dintel/bo.h | 24------------------------
5 files changed, 0 insertions(+), 80 deletions(-)

diff --git a/intel/Makefile.am b/intel/Makefile.am @@ -5,7 +5,6 @@ AM_CFLAGS = $(drm_CFLAGS) noinst_LTLIBRARIES = libintel.la libintel_la_SOURCES = \ - bo.c bo.h \ batch.c batch.h \ blt.h \ mi.h diff --git a/intel/batch.c b/intel/batch.c @@ -1,5 +1,4 @@ #include "batch.h" -#include "bo.h" #include "mi.h" #include <stdio.h> diff --git a/intel/batch.h b/intel/batch.h @@ -1,8 +1,6 @@ #ifndef SWC_I915_BATCH_H #define SWC_I915_BATCH_H 1 -#include "bo.h" - #include <stdlib.h> #include <stdint.h> #include <stdarg.h> diff --git a/intel/bo.c b/intel/bo.c @@ -1,52 +0,0 @@ -#include "bo.h" - -#include <stdio.h> -#include <xf86drm.h> -#include <libdrm/i915_drm.h> - -bool intel_bo_initialize(int drm, struct intel_bo * bo, uint32_t size) -{ - struct drm_i915_gem_create create_arg = { .size = size }; - - if (drmCommandWriteRead(drm, DRM_I915_GEM_CREATE, &create_arg, - sizeof create_arg) != 0) - { - printf("could not create bo\n"); - goto error_base; - } - - bo->handle = create_arg.handle; - bo->size = size; - - bo->last_offset = 0; - - return true; - - error_base: - return false; -} - -void intel_bo_finalize(int drm, struct intel_bo * bo) -{ - struct drm_gem_close close_arg = { .handle = bo->handle }; - - drmIoctl(drm, DRM_IOCTL_GEM_CLOSE, &close_arg); -} - -void intel_bo_write(int drm, struct intel_bo * bo, uint32_t offset, - void * data, size_t size) -{ - struct drm_i915_gem_pwrite pwrite_arg = { - .handle = bo->handle, - .offset = offset, - .size = size, - .data_ptr = (uint64_t) data - }; - - if (drmCommandWrite(drm, DRM_I915_GEM_PWRITE, &pwrite_arg, - sizeof pwrite_arg) != 0) - { - printf("write failed\n"); - } -} - diff --git a/intel/bo.h b/intel/bo.h @@ -1,24 +0,0 @@ -#ifndef SWC_I915_BO_H -#define SWC_I915_BO_H 1 - -#include <stdlib.h> -#include <stdint.h> -#include <stdbool.h> - -struct intel_bo -{ - uint32_t handle; - uint32_t size; - - uint64_t last_offset; -}; - -bool intel_bo_initialize(int drm, struct intel_bo * bo, uint32_t size); - -void intel_bo_finalize(int drm, struct intel_bo * bo); - -void intel_bo_write(int drm, struct intel_bo * bo, uint32_t offset, - void * data, size_t size); - -#endif -