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,
int aml_scratch_cancel(struct aml_scratch *scratch,
struct aml_scratch_request *req);
void* aml_scratch_baseptr(struct aml_scratch *scratch);
* 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;
struct aml_scratch_request_seq {
int type;
struct aml_tiling *stiling;
struct aml_tiling *tiling;
void *srcptr;
int srcid;
struct aml_tiling *dtiling;
void *dstptr;
int dstid;
struct aml_dma_request *dma_req;
......@@ -15,16 +15,15 @@
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 *st, void *srcptr, int srcid)
struct aml_tiling *t, void *dstptr, int dstid,
void *srcptr, int srcid)
assert(req != NULL);
req->type = type;
req->stiling = st;
req->tiling = t;
req->srcptr = srcptr;
req->srcid = srcid;
req->dtiling = dt;
req->dstptr = dstptr;
req->dstid = dstid;
return 0;
......@@ -45,8 +44,8 @@ int aml_scratch_seq_doit(struct aml_scratch_seq_data *scratch,
assert(scratch != NULL);
assert(req != NULL);
return aml_dma_async_copy(scratch->dma, &req->dma_req,
req->dtiling, req->dstptr, req->dstid,
req->stiling, req->srcptr, req->srcid);
req->tiling, req->dstptr, req->dstid,
req->tiling, req->srcptr, req->srcid);
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,
/* init request */
aml_scratch_request_seq_init(req, type, scratch->data.tiling,
srcptr, *srcid,
scratchptr, scratchid);
......@@ -125,7 +123,6 @@ int aml_scratch_seq_create_request(struct aml_scratch_data *d,
aml_scratch_request_seq_init(req, type,
scratchptr, *scratchid,
srcptr, srcid);
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