aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/host1x/dev.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2013-03-22 10:34:02 -0400
committerThierry Reding <thierry.reding@avionic-design.de>2013-04-22 06:32:42 -0400
commit7ede0b0bf3e2595d40d6195b6fe4c4dcef438830 (patch)
treeeb59a94a3892bd41ae810b1726f7e7ae9de96812 /drivers/gpu/host1x/dev.c
parent754716874389ccbea5ee03174df8ad9e72e41880 (diff)
gpu: host1x: Add syncpoint wait and interrupts
Add support for sync point interrupts, and sync point wait. Sync point wait used interrupts for unblocking wait. Signed-off-by: Arto Merilainen <amerilainen@nvidia.com> Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Diffstat (limited to 'drivers/gpu/host1x/dev.c')
-rw-r--r--drivers/gpu/host1x/dev.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
index 0d6002cb67c1..b967f6e8df55 100644
--- a/drivers/gpu/host1x/dev.c
+++ b/drivers/gpu/host1x/dev.c
@@ -28,6 +28,7 @@
28#include <trace/events/host1x.h> 28#include <trace/events/host1x.h>
29 29
30#include "dev.h" 30#include "dev.h"
31#include "intr.h"
31#include "hw/host1x01.h" 32#include "hw/host1x01.h"
32 33
33void host1x_sync_writel(struct host1x *host1x, u32 v, u32 r) 34void host1x_sync_writel(struct host1x *host1x, u32 v, u32 r)
@@ -123,13 +124,24 @@ static int host1x_probe(struct platform_device *pdev)
123 return err; 124 return err;
124 } 125 }
125 126
127 err = host1x_intr_init(host, syncpt_irq);
128 if (err) {
129 dev_err(&pdev->dev, "failed to initialize interrupts\n");
130 goto fail_deinit_syncpt;
131 }
132
126 return 0; 133 return 0;
134
135fail_deinit_syncpt:
136 host1x_syncpt_deinit(host);
137 return err;
127} 138}
128 139
129static int __exit host1x_remove(struct platform_device *pdev) 140static int __exit host1x_remove(struct platform_device *pdev)
130{ 141{
131 struct host1x *host = platform_get_drvdata(pdev); 142 struct host1x *host = platform_get_drvdata(pdev);
132 143
144 host1x_intr_deinit(host);
133 host1x_syncpt_deinit(host); 145 host1x_syncpt_deinit(host);
134 clk_disable_unprepare(host->clk); 146 clk_disable_unprepare(host->clk);
135 147