diff options
author | Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> | 2009-06-10 00:38:48 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-06-14 23:26:20 -0400 |
commit | d3352c9f1e8e2f2989d9686c8aa8acb4842fe75e (patch) | |
tree | ea8a18d573a45f913d9e0669a17a0b39835e55ff /drivers/block | |
parent | 56ac72dba5d24a477d281b985797d5e62d3f5c2e (diff) |
ps3fb/vram: Extract common GPU stuff into <asm/ps3gpu.h>
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: linux-fbdev-devel@lists.sourceforge.net
Cc: Jim Paris <jim@jtan.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/ps3vram.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c index 83c14533aea5..2c2ea9cb207b 100644 --- a/drivers/block/ps3vram.c +++ b/drivers/block/ps3vram.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <asm/iommu.h> | 17 | #include <asm/iommu.h> |
18 | #include <asm/lv1call.h> | 18 | #include <asm/lv1call.h> |
19 | #include <asm/ps3.h> | 19 | #include <asm/ps3.h> |
20 | #include <asm/ps3gpu.h> | ||
20 | 21 | ||
21 | 22 | ||
22 | #define DEVICE_NAME "ps3vram" | 23 | #define DEVICE_NAME "ps3vram" |
@@ -46,8 +47,6 @@ | |||
46 | #define NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN 0x0000030c | 47 | #define NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN 0x0000030c |
47 | #define NV_MEMORY_TO_MEMORY_FORMAT_NOTIFY 0x00000104 | 48 | #define NV_MEMORY_TO_MEMORY_FORMAT_NOTIFY 0x00000104 |
48 | 49 | ||
49 | #define L1GPU_CONTEXT_ATTRIBUTE_FB_BLIT 0x601 | ||
50 | |||
51 | #define CACHE_PAGE_PRESENT 1 | 50 | #define CACHE_PAGE_PRESENT 1 |
52 | #define CACHE_PAGE_DIRTY 2 | 51 | #define CACHE_PAGE_DIRTY 2 |
53 | 52 | ||
@@ -184,13 +183,10 @@ static void ps3vram_rewind_ring(struct ps3_system_bus_device *dev) | |||
184 | priv->ctrl[CTRL_PUT] = FIFO_BASE + FIFO_OFFSET; | 183 | priv->ctrl[CTRL_PUT] = FIFO_BASE + FIFO_OFFSET; |
185 | 184 | ||
186 | /* asking the HV for a blit will kick the FIFO */ | 185 | /* asking the HV for a blit will kick the FIFO */ |
187 | status = lv1_gpu_context_attribute(priv->context_handle, | 186 | status = lv1_gpu_fb_blit(priv->context_handle, 0, 0, 0, 0); |
188 | L1GPU_CONTEXT_ATTRIBUTE_FB_BLIT, 0, | ||
189 | 0, 0, 0); | ||
190 | if (status) | 187 | if (status) |
191 | dev_err(&dev->core, | 188 | dev_err(&dev->core, "%s: lv1_gpu_fb_blit failed %d\n", |
192 | "%s: lv1_gpu_context_attribute failed %d\n", __func__, | 189 | __func__, status); |
193 | status); | ||
194 | 190 | ||
195 | priv->fifo_ptr = priv->fifo_base; | 191 | priv->fifo_ptr = priv->fifo_base; |
196 | } | 192 | } |
@@ -206,13 +202,10 @@ static void ps3vram_fire_ring(struct ps3_system_bus_device *dev) | |||
206 | (priv->fifo_ptr - priv->fifo_base) * sizeof(u32); | 202 | (priv->fifo_ptr - priv->fifo_base) * sizeof(u32); |
207 | 203 | ||
208 | /* asking the HV for a blit will kick the FIFO */ | 204 | /* asking the HV for a blit will kick the FIFO */ |
209 | status = lv1_gpu_context_attribute(priv->context_handle, | 205 | status = lv1_gpu_fb_blit(priv->context_handle, 0, 0, 0, 0); |
210 | L1GPU_CONTEXT_ATTRIBUTE_FB_BLIT, 0, | ||
211 | 0, 0, 0); | ||
212 | if (status) | 206 | if (status) |
213 | dev_err(&dev->core, | 207 | dev_err(&dev->core, "%s: lv1_gpu_fb_blit failed %d\n", |
214 | "%s: lv1_gpu_context_attribute failed %d\n", __func__, | 208 | __func__, status); |
215 | status); | ||
216 | 209 | ||
217 | if ((priv->fifo_ptr - priv->fifo_base) * sizeof(u32) > | 210 | if ((priv->fifo_ptr - priv->fifo_base) * sizeof(u32) > |
218 | FIFO_SIZE - 1024) { | 211 | FIFO_SIZE - 1024) { |