[igt-dev] [PATCH i-g-t 3/5] lib/igt_psr: added function to check output supports pr
Hogander, Jouni
jouni.hogander at intel.com
Wed Oct 25 07:05:43 UTC 2023
On Wed, 2023-10-25 at 06:01 +0000, Joshi, Kunal1 wrote:
> Hello Jouni,
>
> -----Original Message-----
> From: Hogander, Jouni <jouni.hogander at intel.com>
> Sent: Friday, October 20, 2023 5:43 PM
> To: Joshi, Kunal1 <kunal1.joshi at intel.com>;
> igt-dev at lists.freedesktop.org
> Cc: Murthy, Arun R <arun.r.murthy at intel.com>; Manna, Animesh
> <animesh.manna at intel.com>
> Subject: Re: [PATCH i-g-t 3/5] lib/igt_psr: added function to check
> output supports pr
>
> On Fri, 2023-10-20 at 11:35 +0530, Kunal Joshi wrote:
> > added function to check output supports PR
> >
> > Note :- New debugfs interfaces which are used
> > will be added by below patch in the driver
> > https://patchwork.freedesktop.org/series/94470/
> >
> > Cc: Jouni Högander <jouni.hogander at intel.com>
> > Cc: Animesh Manna <animesh.manna at intel.com>
> > Cc: Arun R Murthy <arun.r.murthy at intel.com>
> > Signed-off-by: Kunal Joshi <kunal1.joshi at intel.com>
> > ---
> > lib/igt_psr.c | 17 +++++++++++++++++
> > lib/igt_psr.h | 1 +
> > 2 files changed, 18 insertions(+)
> >
> > diff --git a/lib/igt_psr.c b/lib/igt_psr.c index
> > acacfa31f..4c912a064
> > 100644
> > --- a/lib/igt_psr.c
> > +++ b/lib/igt_psr.c
> > @@ -22,6 +22,7 @@
> > */
> >
> > #include "drmtest.h"
> > +#include "igt_kms.h"
> > #include "igt_params.h"
> > #include "igt_psr.h"
> > #include "igt_sysfs.h"
> > @@ -373,3 +374,19 @@ enum psr_mode psr_get_mode(int debugfs_fd)
> >
> > return PSR_DISABLED;
> > }
> > +
> > +bool output_supports_pr(int debugfs_fd, igt_output_t *output) {
> > + char debugfs_file[128] = {0};
> > + char buf[PSR_STATUS_MAX_LEN];
> > +
> > + if (!strstr(output->name,"DP"))
> > + return false;
> > +
> > + sprintf(debugfs_file, "%s/i915_psr_status", output->name);
> > +
> > + igt_debugfs_simple_read(debugfs_fd, debugfs_file,
> > + buf, sizeof(buf));
> > +
> > + return strstr(buf, "Panel Replay = yes"); }
>
> > Why do you think psr_sink_support couldn't work for DP as well?
> >
> > BR,
>
> > Jouni Högander
>
> Jouni psr_sink_support won't work for DP, psr_sink_support is
> modified
> for eDP only. Changes are based on driver changes done in
> https://patchwork.freedesktop.org/series/94470/
Ok but instead of adding new you could modify psr_sink_support to
accept PR_MODE and PR_MODE_SEL_FETCH?
BR,
Jouni Högander
>
>
> > diff --git a/lib/igt_psr.h b/lib/igt_psr.h index
> > 243154897..8e36fcf2f
> > 100644
> > --- a/lib/igt_psr.h
> > +++ b/lib/igt_psr.h
> > @@ -55,5 +55,6 @@ bool i915_psr2_selective_fetch_check(int drm_fd);
> >
> > bool i915_psr2_sel_fetch_to_psr1(int drm_fd);
> > void i915_psr2_sel_fetch_restore(int drm_fd);
> > +bool output_supports_pr(int debugfs_fd, igt_output_t *output);
> >
> > #endif
>
More information about the igt-dev
mailing list