diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2013-03-22 10:34:03 -0400 |
---|---|---|
committer | Thierry Reding <thierry.reding@avionic-design.de> | 2013-04-22 06:32:43 -0400 |
commit | 6579324a41cc414009a601738b70a53d6376325c (patch) | |
tree | 61b3491351217d07ff75851c6d989bf02b213383 /drivers/gpu/host1x/dev.c | |
parent | 7ede0b0bf3e2595d40d6195b6fe4c4dcef438830 (diff) |
gpu: host1x: Add channel support
Add support for host1x client modules, and host1x channels to submit
work to the clients.
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.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c index b967f6e8df55..4e522c532bc8 100644 --- a/drivers/gpu/host1x/dev.c +++ b/drivers/gpu/host1x/dev.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include "dev.h" | 30 | #include "dev.h" |
31 | #include "intr.h" | 31 | #include "intr.h" |
32 | #include "channel.h" | ||
32 | #include "hw/host1x01.h" | 33 | #include "hw/host1x01.h" |
33 | 34 | ||
34 | void host1x_sync_writel(struct host1x *host1x, u32 v, u32 r) | 35 | void host1x_sync_writel(struct host1x *host1x, u32 v, u32 r) |
@@ -45,6 +46,16 @@ u32 host1x_sync_readl(struct host1x *host1x, u32 r) | |||
45 | return readl(sync_regs + r); | 46 | return readl(sync_regs + r); |
46 | } | 47 | } |
47 | 48 | ||
49 | void host1x_ch_writel(struct host1x_channel *ch, u32 v, u32 r) | ||
50 | { | ||
51 | writel(v, ch->regs + r); | ||
52 | } | ||
53 | |||
54 | u32 host1x_ch_readl(struct host1x_channel *ch, u32 r) | ||
55 | { | ||
56 | return readl(ch->regs + r); | ||
57 | } | ||
58 | |||
48 | static const struct host1x_info host1x01_info = { | 59 | static const struct host1x_info host1x01_info = { |
49 | .nb_channels = 8, | 60 | .nb_channels = 8, |
50 | .nb_pts = 32, | 61 | .nb_pts = 32, |
@@ -112,6 +123,12 @@ static int host1x_probe(struct platform_device *pdev) | |||
112 | return err; | 123 | return err; |
113 | } | 124 | } |
114 | 125 | ||
126 | err = host1x_channel_list_init(host); | ||
127 | if (err) { | ||
128 | dev_err(&pdev->dev, "failed to initialize channel list\n"); | ||
129 | return err; | ||
130 | } | ||
131 | |||
115 | err = clk_prepare_enable(host->clk); | 132 | err = clk_prepare_enable(host->clk); |
116 | if (err < 0) { | 133 | if (err < 0) { |
117 | dev_err(&pdev->dev, "failed to enable clock\n"); | 134 | dev_err(&pdev->dev, "failed to enable clock\n"); |