diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2009-09-22 16:47:28 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 07:39:53 -0700 |
commit | 5016af53ebbd1450c2656c94dfbd1dad15c19f60 (patch) | |
tree | 96c6ec0f311d0ce8ff5b0b2e963814dd12632e71 /drivers/video/via/accel.c | |
parent | afbd3c12aca5a29f1627c0c68e6bc77f32459935 (diff) | |
download | blackbird-op-linux-5016af53ebbd1450c2656c94dfbd1dad15c19f60.tar.gz blackbird-op-linux-5016af53ebbd1450c2656c94dfbd1dad15c19f60.zip |
viafb: cleanup viafb_cursor
Clean the hardware cursor handling up.
The most notable change is that it no longer buffers the values in
viacursor but uses the ones in cursor instead as they are guaranteed to be
always valid.
Furthermore it uses local instead global variables where possible, moves
the cursor variable in shared as only one hardware cursor is supported and
returns an error if memory allocation fails. Last but not least it fixes
a too small buffer (as u32 has only 4 and not 32 bytes) but this did not
produce any known problems.
This is mostly a code cleanup, no negative runtime changes are 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/accel.c')
-rw-r--r-- | drivers/video/via/accel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/via/accel.c b/drivers/video/via/accel.c index 8ac02515a18d..503f9d8e5bd0 100644 --- a/drivers/video/via/accel.c +++ b/drivers/video/via/accel.c @@ -331,7 +331,7 @@ void viafb_init_accel(struct viafb_shared *shared) } viaparinfo->fbmem_free -= CURSOR_SIZE; - viaparinfo->cursor_start = viaparinfo->fbmem_free; + shared->cursor_vram_addr = viaparinfo->fbmem_free; viaparinfo->fbmem_used += CURSOR_SIZE; /* Reverse 8*1024 memory space for cursor image */ @@ -487,7 +487,7 @@ void viafb_init_2d_engine(void) void viafb_hw_cursor_init(void) { /* Set Cursor Image Base Address */ - writel(viaparinfo->cursor_start, + writel(viaparinfo->shared->cursor_vram_addr, viaparinfo->io_virt + VIA_REG_CURSOR_MODE); writel(0x0, viaparinfo->io_virt + VIA_REG_CURSOR_POS); writel(0x0, viaparinfo->io_virt + VIA_REG_CURSOR_ORG); |