raspberrypi / firmware

This repository contains pre-compiled binaries of the current Raspberry Pi kernel and modules, userspace libraries, and bootloader/GPU firmware.
5.18k stars 1.68k forks source link

GPU firmware/driver: screen tearing, frame dropping, unstable vblank sync and unexpectedly dropping fps #1826

Closed qrp73 closed 1 year ago

qrp73 commented 1 year ago

Describe the bug Screen tearing and frame drops happens in the GPU driver. Tested on LXDE, KDE, Xfce, GNOME and default raspi OS image - all have screen tearing and frame dropping issue. Some of them don't have screen tearing issue in window mode, but still have in fullscreen mode.

All have frame drops (some frames just don't appears on the display, but accounted as displayed, it just shows previous frame image despite the fact that a new frame is properly updated).

Frame dropping pattern is random and is changed from time to time even with no visible reason. It looks like some kind of race condition in the driver.

All OS configs have unstable vblank synchronization despite the fact that CPU load is almost zero and rendering scene is very simple.

Just compare how test code works on any other GPU driver (for example AMD/Nvidia/Intel/Mali-T/etc), it works very stable with no screen tearing, with no frame drops and with ideally stable vblank synchronization. This is expected behavior.

Attached test code can be used as sanity test for the firmware/driver testing.

To reproduce Steps to reproduce: 1)

$ mkdir TEST
$ cd TEST
$ nano test-vblank.c 
# copy-paste sanity test code (see below)
$ gcc test-vblank.c -o test-vblank -Wall -lGL -lglut
$ ./test-vblank

Expected result: the whole window should stable flashing with different colors, no screen tearing, no frame drops, very stable vblank sync

Actual result: the window flashing is not stable, screen tearing happens at some window positions, sometimes it fails vblank synchronization (can be noticed by changed flashing pattern and fps value jumps)

2) Move window across screen Expected result: the whole window should stable flashing with different colors, no screen tearing, no frame drops, very stable vblank sync

Actual result: the window flashing is not stable, screen tearing happens at some window positions, sometimes it fails vblank synchronization (can be noticed by changed flashing pattern and fps value jumps)

3) Press space to switch between windowed and fullscreen mode Expected result: the whole window should stable flashing with different colors, no screen tearing, no frame drops, very stable vblank sync

Actual result: the window flashing is not stable, screen tearing happens at some window positions, sometimes it fails vblank synchronization (can be noticed by changed flashing pattern and fps value jumps)

Notice that raspi OS armhf and arch64 images don't have visible screen tearing in window mode, but have it in fullscreen mode.

Notice that fullscreen mode shows almost correct image first several seconds, but after that something happens in the driver and screen tearing appears on the scree, with KDE driver just stops to update display at all in fullscreen mode. With LXDE frame rate drops down to 25-30 fps after 3-4 seconds in fullscreen mode. With all WM you can notice frame drops and unstable vblank sync.

Please fix that bug.

Sanity test code test-vblank.c:

#include <stdio.h>
#include <time.h>
#include <GL/freeglut.h>

// gcc test-vblank.c -o test-vblank -Wall -lGL -lglut

void fillRect(float x, float y, float w, float h)
{
    GLfloat rect[] = { x, y+h, x+w, y+h, x+w, y, x, y };
    glEnableClientState(GL_VERTEX_ARRAY);
    glVertexPointer(2, GL_FLOAT, 0, rect);
    glDrawArrays(GL_TRIANGLE_FAN, 0, 4);    
}

char _buf[128];
int _counter = 0;
int _cnt1 = 0;
struct timespec _ts1, _ts2;
float _fps = 0;
#define TS2NS(ts) (((uint64_t)ts.tv_sec)*1e9 + (uint64_t)ts.tv_nsec)

void displayFunc(void)
{
    // calculate fps
    timespec_get(&_ts2, TIME_UTC);
    _counter++;
    uint64_t dt_ns = TS2NS(_ts2) - TS2NS(_ts1);
    if (dt_ns > 1e9)
    {
        // update fps every second
        int frameCount = _counter - _cnt1;
        _ts1 = _ts2;
        _cnt1 = _counter;
        _fps = (frameCount*1e9) / (float)dt_ns;
    }

    glLoadIdentity();
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

    // fill rectangle with different color on every next frame (multicolor effect)
    // it helps to detect inconsistency or instability of vblank wait and buffer update 
    switch (_counter & 3)
    {
        case 0: glColor3f(0.1f, 0.1f, 0.1f); break;
        case 1: glColor3f(1.0f, 1.0f, 1.0f); break;
        case 2: glColor3f(0.1f, 0.1f, 1.0f); break;
        case 3: glColor3f(0.0f, 1.0f, 0.0f); break;
    }
    fillRect(-1.0f, -1.0f, 2, 2);

    // print resolution, bpp and fps
    sprintf(_buf, "%dx%d:%d\n%.1f fps\n%d", 
        glutGet(GLUT_WINDOW_WIDTH), 
        glutGet(GLUT_WINDOW_HEIGHT), 
        glutGet(GLUT_WINDOW_BUFFER_SIZE),
        _fps,
        _counter & 3);
    glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
    glPushMatrix();
    glTranslatef(-0.95f, 0.85f, 0.0f);
    glScalef(0.001,0.001,1);
    glutStrokeString(GLUT_STROKE_ROMAN, (const unsigned char*)_buf);
    glPopMatrix();

    // swap buffers and request glut for next display() call for continuous update
    glutSwapBuffers();
    glutPostRedisplay();
}

int _isFullscreen;
int _wndX, _wndY, _wndWidth, _wndHeight;
void keyboardFunc(unsigned char key, int x, int y) 
{
    int mod = glutGetModifiers(); //1=SHIFT, 2=CTRL, 4=ALT
    if (key == ' ' && mod == 0)
    {
        // Use space key to switch fullscreen/window mode
        _isFullscreen ^= 1;
        if (_isFullscreen)
        {
            _wndX = glutGet(GLUT_WINDOW_X); 
            _wndY = glutGet(GLUT_WINDOW_Y); 
            _wndWidth = glutGet(GLUT_WINDOW_WIDTH); 
            _wndHeight = glutGet(GLUT_WINDOW_HEIGHT); 
            glutFullScreen();
        }
        else
        {
            glutPositionWindow(_wndX, _wndY);
            glutReshapeWindow(_wndWidth, _wndHeight);
        }
    }
}

int main(int argc, char** argv)
{
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_MULTISAMPLE);

    glutInitWindowSize(800, 600);
    glutInitWindowPosition(0, 0);
    glutCreateWindow("test-vblank");

    glutDisplayFunc( displayFunc );
    glutKeyboardFunc( keyboardFunc );

    // explicit matrices init
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();

    glLineWidth(2);         // use bold lines for glutStrokeString
    glClearColor(0.0f,0.0f,0.0f,1.0f);

    glutMainLoop();
    return 0;
}

System

Model: Raspberry Pi 4 rev 1.5

$ cat /etc/rpi-issue
Raspberry Pi reference 2023-05-03
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 7c750947a959fb626a70c09fd17c65815df192ac, stage4

$ vcgencmd version
Mar 17 2023 10:50:39 
Copyright (c) 2012 Broadcom
version 82f3750a65fadae9a38077e3c2e217ad158c8d54 (clean) (release) (start)

$ uname -a
Linux raspi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux

$ raspinfo
System Information
------------------

Raspberry Pi 4 Model B Rev 1.5
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"

Raspberry Pi reference 2023-05-03
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 7c750947a959fb626a70c09fd17c65815df192ac, stage4

Linux raspi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux
Revision    : c03115
Serial      : 10000000dbca****
Model       : Raspberry Pi 4 Model B Rev 1.5
Throttled flag  : throttled=0x0
Camera          : supported=0 detected=0, libcamera interfaces=0

Videocore information
---------------------

Mar 17 2023 10:50:39 
Copyright (c) 2012 Broadcom
version 82f3750a65fadae9a38077e3c2e217ad158c8d54 (clean) (release) (start)

alloc failures:     0
compactions:        0
legacy block fails: 0

Filesystem information
----------------------
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/root       14945204 9191336   4972892  65% /
devtmpfs         1652924       0   1652924   0% /dev
tmpfs            1917148       0   1917148   0% /dev/shm
tmpfs             766860    1284    765576   1% /run
tmpfs               5120       4      5116   1% /run/lock
/dev/mmcblk0p1    258095   31156    226940  13% /boot
tmpfs             383428      28    383400   1% /run/user/1000

Filename                Type        Size        Used        Priority
/var/swap                               file        102396      0       -2

Package version information
---------------------------
raspberrypi-ui-mods:
  Installed: 1.20230127
raspberrypi-sys-mods:
  Installed: 20230510~bullseye
openbox:
  Installed: 3.6.1-9+rpt1+deb11u1
lxpanel:
  Installed: 0.10.1-2+rpt19
pcmanfm:
  Installed: 1.3.2-1+rpt9
rpd-plym-splash:
  Installed: 0.32

Display Information
-------------------

Running (F)KMS and X

Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 7680 x 7680
HDMI-1 connected primary 1280x1024+0+0 (0x49) normal (normal left inverted right x axis y axis) 376mm x 301mm
    Identifier: 0x45
    Timestamp:  14724
    Subpixel:   unknown
    Gamma:      1.0:1.0:1.0
    Brightness: 1.0
    Clones:    
    CRTC:       0
    CRTCs:      0
    Transform:  1.000000 0.000000 0.000000
                0.000000 1.000000 0.000000
                0.000000 0.000000 1.000000
               filter: 
    EDID: 
        00ffffffffffff004c2d47023931424d
        311101030e261e782aee95a3544c9926
        0f5054bfef8081808140714f01010101
        010101010101302a009851002a403070
        1300782d1100001e000000fd00384b1e
        510e000a202020202020000000fc0053
        796e634d61737465720a2020000000ff
        00********************0a20200005
    Output format: Automatic 
        supported: Automatic, RGB, YCbCr 4:2:2, YCbCr 4:4:4
    Broadcast RGB: Automatic 
        supported: Automatic, Full, Limited 16:235
    max bpc: 8 
        range: (8, 12)
    bottom margin: 0 
        range: (0, 100)
    top margin: 0 
        range: (0, 100)
    right margin: 0 
        range: (0, 100)
    left margin: 0 
        range: (0, 100)
    Colorspace: Default 
        supported: Default, SMPTE_170M_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, opRGB, BT2020_CYCC, BT2020_RGB, BT2020_YCC, DCI-P3_RGB_D65, DCI-P3_RGB_Theater
    link-status: Good 
        supported: Good, Bad
    CONNECTOR_ID: 32 
        supported: 32
    non-desktop: 0 
        range: (0, 1)
  1280x1024 (0x48) 108.000MHz +HSync +VSync +preferred
        h: width  1280 start 1328 end 1440 total 1688 skew    0 clock  63.98KHz
        v: height 1024 start 1025 end 1028 total 1066           clock  60.02Hz
  1280x1024 (0x49) 135.000MHz +HSync +VSync *current
        h: width  1280 start 1296 end 1440 total 1688 skew    0 clock  79.98KHz
        v: height 1024 start 1025 end 1028 total 1066           clock  75.02Hz
  1280x960 (0x4a) 108.000MHz +HSync +VSync
        h: width  1280 start 1376 end 1488 total 1800 skew    0 clock  60.00KHz
        v: height  960 start  961 end  964 total 1000           clock  60.00Hz
  1152x864 (0x4b) 108.000MHz +HSync +VSync
        h: width  1152 start 1216 end 1344 total 1600 skew    0 clock  67.50KHz
        v: height  864 start  865 end  868 total  900           clock  75.00Hz
  1024x768 (0x4c) 78.750MHz +HSync +VSync
        h: width  1024 start 1040 end 1136 total 1312 skew    0 clock  60.02KHz
        v: height  768 start  769 end  772 total  800           clock  75.03Hz
  1024x768 (0x4d) 75.000MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1328 skew    0 clock  56.48KHz
        v: height  768 start  771 end  777 total  806           clock  70.07Hz
  1024x768 (0x4e) 65.000MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock  48.36KHz
        v: height  768 start  771 end  777 total  806           clock  60.00Hz
  832x624 (0x4f) 57.284MHz -HSync -VSync
        h: width   832 start  864 end  928 total 1152 skew    0 clock  49.73KHz
        v: height  624 start  625 end  628 total  667           clock  74.55Hz
  800x600 (0x50) 50.000MHz +HSync +VSync
        h: width   800 start  856 end  976 total 1040 skew    0 clock  48.08KHz
        v: height  600 start  637 end  643 total  666           clock  72.19Hz
  800x600 (0x51) 49.500MHz +HSync +VSync
        h: width   800 start  816 end  896 total 1056 skew    0 clock  46.88KHz
        v: height  600 start  601 end  604 total  625           clock  75.00Hz
  800x600 (0x52) 40.000MHz +HSync +VSync
        h: width   800 start  840 end  968 total 1056 skew    0 clock  37.88KHz
        v: height  600 start  601 end  605 total  628           clock  60.32Hz
  800x600 (0x53) 36.000MHz +HSync +VSync
        h: width   800 start  824 end  896 total 1024 skew    0 clock  35.16KHz
        v: height  600 start  601 end  603 total  625           clock  56.25Hz
  640x480 (0x54) 31.500MHz -HSync -VSync
        h: width   640 start  656 end  720 total  840 skew    0 clock  37.50KHz
        v: height  480 start  481 end  484 total  500           clock  75.00Hz
  640x480 (0x55) 31.500MHz -HSync -VSync
        h: width   640 start  664 end  704 total  832 skew    0 clock  37.86KHz
        v: height  480 start  489 end  492 total  520           clock  72.81Hz
  640x480 (0x56) 30.240MHz -HSync -VSync
        h: width   640 start  704 end  768 total  864 skew    0 clock  35.00KHz
        v: height  480 start  483 end  486 total  525           clock  66.67Hz
  640x480 (0x57) 25.175MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock  31.47KHz
        v: height  480 start  490 end  492 total  525           clock  59.94Hz
  720x400 (0x58) 28.320MHz -HSync +VSync
        h: width   720 start  738 end  846 total  900 skew    0 clock  31.47KHz
        v: height  400 start  412 end  414 total  449           clock  70.08Hz
HDMI-2 disconnected (normal left inverted right x axis y axis)
    Identifier: 0x46
    Timestamp:  14724
    Subpixel:   unknown
    Clones:    
    CRTCs:      4
    Transform:  1.000000 0.000000 0.000000
                0.000000 1.000000 0.000000
                0.000000 0.000000 1.000000
               filter: 
    Output format: Automatic 
        supported: Automatic, RGB, YCbCr 4:2:2, YCbCr 4:4:4
    Broadcast RGB: Automatic 
        supported: Automatic, Full, Limited 16:235
    max bpc: 8 
        range: (8, 12)
    bottom margin: 0 
        range: (0, 100)
    top margin: 0 
        range: (0, 100)
    right margin: 0 
        range: (0, 100)
    left margin: 0 
        range: (0, 100)
    Colorspace: Default 
        supported: Default, SMPTE_170M_YCC, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, opRGB, BT2020_CYCC, BT2020_RGB, BT2020_YCC, DCI-P3_RGB_D65, DCI-P3_RGB_Theater
    link-status: Good 
        supported: Good, Bad
    CONNECTOR_ID: 42 
        supported: 42
    non-desktop: 0 
        range: (0, 1)

Connector 0 (32) HDMI-A-1 (connected)
  Encoder 0 (31) TMDS
    Crtc 3 (96) 1280x1024@75.02 135.000 1280/16/144/248/+ 1024/1/3/38/+ 75 (75.02)  
      Plane 3 (86) fb-id: 342 (crtcs: 3) 0,0 1280x1024 -> 0,0 1280x1024 (XR24 AR24 AB24 XB24 RG16 BG16 AR15 XR15 RG24 BG24 YU16 YV16 YU24 YV24 YU12 YV12 NV12 NV21 NV16 NV61 P030 XR30 AR30 AB30 XB30 RGB8 BGR8 XR12 AR12 XB12 AB12 BX12 BA12 RX12 RA12)
        FB 342 1280x1024 XR24
      Plane 25 (309) fb-id: 344 (crtcs: 3) 0,0 64x64 -> 598,269 64x64 (XR24 AR24 AB24 XB24 RG16 BG16 AR15 XR15 RG24 BG24 YU16 YV16 YU24 YV24 YU12 YV12 NV12 NV21 NV16 NV61 P030 XR30 AR30 AB30 XB30 RGB8 BGR8 XR12 AR12 XB12 AB12 BX12 BA12 RX12 RA12)
        FB 344 64x64 AR24
Connector 1 (42) HDMI-A-2 (disconnected)
  Encoder 1 (41) TMDS

Connector 0 (32) HDMI-A-1 (connected)
   0 1280x1024@60.02  108.000 1280/48/112/248/+  1024/1/3/38/+      60 (60.02) P|U|D 
   1 1280x1024@75.02  135.000 1280/16/144/248/+  1024/1/3/38/+      75 (75.02) D     
   2 1280x960@60.00   108.000 1280/96/112/312/+  960/1/3/36/+       60 (60.00) D     
   3 1152x864@75.00   108.000 1152/64/128/256/+  864/1/3/32/+       75 (75.00) D     
   4 1024x768@75.03    78.750 1024/16/96/176/+   768/1/3/28/+       75 (75.03) D     
   5 1024x768@70.07    75.000 1024/24/136/144/-  768/3/6/29/-       70 (70.07) D     
   6 1024x768@60.00    65.000 1024/24/136/160/-  768/3/6/29/-       60 (60.00) D     
   7 832x624@74.55     57.284 832/32/64/224/-    624/1/3/39/-       75 (74.55) D     
   8 800x600@75.00     49.500 800/16/80/160/+    600/1/3/21/+       75 (75.00) D     
   9 800x600@72.19     50.000 800/56/120/64/+    600/37/6/23/+      72 (72.19) D     
  10 800x600@60.32     40.000 800/40/128/88/+    600/1/4/23/+       60 (60.32) D     
  11 800x600@56.25     36.000 800/24/72/128/+    600/1/2/22/+       56 (56.25) D     
  12 640x480@75.00     31.500 640/16/64/120/-    480/1/3/16/-       75 (75.00) D     
  13 640x480@72.81     31.500 640/24/40/128/-    480/9/3/28/-       73 (72.81) D     
  14 640x480@66.67     30.240 640/64/64/96/-     480/3/3/39/-       67 (66.67) D     
  15 640x480@59.94     25.175 640/16/96/48/-     480/10/2/33/-      60 (59.94) D     
  16 720x400@70.08     28.320 720/18/108/54/-    400/12/2/35/+      70 (70.08) D     

HDMI0:             HDMI_HOTPLUG = 0x00000001
HDMI1:             HDMI_HOTPLUG = 0x00000000

/sys/kernel/debug/dri/1/state:
plane[47]: plane-0
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=0
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[64]: plane-1
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=0
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[75]: plane-2
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=0
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[86]: plane-3
    crtc=pixelvalve-2
    fb=339
        allocated by = Xorg
        refcount=2
        format=XR24 little-endian (0x34325258)
        modifier=0x0
        size=1280x1024
        layers:
            size[0]=1280x1024
            pitch[0]=5120
            offset[0]=0
            obj[0]:
                name=0
                refcount=3
                start=00101198
                size=5242880
                imported=no
                dma_addr=0x00000000d0900000
                vaddr=000000008187a00b
    crtc-pos=1280x1024+0+0
    src-pos=1280.000000x1024.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=0
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[97]: plane-4
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=0
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[108]: plane-5
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=0
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[119]: plane-6
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=1
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[129]: plane-7
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=2
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[139]: plane-8
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=3
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[149]: plane-9
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=4
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[159]: plane-10
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=5
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[169]: plane-11
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=6
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[179]: plane-12
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=7
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[189]: plane-13
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=8
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[199]: plane-14
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=9
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[209]: plane-15
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=a
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[219]: plane-16
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=b
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[229]: plane-17
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=c
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[239]: plane-18
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=d
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[249]: plane-19
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=e
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[259]: plane-20
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=f
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[269]: plane-21
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=10
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[279]: plane-22
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=11
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[289]: plane-23
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=11
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[299]: plane-24
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=11
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[309]: plane-25
    crtc=pixelvalve-2
    fb=344
        allocated by = Xorg
        refcount=1
        format=AR24 little-endian (0x34325241)
        modifier=0x0
        size=64x64
        layers:
            size[0]=64x64
            pitch[0]=256
            offset[0]=0
            obj[0]:
                name=0
                refcount=3
                start=0010078c
                size=16384
                imported=no
                dma_addr=0x00000000cf050000
                vaddr=000000003f05729b
    crtc-pos=64x64+598+269
    src-pos=64.000000x64.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=1
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[319]: plane-26
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=11
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
plane[329]: plane-27
    crtc=(null)
    fb=0
    crtc-pos=0x0+0+0
    src-pos=0.000000x0.000000+0.000000+0.000000
    rotation=1
    normalized-zpos=11
    color-encoding=ITU-R BT.709 YCbCr
    color-range=YCbCr limited range
crtc[57]: txp
    enable=0
    active=0
    self_refresh_active=0
    planes_changed=0
    mode_changed=0
    active_changed=0
    connectors_changed=0
    color_mgmt_changed=0
    plane_mask=0
    connector_mask=0
    encoder_mask=0
    mode: "": 0 0 0 0 0 0 0 0 0 0 0x0 0x0
crtc[74]: pixelvalve-0
    enable=0
    active=0
    self_refresh_active=0
    planes_changed=0
    mode_changed=0
    active_changed=0
    connectors_changed=0
    color_mgmt_changed=0
    plane_mask=0
    connector_mask=0
    encoder_mask=0
    mode: "": 0 0 0 0 0 0 0 0 0 0 0x0 0x0
crtc[85]: pixelvalve-1
    enable=0
    active=0
    self_refresh_active=0
    planes_changed=0
    mode_changed=0
    active_changed=0
    connectors_changed=0
    color_mgmt_changed=0
    plane_mask=0
    connector_mask=0
    encoder_mask=0
    mode: "": 0 0 0 0 0 0 0 0 0 0 0x0 0x0
crtc[96]: pixelvalve-2
    enable=1
    active=1
    self_refresh_active=0
    planes_changed=1
    mode_changed=0
    active_changed=0
    connectors_changed=0
    color_mgmt_changed=0
    plane_mask=2000008
    connector_mask=1
    encoder_mask=1
    mode: "": 75 135000 1280 1296 1440 1688 1024 1025 1028 1066 0x0 0x5
crtc[107]: pixelvalve-4
    enable=0
    active=0
    self_refresh_active=0
    planes_changed=0
    mode_changed=0
    active_changed=0
    connectors_changed=0
    color_mgmt_changed=0
    plane_mask=0
    connector_mask=0
    encoder_mask=0
    mode: "": 0 0 0 0 0 0 0 0 0 0 0x0 0x0
crtc[118]: pixelvalve-3
    enable=0
    active=0
    self_refresh_active=0
    planes_changed=0
    mode_changed=0
    active_changed=0
    connectors_changed=0
    color_mgmt_changed=0
    plane_mask=0
    connector_mask=0
    encoder_mask=0
    mode: "": 0 0 0 0 0 0 0 0 0 0 0x0 0x0
connector[32]: HDMI-A-1
    crtc=pixelvalve-2
    self_refresh_aware=0
    max_requested_bpc=8
connector[42]: HDMI-A-2
    crtc=(null)
    self_refresh_aware=0
    max_requested_bpc=8
connector[63]: Writeback-1
    crtc=(null)
    self_refresh_aware=0
    max_requested_bpc=0

config.txt
----------

arm_64bit=1
arm_boost=1
arm_freq=2100
audio_pwm_mode=514
camera_auto_detect=1
config_hdmi_boost=5
disable_commandline_tags=2
disable_l2cache=1
disable_overscan=1
display_auto_detect=1
display_hdmi_rotate=-1
display_lcd_rotate=-1
dvfs=3
enable_gic=1
enable_uart=1
force_eeprom_read=1
force_pwm_open=1
framebuffer_ignore_alpha=1
framebuffer_swap=1
gpu_freq=700
gpu_freq_min=250
init_uart_clock=0x2dc6c00
lcd_framerate=60
mask_gpu_interrupt0=3072
mask_gpu_interrupt1=25635
max_framebuffers=1
over_voltage_avs=-20000
pause_burst_frames=1
program_serial_random=1
total_mem=4096
hdmi_force_cec_address:0=65535
hdmi_force_cec_address:1=65535
hdmi_pixel_freq_limit:0=0x11e1a300
hdmi_pixel_freq_limit:1=0x11e1a300
device_tree=-
overlay_prefix=overlays/
hdmi_cvt:0=
hdmi_cvt:1=
hdmi_edid_filename:0=
hdmi_edid_filename:1=
hdmi_timings:0=
hdmi_timings:1=

cmdline.txt
-----------
coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0 video=HDMI-A-1:1280x1024M@60 smsc95xx.macaddr=**:**:**:**:**:** vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=ttyS0,115200 console=tty1 root=PARTUUID=********-02 rootfstype=ext4 fsck.repair=yes rootwait splash plymouth.ignore-serial-consoles

vcdbg log messages
------------------

003999.978: arasan: arasan_emmc_open
004000.148: arasan: arasan_emmc_set_clock C0: 0x00800000 C1: 0x000e0047 emmc: 200000000 actual: 390625 div: 0x00000100 target: 400000 min: 400000 max: 400000 delay: 5
004104.916: arasan: arasan_emmc_set_clock C0: 0x00800000 C1: 0x000e0047 emmc: 200000000 actual: 390625 div: 0x00000100 target: 400000 min: 400000 max: 400000 delay: 5
004105.003: arasan: arasan_emmc_set_clock C0: 0x00800f00 C1: 0x000e0047 emmc: 200000000 actual: 390625 div: 0x00000100 target: 400000 min: 390000 max: 400000 delay: 5
004131.619: arasan: arasan_emmc_set_clock C0: 0x00800f06 C1: 0x000e0207 emmc: 200000000 actual: 50000000 div: 0x00000002 target: 50000000 min: 0 max: 50000000 delay: 1
004137.786: brfs: File read: /mfs/sd/config.txt
004138.837: brfs: File read: 2268 bytes
004193.118: HDMI1:EDID error reading EDID block 0 attempt 0
004194.134: HDMI1:EDID giving up on reading EDID block 0
004197.514: brfs: File read: /mfs/sd/config.txt
004968.036: gpioman: gpioman_get_pin_num: pin DISPLAY_DSI_PORT not defined
004970.559: *** Restart logging
004970.580: brfs: File read: 2268 bytes
005007.836: hdmi: HDMI1:EDID error reading EDID block 0 attempt 0
005008.850: hdmi: HDMI1:EDID giving up on reading EDID block 0
005013.881: hdmi: HDMI1:EDID error reading EDID block 0 attempt 0
005014.893: hdmi: HDMI1:EDID giving up on reading EDID block 0
005014.908: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
005014.921: HDMI0: hdmi_pixel_encoding: 300000000
005014.931: HDMI1: hdmi_pixel_encoding: 300000000
005015.400: kernel=
005020.192: dtb_file 'bcm2711-rpi-4-b.dtb'
005027.459: brfs: File read: /mfs/sd/bcm2711-rpi-4-b.dtb
005027.474: Loaded 'bcm2711-rpi-4-b.dtb' to 0x100 size 0xcd71
005036.868: brfs: File read: 52593 bytes
005053.137: brfs: File read: /mfs/sd/overlays/overlay_map.dtb
005107.350: brfs: File read: 2347 bytes
005111.790: brfs: File read: /mfs/sd/config.txt
005112.216: dtparam: audio=on
005115.592: brfs: File read: 2268 bytes
005132.249: brfs: File read: /mfs/sd/overlays/vc4-kms-v3d-pi4.dtbo
005176.298: Loaded overlay 'vc4-kms-v3d'
005433.675: brfs: File read: 3913 bytes
005437.644: brfs: File read: /mfs/sd/cmdline.txt
005437.713: Read command line from file 'cmdline.txt':
005437.735: 'console=serial0,115200 console=tty1 root=PARTUUID=********-02 rootfstype=ext4 fsck.repair=yes rootwait splash plymouth.ignore-serial-consoles'
005548.660: brfs: File read: 142 bytes
006318.036: brfs: File read: /mfs/sd/kernel8.img
006318.055: Loaded 'kernel8.img' to 0x80000 size 0x7d6bd0
007200.122: Kernel relocated to 0x200000
007200.132: Device tree loaded to 0x2eff2b00 (size 0xd4ac)
007202.899: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
009304.027: vchiq_core: vchiq_init_state: slot_zero = 0xcf000000, is_master = 1
009310.439: TV service:host side not connected, dropping notification 0x00000002, 0x00000002, 0x00000023

dmesg log
---------

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd083]
[    0.000000] Linux version 6.1.21-v8+ (dom@buildbot) (aarch64-linux-gnu-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023
[    0.000000] random: crng init done
[    0.000000] Machine model: Raspberry Pi 4 Model B Rev 1.5
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created CMA memory pool at 0x000000000ec00000, size 512 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000003fffffff]
[    0.000000]   DMA32    [mem 0x0000000040000000-0x00000000fbffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000037ffffff]
[    0.000000]   node   0: [mem 0x0000000040000000-0x00000000fbffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x00000000fbffffff]
[    0.000000] On node 0, zone DMA32: 16384 pages in unavailable ranges
[    0.000000] percpu: Embedded 29 pages/cpu s78504 r8192 d32088 u118784
[    0.000000] pcpu-alloc: s78504 r8192 d32088 u118784 alloc=29*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Detected PIPT I-cache on CPU0
[    0.000000] CPU features: detected: Spectre-v2
[    0.000000] CPU features: detected: Spectre-v3a
[    0.000000] CPU features: detected: Spectre-v4
[    0.000000] CPU features: detected: Spectre-BHB
[    0.000000] CPU features: kernel page table isolation forced ON by KASLR
[    0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[    0.000000] CPU features: detected: ARM erratum 1742098
[    0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 983808
[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_headphones=0 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_hdmi=0 video=HDMI-A-1:1280x1024M@60 smsc95xx.macaddr=m.m.m.m vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=ttyS0,115200 console=tty1 root=PARTUUID=6d8b2959-02 rootfstype=ext4 fsck.repair=yes rootwait splash plymouth.ignore-serial-consoles
[    0.000000] Unknown kernel command line parameters "splash", will be passed to user space.
[    0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: area num 4.
[    0.000000] software IO TLB: mapped [mem 0x0000000034000000-0x0000000038000000] (64MB)
[    0.000000] Memory: 3305852K/3997696K available (11776K kernel code, 2106K rwdata, 3688K rodata, 4160K init, 1077K bss, 167556K reserved, 524288K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 39744 entries in 156 pages
[    0.000000] ftrace: allocated 156 pages with 4 groups
[    0.000000] trace event string verifier disabled
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000]  Rude variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 54.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xc743ce346, max_idle_ns: 440795203123 ns
[    0.000001] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 4398046511102ns
[    0.000309] Console: colour dummy device 80x25
[    0.000913] printk: console [tty1] enabled
[    0.000986] Calibrating delay loop (skipped), value calculated using timer frequency.. 108.00 BogoMIPS (lpj=216000)
[    0.001027] pid_max: default: 32768 minimum: 301
[    0.001167] LSM: Security Framework initializing
[    0.001376] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.001451] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.002715] cgroup: Disabling memory control group subsystem
[    0.004906] cblist_init_generic: Setting adjustable number of callback queues.
[    0.004941] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.005129] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.005316] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.005765] rcu: Hierarchical SRCU implementation.
[    0.005789] rcu:     Max phase no-delay instances is 1000.
[    0.007098] EFI services will not be available.
[    0.007624] smp: Bringing up secondary CPUs ...
[    0.008754] Detected PIPT I-cache on CPU1
[    0.008909] CPU1: Booted secondary processor 0x0000000001 [0x410fd083]
[    0.010041] Detected PIPT I-cache on CPU2
[    0.010160] CPU2: Booted secondary processor 0x0000000002 [0x410fd083]
[    0.011257] Detected PIPT I-cache on CPU3
[    0.011381] CPU3: Booted secondary processor 0x0000000003 [0x410fd083]
[    0.011526] smp: Brought up 1 node, 4 CPUs
[    0.011616] SMP: Total of 4 processors activated.
[    0.011637] CPU features: detected: 32-bit EL0 Support
[    0.011655] CPU features: detected: 32-bit EL1 Support
[    0.011677] CPU features: detected: CRC32 instructions
[    0.011818] CPU: All CPU(s) started at EL2
[    0.011853] alternatives: applying system-wide alternatives
[    0.013663] devtmpfs: initialized
[    0.025642] Enabled cp15_barrier support
[    0.025704] Enabled setend support
[    0.025926] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.025977] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.038766] pinctrl core: initialized pinctrl subsystem
[    0.039650] DMI not present or invalid.
[    0.040381] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.043898] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations
[    0.044240] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.045202] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.045310] audit: initializing netlink subsys (disabled)
[    0.045581] audit: type=2000 audit(0.044:1): state=initialized audit_enabled=0 res=1
[    0.046180] thermal_sys: Registered thermal governor 'step_wise'
[    0.046272] cpuidle: using governor menu
[    0.046708] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.046916] ASID allocator initialised with 32768 entries
[    0.047090] Serial: AMBA PL011 UART driver
[    0.061362] bcm2835-mbox fe00b880.mailbox: mailbox enabled
[    0.084723] raspberrypi-firmware soc:firmware: Attached to firmware from 2023-03-17T10:50:39, variant start
[    0.088738] raspberrypi-firmware soc:firmware: Firmware hash is 82f3750a65fadae9a38077e3c2e217ad158c8d54
[    0.104651] KASLR enabled
[    0.138199] bcm2835-dma fe007000.dma: DMA legacy API manager, dmachans=0x1
[    0.143940] SCSI subsystem initialized
[    0.144220] usbcore: registered new interface driver usbfs
[    0.144291] usbcore: registered new interface driver hub
[    0.144370] usbcore: registered new device driver usb
[    0.144774] usb_phy_generic phy: supply vcc not found, using dummy regulator
[    0.144999] usb_phy_generic phy: dummy supplies not allowed for exclusive requests
[    0.145363] pps_core: LinuxPPS API ver. 1 registered
[    0.145387] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.145427] PTP clock support registered
[    0.146557] vgaarb: loaded
[    0.147340] clocksource: Switched to clocksource arch_sys_counter
[    0.148100] VFS: Disk quotas dquot_6.6.0
[    0.148196] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.148392] FS-Cache: Loaded
[    0.148595] CacheFiles: Loaded
[    0.159471] NET: Registered PF_INET protocol family
[    0.160002] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.164702] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    0.164780] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.164912] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.165130] TCP bind hash table entries: 32768 (order: 8, 1048576 bytes, linear)
[    0.166176] TCP: Hash tables configured (established 32768 bind 32768)
[    0.166423] UDP hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.166520] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.166841] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.167741] RPC: Registered named UNIX socket transport module.
[    0.167777] RPC: Registered udp transport module.
[    0.167797] RPC: Registered tcp transport module.
[    0.167815] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.167849] PCI: CLS 0 bytes, default 64
[    0.173548] hw perfevents: enabled with armv8_cortex_a72 PMU driver, 7 counters available
[    0.173959] kvm [1]: IPA Size Limit: 44 bits
[    0.175274] kvm [1]: vgic interrupt IRQ9
[    0.175555] kvm [1]: Hyp mode initialized successfully
[    1.312027] Initialise system trusted keyrings
[    1.312361] workingset: timestamp_bits=46 max_order=20 bucket_order=0
[    1.319847] zbud: loaded
[    1.322740] NFS: Registering the id_resolver key type
[    1.322798] Key type id_resolver registered
[    1.322820] Key type id_legacy registered
[    1.322956] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.322984] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    1.324451] Key type asymmetric registered
[    1.324482] Asymmetric key parser 'x509' registered
[    1.324594] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    1.324885] io scheduler mq-deadline registered
[    1.324914] io scheduler kyber registered
[    1.326915] irq_brcmstb_l2: registered L2 intc (/soc/interrupt-controller@7ef00100, parent irq: 27)
[    1.335015] brcm-pcie fd500000.pcie: host bridge /scb/pcie@7d500000 ranges:
[    1.335076] brcm-pcie fd500000.pcie:   No bus range found for /scb/pcie@7d500000, using [bus 00-ff]
[    1.335179] brcm-pcie fd500000.pcie:      MEM 0x0600000000..0x063fffffff -> 0x00c0000000
[    1.335277] brcm-pcie fd500000.pcie:   IB MEM 0x0000000000..0x00ffffffff -> 0x0400000000
[    1.336340] brcm-pcie fd500000.pcie: PCI host bridge to bus 0000:00
[    1.336373] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.336402] pci_bus 0000:00: root bus resource [mem 0x600000000-0x63fffffff] (bus address [0xc0000000-0xffffffff])
[    1.336489] pci 0000:00:00.0: [14e4:2711] type 01 class 0x060400
[    1.336754] pci 0000:00:00.0: PME# supported from D0 D3hot
[    1.340689] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.340965] pci_bus 0000:01: supply vpcie3v3 not found, using dummy regulator
[    1.341180] pci_bus 0000:01: supply vpcie3v3aux not found, using dummy regulator
[    1.341302] pci_bus 0000:01: supply vpcie12v not found, using dummy regulator
[    1.405432] brcm-pcie fd500000.pcie: link up, 5.0 GT/s PCIe x1 (SSC)
[    1.405612] pci 0000:01:00.0: [1106:3483] type 00 class 0x0c0330
[    1.405749] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00000fff 64bit]
[    1.406236] pci 0000:01:00.0: PME# supported from D0 D3hot
[    1.406931] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.406987] pci 0000:00:00.0: BAR 8: assigned [mem 0x600000000-0x6000fffff]
[    1.407021] pci 0000:01:00.0: BAR 0: assigned [mem 0x600000000-0x600000fff 64bit]
[    1.407078] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.407109] pci 0000:00:00.0:   bridge window [mem 0x600000000-0x6000fffff]
[    1.408342] simple-framebuffer 3e6fa000.framebuffer: framebuffer at 0x3e6fa000, 0x500000 bytes
[    1.408380] simple-framebuffer 3e6fa000.framebuffer: format=a8r8g8b8, mode=1280x1024x32, linelength=5120
[    1.414033] Console: switching to colour frame buffer device 160x64
[    1.419032] simple-framebuffer 3e6fa000.framebuffer: fb0: simplefb registered!
[    1.426723] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    1.430044] iproc-rng200 fe104000.rng: hwrng registered
[    1.430681] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[    1.432361] gpiomem-bcm2835 fe200000.gpiomem: Initialised: Registers at 0xfe200000
[    1.445314] brd: module loaded
[    1.454057] loop: module loaded
[    1.454964] Loading iSCSI transport class v2.0-870.
[    1.460401] bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000
[    1.519503] unimac-mdio unimac-mdio.-19: Broadcom UniMAC MDIO bus
[    1.520724] usbcore: registered new interface driver r8152
[    1.520848] usbcore: registered new interface driver lan78xx
[    1.520971] usbcore: registered new interface driver smsc95xx
[    1.566380] pci 0000:00:00.0: enabling device (0000 -> 0002)
[    1.566605] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    1.566681] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1
[    1.567508] xhci_hcd 0000:01:00.0: hcc params 0x002841eb hci version 0x100 quirks 0x0000e40000000890
[    1.568611] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    1.568679] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    1.568758] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[    1.569221] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.01
[    1.569307] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.569377] usb usb1: Product: xHCI Host Controller
[    1.569431] usb usb1: Manufacturer: Linux 6.1.21-v8+ xhci-hcd
[    1.569488] usb usb1: SerialNumber: 0000:01:00.0
[    1.570273] hub 1-0:1.0: USB hub found
[    1.570379] hub 1-0:1.0: 1 port detected
[    1.571409] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.01
[    1.571496] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.571565] usb usb2: Product: xHCI Host Controller
[    1.571617] usb usb2: Manufacturer: Linux 6.1.21-v8+ xhci-hcd
[    1.571675] usb usb2: SerialNumber: 0000:01:00.0
[    1.572405] hub 2-0:1.0: USB hub found
[    1.572537] hub 2-0:1.0: 4 ports detected
[    1.576305] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.578548] dwc_otg: FIQ enabled
[    1.578559] dwc_otg: NAK holdoff enabled
[    1.578569] dwc_otg: FIQ split-transaction FSM enabled
[    1.578585] Module dwc_common_port init
[    1.579141] usbcore: registered new interface driver uas
[    1.581176] usbcore: registered new interface driver usb-storage
[    1.583283] mousedev: PS/2 mouse device common for all mice
[    1.592486] sdhci: Secure Digital Host Controller Interface driver
[    1.594384] sdhci: Copyright(c) Pierre Ossman
[    1.596980] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.602407] ledtrig-cpu: registered to indicate activity on CPUs
[    1.604701] hid: raw HID events driver (C) Jiri Kosina
[    1.606705] usbcore: registered new interface driver usbhid
[    1.608556] usbhid: USB HID core driver
[    1.618825] NET: Registered PF_PACKET protocol family
[    1.621030] Key type dns_resolver registered
[    1.624300] registered taskstats version 1
[    1.626176] Loading compiled-in X.509 certificates
[    1.628815] Key type .fscrypt registered
[    1.630624] Key type fscrypt-provisioning registered
[    1.647756] uart-pl011 fe201000.serial: there is not valid maps for state default
[    1.650341] uart-pl011 fe201000.serial: cts_event_workaround enabled
[    1.652313] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 36, base_baud = 0) is a PL011 rev2
[    1.662199] bcm2835-aux-uart fe215040.serial: there is not valid maps for state default
[    1.664853] printk: console [ttyS0] disabled
[    1.666782] fe215040.serial: ttyS0 at MMIO 0xfe215040 (irq = 37, base_baud = 87500000) is a 16550
[    1.823375] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[    1.828715] printk: console [ttyS0] enabled
[    1.978039] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.21
[    1.981352] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    1.981567] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    1.983880] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[    1.985275] usb 1-1: Product: USB2.0 Hub
[    1.988480] mmc-bcm2835 fe300000.mmcnr: mmc_debug:0 mmc_debug2:0
[    1.991522] hub 1-1:1.0: USB hub found
[    1.995977] mmc-bcm2835 fe300000.mmcnr: DMA channel allocated
[    1.998401] hub 1-1:1.0: 4 ports detected
[    2.028291] of_cfs_init
[    2.068285] mmc0: SDHCI controller on fe340000.mmc [fe340000.mmc] using ADMA
[    2.075542] of_cfs_init: OK
[    2.130655] mmc1: new high speed SDIO card at address 0001
[    2.327364] usb 1-1.3: new low-speed USB device number 3 using xhci_hcd
[    3.260549] Waiting for root device PARTUUID=6d8b2959-02...
[    3.305024] mmc0: new ultra high speed DDR50 SDHC card at address aaaa
[    3.314613] mmcblk0: mmc0:aaaa SC16G 14.8 GiB 
[    3.327052]  mmcblk0: p1 p2
[    3.332385] mmcblk0: mmc0:aaaa SC16G 14.8 GiB (quirks 0x00004000)
[    3.360784] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Quota mode: none.
[    3.371596] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    3.387972] usb 1-1.3: New USB device found, idVendor=1c4f, idProduct=0026, bcdDevice= 1.10
[    3.398503] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.398577] devtmpfs: mounted
[    3.400472] usb 1-1.3: Product: USB Keyboard
[    3.410352] Freeing unused kernel memory: 4160K
[    3.411842] usb 1-1.3: Manufacturer: SIGMACHIP
[    3.413993] Run /sbin/init as init process
[    3.431018] input: SIGMACHIP USB Keyboard as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.0/0003:1C4F:0026.0001/input/input0
[    3.434198]   with arguments:
[    3.434208]     /sbin/init
[    3.434217]     splash
[    3.434225]   with environment:
[    3.434233]     HOME=/
[    3.434241]     TERM=linux
[    3.516092] hid-generic 0003:1C4F:0026.0001: input,hidraw0: USB HID v1.10 Keyboard [SIGMACHIP USB Keyboard] on usb-0000:01:00.0-1.3/input0
[    3.536727] input: SIGMACHIP USB Keyboard Consumer Control as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:1C4F:0026.0002/input/input1
[    3.615737] input: SIGMACHIP USB Keyboard System Control as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:1C4F:0026.0002/input/input2
[    3.638045] hid-generic 0003:1C4F:0026.0002: input,hidraw1: USB HID v1.10 Device [SIGMACHIP USB Keyboard] on usb-0000:01:00.0-1.3/input1
[    3.731385] usb 1-1.4: new low-speed USB device number 4 using xhci_hcd
[    3.852060] usb 1-1.4: New USB device found, idVendor=046d, idProduct=c051, bcdDevice=30.00
[    3.863118] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.873095] usb 1-1.4: Product: USB-PS/2 Optical Mouse
[    3.880772] usb 1-1.4: Manufacturer: Logitech
[    3.899230] input: Logitech USB-PS/2 Optical Mouse as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:046D:C051.0003/input/input3
[    3.921529] hid-generic 0003:046D:C051.0003: input,hidraw2: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:01:00.0-1.4/input0
[    3.985142] systemd[1]: System time before build time, advancing clock.
[    4.179229] NET: Registered PF_INET6 protocol family
[    4.188775] Segment Routing with IPv6
[    4.195159] In-situ OAM (IOAM) with IPv6
[    4.267940] systemd[1]: systemd 247.3-7+deb11u4 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=unified)
[    4.297865] systemd[1]: Detected architecture arm64.
[    4.330657] systemd[1]: Set hostname to <raspi>.
[    4.932389] systemd[1]: /lib/systemd/system/plymouth-start.service:16: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed.
[    5.152765] systemd[1]: Queued start job for default target Graphical Interface.
[    5.181027] systemd[1]: Created slice system-getty.slice.
[    5.193946] systemd[1]: Created slice system-modprobe.slice.
[    5.206720] systemd[1]: Created slice system-serial\x2dgetty.slice.
[    5.220071] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[    5.233265] systemd[1]: Created slice User and Session Slice.
[    5.245598] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    5.260338] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    5.276458] systemd[1]: Reached target Slices.
[    5.287116] systemd[1]: Reached target Swap.
[    5.298462] systemd[1]: Listening on Syslog Socket.
[    5.310236] systemd[1]: Listening on fsck to fsckd communication Socket.
[    5.323531] systemd[1]: Listening on initctl Compatibility Named Pipe.
[    5.337464] systemd[1]: Listening on Journal Audit Socket.
[    5.349954] systemd[1]: Listening on Journal Socket (/dev/log).
[    5.363098] systemd[1]: Listening on Journal Socket.
[    5.382411] systemd[1]: Listening on udev Control Socket.
[    5.394550] systemd[1]: Listening on udev Kernel Socket.
[    5.406463] systemd[1]: Condition check resulted in Huge Pages File System being skipped.
[    5.439805] systemd[1]: Mounting POSIX Message Queue File System...
[    5.456264] systemd[1]: Mounting RPC Pipe File System...
[    5.472163] systemd[1]: Mounting Kernel Debug File System...
[    5.488308] systemd[1]: Mounting Kernel Trace File System...
[    5.499946] systemd[1]: Condition check resulted in Kernel Module supporting RPCSEC_GSS being skipped.
[    5.519524] systemd[1]: Starting Restore / save the current clock...
[    5.536955] systemd[1]: Starting Set the console keyboard layout...
[    5.554009] systemd[1]: Starting Create list of static device nodes for the current kernel...
[    5.574342] systemd[1]: Starting Load Kernel Module configfs...
[    5.592150] systemd[1]: Starting Load Kernel Module drm...
[    5.609006] systemd[1]: Starting Load Kernel Module fuse...
[    5.623846] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped.
[    5.640221] systemd[1]: Starting File System Check on Root Device...
[    5.659857] fuse: init (API version 7.37)
[    5.661831] systemd[1]: Starting Journal Service...
[    5.693817] systemd[1]: Starting Load Kernel Modules...
[    5.724282] systemd[1]: Starting Coldplug All udev Devices...
[    5.757716] systemd[1]: Mounted POSIX Message Queue File System.
[    5.771544] i2c_dev: i2c /dev entries driver
[    5.783058] systemd[1]: Mounted RPC Pipe File System.
[    5.794869] systemd[1]: Mounted Kernel Debug File System.
[    5.823796] systemd[1]: Mounted Kernel Trace File System.
[    5.844522] systemd[1]: Finished Restore / save the current clock.
[    5.868498] systemd[1]: Finished Create list of static device nodes for the current kernel.
[    5.904316] systemd[1]: modprobe@configfs.service: Succeeded.
[    5.914453] systemd[1]: Finished Load Kernel Module configfs.
[    5.927518] systemd[1]: modprobe@drm.service: Succeeded.
[    5.936691] systemd[1]: Finished Load Kernel Module drm.
[    5.949261] systemd[1]: modprobe@fuse.service: Succeeded.
[    5.958538] systemd[1]: Finished Load Kernel Module fuse.
[    5.971125] systemd[1]: Finished File System Check on Root Device.
[    5.984335] systemd[1]: Finished Load Kernel Modules.
[    6.035421] systemd[1]: Mounting FUSE Control File System...
[    6.055025] systemd[1]: Mounting Kernel Configuration File System...
[    6.070965] systemd[1]: Started File System Check Daemon to report status.
[    6.088561] systemd[1]: Starting Remount Root and Kernel File Systems...
[    6.106905] systemd[1]: Starting Apply Kernel Variables...
[    6.124463] systemd[1]: Started Journal Service.
[    6.260558] EXT4-fs (mmcblk0p2): re-mounted. Quota mode: none.
[    6.341025] systemd-journald[149]: Received client request to flush runtime journal.
[    6.371847] systemd-journald[149]: File /var/log/journal/26cb60e0cc034fe2b8c4a50e7a3dce20/system.journal corrupted or uncleanly shut down, renaming and replacing.
[    7.564179] mc: Linux media interface: v0.10
[    7.564769] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[    7.705132] videodev: Linux video capture interface: v2.00
[    7.722101] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[    7.722144] [vc_sm_connected_init]: start
[    7.743877] [vc_sm_connected_init]: installed successfully
[    7.806051] brcmstb-i2c fef04500.i2c:  @97500hz registered in polling mode
[    7.806856] brcmstb-i2c fef09500.i2c:  @97500hz registered in polling mode
[    7.873449] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    7.953622] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    7.959929] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    7.987656] rpivid_hevc: module is from the staging directory, the quality is unknown, you have been warned.
[    7.990026] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[    7.995245] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[    7.996274] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[    8.027023] rpivid feb10000.codec: Device registered as /dev/video19
[    8.037880] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video13
[    8.042461] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[    8.042529] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[    8.048708] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[    8.052407] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[    8.052463] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[    8.061061] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video14
[    8.062283] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[    8.062355] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[    8.063519] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video15
[    8.067522] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video16
[    8.067565] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[    8.067588] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[    8.067798] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[    8.067820] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[    8.068882] bcm2835-codec bcm2835-codec: Device registered as /dev/video18
[    8.068925] bcm2835-codec bcm2835-codec: Loaded V4L2 image_fx
[    8.074660] bcm2835-isp bcm2835-isp: Device node output[0] registered as /dev/video20
[    8.076522] bcm2835-isp bcm2835-isp: Device node capture[0] registered as /dev/video21
[    8.099880] bcm2835-codec bcm2835-codec: Device registered as /dev/video31
[    8.099938] bcm2835-codec bcm2835-codec: Loaded V4L2 encode_image
[    8.133421] bcm2835_audio bcm2835_audio: card created with 8 channels
[    8.160757] bcm2835-isp bcm2835-isp: Device node capture[1] registered as /dev/video22
[    8.181306] bcm2835-isp bcm2835-isp: Device node stats[2] registered as /dev/video23
[    8.181373] bcm2835-isp bcm2835-isp: Register output node 0 with media controller
[    8.181398] bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
[    8.181417] bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
[    8.181436] bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
[    8.188923] [drm] Initialized v3d 1.0.0 20180419 for fec00000.v3d on minor 0
[    8.219674] bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
[    8.457453] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    8.508601] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    8.534399] cfg80211: loaded regulatory.db is malformed or signature is missing/invalid
[    8.910771] brcmfmac: F1 signature read @0x18000000=0x15264345
[    8.924212] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[    8.925413] usbcore: registered new interface driver brcmfmac
[    9.218620] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Nov  1 2021 00:37:25 version 7.45.241 (1a2f2fa CY) FWID 01-703fd60
[    9.770602] Console: switching to colour dummy device 80x25
[    9.814028] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops [vc4])
[    9.824044] Registered IR keymap rc-cec
[    9.824329] rc rc0: vc4-hdmi-0 as /devices/platform/soc/fef00700.hdmi/rc/rc0
[    9.824637] input: vc4-hdmi-0 as /devices/platform/soc/fef00700.hdmi/rc/rc0/input4
[    9.880292] vc4-drm gpu: bound fef00700.hdmi (ops vc4_hdmi_ops [vc4])
[    9.900159] Registered IR keymap rc-cec
[    9.900415] rc rc1: vc4-hdmi-1 as /devices/platform/soc/fef05700.hdmi/rc/rc1
[    9.900649] input: vc4-hdmi-1 as /devices/platform/soc/fef05700.hdmi/rc/rc1/input5
[    9.955563] vc4-drm gpu: bound fef05700.hdmi (ops vc4_hdmi_ops [vc4])
[    9.968307] vc4-drm gpu: bound fe004000.txp (ops vc4_txp_ops [vc4])
[    9.980018] vc4-drm gpu: bound fe206000.pixelvalve (ops vc4_crtc_ops [vc4])
[   10.007178] vc4-drm gpu: bound fe207000.pixelvalve (ops vc4_crtc_ops [vc4])
[   10.034461] vc4-drm gpu: bound fe20a000.pixelvalve (ops vc4_crtc_ops [vc4])
[   10.034859] vc4-drm gpu: bound fe216000.pixelvalve (ops vc4_crtc_ops [vc4])
[   10.035517] vc4-drm gpu: bound fec12000.pixelvalve (ops vc4_crtc_ops [vc4])
[   10.287134] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 1
[   10.348951] uart-pl011 fe201000.serial: no DMA platform data
[   10.409658] Adding 102396k swap on /var/swap.  Priority:-2 extents:2 across:110588k SSFS
[   10.457427] Console: switching to colour frame buffer device 160x64
[   10.457504] vc4-drm gpu: [drm] fb0: vc4drmfb frame buffer device
[   11.101035] 8021q: 802.1Q VLAN Support v1.8
[   11.128493] IPv6: ADDRCONF(NETDEV_CHANGE): uap0: link becomes ready
[   11.566403] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
[   12.944350] bcmgenet fd580000.ethernet: configuring instance for external RGMII (RX delay)
[   12.945023] bcmgenet fd580000.ethernet eth0: Link is Down
[   17.023475] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   17.023514] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   19.257184] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   19.648869] Bluetooth: Core ver 2.22
[   19.648979] NET: Registered PF_BLUETOOTH protocol family
[   19.648987] Bluetooth: HCI device and connection manager initialized
[   19.649007] Bluetooth: HCI socket layer initialized
[   19.649018] Bluetooth: L2CAP socket layer initialized
[   19.649038] Bluetooth: SCO socket layer initialized
[   19.661997] Bluetooth: HCI UART driver ver 2.3
[   19.662025] Bluetooth: HCI UART protocol H4 registered
[   19.662112] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   19.662356] Bluetooth: HCI UART protocol Broadcom registered
[   19.927226] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   19.927249] Bluetooth: BNEP filters: protocol multicast
[   19.927265] Bluetooth: BNEP socket layer initialized
[   19.934315] Bluetooth: MGMT ver 1.22
[   19.946945] NET: Registered PF_ALG protocol family
[   20.122653] Bluetooth: RFCOMM TTY layer initialized
[   20.122684] Bluetooth: RFCOMM socket layer initialized
[   20.122705] Bluetooth: RFCOMM ver 1.11

EEPROM
------

BOOTLOADER: up to date
   CURRENT: Wed 11 Jan 2023 05:40:52 PM UTC (1673458852)
    LATEST: Wed 11 Jan 2023 05:40:52 PM UTC (1673458852)
   RELEASE: default (/lib/firmware/raspberrypi/bootloader/default)
            Use raspi-config to change the release.

  VL805_FW: Using bootloader EEPROM
     VL805: up to date
   CURRENT: 000138c0
    LATEST: 000138c0

I cut some network, USB and GPIO output to fit comment into 65536 limit

Logs There is no errors related to this bug in the logs

Additional context Can be reproduced with different window manager, but some of them works more stable than other. But all have frame drops and unstable vblank synchronization issue.

qrp73 commented 1 year ago

Some additional info. Just tried to test it with using KMS/DRM/GBM and EGL and it runs very stable with no tearing and no frame drops.

Any idea how WM/X11 can affect driver so it fails to perform vblank synchronization and can drop some frames?

popcornmix commented 1 year ago

Note that the display driver (vc4-kms-v3d) does not involve the firmware at all - it's a kernel side driver, so this isn't the right repo. Your comment that it works as desired with KMS/DRM/GBM and EGL suggests it's not a linux (kernel) issue either.

The Pi4 may use mutter as WM/compositor in some circumstances. I think it needs 2GB or more of RAM, and not to have enabled VNC server. Your logs suggest a 4GB part, but I can't say if you have enabled VNC.

Can you confirm if mutter is running. ps aux | grep mutter should confirm.

popcornmix commented 1 year ago

I have tested your code on a pi4 running bookworm (currently in beta testing). The good news is this seems to behave as desired. No visible tearing. "60.0 fps" is solidly displayed.

Note: bookworm is very different. It uses wayfire/wlroots for WM/compositor.

qrp73 commented 1 year ago

Note that the display driver (vc4-kms-v3d) does not involve the firmware at all - it's a kernel side driver, so this isn't the right repo. Your comment that it works as desired with KMS/DRM/GBM and EGL suggests it's not a linux (kernel) issue either.

Where is the code which waiting for vblank flag from hardware and performs page switch? Is that code is not a part of kernel/firmware?

As I know nvidia uses spinlock for vblank event waiting in fullscreen mode, it allows to get perfect sync with vblank event, perform buffer switch and return CPU to user code as fast as possible, it helps games to look very responsive and smooth with no tearing. Spinlock waste CPU time during vblank waiting, but since app working in fullscreen mode it working in exclusive mode and can do it in order to guarantee better performance for the rendering app and other processes can wait. May be such approach can be used to avoid these issues for RPI GPU?

The Pi4 may use mutter as WM/compositor in some circumstances. I think it needs 2GB or more of RAM, and not to have enabled VNC server. Your logs suggest a 4GB part, but I can't say if you have enabled VNC.

Can you confirm if mutter is running. ps aux | grep mutter should confirm.

Yes, mutter is running, I know about VNC issue, and yes - with mutter it works more stable, in window mode with mutter it has no screen tearing. But in fullscreen mode it still have screen tearing even with mutter.

The bad thing is that even the most stable configs with mutter still dropping some frames even when CPU load is almost zero and render loop is very simple and lightweight.

The interesting finding is that using EGL through KMS/DRM/GBM works very stable even if I run some heavy process in parallel. It seems that possible reason why it works unstable with X11 is that vblank waiting code works with low priority and fails to switch video buffers in time.

vblank is realtime event which processing is critical and cannot be delayed, it should be processed within guaranteed time interval, so I'm not sure - why it's processing is not handled on kernel/firmware side?

popcornmix commented 1 year ago

vblank is realtime event which processing is critical and cannot be delayed, it should be processed within guaranteed time interval, so I'm not sure - why it's processing is not handled on kernel/firmware side?

It's handled by kernel (as I said, firmware is not involved in the display pipeline these days): https://github.com/raspberrypi/linux/blob/fad58933544bb2a7b7db92847c25c79a83171fa6/drivers/gpu/drm/vc4/vc4_crtc.c#L845

And these is nothing wrong with how vsync is handled in the kernel (evidenced by the fact that KSM/DRM/GBM works as desired, and also wayland in new bookworm image).

But I believe on bullseye without mutter the framebuffer is single buffered so tears by design. With mutter it should be tear-free, but I think that relies on composition running fast enough.

But mutter is not used going forward, so there it is not going to get any fixes.

qrp73 commented 1 year ago

But I believe on bullseye without mutter the framebuffer is single buffered so tears by design. With mutter it should be tear-free, but I think that relies on composition running fast enough.

if it really single buffer, it explains screen tearing issues. But why it doesn't use double buffers? Is there any plans to add support for double buffered rendering?

But the strange thing is that X11 reports visuals which supporting double buffering and it allows to use it for rendering and screen tearing happens on visual with double buffer flag enabled...

qrp73 commented 1 year ago

not relevant anymore