From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Set primary plane enable at dpcntrl.
Date: Fri, 24 Jan 2014 16:58:05 +0200 [thread overview]
Message-ID: <20140124145805.GI9454@intel.com> (raw)
In-Reply-To: <1390504759-6078-1-git-send-email-rodrigo.vivi@gmail.com>
On Thu, Jan 23, 2014 at 05:19:19PM -0200, Rodrigo Vivi wrote:
> This patch allows system to safely recover after kms_psr_sink_crc check
> or any other similar case that might fail when PSR is enabled.
>
> Ville made and sent me this patch after noticing that primary plane enabled
> bit was set during test case and unset after failure. What was causing a hard
> and non-recoverable blank screen.
>
> After the failure when alternating from fbcon to x section it was possible to
> see and move mouse cursor, but nothing else. Everything else was fully black.
> A for dpms off/on also haleped to get screen back. But this patch seeting
> primary plane enabled bit propertly seemed more clean.
>
> v2: Fix identation issue.
>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index dde98020..ed5ffce 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -2095,6 +2095,9 @@ static int i9xx_update_plane(struct drm_crtc *crtc, struct drm_framebuffer *fb,
> if (IS_G4X(dev))
> dspcntr |= DISPPLANE_TRICKLE_FEED_DISABLE;
>
> + if (intel_crtc->primary_enabled)
> + dspcntr |= DISPLAY_PLANE_ENABLE;
> +
> I915_WRITE(reg, dspcntr);
>
> linear_offset = y * fb->pitches[0] + x * (fb->bits_per_pixel / 8);
> @@ -2192,6 +2195,9 @@ static int ironlake_update_plane(struct drm_crtc *crtc,
> else
> dspcntr |= DISPPLANE_TRICKLE_FEED_DISABLE;
>
> + if (intel_crtc->primary_enabled)
> + dspcntr |= DISPLAY_PLANE_ENABLE;
> +
> I915_WRITE(reg, dspcntr);
>
> linear_offset = y * fb->pitches[0] + x * (fb->bits_per_pixel / 8);
> @@ -8586,6 +8592,11 @@ static int intel_gen7_queue_flip(struct drm_device *dev,
> intel_ring_emit(ring, i915_gem_obj_ggtt_offset(obj) + intel_crtc->dspaddr_offset);
> intel_ring_emit(ring, (MI_NOOP));
>
> + if (IS_VALLEYVIEW(dev) && intel_crtc->primary_enabled)
> + I915_WRITE(DSPCNTR(intel_crtc->plane),
> + I915_READ(DSPCNTR(intel_crtc->plane))
> + | DISPLAY_PLANE_ENABLE);
We should add some kind of big comment that this ugly hack is here for
PSR. I assume we're going to remove it eventually once someone figures
out why the port/pipe/PLL aren't shutting down during PSR. To wake the
hardware back from that state takes a lot more than just flipping a
plane enable bit.
> +
> intel_mark_page_flip_active(intel_crtc);
> __intel_ring_advance(ring);
> return 0;
> --
> 1.8.1.2
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2014-01-24 14:58 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-23 18:16 [PATCH 1/4] drm/i915: Set primary plane enable at dpcntrl Rodrigo Vivi
2014-01-23 18:16 ` [PATCH 2/4] drm/i915: move psr_setup_done to psr struct Rodrigo Vivi
2014-01-24 14:50 ` Ville Syrjälä
2014-01-24 16:02 ` Rodrigo Vivi
2014-01-23 18:16 ` [PATCH 3/4] drm/i915: Update PSR on resume Rodrigo Vivi
2014-02-05 19:04 ` [PATCH 1/2] " Rodrigo Vivi
2014-01-23 18:16 ` [PATCH 4/4] drm/i915: Add Baytrail PSR Support Rodrigo Vivi
2014-01-23 19:19 ` [PATCH] " Rodrigo Vivi
2014-01-24 14:53 ` Ville Syrjälä
2014-01-24 16:05 ` Rodrigo Vivi
2014-01-24 17:41 ` Ville Syrjälä
2014-01-28 19:47 ` [PATCH 4/4] " Rodrigo Vivi
2014-01-29 12:47 ` [PATCH] " Rodrigo Vivi
2014-01-29 13:12 ` Chris Wilson
2014-01-29 13:24 ` Rodrigo Vivi
2014-01-29 13:27 ` Chris Wilson
2014-01-29 13:54 ` Rodrigo Vivi
2014-01-29 14:02 ` Chris Wilson
2014-01-29 14:23 ` Rodrigo Vivi
2014-01-29 14:26 ` Chris Wilson
2014-01-29 19:20 ` Daniel Vetter
2014-01-29 14:55 ` Rodrigo Vivi
2014-01-29 19:21 ` Daniel Vetter
2014-02-01 11:34 ` Chris Wilson
2014-02-04 10:49 ` Daniel Vetter
2014-01-29 14:56 ` Ville Syrjälä
2014-01-29 15:47 ` Rodrigo Vivi
2014-01-29 16:38 ` Ville Syrjälä
2014-01-29 17:48 ` Rodrigo Vivi
2014-01-29 18:24 ` Ville Syrjälä
2014-01-29 15:50 ` Rodrigo Vivi
2014-01-30 13:02 ` Chris Wilson
2014-01-30 17:01 ` Rodrigo Vivi
2014-02-04 10:53 ` Daniel Vetter
2014-02-04 13:03 ` Rodrigo Vivi
2014-02-04 13:54 ` Daniel Vetter
2014-02-05 19:04 ` [PATCH 2/2] " Rodrigo Vivi
2014-02-07 17:24 ` Ville Syrjälä
2014-02-07 18:05 ` Rodrigo Vivi
2014-02-07 18:39 ` Ville Syrjälä
2014-02-12 16:29 ` [PATCH] " Daniel Vetter
2014-01-23 19:19 ` [PATCH] drm/i915: Set primary plane enable at dpcntrl Rodrigo Vivi
2014-01-24 14:58 ` Ville Syrjälä [this message]
2014-01-28 19:46 ` [PATCH 1/4] " 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=20140124145805.GI9454@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox