Re: Kernel warning when mode setting with no connectors connected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 12, 2014 at 11:49:44PM +0200, Daniel Vetter wrote:
> On Sat, Apr 12, 2014 at 11:20 PM, Russell King - ARM Linux
> <linux@xxxxxxxxxxxxxxxx> wrote:
> > So what happens is that a mode is attempted to be set with no connectors.
> 
> That case is the other nonsense use of ->set_config I've curbed with
> all the fb helper fixes.
> 
>     BUG_ON(set->fb && set->num_connectors == 0);
> 
> in drm_crtc_helper_set_config should catch this abuse of trying to set
> a mode with no connectors. So I'm still confused what exactly is going
> on in your box.

Here's the DRM debug enabled:

drm_mode_set_config_internal: pre: fb d8407080 mode dab0ab00 crtc dae72018 crtc->fb   (null)
[drm:drm_crtc_helper_set_config], 
[drm:drm_crtc_helper_set_config], [CRTC:3] [FB:11] #connectors=1 (x y) (0 0)
[drm:drm_crtc_helper_set_config], crtc has no fb, full mode set
[drm:drm_crtc_helper_set_config], encoder changed, full mode switch
[drm:drm_crtc_helper_set_config], crtc changed, full mode switch
[drm:drm_crtc_helper_set_config], [CONNECTOR:9:HDMI-A-1] to [CRTC:3]
[drm:drm_crtc_helper_set_config], attempting to set mode from userspace
[drm:drm_mode_debug_printmodeline], Modeline 12:"1360x768" 0 84750 1360 1432 1568 1776 768 771 781 798 0x0 0x6
[drm:drm_crtc_helper_set_mode], [CRTC:3]
[drm:drm_crtc_helper_set_mode], [ENCODER:8:TMDS-8] set [MODE:12:1360x768]
[drm:drm_calc_timestamping_constants], crtc 3: hwmode: htotal 1776, vtotal 798, vdisplay 768
[drm:drm_calc_timestamping_constants], crtc 3: clock 84750 kHz framedur 16722690 linedur 20955, pixeldur 11
[drm:drm_crtc_helper_set_config], Setting connector DPMS state to on
[drm:drm_crtc_helper_set_config],        [CONNECTOR:9:HDMI-A-1] set DPMS on
drm_helper_disable_unused_functions: crtc dae72018 crtc->fb d8407080
drm_helper_disable_unused_functions: crtc dae72418 crtc->fb   (null)
drm_crtc_helper_set_config: success
drm_mode_set_config_internal: post: fb d8407080 mode dab0ab00 crtc->fb   (null) ret 0

This shows that the mode was being set with one connector present, and
seemed to be successful, but drm_helper_disable_unused_functions() still
tried to disable it.

However, adding more debugging to drm_helper_disable_unused_functions()
reveals the problem:

drm_helper_disable_unused_functions: connector 9 status 2
drm_helper_disable_unused_functions: encoder 8 not in use
drm_helper_disable_unused_functions: crtc 3 crtc->fb da898500
drm_helper_disable_unused_functions: crtc 6 crtc->fb   (null)

So we try to set a mode on CRTC 3 using encoder 8 and connector 9.
However connector 9 is disconnected, so the connector has its
encoder disassociated.  The encoder is now not used, so the encoder
is disabled.  This then means that the CRTC is not being used by
any encoder, so the CRTC gets disabled.

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux