From: Wu Zhangjin <wuzhangjin@gmail.com>
To: Simon Braunschmidt <sb@emlix.com>
Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: Re: [loongson-PATCH-v1 16/27] Add Siliconmotion 712 framebuffer driver
Date: Mon, 01 Jun 2009 15:41:30 +0800 [thread overview]
Message-ID: <1243842090.5760.175.camel@falcon> (raw)
In-Reply-To: <4A1FE338.5010802@emlix.com>
hi,
> As i have seen lots of functionality are guarded by
> #ifdef __BIG_ENDIAN
>
> Is there a way to setup a different mode than 1024x600 on
> kernel-commandline or from userspace, e.g. with fbset?
>
I just removed some of #ifdef __BIG_ENDIAN ... #endif, and tuned the
vesa_mode values, now, we can pass it in kernel-commandline like this:
vga=1024x600x24
the latest SMI video driver patch with this modification will be sent
out later, but you can get this one if you need it immediately:
>From 34e4afa8b64f794e4fef0dd622ef576dbfecc851 Mon Sep 17 00:00:00 2001
From: Wu Zhangjin <wuzj@lemote.com>
Date: Mon, 1 Jun 2009 15:31:26 +0800
Subject: [PATCH] enable the vga command line in SMI video driver
there is no need to define a screen_info again so remove it, because it
is defined in arch/mips/kernel/setup.c and not relative to big endian or
little endian, and here I think its better use something like
1024x600x24 than 0x318, so replace all of the magic numbers to an
understandable one.
Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
---
drivers/video/smi/smtcfb.c | 42
++++++++++++++++++------------------------
1 files changed, 18 insertions(+), 24 deletions(-)
diff --git a/drivers/video/smi/smtcfb.c b/drivers/video/smi/smtcfb.c
index ebc6371..4fe940b 100644
--- a/drivers/video/smi/smtcfb.c
+++ b/drivers/video/smi/smtcfb.c
@@ -52,10 +52,6 @@
#define smdbg(format, arg...)
#endif
-#ifdef __BIG_ENDIAN
-struct screen_info screen_info;
-#endif
-
/*
* Private structure
*/
@@ -96,32 +92,32 @@ struct par_info {
u8 chipRevID;
};
-#ifdef __BIG_ENDIAN
struct vesa_mode_table {
- char mode_index[6];
+ char mode_index[15];
u16 lfb_width;
u16 lfb_height;
u16 lfb_depth;
};
static struct vesa_mode_table vesa_mode[] = {
- {"0x301", 640, 480, 8},
- {"0x303", 800, 600, 8},
- {"0x305", 1024, 768, 8},
- {"0x307", 1280, 1024, 8},
-
- {"0x311", 640, 480, 16},
- {"0x314", 800, 600, 16},
- {"0x317", 1024, 768, 16},
- {"0x31A", 1280, 1024, 16},
-
- {"0x312", 640, 480, 24},
- {"0x315", 800, 600, 24},
- {"0x318", 1024, 768, 24},
- {"0x31B", 1280, 1024, 24},
-
+ {"640x480x8", 640, 480, 8},
+ {"800x480x8", 800, 480, 8},
+ {"800x600x8", 800, 600, 8},
+ {"1024x768x8", 1024, 768, 8},
+ {"1280x1024x8", 1280, 1024, 8},
+
+ {"640x480x16", 640, 480, 16},
+ {"800x480x16", 800, 480, 16},
+ {"800x600x16", 800, 600, 16},
+ {"1024x768x16", 1024, 768, 16},
+ {"1280x1024x16", 1280, 1024, 16},
+
+ {"640x480x24", 640, 480, 24},
+ {"800x480x24", 800, 480, 24},
+ {"800x600x24", 800, 600, 24},
+ {"1024x768x24", 1024, 768, 24},
+ {"1280x1024x24", 1280, 1024, 24},
};
-#endif
char __iomem *smtc_RegBaseAddress; /* Memory Map IO starting address */
char __iomem *smtc_VRAMBaseAddress; /* video memory starting address */
@@ -1100,7 +1096,6 @@ static int __init sm712be_setup(char *options)
__setup("sm712be=", sm712be_setup);
-#ifdef __BIG_ENDIAN
/*
* sm712vga_setup - process command line options, get vga parameter
* @options: string of options
@@ -1136,7 +1131,6 @@ static int __init sm712vga_setup(char *options)
}
__setup("vga=", sm712vga_setup);
-#endif
MODULE_AUTHOR("Siliconmotion ");
MODULE_DESCRIPTION("Framebuffer driver for SMI Graphic Cards");
--
1.6.0.4
with the support of this patch, the users of 7inch yeeloong and 8.9inch
yeeloong can use the same kernel(not totally, the shutdown logic is a
little different, a patch is also ready for it).
there is only a need to add such kernel command line for 7inch yeeloong:
vga=800x480x24
> What I currently do is
> picking appropriate values form the table VGAMode in smtcfb.h and
> hardcoding them.
>
> I tried 800x600x16bit@60hz, which worked also, but 1024x768x24bit@60hz
> left me with a corrupted display output (distored colors, missing
> regions), i did not check further wheter it also crashed.
>
no all of the Vesa mode is suitable to your screen, you should choose
one for you, for example, only 800x480 is suitable to yeeloong 7inch
screen, but the 8.9 inch yeeloong, need 1024x600.
best regards,
Wu Zhangjin
WARNING: multiple messages have this Message-ID (diff)
From: Wu Zhangjin <wuzhangjin@gmail.com>
To: Simon Braunschmidt <sb@emlix.com>
Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: Re: [loongson-PATCH-v1 16/27] Add Siliconmotion 712 framebuffer driver
Date: Mon, 01 Jun 2009 15:41:30 +0800 [thread overview]
Message-ID: <1243842090.5760.175.camel@falcon> (raw)
Message-ID: <20090601074130.sDmY49zUk4R4zkP0TiRjGRmsdIT3j0JcE0zb5Gfq10w@z> (raw)
In-Reply-To: <4A1FE338.5010802@emlix.com>
hi,
> As i have seen lots of functionality are guarded by
> #ifdef __BIG_ENDIAN
>
> Is there a way to setup a different mode than 1024x600 on
> kernel-commandline or from userspace, e.g. with fbset?
>
I just removed some of #ifdef __BIG_ENDIAN ... #endif, and tuned the
vesa_mode values, now, we can pass it in kernel-commandline like this:
vga=1024x600x24
the latest SMI video driver patch with this modification will be sent
out later, but you can get this one if you need it immediately:
From 34e4afa8b64f794e4fef0dd622ef576dbfecc851 Mon Sep 17 00:00:00 2001
From: Wu Zhangjin <wuzj@lemote.com>
Date: Mon, 1 Jun 2009 15:31:26 +0800
Subject: [PATCH] enable the vga command line in SMI video driver
there is no need to define a screen_info again so remove it, because it
is defined in arch/mips/kernel/setup.c and not relative to big endian or
little endian, and here I think its better use something like
1024x600x24 than 0x318, so replace all of the magic numbers to an
understandable one.
Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
---
drivers/video/smi/smtcfb.c | 42
++++++++++++++++++------------------------
1 files changed, 18 insertions(+), 24 deletions(-)
diff --git a/drivers/video/smi/smtcfb.c b/drivers/video/smi/smtcfb.c
index ebc6371..4fe940b 100644
--- a/drivers/video/smi/smtcfb.c
+++ b/drivers/video/smi/smtcfb.c
@@ -52,10 +52,6 @@
#define smdbg(format, arg...)
#endif
-#ifdef __BIG_ENDIAN
-struct screen_info screen_info;
-#endif
-
/*
* Private structure
*/
@@ -96,32 +92,32 @@ struct par_info {
u8 chipRevID;
};
-#ifdef __BIG_ENDIAN
struct vesa_mode_table {
- char mode_index[6];
+ char mode_index[15];
u16 lfb_width;
u16 lfb_height;
u16 lfb_depth;
};
static struct vesa_mode_table vesa_mode[] = {
- {"0x301", 640, 480, 8},
- {"0x303", 800, 600, 8},
- {"0x305", 1024, 768, 8},
- {"0x307", 1280, 1024, 8},
-
- {"0x311", 640, 480, 16},
- {"0x314", 800, 600, 16},
- {"0x317", 1024, 768, 16},
- {"0x31A", 1280, 1024, 16},
-
- {"0x312", 640, 480, 24},
- {"0x315", 800, 600, 24},
- {"0x318", 1024, 768, 24},
- {"0x31B", 1280, 1024, 24},
-
+ {"640x480x8", 640, 480, 8},
+ {"800x480x8", 800, 480, 8},
+ {"800x600x8", 800, 600, 8},
+ {"1024x768x8", 1024, 768, 8},
+ {"1280x1024x8", 1280, 1024, 8},
+
+ {"640x480x16", 640, 480, 16},
+ {"800x480x16", 800, 480, 16},
+ {"800x600x16", 800, 600, 16},
+ {"1024x768x16", 1024, 768, 16},
+ {"1280x1024x16", 1280, 1024, 16},
+
+ {"640x480x24", 640, 480, 24},
+ {"800x480x24", 800, 480, 24},
+ {"800x600x24", 800, 600, 24},
+ {"1024x768x24", 1024, 768, 24},
+ {"1280x1024x24", 1280, 1024, 24},
};
-#endif
char __iomem *smtc_RegBaseAddress; /* Memory Map IO starting address */
char __iomem *smtc_VRAMBaseAddress; /* video memory starting address */
@@ -1100,7 +1096,6 @@ static int __init sm712be_setup(char *options)
__setup("sm712be=", sm712be_setup);
-#ifdef __BIG_ENDIAN
/*
* sm712vga_setup - process command line options, get vga parameter
* @options: string of options
@@ -1136,7 +1131,6 @@ static int __init sm712vga_setup(char *options)
}
__setup("vga=", sm712vga_setup);
-#endif
MODULE_AUTHOR("Siliconmotion ");
MODULE_DESCRIPTION("Framebuffer driver for SMI Graphic Cards");
--
1.6.0.4
with the support of this patch, the users of 7inch yeeloong and 8.9inch
yeeloong can use the same kernel(not totally, the shutdown logic is a
little different, a patch is also ready for it).
there is only a need to add such kernel command line for 7inch yeeloong:
vga=800x480x24
> What I currently do is
> picking appropriate values form the table VGAMode in smtcfb.h and
> hardcoding them.
>
> I tried 800x600x16bit@60hz, which worked also, but 1024x768x24bit@60hz
> left me with a corrupted display output (distored colors, missing
> regions), i did not check further wheter it also crashed.
>
no all of the Vesa mode is suitable to your screen, you should choose
one for you, for example, only 800x480 is suitable to yeeloong 7inch
screen, but the 8.9 inch yeeloong, need 1024x600.
best regards,
Wu Zhangjin
next prev parent reply other threads:[~2009-06-01 7:41 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-20 21:48 [loongson-PATCH-v1 00/27] linux patches of loongson-based machines wuzhangjin
2009-05-20 21:49 ` [loongson-PATCH-v1 01/27] fix-warning: incompatible argument type of pci_fixup_irqs wuzhangjin
2009-05-20 22:11 ` David Daney
2009-05-20 23:20 ` Wu Zhangjin
2009-05-21 8:13 ` Ralf Baechle
2009-05-20 21:49 ` [loongson-PATCH-v1 02/27] fix-warning: incompatible argument type of virt_to_phys wuzhangjin
2009-05-21 8:06 ` Ralf Baechle
2009-05-20 21:50 ` [loongson-PATCH-v1 03/27] fix-error: incompatiable argument type of clear_user wuzhangjin
2009-05-21 7:51 ` Ralf Baechle
2009-05-20 21:50 ` [loongson-PATCH-v1 04/27] change the naming methods wuzhangjin
2009-05-20 21:50 ` [loongson-PATCH-v1 05/27] remove reference to bonito64.h wuzhangjin
2009-05-20 21:51 ` [loongson-PATCH-v1 06/27] divide the files to the smallest logic unit wuzhangjin
2009-05-20 21:51 ` [loongson-PATCH-v1 07/27] replace tons of magic numbers by understandable symbols wuzhangjin
2009-05-20 21:52 ` [loongson-PATCH-v1 08/27] clean up the early printk support for fuloong(2e) wuzhangjin
2009-05-20 21:52 ` [loongson-PATCH-v1 09/27] enable Real Time Clock Support " wuzhangjin
2009-05-20 21:54 ` [loongson-PATCH-v1 10/27] add loongson-specific cpu-feature-overrides.h wuzhangjin
2009-05-20 21:54 ` [loongson-PATCH-v1 11/27] split the loongson-specific part out wuzhangjin
2009-05-20 22:05 ` [loongson-PATCH-v1 12/27] add basic loongson-2f support wuzhangjin
2009-05-20 22:06 ` [loongson-PATCH-v1 13/27] add basic fuloong(2f) support wuzhangjin
2009-05-20 22:06 ` [loongson-PATCH-v1 14/27] enable serial port support of loongson-based machines wuzhangjin
2009-05-20 22:07 ` [loongson-PATCH-v1 15/27] add basic yeeloong(2f) laptop support wuzhangjin
2009-05-20 22:08 ` [loongson-PATCH-v1 16/27] Add Siliconmotion 712 framebuffer driver wuzhangjin
2009-05-29 13:29 ` Simon Braunschmidt
2009-05-29 19:51 ` Wu Zhangjin
2009-06-01 7:41 ` Wu Zhangjin [this message]
2009-06-01 7:41 ` Wu Zhangjin
2009-05-20 22:08 ` [loongson-PATCH-v1 17/27] define Loongson2F arch specific phys prot access wuzhangjin
2009-05-20 22:09 ` [loongson-PATCH-v1 18/27] Loongson2 specific OProfile driver wuzhangjin
2009-05-20 22:10 ` [loongson-PATCH-v1 19/27] flush posted write to irq wuzhangjin
2009-05-20 22:10 ` [loongson-PATCH-v1 20/27] CS5536 MFGPT as system clock source support wuzhangjin
2009-05-20 22:10 ` [loongson-PATCH-v1 21/27] Loongson2F cpufreq support wuzhangjin
2009-05-20 22:11 ` [loongson-PATCH-v1 22/27] Hibernation Support in mips system wuzhangjin
2009-05-21 12:43 ` Ralf Baechle
2009-05-24 13:13 ` Wu Zhangjin
2009-05-22 13:01 ` Atsushi Nemoto
2009-05-23 8:06 ` yanh
2009-05-23 12:30 ` Atsushi Nemoto
2009-05-26 1:43 ` yanh
2009-05-26 2:27 ` Hongbing Hu
2009-05-26 14:48 ` Atsushi Nemoto
2009-05-20 22:11 ` [loongson-PATCH-v1 23/27] Alsa memory maps fixup on mips systems wuzhangjin
2009-05-20 22:18 ` David Daney
2009-05-20 23:36 ` Wu Zhangjin
2009-05-20 22:12 ` [loongson-PATCH-v1 24/27] fixup for FUJITSU disk wuzhangjin
2009-05-22 18:32 ` Bartlomiej Zolnierkiewicz
2009-05-23 7:11 ` yanh
2009-05-23 11:47 ` Bartlomiej Zolnierkiewicz
2009-05-25 5:45 ` yanh
2009-05-25 5:45 ` yanh
2009-05-25 7:35 ` 胡洪兵
2009-05-25 14:56 ` Bartlomiej Zolnierkiewicz
2009-05-25 14:56 ` Bartlomiej Zolnierkiewicz
2009-05-25 19:05 ` Sergei Shtylyov
2009-05-25 19:05 ` Sergei Shtylyov
2009-05-25 19:10 ` Martin K. Petersen
2009-05-25 19:17 ` Sergei Shtylyov
2009-05-26 1:21 ` yanh
2009-05-26 1:21 ` yanh
2009-05-26 7:56 ` Alan Cox
2009-05-26 14:39 ` yanh
2009-05-26 14:39 ` yanh
2009-05-20 22:13 ` [loongson-PATCH-v1 25/27] Flush RAS and BTB for CPU predictively execution wuzhangjin
2009-05-20 22:13 ` [loongson-PATCH-v1 26/27] add default kernel config file for loongson-based machines wuzhangjin
2009-05-20 22:14 ` [loongson-PATCH-v1 27/27] add gcc 4.4 support for MIPS and loongson wuzhangjin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1243842090.5760.175.camel@falcon \
--to=wuzhangjin@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=sb@emlix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.