From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0BAC3418A24 for ; Fri, 17 Jul 2026 14:29:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784298583; cv=none; b=gW2kuue+4qgaMmMIUroL51/hzsSgleWtuqWXi1SlmgruM2nQeLBVo7t0hEiTuS8Xw+JOv1UX5beAZGePrDMHmeZuB+17nTpv+6YNDCCQAXtGBVcJ9u/eimfBBQxj5N/VCR4ZabS5xakZX2CsUvswi89m//MgWnQlFbnI6QaOnmY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784298583; c=relaxed/simple; bh=qKxRZUo6dbHgbUZ9Pw97wD+8FDsidAlxmwv+Gsa2+J8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Dy0kkxfqYQGVjuO2lUdbWVIEyHAijKOdcfhQ6dkQkhaLSQLEsaRWjc3U6miijcTit7gCC1mWCr/axac3mZdt9JKagFbaaRRxvfqUbdkUDkA/TeYIglf5Bs1mv26LpV0BwXEkuqcWdZytvH/Jc2LKEJhRoI+aPDeV0hTjpwnW/NM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=R2KJ8m5P; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="R2KJ8m5P" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7D6A1F000E9; Fri, 17 Jul 2026 14:29:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1784298581; bh=NXH9xDP5EGt4A9bhAAgfN7wyEZ9GTtJVjj7HW+q1SQc=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=R2KJ8m5PkPwQBw0jAJXXX750pY4kPE/YgPe99p5L6gMj2TGr3TuXVwslR2fBxL6ii gdXwaU78/lBLG4AbstFSRWYabGHcmrZfQQoPR3s0Zeu4zt6vspKeTDLmLBg/4nOh7k lrZ7tPQVPivswaGbG/9lnfrgCWEyq42N8CHKYwMrXCdI2iTOAzq+SWr3AtfxOcicr0 B6n1QcOMuwMFGIXt0bUN+68Dnua4rD5URgV3fMtiHuLruVSV+DggWK2ZpHsIcuptmW B8IHybc6ITZ+Jjwy1zPLv6gezpOLt+EUaRMkhYcbfoR7tVSyJL9vTCxDBsYpUObASX VRenxz/MZKVvg== Received: from johan by xi.lan with local (Exim 4.99.4) (envelope-from ) id 1wkjZL-00000007c9e-1A4A; Fri, 17 Jul 2026 16:29:39 +0200 Date: Fri, 17 Jul 2026 16:29:39 +0200 From: Johan Hovold To: Doug Anderson Cc: Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/panel-edp: take i2c adapter module reference Message-ID: References: <20260716132245.1565121-1-johan@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Hi Doug, On Thu, Jul 16, 2026 at 10:27:02AM -0700, Doug Anderson wrote: > On Thu, Jul 16, 2026 at 6:22 AM Johan Hovold wrote: > > > > The i2c subsystem currently blocks during adapter deregistration > > whenever there are consumers holding a reference. > > > > Switch to using of_get_i2c_adapter_by_node() which also takes a > > reference to the adapter module so that an attempt to unload the module > > while in use fails gracefully instead of blocking uninterruptibly. > > > > Signed-off-by: Johan Hovold > > --- > > drivers/gpu/drm/panel/panel-edp.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > Reviewed-by: Douglas Anderson > > Worth adding any "Fixes:" tag? I guess this has been using > of_find_i2c_adapter_by_node() for a long time... Yeah, this comes from panel-simple which has had this issue since it was merged in 2013. And that's a couple of years before the helper taking a module reference even existed. I decided not to treat these as individual driver bugs, but perhaps the instances added after the helper was merged could have had a Fixes tag. > Sashiko-bot review [1] seems right, even though it's pointing out > something that isn't really a new problem and is very much a corner > case where someone is crafting an intentionally ridiculous device > tree. If you agree, I wouldn't mind a followup patch fixing that, too. > ;-) > > [1] https://lore.kernel.org/r/20260716133420.187131F000E9@smtp.kernel.org/ Right, I saw that one too but wrote it off as a preexisting issue. I'll send a v2 of this one rebased on a fix for that instead. Johan