-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Hello.
There is totally broken VOP for rk3288 platforms (TinkerBoard, ...). It usually boots only to 800x600 resolution that pass both errors (see also http://tinkerboarding.co.uk/forum/showthread.php?tid=61&pid=323#pid323).
I identified 2 issues in rockchip DRM/kernel but unable to correct:
1) nearly all output modes are blocked for DMT/VESA modes
Problem is in new validity checking (commit 7e3e0c5) and/or modification of "dclk_vop" clock driver (commit d072a98 maybe other). Due to strictly checking available clock in vop_crtc_mode_valid() (see https://github.com/rockchip-linux/kernel/blob/release-4.4/drivers/gpu/drm/rockchip/rockchip_drm_vop.c#L1443) and some modification in "dclk_vop" clock driver it is not possible to set even basic DMT/VESA modes. Mode validation fails with MODE_CLOCK_RANGE. Example (compare clock != request_clock from code):
Modeline 100:"1280x1024" 75 135000 1280 1296 1440 1688 1024 1025 1028 1066 0x40 0x5
clock error: 133333 != 135000
Modeline 80:"1280x1024" 60 108000 1280 1328 1440 1688 1024 1025 1028 1066 0x48 0x5
clock error: 100000 != 108000
Modeline 88:"1024x768" 75 78800 1024 1040 1136 1312 768 769 772 800 0x40 0x5
clock error: 74250 != 78800
Modeline 90:"1024x768" 60 65000 1024 1048 1184 1344 768 771 777 806 0x40 0xa
clock error: 62500 != 65000
2) check modes to "fail-safe" framebuffer size (1024x768) and not to maximum available
The problem is in late hdmi start (state "connected"). Framebuffer is already set do "1024x768" default but new modes are validated to this resolution and not to maximum available (8192x8192?). Mode validation fails with MODE_VIRTUAL_X. Sample from dmesg (XXXX is inside drm_mode_validate_size() "DRM_DEBUG_KMS("XXXX %dx%d %dx%d\n", mode->hdisplay, mode->vdisplay, maxX, maxY);" and "dump_stack()" shows call from drm_fb_helper_hotplug_event() (https://github.com/rockchip-linux/kernel/blob/release-4.4/drivers/gpu/drm/drm_fb_helper.c#L2161) and from rockchip_drm_output_poll_changed() (https://github.com/rockchip-linux/kernel/blob/release-4.4/drivers/gpu/drm/rockchip/rockchip_drm_fb.c#L220)):
[ 1.440674] [drm:drm_helper_probe_single_connector_modes_merge_bits] [CONNECTOR:78:HDMI-A-1] disconnected
[ 1.440693] rockchip-drm display-subsystem: No connectors reported connected with modes
[ 1.448764] [drm:drm_setup_crtcs]
[ 1.448795] [drm:drm_sysfs_hotplug_event] generating hotplug event
[ 1.448849] [drm:drm_enable_connectors] connector 78 enabled? no
[ 1.448865] [drm:drm_setup_crtcs] picking CRTCs for 8192x8192 config
[ 1.448881] [drm:drm_fb_helper_single_fb_probe] Cannot find any crtc or sizes - going 1024x768
[ 1.462950] [drm:rockchip_gem_get_pages] rockchip_gem_get_pages, 201, end = 768, n_pages = 768
[ 1.467034] [drm:rockchip_drm_fbdev_create] FB [1024x768]-24 kvaddr=f0921000 offset=0 size=3145728
....
[ 4.246398] [drm:drm_helper_hpd_irq_event] [CONNECTOR:78:HDMI-A-1] status updated from disconnected to connected
[ 4.246411] [drm:drm_sysfs_hotplug_event] generating hotplug event
[ 4.246451] [drm:drm_fb_helper_hotplug_event]
[ 4.246467] [drm:drm_helper_probe_single_connector_modes_merge_bits] [CONNECTOR:78:HDMI-A-1]
....
[ 4.572432] [drm:drm_mode_validate_size] XXXX 1280x1024 1024x768
Are there any new patches to resolve this issues ?
Thanks, Martin