summaryrefslogtreecommitdiffstats
path: root/drivers/video/ps3fb.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>2009-06-10 04:38:49 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-06-15 13:26:21 +1000
commitc204ff65590837e6a9c50ca549497b4682682ec6 (patch)
tree8ba43efed25b4c7945f5e8e12b684b92e97f1a72 /drivers/video/ps3fb.c
parentd3352c9f1e8e2f2989d9686c8aa8acb4842fe75e (diff)
downloadop-kernel-dev-c204ff65590837e6a9c50ca549497b4682682ec6.zip
op-kernel-dev-c204ff65590837e6a9c50ca549497b4682682ec6.tar.gz
ps3fb: Tear down FB setup during cleanup
During cleanup, use L1GPU_CONTEXT_ATTRIBUTE_FB_CLOSE to tear down the setup done by L1GPU_CONTEXT_ATTRIBUTE_FB_SETUP. This allows unloading and reloading of ps3fb while the sound driver keeps the GPU open. Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: linux-fbdev-devel@lists.sourceforge.net Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/video/ps3fb.c')
-rw-r--r--drivers/video/ps3fb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/ps3fb.c b/drivers/video/ps3fb.c
index 13c876c..1baa1c9 100644
--- a/drivers/video/ps3fb.c
+++ b/drivers/video/ps3fb.c
@@ -1123,7 +1123,7 @@ static int __devinit ps3fb_probe(struct ps3_system_bus_device *dev)
info = framebuffer_alloc(sizeof(struct ps3fb_par), &dev->core);
if (!info)
- goto err_context_unmap;
+ goto err_context_fb_close;
par = info->par;
par->mode_id = ~ps3fb_mode; /* != ps3fb_mode, to trigger change */
@@ -1188,6 +1188,8 @@ err_fb_dealloc:
fb_dealloc_cmap(&info->cmap);
err_framebuffer_release:
framebuffer_release(info);
+err_context_fb_close:
+ lv1_gpu_fb_close(ps3fb.context_handle);
err_context_unmap:
lv1_gpu_context_iomap(ps3fb.context_handle, GPU_IOIF, xdr_lpar,
ps3fb_videomemory.size, CBE_IOPTE_M);
@@ -1233,6 +1235,7 @@ static int ps3fb_shutdown(struct ps3_system_bus_device *dev)
info = dev->core.driver_data = NULL;
}
iounmap((u8 __force __iomem *)ps3fb.dinfo);
+ lv1_gpu_fb_close(ps3fb.context_handle);
lv1_gpu_context_iomap(ps3fb.context_handle, GPU_IOIF, xdr_lpar,
ps3fb_videomemory.size, CBE_IOPTE_M);
lv1_gpu_context_free(ps3fb.context_handle);
OpenPOWER on IntegriCloud