Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp245929lqo; Thu, 16 May 2024 05:22:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVG52yrSOS4KVFptEkpDKkaor15/7r5rIIQ/l19CLsRlh0crMtNar+X3fpeup1h6OSNRTTuXabVMtKCYp8lyrsfE7zGq/LdAZxzePEBRw== X-Google-Smtp-Source: AGHT+IHQahhwiQ8jUeN4vM0w2eDZWadNqMOxsTGH38sIdiQdD4IBAm+ejSpgZfyCk3TKFQD6j27+ X-Received: by 2002:a17:90a:4592:b0:2b4:e4d2:c9d5 with SMTP id 98e67ed59e1d1-2b6cc97d19dmr14890877a91.25.1715862174765; Thu, 16 May 2024 05:22:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715862174; cv=pass; d=google.com; s=arc-20160816; b=fChcsIRrl8TolNJ9WSM/0mpKLwkpWKlQszgCMWpjj/eOY+bNeNaAEHgwb3bV5wMZKJ UQbGkVFP8NvdNH9y4fJJmMsSEYf4tcWrJddcsSQ1Exb0rjMZWzxIVqjkrndQrqnyCIsb FFY7J2az0QziSW3Kcax/esf8fOAayJePg3V1IASxe1khCN/ZByh6iNk4GzzbhVOWEiDB SbuTakNpAh7rwIUEznG9whV5gmPrm5QIIVDZLGT3dcI/6B50SSExXPg2UBG7f7F+Wlnc TRCVf/jFecntm9mYlcltN6KEyz5dEGfdNHWUgLUkj2Sbi9JO0nb4Qnu39Tx7A209d/mj fLuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=1XgBn1TBqz7ORvcVHfiGE+49CtbrApfFFA6HF8M1gK8=; fh=oJgrcVn5bM2LYAMlYxBEH4toQIkMhw1syUW4hIO+uzg=; b=hpz7a5bJa62IAgjpS48/Sxnz1F7bXkNZ/v3wwea/9Ds6d5IazLFSAj5t7h9RDmvHKX s0LRX0YopjiVrs24G5KOApvSzjb7MwQ/T81Capsg3hW1FcRmgCYDctfG2P+12X3luvUS 07Pf0JLMg7bdJAk22xLKTVIiuub5uk14B6fAuRVAkVeYhwj+h375yCbUIjzTQ2UxJjtV 9zPtv/0AWtAPkpMuCMZ/WQDHkyyEwDtggdE3ZshojdlkKi78REqw0owKXpUI5uYDwaXW nSIxl41HLsgD3fcKUtAEckYTo/sugxzBgspB5rGkhZdZI0JgLafcuWCVx4uN1uyHEaoL dVHA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=vgGTqowU; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-180999-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180999-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b6711622f9si15792569a91.78.2024.05.16.05.22.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 05:22:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180999-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=vgGTqowU; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-180999-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180999-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D14CB285542 for ; Thu, 16 May 2024 12:22:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8135314D2A3; Thu, 16 May 2024 12:21:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="vgGTqowU" Received: from out-186.mta1.migadu.com (out-186.mta1.migadu.com [95.215.58.186]) (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 22EE8146D55 for ; Thu, 16 May 2024 12:21:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.186 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715862087; cv=none; b=iVoL2pQOXSadjKfam7PbR+qG3Pym0mUx+nBpAaEoYONVaRP4nrmx4qw4lQiX+mF3qpOuRdH2cmruBWggCwN/nz5i5+fa841AeM/soA0ljq3wAefD9nKsNl2Jd9boM+LpaG2+qp0HaZgRnTxkDtd+ZXkfz0uqsOOWA4kPfEHWwVo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715862087; c=relaxed/simple; bh=j7MY69Or72NZH1eJL++77Z7Jpgc6pYvPCJ1p9zrSjHQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=of/V7ADjuP2yZLj9Jj2CXE9cX6fnljScjuk3t3+xyLILjYiFR1uPh0VJEQFKaZ3T1aLSZPogdqLZ01/Y8TFaa3IVB2S33i4dDz//Up4cOFAIOXaTlDukxpQJ1zA9PLGpcrSbJcOTuZiDjOd1oKMamzDu3E06SxUsqP+otp2+Ezg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=vgGTqowU; arc=none smtp.client-ip=95.215.58.186 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: victor.liu@nxp.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1715862082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1XgBn1TBqz7ORvcVHfiGE+49CtbrApfFFA6HF8M1gK8=; b=vgGTqowUZ01AfguD1IRFKwkyFnyMeeoLcPLh8UatHjG9CjwLbQ6kYvCVzPYxQqzmSTVtEf OxXdH5sv6pOld9UPYVWpFG5eiQ5byvM6babc1xl/3BYE7+tahw8PZLVjT9VqDXgjkVkO3b fY2R1seKDJwuBBtcoWMWIY5T1PKHfEs= X-Envelope-To: dri-devel@lists.freedesktop.org X-Envelope-To: linux-kernel@vger.kernel.org X-Envelope-To: andrzej.hajda@intel.com X-Envelope-To: neil.armstrong@linaro.org X-Envelope-To: rfoss@kernel.org X-Envelope-To: laurent.pinchart@ideasonboard.com X-Envelope-To: jonas@kwiboo.se X-Envelope-To: jernej.skrabec@gmail.com X-Envelope-To: maarten.lankhorst@linux.intel.com X-Envelope-To: mripard@kernel.org X-Envelope-To: tzimmermann@suse.de X-Envelope-To: airlied@gmail.com X-Envelope-To: daniel@ffwll.ch X-Envelope-To: biju.das.jz@bp.renesas.com X-Envelope-To: dmitry.baryshkov@linaro.org X-Envelope-To: u.kleine-koenig@pengutronix.de X-Envelope-To: aford173@gmail.com X-Envelope-To: jani.nikula@intel.com X-Envelope-To: bli@bang-olufsen.dk Message-ID: Date: Thu, 16 May 2024 20:21:12 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH] drm/bridge: adv7511: Exit interrupt handling when necessary To: Liu Ying , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch, biju.das.jz@bp.renesas.com, dmitry.baryshkov@linaro.org, u.kleine-koenig@pengutronix.de, aford173@gmail.com, jani.nikula@intel.com, bli@bang-olufsen.dk References: <20240516101006.2388767-1-victor.liu@nxp.com> Content-Language: en-US, en-AU X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sui Jingfeng In-Reply-To: <20240516101006.2388767-1-victor.liu@nxp.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT Hi, On 5/16/24 18:10, Liu Ying wrote: > Commit f3d9683346d6 ("drm/bridge: adv7511: Allow IRQ to share GPIO pins") > fails to consider the case where adv7511->i2c_main->irq is zero, i.e., > no interrupt requested at all. > > Without interrupt, adv7511_wait_for_edid() could return -EIO sometimes, > because it polls adv7511->edid_read flag by calling adv7511_irq_process() > a few times, but adv7511_irq_process() happens to refuse to handle > interrupt by returning -ENODATA. Hence, EDID retrieval fails randomly. > > Fix the issue by checking adv7511->i2c_main->irq before exiting interrupt > handling from adv7511_irq_process(). > > Fixes: f3d9683346d6 ("drm/bridge: adv7511: Allow IRQ to share GPIO pins") > Signed-off-by: Liu Ying Acked-by: Sui Jingfeng > --- > drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c > index 6089b0bb9321..2074fa3c1b7b 100644 > --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c > +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c > @@ -479,7 +479,8 @@ static int adv7511_irq_process(struct adv7511 *adv7511, bool process_hpd) > return ret; > > /* If there is no IRQ to handle, exit indicating no IRQ data */ > - if (!(irq0 & (ADV7511_INT0_HPD | ADV7511_INT0_EDID_READY)) && > + if (adv7511->i2c_main->irq && > + !(irq0 & (ADV7511_INT0_HPD | ADV7511_INT0_EDID_READY)) && > !(irq1 & ADV7511_INT1_DDC_ERROR)) > return -ENODATA; > -- Best regards Sui