diff options
author | Thierry Reding <treding@nvidia.com> | 2013-11-08 05:41:42 -0500 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2013-12-19 03:29:50 -0500 |
commit | fae798a156f84d0d835b5d18480abbcad902fe0e (patch) | |
tree | 8529c9ee4c0876417d9e12de11fe109f841573bd | |
parent | 4de6a2d6acb0e2a840f07db17def7e674b9d2bb4 (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.c | 2 | ||||
-rw-r--r-- | drivers/gpu/host1x/channel.c | 5 | ||||
-rw-r--r-- | drivers/gpu/host1x/job.c | 6 | ||||
-rw-r--r-- | drivers/gpu/host1x/syncpt.c | 9 |
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 | } |
191 | EXPORT_SYMBOL(host1x_device_init); | ||
191 | 192 | ||
192 | int host1x_device_exit(struct host1x_device *device) | 193 | int 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 | } |
217 | EXPORT_SYMBOL(host1x_device_exit); | ||
216 | 218 | ||
217 | static int host1x_register_client(struct host1x *host1x, | 219 | static 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 | } |
46 | EXPORT_SYMBOL(host1x_job_submit); | ||
46 | 47 | ||
47 | struct host1x_channel *host1x_channel_get(struct host1x_channel *channel) | 48 | struct 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 | } |
64 | EXPORT_SYMBOL(host1x_channel_get); | ||
63 | 65 | ||
64 | void host1x_channel_put(struct host1x_channel *channel) | 66 | void 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 | } |
81 | EXPORT_SYMBOL(host1x_channel_put); | ||
79 | 82 | ||
80 | struct host1x_channel *host1x_channel_request(struct device *dev) | 83 | struct 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 | } |
121 | EXPORT_SYMBOL(host1x_channel_request); | ||
118 | 122 | ||
119 | void host1x_channel_free(struct host1x_channel *channel) | 123 | void 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 | } |
131 | EXPORT_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 | } |
78 | EXPORT_SYMBOL(host1x_job_alloc); | ||
78 | 79 | ||
79 | struct host1x_job *host1x_job_get(struct host1x_job *job) | 80 | struct 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 | } |
85 | EXPORT_SYMBOL(host1x_job_get); | ||
84 | 86 | ||
85 | static void job_free(struct kref *ref) | 87 | static 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 | } |
98 | EXPORT_SYMBOL(host1x_job_put); | ||
96 | 99 | ||
97 | void host1x_job_add_gather(struct host1x_job *job, struct host1x_bo *bo, | 100 | void 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 | } |
110 | EXPORT_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 | } |
567 | EXPORT_SYMBOL(host1x_job_pin); | ||
563 | 568 | ||
564 | void host1x_job_unpin(struct host1x_job *job) | 569 | void 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 | } |
585 | EXPORT_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 | } |
96 | EXPORT_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 | } |
172 | EXPORT_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 | } |
382 | EXPORT_SYMBOL(host1x_syncpt_request); | ||
380 | 383 | ||
381 | void host1x_syncpt_free(struct host1x_syncpt *sp) | 384 | void 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 | } |
396 | EXPORT_SYMBOL(host1x_syncpt_free); | ||
393 | 397 | ||
394 | void host1x_syncpt_deinit(struct host1x *host) | 398 | void 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 | } |
415 | EXPORT_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 | } |
425 | EXPORT_SYMBOL(host1x_syncpt_read_min); | ||
420 | 426 | ||
421 | int host1x_syncpt_nb_pts(struct host1x *host) | 427 | int 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 | } |
448 | EXPORT_SYMBOL(host1x_syncpt_get); | ||
442 | 449 | ||
443 | struct host1x_syncpt_base *host1x_syncpt_get_base(struct host1x_syncpt *sp) | 450 | struct 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 | } |
454 | EXPORT_SYMBOL(host1x_syncpt_get_base); | ||
447 | 455 | ||
448 | u32 host1x_syncpt_base_id(struct host1x_syncpt_base *base) | 456 | u32 host1x_syncpt_base_id(struct host1x_syncpt_base *base) |
449 | { | 457 | { |
450 | return base->id; | 458 | return base->id; |
451 | } | 459 | } |
460 | EXPORT_SYMBOL(host1x_syncpt_base_id); | ||