From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Paulo Zanoni <przanoni@gmail.com>
Cc: intel-gfx@lists.freedesktop.org,
Paulo Zanoni <paulo.r.zanoni@intel.com>,
stable@vger.kernel.org
Subject: Re: [PATCH 1/3] drm/i915: fix cursor handling when runtime suspended
Date: Tue, 29 Jul 2014 13:22:08 +0300 [thread overview]
Message-ID: <20140729102208.GU27580@intel.com> (raw)
In-Reply-To: <1406572636-1809-2-git-send-email-przanoni@gmail.com>
On Mon, Jul 28, 2014 at 03:37:12PM -0300, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
>
> If we're runtime suspended and try to use the cursor interfaces, we
> will get a lot of WARNs saying we did the wrong thing.
>
> For intel_crtc_update_cursor(), all we need to do is return if the
> CRTC is not active, since writing the registers won't really have any
> effect if the screen is not visible, and we will write the registers
> later when enabling the screen.
>
> For intel_crtc_cursor_set_obj(), we just need to wake up the hardware
> then pinning the display plane.
>
> v2: - Narrow the put/get calls on intel_crtc_cursor_set_obj() (Daniel)
>
> Testcase: igt/pm_rpm/cursor
> Testcase: igt/pm_rpm/cursor-dpms
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81645
> Cc: stable@vger.kernel.org
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 1edfd1a..f1a9b5c 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -8144,6 +8144,9 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc,
> if (base == 0 && intel_crtc->cursor_base == 0)
> return;
>
> + if (!intel_crtc->active)
> + return;
> +
> I915_WRITE(CURPOS(pipe), pos);
>
> if (IS_IVYBRIDGE(dev) || IS_HASWELL(dev) || IS_BROADWELL(dev))
> @@ -8217,7 +8220,9 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc,
> if (need_vtd_wa(dev))
> alignment = 64*1024;
>
> + intel_runtime_pm_get(dev_priv);
> ret = i915_gem_object_pin_to_display_plane(obj, alignment, NULL);
> + intel_runtime_pm_put(dev_priv);
put_fence() would need runtime pm too I think.
> if (ret) {
> DRM_DEBUG_KMS("failed to move cursor bo into the GTT\n");
> goto fail_locked;
> --
> 2.0.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2014-07-29 10:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-28 18:37 [PATCH 0/3] Fixes for runtime PM on planes APIs Paulo Zanoni
2014-07-28 18:37 ` [PATCH 1/3] drm/i915: fix cursor handling when runtime suspended Paulo Zanoni
2014-07-29 10:22 ` Ville Syrjälä [this message]
2014-07-29 14:25 ` Paulo Zanoni
2014-07-28 18:37 ` [PATCH 1/2] tests/pm_rpm: add cursor subtests Paulo Zanoni
2014-07-28 18:37 ` [PATCH 2/3] drm/i915: get runtime PM when pinning sprite objects Paulo Zanoni
2014-07-28 18:37 ` [PATCH 2/2] tests/pm_rpm: add planes subtests Paulo Zanoni
2014-07-28 23:47 ` Matt Roper
2014-08-05 21:34 ` Paulo Zanoni
2014-08-05 21:51 ` Matt Roper
2014-08-06 14:11 ` Paulo Zanoni
2014-08-06 14:23 ` Daniel Vetter
2014-07-28 18:37 ` [PATCH 3/3] drm/i915: get runtime PM when pinning primary plane objects Paulo Zanoni
2014-07-28 23:25 ` [PATCH 0/3] Fixes for runtime PM on planes APIs Matt Roper
2014-07-29 8:01 ` Daniel Vetter
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=20140729102208.GU27580@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paulo.r.zanoni@intel.com \
--cc=przanoni@gmail.com \
--cc=stable@vger.kernel.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