All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: patrik.jakobsson@intel.com, intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: Fwd: [PATCH] drm/i915: Avoid vblank counter for gen9+
Date: Wed, 02 Mar 2016 19:13:07 +0200	[thread overview]
Message-ID: <1456938787.16838.31.camel@intel.com> (raw)
In-Reply-To: <CABVU7+vEnGGo4WXWJx05_K9ajmeGUOGz4Ag7JDwhTMzdcSzAxw@mail.gmail.com>

On Fri, 2016-02-26 at 10:02 -0800, Rodrigo Vivi wrote:
> [...]
> Well, I have this tree:
> https://cgit.freedesktop.org/~vivijim/drm-intel/log/?h=rpm-domains-psr-vblank-counter-full
> with mainly:
> 1 - vblank domain on pre-enable post-disable vblanks hooks as Ville
> had suggested
> 2 - psr domain so we just enable dc state when screen is really in
> idle.
> 3 - restore counter on vblank enable.
> 
> From what I understood so far of this problem, only the patch 1
> should
> be enough, but with only this one I don't get the screen frozen but
> the typying is so slow that is visible that we have something
> wrong.... Maybe dc state transition with mutexes there are slow?

I'm not aware of any big latencies caused by toggling DC states alone.

> Patch 2 by iitself also doesn't solve this and I still have frozen
> screens, but when combined to  patch 1 everything works really
> well...
> In the point that I believe we really don't need patch 3.

I think something like 1 and 3 is a good idea (and both are needed).
About 2, it's strange that you have to disable DC states when enabling
the panel. Since the pipe is active it should prevent DC5 (and hence
DC6). We wouldn't waste any power with your changes, since you re-
enable DC states before entering PSR, but imo we should find out why
exactly this is needed.

Some notes/ideas about the patches:
- intel_display_power_get() is called from page_flip_completed(), which
 is bad since we can be in interrupt context.
- There is a drm_crtc_vblank_get() in intel_crtc_page_flip(), but there
is no corresponding intel_display_power_get() for it.
- The same goes for the FBC, CRC code, couldn't you just call the new
vblank hooks from drm_vblank_get/put()?
- PIPE_FLIPCOUNT_G4X is also read-only, so it could get corrupted the
same way as the frame counter register. page_flip_finished() depends on
PIPE_FLIPCOUNT_G4X, so isn't this a problem?

I haven't checked this in detail, but it could be that we need to exit
PSR explicitly when waiting for a vblank or doing a flip. In PSR mode
the pipe may not be running, so I'm not sure how the vblank and flip
interrupts would be delivered.

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

  reply	other threads:[~2016-03-02 17:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11 17:00 [PATCH] drm/i915: Avoid vblank counter for gen9+ Rodrigo Vivi
2016-02-12  1:19 ` kbuild test robot
2016-02-12  1:32 ` kbuild test robot
2016-02-12 15:51   ` Vivi, Rodrigo
2016-02-12  9:34 ` David Weinehall
2016-02-12 15:57   ` Vivi, Rodrigo
2016-02-12 16:21     ` Vivi, Rodrigo
2016-02-12 16:04 ` Ville Syrjälä
2016-02-16  8:09 ` ✗ Fi.CI.BAT: failure for " Patchwork
2016-02-16 15:50 ` [PATCH] " Daniel Vetter
2016-02-17 23:14   ` Rodrigo Vivi
2016-02-18 16:56     ` Fwd: " Rodrigo Vivi
2016-02-18 17:55       ` Imre Deak
2016-02-22 14:33       ` Imre Deak
2016-02-26 18:02         ` Rodrigo Vivi
2016-03-02 17:13           ` Imre Deak [this message]
2016-03-03 10:14             ` Patrik Jakobsson

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=1456938787.16838.31.camel@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=patrik.jakobsson@intel.com \
    --cc=rodrigo.vivi@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.