From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com>,
drm-intel-fixes@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Add missing rpm wakelock to GGTT pread
Date: Thu, 04 Aug 2016 11:41:16 +0300 [thread overview]
Message-ID: <1470300076.3633.21.camel@linux.intel.com> (raw)
In-Reply-To: <1470298193-21765-1-git-send-email-chris@chris-wilson.co.uk>
On to, 2016-08-04 at 09:09 +0100, Chris Wilson wrote:
> Joonas spotted a discrepancy between the pwrite and pread ioctls, in
> that pwrite takes the rpm wakelock around its GGTT access, The wakelock
> is required in order for the GTT to function. In disregard for the
> current convention, we take the rpm wakelock around the access itself
> rather than around the struct_mutex as the nesting is not strictly
> required and such ordering will one day be fixed by explicitly noting
> the barrier dependencies between the GGTT and rpm.
>
> Fixes: b50a53715f09 ("drm/i915: Support for pread/pwrite ...")
> Reported-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: drm-intel-fixes@lists.freedesktop.org
> ---
> drivers/gpu/drm/i915/i915_gem.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 9bef2c0803a5..9cb838ef8d02 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -887,9 +887,12 @@ i915_gem_pread_ioctl(struct drm_device *dev, void *data,
> ret = i915_gem_shmem_pread(dev, obj, args, file);
>
> /* pread for non shmem backed objects */
> - if (ret == -EFAULT || ret == -ENODEV)
> + if (ret == -EFAULT || ret == -ENODEV) {
> + intel_runtime_pm_get(to_i915(dev));
> ret = i915_gem_gtt_pread(dev, obj, args->size,
> args->offset, args->data_ptr);
> + intel_runtime_pm_put(to_i915(dev));
> + }
>
> out:
> i915_gem_object_put(obj);
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-08-04 8:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-04 8:09 [PATCH] drm/i915: Add missing rpm wakelock to GGTT pread Chris Wilson
2016-08-04 8:41 ` Joonas Lahtinen [this message]
2016-08-04 10:13 ` ✗ Ro.CI.BAT: failure for " Patchwork
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=1470300076.3633.21.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=ankitprasad.r.sharma@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=drm-intel-fixes@lists.freedesktop.org \
--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 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.