From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Only apply DPMS to the encoder if enabled Date: Thu, 3 Oct 2013 22:51:31 +0200 Message-ID: <20131003205131.GJ31334@phenom.ffwll.local> References: <1380478507-1782-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f179.google.com (mail-ea0-f179.google.com [209.85.215.179]) by gabe.freedesktop.org (Postfix) with ESMTP id 2EF1AE5F78 for ; Thu, 3 Oct 2013 13:51:13 -0700 (PDT) Received: by mail-ea0-f179.google.com with SMTP id b10so1376248eae.10 for ; Thu, 03 Oct 2013 13:51:13 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson Cc: intel-gfx List-Id: intel-gfx@lists.freedesktop.org On Sun, Sep 29, 2013 at 08:27:50PM +0200, Daniel Vetter wrote: > On Sun, Sep 29, 2013 at 8:15 PM, Chris Wilson wrote: > > The current test for an attached enabled encoder fails if we have > > multiple connectors aliased to the same encoder - both connectors > > believe they own the enabled encoder and so we attempt to both enable > > and disable DPMS on the encoder, leading to hilarity and an OOPs: > > > > [ 354.803064] WARNING: CPU: 0 PID: 482 at > > /usr/src/linux/dist/3.11.2/drivers/gpu/drm/i915/intel_display.c:3869 intel_modeset_check_state+0x764/0x770 [i915]() > > [ 354.803064] wrong connector dpms state > > [ 354.803084] Modules linked in: nfsd auth_rpcgss oid_registry exportfs nfs lockd sunrpc xt_nat iptable_nat nf_nat_ipv4 nf_nat xt_limit xt_LOG xt_tcpudp nf_conntrack_ipv4 nf_defrag_ipv4 ipt_REJECT ipv6 xt_recent xt_conntrack nf_conntrack iptable_filter ip_tables x_tables snd_hda_codec_realtek snd_hda_codec_hdmi x86_pkg_temp_thermal snd_hda_intel coretemp kvm_intel snd_hda_codec i915 kvm snd_hwdep snd_pcm_oss snd_mixer_oss crc32_pclmul snd_pcm crc32c_intel e1000e intel_agp igb ghash_clmulni_intel intel_gtt aesni_intel cfbfillrect aes_x86_64 cfbimgblt lrw cfbcopyarea drm_kms_helper ptp video thermal processor gf128mul snd_page_alloc drm snd_timer glue_helper 8250_pci snd pps_core ablk_helper agpgart cryptd sg soundcore fan i2c_algo_bit sr_mod thermal_sys 8250 i2c_i801 serial_core > > hwmon cdrom i2c_core evdev button > > [ 354.803086] CPU: 0 PID: 482 Comm: kworker/0:1 Not tainted 3.11.2 #1 > > [ 354.803087] Hardware name: Supermicro X10SAE/X10SAE, BIOS 1.00 05/03/2013 [ 354.803091] Workqueue: events console_callback > > [ 354.803092] 0000000000000009 ffff88023611db48 ffffffff814048ac ffff88023611db90 > > [ 354.803093] ffff88023611db80 ffffffff8103d4e3 ffff880230d82800 ffff880230f9b800 > > [ 354.803094] ffff880230f99000 ffff880230f99448 ffff8802351c0e00 ffff88023611dbe0 > > [ 354.803094] Call Trace: > > [ 354.803098] [] dump_stack+0x54/0x8d > > [ 354.803101] [] warn_slowpath_common+0x73/0x90 > > [ 354.803103] [] warn_slowpath_fmt+0x47/0x50 > > [ 354.803109] [] ? intel_ddi_connector_get_hw_state+0x5e/0x110 [i915] > > [ 354.803114] [] intel_modeset_check_state+0x764/0x770 [i915] > > [ 354.803117] [] intel_connector_dpms+0x3b/0x60 [i915] > > [ 354.803120] [] drm_fb_helper_dpms.isra.11+0x120/0x160 [drm_kms_helper] > > [ 354.803122] [] drm_fb_helper_blank+0x3e/0x80 [drm_kms_helper] > > [ 354.803123] [] fb_blank+0x52/0xc0 > > [ 354.803125] [] fbcon_blank+0x21b/0x2d0 > > [ 354.803127] [] ? update_rq_clock.part.74+0x13/0x30 > > [ 354.803129] [] ? lock_timer_base.isra.30+0x26/0x50 > > [ 354.803130] [] ? internal_add_timer+0x12/0x40 > > [ 354.803131] [] ? mod_timer+0xf8/0x1c0 > > [ 354.803133] [] do_unblank_screen+0xa1/0x1c0 > > [ 354.803134] [] poke_blanked_console+0xc7/0xd0 > > [ 354.803136] [] console_callback+0x13f/0x160 > > [ 354.803137] [] process_one_work+0x148/0x3d0 > > [ 354.803138] [] worker_thread+0x119/0x3a0 > > [ 354.803140] [] ? manage_workers.isra.30+0x2a0/0x2a0 > > [ 354.803141] [] kthread+0xbb/0xc0 > > [ 354.803142] [] ? kthread_create_on_node+0x120/0x120 > > [ 354.803144] [] ret_from_fork+0x7c/0xb0 > > [ 354.803145] [] ? kthread_create_on_node+0x120/0x120 > > > > Reported-and-tested-by: Wakko Warner > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68030 > > Link: http://lkml.kernel.org/r/20130928185023.GA21672@animx.eu.org > > Signed-off-by: Chris Wilson > > A testcase would be great ;-) I've already poked Rodrigo about it, the > recipe I have in mind is to pimp kms_flip with a new flag to disable > all other connectors. If we have a buggy kernel the pipe should get > killed and the pageflip fail. I've gone ahead and written that testcase. Patch merged to -fixes with cc: stable and a note which commit broke this first. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch