I’m trying to use to change some resolution (640x480) in console mode using jetpack 2.3 for TX1
but, I can’t. However, 640x480 resolution is ok in X11.
The test was conducted as follows.
(1). xrandr --output HDMI-0 -mode 640x480 → It’s good !!
(2) fbset default → Kernel Error and unusally fb_match_mode()is returned null.
I got the ‘640x480-60’ value from (1). and saved to /etc/fb.modes using " fbset >> /etc/fb.modes ".
mode "640x480-60"
# D: 25.200 MHz, H: 31.500 kHz, V: 60.001 Hz
geometry 640 480 0 0 32
timings 39721 48 16 33 10 96 2
rgba 8/0,8/8,8/16,8/24
endmode
[ 34.581242] ------------[ cut here ]------------
[ 34.581253] WARNING: at /home3/tegra/v23/64_TX1/Linux_for_Tegra_64_tx1/sources/kernel_source/drivers/video/console/fbcon.c:923 var_to_display+0xbc/0xd0()
[ 34.581266] Modules linked in: bnep soc_camera soc_mediabus videobuf_core bcmdhd cfg80211 bluedroid_pm
[ 34.581272] CPU: 3 PID: 893 Comm: fbset Not tainted 3.10.96-tegra #143
[ 34.581274] Call trace:
[ 34.581279] [<ffffffc000089df4>] dump_backtrace+0x0/0xf0
[ 34.581282] ---[ end trace 10720e92027503da ]---
[ 34.581316] Unable to handle kernel NULL pointer dereference at virtual address 0000000c
[ 34.581318] pgd = ffffffc0f4d46000
[ 34.581321] [0000000c] *pgd=000000017dc7c003, *pmd=0000000000000000
[ 34.581325] Internal error: Oops: 96000006 [#1] PREEMPT SMP
[ 34.581328] Enter nvdumper_crash_setup_regs
[ 34.581337] nvdumper: all registers are saved.
[ 34.581341] tegra_dc_program_mode 432 in
[ 34.581344] tegra_dc_program_mode 438 call modeset_notifier
[ 34.581348] tegra_dc_hdmi_modeset_notifier 2349 (25175000)
[ 34.581353] tegra_dc_program_mode 454, call print_mode
[ 34.581360] tegradc tegradc.1: tegra_dc_program_mode():MODE:640x480@59.939Hz pclk=25175000
[ 34.581371] nvdumper: all registers are saved.
[ 34.581375] nvdumper: all registers are saved.
[ 34.581377] nvdumper: all registers are saved.
[ 34.581382] tegra_dc_program_mode 548, rate=241698047
[ 34.581386] tegra_dc_program_mode 550, pclk=241698047
[ 34.581389] tegra_dc_program_mode 552, div=0
[ 34.581394] tegradc tegradc.1: nominal-pclk:25175000 parent:241698047 div:1.0 pclk:241698047 24923250~27440750
[ 34.581396] Modules linked in: bnep soc_camera soc_mediabus videobuf_core bcmdhd cfg80211 bluedroid_pm
[ 34.581398] tegradc tegradc.1: pclk out of range!
[ 34.581401] CPU: 3 PID: 893 Comm: fbset Tainted: G W 3.10.96-tegra #143
[ 34.581403] tegra_dc_program_mode 563 out
[ 34.581405] task: ffffffc0e71a3040 ti: ffffffc0f2644000 task.ti: ffffffc0f2644000
[ 34.581410] PC is at fb_videomode_to_var+0x0/0x7c
[ 34.581414] LR is at display_to_var+0x1c/0xb4
[ 34.581417] pc : [<ffffffc000373e08>] lr : [<ffffffc00037798c>] pstate: 60000145
[ 34.581418] sp : ffffffc0f26478f0
[ 34.581422] x29: 0000007fcf33cbd0 x28: 0000000000000000
[ 34.581426] x27: 0000000000000280 x26: 0000000000000000
[ 34.581429] x25: ffffffc0fc50e100 x24: 00000000000000a0
[ 34.581432] x23: ffffffc0fcbfc000 x22: ffffffc00127f5c0
[ 34.581436] x21: ffffffc0fc43cc00 x20: ffffffc0f2647940
[ 34.581439] x19: ffffffc00127f5c0 x18: 0000000000000a03
[ 34.581442] x17: 0000000000418100 x16: 0000000000000000
[ 34.581445] x15: 0000000000000008 x14: 0000000000000001
[ 34.581449] x13: ffffffc0fddeeabf x12: ffffff800096c600
[ 34.581452] x11: 00000000ffffffff x10: 0000000000000008
[ 34.581455] x9 : 0000000000aaaaaa x8 : 0000000000000001
[ 34.581458] x7 : ffffffc000b16040 x6 : 0000000000000001
[ 34.581461] x5 : 0000000000000000 x4 : 0000000000000000
[ 34.581465] x3 : ffffffc00127f420 x2 : ffffffc00127f420
[ 34.581468] x1 : 0000000000000000 x0 : ffffffc0f2647940
- use ioctl (FBIOPUT_VSCREENINFO) fuction
struct fb_var_screeninfo vinfo.
vinfo.xres = 640;
vinfo.yres = 480;
vinfo.pixclock = 39721;// KHZ2PICOS(25200);
vinfo.left_margin = 48;
vinfo.upper_margin = 33;
vinfo.right_margin = 16;
vinfo.lower_margin = 10;
vinfo.hsync_len = 96;
vinfo.vsync_len = 2;
vinfo.vmode = 272629760;
vinfo.sync = 3;
ioctl(fb_fp, FBIOPUT_VSCREENINFO, &vinfo);
→ there’s error like with test (2).
→ tegradc tegradc.1: pclk out of range!
- use ioctl (FBIOPUT_VSCREENINFO) fuction
struct fb_var_screeninfo vinfo.
vinfo.xres = 1680;
vinfo.yres = 1050;
ioctl(fb_fp, FBIOPUT_VSCREENINFO, &vinfo);
→ It’s good
I wonder could I fix the resolution at boot time?
Thanks.