This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Can't set resolution of /dev/fb2 to 1080p

Guru 10685 points

I am trying to alpha blend fb0, fb1 and fb2 with each at a resolution of 1080p i.e. 1920x1080. Unfortunately, /dev/fb2 refuses to be set to any resolution higher than 480p i.e. 720x480

I have tried to use this line at boot time:

fbset -fb /dev/fb2 -depth 32 -rgba 8/16,8/8,8/0,0/0 -xres 1920 -yres 1080

as well as this code in my application:

get_varinfo(fd[i], &varinfo)
varinfo.xres = 1920;
varinfo.yres = 1080;
varinfo.xres_virtual = varinfo.xres;
varinfo.yres_virtual = varinfo.yres;
ret = ioctl(fd[i], FBIOPUT_VSCREENINFO, &varinfo);

but no luck; the resolution just stays at 480p. Also confusing is that the return value of this IOCTL indicates that it succeeded in changing the resolution when it clearly failed.

Here is some debugging information if it helps someone to diagnose my problem:

# cat /sys/devices/platform/ti81xxfb/graphics/fb2/modes
U:1920x1080p-60
U:720x480p-282
U:720x480i-943
# cat /sys/devices/platform/ti81xxfb/graphics/fb2/size
15728640
# cat /sys/devices/platform/ti81xxfb/graphics/fb2/virtual_size
1920,1080

And here is my modified load-v4l2-firmware.sh script:

PATH=$PATH:/tmp/ti-media-controller-utils
HDVICP2_ID=1
HDVPSS_ID=2

case "$1" in
    start)
        echo "Loading HDVICP2 Firmware"
        prcm_config_app s
        modprobe syslink
        until [[ -e /dev/syslinkipc_ProcMgr && -e /dev/syslinkipc_ClientNotifyMgr ]]
        do
            sleep 0.5
        done
        firmware_loader $HDVICP2_ID /tmp/ti-media-controller-utils/dm816x_hdvicp.xem3 start
        echo "Loading HDVPSS (V4L2) Firmware "
        firmware_loader $HDVPSS_ID /tmp/ti-media-controller-utils/dm816x_hdvpss_v4l2.xem3 start -i2c 0
        modprobe vpss sbufaddr=0xBFB00000 mode=hdmi:1080p-60,dvo2:1080p-60,hdcomp:1080p-60 i2c_mode=0
        modprobe ti81xxfb vram=0:15M,1:15M,2:15M
        modprobe ti81xxvo
        modprobe shark_capture
        modprobe ti81xxvin
        fbset -depth 32 -rgba 8/16,8/8,8/0,0/0
        modprobe ti81xxhdmi
        echo 1:hdmi > /sys/devices/platform/vpss/graphics1/nodes
        echo 1:hdmi > /sys/devices/platform/vpss/graphics2/nodes
        fbset -fb /dev/fb1 -depth 32 -rgba 8/16,8/8,8/0,0/0
        fbset -fb /dev/fb2 -depth 32 -rgba 8/16,8/8,8/0,0/0 -xres 1920 -yres 1080
;;
esac

And my kernel is configured so that "VRAM size (MB)" is 50 megabytes.

Thanks in advance,

ralph

  • Spent a few more hours looking at this and think that I've solved it. Inexplicably, I needed a call to get_fixinfo to make things work properly. I now see that the fixinfo settings are actually affected by the action of setting the varinfo settings, and I need to retrieve the updated settings in order to get things working.

    My mistake was to assume that varinfo and fixinfo were mutually exclusive settings!

    ralph