From: "Pandiyan, Dhinakaran" <dhinakaran.pandiyan@intel.com>
To: "chris@chris-wilson.co.uk" <chris@chris-wilson.co.uk>
Cc: "Dhinakaran@freedesktop.org" <Dhinakaran@freedesktop.org>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH v2 2/3] drm/i915/frontbuffer: HW tracking for cursor moves to fix PSR lags.
Date: Wed, 7 Mar 2018 23:10:35 +0000 [thread overview]
Message-ID: <1520465664.20396.67.camel@dk-H97M-D3H> (raw)
In-Reply-To: <152046321267.3176.11917243839208355288@mail.alporthouse.com>
On Wed, 2018-03-07 at 22:53 +0000, Chris Wilson wrote:
> Quoting Dhinakaran Pandiyan (2018-03-07 03:34:19)
> > DRM_IOCTL_MODE_CURSOR results in frontbuffer flush before the cursor
> > plane MMIOs are written to. But this flush should not be necessary for
> > PSR as hardware tracking triggers PSR exit when MMIOs are written. As
> > for FBC, the spec says "Flips or changes to plane size and panning" cause
> > FBC to be nuked. Use origin == ORIGIN_FLIP so that features can ignore
> > cursor updates in their frontbuffer_flush implementations.
> >
> > /sys/kernel/debug/dri/0/i915_fbc_status shows
> > "Compressing: yes" when I move the cursor around.
> >
> > v3: Use ORIGIN_FLIP now that pin_to_display does not flush frontbuffer.
> > v2: Update comment in i915_gem_object_pin_to_display_plane. (Chris)
> >
> > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_display.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 91ce8a0522a3..18b08e263ee1 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -13176,7 +13176,7 @@ intel_legacy_cursor_update(struct drm_plane *plane,
> > if (ret)
> > goto out_unlock;
> >
> > - intel_fb_obj_flush(intel_fb_obj(fb), ORIGIN_DIRTYFB);
> > + intel_fb_obj_flush(intel_fb_obj(fb), ORIGIN_FLIP);
>
> What about prepare_plane? That should reduce to ORIGIN_FLIP as well,
> aiui.
> -Chris
That was the idea but there's a problem with not knowing if PSR exit is
fully complete before we begin updating the plane registers in
pipe_update_start().
Let's say PSR was active and display is in DC6. A flip comes in, without
_flush(DIRTYFB) in prepare_plane_fb(), PSR exit is delayed until vblank
enabling that happens in pipe_update_start. We immediately follow that
with programming the plane MMIO's without checking if PSR fully exited.
If PSR and DC6 happen to exit while we were in the middle of programming
plane MMIO's, the resulting vblank toggle (from PSR exit) might activate
partially programmed registers. _flush(DIRTYFB) gives us an opportunity
to exit PSR fully by starting early.
As for legacy_cursor_update(), since there is no vblank enabling
involved, we avoid updating the MMIO's in the midst of PSR exit
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-03-07 23:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-07 3:34 [PATCH v2 1/3] drm/i915/frontbuffer: Pull frontbuffer_flush out of gem_obj_pin_to_display Dhinakaran Pandiyan
2018-03-07 3:34 ` [PATCH v2 2/3] drm/i915/frontbuffer: HW tracking for cursor moves to fix PSR lags Dhinakaran Pandiyan
2018-03-07 22:53 ` Chris Wilson
2018-03-07 23:10 ` Pandiyan, Dhinakaran [this message]
2018-03-07 23:23 ` Rodrigo Vivi
2018-03-07 23:43 ` Rodrigo Vivi
2018-03-08 0:21 ` Pandiyan, Dhinakaran
2018-03-09 1:16 ` Rodrigo Vivi
2018-03-09 1:11 ` Pandiyan, Dhinakaran
2018-03-07 3:34 ` [PATCH v2 3/3] drm/i915/psr: Use more PSR HW tracking Dhinakaran Pandiyan
2018-03-12 23:16 ` Souza, Jose
2018-03-12 23:19 ` Pandiyan, Dhinakaran
2018-03-13 0:58 ` Souza, Jose
2018-03-13 20:50 ` Rodrigo Vivi
2018-03-07 4:10 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/3] drm/i915/frontbuffer: Pull frontbuffer_flush out of gem_obj_pin_to_display Patchwork
2018-03-07 6:26 ` ✓ Fi.CI.IGT: " Patchwork
2018-03-07 22:46 ` [PATCH v2 1/3] " Rodrigo Vivi
2018-03-07 22:54 ` Pandiyan, Dhinakaran
2018-03-07 23:20 ` Rodrigo Vivi
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=1520465664.20396.67.camel@dk-H97M-D3H \
--to=dhinakaran.pandiyan@intel.com \
--cc=Dhinakaran@freedesktop.org \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/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