Received: by 10.213.65.68 with SMTP id h4csp802183imn; Tue, 13 Mar 2018 23:53:50 -0700 (PDT) X-Google-Smtp-Source: AG47ELupDK7LE5M8hkd6bnVD1yKLeoffIBwbkiyHb+6YIG9VPmi8P6RVwQHN3frsm9baxNg4sKff X-Received: by 10.101.93.71 with SMTP id e7mr2859392pgt.248.1521010430742; Tue, 13 Mar 2018 23:53:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521010430; cv=none; d=google.com; s=arc-20160816; b=F9vhwgPoDxFp+yV3ulcifjqNGDhP8QaLpRNQHlmA3nDZwalMrl+cBdhg6IkGB+liYf C7zvdCbqdyiIv8rMhES30/L00z8+wiElM8gCNjU922JPzr3nKAt9R7y+9Cl8UIRstI+/ nn+6A0/8nDkJRJ+G31w5La4R0pJpb5KwxepusqMRMc8zTJP+fZzaPsILXvyXb0SSLwF4 d4pAvVdHLhMMxKRrYHiJbkCs5qQBTnfGOkrc1xA4hfAG+OsuxDdWrrDnAEOHQK3hUChm UmxzdfQwiMBaGMA2xjUj9pnLqDFGzB/LFaa7NlTttPV+Od2BWa3Y0oNrCDbEx6+R8Hru aXsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=oJSS0MlX1m3oziF3A9vk4VhHcnkV3yI+ckJ+ubQ4BHw=; b=pTbBy2Q8rUNX+e/6mjpbVFI7ZCf+qhge+dr818VURrTFk0rCp6qPFWMnQUreVW+hXZ I2hXhweInW5YDCvf2lciVTou2sKzl2fwk/5v0CXYvvErMsdx9LeI+PANns0c8twfEAM8 RJcODqcYaylyG8Ft786+fmd9gBW8sDOttZguHtdu8JFeJ76ji6LtPccquW2avouE6Zny 94O67Rmuu5GV70PDAwZBbc87sWcoLmcVFIlbveOiEtgEaSDnCh83Zst0QXiPPxZzFF+h YCUlBs3Lj0R9BptQvSPH5jrPcAgOmh4otoJBEP+72JZwRS1AqGbuG8fBuFPaYQyImnWT lSzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Goy0PXxf; dkim=pass header.i=@codeaurora.org header.s=default header.b=mEJxkLDs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g6si884218pgr.339.2018.03.13.23.53.36; Tue, 13 Mar 2018 23:53:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Goy0PXxf; dkim=pass header.i=@codeaurora.org header.s=default header.b=mEJxkLDs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753479AbeCNGwm (ORCPT + 99 others); Wed, 14 Mar 2018 02:52:42 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:41090 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750934AbeCNGwj (ORCPT ); Wed, 14 Mar 2018 02:52:39 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 62FDB60A05; Wed, 14 Mar 2018 06:52:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521010359; bh=oSEsJB+VMoyFBKooCAP4VD7X0R9PFB2SHFdYj2Tr1o8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Goy0PXxfDcmHKz0P/JJfOmV8QTMMf05VbxlQ11EjPAndoNTZuhze6o2GkgPhg0Gur 3774iQrenKr8I1KsO440AcndIh6bOzMfGHdQfU2k3WHf+38q7lCM+KxZcA8s6tkiAu x2kBbO/kFs37zzXIX0NK0GRzddrn7icuvsy3RvfM= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.1.84] (unknown [182.71.117.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: architt@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 578226070A; Wed, 14 Mar 2018 06:52:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521010358; bh=oSEsJB+VMoyFBKooCAP4VD7X0R9PFB2SHFdYj2Tr1o8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=mEJxkLDsb4sv1qMhCwu3KnBTY3WJ6F8W2MXVX5jykE5uGrEM/hAiohhWfBKGWLB6j 1G/9IfHDwnM/vYp+fffUMjsf2Ms8Rybxe5v2TfQrvss9vuX8DT9+xNpCRmbX1GuKh2 cznUCzuIxPBwt4xZHJCfUthGMJeW+GuviZhzpvYE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 578226070A Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=architt@codeaurora.org Subject: Re: [PATCH v5 25/36] drm/bridge: analogix_dp: Properly log AUX CH errors To: Enric Balletbo i Serra , inki.dae@samsung.com, thierry.reding@gmail.com, hjc@rock-chips.com, seanpaul@chromium.org, airlied@linux.ie, tfiga@chromium.org, heiko@sntech.de Cc: dri-devel@lists.freedesktop.org, dianders@chromium.org, a.hajda@samsung.com, ykk@rock-chips.com, kernel@collabora.com, m.szyprowski@samsung.com, linux-samsung-soc@vger.kernel.org, jy0922.shim@samsung.com, rydberg@bitmath.org, krzk@kernel.org, linux-rockchip@lists.infradead.org, kgene@kernel.org, linux-input@vger.kernel.org, orjan.eide@arm.com, wxt@rock-chips.com, jeffy.chen@rock-chips.com, linux-arm-kernel@lists.infradead.org, mark.yao@rock-chips.com, wzz@rock-chips.com, hl@rock-chips.com, jingoohan1@gmail.com, sw0312.kim@samsung.com, linux-kernel@vger.kernel.org, kyungmin.park@samsung.com, Laurent.pinchart@ideasonboard.com, kuankuan.y@gmail.com, hshi@chromium.org References: <20180309222327.18689-1-enric.balletbo@collabora.com> <20180309222327.18689-26-enric.balletbo@collabora.com> From: Archit Taneja Message-ID: Date: Wed, 14 Mar 2018 12:22:24 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180309222327.18689-26-enric.balletbo@collabora.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday 10 March 2018 03:53 AM, Enric Balletbo i Serra wrote: > From: Douglas Anderson > > The code in analogix_dp_transfer() that was supposed to print out: > AUX CH error happened > > Was actually dead code. That's because the previous check (whether > the interrupt status indicated any errors) would have hit for all > errors anyway. > > Let's combine the two error checks so we can actually see AUX CH > errors. We'll also downgrade the message to a warning since some of > these types of errors might be expected for some displays. If this > gets too noisy we can downgrade again to debug. Reviewed-by: Archit Taneja Thanks, Archit > > Cc: 征增 王 > Signed-off-by: Douglas Anderson > Signed-off-by: Sean Paul > Signed-off-by: Thierry Escande > Reviewed-by: Andrzej Hajda > Signed-off-by: Enric Balletbo i Serra > Tested-by: Marek Szyprowski > --- > > drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 13 +++++-------- > 1 file changed, 5 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c > index 4eae206ec31b..58e8a28e99aa 100644 > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c > @@ -1105,6 +1105,7 @@ ssize_t analogix_dp_transfer(struct analogix_dp_device *dp, > struct drm_dp_aux_msg *msg) > { > u32 reg; > + u32 status_reg; > u8 *buffer = msg->buffer; > unsigned int i; > int num_transferred = 0; > @@ -1193,16 +1194,12 @@ ssize_t analogix_dp_transfer(struct analogix_dp_device *dp, > > /* Clear interrupt source for AUX CH access error */ > reg = readl(dp->reg_base + ANALOGIX_DP_INT_STA); > - if (reg & AUX_ERR) { > + status_reg = readl(dp->reg_base + ANALOGIX_DP_AUX_CH_STA); > + if ((reg & AUX_ERR) || (status_reg & AUX_STATUS_MASK)) { > writel(AUX_ERR, dp->reg_base + ANALOGIX_DP_INT_STA); > - goto aux_error; > - } > > - /* Check AUX CH error access status */ > - reg = readl(dp->reg_base + ANALOGIX_DP_AUX_CH_STA); > - if ((reg & AUX_STATUS_MASK)) { > - dev_err(dp->dev, "AUX CH error happened: %d\n\n", > - reg & AUX_STATUS_MASK); > + dev_warn(dp->dev, "AUX CH error happened: %#x (%d)\n", > + status_reg & AUX_STATUS_MASK, !!(reg & AUX_ERR)); > goto aux_error; > } > >