aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2013-11-08 05:41:42 -0500
committerThierry Reding <treding@nvidia.com>2013-12-19 03:29:50 -0500
commitfae798a156f84d0d835b5d18480abbcad902fe0e (patch)
tree8529c9ee4c0876417d9e12de11fe109f841573bd
parent4de6a2d6acb0e2a840f07db17def7e674b9d2bb4 (diff)
gpu: host1x: Export public API
Make the public API symbols visible so that depending drivers can be built as a module. Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--drivers/gpu/host1x/bus.c2
-rw-r--r--drivers/gpu/host1x/channel.c5
-rw-r--r--drivers/gpu/host1x/job.c6
-rw-r--r--drivers/gpu/host1x/syncpt.c9
4 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/bus.c b/drivers/gpu/host1x/bus.c
index 6a929591aa73..ccdd2e6da5e3 100644
--- a/drivers/gpu/host1x/bus.c
+++ b/drivers/gpu/host1x/bus.c
@@ -188,6 +188,7 @@ int host1x_device_init(struct host1x_device *device)
188 188
189 return 0; 189 return 0;
190} 190}
191EXPORT_SYMBOL(host1x_device_init);
191 192
192int host1x_device_exit(struct host1x_device *device) 193int host1x_device_exit(struct host1x_device *device)
193{ 194{
@@ -213,6 +214,7 @@ int host1x_device_exit(struct host1x_device *device)
213 214
214 return 0; 215 return 0;
215} 216}
217EXPORT_SYMBOL(host1x_device_exit);
216 218
217static int host1x_register_client(struct host1x *host1x, 219static int host1x_register_client(struct host1x *host1x,
218 struct host1x_client *client) 220 struct host1x_client *client)
diff --git a/drivers/gpu/host1x/channel.c b/drivers/gpu/host1x/channel.c
index 83ea51b9f0fc..b4ae3affb987 100644
--- a/drivers/gpu/host1x/channel.c
+++ b/drivers/gpu/host1x/channel.c
@@ -43,6 +43,7 @@ int host1x_job_submit(struct host1x_job *job)
43 43
44 return host1x_hw_channel_submit(host, job); 44 return host1x_hw_channel_submit(host, job);
45} 45}
46EXPORT_SYMBOL(host1x_job_submit);
46 47
47struct host1x_channel *host1x_channel_get(struct host1x_channel *channel) 48struct host1x_channel *host1x_channel_get(struct host1x_channel *channel)
48{ 49{
@@ -60,6 +61,7 @@ struct host1x_channel *host1x_channel_get(struct host1x_channel *channel)
60 61
61 return err ? NULL : channel; 62 return err ? NULL : channel;
62} 63}
64EXPORT_SYMBOL(host1x_channel_get);
63 65
64void host1x_channel_put(struct host1x_channel *channel) 66void host1x_channel_put(struct host1x_channel *channel)
65{ 67{
@@ -76,6 +78,7 @@ void host1x_channel_put(struct host1x_channel *channel)
76 78
77 mutex_unlock(&channel->reflock); 79 mutex_unlock(&channel->reflock);
78} 80}
81EXPORT_SYMBOL(host1x_channel_put);
79 82
80struct host1x_channel *host1x_channel_request(struct device *dev) 83struct host1x_channel *host1x_channel_request(struct device *dev)
81{ 84{
@@ -115,6 +118,7 @@ fail:
115 mutex_unlock(&host->chlist_mutex); 118 mutex_unlock(&host->chlist_mutex);
116 return NULL; 119 return NULL;
117} 120}
121EXPORT_SYMBOL(host1x_channel_request);
118 122
119void host1x_channel_free(struct host1x_channel *channel) 123void host1x_channel_free(struct host1x_channel *channel)
120{ 124{
@@ -124,3 +128,4 @@ void host1x_channel_free(struct host1x_channel *channel)
124 list_del(&channel->list); 128 list_del(&channel->list);
125 kfree(channel); 129 kfree(channel);
126} 130}
131EXPORT_SYMBOL(host1x_channel_free);
diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index de5ec333ce1a..1146e3bba6e1 100644
--- a/drivers/gpu/host1x/job.c
+++ b/drivers/gpu/host1x/job.c
@@ -75,12 +75,14 @@ struct host1x_job *host1x_job_alloc(struct host1x_channel *ch,
75 75
76 return job; 76 return job;
77} 77}
78EXPORT_SYMBOL(host1x_job_alloc);
78 79
79struct host1x_job *host1x_job_get(struct host1x_job *job) 80struct host1x_job *host1x_job_get(struct host1x_job *job)
80{ 81{
81 kref_get(&job->ref); 82 kref_get(&job->ref);
82 return job; 83 return job;
83} 84}
85EXPORT_SYMBOL(host1x_job_get);
84 86
85static void job_free(struct kref *ref) 87static void job_free(struct kref *ref)
86{ 88{
@@ -93,6 +95,7 @@ void host1x_job_put(struct host1x_job *job)
93{ 95{
94 kref_put(&job->ref, job_free); 96 kref_put(&job->ref, job_free);
95} 97}
98EXPORT_SYMBOL(host1x_job_put);
96 99
97void host1x_job_add_gather(struct host1x_job *job, struct host1x_bo *bo, 100void host1x_job_add_gather(struct host1x_job *job, struct host1x_bo *bo,
98 u32 words, u32 offset) 101 u32 words, u32 offset)
@@ -104,6 +107,7 @@ void host1x_job_add_gather(struct host1x_job *job, struct host1x_bo *bo,
104 cur_gather->offset = offset; 107 cur_gather->offset = offset;
105 job->num_gathers++; 108 job->num_gathers++;
106} 109}
110EXPORT_SYMBOL(host1x_job_add_gather);
107 111
108/* 112/*
109 * NULL an already satisfied WAIT_SYNCPT host method, by patching its 113 * NULL an already satisfied WAIT_SYNCPT host method, by patching its
@@ -560,6 +564,7 @@ out:
560 564
561 return err; 565 return err;
562} 566}
567EXPORT_SYMBOL(host1x_job_pin);
563 568
564void host1x_job_unpin(struct host1x_job *job) 569void host1x_job_unpin(struct host1x_job *job)
565{ 570{
@@ -577,6 +582,7 @@ void host1x_job_unpin(struct host1x_job *job)
577 job->gather_copy_mapped, 582 job->gather_copy_mapped,
578 job->gather_copy); 583 job->gather_copy);
579} 584}
585EXPORT_SYMBOL(host1x_job_unpin);
580 586
581/* 587/*
582 * Debug routine used to dump job entries 588 * Debug routine used to dump job entries
diff --git a/drivers/gpu/host1x/syncpt.c b/drivers/gpu/host1x/syncpt.c
index 159c479829c9..bfb09d802abd 100644
--- a/drivers/gpu/host1x/syncpt.c
+++ b/drivers/gpu/host1x/syncpt.c
@@ -93,6 +93,7 @@ u32 host1x_syncpt_id(struct host1x_syncpt *sp)
93{ 93{
94 return sp->id; 94 return sp->id;
95} 95}
96EXPORT_SYMBOL(host1x_syncpt_id);
96 97
97/* 98/*
98 * Updates the value sent to hardware. 99 * Updates the value sent to hardware.
@@ -168,6 +169,7 @@ int host1x_syncpt_incr(struct host1x_syncpt *sp)
168{ 169{
169 return host1x_hw_syncpt_cpu_incr(sp->host, sp); 170 return host1x_hw_syncpt_cpu_incr(sp->host, sp);
170} 171}
172EXPORT_SYMBOL(host1x_syncpt_incr);
171 173
172/* 174/*
173 * Updated sync point form hardware, and returns true if syncpoint is expired, 175 * Updated sync point form hardware, and returns true if syncpoint is expired,
@@ -377,6 +379,7 @@ struct host1x_syncpt *host1x_syncpt_request(struct device *dev,
377 struct host1x *host = dev_get_drvdata(dev->parent); 379 struct host1x *host = dev_get_drvdata(dev->parent);
378 return host1x_syncpt_alloc(host, dev, flags); 380 return host1x_syncpt_alloc(host, dev, flags);
379} 381}
382EXPORT_SYMBOL(host1x_syncpt_request);
380 383
381void host1x_syncpt_free(struct host1x_syncpt *sp) 384void host1x_syncpt_free(struct host1x_syncpt *sp)
382{ 385{
@@ -390,6 +393,7 @@ void host1x_syncpt_free(struct host1x_syncpt *sp)
390 sp->name = NULL; 393 sp->name = NULL;
391 sp->client_managed = false; 394 sp->client_managed = false;
392} 395}
396EXPORT_SYMBOL(host1x_syncpt_free);
393 397
394void host1x_syncpt_deinit(struct host1x *host) 398void host1x_syncpt_deinit(struct host1x *host)
395{ 399{
@@ -408,6 +412,7 @@ u32 host1x_syncpt_read_max(struct host1x_syncpt *sp)
408 smp_rmb(); 412 smp_rmb();
409 return (u32)atomic_read(&sp->max_val); 413 return (u32)atomic_read(&sp->max_val);
410} 414}
415EXPORT_SYMBOL(host1x_syncpt_read_max);
411 416
412/* 417/*
413 * Read min, which is a shadow of the current sync point value in hardware. 418 * Read min, which is a shadow of the current sync point value in hardware.
@@ -417,6 +422,7 @@ u32 host1x_syncpt_read_min(struct host1x_syncpt *sp)
417 smp_rmb(); 422 smp_rmb();
418 return (u32)atomic_read(&sp->min_val); 423 return (u32)atomic_read(&sp->min_val);
419} 424}
425EXPORT_SYMBOL(host1x_syncpt_read_min);
420 426
421int host1x_syncpt_nb_pts(struct host1x *host) 427int host1x_syncpt_nb_pts(struct host1x *host)
422{ 428{
@@ -439,13 +445,16 @@ struct host1x_syncpt *host1x_syncpt_get(struct host1x *host, u32 id)
439 return NULL; 445 return NULL;
440 return host->syncpt + id; 446 return host->syncpt + id;
441} 447}
448EXPORT_SYMBOL(host1x_syncpt_get);
442 449
443struct host1x_syncpt_base *host1x_syncpt_get_base(struct host1x_syncpt *sp) 450struct host1x_syncpt_base *host1x_syncpt_get_base(struct host1x_syncpt *sp)
444{ 451{
445 return sp ? sp->base : NULL; 452 return sp ? sp->base : NULL;
446} 453}
454EXPORT_SYMBOL(host1x_syncpt_get_base);
447 455
448u32 host1x_syncpt_base_id(struct host1x_syncpt_base *base) 456u32 host1x_syncpt_base_id(struct host1x_syncpt_base *base)
449{ 457{
450 return base->id; 458 return base->id;
451} 459}
460EXPORT_SYMBOL(host1x_syncpt_base_id);