diff mbox

drm/exynos: Add atomic modesetting support

Message ID 20150518210239.GB18856@joana (mailing list archive)
State New, archived
Headers show

Commit Message

Gustavo Padovan May 18, 2015, 9:02 p.m. UTC
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.

Comments

Tobias Jakobi May 19, 2015, 1:53 p.m. UTC | #1
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
Daniel Stone May 19, 2015, 2:06 p.m. UTC | #2
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
Tobias Jakobi May 19, 2015, 2:52 p.m. UTC | #3
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
Tobias Jakobi May 19, 2015, 5:27 p.m. UTC | #4
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
Gustavo Padovan May 19, 2015, 6:43 p.m. UTC | #5
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
Daniel Stone May 19, 2015, 6:54 p.m. UTC | #6
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
diff mbox

Patch

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