public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Paulo Zanoni <przanoni@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 7/9] drm/i915/psr: Restrict buffer tracking to the PSR pipe
Date: Tue, 23 Jun 2015 23:00:59 +0200	[thread overview]
Message-ID: <20150623210059.GL25769@phenom.ffwll.local> (raw)
In-Reply-To: <CA+gsUGRP4oBPfrDhFvNHas6UVugBoUBcG_PHSwBrgxGtCz-Ufw@mail.gmail.com>

On Tue, Jun 23, 2015 at 04:57:26PM -0300, Paulo Zanoni wrote:
> 2015-06-18 5:30 GMT-03:00 Daniel Vetter <daniel.vetter@ffwll.ch>:
> > The current code tracks business across all pipes, but we're only
> > really interested in the one pipe DRRS is enabled on. Fairly tiny
> 
> s/DRRS/PSR/
> 
> > optimization, but something I noticed while reading the code. But it
> > might matter a bit when e.g. showing a video or something only on the
> > external screen, while the panel is kept static.
> >
> > Also regroup the code slightly: First compute new bitmasks, then take
> > appropriate actions.
> 
> One of the ideas I had last year was to implement a way to tell user
> space (possibly through debugs) when FBC/PSR gets enabled/disabled. My
> initial idea was to do this through timestamps. Our IGT suite would
> then verify those timestamps: if we have 2 pipes enabled, then we
> write on the non-FBC buffer, the FBC timestamps can't change. This
> type of test would catch exactly the bug you're solving here.
> 
> I even implemented this, and added support for it on
> kms_frontbuffer_tracking, but I ended never sending the Kernel patch
> to the list due to the possible slowness created by the constant
> timestamp generation. Maybe I should resurrect this and hide it under
> some debug kconfig option. I also considered maybe moving the
> implementation from timestamps debugfs file events, or maybe tracing
> code, or something else. Ideas and bikesheds are welcome here.
> 
> So I added some debug messages to the PSR code, then I ran:
> sudo ./kms_frontbuffer_tracking --run-subtest
> psr-2p-scndscrn-pri-sfb-draw-mmap-cpu --step --step
> 
> And I kept watching dmesg as I stepped. Without the patch, I could see
> psr being disabled/enabled as we were writing on the secondary screen
> frontbuffer. With the patch, we stop calling intel_psr_exit()! So:

I think there's two cases really: Adding tracepoints to watch the psr or
frontbuffer code could certainly be useful.

For testcases otoh I'm not in favour of coupling them tightly with the
current kernel implementation. If we only check behavior (like residency
or captured CRCs) we can change the kernel implementation (like e.g.
switch away from hw tracking or the other way round) without any changes
to testcases. If we couple tests tightly with such tracepoints/timestamps
then we might accidentally break the testcase while changing it.

And since upstream is really big about never breaking ABI (which means
observable behaviour, not never changing how it's implemented) I think
doing blackbox testcase is a big plus.

But if it's really not possibel to validate a feature without
introspection then I'm ok with adding tracepoints/ts or similar things.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-06-23 20:58 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-18  8:30 [PATCH 1/9] drm/i915: Clear fb_tracking.busy_bits also for synchronous flips Daniel Vetter
2015-06-18  8:30 ` [PATCH 2/9] drm/i915: Filter out no-op frontbuffer tracking flushes Daniel Vetter
2015-06-23 19:02   ` Paulo Zanoni
2015-06-18  8:30 ` [PATCH 3/9] drm/i915: debugfs for frontbuffer tracking Daniel Vetter
2015-06-23 19:06   ` Paulo Zanoni
2015-06-18  8:30 ` [PATCH 4/9] drm/i915: Nuke lvds downclock support Daniel Vetter
2015-06-18  9:00   ` Chris Wilson
2015-06-18  9:23     ` Daniel Vetter
2015-06-18  9:30       ` Chris Wilson
2015-06-23 21:18         ` Daniel Vetter
2015-06-24  7:42           ` Chris Wilson
2015-06-18  8:30 ` [PATCH 5/9] drm/i915: s/update/compute/ for gmch dpll register functions Daniel Vetter
2015-06-23 20:26   ` Paulo Zanoni
2015-06-23 21:20     ` Daniel Vetter
2015-06-18  8:30 ` [PATCH 6/9] drm/i915/drrs: Restrict buffer tracking to the DRRS pipe Daniel Vetter
2015-06-23 20:32   ` Paulo Zanoni
2015-06-18  8:30 ` [PATCH 7/9] drm/i915/psr: Restrict buffer tracking to the PSR pipe Daniel Vetter
2015-06-23 19:57   ` Paulo Zanoni
2015-06-23 21:00     ` Daniel Vetter [this message]
2015-06-18  8:30 ` [PATCH 8/9] drm/i915/psr: Restrict single-shot updates " Daniel Vetter
2015-06-18  8:53   ` Chris Wilson
2015-06-23 20:12   ` Paulo Zanoni
2015-06-18  8:30 ` [PATCH 9/9] drm/i915: Use to_i915 in intel_frontbuffer.c Daniel Vetter
2015-06-23 20:18   ` Paulo Zanoni
2015-06-18  8:32 ` [PATCH 1/9] drm/i915: Clear fb_tracking.busy_bits also for synchronous flips Ville Syrjälä
2015-06-18  8:43   ` Chris Wilson
2015-06-18  9:23   ` [PATCH] " Daniel Vetter
2015-06-23 18:59     ` Paulo Zanoni
2015-06-23 20:52       ` Daniel Vetter
2015-06-23 15:07 ` [PATCH igt] tests/kms_frontbuffer_tracking: add modesetfrombusy test Paulo Zanoni

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=20150623210059.GL25769@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=przanoni@gmail.com \
    --cc=rodrigo.vivi@intel.com \
    /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