From patchwork Fri Feb 7 16:47:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Imre Deak X-Patchwork-Id: 3606521 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 26F17BF418 for ; Fri, 7 Feb 2014 16:48:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5B38A2012F for ; Fri, 7 Feb 2014 16:48:37 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 83A4F2010F for ; Fri, 7 Feb 2014 16:48:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 75034FBB81; Fri, 7 Feb 2014 08:48:31 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id E4512FBB33; Fri, 7 Feb 2014 08:48:28 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 07 Feb 2014 08:44:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.95,801,1384329600"; d="asc'?scan'208";a="471490366" Received: from intelbox.fi.intel.com (HELO [10.237.72.105]) ([10.237.72.105]) by fmsmga001.fm.intel.com with ESMTP; 07 Feb 2014 08:47:55 -0800 Message-ID: <1391791674.21697.2.camel@intelbox> Subject: Re: intel_sdvo_init: trying to register non-static key From: Imre Deak To: Borislav Petkov Date: Fri, 07 Feb 2014 18:47:54 +0200 In-Reply-To: <20140207154911.GK24395@pd.tnic> References: <20140207093205.GA24395@pd.tnic> <87d2iz18vi.fsf@intel.com> <1391771542.5669.6.camel@intelbox> <20140207112809.GG24395@pd.tnic> <20140207145149.GZ17001@phenom.ffwll.local> <1391787126.5669.11.camel@intelbox> <20140207154911.GK24395@pd.tnic> Organization: Intel X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 Cc: Daniel Vetter , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: imre.deak@intel.com List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, 2014-02-07 at 16:49 +0100, Borislav Petkov wrote: > On Fri, Feb 07, 2014 at 05:32:06PM +0200, Imre Deak wrote: > > I just realized it's a different issue, since it's on the init path. > > Also we set the drm device as the parent for the sdvo i2c adapter as > > opposed to the dp i2c adapter where it's the connector device. So the > > above patch won't help in Borislav's case. Ok, not sure why the sdvo initialization fails, but the lockdep warning is probably fixed by the below patch. Could you try it and send a dmesg with drm.debug=0xe? diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c index 5104cf5..bd6e18b 100644 --- a/fs/kernfs/dir.c +++ b/fs/kernfs/dir.c @@ -187,19 +187,23 @@ static void kernfs_deactivate(struct kernfs_node *kn) kn->u.completion = (void *)&wait; - rwsem_acquire(&kn->dep_map, 0, 0, _RET_IP_); + if (kn->flags & KERNFS_LOCKDEP) + rwsem_acquire(&kn->dep_map, 0, 0, _RET_IP_); /* atomic_add_return() is a mb(), put_active() will always see * the updated kn->u.completion. */ v = atomic_add_return(KN_DEACTIVATED_BIAS, &kn->active); if (v != KN_DEACTIVATED_BIAS) { - lock_contended(&kn->dep_map, _RET_IP_); + if (kn->flags & KERNFS_LOCKDEP) + lock_contended(&kn->dep_map, _RET_IP_); wait_for_completion(&wait); } - lock_acquired(&kn->dep_map, _RET_IP_); - rwsem_release(&kn->dep_map, 1, _RET_IP_); + if (kn->flags & KERNFS_LOCKDEP) { + lock_acquired(&kn->dep_map, _RET_IP_); + rwsem_release(&kn->dep_map, 1, _RET_IP_); + } }