Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp783392ybz; Wed, 15 Apr 2020 18:59:53 -0700 (PDT) X-Google-Smtp-Source: APiQypI19eVo3urep+G6ENFvioYQB5GTfDG6TJ9sVN+9Q0re7ULRklJ8hzSEmolTQOWuzDtiNCN3 X-Received: by 2002:a17:906:5003:: with SMTP id s3mr7451889ejj.266.1587002393470; Wed, 15 Apr 2020 18:59:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587002393; cv=none; d=google.com; s=arc-20160816; b=Cs8DdiX/tXWFhXxfOxryXQJ00YSpnH+YxVmeguZg9YCyQszepp6otr1jhiPlxKWJ9K zI3Ix/3rD5g1eCVsTjll824Am+U8m/QEuTPqqTw68Y6h2h8l/nDF+DKuIdcZ1KgSgeTu ljGUn6/IXKu1R6LWpDSr5LBoA9tKiDCO+w/hCQNVtDj4b3Nrr+JGUa7VoZ0YkcCs0CS+ 925rQOh+rly46xEJ7sdD7svW6Jyc136MpoiFYpzp43OfkuGeHw3DaNpcNQVLsLtlnHN4 9bxDNBku8V/O/bfdbMrynlpVEGSJnQR7UTwYQPZ6dvNdC0eXFfIBX1GTqcnMB0apKVDt nhWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=i6cDJ9/jxc7iWgnjOZRxOI5nNKzNheaz7rQ3Dx98dlo=; b=y0Qu54hx8i+ykxKhWsKZslBn4m/ut2Rc2X0cLd6eUu6jWUzTZbFvsFs0mZYELyKMVJ tlLBOkptfaiejZv6XXlo+j9lDsBy4bc1VxZlxMJ7auTKE6x6TRzpiFomHgWwDbNr7WWp Q0yeD6tsH42l2YNrk7wCAPl8TEsPQ/VTBGOcnVtOqlpVSVzpDhuYJesyB3cUlRsTgnNN RA9LCGxSr/nPhJsX3QWZDoswurfAHgOqbsbH7phy4OVSeCBTmrdGW05Ag+qESIBEHDPD dMkOCgUAFqzseZdb5Tg942ZgK7yGAn2Ql84RSbrM2v5H+PjXawrwjc1cok9r7LiHuTsr Cc4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aurabindo.in header.s=google header.b=BIA7OQsR; 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=pass (p=NONE sp=NONE dis=NONE) header.from=aurabindo.in Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ch6si6024405edb.50.2020.04.15.18.59.31; Wed, 15 Apr 2020 18:59:53 -0700 (PDT) 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; dkim=pass header.i=@aurabindo.in header.s=google header.b=BIA7OQsR; 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=pass (p=NONE sp=NONE dis=NONE) header.from=aurabindo.in Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732153AbgDPBpQ (ORCPT + 99 others); Wed, 15 Apr 2020 21:45:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726201AbgDPBpM (ORCPT ); Wed, 15 Apr 2020 21:45:12 -0400 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00123C061A0C for ; Wed, 15 Apr 2020 18:45:10 -0700 (PDT) Received: by mail-io1-xd41.google.com with SMTP id n10so19366996iom.3 for ; Wed, 15 Apr 2020 18:45:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aurabindo.in; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=i6cDJ9/jxc7iWgnjOZRxOI5nNKzNheaz7rQ3Dx98dlo=; b=BIA7OQsRl1ROJNQ1YvmltTTLBm+XKtsyULQj/bnfCx+MwjCnhqs4UgXDyIpe18RtN0 xJbDEY8he8SaslRGlOVBNZrRQXwJqnHEQmp7z0bG1mwwFPreLEOzxmdH8ykozZ7G2VTp nBuHp+txb8V/7fq9OEWipEVRiBC/F8YuBVYKozGdfNremYW3lOM4QyVKK3ij9CgQPHAF UrKu9iLqgmtLrANGhRVdIq3HERcBDQBMHurShfxmKZAnFo24BpcvwjZct8CBP6x1Q+uB ydsxDCtFcHXzlMAGT6uflDBOzDhnx72fkyMAGhT8mEk4FSonrZQVSScEIs41w4S93NPW o1Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=i6cDJ9/jxc7iWgnjOZRxOI5nNKzNheaz7rQ3Dx98dlo=; b=fzCJs69ECIj0LpcEXXmCfeBDbK9T1WL6BpxMfGVpmJNi9RPLfHtwoQEGl2LUEwUH5n uuN+HzC5w7QQuCt7RPpTNm6YoC2FRiL8zauCyUFvin/5OBuZjV69fkamnRhK2K6DUHv+ TSL0Di8dT2o7YvtND6mDW8agGtsOj6GsW8wjXq0dUB3NsbjZAl4G+8m22GYVNM6D8kAx UiXkypYYQp1W2WAZkRTRTFOIelyHvNv/hgtEsbb7Btc/lTseXki5hbpfrSUmSb3wu655 ozTDo7lxScsE1qvp/EZRh3Rq4n39nfL/labVLZDuxc5LGfTHF0KTDmUC8QLa187FnIzV uNfw== X-Gm-Message-State: AGi0PuaC7aLXOEkD+D6hQI2FIKx0tvz5JCIXsBCM0SnL1Z++jvPwpbkA +SgODziA8rlKbQM4ckPVWtL5SjPeJSxtX7su+PiYXw== X-Received: by 2002:a02:5249:: with SMTP id d70mr29141487jab.121.1587001510217; Wed, 15 Apr 2020 18:45:10 -0700 (PDT) MIME-Version: 1.0 References: <20200409195200.5483-1-mail@aurabindo.in> <87o8rumiqu.fsf@intel.com> In-Reply-To: <87o8rumiqu.fsf@intel.com> From: Aurabindo Pillai Date: Wed, 15 Apr 2020 21:44:58 -0400 Message-ID: Subject: Re: [PATCH] drm: dpcd: Print more useful information during error To: Jani Nikula Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org, David Airlie , Daniel Vetter , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When DPCD access errors occur, knowing the register and request associated with the error helps debugging, so print the details in the debug message. Signed-off-by: Aurabindo Pillai --- drivers/gpu/drm/drm_dp_helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c index c6fbe6e6b..8aafc01f5 100644 --- a/drivers/gpu/drm/drm_dp_helper.c +++ b/drivers/gpu/drm/drm_dp_helper.c @@ -257,7 +257,9 @@ static int drm_dp_dpcd_access(struct drm_dp_aux *aux, u8 request, err = ret; } - DRM_DEBUG_KMS("Too many retries, giving up. First error: %d\n", err); + DRM_DEBUG_KMS("dpcd: Too many retries, giving up. First error: %d," + " address: 0x%x, request: 0x%x, size:%zu\n", + err, msg.address, msg.request, msg.size); ret = err; unlock: -- 2.26.0 On Tue, Apr 14, 2020 at 7:04 AM Jani Nikula wrote: > > On Thu, 09 Apr 2020, Aurabindo Pillai wrote: > > When DPCD access errors occur, knowing the register and request > > associated with the error helps debugging, so print the > > details in the debug message. > > > > Signed-off-by: Aurabindo Pillai > > --- > > drivers/gpu/drm/drm_dp_helper.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c > > index a5364b519..545606aac 100644 > > --- a/drivers/gpu/drm/drm_dp_helper.c > > +++ b/drivers/gpu/drm/drm_dp_helper.c > > @@ -257,7 +257,9 @@ static int drm_dp_dpcd_access(struct drm_dp_aux *aux, u8 request, > > err = ret; > > } > > > > - DRM_DEBUG_KMS("Too many retries, giving up. First error: %d\n", err); > > + DRM_DEBUG_KMS("dpcd: Too many retries, giving up. First error: %d\t" > > + "address: %x\trequest: %x\t size:%zu\n", > > + err, msg.address, msg.request, msg.size); > > Nitpicks, please don't add tabs, maybe use commas instead, and please > add 0x in front of hex. > > BR, > Jani. > > > > ret = err; > > > > unlock: > > -- > Jani Nikula, Intel Open Source Graphics Center -- Thanks and Regards, Aurabindo J Pillai https://aurabindo.in