Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp417738pxb; Wed, 3 Mar 2021 06:36:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJz2o0uNAbvEtEON2UIL6AotZ04oNXpVNuRzsgu7t0u2bJr6fNwUJ2UmQSnMJ8LVFZjjpSdr X-Received: by 2002:aa7:ccd7:: with SMTP id y23mr18233865edt.190.1614782217168; Wed, 03 Mar 2021 06:36:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614782217; cv=none; d=google.com; s=arc-20160816; b=iR71TC1+Lctf3FfRQb+EnOXhgxg8Q1ggnT2saFTksI9k1GWEg/+PVVRNg3rkOHxvYO 9TtOOp+LOuqc6/d6DxXsTYzM3FZZ439VE3AC83JdXgSeJ8qMbiL0uAdTN8+3bxXFig8r j4nng/RKKshdzGndpIZOryBPnOvqzVXPrlbWxZb8vfgJ7dkYp9IeoU/FKPjBH20o3wfB yw8fszI/dQcS4bQeJiU3Bf6UJdNltESMSFh450mEjl2YyqeOXepwNsSMd+H8lSziRGCd K4EyWMzOmBwbfiJG3ckumqJbwplf0QMgJkNWz3AAqdKF9SvtHbbNU5O0xU8/QWLd4RUv Fxlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=5KG2roWwHKOYF0nsRamQY8OhoJuyCT0uzmvuMSLvuLQ=; b=jAw5XH5IGaPVlI2PGPPyJ5ZP+ho563KKrlXWJ+FxxgziyDK1ylXGlbV770tYnVR5Sp 4dINlQ0HezO8czpyUx0bn1M1dZmPN+rUupSuHksMxOkeyuHvRI1n7gYZJ1XSMfz02wYV e5ErSRzrdEDXEndirFNqKNRBJ0g+WLeIfgS3A/Bl1yhp3nyaYf612E119GZJmvMNHg4+ NQt2RZkoWa26dshT7ZJpbzQCZ79rSljgH1QeElSFa82RYMUcfWkZcu6yPegX10L6F65D 1q7RlSpZIw1GRlEROUUYVgGFp1hJIxD6WOn5bFE5HMp4bOvdq6XRcrzp589Vi5WVn2mv BOnw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e2si12354262ejd.17.2021.03.03.06.35.44; Wed, 03 Mar 2021 06:36:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244491AbhCAVno (ORCPT + 99 others); Mon, 1 Mar 2021 16:43:44 -0500 Received: from mga04.intel.com ([192.55.52.120]:30265 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238086AbhCARWu (ORCPT ); Mon, 1 Mar 2021 12:22:50 -0500 IronPort-SDR: jT/AnN4pZNezQgh8zXfvAnnXQjoLtbumi/N0VxWgyFhNR7iCwYh1MSJ53QCPFjlYp3A5Ep4Abt VfiO6JBAFu+A== X-IronPort-AV: E=McAfee;i="6000,8403,9910"; a="184097489" X-IronPort-AV: E=Sophos;i="5.81,215,1610438400"; d="scan'208";a="184097489" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2021 09:21:02 -0800 IronPort-SDR: CSFQEh/hHABydoWfjhWlG1LrToElQDvmj/w9NmimxqgE/eWBNnplByhbdhuL/YWcr/1eRs9HVp N1hyE5h1hUAQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,215,1610438400"; d="scan'208";a="444367905" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.171]) by orsmga001.jf.intel.com with SMTP; 01 Mar 2021 09:20:59 -0800 Received: by stinkbox (sSMTP sendmail emulation); Mon, 01 Mar 2021 19:20:59 +0200 Date: Mon, 1 Mar 2021 19:20:59 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Steven Rostedt Cc: LKML , David Airlie , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Rodrigo Vivi , Linus Torvalds Subject: Re: [WARNING] v5.12-rc1 in intel_pipe_disable tracepoint Message-ID: References: <20210301115946.295279c1@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210301115946.295279c1@gandalf.local.home> X-Patchwork-Hint: comment Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 01, 2021 at 11:59:46AM -0500, Steven Rostedt wrote: > > On my test box with latest v5.12-rc1, running with all trace events > enabled, I consistently trigger this warning. > > It appears to get triggered by the trace_intel_pipe_disable() code. > > -- Steve > > ------------[ cut here ]------------ > i915 0000:00:02.0: drm_WARN_ON_ONCE(drm_drv_uses_atomic_modeset(dev)) > WARNING: CPU: 7 PID: 1258 at drivers/gpu/drm/drm_vblank.c:728 drm_crtc_vblank_helper_get_vblank_timestamp_internal+0x319/0x330 [drm] > Modules linked in: ebtable_filter ebtables bridge stp llc vsock vmw_vmci ipt_REJECT nf_reject_ipv4 iptable_filter ip6t_REJECT nf_reject_ipv6 xt_state xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip6table_filter ip6_tables snd_hda_codec_hdmi snd_h > ek snd_hda_codec_generic ledtrig_audio snd_hda_intel snd_intel_dspcfg snd_hda_codec joydev snd_hwdep intel_rapl_msr snd_hda_core hp_wmi i915 iTCO_wdt snd_seq intel_rapl_common iTCO_vendor_support wmi_bmof sparse_keymap snd_seq_device rfkill snd_pcm x86_pkg_t > d_timer i2c_algo_bit drm_kms_helper mei_me intel_powerclamp snd mei soundcore i2c_i801 drm coretemp lpc_ich e1000e kvm_intel i2c_smbus kvm irqbypass crct10dif_pclmul crc32_pclmul crc32c_intel serio_raw ghash_clmulni_intel video tpm_infineon wmi ip_tables > CPU: 7 PID: 1258 Comm: Xorg Tainted: G W 5.12.0-rc1-test+ #12 > Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v03.03 07/14/2016 > RIP: 0010:drm_crtc_vblank_helper_get_vblank_timestamp_internal+0x319/0x330 [drm] > Code: 4c 8b 6f 50 4d 85 ed 75 03 4c 8b 2f e8 60 92 45 c2 48 c7 c1 28 a5 3c c0 4c 89 ea 48 c7 c7 15 5a 3c c0 48 89 c6 e8 1f e7 7b c2 <0f> 0b e9 e2 fe ff ff e8 fb 6c 81 c2 66 66 2e 0f 1f 84 00 00 00 00 > RSP: 0018:ffffb77580ea7920 EFLAGS: 00010082 > RAX: 0000000000000000 RBX: ffff8afe500c0000 RCX: 0000000000000000 > RDX: 0000000000000004 RSI: ffffffff833c86b8 RDI: 0000000000000001 > RBP: ffffb77580ea7990 R08: 000000700c782173 R09: 0000000000000000 > R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000 > R13: ffff8afe41c7eff0 R14: ffffffffc05e0410 R15: ffff8afe456a2bf8 > FS: 00007f8f91869f00(0000) GS:ffff8afe5aa00000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 00007f9523a6cad0 CR3: 0000000001b78002 CR4: 00000000001706e0 > Call Trace: > drm_get_last_vbltimestamp+0xaa/0xc0 [drm] > drm_update_vblank_count+0x90/0x2d0 [drm] > drm_crtc_accurate_vblank_count+0x3e/0xc0 [drm] > intel_crtc_get_vblank_counter+0x43/0x50 [i915] > trace_event_raw_event_intel_pipe_disable+0x87/0x110 [i915] > intel_disable_pipe+0x1a8/0x210 [i915] Hmm. Yeah we do vblank_off() before pipe_disable() which wants to still grab the frame counter in the tracepoint. I think we could reorder those two without causing any problems. Either that or we put the tracepoint before vblank_off(). > ilk_crtc_disable+0x85/0x390 [i915] But this part is confusing me. intel_crtc_get_vblank_counter() is only supposed to do drm_crtc_accurate_vblank_count() fallback when the hardware lacks a working frame counter, and that should only be the case for ancient gen2 or semi-ancient i965gm TV output, ilk_crtc_disable() is not the function we should be calling in either of those cases. What hardware do you have? > intel_old_crtc_state_disables.isra.0+0x5c/0x110 [i915] > intel_atomic_commit_tail+0xf5d/0x1460 [i915] > ? complete+0x18/0x40 > intel_atomic_commit+0x345/0x3c0 [i915] > drm_atomic_connector_commit_dpms+0xd7/0x100 [drm] > set_property_atomic+0xcc/0x160 [drm] > drm_mode_obj_set_property_ioctl+0xbd/0x100 [drm] > ? drm_connector_set_obj_prop+0x90/0x90 [drm] > drm_connector_property_set_ioctl+0x39/0x60 [drm] > drm_ioctl_kernel+0xad/0x100 [drm] > drm_ioctl+0x1ec/0x390 [drm] > ? drm_connector_set_obj_prop+0x90/0x90 [drm] > ? sched_clock_cpu+0x10/0xd0 > ? lock_release+0x155/0x410 > __x64_sys_ioctl+0x83/0xb0 > do_syscall_64+0x33/0x40 > entry_SYSCALL_64_after_hwframe+0x44/0xae > RIP: 0033:0x7f8f91ce535b > Code: 0f 1e fa 48 8b 05 2d 9b 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d fd 9a 0c 00 f7 d8 64 89 01 48 > RSP: 002b:00007ffcb4603378 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 > RAX: ffffffffffffffda RBX: 00007ffcb46033b0 RCX: 00007f8f91ce535b > RDX: 00007ffcb46033b0 RSI: 00000000c01064ab RDI: 000000000000000e > RBP: 00000000c01064ab R08: 000055d68f44ba60 R09: 0000000000000000 > R10: 000055d68f44ba60 R11: 0000000000000246 R12: 000055d68f5e0010 > R13: 000000000000000e R14: 0000000000000000 R15: 000055d68e2275c0 > ---[ end trace d18216ba28a2f0e8 ]--- > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Ville Syrj?l? Intel