From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "Manna, Animesh" <animesh.manna@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/psr: Add psr sink error status into sink status debugfs
Date: Wed, 6 Sep 2023 06:15:17 +0000 [thread overview]
Message-ID: <b1dfda1a8199e284946c83c6719bb11477aa429f.camel@intel.com> (raw)
In-Reply-To: <BL1PR11MB5979C1C04C9B3553E8A05E92F9E8A@BL1PR11MB5979.namprd11.prod.outlook.com>
On Tue, 2023-09-05 at 08:52 +0000, Manna, Animesh wrote:
>
>
> > -----Original Message-----
> > From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf
> > Of Jouni
> > Högander
> > Sent: Monday, August 28, 2023 2:01 PM
> > To: intel-gfx@lists.freedesktop.org
> > Subject: [Intel-gfx] [PATCH] drm/i915/psr: Add psr sink error
> > status into sink
> > status debugfs
> >
> > Normally PSR errors detected by the panel are triggering HPD
> > interrupt and
> > seen as error in dmesg. Some panels are not triggering the
> > interrupt even it is
> > requested and they are detecting error. Due to this it would be
> > good to have
> > possibility to check panel detected errors. Add PSR error status
> > into PSR sink
> > status debugfs interface.
> >
> > Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
>
> LGTM.
> Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Thank you Animesh for the review. This is now merged.
BR,
Jouni Högander
>
> > ---
> > drivers/gpu/drm/i915/display/intel_psr.c | 34 +++++++++++++++++---
> > ----
> > 1 file changed, 25 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > b/drivers/gpu/drm/i915/display/intel_psr.c
> > index 72887c29fb51..a008918b4d71 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > @@ -23,6 +23,7 @@
> >
> > #include <drm/drm_atomic_helper.h>
> > #include <drm/drm_damage_helper.h>
> > +#include <drm/drm_debugfs.h>
> >
> > #include "i915_drv.h"
> > #include "i915_reg.h"
> > @@ -3153,7 +3154,7 @@ static int i915_psr_sink_status_show(struct
> > seq_file
> > *m, void *data)
> > };
> > const char *str;
> > int ret;
> > - u8 val;
> > + u8 status, error_status;
> >
> > if (!CAN_PSR(intel_dp)) {
> > seq_puts(m, "PSR Unsupported\n");
> > @@ -3163,19 +3164,34 @@ static int i915_psr_sink_status_show(struct
> > seq_file *m, void *data)
> > if (connector->base.status != connector_status_connected)
> > return -ENODEV;
> >
> > - ret = drm_dp_dpcd_readb(&intel_dp->aux, DP_PSR_STATUS,
> > &val);
> > - if (ret != 1)
> > - return ret < 0 ? ret : -EIO;
> > + ret = psr_get_status_and_error_status(intel_dp, &status,
> > &error_status);
> > + if (ret)
> > + return ret;
> >
> > - val &= DP_PSR_SINK_STATE_MASK;
> > - if (val < ARRAY_SIZE(sink_status))
> > - str = sink_status[val];
> > + status &= DP_PSR_SINK_STATE_MASK;
> > + if (status < ARRAY_SIZE(sink_status))
> > + str = sink_status[status];
> > else
> > str = "unknown";
> >
> > - seq_printf(m, "Sink PSR status: 0x%x [%s]\n", val, str);
> > + seq_printf(m, "Sink PSR status: 0x%x [%s]\n", status, str);
> >
> > - return 0;
> > + seq_printf(m, "Sink PSR error status: 0x%x", error_status);
> > +
> > + if (error_status & (DP_PSR_RFB_STORAGE_ERROR |
> > + DP_PSR_VSC_SDP_UNCORRECTABLE_ERROR |
> > + DP_PSR_LINK_CRC_ERROR))
> > + seq_puts(m, ":\n");
> > + else
> > + seq_puts(m, "\n");
> > + if (error_status & DP_PSR_RFB_STORAGE_ERROR)
> > + seq_puts(m, "\tPSR RFB storage error\n");
> > + if (error_status & DP_PSR_VSC_SDP_UNCORRECTABLE_ERROR)
> > + seq_puts(m, "\tPSR VSC SDP uncorrectable error\n");
> > + if (error_status & DP_PSR_LINK_CRC_ERROR)
> > + seq_puts(m, "\tPSR Link CRC error\n");
> > +
> > + return ret;
> > }
> > DEFINE_SHOW_ATTRIBUTE(i915_psr_sink_status);
> >
> > --
> > 2.34.1
>
prev parent reply other threads:[~2023-09-06 6:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-28 8:31 [Intel-gfx] [PATCH] drm/i915/psr: Add psr sink error status into sink status debugfs Jouni Högander
2023-08-28 10:24 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2023-08-28 10:24 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-08-28 10:38 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-08-28 12:51 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-09-06 5:56 ` Hogander, Jouni
2023-09-05 8:52 ` [Intel-gfx] [PATCH] " Manna, Animesh
2023-09-06 6:15 ` Hogander, Jouni [this message]
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=b1dfda1a8199e284946c83c6719bb11477aa429f.camel@intel.com \
--to=jouni.hogander@intel.com \
--cc=animesh.manna@intel.com \
--cc=intel-gfx@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox