diff options
Diffstat (limited to 'drivers/video/sunxvr2500.c')
-rw-r--r-- | drivers/video/sunxvr2500.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/video/sunxvr2500.c b/drivers/video/sunxvr2500.c index 4316c7fe8e21..c3869a96ab58 100644 --- a/drivers/video/sunxvr2500.c +++ b/drivers/video/sunxvr2500.c | |||
@@ -28,7 +28,7 @@ struct s3d_info { | |||
28 | unsigned int depth; | 28 | unsigned int depth; |
29 | unsigned int fb_size; | 29 | unsigned int fb_size; |
30 | 30 | ||
31 | u32 pseudo_palette[256]; | 31 | u32 pseudo_palette[16]; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | static int __devinit s3d_get_props(struct s3d_info *sp) | 34 | static int __devinit s3d_get_props(struct s3d_info *sp) |
@@ -52,15 +52,14 @@ static int s3d_setcolreg(unsigned regno, | |||
52 | { | 52 | { |
53 | u32 value; | 53 | u32 value; |
54 | 54 | ||
55 | if (regno >= 256) | 55 | if (regno < 16) { |
56 | return 1; | 56 | red >>= 8; |
57 | green >>= 8; | ||
58 | blue >>= 8; | ||
57 | 59 | ||
58 | red >>= 8; | 60 | value = (blue << 24) | (green << 16) | (red << 8); |
59 | green >>= 8; | 61 | ((u32 *)info->pseudo_palette)[regno] = value; |
60 | blue >>= 8; | 62 | } |
61 | |||
62 | value = (blue << 24) | (green << 16) | (red << 8); | ||
63 | ((u32 *)info->pseudo_palette)[regno] = value; | ||
64 | 63 | ||
65 | return 0; | 64 | return 0; |
66 | } | 65 | } |