Hello
I was wondering if anyone did something similar and could suggest a solution.
I have rPi3, 4, and 5 versions connected to a 10.1" 1920x1080 touchscreen (HDMI port 1)Please see /boot/config.txt at the end.
I am currently developing using DietPi, but the same thing happens on Rasbien and official Raspberry Pi images.
I am trying to build a C++ app that would use /dev/fb0 or /dev/dri/ in multiuser mode (boot level 3).
I intend to experiment with SDL2, glfw, Qt/QPA, etc.
Bottom line: I am trying "direct rendering" without the desktop.
I am starting with /dev/fb0. I have a few samples running, but I am running into small things.
$ sudo apt install fbset
When I try to query /def/fb0 I get the following as a default.If I try to switch to 32-bit mode from default 16 bit I get errors. If I use I get the same error in my C++ code. Looking further, I did check which should show supported modes.
Here are the listen modes in fb.modes file.
Also "Accelerator : No" should be yes when using vc4drmfb?
My real intention is to run in default resolution 1920x1080 except in 32 bit mode. Just to test I selected one of the modes from the above list that has 32 bitAnd runI can select any xres and yres. but -depth always has a problem with 24 or 32 but not with 16.
Also is there a way to check what hardware accelerations (functions) are supported fb0 or dri.
I was wondering if anyone did something similar and could suggest a solution.
I have rPi3, 4, and 5 versions connected to a 10.1" 1920x1080 touchscreen (HDMI port 1)
Code:
Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
I am currently developing using DietPi, but the same thing happens on Rasbien and official Raspberry Pi images.
I am trying to build a C++ app that would use /dev/fb0 or /dev/dri/ in multiuser mode (boot level 3).
I intend to experiment with SDL2, glfw, Qt/QPA, etc.
Bottom line: I am trying "direct rendering" without the desktop.
I am starting with /dev/fb0. I have a few samples running, but I am running into small things.
$ sudo apt install fbset
When I try to query /def/fb0 I get the following as a default.
Code:
mode "1920x1080"mode "1920x1080" geometry 1920 1080 1920 1080 16 timings 0 0 0 0 0 0 0 accel true rgba 5/11,6/5,5/0,0/0endmodeFrame buffer device information: Name : vc4drmfb Address : 0 Size : 4147200 Type : PACKED PIXELS Visual : TRUECOLOR XPanStep : 1 YPanStep : 1 YWrapStep : 0 LineLength : 3840 Accelerator : Noendmode
Code:
$ fbset -depth 32ioctl FBIOPUT_VSCREENINFO: Invalid argument
Code:
/etc/fb.modes
Here are the listen modes in fb.modes file.
Also "Accelerator : No" should be yes when using vc4drmfb?
Code:
$ grep geometry /etc/fb.modes geometry 640 480 640 480 8 geometry 640 480 640 480 8 geometry 640 480 640 480 8 geometry 640 480 640 480 8 geometry 640 480 640 480 8 geometry 768 576 768 576 32 geometry 800 600 800 600 8 geometry 800 600 800 600 8 geometry 800 600 800 600 8 geometry 800 600 800 600 8 geometry 800 600 800 600 8 geometry 800 600 800 600 8 geometry 800 600 800 600 8 geometry 800 600 800 600 8 geometry 1024 768 1024 768 8 geometry 1024 768 1024 768 8 geometry 1024 768 1024 768 8 geometry 1024 768 1024 768 8 geometry 1024 768 1024 768 8 geometry 1024 768 1024 768 8 geometry 1024 768 1024 768 8 geometry 1152 864 1152 864 8 geometry 1152 864 1152 864 8 geometry 1152 864 1152 864 8 geometry 1152 864 1152 864 8 geometry 1152 864 1152 864 8 geometry 1152 864 1152 864 8 geometry 1280 960 1280 960 8 geometry 1280 960 1280 960 16 geometry 1280 960 1280 960 32 geometry 1024 1024 1024 1024 8 geometry 1280 1024 1280 1024 8 geometry 1280 1024 1280 1024 8 geometry 1280 1024 1280 1024 8 geometry 1280 1024 1280 1024 8 geometry 1280 1024 1280 3264 8 geometry 1600 1200 1600 1200 8 geometry 1600 1200 1600 1200 8 geometry 1600 1200 1600 1200 8
Code:
1280 960 1280 960 32
Code:
$ sudo fbset -fb /dev/fb0 -xres 1280 -yres 960 -depth 32 ioctl FBIOPUT_VSCREENINFO: Invalid argument
Also is there a way to check what hardware accelerations (functions) are supported fb0 or dri.
Code:
# Docs: https://www.raspberrypi.com/documentation/computers/config_txt.html# Overlays: https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README#-------Display---------# Max allocated framebuffers: Set to "0" in headless mode to reduce memory usage# - Defaults to "2" on RPi4 and "1" on earlier RPi models#max_framebuffers=0# If you get no picture, set the following to "1" to apply most compatible HDMI settings.#hdmi_safe=1# Uncomment to adjust the HDMI signal strength if you have interferences, blanking, or no display.# - Ranges from "0" to "11", use values above "7" only if required, e.g. with very long HDMI cable.# - Default on first RPi1 A/B is "2", else "5", on RPi4 this setting is ignored.#config_hdmi_boost=5# Uncomment if HDMI display is not detected and composite is being outputted.#hdmi_force_hotplug=1# Uncomment to disable HDMI even if plugged, e.g. to force composite output.#hdmi_ignore_hotplug=1# Uncomment to force a console size. By default it will be display's size minus overscan.#framebuffer_width=1280#framebuffer_height=720# Uncomment to enable SDTV/composite output on RPi4. This has no effect on previous RPi models.#enable_tvout=0# SDTV mode#sdtv_mode=0# Uncomment to force a specific HDMI mode (this will force VGA).#hdmi_group=1#hdmi_mode=1# Uncomment to force an HDMI mode rather than DVI. This enables HDMI audio in DMT modes.#hdmi_drive=2# Set "hdmi_blanking=1" to allow the display going into standby after 10 minutes without input.# With default value "0", the display shows a blank screen instead, but will not go into standby.# NB: Some legacy OpenMAX applications (OMXPlayer) cannot wake screens from real standby.hdmi_blanking=1# Set to "1" if your display has a black border of unused pixels visible.disable_overscan=1# Uncomment the following to adjust overscan.# Use positive numbers if console goes off screen, and negative if there is too much border.#overscan_left=16#overscan_right=16#overscan_top=16#overscan_bottom=16# Rotation#display_hdmi_rotate=0#lcd_rotate=0#-------RPi camera module-------#start_x=1#disable_camera_led=1#-------GPU memory splits-------gpu_mem_256=76gpu_mem_512=76gpu_mem_1024=76#-------Boot splash screen------disable_splash=1#-------Onboard sound-----------dtparam=audio=on#-------I2C-------------#dtparam=i2c_arm=on#dtparam=i2c_arm_baudrate=100000#-------SPI-------------dtparam=spi=off#-------Serial/UART-----# NB: "enable_uart=1" will enforce "core_freq=250" on RPi models with onboard WiFi.enable_uart=0#-------SD card HPD-----# Comment to enable SD card hot-plug detection, while booting via USB or network.# NB: This causes constant CPU load and kernel errors when no SD card is inserted.dtparam=sd_poll_once#-------Overclock-------temp_limit=75initial_turbo=20#over_voltage=0#arm_freq=1500#core_freq=500#over_voltage_min=0#arm_freq_min=300#core_freq_min=250#sdram_freq_min=400arm_64bit=1dtoverlay=vc4-kms-v3d-pi4dtoverlay=disable-wifidtoverlay=seeed-can-fd-hat-v2
Statistics: Posted by oxoocoffee — Mon May 20, 2024 12:14 am