All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aurabindo Pillai <mail@aurabindo.in>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: dpcd: Print more useful information during error
Date: Wed, 15 Apr 2020 21:44:58 -0400	[thread overview]
Message-ID: <CAMu4TMtb9f_zusEkUkDWzJMJ-uu8yciUUWxGybv2f4a+ER7B+Q@mail.gmail.com> (raw)
In-Reply-To: <87o8rumiqu.fsf@intel.com>

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 <mail@aurabindo.in>
---
 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 <jani.nikula@linux.intel.com> wrote:
>
> On Thu, 09 Apr 2020, Aurabindo Pillai <mail@aurabindo.in> 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 <mail@aurabindo.in>
> > ---
> >  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

WARNING: multiple messages have this Message-ID (diff)
From: Aurabindo Pillai <mail@aurabindo.in>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: David Airlie <airlied@linux.ie>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: dpcd: Print more useful information during error
Date: Wed, 15 Apr 2020 21:44:58 -0400	[thread overview]
Message-ID: <CAMu4TMtb9f_zusEkUkDWzJMJ-uu8yciUUWxGybv2f4a+ER7B+Q@mail.gmail.com> (raw)
In-Reply-To: <87o8rumiqu.fsf@intel.com>

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 <mail@aurabindo.in>
---
 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 <jani.nikula@linux.intel.com> wrote:
>
> On Thu, 09 Apr 2020, Aurabindo Pillai <mail@aurabindo.in> 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 <mail@aurabindo.in>
> > ---
> >  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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-04-16  1:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09 19:52 [PATCH] drm: dpcd: Print more useful information during error Aurabindo Pillai
2020-04-09 19:52 ` Aurabindo Pillai
2020-04-14 11:03 ` Jani Nikula
2020-04-14 11:03   ` Jani Nikula
2020-04-16  1:44   ` Aurabindo Pillai [this message]
2020-04-16  1:44     ` Aurabindo Pillai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMu4TMtb9f_zusEkUkDWzJMJ-uu8yciUUWxGybv2f4a+ER7B+Q@mail.gmail.com \
    --to=mail@aurabindo.in \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.