aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/via/viafbdev.h
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2009-09-22 19:47:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 10:39:53 -0400
commit31de59d5e1cd6968ea9d1a19cceefb7a037e46bf (patch)
treef9a081a1c850cfc931af25c6d40fb3b55efb24b5 /drivers/video/via/viafbdev.h
parent2d6e8851f608bd0c811f2df83eeff4ad8631e723 (diff)
viafb: hardware acceleration initialization cleanup
The main motivation of this patch was to merge the three initialization functions in one and clean it up. However as some changes in other code areas where needed to do it right some small other changes were made. Changes to viafb_par: io_virt renamed as engine_mmio and moved to shared VQ_start renamed as vq_vram_addr and moved to shared VQ_end removed as it is easily recalculatable vq_vram_addr is not strictly needed but keep it to track where we allocated video memory. The memory allocated for the virtual queue was shrunk to VQ_SIZE as VQ_SIZE+CURSOR_SIZE looked like a bug to me. But to be honest I don't have the faintest idea what virtual queues are for in the graphic hardware and whether the driver needs them in any way. I only know that they aren't directly accessed by the driver and so the only potential current use would be as hardware internal buffers. For now keep them to avoid regressions and only remove the double cursor allocation. The most changes were caused by renames and the mentioned structure changes so the chance of regressions is pretty low. The meaning of viafb_accel changed slightly as previously it was changed back and forth in the code and allowed to enable the hardware acceleration by software if previously disabled. The new behaviour is that viafb_accel=0 always prevents hardware acceleration. With viafb_accel!=0 the acceleration can be freely choosen by set_var. This means viafb_accel is a diagnostic tool and if someone has to use viafb_accel=0 the driver needs to be fixed. As this is mostly a code cleanup no regressions beside the slightly change of viafb_accel is expected. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Scott Fang <ScottFang@viatech.com.cn> Cc: Joseph Chan <JosephChan@via.com.tw> Cc: Harald Welte <laforge@gnumonks.org> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/via/viafbdev.h')
-rw-r--r--drivers/video/via/viafbdev.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/video/via/viafbdev.h b/drivers/video/via/viafbdev.h
index 159619bc80b1..0c94d2441922 100644
--- a/drivers/video/via/viafbdev.h
+++ b/drivers/video/via/viafbdev.h
@@ -51,7 +51,9 @@ struct viafb_shared {
51 struct chip_information chip_info; 51 struct chip_information chip_info;
52 52
53 /* hardware acceleration stuff */ 53 /* hardware acceleration stuff */
54 void __iomem *engine_mmio;
54 u32 cursor_vram_addr; 55 u32 cursor_vram_addr;
56 u32 vq_vram_addr; /* virtual queue address in video ram */
55 int (*hw_bitblt)(void __iomem *engine, u8 op, u32 width, u32 height, 57 int (*hw_bitblt)(void __iomem *engine, u8 op, u32 width, u32 height,
56 u8 dst_bpp, u32 dst_addr, u32 dst_pitch, u32 dst_x, u32 dst_y, 58 u8 dst_bpp, u32 dst_addr, u32 dst_pitch, u32 dst_x, u32 dst_y,
57 u32 *src_mem, u32 src_addr, u32 src_pitch, u32 src_x, u32 src_y, 59 u32 *src_mem, u32 src_addr, u32 src_pitch, u32 src_x, u32 src_y,
@@ -61,13 +63,11 @@ struct viafb_shared {
61struct viafb_par { 63struct viafb_par {
62 u8 depth; 64 u8 depth;
63 u32 vram_addr; 65 u32 vram_addr;
64 void __iomem *io_virt; /*iospace virtual memory address */ 66
65 unsigned int fbmem; /*framebuffer physical memory address */ 67 unsigned int fbmem; /*framebuffer physical memory address */
66 unsigned int memsize; /*size of fbmem */ 68 unsigned int memsize; /*size of fbmem */
67 u32 fbmem_free; /* Free FB memory */ 69 u32 fbmem_free; /* Free FB memory */
68 u32 fbmem_used; /* Use FB memory size */ 70 u32 fbmem_used; /* Use FB memory size */
69 u32 VQ_start; /* Virtual Queue Start Address */
70 u32 VQ_end; /* Virtual Queue End Address */
71 u32 iga_path; 71 u32 iga_path;
72 72
73 struct viafb_shared *shared; 73 struct viafb_shared *shared;
@@ -90,7 +90,6 @@ extern int viafb_dual_fb;
90extern int viafb_LCD2_ON; 90extern int viafb_LCD2_ON;
91extern int viafb_LCD_ON; 91extern int viafb_LCD_ON;
92extern int viafb_DVI_ON; 92extern int viafb_DVI_ON;
93extern int viafb_accel;
94extern int viafb_hotplug; 93extern int viafb_hotplug;
95extern int viafb_memsize; 94extern int viafb_memsize;
96 95