Re: [igt-dev] [PATCH i-g-t 18/20] tests/psr: Check for timestamp support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2018-04-12 at 14:52 +0200, Katarzyna Dec wrote:
> On Tue, Apr 10, 2018 at 07:37:30PM -0700, Dhinakaran Pandiyan wrote:
> > BDW+ have PSR interrupts from which the kernel can update exit and
> > pre-entry time stamps. Tests should prefer this over sink crc to
> > validate PSR.
> > 
> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@xxxxxxxxx>
> > ---
> >  tests/kms_psr_sink_crc.c | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> > 
> > diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c
> > index 043b9e38..147b492f 100644
> > --- a/tests/kms_psr_sink_crc.c
> > +++ b/tests/kms_psr_sink_crc.c
> > @@ -75,6 +75,7 @@ typedef struct {
> >  	igt_output_t *output;
> >  	bool with_psr_disabled;
> >  	bool with_sink_crc;
> > +	bool with_timestamps;
> >  } data_t;
> >  
> >  static void create_cursor_fb(data_t *data)
> > @@ -200,6 +201,17 @@ static bool sink_support(data_t *data)
> >  		strstr(buf, "Sink_Support: yes\n");
> >  }
> >  
> > +static void timestamp_support(data_t *data)
> > +{
> > +	char buf[512];
> > +
> > +	igt_sysfs_set(data->debugfs_fd, "i915_edp_psr_debug", "1");
> > +	igt_debugfs_read(data->drm_fd, "i915_edp_psr_status", buf);
> > +	data->with_timestamps = strstr(buf, "Last exit at:");
> > +	igt_debug("Time stamp support %d\n", data->with_timestamps);
> > +	igt_sysfs_set(data->debugfs_fd, "i915_edp_psr_debug", "0");
> > +}
> > +
> Is this information about timestamp in debugs already in the kernel?

Thanks for the reviews. Not yet, the patches are on the list -
https://patchwork.freedesktop.org/series/41095/

Hoping someone will merge them :)

> Kasia
> >  static bool psr_enabled(data_t *data)
> >  {
> >  	char buf[512];
> > @@ -500,6 +512,7 @@ int main(int argc, char *argv[])
> >  					 0 : 1);
> >  		igt_require_f(sink_support(&data),
> >  			      "Sink does not support PSR\n");
> > +		timestamp_support(&data);
> >  
> >  		data.bufmgr = drm_intel_bufmgr_gem_init(data.drm_fd, 4096);
> >  		igt_assert(data.bufmgr);
> > -- 
> > 2.14.1
> > 
> > _______________________________________________
> > igt-dev mailing list
> > igt-dev@xxxxxxxxxxxxxxxxxxxxx
> > https://lists.freedesktop.org/mailman/listinfo/igt-dev
> _______________________________________________
> igt-dev mailing list
> igt-dev@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux