[Intel-gfx] [PATCH 2/4] drm/i915: Skip the execlists CSB scan and rewrite if the ring is untouched
Joonas Lahtinen
joonas.lahtinen at linux.intel.com
Mon Jan 23 11:33:32 UTC 2017
On la, 2017-01-21 at 09:28 +0000, Chris Wilson wrote:
> If the CSB head/tail pointers are unchanged, we can skip the update of
> the CSB register afterwards.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
<SNIP>
> @@ -577,7 +577,7 @@ static void intel_lrc_irq_handler(unsigned long data)
>
> intel_uncore_forcewake_get(dev_priv, engine->fw_domains);
>
> - if (!execlists_elsp_idle(engine)) {
> + if (!execlists_elsp_idle(engine)) do {
Oh dear, not like this. I hope this was a leftover from debugging.
> @@ -587,9 +587,12 @@ static void intel_lrc_irq_handler(unsigned long data)
> csb = readl(csb_mmio);
> head = GEN8_CSB_READ_PTR(csb);
> tail = GEN8_CSB_WRITE_PTR(csb);
> + if (head == tail)
> + break;
> +
> if (tail < head)
> tail += GEN8_CSB_ENTRIES;
> - while (head < tail) {
> + do {
> unsigned int idx = ++head % GEN8_CSB_ENTRIES;
> unsigned int status = readl(buf + 2 * idx);
Theoretically it should not matter, I wonder if this is covered well
enough in CI that we're confident to skip such writes?
Code is;
Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
More information about the Intel-gfx
mailing list