Hello,
I did another run with drm.debug=0xff and also tried to figure out where the div-by-zero comes from.
The only division I see is in fimd_calc_clkdiv() (which is called by fimd_commit()). So it looks like 'ideal_clk' is zero when calling DIV_ROUND_UP().
'htotal' and 'vtotal' can't be zero, since this is checked early in fimd_commit(). So 'vrefresh' has to be zero. Maybe this helps?
With best wishes, Tobias
kernel log: [ 178.351424] [drm:drm_stub_open] [ 178.351443] [drm:drm_open_helper] pid = 2645, minor = 0 [ 178.351457] [drm:ipp_subdrv_open] done priv[0xed9b6410] [ 178.351469] [drm:drm_setup] [ 178.351501] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_VERSION [ 178.351515] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_VERSION [ 178.351544] [drm:drm_release] open_count = 1 [ 178.351559] [drm:drm_release] pid = 2645, device = 0xe200, open_count = 1 [ 178.351575] [drm:drm_lastclose] [ 178.351667] [drm:drm_atomic_state_alloc] Allocate atomic state ec0567c0 [ 178.351685] [drm:drm_atomic_get_crtc_state] Added [CRTC:21] ed0e2e00 state to ec0567c0 [ 178.351697] [drm:drm_atomic_get_plane_state] Added [PLANE:17] ec056c80 state to ec0567c0 [ 178.351706] [drm:drm_atomic_set_crtc_for_plane] Link plane state ec056c80 to [NOCRTC] [ 178.351714] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for plane state ec056c80 [ 178.351724] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:21] to ec0567c0 [ 178.351734] [drm:drm_atomic_check_only] checking ec0567c0 [ 178.351749] [drm:drm_atomic_commit] commiting ec0567c0 [ 178.351764] [drm:drm_atomic_state_clear] Clearing atomic state ec0567c0 [ 178.351778] [drm:drm_atomic_state_free] Freeing atomic state ec0567c0 [ 178.351794] [drm:drm_atomic_state_alloc] Allocate atomic state ec0567c0 [ 178.351806] [drm:drm_atomic_get_crtc_state] Added [CRTC:29] ed0e2a00 state to ec0567c0 [ 178.351817] [drm:drm_atomic_get_plane_state] Added [PLANE:24] ec056d00 state to ec0567c0 [ 178.351826] [drm:drm_atomic_set_crtc_for_plane] Link plane state ec056d00 to [CRTC:29] [ 178.351835] [drm:drm_framebuffer_reference] ee266c00: FB ID: 40 (1) [ 178.351842] [drm:drm_atomic_set_fb_for_plane] Set [FB:40] for plane state ec056d00 [ 178.351854] [drm:drm_atomic_get_connector_state] Added [CONNECTOR:31] ec0560c0 state to ec0567c0 [ 178.351871] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:29] to ec0567c0 [ 178.351886] [drm:drm_atomic_set_crtc_for_connector] Link connector state ec0560c0 to [CRTC:29] [ 178.351899] [drm:drm_atomic_check_only] checking ec0567c0 [ 178.351915] [drm:drm_atomic_helper_check_modeset] [CRTC:29] mode changed [ 178.351928] [drm:drm_atomic_helper_check_modeset] [CRTC:29] enable changed [ 178.351942] [drm:update_connector_routing] Updating routing for [CONNECTOR:31:VGA-1] [ 178.351959] [drm:update_connector_routing] [CONNECTOR:31:VGA-1] using [ENCODER:30:TMDS-30] on [CRTC:29] [ 178.351973] [drm:drm_atomic_helper_check_modeset] [CRTC:29] active changed [ 178.351990] [drm:drm_atomic_helper_check_modeset] [CRTC:29] needs all connectors, enable: y, active: y [ 178.352006] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:29] to ec0567c0 [ 178.352020] [drm:drm_atomic_connectors_for_crtc] State ec0567c0 has 1 connectors for [CRTC:29] [ 178.352032] [drm:exynos_drm_fb_buffer] dma_addr = 0x20100000 [ 178.352040] [drm:exynos_plane_atomic_check] buffer: 0, dma_addr = 0x20100000 [ 178.352048] [drm:drm_atomic_commit] commiting ec0567c0 [ 178.352058] [drm:crtc_set_mode] modeset on [CRTC:29] [ 178.352065] [drm:crtc_set_mode] modeset on [ENCODER:30:TMDS-30] [ 178.352093] [drm:exynos_plane_mode_set] plane : offset_x/y(0,0), width/height(1366,768) [ 178.352102] [drm:drm_atomic_helper_commit_modeset_enables] enabling [CRTC:29] [ 178.352111] [drm:fimd_dpms] drivers/gpu/drm/exynos/exynos_drm_fimd.c, 0 [ 178.352168] Division by zero in kernel. [ 178.352181] CPU: 1 PID: 2645 Comm: lt-modetest Not tainted 4.1.0-rc3-debug+ #2 [ 178.352187] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [ 178.352194] Backtrace: [ 178.352219] [<c00132b0>] (dump_backtrace) from [<c00134c8>] (show_stack+0x18/0x1c) [ 178.352225] r6:c06f9a08 r5:ffffffff r4:00000000 r3:dc8ba300 [ 178.352253] [<c00134b0>] (show_stack) from [<c04f2138>] (dump_stack+0x88/0xc8) [ 178.352265] [<c04f20b0>] (dump_stack) from [<c0013434>] (__div0+0x1c/0x20) [ 178.352270] r6:00000003 r5:00000000 r4:ed9cd010 r3:00000000 [ 178.352293] [<c0013418>] (__div0) from [<c020dc14>] (Ldiv0+0x8/0x10) [ 178.352309] [<c02b5e08>] (fimd_commit) from [<c02b6200>] (fimd_poweron.part.9+0xd4/0x19c) [ 178.352314] r9:ee14cc00 r8:c06ffcbc r7:c0748f94 r6:ed9cda70 r5:ed9cd010 r4:00000005 [ 178.352338] [<c02b612c>] (fimd_poweron.part.9) from [<c02b6354>] (fimd_dpms+0x8c/0xb4) [ 178.352344] r6:ee14cc00 r5:00000000 r4:c0748f94 r3:00000001 [ 178.352363] [<c02b62c8>] (fimd_dpms) from [<c02b1bf4>] (exynos_drm_crtc_enable+0x34/0x7c) [ 178.352369] r6:ec0567c0 r5:ed9cd020 r4:ee14cc00 r3:c02b62c8 [ 178.352393] [<c02b1bc0>] (exynos_drm_crtc_enable) from [<c028c0e8>] (drm_atomic_helper_commit_modeset_enables+0x98/0x1c8) [ 178.352399] r5:ee14cc00 r4:00000001 [ 178.352416] [<c028c050>] (drm_atomic_helper_commit_modeset_enables) from [<c028e6ac>] (drm_atomic_helper_commit+0x124/0x170) [ 178.352421] r8:00000000 r7:ed978000 r6:00000000 r5:ec0567c0 r4:0000000b r3:00000000 [ 178.352445] [<c028e588>] (drm_atomic_helper_commit) from [<c02b2794>] (exynos_atomic_commit+0x14/0x18) [ 178.352450] r8:ee14cc00 r7:00000000 r6:ee2385a8 r5:ed978000 r4:ec0567c0 r3:c02b2780 [ 178.352473] [<c02b2780>] (exynos_atomic_commit) from [<c02af928>] (drm_atomic_commit+0x4c/0x6c) [ 178.352483] [<c02af8dc>] (drm_atomic_commit) from [<c028d250>] (drm_atomic_helper_set_config+0x31c/0x428) [ 178.352489] r5:ec0567c0 r4:00000003 [ 178.352508] [<c028cf34>] (drm_atomic_helper_set_config) from [<c029f14c>] (drm_mode_set_config_internal+0x60/0xdc) [ 178.352514] r10:00000000 r9:ed978000 r8:ee238300 r7:ee14cc00 r6:00000002 r5:00000050 [ 178.352533] r4:ee266c00 [ 178.352547] [<c029f0ec>] (drm_mode_set_config_internal) from [<c0290c2c>] (drm_fb_helper_restore_fbdev_mode_unlocked+0xec/0x140) [ 178.352553] r7:ee2385a8 r6:00000002 r5:00000050 r4:00000000 [ 178.352573] [<c0290b40>] (drm_fb_helper_restore_fbdev_mode_unlocked) from [<c02b2658>] (exynos_drm_fbdev_restore_mode+0x28/0x2c) [ 178.352579] r10:ed97814c r9:ed051c00 r8:ed978034 r7:ed978000 r6:ed978058 r5:c0748f94 [ 178.352598] r4:ed978000 [ 178.352609] [<c02b2630>] (exynos_drm_fbdev_restore_mode) from [<c02b1068>] (exynos_drm_lastclose+0x10/0x14) [ 178.352619] [<c02b1058>] (exynos_drm_lastclose) from [<c0294564>] (drm_lastclose+0x3c/0x10c) [ 178.352627] [<c0294528>] (drm_lastclose) from [<c0294974>] (drm_release+0x340/0x4e0) [ 178.352633] r6:ed978058 r5:ec2a16a8 r4:ec2a1600 r3:00000000 [ 178.352658] [<c0294634>] (drm_release) from [<c0103ca8>] (__fput+0xa0/0x1e4) [ 178.352663] r10:00000000 r9:00000008 r8:ed84f600 r7:edc0c428 r6:edb67b10 r5:ed84f600 [ 178.352681] r4:ec2a1700 [ 178.352693] [<c0103c08>] (__fput) from [<c0103e58>] (____fput+0x10/0x14) [ 178.352698] r10:00000000 r9:ec11e000 r8:c000fc04 r7:ed918a80 r6:c0718ef8 r5:00000000 [ 178.352717] r4:ed918e84 [ 178.352732] [<c0103e48>] (____fput) from [<c00473b0>] (task_work_run+0xb8/0xfc) [ 178.352746] [<c00472f8>] (task_work_run) from [<c0012ec8>] (do_work_pending+0x88/0xa8) [ 178.352752] r7:00000006 r6:ec11ffb0 r5:c000fc04 r4:ec11e000 [ 178.352772] [<c0012e40>] (do_work_pending) from [<c000faa4>] (work_pending+0xc/0x20) [ 178.352778] r6:00000000 r5:00000001 r4:00000003 r3:00000000 [ 178.352802] [drm:fimd_win_commit] start addr = 0x20100000, end addr = 0x20500800, size = 0x400800 [ 178.352810] [drm:fimd_win_commit] ovl_width = 1366, ovl_height = 768 [ 178.352819] [drm:fimd_win_commit] osd pos: tx = 0, ty = 0, bx = 1365, by = 767 [ 178.352827] [drm:fimd_win_commit] osd size = 0x100200 [ 178.352834] [drm:fimd_win_set_pixfmt] bpp = 32 [ 178.352846] Division by zero in kernel. [ 178.352857] CPU: 1 PID: 2645 Comm: lt-modetest Not tainted 4.1.0-rc3-debug+ #2 [ 178.352863] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [ 178.352868] Backtrace: [ 178.352882] [<c00132b0>] (dump_backtrace) from [<c00134c8>] (show_stack+0x18/0x1c) [ 178.352888] r6:c06f9a08 r5:ffffffff r4:00000000 r3:dc8ba300 [ 178.352911] [<c00134b0>] (show_stack) from [<c04f2138>] (dump_stack+0x88/0xc8) [ 178.352922] [<c04f20b0>] (dump_stack) from [<c0013434>] (__div0+0x1c/0x20) [ 178.352928] r6:00000003 r5:00000000 r4:ed9cd010 r3:00000000 [ 178.352949] [<c0013418>] (__div0) from [<c020dc14>] (Ldiv0+0x8/0x10) [ 178.352961] [<c02b5e08>] (fimd_commit) from [<c02b1c38>] (exynos_drm_crtc_enable+0x78/0x7c) [ 178.352967] r9:ee14cc00 r8:c06ffcbc r7:c0748f94 r6:ec0567c0 r5:ed9cd020 r4:ee14cc00 [ 178.352992] [<c02b1bc0>] (exynos_drm_crtc_enable) from [<c028c0e8>] (drm_atomic_helper_commit_modeset_enables+0x98/0x1c8) [ 178.352998] r5:ee14cc00 r4:00000001 [ 178.353038] [<c028c050>] (drm_atomic_helper_commit_modeset_enables) from [<c028e6ac>] (drm_atomic_helper_commit+0x124/0x170) [ 178.353053] r8:00000000 r7:ed978000 r6:00000000 r5:ec0567c0 r4:0000000b r3:00000000 [ 178.353114] [<c028e588>] (drm_atomic_helper_commit) from [<c02b2794>] (exynos_atomic_commit+0x14/0x18) [ 178.353127] r8:ee14cc00 r7:00000000 r6:ee2385a8 r5:ed978000 r4:ec0567c0 r3:c02b2780 [ 178.353190] [<c02b2780>] (exynos_atomic_commit) from [<c02af928>] (drm_atomic_commit+0x4c/0x6c) [ 178.353212] [<c02af8dc>] (drm_atomic_commit) from [<c028d250>] (drm_atomic_helper_set_config+0x31c/0x428) [ 178.353224] r5:ec0567c0 r4:00000003 [ 178.353261] [<c028cf34>] (drm_atomic_helper_set_config) from [<c029f14c>] (drm_mode_set_config_internal+0x60/0xdc) [ 178.353273] r10:00000000 r9:ed978000 r8:ee238300 r7:ee14cc00 r6:00000002 r5:00000050 [ 178.353328] r4:ee266c00 [ 178.353351] [<c029f0ec>] (drm_mode_set_config_internal) from [<c0290c2c>] (drm_fb_helper_restore_fbdev_mode_unlocked+0xec/0x140) [ 178.353356] r7:ee2385a8 r6:00000002 r5:00000050 r4:00000000 [ 178.353377] [<c0290b40>] (drm_fb_helper_restore_fbdev_mode_unlocked) from [<c02b2658>] (exynos_drm_fbdev_restore_mode+0x28/0x2c) [ 178.353383] r10:ed97814c r9:ed051c00 r8:ed978034 r7:ed978000 r6:ed978058 r5:c0748f94 [ 178.353401] r4:ed978000 [ 178.353412] [<c02b2630>] (exynos_drm_fbdev_restore_mode) from [<c02b1068>] (exynos_drm_lastclose+0x10/0x14) [ 178.353422] [<c02b1058>] (exynos_drm_lastclose) from [<c0294564>] (drm_lastclose+0x3c/0x10c) [ 178.353431] [<c0294528>] (drm_lastclose) from [<c0294974>] (drm_release+0x340/0x4e0) [ 178.353436] r6:ed978058 r5:ec2a16a8 r4:ec2a1600 r3:00000000 [ 178.353456] [<c0294634>] (drm_release) from [<c0103ca8>] (__fput+0xa0/0x1e4) [ 178.353462] r10:00000000 r9:00000008 r8:ed84f600 r7:edc0c428 r6:edb67b10 r5:ed84f600 [ 178.353480] r4:ec2a1700 [ 178.353492] [<c0103c08>] (__fput) from [<c0103e58>] (____fput+0x10/0x14) [ 178.353498] r10:00000000 r9:ec11e000 r8:c000fc04 r7:ed918a80 r6:c0718ef8 r5:00000000 [ 178.353516] r4:ed918e84 [ 178.353530] [<c0103e48>] (____fput) from [<c00473b0>] (task_work_run+0xb8/0xfc) [ 178.353542] [<c00472f8>] (task_work_run) from [<c0012ec8>] (do_work_pending+0x88/0xa8) [ 178.353547] r7:00000006 r6:ec11ffb0 r5:c000fc04 r4:ec11e000 [ 178.353567] [<c0012e40>] (do_work_pending) from [<c000faa4>] (work_pending+0xc/0x20) [ 178.353573] r6:00000000 r5:00000001 r4:00000003 r3:00000000 [ 178.353591] [drm:drm_atomic_helper_commit_modeset_enables] enabling [ENCODER:30:TMDS-30] [ 178.353603] [drm:drm_vblank_enable] enabling vblank on crtc 1, ret: 0 [ 178.353613] [drm:drm_update_vblank_count] updating vblank count on crtc 1, missed 0 [ 178.401638] [drm:drm_atomic_state_clear] Clearing atomic state ec0567c0 [ 178.401654] [drm:drm_atomic_state_free] Freeing atomic state ec0567c0 [ 178.401668] [drm:drm_framebuffer_reference] ee266c00: FB ID: 40 (2) [ 178.401683] [drm:drm_atomic_state_alloc] Allocate atomic state ec0567c0 [ 178.401698] [drm:drm_atomic_get_crtc_state] Added [CRTC:35] ed0e2800 state to ec0567c0 [ 178.401710] [drm:drm_atomic_get_plane_state] Added [PLANE:32] ec056f80 state to ec0567c0 [ 178.401718] [drm:drm_atomic_set_crtc_for_plane] Link plane state ec056f80 to [NOCRTC] [ 178.401725] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for plane state ec056f80 [ 178.401735] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:35] to ec0567c0 [ 178.401744] [drm:drm_atomic_check_only] checking ec0567c0 [ 178.401756] [drm:drm_atomic_commit] commiting ec0567c0 [ 178.401768] [drm:drm_atomic_state_clear] Clearing atomic state ec0567c0 [ 178.401779] [drm:drm_atomic_state_free] Freeing atomic state ec0567c0 [ 178.401790] [drm:drm_framebuffer_reference] ee266c00: FB ID: 40 (3) [ 178.401798] [drm:drm_framebuffer_unreference] ee266c00: FB ID: 40 (4) [ 178.401811] [drm:drm_lastclose] driver lastclose completed [ 178.401820] [drm:drm_lastclose] lastclose completed [ 178.401889] [drm:drm_stub_open] [ 178.401902] [drm:drm_open_helper] pid = 2645, minor = 0 [ 178.401916] [drm:ipp_subdrv_open] done priv[0xed9b6410] [ 178.401927] [drm:drm_setup] [ 178.401947] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_VERSION [ 178.401960] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_VERSION [ 178.401996] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_GET_UNIQUE [ 178.402007] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_GET_UNIQUE [ 178.402038] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_SET_CLIENT_CAP [ 178.402056] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETRESOURCES [ 178.402068] [drm:drm_mode_getresources] CRTC[3] CONNECTORS[3] ENCODERS[3] [ 178.402078] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETRESOURCES [ 178.402089] [drm:drm_mode_getresources] CRTC[3] CONNECTORS[3] ENCODERS[3] [ 178.402109] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCRTC [ 178.402129] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCRTC [ 178.402147] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCRTC [ 178.402168] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETENCODER [ 178.402181] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETENCODER [ 178.402193] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETENCODER [ 178.402209] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCONNECTOR [ 178.402218] [drm:drm_mode_getconnector] [CONNECTOR:23:?] [ 178.402229] [drm:drm_helper_probe_single_connector_modes_merge_bits] [CONNECTOR:23:Virtual-1] [ 178.402238] [drm:drm_helper_probe_single_connector_modes_merge_bits] [CONNECTOR:23:Virtual-1] disconnected [ 178.402252] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCONNECTOR [ 178.402261] [drm:drm_mode_getconnector] [CONNECTOR:23:?] [ 178.402277] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCONNECTOR [ 178.402285] [drm:drm_mode_getconnector] [CONNECTOR:31:?] [ 178.402295] [drm:drm_helper_probe_single_connector_modes_merge_bits] [CONNECTOR:31:VGA-1] [ 178.402316] [drm:drm_helper_probe_single_connector_modes_merge_bits] [CONNECTOR:31:VGA-1] probed modes : [ 178.402330] [drm:drm_mode_debug_printmodeline] Modeline 38:"1366x768" 0 500 1366 1414 1446 1526 768 771 776 790 0x48 0x5 [ 178.402344] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCONNECTOR [ 178.402352] [drm:drm_mode_getconnector] [CONNECTOR:31:?] [ 178.402369] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCONNECTOR [ 178.402377] [drm:drm_mode_getconnector] [CONNECTOR:37:?] [ 178.402387] [drm:drm_helper_probe_single_connector_modes_merge_bits] [CONNECTOR:37:HDMI-A-1] [ 178.402402] [drm:drm_helper_probe_single_connector_modes_merge_bits] [CONNECTOR:37:HDMI-A-1] disconnected [ 178.402415] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCONNECTOR [ 178.402423] [drm:drm_mode_getconnector] [CONNECTOR:37:?] [ 178.402445] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.402471] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.402495] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.402518] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.402542] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.402565] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.402589] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.402612] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.402641] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.402667] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.402698] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.402723] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.402748] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.402772] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.402796] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.402820] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.402846] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.402870] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.402896] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.402920] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.402944] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.402967] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.402997] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANERESOURCES [ 178.403009] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANERESOURCES [ 178.403027] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403039] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403052] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403064] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403077] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403088] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403101] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403113] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403125] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403137] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403165] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403178] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403191] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403202] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403215] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403226] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403238] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403249] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403262] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403273] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403285] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403296] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 178.403309] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.403333] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.403359] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.403383] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.403410] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.403434] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.403460] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.403484] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.403511] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.403534] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.403559] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.403583] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.403608] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.403632] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.403658] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.403681] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.403705] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.403729] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.403754] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.403778] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.403804] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.403827] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.403852] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.403876] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.403902] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.403926] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.403951] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.403975] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.404001] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404025] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404051] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404074] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404099] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.404123] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.404149] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404173] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404199] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404223] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404247] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.404271] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.404297] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404321] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404348] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404371] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404396] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.404420] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.404445] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404469] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404495] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.404518] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.404543] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404567] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404601] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404625] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404650] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.404674] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 178.404700] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404724] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404750] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.404773] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 178.406785] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPBLOB [ 178.406824] [drm:drm_ioctl] ret = -2 [ 178.407568] [drm:drm_ioctl] pid=2645, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPBLOB [ 178.407593] [drm:drm_ioctl] ret = -2 [ 178.431659] [drm:drm_release] open_count = 1 [ 178.431681] [drm:drm_release] pid = 2645, device = 0xe200, open_count = 1 [ 178.431699] [drm:drm_lastclose] [ 178.431731] [drm:drm_atomic_state_alloc] Allocate atomic state ec0561c0 [ 178.431746] [drm:drm_atomic_get_crtc_state] Added [CRTC:21] ed0e3800 state to ec0561c0 [ 178.431758] [drm:drm_atomic_get_plane_state] Added [PLANE:17] ec056d80 state to ec0561c0 [ 178.431766] [drm:drm_atomic_set_crtc_for_plane] Link plane state ec056d80 to [NOCRTC] [ 178.431774] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for plane state ec056d80 [ 178.431784] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:21] to ec0561c0 [ 178.431794] [drm:drm_atomic_check_only] checking ec0561c0 [ 178.431806] [drm:drm_atomic_commit] commiting ec0561c0 [ 178.431819] [drm:drm_atomic_state_clear] Clearing atomic state ec0561c0 [ 178.431828] [drm:drm_atomic_state_free] Freeing atomic state ec0561c0 [ 178.431840] [drm:drm_framebuffer_reference] ee266c00: FB ID: 40 (3) [ 178.431849] [drm:drm_framebuffer_unreference] ee266c00: FB ID: 40 (4) [ 178.431861] [drm:drm_atomic_state_alloc] Allocate atomic state ec0561c0 [ 178.431872] [drm:drm_atomic_get_crtc_state] Added [CRTC:29] ed0e2e00 state to ec0561c0 [ 178.431882] [drm:drm_framebuffer_reference] ee266c00: FB ID: 40 (3) [ 178.431890] [drm:drm_atomic_get_plane_state] Added [PLANE:24] ec056c80 state to ec0561c0 [ 178.431899] [drm:drm_atomic_set_crtc_for_plane] Link plane state ec056c80 to [CRTC:29] [ 178.431907] [drm:drm_framebuffer_unreference] ee266c00: FB ID: 40 (4) [ 178.431915] [drm:drm_framebuffer_reference] ee266c00: FB ID: 40 (3) [ 178.431922] [drm:drm_atomic_set_fb_for_plane] Set [FB:40] for plane state ec056c80 [ 178.431934] [drm:drm_atomic_get_connector_state] Added [CONNECTOR:31] ec056040 state to ec0561c0 [ 178.431943] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:29] to ec0561c0 [ 178.431952] [drm:drm_atomic_set_crtc_for_connector] Link connector state ec056040 to [NOCRTC] [ 178.431960] [drm:drm_atomic_set_crtc_for_connector] Link connector state ec056040 to [CRTC:29] [ 178.431967] [drm:drm_atomic_check_only] checking ec0561c0 [ 178.431977] [drm:update_connector_routing] Updating routing for [CONNECTOR:31:VGA-1] [ 178.431987] [drm:update_connector_routing] [CONNECTOR:31:VGA-1] keeps [ENCODER:30:TMDS-30], now on [CRTC:29] [ 178.431996] [drm:exynos_drm_fb_buffer] dma_addr = 0x20100000 [ 178.432004] [drm:exynos_plane_atomic_check] buffer: 0, dma_addr = 0x20100000 [ 178.432012] [drm:drm_atomic_commit] commiting ec0561c0 [ 178.432023] [drm:exynos_plane_mode_set] plane : offset_x/y(0,0), width/height(1366,768) [ 178.432034] [drm:fimd_win_commit] start addr = 0x20100000, end addr = 0x20500800, size = 0x400800 [ 178.432042] [drm:fimd_win_commit] ovl_width = 1366, ovl_height = 768 [ 178.432051] [drm:fimd_win_commit] osd pos: tx = 0, ty = 0, bx = 1365, by = 767 [ 178.432058] [drm:fimd_win_commit] osd size = 0x100200 [ 178.432066] [drm:fimd_win_set_pixfmt] bpp = 32 [ 178.432075] [drm:drm_atomic_state_clear] Clearing atomic state ec0561c0 [ 178.432085] [drm:drm_framebuffer_unreference] ee266c00: FB ID: 40 (4) [ 178.432093] [drm:drm_atomic_state_free] Freeing atomic state ec0561c0 [ 178.432104] [drm:drm_framebuffer_reference] ee266c00: FB ID: 40 (3) [ 178.432112] [drm:drm_framebuffer_unreference] ee266c00: FB ID: 40 (4) [ 178.432124] [drm:drm_atomic_state_alloc] Allocate atomic state ec0561c0 [ 178.432135] [drm:drm_atomic_get_crtc_state] Added [CRTC:35] ed0e2a00 state to ec0561c0 [ 178.432146] [drm:drm_atomic_get_plane_state] Added [PLANE:32] ec056d00 state to ec0561c0 [ 178.432154] [drm:drm_atomic_set_crtc_for_plane] Link plane state ec056d00 to [NOCRTC] [ 178.432161] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for plane state ec056d00 [ 178.432171] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:35] to ec0561c0 [ 178.432178] [drm:drm_atomic_check_only] checking ec0561c0 [ 178.432187] [drm:drm_atomic_commit] commiting ec0561c0 [ 178.432198] [drm:drm_atomic_state_clear] Clearing atomic state ec0561c0 [ 178.432206] [drm:drm_atomic_state_free] Freeing atomic state ec0561c0 [ 178.432217] [drm:drm_framebuffer_reference] ee266c00: FB ID: 40 (3) [ 178.432225] [drm:drm_framebuffer_unreference] ee266c00: FB ID: 40 (4) [ 178.432235] [drm:drm_lastclose] driver lastclose completed [ 178.432244] [drm:drm_lastclose] lastclose completed
Hi Tobias,
2015-05-15 Tobias Jakobi tjakobi@math.uni-bielefeld.de:
Hello,
I did another run with drm.debug=0xff and also tried to figure out where the div-by-zero comes from.
The only division I see is in fimd_calc_clkdiv() (which is called by fimd_commit()). So it looks like 'ideal_clk' is zero when calling DIV_ROUND_UP().
'htotal' and 'vtotal' can't be zero, since this is checked early in fimd_commit(). So 'vrefresh' has to be zero. Maybe this helps?
What is is the output when you run with this patch:
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 12ab80c..f5d215d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -310,6 +310,8 @@ static u32 fimd_calc_clkdiv(struct fimd_context *ctx, unsigned long ideal_clk = mode->htotal * mode->vtotal * mode->vrefresh; u32 clkdiv;
+ DRM_DEBUG_KMS("vrefresh %d\n", mode->vrefresh); + if (ctx->i80_if) { /* * The frame done interrupt should be occurred prior to the @@ -328,6 +330,7 @@ static bool fimd_mode_fixup(struct exynos_drm_crtc *crtc, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) { + DRM_DEBUG_KMS("vrefresh %d\n", adjusted_mode->vrefresh); if (adjusted_mode->vrefresh == 0) adjusted_mode->vrefresh = FIMD_DEFAULT_FRAMERATE;
Hi,
On Monday, May 18, 2015, Gustavo Padovan gustavo@padovan.org wrote:
Hi Tobias,
2015-05-15 Tobias Jakobi <tjakobi@math.uni-bielefeld.de javascript:;>:
I did another run with drm.debug=0xff and also tried to figure out where
the
div-by-zero comes from.
The only division I see is in fimd_calc_clkdiv() (which is called by fimd_commit()). So it looks like 'ideal_clk' is zero when calling DIV_ROUND_UP().
'htotal' and 'vtotal' can't be zero, since this is checked early in fimd_commit(). So 'vrefresh' has to be zero. Maybe this helps?
What is is the output when you run with this patch:
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 12ab80c..f5d215d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -310,6 +310,8 @@ static u32 fimd_calc_clkdiv(struct fimd_context *ctx, unsigned long ideal_clk = mode->htotal * mode->vtotal * mode->vrefresh; u32 clkdiv;
DRM_DEBUG_KMS("vrefresh %d\n", mode->vrefresh);
if (ctx->i80_if) { /* * The frame done interrupt should be occurred prior to the
@@ -328,6 +330,7 @@ static bool fimd_mode_fixup(struct exynos_drm_crtc *crtc, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) {
DRM_DEBUG_KMS("vrefresh %d\n", adjusted_mode->vrefresh); if (adjusted_mode->vrefresh == 0) adjusted_mode->vrefresh = FIMD_DEFAULT_FRAMERATE;
vrefresh can legitimately be zero, which makes this FIMD_DEFAULT_FRAMERATE assignment problematic rather than harmless.
If it's zero, you can find a vrefresh value with drm_mode_vrefresh, which will calculate it for you.
Cheers, Daniel
2015-05-18 Daniel Stone daniel@fooishbar.org:
Hi,
On Monday, May 18, 2015, Gustavo Padovan gustavo@padovan.org wrote:
Hi Tobias,
2015-05-15 Tobias Jakobi <tjakobi@math.uni-bielefeld.de javascript:;>:
I did another run with drm.debug=0xff and also tried to figure out where
the
div-by-zero comes from.
The only division I see is in fimd_calc_clkdiv() (which is called by fimd_commit()). So it looks like 'ideal_clk' is zero when calling DIV_ROUND_UP().
'htotal' and 'vtotal' can't be zero, since this is checked early in fimd_commit(). So 'vrefresh' has to be zero. Maybe this helps?
What is is the output when you run with this patch:
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 12ab80c..f5d215d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -310,6 +310,8 @@ static u32 fimd_calc_clkdiv(struct fimd_context *ctx, unsigned long ideal_clk = mode->htotal * mode->vtotal * mode->vrefresh; u32 clkdiv;
DRM_DEBUG_KMS("vrefresh %d\n", mode->vrefresh);
if (ctx->i80_if) { /* * The frame done interrupt should be occurred prior to the
@@ -328,6 +330,7 @@ static bool fimd_mode_fixup(struct exynos_drm_crtc *crtc, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) {
DRM_DEBUG_KMS("vrefresh %d\n", adjusted_mode->vrefresh); if (adjusted_mode->vrefresh == 0) adjusted_mode->vrefresh = FIMD_DEFAULT_FRAMERATE;
vrefresh can legitimately be zero, which makes this FIMD_DEFAULT_FRAMERATE assignment problematic rather than harmless.
If it's zero, you can find a vrefresh value with drm_mode_vrefresh, which will calculate it for you.
So better try this. Ideally fimd_mode_fixup should go away too, I'll do a proper patch once we know this works.
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 12ab80c..363353b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -307,9 +307,17 @@ static void fimd_iommu_detach_devices(struct fimd_context *ctx) static u32 fimd_calc_clkdiv(struct fimd_context *ctx, const struct drm_display_mode *mode) { - unsigned long ideal_clk = mode->htotal * mode->vtotal * mode->vrefresh; + unsigned long ideal_clk; + int vrefresh; u32 clkdiv;
+ if (mode->vrefresh == 0) + vrefresh = drm_mode_vrefresh(mode); + else + vrefresh = mode->vrefresh; + + ideal_clk = mode->htotal * mode->vtotal * vrefresh; + if (ctx->i80_if) { /* * The frame done interrupt should be occurred prior to the
Hello,
On 2015-05-18 23:02, Gustavo Padovan wrote:
2015-05-18 Daniel Stone daniel@fooishbar.org:
Hi,
On Monday, May 18, 2015, Gustavo Padovan gustavo@padovan.org wrote:
Hi Tobias,
2015-05-15 Tobias Jakobi <tjakobi@math.uni-bielefeld.de javascript:;>:
I did another run with drm.debug=0xff and also tried to figure out where
the
div-by-zero comes from.
The only division I see is in fimd_calc_clkdiv() (which is called by fimd_commit()). So it looks like 'ideal_clk' is zero when calling DIV_ROUND_UP().
'htotal' and 'vtotal' can't be zero, since this is checked early in fimd_commit(). So 'vrefresh' has to be zero. Maybe this helps?
What is is the output when you run with this patch:
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 12ab80c..f5d215d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -310,6 +310,8 @@ static u32 fimd_calc_clkdiv(struct fimd_context *ctx, unsigned long ideal_clk = mode->htotal * mode->vtotal * mode->vrefresh; u32 clkdiv;
DRM_DEBUG_KMS("vrefresh %d\n", mode->vrefresh);
if (ctx->i80_if) { /* * The frame done interrupt should be occurred prior to the
@@ -328,6 +330,7 @@ static bool fimd_mode_fixup(struct exynos_drm_crtc *crtc, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) {
DRM_DEBUG_KMS("vrefresh %d\n", adjusted_mode->vrefresh); if (adjusted_mode->vrefresh == 0) adjusted_mode->vrefresh = FIMD_DEFAULT_FRAMERATE;
vrefresh can legitimately be zero, which makes this FIMD_DEFAULT_FRAMERATE assignment problematic rather than harmless.
If it's zero, you can find a vrefresh value with drm_mode_vrefresh, which will calculate it for you.
So better try this. Ideally fimd_mode_fixup should go away too, I'll do a proper patch once we know this works.
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 12ab80c..363353b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -307,9 +307,17 @@ static void fimd_iommu_detach_devices(struct fimd_context *ctx) static u32 fimd_calc_clkdiv(struct fimd_context *ctx, const struct drm_display_mode *mode) {
unsigned long ideal_clk = mode->htotal * mode->vtotal *
mode->vrefresh;
unsigned long ideal_clk;
int vrefresh; u32 clkdiv;
if (mode->vrefresh == 0)
vrefresh = drm_mode_vrefresh(mode);
else
vrefresh = mode->vrefresh;
ideal_clk = mode->htotal * mode->vtotal * vrefresh;
if (ctx->i80_if) { /* * The frame done interrupt should be occurred prior to
the
I've applied this and the debug output patch, but I still get a div-by-zero.
With best wishes, Tobias
kernel output: [ 135.978266] [drm:drm_stub_open] [ 135.978290] [drm:drm_open_helper] pid = 2650, minor = 0 [ 135.978308] [drm:ipp_subdrv_open] done priv[0xed983210] [ 135.978324] [drm:drm_setup] [ 135.978368] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_VERSION [ 135.978387] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_VERSION [ 135.978425] [drm:drm_release] open_count = 1 [ 135.978445] [drm:drm_release] pid = 2650, device = 0xe200, open_count = 1 [ 135.978466] [drm:drm_lastclose] [ 135.978506] [drm:drm_atomic_state_alloc] Allocate atomic state ed3a4a40 [ 135.978524] [drm:drm_atomic_get_crtc_state] Added [CRTC:21] ee20d400 state to ed3a4a40 [ 135.978540] [drm:drm_atomic_get_plane_state] Added [PLANE:17] ed3a4f80 state to ed3a4a40 [ 135.978552] [drm:drm_atomic_set_crtc_for_plane] Link plane state ed3a4f80 to [NOCRTC] [ 135.978563] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for plane state ed3a4f80 [ 135.978577] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:21] to ed3a4a40 [ 135.978590] [drm:drm_atomic_check_only] checking ed3a4a40 [ 135.978607] [drm:drm_atomic_commit] commiting ed3a4a40 [ 135.978623] [drm:drm_atomic_state_clear] Clearing atomic state ed3a4a40 [ 135.978639] [drm:drm_atomic_state_free] Freeing atomic state ed3a4a40 [ 135.978660] [drm:drm_atomic_state_alloc] Allocate atomic state ed3a4a40 [ 135.978676] [drm:drm_atomic_get_crtc_state] Added [CRTC:29] ee20d800 state to ed3a4a40 [ 135.978690] [drm:drm_atomic_get_plane_state] Added [PLANE:24] ed3a4ac0 state to ed3a4a40 [ 135.978702] [drm:drm_atomic_set_crtc_for_plane] Link plane state ed3a4ac0 to [CRTC:29] [ 135.978714] [drm:drm_framebuffer_reference] ee112240: FB ID: 40 (1) [ 135.978725] [drm:drm_atomic_set_fb_for_plane] Set [FB:40] for plane state ed3a4ac0 [ 135.978740] [drm:drm_atomic_get_connector_state] Added [CONNECTOR:31] ed3a4180 state to ed3a4a40 [ 135.978753] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:29] to ed3a4a40 [ 135.978765] [drm:drm_atomic_set_crtc_for_connector] Link connector state ed3a4180 to [CRTC:29] [ 135.978774] [drm:drm_atomic_check_only] checking ed3a4a40 [ 135.978786] [drm:drm_atomic_helper_check_modeset] [CRTC:29] mode changed [ 135.978796] [drm:drm_atomic_helper_check_modeset] [CRTC:29] enable changed [ 135.978807] [drm:update_connector_routing] Updating routing for [CONNECTOR:31:VGA-1] [ 135.978820] [drm:update_connector_routing] [CONNECTOR:31:VGA-1] using [ENCODER:30:TMDS-30] on [CRTC:29] [ 135.978830] [drm:drm_atomic_helper_check_modeset] [CRTC:29] active changed [ 135.978841] [drm:drm_atomic_helper_check_modeset] [CRTC:29] needs all connectors, enable: y, active: y [ 135.978853] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:29] to ed3a4a40 [ 135.978865] [drm:drm_atomic_connectors_for_crtc] State ed3a4a40 has 1 connectors for [CRTC:29] [ 135.978878] [drm:fimd_mode_fixup] vrefresh 0 [ 135.978890] [drm:exynos_drm_fb_buffer] dma_addr = 0x20100000 [ 135.978901] [drm:exynos_plane_atomic_check] buffer: 0, dma_addr = 0x20100000 [ 135.978911] [drm:drm_atomic_commit] commiting ed3a4a40 [ 135.978923] [drm:crtc_set_mode] modeset on [CRTC:29] [ 135.978934] [drm:crtc_set_mode] modeset on [ENCODER:30:TMDS-30] [ 135.978966] [drm:exynos_plane_mode_set] plane : offset_x/y(0,0), width/height(1366,768) [ 135.978977] [drm:drm_atomic_helper_commit_modeset_enables] enabling [CRTC:29] [ 135.978989] [drm:fimd_dpms] drivers/gpu/drm/exynos/exynos_drm_fimd.c, 0 [ 135.979048] [drm:fimd_calc_clkdiv] vrefresh 0 [ 135.979059] Division by zero in kernel. [ 135.979074] CPU: 1 PID: 2650 Comm: lt-modetest Not tainted 4.1.0-rc4-debug+ #2 [ 135.979083] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [ 135.979091] Backtrace: [ 135.979121] [<c00132b0>] (dump_backtrace) from [<c00134c8>] (show_stack+0x18/0x1c) [ 135.979129] r6:c06f9a08 r5:ffffffff r4:00000000 r3:dc8ba300 [ 135.979165] [<c00134b0>] (show_stack) from [<c04f21e4>] (dump_stack+0x88/0xc8) [ 135.979181] [<c04f215c>] (dump_stack) from [<c0013434>] (__div0+0x1c/0x20) [ 135.979189] r6:00000003 r5:00000000 r4:ee194010 r3:00000000 [ 135.979220] [<c0013418>] (__div0) from [<c020db74>] (Ldiv0+0x8/0x10) [ 135.979240] [<c02b5e70>] (fimd_commit) from [<c02b62ac>] (fimd_poweron.part.9+0xd4/0x19c) [ 135.979248] r9:ee2bb000 r8:c06ffcbc r7:c0748f94 r6:ee194a70 r5:ee194010 r4:00000005 [ 135.979282] [<c02b61d8>] (fimd_poweron.part.9) from [<c02b6400>] (fimd_dpms+0x8c/0xb4) [ 135.979290] r6:ee2bb000 r5:00000000 r4:c0748f94 r3:00000001 [ 135.979318] [<c02b6374>] (fimd_dpms) from [<c02b1c28>] (exynos_drm_crtc_enable+0x34/0x7c) [ 135.979326] r6:ed3a4a40 r5:ee194020 r4:ee2bb000 r3:c02b6374 [ 135.979360] [<c02b1bf4>] (exynos_drm_crtc_enable) from [<c028c11c>] (drm_atomic_helper_commit_modeset_enables+0x98/0x1c8) [ 135.979368] r5:ee2bb000 r4:00000001 [ 135.979391] [<c028c084>] (drm_atomic_helper_commit_modeset_enables) from [<c028e6e0>] (drm_atomic_helper_commit+0x124/0x170) [ 135.979399] r8:00000000 r7:ee2ca800 r6:00000000 r5:ed3a4a40 r4:0000000b r3:00000000 [ 135.979433] [<c028e5bc>] (drm_atomic_helper_commit) from [<c02b27c8>] (exynos_atomic_commit+0x14/0x18) [ 135.979441] r8:ee2bb000 r7:00000000 r6:ee2a18a8 r5:ee2ca800 r4:ed3a4a40 r3:c02b27b4 [ 135.979478] [<c02b27b4>] (exynos_atomic_commit) from [<c02af95c>] (drm_atomic_commit+0x4c/0x6c) [ 135.979495] [<c02af910>] (drm_atomic_commit) from [<c028d284>] (drm_atomic_helper_set_config+0x31c/0x428) [ 135.979503] r5:ed3a4a40 r4:00000003 [ 135.979530] [<c028cf68>] (drm_atomic_helper_set_config) from [<c029f180>] (drm_mode_set_config_internal+0x60/0xdc) [ 135.979538] r10:00000000 r9:ee2ca800 r8:ee2a1f80 r7:ee2bb000 r6:00000002 r5:00000050 [ 135.979565] r4:ee112240 [ 135.979585] [<c029f120>] (drm_mode_set_config_internal) from [<c0290c60>] (drm_fb_helper_restore_fbdev_mode_unlocked+0xec/0x140) [ 135.979593] r7:ee2a18a8 r6:00000002 r5:00000050 r4:00000000 [ 135.979623] [<c0290b74>] (drm_fb_helper_restore_fbdev_mode_unlocked) from [<c02b268c>] (exynos_drm_fbdev_restore_mode+0x28/0x2c) [ 135.979631] r10:ee2ca94c r9:edba5480 r8:ee2ca834 r7:ee2ca800 r6:ee2ca858 r5:c0748f94 [ 135.979658] r4:ee2ca800 [ 135.979673] [<c02b2664>] (exynos_drm_fbdev_restore_mode) from [<c02b109c>] (exynos_drm_lastclose+0x10/0x14) [ 135.979687] [<c02b108c>] (exynos_drm_lastclose) from [<c0294598>] (drm_lastclose+0x3c/0x10c) [ 135.979700] [<c029455c>] (drm_lastclose) from [<c02949a8>] (drm_release+0x340/0x4e0) [ 135.979707] r6:ee2ca858 r5:ed33f0a8 r4:ed33f000 r3:00000000 [ 135.979739] [<c0294668>] (drm_release) from [<c0103c14>] (__fput+0xa0/0x1e4) [ 135.979746] r10:00000000 r9:00000008 r8:ed9b83e0 r7:edc4a8e8 r6:edba9110 r5:ed9b83e0 [ 135.979772] r4:ed33f800 [ 135.979789] [<c0103b74>] (__fput) from [<c0103dc4>] (____fput+0x10/0x14) [ 135.979797] r10:00000000 r9:ec6f2000 r8:c000fc04 r7:ee2e5940 r6:c0718ef8 r5:00000000 [ 135.979823] r4:ee2e5d44 [ 135.979843] [<c0103db4>] (____fput) from [<c0047398>] (task_work_run+0xb8/0xfc) [ 135.979861] [<c00472e0>] (task_work_run) from [<c0012ec8>] (do_work_pending+0x88/0xa8) [ 135.979869] r7:00000006 r6:ec6f3fb0 r5:c000fc04 r4:ec6f2000 [ 135.979897] [<c0012e40>] (do_work_pending) from [<c000faa4>] (work_pending+0xc/0x20) [ 135.979905] r6:00000000 r5:00000001 r4:00000003 r3:00000000 [ 135.979934] [drm:fimd_win_commit] start addr = 0x20100000, end addr = 0x20500800, size = 0x400800 [ 135.979945] [drm:fimd_win_commit] ovl_width = 1366, ovl_height = 768 [ 135.979958] [drm:fimd_win_commit] osd pos: tx = 0, ty = 0, bx = 1365, by = 767 [ 135.979969] [drm:fimd_win_commit] osd size = 0x100200 [ 135.979978] [drm:fimd_win_set_pixfmt] bpp = 32 [ 135.979993] [drm:fimd_calc_clkdiv] vrefresh 0 [ 135.980003] Division by zero in kernel. [ 135.980016] CPU: 1 PID: 2650 Comm: lt-modetest Not tainted 4.1.0-rc4-debug+ #2 [ 135.980024] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [ 135.980031] Backtrace: [ 135.980050] [<c00132b0>] (dump_backtrace) from [<c00134c8>] (show_stack+0x18/0x1c) [ 135.980058] r6:c06f9a08 r5:ffffffff r4:00000000 r3:dc8ba300 [ 135.980090] [<c00134b0>] (show_stack) from [<c04f21e4>] (dump_stack+0x88/0xc8) [ 135.980105] [<c04f215c>] (dump_stack) from [<c0013434>] (__div0+0x1c/0x20) [ 135.980181] r6:00000003 r5:00000000 r4:ee194010 r3:00000000 [ 135.980217] [<c0013418>] (__div0) from [<c020db74>] (Ldiv0+0x8/0x10) [ 135.980236] [<c02b5e70>] (fimd_commit) from [<c02b1c6c>] (exynos_drm_crtc_enable+0x78/0x7c) [ 135.980244] r9:ee2bb000 r8:c06ffcbc r7:c0748f94 r6:ed3a4a40 r5:ee194020 r4:ee2bb000 [ 135.980281] [<c02b1bf4>] (exynos_drm_crtc_enable) from [<c028c11c>] (drm_atomic_helper_commit_modeset_enables+0x98/0x1c8) [ 135.980289] r5:ee2bb000 r4:00000001 [ 135.980345] [<c028c084>] (drm_atomic_helper_commit_modeset_enables) from [<c028e6e0>] (drm_atomic_helper_commit+0x124/0x170) [ 135.980366] r8:00000000 r7:ee2ca800 r6:00000000 r5:ed3a4a40 r4:0000000b r3:00000000 [ 135.980455] [<c028e5bc>] (drm_atomic_helper_commit) from [<c02b27c8>] (exynos_atomic_commit+0x14/0x18) [ 135.980475] r8:ee2bb000 r7:00000000 r6:ee2a18a8 r5:ee2ca800 r4:ed3a4a40 r3:c02b27b4 [ 135.980562] [<c02b27b4>] (exynos_atomic_commit) from [<c02af95c>] (drm_atomic_commit+0x4c/0x6c) [ 135.980590] [<c02af910>] (drm_atomic_commit) from [<c028d284>] (drm_atomic_helper_set_config+0x31c/0x428) [ 135.980610] r5:ed3a4a40 r4:00000003 [ 135.980664] [<c028cf68>] (drm_atomic_helper_set_config) from [<c029f180>] (drm_mode_set_config_internal+0x60/0xdc) [ 135.980681] r10:00000000 r9:ee2ca800 r8:ee2a1f80 r7:ee2bb000 r6:00000002 r5:00000050 [ 135.980769] r4:ee112240 [ 135.980811] [<c029f120>] (drm_mode_set_config_internal) from [<c0290c60>] (drm_fb_helper_restore_fbdev_mode_unlocked+0xec/0x140) [ 135.980831] r7:ee2a18a8 r6:00000002 r5:00000050 r4:00000000 [ 135.980860] [<c0290b74>] (drm_fb_helper_restore_fbdev_mode_unlocked) from [<c02b268c>] (exynos_drm_fbdev_restore_mode+0x28/0x2c) [ 135.980868] r10:ee2ca94c r9:edba5480 r8:ee2ca834 r7:ee2ca800 r6:ee2ca858 r5:c0748f94 [ 135.980895] r4:ee2ca800 [ 135.980911] [<c02b2664>] (exynos_drm_fbdev_restore_mode) from [<c02b109c>] (exynos_drm_lastclose+0x10/0x14) [ 135.980924] [<c02b108c>] (exynos_drm_lastclose) from [<c0294598>] (drm_lastclose+0x3c/0x10c) [ 135.980937] [<c029455c>] (drm_lastclose) from [<c02949a8>] (drm_release+0x340/0x4e0) [ 135.980944] r6:ee2ca858 r5:ed33f0a8 r4:ed33f000 r3:00000000 [ 135.980973] [<c0294668>] (drm_release) from [<c0103c14>] (__fput+0xa0/0x1e4) [ 135.980981] r10:00000000 r9:00000008 r8:ed9b83e0 r7:edc4a8e8 r6:edba9110 r5:ed9b83e0 [ 135.981007] r4:ed33f800 [ 135.981024] [<c0103b74>] (__fput) from [<c0103dc4>] (____fput+0x10/0x14) [ 135.981031] r10:00000000 r9:ec6f2000 r8:c000fc04 r7:ee2e5940 r6:c0718ef8 r5:00000000 [ 135.981057] r4:ee2e5d44 [ 135.981076] [<c0103db4>] (____fput) from [<c0047398>] (task_work_run+0xb8/0xfc) [ 135.981094] [<c00472e0>] (task_work_run) from [<c0012ec8>] (do_work_pending+0x88/0xa8) [ 135.981102] r7:00000006 r6:ec6f3fb0 r5:c000fc04 r4:ec6f2000 [ 135.981130] [<c0012e40>] (do_work_pending) from [<c000faa4>] (work_pending+0xc/0x20) [ 135.981137] r6:00000000 r5:00000001 r4:00000003 r3:00000000 [ 135.981163] [drm:drm_atomic_helper_commit_modeset_enables] enabling [ENCODER:30:TMDS-30] [ 135.981180] [drm:drm_vblank_enable] enabling vblank on crtc 1, ret: 0 [ 135.981192] [drm:drm_update_vblank_count] updating vblank count on crtc 1, missed 0 [ 136.029987] [drm:drm_atomic_state_clear] Clearing atomic state ed3a4a40 [ 136.030008] [drm:drm_atomic_state_free] Freeing atomic state ed3a4a40 [ 136.030027] [drm:drm_framebuffer_reference] ee112240: FB ID: 40 (2) [ 136.030045] [drm:drm_atomic_state_alloc] Allocate atomic state ed3a4a40 [ 136.030063] [drm:drm_atomic_get_crtc_state] Added [CRTC:35] ed892a00 state to ed3a4a40 [ 136.030079] [drm:drm_atomic_get_plane_state] Added [PLANE:32] ed3a4340 state to ed3a4a40 [ 136.030091] [drm:drm_atomic_set_crtc_for_plane] Link plane state ed3a4340 to [NOCRTC] [ 136.030101] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for plane state ed3a4340 [ 136.030116] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:35] to ed3a4a40 [ 136.030127] [drm:drm_atomic_check_only] checking ed3a4a40 [ 136.030142] [drm:drm_atomic_commit] commiting ed3a4a40 [ 136.030158] [drm:drm_atomic_state_clear] Clearing atomic state ed3a4a40 [ 136.030171] [drm:drm_atomic_state_free] Freeing atomic state ed3a4a40 [ 136.030187] [drm:drm_framebuffer_reference] ee112240: FB ID: 40 (3) [ 136.030198] [drm:drm_framebuffer_unreference] ee112240: FB ID: 40 (4) [ 136.030215] [drm:drm_lastclose] driver lastclose completed [ 136.030228] [drm:drm_lastclose] lastclose completed [ 136.030308] [drm:drm_stub_open] [ 136.030325] [drm:drm_open_helper] pid = 2650, minor = 0 [ 136.030343] [drm:ipp_subdrv_open] done priv[0xed983210] [ 136.030358] [drm:drm_setup] [ 136.030383] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_VERSION [ 136.030401] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_VERSION [ 136.030443] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_GET_UNIQUE [ 136.030459] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_GET_UNIQUE [ 136.030499] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_SET_CLIENT_CAP [ 136.030521] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETRESOURCES [ 136.030537] [drm:drm_mode_getresources] CRTC[3] CONNECTORS[3] ENCODERS[3] [ 136.030552] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETRESOURCES [ 136.030567] [drm:drm_mode_getresources] CRTC[3] CONNECTORS[3] ENCODERS[3] [ 136.030596] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCRTC [ 136.030622] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCRTC [ 136.030646] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCRTC [ 136.030674] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETENCODER [ 136.030692] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETENCODER [ 136.030708] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETENCODER [ 136.030729] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCONNECTOR [ 136.030741] [drm:drm_mode_getconnector] [CONNECTOR:23:?] [ 136.030756] [drm:drm_helper_probe_single_connector_modes_merge_bits] [CONNECTOR:23:Virtual-1] [ 136.030769] [drm:drm_helper_probe_single_connector_modes_merge_bits] [CONNECTOR:23:Virtual-1] disconnected [ 136.030788] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCONNECTOR [ 136.030799] [drm:drm_mode_getconnector] [CONNECTOR:23:?] [ 136.030822] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCONNECTOR [ 136.030833] [drm:drm_mode_getconnector] [CONNECTOR:31:?] [ 136.030848] [drm:drm_helper_probe_single_connector_modes_merge_bits] [CONNECTOR:31:VGA-1] [ 136.030873] [drm:drm_helper_probe_single_connector_modes_merge_bits] [CONNECTOR:31:VGA-1] probed modes : [ 136.030892] [drm:drm_mode_debug_printmodeline] Modeline 38:"1366x768" 0 500 1366 1414 1446 1526 768 771 776 790 0x48 0x5 [ 136.030911] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCONNECTOR [ 136.030922] [drm:drm_mode_getconnector] [CONNECTOR:31:?] [ 136.030946] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCONNECTOR [ 136.030958] [drm:drm_mode_getconnector] [CONNECTOR:37:?] [ 136.030972] [drm:drm_helper_probe_single_connector_modes_merge_bits] [CONNECTOR:37:HDMI-A-1] [ 136.030992] [drm:drm_helper_probe_single_connector_modes_merge_bits] [CONNECTOR:37:HDMI-A-1] disconnected [ 136.031010] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCONNECTOR [ 136.031021] [drm:drm_mode_getconnector] [CONNECTOR:37:?] [ 136.031049] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.031084] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.031117] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.031149] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.031183] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.031214] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.031247] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.031280] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.031320] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.031356] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.031398] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.031432] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.031469] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.031501] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.031534] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.031567] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.031603] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.031637] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.031673] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.031705] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.031737] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.031770] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.031812] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANERESOURCES [ 136.031828] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANERESOURCES [ 136.031853] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.031870] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.031888] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.031904] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.031922] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.031937] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.031954] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.031970] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.031987] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.032002] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.032035] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.032052] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.032069] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.032085] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.032102] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.032118] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.032135] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.032151] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.032168] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.032184] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.032201] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.032217] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPLANE [ 136.032234] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.032267] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.032303] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.032337] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.032373] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.032407] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.032443] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.032477] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.032513] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.032545] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.032580] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.032613] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.032648] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.032682] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.032717] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.032750] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.032785] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.032819] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.032854] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.032888] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.032923] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.032956] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.032991] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.033025] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.033061] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.033093] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.033127] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.033161] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.033196] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.033229] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.033265] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.033298] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.033332] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.033366] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.033401] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.033435] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.033470] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.033503] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.033537] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.033570] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.033606] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.033639] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.033674] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.033707] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.033741] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.033775] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.033810] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.033842] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.033878] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.033911] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.033946] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.033979] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.034023] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.034057] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.034092] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.034126] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_OBJ_GETPROPERTIES [ 136.034161] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.034194] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.034230] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.034263] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPERTY [ 136.037071] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPBLOB [ 136.037124] [drm:drm_ioctl] ret = -2 [ 136.038184] [drm:drm_ioctl] pid=2650, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETPROPBLOB [ 136.038221] [drm:drm_ioctl] ret = -2 [ 136.066465] [drm:drm_release] open_count = 1 [ 136.066489] [drm:drm_release] pid = 2650, device = 0xe200, open_count = 1 [ 136.066511] [drm:drm_lastclose] [ 136.066548] [drm:drm_atomic_state_alloc] Allocate atomic state ed3a4800 [ 136.066565] [drm:drm_atomic_get_crtc_state] Added [CRTC:21] ed892c00 state to ed3a4800 [ 136.066579] [drm:drm_atomic_get_plane_state] Added [PLANE:17] ed3a4200 state to ed3a4800 [ 136.066589] [drm:drm_atomic_set_crtc_for_plane] Link plane state ed3a4200 to [NOCRTC] [ 136.066599] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for plane state ed3a4200 [ 136.066612] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:21] to ed3a4800 [ 136.066623] [drm:drm_atomic_check_only] checking ed3a4800 [ 136.066637] [drm:drm_atomic_commit] commiting ed3a4800 [ 136.066652] [drm:drm_atomic_state_clear] Clearing atomic state ed3a4800 [ 136.066666] [drm:drm_atomic_state_free] Freeing atomic state ed3a4800 [ 136.066681] [drm:drm_framebuffer_reference] ee112240: FB ID: 40 (3) [ 136.066691] [drm:drm_framebuffer_unreference] ee112240: FB ID: 40 (4) [ 136.066706] [drm:drm_atomic_state_alloc] Allocate atomic state ed3a4800 [ 136.066719] [drm:drm_atomic_get_crtc_state] Added [CRTC:29] ed892800 state to ed3a4800 [ 136.066732] [drm:drm_framebuffer_reference] ee112240: FB ID: 40 (3) [ 136.066742] [drm:drm_atomic_get_plane_state] Added [PLANE:24] ed3a4f80 state to ed3a4800 [ 136.066753] [drm:drm_atomic_set_crtc_for_plane] Link plane state ed3a4f80 to [CRTC:29] [ 136.066762] [drm:drm_framebuffer_unreference] ee112240: FB ID: 40 (4) [ 136.066772] [drm:drm_framebuffer_reference] ee112240: FB ID: 40 (3) [ 136.066781] [drm:drm_atomic_set_fb_for_plane] Set [FB:40] for plane state ed3a4f80 [ 136.066795] [drm:drm_atomic_get_connector_state] Added [CONNECTOR:31] ed3a4140 state to ed3a4800 [ 136.066807] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:29] to ed3a4800 [ 136.066818] [drm:drm_atomic_set_crtc_for_connector] Link connector state ed3a4140 to [NOCRTC] [ 136.066828] [drm:drm_atomic_set_crtc_for_connector] Link connector state ed3a4140 to [CRTC:29] [ 136.066837] [drm:drm_atomic_check_only] checking ed3a4800 [ 136.066848] [drm:update_connector_routing] Updating routing for [CONNECTOR:31:VGA-1] [ 136.066859] [drm:update_connector_routing] [CONNECTOR:31:VGA-1] keeps [ENCODER:30:TMDS-30], now on [CRTC:29] [ 136.066871] [drm:exynos_drm_fb_buffer] dma_addr = 0x20100000 [ 136.066881] [drm:exynos_plane_atomic_check] buffer: 0, dma_addr = 0x20100000 [ 136.066890] [drm:drm_atomic_commit] commiting ed3a4800 [ 136.066904] [drm:exynos_plane_mode_set] plane : offset_x/y(0,0), width/height(1366,768) [ 136.066917] [drm:fimd_win_commit] start addr = 0x20100000, end addr = 0x20500800, size = 0x400800 [ 136.066927] [drm:fimd_win_commit] ovl_width = 1366, ovl_height = 768 [ 136.066938] [drm:fimd_win_commit] osd pos: tx = 0, ty = 0, bx = 1365, by = 767 [ 136.066946] [drm:fimd_win_commit] osd size = 0x100200 [ 136.066955] [drm:fimd_win_set_pixfmt] bpp = 32 [ 136.066966] [drm:drm_atomic_state_clear] Clearing atomic state ed3a4800 [ 136.066979] [drm:drm_framebuffer_unreference] ee112240: FB ID: 40 (4) [ 136.066988] [drm:drm_atomic_state_free] Freeing atomic state ed3a4800 [ 136.067002] [drm:drm_framebuffer_reference] ee112240: FB ID: 40 (3) [ 136.067011] [drm:drm_framebuffer_unreference] ee112240: FB ID: 40 (4) [ 136.067026] [drm:drm_atomic_state_alloc] Allocate atomic state ed3a4800 [ 136.067041] [drm:drm_atomic_get_crtc_state] Added [CRTC:35] ee20d800 state to ed3a4800 [ 136.067054] [drm:drm_atomic_get_plane_state] Added [PLANE:32] ed3a4ac0 state to ed3a4800 [ 136.067063] [drm:drm_atomic_set_crtc_for_plane] Link plane state ed3a4ac0 to [NOCRTC] [ 136.067072] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for plane state ed3a4ac0 [ 136.067084] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:35] to ed3a4800 [ 136.067093] [drm:drm_atomic_check_only] checking ed3a4800 [ 136.067104] [drm:drm_atomic_commit] commiting ed3a4800 [ 136.067117] [drm:drm_atomic_state_clear] Clearing atomic state ed3a4800 [ 136.067129] [drm:drm_atomic_state_free] Freeing atomic state ed3a4800 [ 136.067143] [drm:drm_framebuffer_reference] ee112240: FB ID: 40 (3) [ 136.067153] [drm:drm_framebuffer_unreference] ee112240: FB ID: 40 (4) [ 136.067166] [drm:drm_lastclose] driver lastclose completed [ 136.067177] [drm:drm_lastclose] lastclose completed [ 140.995693] [drm:vblank_disable_fn] disabling vblank on crtc 1
Hi Tobias,
On 19 May 2015 at 14:53, Tobias Jakobi tjakobi@math.uni-bielefeld.de wrote:
On 2015-05-18 23:02, Gustavo Padovan wrote:
So better try this. Ideally fimd_mode_fixup should go away too, I'll do a proper patch once we know this works.
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 12ab80c..363353b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -307,9 +307,17 @@ static void fimd_iommu_detach_devices(struct fimd_context *ctx) static u32 fimd_calc_clkdiv(struct fimd_context *ctx, const struct drm_display_mode *mode) {
unsigned long ideal_clk = mode->htotal * mode->vtotal *
mode->vrefresh;
unsigned long ideal_clk;
int vrefresh; u32 clkdiv;
if (mode->vrefresh == 0)
vrefresh = drm_mode_vrefresh(mode);
else
vrefresh = mode->vrefresh;
ideal_clk = mode->htotal * mode->vtotal * vrefresh;
if (ctx->i80_if) { /* * The frame done interrupt should be occurred prior to
the
I've applied this and the debug output patch, but I still get a div-by-zero.
Can you please add a drm_mode_debug_printmodeline(mode) and give the output there?
Cheers, Daniel
Hey Daniel,
On 2015-05-19 16:06, Daniel Stone wrote:
Hi Tobias,
On 19 May 2015 at 14:53, Tobias Jakobi tjakobi@math.uni-bielefeld.de wrote:
On 2015-05-18 23:02, Gustavo Padovan wrote:
So better try this. Ideally fimd_mode_fixup should go away too, I'll do a proper patch once we know this works.
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 12ab80c..363353b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -307,9 +307,17 @@ static void fimd_iommu_detach_devices(struct fimd_context *ctx) static u32 fimd_calc_clkdiv(struct fimd_context *ctx, const struct drm_display_mode *mode) {
unsigned long ideal_clk = mode->htotal * mode->vtotal *
mode->vrefresh;
unsigned long ideal_clk;
int vrefresh; u32 clkdiv;
if (mode->vrefresh == 0)
vrefresh = drm_mode_vrefresh(mode);
else
vrefresh = mode->vrefresh;
ideal_clk = mode->htotal * mode->vtotal * vrefresh;
if (ctx->i80_if) { /* * The frame done interrupt should be occurred prior
to the
I've applied this and the debug output patch, but I still get a div-by-zero.
Can you please add a drm_mode_debug_printmodeline(mode) and give the output there?
I've also added printk for ideal_clk, here's the output.
kernel output: [ 81.204682] [drm:fimd_calc_clkdiv] vrefresh 0 [ 81.204700] [drm:drm_mode_debug_printmodeline] Modeline 0:"1366x768" 0 500 1366 1414 1446 1526 768 771 776 790 0x48 0x5 [ 81.204710] [drm:fimd_calc_clkdiv] ideal_clk 0
So vrefresh remains zero after all.
With best wishes, Tobias
Cheers, Daniel
OK,
so Daniel helped me track down this issue. It came from an incorrect 'clock-frequency' entry in my DTS. The freq was 500000. Daniel recommended 70600000 which works 'fine' (and according to modetest produces a 59Hz mode). I say 'fine' because I can't confirm that FIMD is actually working. I just see that with that change I no longer get any div-by-zeros in the kernel.
So fimd_calc_clkdiv needs some sanitizing for 'ideal_clk' at least.
What still bothers me though is the fact that FIMD actually gets enabled. I'm just calling 'modetest -M exynos', so it's just doing probing. Why does that trigger dpms?
With best wishes, Tobias
On 2015-05-19 16:06, Daniel Stone wrote:
Hi Tobias,
On 19 May 2015 at 14:53, Tobias Jakobi tjakobi@math.uni-bielefeld.de wrote:
On 2015-05-18 23:02, Gustavo Padovan wrote:
So better try this. Ideally fimd_mode_fixup should go away too, I'll do a proper patch once we know this works.
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 12ab80c..363353b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -307,9 +307,17 @@ static void fimd_iommu_detach_devices(struct fimd_context *ctx) static u32 fimd_calc_clkdiv(struct fimd_context *ctx, const struct drm_display_mode *mode) {
unsigned long ideal_clk = mode->htotal * mode->vtotal *
mode->vrefresh;
unsigned long ideal_clk;
int vrefresh; u32 clkdiv;
if (mode->vrefresh == 0)
vrefresh = drm_mode_vrefresh(mode);
else
vrefresh = mode->vrefresh;
ideal_clk = mode->htotal * mode->vtotal * vrefresh;
if (ctx->i80_if) { /* * The frame done interrupt should be occurred prior
to the
I've applied this and the debug output patch, but I still get a div-by-zero.
Can you please add a drm_mode_debug_printmodeline(mode) and give the output there?
Cheers, Daniel
Hi Tobias,
2015-05-19 Tobias Jakobi tjakobi@math.uni-bielefeld.de:
OK,
so Daniel helped me track down this issue. It came from an incorrect 'clock-frequency' entry in my DTS. The freq was 500000. Daniel recommended 70600000 which works 'fine' (and according to modetest produces a 59Hz mode). I say 'fine' because I can't confirm that FIMD is actually working. I just see that with that change I no longer get any div-by-zeros in the kernel.
That is good to hear! So maybe we are now ready to have the atomic modesetting patches merged in. I'll send a new version with the last fix to avoid crashes with null CRTC.
So fimd_calc_clkdiv needs some sanitizing for 'ideal_clk' at least.
What still bothers me though is the fact that FIMD actually gets enabled. I'm just calling 'modetest -M exynos', so it's just doing probing. Why does that trigger dpms?
That comes from restore_fbdev_mode() when modetest closes the file descriptor, but I'm not sure why a update happens at this time.
Gustavo
Hi,
On 19 May 2015 at 19:43, Gustavo Padovan gustavo@padovan.org wrote:
2015-05-19 Tobias Jakobi tjakobi@math.uni-bielefeld.de:
so Daniel helped me track down this issue. It came from an incorrect 'clock-frequency' entry in my DTS. The freq was 500000. Daniel recommended 70600000 which works 'fine' (and according to modetest produces a 59Hz mode). I say 'fine' because I can't confirm that FIMD is actually working. I just see that with that change I no longer get any div-by-zeros in the kernel.
That is good to hear! So maybe we are now ready to have the atomic modesetting patches merged in. I'll send a new version with the last fix to avoid crashes with null CRTC.
Indeed. Though as he says below:
So fimd_calc_clkdiv needs some sanitizing for 'ideal_clk' at least.
It would be nice to: a) reject any mode with an impossible clock in mode_valid (filter connector modes) + mode_fixup (explicit request) b) WARN_ON and return during FIMD commit if clk_div ends up being zero
What still bothers me though is the fact that FIMD actually gets enabled. I'm just calling 'modetest -M exynos', so it's just doing probing. Why does that trigger dpms?
That comes from restore_fbdev_mode() when modetest closes the file descriptor, but I'm not sure why a update happens at this time.
It comes from lastclose: when the last client exits, DRM tries to restore the mode that fbcon was using. Quite why it didn't fail before this point (i.e. when doing it initially), I'm not quite sure, but oh well.
Cheers, Daniel
dri-devel@lists.freedesktop.org