开发者

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

开发者 https://www.devze.com 2023-02-04 19:27 出处:网络
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 str

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 vsy开发者_运维问答nc) 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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号