linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 1/3] gpu: host1x: Reduce host1x job allocation size
@ 2015-03-06  1:51 David Ung
       [not found] ` <1425606712-15986-1-git-send-email-davidu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: David Ung @ 2015-03-06  1:51 UTC (permalink / raw)
  To: airlied-cv59FeDIM0c
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	amerilainen-DDmLM1+adcrQT0dZR+AlfA,
	tbergstrom-DDmLM1+adcrQT0dZR+AlfA, gnurou-Re5JQEeQqe8AvxtiuMwx3w,
	David Ung

There is 2 set of num_relocs * sizeof(*) array at the end of host1x job.
Only the 1st set is really used and with job->gather_addr_phys pointing
somewhere within the 1st set of reloc physical addresses.
This patch removes the 2nd set of unused addresses.

Signed-off-by: David Ung <davidu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 drivers/gpu/host1x/job.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index 63bd63f..9c11265 100644
--- a/drivers/gpu/host1x/job.c
+++ b/drivers/gpu/host1x/job.c
@@ -46,8 +46,9 @@ struct host1x_job *host1x_job_alloc(struct host1x_channel *ch,
 		(u64)num_unpins * sizeof(struct host1x_job_unpin_data) +
 		(u64)num_waitchks * sizeof(struct host1x_waitchk) +
 		(u64)num_cmdbufs * sizeof(struct host1x_job_gather) +
-		(u64)num_unpins * sizeof(dma_addr_t) +
-		(u64)num_unpins * sizeof(u32 *);
+		(u64)num_relocs * sizeof(dma_addr_t) +
+		(u64)num_cmdbufs * sizeof(dma_addr_t);
+
 	if (total > ULONG_MAX)
 		return NULL;
 
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-04-09  8:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-06  1:51 [PATCH V2 1/3] gpu: host1x: Reduce host1x job allocation size David Ung
     [not found] ` <1425606712-15986-1-git-send-email-davidu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-03-06  1:51   ` [PATCH V2 2/3] gpu: host1x: Remove addr_phys member from host1x_job David Ung
2015-03-06  1:51   ` [PATCH V2 3/3] gpu: host1x: Record the physical address for gathers David Ung
2015-03-18  0:53   ` [PATCH V2 1/3] gpu: host1x: Reduce host1x job allocation size David Ung
     [not found]     ` <0e36c4295adc4f2daae9715cd0dde87d-wO81nVYWzR5xWE4FnwvcdlaTQe2KTcn/@public.gmane.org>
2015-03-23  7:09       ` Alexandre Courbot
     [not found]         ` <CAAVeFuK4NOrfCcX846rgPdViR6Ur4pSrrVihiV7KP1kRf15kdw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-23 19:39           ` David Ung
     [not found]             ` <2253e92cd45c4b33913a45011c4ce823-wO81nVYWzR5xWE4FnwvcdlaTQe2KTcn/@public.gmane.org>
2015-03-31  6:29               ` Alexandre Courbot
     [not found]                 ` <CAAVeFuLZOJdOtpuSqdRzGa0rK3WZWURz-pn2tXhqTv58J0R_NA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-02 23:13                   ` David Ung
     [not found]                     ` <4ca2d661eab54c3eb861680ebc24a430-wO81nVYWzR5xWE4FnwvcdlaTQe2KTcn/@public.gmane.org>
2015-04-06  4:14                       ` Alexandre Courbot
2015-04-09  8:53                       ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).