From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: "Michał Winiarski" <michal.winiarski@intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/guc: Make sure vma containing firmware is GuC mappable
Date: Wed, 11 Jan 2017 14:26:24 -0800 [thread overview]
Message-ID: <58be4ce2-76df-5e44-2a32-563ba054e1a5@intel.com> (raw)
In-Reply-To: <20170111151739.28965-1-michal.winiarski@intel.com>
On 11/01/17 07:17, Michał Winiarski wrote:
> Since commit 4741da925fa3 ("drm/i915/guc: Assert that all GGTT offsets used
> by the GuC are mappable"), we're asserting that GuC firmware is in the
> GuC mappable range.
> Except we're not pinning the object with bias, which means it's possible
> to trigger this assert. Let's add a proper bias.
>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
> ---
> drivers/gpu/drm/i915/intel_guc_loader.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
> index aa2b866..5a6ab87 100644
> --- a/drivers/gpu/drm/i915/intel_guc_loader.c
> +++ b/drivers/gpu/drm/i915/intel_guc_loader.c
> @@ -360,7 +360,8 @@ static int guc_ucode_xfer(struct drm_i915_private *dev_priv)
> return ret;
> }
>
> - vma = i915_gem_object_ggtt_pin(guc_fw->guc_fw_obj, NULL, 0, 0, 0);
> + vma = i915_gem_object_ggtt_pin(guc_fw->guc_fw_obj, NULL, 0, 0,
> + PIN_OFFSET_BIAS | GUC_WOPCM_TOP);
> if (IS_ERR(vma)) {
> DRM_DEBUG_DRIVER("pin failed %d\n", (int)PTR_ERR(vma));
> return PTR_ERR(vma);
>
This patch made me think about this again and actually I'm not sure
anymore that there is an offset requirement for the firmware object.
With the way we load the firmware the GuC should never access it in GGTT
because it is first copied in WOPCM via DMA, which should be able to
access the whole address range. I've asked a GuC dev but he has not been
able to confirm if there are any offset limitation with the DMA transfer
or not and unfortunately I don't have a platform to test this on at the
moment. I'll try to get my hands on a new SKL and double check.
Anyway, I'm happy to merge this while we clarify the requirement because
the firmware vma is immediately unpinned after the transfer so there
should be no risk of unneeded ggtt fragmentation; it also looks
generally cleaner to me to handle all guc-related objects the same way.
Thanks,
Daniele
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-01-11 22:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-11 15:17 [PATCH] drm/i915/guc: Make sure vma containing firmware is GuC mappable Michał Winiarski
2017-01-11 15:28 ` Chris Wilson
2017-01-11 19:53 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-01-11 22:26 ` Daniele Ceraolo Spurio [this message]
2017-01-12 10:33 ` [PATCH] " Chris Wilson
2017-01-12 10:44 ` Tomi Sarvela
2017-01-12 10:55 ` Chris Wilson
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=58be4ce2-76df-5e44-2a32-563ba054e1a5@intel.com \
--to=daniele.ceraolospurio@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=michal.winiarski@intel.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