[PATCH 45/48] staging: etnaviv: remove submit type

Lucas Stach l.stach at pengutronix.de
Fri Sep 25 04:57:57 PDT 2015


There is no point in having a context restore buffer, as the need for tracking
GPU hardware state in userspace and the fact that we need to submit all states
that reference memory buffers anyway to ensure proper patching of the
relocations, eat away from the potential benefit.

Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
---
 drivers/staging/etnaviv/etnaviv_gem.h        | 1 -
 drivers/staging/etnaviv/etnaviv_gem_submit.c | 1 -
 include/uapi/drm/etnaviv_drm.h               | 8 --------
 3 files changed, 10 deletions(-)

diff --git a/drivers/staging/etnaviv/etnaviv_gem.h b/drivers/staging/etnaviv/etnaviv_gem.h
index 25f7afbc779a..5112c5458306 100644
--- a/drivers/staging/etnaviv/etnaviv_gem.h
+++ b/drivers/staging/etnaviv/etnaviv_gem.h
@@ -121,7 +121,6 @@ struct etnaviv_gem_submit {
 	unsigned int nr_cmds;
 	unsigned int nr_bos;
 	struct {
-		u32 type;
 		u32 offset; /* in dwords */
 		u32 size;  /* in dwords */
 		struct etnaviv_gem_object *obj;
diff --git a/drivers/staging/etnaviv/etnaviv_gem_submit.c b/drivers/staging/etnaviv/etnaviv_gem_submit.c
index a0bc61946036..73c1378e96a1 100644
--- a/drivers/staging/etnaviv/etnaviv_gem_submit.c
+++ b/drivers/staging/etnaviv/etnaviv_gem_submit.c
@@ -408,7 +408,6 @@ int etnaviv_ioctl_gem_submit(struct drm_device *dev, void *data,
 			goto out;
 		}
 
-		submit->cmd[i].type = submit_cmd->type;
 		submit->cmd[i].offset = submit_cmd->submit_offset / 4;
 		submit->cmd[i].size = submit_cmd->size / 4;
 		submit->cmd[i].obj = etnaviv_obj;
diff --git a/include/uapi/drm/etnaviv_drm.h b/include/uapi/drm/etnaviv_drm.h
index 7cc749c30970..1515fa4f6986 100644
--- a/include/uapi/drm/etnaviv_drm.h
+++ b/include/uapi/drm/etnaviv_drm.h
@@ -123,15 +123,7 @@ struct drm_etnaviv_gem_submit_reloc {
 	__u64 reloc_offset;   /* in, offset from start of reloc_bo */
 };
 
-/* submit-types:
- *   BUF - this cmd buffer is executed normally.
- *   CTX_RESTORE_BUF - only executed if there has been a GPU context
- *      switch since the last SUBMIT ioctl
- */
-#define ETNA_SUBMIT_CMD_BUF             0x0001
-#define ETNA_SUBMIT_CMD_CTX_RESTORE_BUF 0x0002
 struct drm_etnaviv_gem_submit_cmd {
-	__u32 type;           /* in, one of ETNA_SUBMIT_CMD_x */
 	__u32 submit_idx;     /* in, index of submit_bo cmdstream buffer */
 	__u32 submit_offset;  /* in, offset into submit_bo */
 	__u32 size;           /* in, cmdstream size */
-- 
2.5.1



More information about the dri-devel mailing list