[igt-dev] [PATCH i-g-t 1/3] igt/kms_fbcon_fbt: Handle ENODEV when checking i915_edp_psr_status for chipset support

Daniel Vetter daniel at ffwll.ch
Wed Mar 7 17:01:06 UTC 2018


On Wed, Mar 07, 2018 at 06:16:14AM +0000, Lofstedt, Marta wrote:
> 
> 
> > -----Original Message-----
> > From: Daniel Vetter [mailto:daniel.vetter at ffwll.ch] On Behalf Of Daniel
> > Vetter
> > Sent: Tuesday, March 6, 2018 4:56 PM
> > To: Lofstedt, Marta <marta.lofstedt at intel.com>
> > Cc: Chris Wilson <chris at chris-wilson.co.uk>; igt-dev at lists.freedesktop.org
> > Subject: Re: [igt-dev] [PATCH i-g-t 1/3] igt/kms_fbcon_fbt: Handle ENODEV
> > when checking i915_edp_psr_status for chipset support
> > 
> > On Thu, Feb 22, 2018 at 07:48:53AM +0000, Lofstedt, Marta wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: Chris Wilson [mailto:chris at chris-wilson.co.uk]
> > > > Sent: Thursday, February 22, 2018 9:47 AM
> > > > To: Lofstedt, Marta <marta.lofstedt at intel.com>; igt-
> > > > dev at lists.freedesktop.org
> > > > Subject: Re: [igt-dev] [PATCH i-g-t 1/3] igt/kms_fbcon_fbt: Handle
> > > > ENODEV when checking i915_edp_psr_status for chipset support
> > > >
> > > > Quoting Marta Lofstedt (2018-02-22 07:43:41)
> > > > > If the machine doesn't support PSR, it will return -ENODEV from
> > > > > i915_edp_psr_status, which we want to interpret as unsupported.
> > > > > This is in line with what Chris just fixed for FBC.
> > > > >
> > > > > Signed-off-by: Marta Lofstedt <marta.lofstedt at intel.com>
> > > > > ---
> > > > >  tests/kms_fbcon_fbt.c | 2 ++
> > > > >  1 file changed, 2 insertions(+)
> > > > >
> > > > > diff --git a/tests/kms_fbcon_fbt.c b/tests/kms_fbcon_fbt.c index
> > > > > 1b236f8b..6aa171e6 100644
> > > > > --- a/tests/kms_fbcon_fbt.c
> > > > > +++ b/tests/kms_fbcon_fbt.c
> > > > > @@ -164,6 +164,8 @@ static bool psr_supported_on_chipset(int fd)  {
> > > > >         char buf[256];
> > > > >
> > > > > +       if (*buf == '\0') /* !HAS_PSR -> -ENODEV*/
> > > > > +               return false;
> > > > >         igt_debugfs_read(fd, "i915_edp_psr_status", buf);
> > > >
> > > > After the read :)
> > >
> > > Yeah, was way too trigger happy here
> > 
> > Since Chris wrote the same patch from kms_frontbuffer_tracking ... should
> > we extract these into helpers in lib/ somewhere?
> > -Daniel
> 
> Daniel, this is already merged

Well, even more reasons to maybe extract the same code from both places
:-)

Anyway, was just a suggestion for a possible further cleanup.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the igt-dev mailing list