简体   繁体   中英

How to define a unsupported screen resolution in Linux's framebuffer?

I have an LCD monitor that supports hsync between 30 to 82 kHz and vsync 50-85kHz. Lowest supported resolution is 640x350. I want to run it in 400x240 resolution. I think I need to edit the modedb structure in modedb.c and I have just figured out what the fields require:

I ran cvt with max vsync (85 kHz) and got a modeline like this:

Modeline "400x240_85.00"   10.50  400 416 448 496  240 243 253 256 -hsync +vsync

I used a calculator to calculate hsync and vsync and hsync would be 21.17 kHz, way too low for this monitor.

Is there a way to get around this? I want to test how certain things work on that resolution, so even cheating the monitor by running it in say 800x480 (this would produce acceptable hsync and vsync) would be ok as long as X and applications on top of it handle it like it was 400x240.

            "Sharp-VGA",
            56, 800, 480,
            33805,
            84, 40,
            35, 1,
            80, 3,
            0 | FB_SYNC_OE_ACT_HIGH,
            FB_VMODE_NONINTERLACED,
            0,

try that one, found in 2.6.19.2 with freescale patching

Edit:

Actually, if you use fbset and the mode is readable from /etc/fb.modes

you should be able to use this too:

    mode "800x480"
    geometry 800 480 800 480 16
    timings 33805 90 50 35 1 80 3
    accel false
    rgba 5/11,6/5,5/0,0/0
    endmode

eg: fbset -n 800x480

# mode
# geometry <xres> <yres> <vxres> <vyres> <depth>
# timings <pixclock> <left> <right>  <upper>  <lower> <hslen> <vslen>
# options <value>
# rgba <red,green,blue,alpha>
# endmode

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM