aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2016-06-23 05:33:31 -0400
committerThierry Reding <treding@nvidia.com>2016-06-23 05:59:28 -0400
commit6df633d0dc333ffce683f46f2856024479b170b9 (patch)
tree7ec587a9e0fa9a9c2e6eb9352af4232fa91e1d7e
parentb47a04919680185c3bdaa8f8d832addd38172a65 (diff)
gpu: host1x: Fix a couple of checkpatch warnings
Fix a couple of occurrences where no blank line was used to separate variable declarations from code or where block comments were wrongly formatted. Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--drivers/gpu/host1x/cdma.c8
-rw-r--r--drivers/gpu/host1x/debug.c3
-rw-r--r--drivers/gpu/host1x/dev.c2
-rw-r--r--drivers/gpu/host1x/hw/debug_hw.c7
-rw-r--r--drivers/gpu/host1x/hw/syncpt_hw.c2
-rw-r--r--drivers/gpu/host1x/intr.c2
-rw-r--r--drivers/gpu/host1x/job.c3
-rw-r--r--drivers/gpu/host1x/syncpt.c5
8 files changed, 24 insertions, 8 deletions
diff --git a/drivers/gpu/host1x/cdma.c b/drivers/gpu/host1x/cdma.c
index fe1b216b8d17..b83b0a04d9c5 100644
--- a/drivers/gpu/host1x/cdma.c
+++ b/drivers/gpu/host1x/cdma.c
@@ -247,6 +247,7 @@ static void update_cdma_locked(struct host1x_cdma *cdma)
247 /* Pop push buffer slots */ 247 /* Pop push buffer slots */
248 if (job->num_slots) { 248 if (job->num_slots) {
249 struct push_buffer *pb = &cdma->push_buffer; 249 struct push_buffer *pb = &cdma->push_buffer;
250
250 host1x_pushbuffer_pop(pb, job->num_slots); 251 host1x_pushbuffer_pop(pb, job->num_slots);
251 if (cdma->event == CDMA_EVENT_PUSH_BUFFER_SPACE) 252 if (cdma->event == CDMA_EVENT_PUSH_BUFFER_SPACE)
252 signal = true; 253 signal = true;
@@ -342,9 +343,11 @@ void host1x_cdma_update_sync_queue(struct host1x_cdma *cdma,
342 syncpt_val += syncpt_incrs; 343 syncpt_val += syncpt_incrs;
343 } 344 }
344 345
345 /* The following sumbits from the same client may be dependent on the 346 /*
347 * The following sumbits from the same client may be dependent on the
346 * failed submit and therefore they may fail. Force a small timeout 348 * failed submit and therefore they may fail. Force a small timeout
347 * to make the queue cleanup faster */ 349 * to make the queue cleanup faster.
350 */
348 351
349 list_for_each_entry_from(job, &cdma->sync_queue, list) 352 list_for_each_entry_from(job, &cdma->sync_queue, list)
350 if (job->client == cdma->timeout.client) 353 if (job->client == cdma->timeout.client)
@@ -410,6 +413,7 @@ int host1x_cdma_begin(struct host1x_cdma *cdma, struct host1x_job *job)
410 /* init state on first submit with timeout value */ 413 /* init state on first submit with timeout value */
411 if (!cdma->timeout.initialized) { 414 if (!cdma->timeout.initialized) {
412 int err; 415 int err;
416
413 err = host1x_hw_cdma_timeout_init(host1x, cdma, 417 err = host1x_hw_cdma_timeout_init(host1x, cdma,
414 job->syncpt_id); 418 job->syncpt_id);
415 if (err) { 419 if (err) {
diff --git a/drivers/gpu/host1x/debug.c b/drivers/gpu/host1x/debug.c
index 797f8f048117..7bb86b92ff09 100644
--- a/drivers/gpu/host1x/debug.c
+++ b/drivers/gpu/host1x/debug.c
@@ -63,10 +63,12 @@ static int show_channels(struct host1x_channel *ch, void *data, bool show_fifo)
63static void show_syncpts(struct host1x *m, struct output *o) 63static void show_syncpts(struct host1x *m, struct output *o)
64{ 64{
65 unsigned int i; 65 unsigned int i;
66
66 host1x_debug_output(o, "---- syncpts ----\n"); 67 host1x_debug_output(o, "---- syncpts ----\n");
67 for (i = 0; i < host1x_syncpt_nb_pts(m); i++) { 68 for (i = 0; i < host1x_syncpt_nb_pts(m); i++) {
68 u32 max = host1x_syncpt_read_max(m->syncpt + i); 69 u32 max = host1x_syncpt_read_max(m->syncpt + i);
69 u32 min = host1x_syncpt_load(m->syncpt + i); 70 u32 min = host1x_syncpt_load(m->syncpt + i);
71
70 if (!min && !max) 72 if (!min && !max)
71 continue; 73 continue;
72 74
@@ -76,6 +78,7 @@ static void show_syncpts(struct host1x *m, struct output *o)
76 78
77 for (i = 0; i < host1x_syncpt_nb_bases(m); i++) { 79 for (i = 0; i < host1x_syncpt_nb_bases(m); i++) {
78 u32 base_val; 80 u32 base_val;
81
79 base_val = host1x_syncpt_load_wait_base(m->syncpt + i); 82 base_val = host1x_syncpt_load_wait_base(m->syncpt + i);
80 if (base_val) 83 if (base_val)
81 host1x_debug_output(o, "waitbase id %u val %d\n", i, 84 host1x_debug_output(o, "waitbase id %u val %d\n", i,
diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
index ff348690df94..320caf99cff4 100644
--- a/drivers/gpu/host1x/dev.c
+++ b/drivers/gpu/host1x/dev.c
@@ -102,7 +102,7 @@ static const struct host1x_info host1x05_info = {
102 .dma_mask = DMA_BIT_MASK(34), 102 .dma_mask = DMA_BIT_MASK(34),
103}; 103};
104 104
105static struct of_device_id host1x_of_match[] = { 105static const struct of_device_id host1x_of_match[] = {
106 { .compatible = "nvidia,tegra210-host1x", .data = &host1x05_info, }, 106 { .compatible = "nvidia,tegra210-host1x", .data = &host1x05_info, },
107 { .compatible = "nvidia,tegra124-host1x", .data = &host1x04_info, }, 107 { .compatible = "nvidia,tegra124-host1x", .data = &host1x04_info, },
108 { .compatible = "nvidia,tegra114-host1x", .data = &host1x02_info, }, 108 { .compatible = "nvidia,tegra114-host1x", .data = &host1x02_info, },
diff --git a/drivers/gpu/host1x/hw/debug_hw.c b/drivers/gpu/host1x/hw/debug_hw.c
index 47da9a62ff7e..d2c96dd630ea 100644
--- a/drivers/gpu/host1x/hw/debug_hw.c
+++ b/drivers/gpu/host1x/hw/debug_hw.c
@@ -51,12 +51,11 @@ static unsigned int show_channel_command(struct output *o, u32 val)
51 val >> 6 & 0x3ff, 51 val >> 6 & 0x3ff,
52 val >> 16 & 0xfff, mask); 52 val >> 16 & 0xfff, mask);
53 return hweight8(mask); 53 return hweight8(mask);
54 } else {
55 host1x_debug_output(o, "SETCL(class=%03x)\n",
56 val >> 6 & 0x3ff);
57 return 0;
58 } 54 }
59 55
56 host1x_debug_output(o, "SETCL(class=%03x)\n", val >> 6 & 0x3ff);
57 return 0;
58
60 case HOST1X_OPCODE_INCR: 59 case HOST1X_OPCODE_INCR:
61 host1x_debug_output(o, "INCR(offset=%03x, [", 60 host1x_debug_output(o, "INCR(offset=%03x, [",
62 val >> 16 & 0xfff); 61 val >> 16 & 0xfff);
diff --git a/drivers/gpu/host1x/hw/syncpt_hw.c b/drivers/gpu/host1x/hw/syncpt_hw.c
index b60a4b97e4a8..310f24fcd261 100644
--- a/drivers/gpu/host1x/hw/syncpt_hw.c
+++ b/drivers/gpu/host1x/hw/syncpt_hw.c
@@ -38,6 +38,7 @@ static void syncpt_restore(struct host1x_syncpt *sp)
38static void syncpt_restore_wait_base(struct host1x_syncpt *sp) 38static void syncpt_restore_wait_base(struct host1x_syncpt *sp)
39{ 39{
40 struct host1x *host = sp->host; 40 struct host1x *host = sp->host;
41
41 host1x_sync_writel(host, sp->base_val, 42 host1x_sync_writel(host, sp->base_val,
42 HOST1X_SYNC_SYNCPT_BASE(sp->id)); 43 HOST1X_SYNC_SYNCPT_BASE(sp->id));
43} 44}
@@ -48,6 +49,7 @@ static void syncpt_restore_wait_base(struct host1x_syncpt *sp)
48static void syncpt_read_wait_base(struct host1x_syncpt *sp) 49static void syncpt_read_wait_base(struct host1x_syncpt *sp)
49{ 50{
50 struct host1x *host = sp->host; 51 struct host1x *host = sp->host;
52
51 sp->base_val = 53 sp->base_val =
52 host1x_sync_readl(host, HOST1X_SYNC_SYNCPT_BASE(sp->id)); 54 host1x_sync_readl(host, HOST1X_SYNC_SYNCPT_BASE(sp->id));
53} 55}
diff --git a/drivers/gpu/host1x/intr.c b/drivers/gpu/host1x/intr.c
index c85ca44ff461..a04d10407639 100644
--- a/drivers/gpu/host1x/intr.c
+++ b/drivers/gpu/host1x/intr.c
@@ -122,12 +122,14 @@ static void action_submit_complete(struct host1x_waitlist *waiter)
122static void action_wakeup(struct host1x_waitlist *waiter) 122static void action_wakeup(struct host1x_waitlist *waiter)
123{ 123{
124 wait_queue_head_t *wq = waiter->data; 124 wait_queue_head_t *wq = waiter->data;
125
125 wake_up(wq); 126 wake_up(wq);
126} 127}
127 128
128static void action_wakeup_interruptible(struct host1x_waitlist *waiter) 129static void action_wakeup_interruptible(struct host1x_waitlist *waiter)
129{ 130{
130 wait_queue_head_t *wq = waiter->data; 131 wait_queue_head_t *wq = waiter->data;
132
131 wake_up_interruptible(wq); 133 wake_up_interruptible(wq);
132} 134}
133 135
diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index 626707585d9b..1bff367f8830 100644
--- a/drivers/gpu/host1x/job.c
+++ b/drivers/gpu/host1x/job.c
@@ -464,6 +464,7 @@ static inline int copy_gathers(struct host1x_job *job, struct device *dev)
464 464
465 for (i = 0; i < job->num_gathers; i++) { 465 for (i = 0; i < job->num_gathers; i++) {
466 struct host1x_job_gather *g = &job->gathers[i]; 466 struct host1x_job_gather *g = &job->gathers[i];
467
467 size += g->words * sizeof(u32); 468 size += g->words * sizeof(u32);
468 } 469 }
469 470
@@ -514,6 +515,7 @@ int host1x_job_pin(struct host1x_job *job, struct device *dev)
514 bitmap_zero(waitchk_mask, host1x_syncpt_nb_pts(host)); 515 bitmap_zero(waitchk_mask, host1x_syncpt_nb_pts(host));
515 for (i = 0; i < job->num_waitchk; i++) { 516 for (i = 0; i < job->num_waitchk; i++) {
516 u32 syncpt_id = job->waitchk[i].syncpt_id; 517 u32 syncpt_id = job->waitchk[i].syncpt_id;
518
517 if (syncpt_id < host1x_syncpt_nb_pts(host)) 519 if (syncpt_id < host1x_syncpt_nb_pts(host))
518 set_bit(syncpt_id, waitchk_mask); 520 set_bit(syncpt_id, waitchk_mask);
519 } 521 }
@@ -571,6 +573,7 @@ void host1x_job_unpin(struct host1x_job *job)
571 573
572 for (i = 0; i < job->num_unpins; i++) { 574 for (i = 0; i < job->num_unpins; i++) {
573 struct host1x_job_unpin_data *unpin = &job->unpins[i]; 575 struct host1x_job_unpin_data *unpin = &job->unpins[i];
576
574 host1x_bo_unpin(unpin->bo, unpin->sgt); 577 host1x_bo_unpin(unpin->bo, unpin->sgt);
575 host1x_bo_put(unpin->bo); 578 host1x_bo_put(unpin->bo);
576 } 579 }
diff --git a/drivers/gpu/host1x/syncpt.c b/drivers/gpu/host1x/syncpt.c
index d70aad5c9f05..7c4848f4ce59 100644
--- a/drivers/gpu/host1x/syncpt.c
+++ b/drivers/gpu/host1x/syncpt.c
@@ -146,6 +146,7 @@ void host1x_syncpt_save(struct host1x *host)
146u32 host1x_syncpt_load(struct host1x_syncpt *sp) 146u32 host1x_syncpt_load(struct host1x_syncpt *sp)
147{ 147{
148 u32 val; 148 u32 val;
149
149 val = host1x_hw_syncpt_load(sp->host, sp); 150 val = host1x_hw_syncpt_load(sp->host, sp);
150 trace_host1x_syncpt_load_min(sp->id, val); 151 trace_host1x_syncpt_load_min(sp->id, val);
151 152
@@ -158,6 +159,7 @@ u32 host1x_syncpt_load(struct host1x_syncpt *sp)
158u32 host1x_syncpt_load_wait_base(struct host1x_syncpt *sp) 159u32 host1x_syncpt_load_wait_base(struct host1x_syncpt *sp)
159{ 160{
160 u32 val; 161 u32 val;
162
161 host1x_hw_syncpt_load_wait_base(sp->host, sp); 163 host1x_hw_syncpt_load_wait_base(sp->host, sp);
162 val = sp->base_val; 164 val = sp->base_val;
163 return val; 165 return val;
@@ -279,6 +281,7 @@ bool host1x_syncpt_is_expired(struct host1x_syncpt *sp, u32 thresh)
279{ 281{
280 u32 current_val; 282 u32 current_val;
281 u32 future_val; 283 u32 future_val;
284
282 smp_rmb(); 285 smp_rmb();
283 current_val = (u32)atomic_read(&sp->min_val); 286 current_val = (u32)atomic_read(&sp->min_val);
284 future_val = (u32)atomic_read(&sp->max_val); 287 future_val = (u32)atomic_read(&sp->max_val);
@@ -408,7 +411,7 @@ void host1x_syncpt_deinit(struct host1x *host)
408/* 411/*
409 * Read max. It indicates how many operations there are in queue, either in 412 * Read max. It indicates how many operations there are in queue, either in
410 * channel or in a software thread. 413 * channel or in a software thread.
411 * */ 414 */
412u32 host1x_syncpt_read_max(struct host1x_syncpt *sp) 415u32 host1x_syncpt_read_max(struct host1x_syncpt *sp)
413{ 416{
414 smp_rmb(); 417 smp_rmb();