From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Use a cached mapping for the physical HWS
Date: Fri, 19 May 2017 11:53:17 +0300 [thread overview]
Message-ID: <1495183997.3819.3.camel@linux.intel.com> (raw)
In-Reply-To: <20170517130250.5099-1-chris@chris-wilson.co.uk>
On ke, 2017-05-17 at 14:02 +0100, Chris Wilson wrote:
> Older gen use a physical address for the hardware status page, for which
> we use cache-coherent writes. As the writes are into the cpu cache, we use
> a normal WB mapped page to read the HWS, used for our seqno tracking.
>
> Anecdotally, I observed lost breadcrumbs writes into the HWS on i965gm,
> which so far have not reoccurred with this patch. How reliable that
> evidence is remains to be seen.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
<SNIP>
> @@ -1091,17 +1094,22 @@ static int init_status_page(struct intel_engine_cs *engine)
>
> static int init_phys_status_page(struct intel_engine_cs *engine)
> {
> - struct drm_i915_private *dev_priv = engine->i915;
> + struct page *page;
>
> - GEM_BUG_ON(engine->id != RCS);
Was this removal deliberate?
> + page = alloc_page(GFP_KERNEL | __GFP_ZERO);
> + if (!page)
> + return -ENOMEM;
>
> - dev_priv->status_page_dmah =
> - drm_pci_alloc(&dev_priv->drm, PAGE_SIZE, PAGE_SIZE);
> - if (!dev_priv->status_page_dmah)
> + engine->status_page.dma_addr =
> + dma_map_page(engine->i915->drm.dev, page, 0, PAGE_SIZE,
> + PCI_DMA_BIDIRECTIONAL);
> + if (dma_mapping_error(engine->i915->drm.dev,
> + engine->status_page.dma_addr)) {
> + __free_page(page);
> return -ENOMEM;
Nitpicking, but -ENOSPC would be more accurate?
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
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:[~2017-05-19 8:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-17 13:02 [PATCH] drm/i915: Use a cached mapping for the physical HWS Chris Wilson
2017-05-19 8:53 ` Joonas Lahtinen [this message]
2017-05-19 9:08 ` Chris Wilson
2017-05-22 8:55 ` Daniel Vetter
2017-05-22 9:13 ` Chris Wilson
2017-05-26 8:18 ` Daniel Vetter
2017-05-26 9:16 ` Chris Wilson
2017-05-22 11:55 ` [PATCH v3] " Chris Wilson
2017-05-31 9:35 ` 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=1495183997.3819.3.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--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 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.