Maxime Ripard <maxime@xxxxxxxxxx> 於 2020年6月29日 週一 下午10:21寫道: > > Hi! > > On Fri, Jun 05, 2020 at 04:44:51PM +0800, Jian-Hong Pan wrote: > > Maxime Ripard <maxime@xxxxxxxxxx> 於 2020年6月2日 週二 下午7:04寫道: > > > > > > Hi, > > > > > > On Mon, Jun 01, 2020 at 03:58:26PM +0800, Jian-Hong Pan wrote: > > > > Maxime Ripard <maxime@xxxxxxxxxx> 於 2020年5月28日 週四 下午3:30寫道: > > > > > > > > > > Hi Daniel, > > > > > > > > > > On Wed, May 27, 2020 at 05:15:12PM +0800, Daniel Drake wrote: > > > > > > On Wed, May 27, 2020 at 5:13 PM Maxime Ripard <maxime@xxxxxxxxxx> wrote: > > > > > > > I'm about to send a v3 today or tomorrow, I can Cc you (and Jian-Hong) if you > > > > > > > want. > > > > > > > > > > > > That would be great, although given the potentially inconsistent > > > > > > results we've been seeing so far it would be great if you could > > > > > > additionally push a git branch somewhere. > > > > > > That way we can have higher confidence that we are applying exactly > > > > > > the same patches to the same base etc. > > > > > > > > > > So I sent a new iteration yesterday, and of course forgot to cc you... Sorry for > > > > > that. > > > > > > > > > > I've pushed my current branch here: > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux.git/log/?h=rpi4-kms > > > > > > > > Thanks to Maxime! > > > > > > > > I have tried your repository on branch rpi4-kms. The DRM VC4 is used! > > > > But got some issues: > > > > 1. Some weird error message in dmesg. Not sure it is related, or not > > > > [ 5.219321] [drm:vc5_hdmi_init_resources] *ERROR* Failed to get > > > > HDMI state machine clock > > > > https://gist.github.com/starnight/3f317dca121065a361cf08e91225e389 > > > > > > That's a deferred probing. The first time the HDMI driver is being > > > probed, the firmware clock driver has not been probed yet. It's making > > > another attempt later on, which succeeds. > > > > > > > 2. The screen flashes suddenly sometimes. > > > > I append drm.debug=0x3 to boot command. Whenever, the screen flashes, > > I notice the logs like this: > > > > Jun 01 15:22:40 endless kernel: [drm:drm_calc_timestamping_constants] > > crtc 64: hwmode: htotal 2200, vtotal 1125, vdisplay 1080 > > Jun 01 15:22:40 endless kernel: [drm:drm_calc_timestamping_constants] > > crtc 64: clock 148500 kHz framedur 16666666 linedur 14814 > > Jun 01 15:22:40 endless kernel: [drm:drm_vblank_enable] enabling > > vblank on crtc 3, ret: 0 > > Jun 01 15:22:40 endless kernel: [drm:drm_mode_object_put.part.0] OBJ ID: 159 (2) > > Jun 01 15:22:40 endless kernel: [drm:drm_mode_object_put.part.0] OBJ ID: 154 (1) > > Jun 01 15:22:40 endless kernel: [drm:vblank_disable_fn] disabling > > vblank on crtc 3 > > Jun 01 15:22:42 endless kernel: [drm:drm_ioctl] pid=584, dev=0xe200, > > auth=1, DRM_IOCTL_MODE_CURSOR > > Jun 01 15:22:42 endless kernel: [drm:drm_ioctl] pid=584, dev=0xe200, > > auth=1, DRM_IOCTL_MODE_CURSOR2 > > Jun 01 15:22:42 endless kernel: [drm:drm_mode_object_get] OBJ ID: 159 (1) > > Jun 01 15:22:42 endless kernel: [drm:drm_mode_object_get] OBJ ID: 154 (1) > > Jun 01 15:22:42 endless kernel: [drm:drm_calc_timestamping_constants] > > crtc 64: hwmode: htotal 2200, vtotal 1125, vdisplay 1080 > > Jun 01 15:22:42 endless kernel: [drm:drm_calc_timestamping_constants] > > crtc 64: clock 148500 kHz framedur 16666666 linedur 14814 > > Jun 01 15:22:42 endless kernel: [drm:drm_vblank_enable] enabling > > vblank on crtc 3, ret: 0 > > Jun 01 15:22:42 endless kernel: [drm:drm_mode_object_put.part.0] OBJ ID: 159 (2) > > Jun 01 15:22:42 endless kernel: [drm:drm_mode_object_put.part.0] OBJ ID: 154 (2) > > > > Here is the full log > > https://gist.github.com/starnight/85d641819839eddc7a55ca7173990a56 > > > > > > 3. The higher resolutions, like 1920x1080 ... are lost after hot > > > > re-plug HDMI cable (HDMI0) > > > > I should explain this in more detail. Here are the steps to reproduce > > this issue: > > 1. Before unplug the HDMI cable from HDMI0 port. > > $ xrandr > > Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 2048 x 2048 > > HDMI-1 connected primary 1920x1080+0+0 (normal left inverted right x > > axis y axis) 521mm x 293mm > > 1920x1080 60.00*+ 50.00 59.94 > > 1920x1080i 60.00 50.00 59.94 > > 1680x1050 59.88 > > 1280x1024 75.02 60.02 > > 1440x900 59.90 > > 1280x960 60.00 > > 1152x864 75.00 > > 1280x720 60.00 50.00 59.94 > > 1440x576 50.00 > > 1024x768 75.03 70.07 60.00 > > 1440x480 60.00 59.94 > > 832x624 74.55 > > 800x600 72.19 75.00 60.32 56.25 > > 720x576 50.00 > > 720x480 60.00 59.94 > > 640x480 75.00 72.81 66.67 60.00 59.94 > > 720x400 70.08 > > HDMI-2 disconnected (normal left inverted right x axis y axis) > > > > 2. Unplug the HDMI cable from HDMI0 port. > > 3. Plug the HDMI cable to **HDMI1** port. > > $ xrandr > > Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 2048 x 2048 > > HDMI-1 disconnected (normal left inverted right x axis y axis) > > HDMI-2 connected primary 1920x1080+0+0 (normal left inverted right x > > axis y axis) 521mm x 293mm > > 1920x1080 60.00*+ 50.00 59.94 > > 1920x1080i 60.00 50.00 59.94 > > 1680x1050 59.88 > > 1280x1024 75.02 60.02 > > 1440x900 59.90 > > 1280x960 60.00 > > 1152x864 75.00 > > 1280x720 60.00 50.00 59.94 > > 1440x576 50.00 > > 1024x768 75.03 70.07 60.00 > > 1440x480 60.00 59.94 > > 832x624 74.55 > > 800x600 72.19 75.00 60.32 56.25 > > 720x576 50.00 > > 720x480 60.00 59.94 > > 640x480 75.00 72.81 66.67 60.00 59.94 > > 720x400 70.08 > > > > 4. Unplug the HDMI cable from **HDMI1** port. > > 5. Plug the HDMI cable back to HDMI0 port. > > $ xrandr > > Screen 0: minimum 320 x 200, current 1368 x 768, maximum 2048 x 2048 > > HDMI-1 connected primary 1368x768+0+0 (normal left inverted right x > > axis y axis) 0mm x 0mm > > 1368x768 59.88* > > 1360x768 59.80 > > 1280x800 59.81 > > 1152x864 60.00 > > 1280x720 59.86 > > 1024x768 60.00 > > 1024x576 59.90 > > 960x540 59.63 > > 800x600 60.32 > > 800x450 59.82 > > 700x450 59.88 > > 640x480 59.94 > > 684x384 59.88 59.85 > > 680x384 59.80 59.96 > > 640x400 59.88 59.98 > > 576x432 60.06 > > 640x360 59.86 59.83 > > 512x384 60.00 > > 512x288 60.00 59.92 > > 480x270 59.63 59.82 > > 400x300 60.32 > > 320x240 60.05 > > HDMI-2 disconnected (normal left inverted right x axis y axis) > > Sorry for getting back at it so late. I just tested with modetest only > and my current branch and it seems to behave properly. Did you had to > run X to get that issue, or is it just how you noticed it? > > Also, was that with the branch based on 5.7 I pushed on my git tree on > kernel.org or some earlier revision of the series? Thanks for coming back :) I use GNOME 3.36 with Xorg 1.20.4. To understand when it starts to hit the issues, I separate to step by step: 1. System boots into command line mode first (systemd multi-user.target) 2. Execute Xorg, then xterm. 3. Execute mutter upon the screen of Xorg. I tried both branches rpi4-kms and rpi4-kms-5.7 of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux.git Both of the branches hit issues: * The screen flashes suddenly sometimes. This happens after mutter is launched. * The higher resolutions, like 1920x1080 ... are lost after hot re-plug HDMI cable (HDMI0). HDMI cable connects to HDMI0 -> HDMI1 -> HDMI0. This happens not only with GNOME, but also pure Xorg. Jian-Hong Pan