summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarzyna Dec <katarzyna.dec@intel.com>2018-04-11 10:15:01 +0200
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2018-04-12 23:56:55 +0300
commit80e4910581c7310258375a003a5de9a57ed24546 (patch)
treee0677efbef0605a984dd0ee4a5b35057e25cd39b
parent098b05b21e2935269b477125ef0b7c6729df4cb0 (diff)
lib: Adjust refactored gpu_fill library to our coding style
While I am making changes in gpgpu and media fill area let's adjust code to our coding style. v2: rebased on series new version (patch is now last from series so change seems larger) v3: rebased Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
-rw-r--r--lib/gpgpu_fill.c24
-rw-r--r--lib/gpgpu_fill.h12
-rw-r--r--lib/media_fill.h20
-rw-r--r--lib/media_fill_gen7.c7
-rw-r--r--lib/media_fill_gen8.c7
-rw-r--r--lib/media_fill_gen9.c7
6 files changed, 39 insertions, 38 deletions
diff --git a/lib/gpgpu_fill.c b/lib/gpgpu_fill.c
index 5a77ebd4..72a1445a 100644
--- a/lib/gpgpu_fill.c
+++ b/lib/gpgpu_fill.c
@@ -99,8 +99,8 @@ static const uint32_t gen9_gpgpu_kernel[][4] = {
void
gen7_gpgpu_fillfunc(struct intel_batchbuffer *batch,
struct igt_buf *dst,
- unsigned x, unsigned y,
- unsigned width, unsigned height,
+ unsigned int x, unsigned int y,
+ unsigned int width, unsigned int height,
uint8_t color)
{
uint32_t curbe_buffer, interface_descriptor;
@@ -120,8 +120,8 @@ gen7_gpgpu_fillfunc(struct intel_batchbuffer *batch,
curbe_buffer = gen7_fill_curbe_buffer_data(batch, color);
interface_descriptor = gen7_fill_interface_descriptor(batch, dst,
- gen7_gpgpu_kernel,
- sizeof(gen7_gpgpu_kernel));
+ gen7_gpgpu_kernel, sizeof(gen7_gpgpu_kernel));
+
igt_assert(batch->ptr < &batch->buffer[4095]);
batch->ptr = batch->buffer;
@@ -147,8 +147,8 @@ gen7_gpgpu_fillfunc(struct intel_batchbuffer *batch,
void
gen8_gpgpu_fillfunc(struct intel_batchbuffer *batch,
struct igt_buf *dst,
- unsigned x, unsigned y,
- unsigned width, unsigned height,
+ unsigned int x, unsigned int y,
+ unsigned int width, unsigned int height,
uint8_t color)
{
uint32_t curbe_buffer, interface_descriptor;
@@ -168,8 +168,8 @@ gen8_gpgpu_fillfunc(struct intel_batchbuffer *batch,
curbe_buffer = gen7_fill_curbe_buffer_data(batch, color);
interface_descriptor = gen8_fill_interface_descriptor(batch, dst,
- gen8_gpgpu_kernel,
- sizeof(gen8_gpgpu_kernel));
+ gen8_gpgpu_kernel, sizeof(gen8_gpgpu_kernel));
+
igt_assert(batch->ptr < &batch->buffer[4095]);
batch->ptr = batch->buffer;
@@ -195,8 +195,8 @@ gen8_gpgpu_fillfunc(struct intel_batchbuffer *batch,
void
gen9_gpgpu_fillfunc(struct intel_batchbuffer *batch,
struct igt_buf *dst,
- unsigned x, unsigned y,
- unsigned width, unsigned height,
+ unsigned int x, unsigned int y,
+ unsigned int width, unsigned int height,
uint8_t color)
{
uint32_t curbe_buffer, interface_descriptor;
@@ -216,8 +216,8 @@ gen9_gpgpu_fillfunc(struct intel_batchbuffer *batch,
curbe_buffer = gen7_fill_curbe_buffer_data(batch, color);
interface_descriptor = gen8_fill_interface_descriptor(batch, dst,
- gen9_gpgpu_kernel,
- sizeof(gen9_gpgpu_kernel));
+ gen9_gpgpu_kernel, sizeof(gen9_gpgpu_kernel));
+
igt_assert(batch->ptr < &batch->buffer[4095]);
batch->ptr = batch->buffer;
diff --git a/lib/gpgpu_fill.h b/lib/gpgpu_fill.h
index 7b5c8322..f0d188ae 100644
--- a/lib/gpgpu_fill.h
+++ b/lib/gpgpu_fill.h
@@ -30,22 +30,22 @@
void
gen7_gpgpu_fillfunc(struct intel_batchbuffer *batch,
struct igt_buf *dst,
- unsigned x, unsigned y,
- unsigned width, unsigned height,
+ unsigned int x, unsigned int y,
+ unsigned int width, unsigned int height,
uint8_t color);
void
gen8_gpgpu_fillfunc(struct intel_batchbuffer *batch,
struct igt_buf *dst,
- unsigned x, unsigned y,
- unsigned width, unsigned height,
+ unsigned int x, unsigned int y,
+ unsigned int width, unsigned int height,
uint8_t color);
void
gen9_gpgpu_fillfunc(struct intel_batchbuffer *batch,
struct igt_buf *dst,
- unsigned x, unsigned y,
- unsigned width, unsigned height,
+ unsigned int x, unsigned int y,
+ unsigned int width, unsigned int height,
uint8_t color);
#endif /* GPGPU_FILL_H */
diff --git a/lib/media_fill.h b/lib/media_fill.h
index 161af8cf..f6db734e 100644
--- a/lib/media_fill.h
+++ b/lib/media_fill.h
@@ -7,22 +7,22 @@
void
gen8_media_fillfunc(struct intel_batchbuffer *batch,
struct igt_buf *dst,
- unsigned x, unsigned y,
- unsigned width, unsigned height,
+ unsigned int x, unsigned int y,
+ unsigned int width, unsigned int height,
uint8_t color);
void
gen7_media_fillfunc(struct intel_batchbuffer *batch,
- struct igt_buf *dst,
- unsigned x, unsigned y,
- unsigned width, unsigned height,
- uint8_t color);
+ struct igt_buf *dst,
+ unsigned int x, unsigned int y,
+ unsigned int width, unsigned int height,
+ uint8_t color);
void
gen9_media_fillfunc(struct intel_batchbuffer *batch,
- struct igt_buf *dst,
- unsigned x, unsigned y,
- unsigned width, unsigned height,
- uint8_t color);
+ struct igt_buf *dst,
+ unsigned int x, unsigned int y,
+ unsigned int width, unsigned int height,
+ uint8_t color);
#endif /* RENDE_MEDIA_FILL_H */
diff --git a/lib/media_fill_gen7.c b/lib/media_fill_gen7.c
index c97555a6..5a8c32fb 100644
--- a/lib/media_fill_gen7.c
+++ b/lib/media_fill_gen7.c
@@ -47,8 +47,8 @@ static const uint32_t media_kernel[][4] = {
void
gen7_media_fillfunc(struct intel_batchbuffer *batch,
struct igt_buf *dst,
- unsigned x, unsigned y,
- unsigned width, unsigned height,
+ unsigned int x, unsigned int y,
+ unsigned int width, unsigned int height,
uint8_t color)
{
uint32_t curbe_buffer, interface_descriptor;
@@ -61,8 +61,7 @@ gen7_media_fillfunc(struct intel_batchbuffer *batch,
curbe_buffer = gen7_fill_curbe_buffer_data(batch, color);
interface_descriptor = gen7_fill_interface_descriptor(batch, dst,
- media_kernel,
- sizeof(media_kernel));
+ media_kernel, sizeof(media_kernel));
igt_assert(batch->ptr < &batch->buffer[4095]);
/* media pipeline */
diff --git a/lib/media_fill_gen8.c b/lib/media_fill_gen8.c
index 362abd61..d6dd7410 100644
--- a/lib/media_fill_gen8.c
+++ b/lib/media_fill_gen8.c
@@ -50,8 +50,8 @@ static const uint32_t media_kernel[][4] = {
void
gen8_media_fillfunc(struct intel_batchbuffer *batch,
struct igt_buf *dst,
- unsigned x, unsigned y,
- unsigned width, unsigned height,
+ unsigned int x, unsigned int y,
+ unsigned int width, unsigned int height,
uint8_t color)
{
uint32_t curbe_buffer, interface_descriptor;
@@ -63,7 +63,8 @@ gen8_media_fillfunc(struct intel_batchbuffer *batch,
batch->ptr = &batch->buffer[BATCH_STATE_SPLIT];
curbe_buffer = gen7_fill_curbe_buffer_data(batch, color);
- interface_descriptor = gen8_fill_interface_descriptor(batch, dst, media_kernel, sizeof(media_kernel));
+ interface_descriptor = gen8_fill_interface_descriptor(batch, dst,
+ media_kernel, sizeof(media_kernel));
igt_assert(batch->ptr < &batch->buffer[4095]);
/* media pipeline */
diff --git a/lib/media_fill_gen9.c b/lib/media_fill_gen9.c
index d1335fe6..a9a829f2 100644
--- a/lib/media_fill_gen9.c
+++ b/lib/media_fill_gen9.c
@@ -47,8 +47,8 @@ static const uint32_t media_kernel[][4] = {
void
gen9_media_fillfunc(struct intel_batchbuffer *batch,
struct igt_buf *dst,
- unsigned x, unsigned y,
- unsigned width, unsigned height,
+ unsigned int x, unsigned int y,
+ unsigned int width, unsigned int height,
uint8_t color)
{
uint32_t curbe_buffer, interface_descriptor;
@@ -60,7 +60,8 @@ gen9_media_fillfunc(struct intel_batchbuffer *batch,
batch->ptr = &batch->buffer[BATCH_STATE_SPLIT];
curbe_buffer = gen7_fill_curbe_buffer_data(batch, color);
- interface_descriptor = gen8_fill_interface_descriptor(batch, dst, media_kernel, sizeof(media_kernel));
+ interface_descriptor = gen8_fill_interface_descriptor(batch, dst,
+ media_kernel, sizeof(media_kernel));
assert(batch->ptr < &batch->buffer[4095]);
/* media pipeline */