summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJammy Zhou <Jammy.Zhou@amd.com>2015-05-11 23:02:09 +0800
committerAlex Deucher <alexander.deucher@amd.com>2015-07-30 00:11:10 -0400
commit8c4b81e4317db8cc0ab21d9b7c72500e93bc22e2 (patch)
tree72a34ba5e3bec09f25b8de6e7a14b3b0538b18a3
parent6c0bc052f5e63bc9c6f256e4c78f3e3034e5630a (diff)
amdgpu: reuse the kernel IB flags v2
v2: remove 'CE' from the preamble flag Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian K├Ânig <christian.koenig@amd.com>
-rw-r--r--amdgpu/amdgpu.h6
-rw-r--r--amdgpu/amdgpu_cs.c4
-rw-r--r--include/drm/amdgpu_drm.h3
-rw-r--r--tests/amdgpu/basic_tests.c2
4 files changed, 5 insertions, 10 deletions
diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
index e165856b..0997bd73 100644
--- a/amdgpu/amdgpu.h
+++ b/amdgpu/amdgpu.h
@@ -57,12 +57,6 @@ struct drm_amdgpu_info_hw_ip;
#define AMDGPU_TIMEOUT_INFINITE 0xffffffffffffffffull
/**
- * The special flag for GFX submission to identify that this is CE IB
- * \sa amdgpu_cs_ib_info
-*/
-#define AMDGPU_CS_GFX_IB_CE 0x1
-
-/**
* The special flag to mark that this IB will re-used
* by client and should not be automatically return back
* to free pool by libdrm_amdgpu when submission is completed.
diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c
index b5364977..ef3e403b 100644
--- a/amdgpu/amdgpu_cs.c
+++ b/amdgpu/amdgpu_cs.c
@@ -678,9 +678,7 @@ static int amdgpu_cs_submit_one(amdgpu_context_handle context,
chunk_data[i].ib_data.ip_type = ibs_request->ip_type;
chunk_data[i].ib_data.ip_instance = ibs_request->ip_instance;
chunk_data[i].ib_data.ring = ibs_request->ring;
-
- if (ib->flags & AMDGPU_CS_GFX_IB_CE)
- chunk_data[i].ib_data.flags = AMDGPU_IB_FLAG_CE;
+ chunk_data[i].ib_data.flags = ib->flags;
}
pthread_mutex_lock(&context->sequence_mutex);
diff --git a/include/drm/amdgpu_drm.h b/include/drm/amdgpu_drm.h
index 0acaccc2..a27f8eb7 100644
--- a/include/drm/amdgpu_drm.h
+++ b/include/drm/amdgpu_drm.h
@@ -369,6 +369,9 @@ union drm_amdgpu_cs {
/* GDS is used by this IB */
#define AMDGPU_IB_FLAG_GDS (1<<1)
+/* CE Preamble */
+#define AMDGPU_IB_FLAG_PREAMBLE (1<<2)
+
struct drm_amdgpu_cs_chunk_ib {
/**
* Handle of GEM object to be used as IB or 0 if it is already in
diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.c
index 6654e588..635cd23a 100644
--- a/tests/amdgpu/basic_tests.c
+++ b/tests/amdgpu/basic_tests.c
@@ -186,7 +186,7 @@ static void amdgpu_command_submission_gfx(void)
ptr[3] = 1;
ib_info[0].ib_handle = ib_result_ce.handle;
ib_info[0].size = 4;
- ib_info[0].flags = AMDGPU_CS_GFX_IB_CE;
+ ib_info[0].flags = AMDGPU_IB_FLAG_CE;
/* IT_WAIT_ON_CE_COUNTER */
ptr = ib_result.cpu;