Commit b52f0e52 authored by Swann Perarnau's avatar Swann Perarnau
Browse files

[refactor] remove extra tiling from request

scratch_request_seq contains one extra tiling that is unnecessary.
Remove it.
parent 22063684
...@@ -705,19 +705,19 @@ int aml_scratch_wait(struct aml_scratch *scratch, ...@@ -705,19 +705,19 @@ int aml_scratch_wait(struct aml_scratch *scratch,
int aml_scratch_cancel(struct aml_scratch *scratch, int aml_scratch_cancel(struct aml_scratch *scratch,
struct aml_scratch_request *req); struct aml_scratch_request *req);
void* aml_scratch_baseptr(struct aml_scratch *scratch); void* aml_scratch_baseptr(struct aml_scratch *scratch);
/******************************************************************************* /*******************************************************************************
* Sequential scratchpad API: * Sequential scratchpad API:
* Scratchpad uses calling thread to trigger dma movements. * Scratchpad uses calling thread to trigger asynchronous dma movements.
******************************************************************************/ ******************************************************************************/
extern struct aml_scratch_ops aml_scratch_seq_ops; extern struct aml_scratch_ops aml_scratch_seq_ops;
struct aml_scratch_request_seq { struct aml_scratch_request_seq {
int type; int type;
struct aml_tiling *stiling; struct aml_tiling *tiling;
void *srcptr; void *srcptr;
int srcid; int srcid;
struct aml_tiling *dtiling;
void *dstptr; void *dstptr;
int dstid; int dstid;
struct aml_dma_request *dma_req; struct aml_dma_request *dma_req;
......
...@@ -15,16 +15,15 @@ ...@@ -15,16 +15,15 @@
******************************************************************************/ ******************************************************************************/
int aml_scratch_request_seq_init(struct aml_scratch_request_seq *req, int type, int aml_scratch_request_seq_init(struct aml_scratch_request_seq *req, int type,
struct aml_tiling *dt, void *dstptr, int dstid, struct aml_tiling *t, void *dstptr, int dstid,
struct aml_tiling *st, void *srcptr, int srcid) void *srcptr, int srcid)
{ {
assert(req != NULL); assert(req != NULL);
req->type = type; req->type = type;
req->stiling = st; req->tiling = t;
req->srcptr = srcptr; req->srcptr = srcptr;
req->srcid = srcid; req->srcid = srcid;
req->dtiling = dt;
req->dstptr = dstptr; req->dstptr = dstptr;
req->dstid = dstid; req->dstid = dstid;
return 0; return 0;
...@@ -45,8 +44,8 @@ int aml_scratch_seq_doit(struct aml_scratch_seq_data *scratch, ...@@ -45,8 +44,8 @@ int aml_scratch_seq_doit(struct aml_scratch_seq_data *scratch,
assert(scratch != NULL); assert(scratch != NULL);
assert(req != NULL); assert(req != NULL);
return aml_dma_async_copy(scratch->dma, &req->dma_req, return aml_dma_async_copy(scratch->dma, &req->dma_req,
req->dtiling, req->dstptr, req->dstid, req->tiling, req->dstptr, req->dstid,
req->stiling, req->srcptr, req->srcid); req->tiling, req->srcptr, req->srcid);
} }
struct aml_scratch_seq_ops aml_scratch_seq_inner_ops = { struct aml_scratch_seq_ops aml_scratch_seq_inner_ops = {
...@@ -92,7 +91,6 @@ int aml_scratch_seq_create_request(struct aml_scratch_data *d, ...@@ -92,7 +91,6 @@ int aml_scratch_seq_create_request(struct aml_scratch_data *d,
/* init request */ /* init request */
aml_scratch_request_seq_init(req, type, scratch->data.tiling, aml_scratch_request_seq_init(req, type, scratch->data.tiling,
srcptr, *srcid, srcptr, *srcid,
scratch->data.tiling,
scratchptr, scratchid); scratchptr, scratchid);
} }
else if(type == AML_SCRATCH_REQUEST_TYPE_PULL) else if(type == AML_SCRATCH_REQUEST_TYPE_PULL)
...@@ -125,7 +123,6 @@ int aml_scratch_seq_create_request(struct aml_scratch_data *d, ...@@ -125,7 +123,6 @@ int aml_scratch_seq_create_request(struct aml_scratch_data *d,
aml_scratch_request_seq_init(req, type, aml_scratch_request_seq_init(req, type,
scratch->data.tiling, scratch->data.tiling,
scratchptr, *scratchid, scratchptr, *scratchid,
scratch->data.tiling,
srcptr, srcid); srcptr, srcid);
} }
scratch->ops.doit(&scratch->data, req); scratch->ops.doit(&scratch->data, req);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment