All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Before waiting for a vblank update drm frame counter.
@ 2016-02-18 16:30 Rodrigo Vivi
  2016-02-19  8:53 ` ✗ Fi.CI.BAT: failure for " Patchwork
  0 siblings, 1 reply; 2+ messages in thread
From: Rodrigo Vivi @ 2016-02-18 16:30 UTC (permalink / raw)
  To: intel-gfx; +Cc: Rodrigo Vivi

Whenever power wells are disabled like when entering DC5/DC6
all display registers are zeroed. DMC firmware restore them
on DC5/DC6 exit. However frame counter register is read-only
and DMC cannot restore. So we start facing some funny errors
where drm was waiting for vblank 500 and hardware counter got
reset and not restored. So wait for vblank was returning  500
vblanks latter, like 8 seconds later.

Since we have no visibility when DMC is restoring the registers
the quick dirty way is to update the drm layer counter with the
latest counter we know. At least we don't keep hundreds vblank
behind.

FIXME: A proper solution would involve a power domain handling
to avoid DC off when a vblank is waited. However due the spin
locks at drm vblank handling and the mutex sleeps on the power
domain handling side we cannot do this. One alternative would be
to create a pre_enable_vblank and post_disable_vblank out of the
spin lock regions. But unfortunately this is also not trivial
because of many asynchronous drm_vblank_get and drm_vblank_put.

Any other idea or help is very welcome.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/i915_irq.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 25a8937..e67fae4 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2744,6 +2744,20 @@ static int gen8_enable_vblank(struct drm_device *dev, unsigned int pipe)
 	unsigned long irqflags;
 
 	spin_lock_irqsave(&dev_priv->irq_lock, irqflags);
+	/*
+	 * DMC firmware can't restore frame counter register that is read-only
+	 * so we need to force the drm layer to know what is our latest
+	 * frame counter.
+	 * FIXME: We might face some funny race condition with DC states
+	 * entering after this restore. Unfortunately a power domain to avoid
+	 * DC off is not possible at this point due to all spin locks drm layer
+	 * does with vblanks. Another idea was to add pre-enable and
+	 * post-disable functions at vblank, but at drm layer there are many
+	 * asynchronous vblank puts that it is not possible with a bigger
+	 * rework.
+	 */
+	if (HAS_CSR(dev))
+		dev->vblank[pipe].last = g4x_get_vblank_counter(dev, pipe);
 	bdw_enable_pipe_irq(dev_priv, pipe, GEN8_PIPE_VBLANK);
 	spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags);
 
-- 
2.4.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* ✗ Fi.CI.BAT: failure for drm/i915: Before waiting for a vblank update drm frame counter.
  2016-02-18 16:30 [PATCH] drm/i915: Before waiting for a vblank update drm frame counter Rodrigo Vivi
@ 2016-02-19  8:53 ` Patchwork
  0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2016-02-19  8:53 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: intel-gfx

== Summary ==

Series 3605v1 drm/i915: Before waiting for a vblank update drm frame counter.
http://patchwork.freedesktop.org/api/1.0/series/3605/revisions/1/mbox/

Test drv_getparams_basic:
        Subgroup basic-subslice-total:
                pass       -> INCOMPLETE (snb-x220t)
Test drv_hangman:
        Subgroup error-state-basic:
                pass       -> FAIL       (ilk-hp8440p)
Test gem_basic:
        Subgroup bad-close:
                pass       -> INCOMPLETE (snb-x220t)
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup create-close:
                pass       -> INCOMPLETE (ivb-t430s)
Test gem_cs_prefetch:
        Subgroup basic-default:
                incomplete -> PASS       (ilk-hp8440p)
Test gem_ctx_basic:
                skip       -> INCOMPLETE (ilk-hp8440p)
Test gem_ctx_create:
        Subgroup basic:
                skip       -> INCOMPLETE (ilk-hp8440p)
Test gem_ctx_param_basic:
        Subgroup basic:
                skip       -> INCOMPLETE (ilk-hp8440p)
        Subgroup basic-default:
                incomplete -> PASS       (snb-x220t)
                skip       -> INCOMPLETE (ilk-hp8440p)
        Subgroup invalid-ctx-get:
                incomplete -> PASS       (snb-x220t)
        Subgroup invalid-param-set:
                skip       -> INCOMPLETE (ilk-hp8440p)
        Subgroup invalid-size-get:
                skip       -> INCOMPLETE (ilk-hp8440p)
        Subgroup invalid-size-set:
                skip       -> INCOMPLETE (ilk-hp8440p)
        Subgroup root-set:
                incomplete -> PASS       (snb-x220t)
        Subgroup root-set-no-zeromap-disabled:
                incomplete -> PASS       (snb-x220t)
                skip       -> INCOMPLETE (ilk-hp8440p)
        Subgroup root-set-no-zeromap-enabled:
                incomplete -> PASS       (snb-x220t)
                skip       -> INCOMPLETE (ilk-hp8440p)
Test gem_exec_basic:
        Subgroup basic-blt:
                incomplete -> PASS       (snb-x220t)
        Subgroup basic-bsd:
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup basic-default:
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup basic-render:
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup basic-vebox:
                skip       -> INCOMPLETE (snb-x220t)
                skip       -> INCOMPLETE (ilk-hp8440p)
Test gem_flink_basic:
        Subgroup bad-flink:
                incomplete -> PASS       (snb-x220t)
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup bad-open:
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup flink-lifetime:
                pass       -> INCOMPLETE (ilk-hp8440p)
Test gem_linear_blits:
        Subgroup basic:
                incomplete -> PASS       (snb-x220t)
                pass       -> INCOMPLETE (ilk-hp8440p)
Test gem_mmap:
        Subgroup basic:
                incomplete -> PASS       (snb-x220t)
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup basic-small-bo:
                incomplete -> PASS       (snb-x220t)
Test gem_mmap_gtt:
        Subgroup basic:
                incomplete -> PASS       (snb-x220t)
        Subgroup basic-copy:
                incomplete -> PASS       (snb-x220t)
        Subgroup basic-read-write-distinct:
                incomplete -> PASS       (snb-x220t)
        Subgroup basic-small-bo-tiledy:
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup basic-write:
                pass       -> INCOMPLETE (snb-x220t)
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup basic-write-cpu-read-gtt:
                incomplete -> PASS       (snb-x220t)
        Subgroup basic-write-gtt-no-prefault:
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup basic-write-no-prefault:
                pass       -> INCOMPLETE (ivb-t430s)
        Subgroup basic-write-read-distinct:
                incomplete -> PASS       (snb-x220t)
                pass       -> INCOMPLETE (ilk-hp8440p)
Test gem_pread:
        Subgroup basic:
                incomplete -> PASS       (snb-x220t)
Test gem_render_linear_blits:
        Subgroup basic:
                incomplete -> PASS       (snb-x220t)
Test gem_render_tiled_blits:
        Subgroup basic:
                incomplete -> PASS       (snb-x220t)
                skip       -> INCOMPLETE (ilk-hp8440p)
Test gem_ringfill:
        Subgroup basic-default:
                incomplete -> PASS       (snb-x220t)
        Subgroup basic-default-bomb:
                pass       -> INCOMPLETE (ilk-hp8440p)
                incomplete -> PASS       (ivb-t430s)
        Subgroup basic-default-forked:
                incomplete -> PASS       (snb-x220t)
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup basic-default-hang:
                incomplete -> PASS       (snb-x220t)
Test gem_storedw_loop:
        Subgroup basic-blt:
                pass       -> INCOMPLETE (snb-x220t)
        Subgroup basic-bsd:
                skip       -> INCOMPLETE (ilk-hp8440p)
        Subgroup basic-bsd1:
                incomplete -> SKIP       (snb-x220t)
        Subgroup basic-default:
                pass       -> INCOMPLETE (ivb-t430s)
        Subgroup basic-vebox:
                incomplete -> SKIP       (snb-x220t)
Test gem_sync:
        Subgroup basic-blt:
                incomplete -> PASS       (snb-x220t)
                skip       -> INCOMPLETE (ilk-hp8440p)
        Subgroup basic-render:
                pass       -> INCOMPLETE (ilk-hp8440p)
Test kms_addfb_basic:
        Subgroup addfb25-modifier-no-flag:
                incomplete -> PASS       (snb-x220t)
        Subgroup addfb25-y-tiled:
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup addfb25-y-tiled-small:
                skip       -> INCOMPLETE (ilk-hp8440p)
        Subgroup addfb25-yf-tiled:
                pass       -> INCOMPLETE (ivb-t430s)
        Subgroup bad-pitch-0:
                incomplete -> PASS       (snb-x220t)
        Subgroup bad-pitch-1024:
                incomplete -> PASS       (snb-x220t)
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup bad-pitch-128:
                incomplete -> PASS       (snb-x220t)
        Subgroup bad-pitch-256:
                incomplete -> PASS       (snb-x220t)
        Subgroup bad-pitch-65536:
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup bad-pitch-999:
                incomplete -> PASS       (snb-x220t)
        Subgroup basic-x-tiled:
                incomplete -> PASS       (snb-x220t)
        Subgroup clobberred-modifier:
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup framebuffer-vs-set-tiling:
                incomplete -> PASS       (snb-x220t)
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup no-handle:
                incomplete -> PASS       (snb-x220t)
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup size-max:
                incomplete -> PASS       (snb-x220t)
        Subgroup too-high:
                pass       -> INCOMPLETE (snb-x220t)
        Subgroup unused-handle:
                incomplete -> PASS       (snb-x220t)
        Subgroup unused-modifier:
                incomplete -> PASS       (snb-x220t)
Test kms_flip:
        Subgroup basic-flip-vs-wf_vblank:
                pass       -> INCOMPLETE (ivb-t430s)
        Subgroup basic-plain-flip:
                pass       -> INCOMPLETE (snb-x220t)
                pass       -> INCOMPLETE (ilk-hp8440p)
Test kms_force_connector_basic:
        Subgroup force-connector-state:
                pass       -> INCOMPLETE (snb-x220t)
        Subgroup force-edid:
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup force-load-detect:
                fail       -> SKIP       (ilk-hp8440p)
        Subgroup prune-stale-modes:
                skip       -> PASS       (snb-x220t)
Test kms_pipe_crc_basic:
        Subgroup bad-nb-words-1:
                pass       -> INCOMPLETE (snb-x220t)
        Subgroup bad-pipe:
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup bad-source:
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup hang-read-crc-pipe-b:
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup hang-read-crc-pipe-c:
                skip       -> INCOMPLETE (ilk-hp8440p)
        Subgroup nonblocking-crc-pipe-a-frame-sequence:
                pass       -> INCOMPLETE (snb-x220t)
        Subgroup nonblocking-crc-pipe-b-frame-sequence:
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup nonblocking-crc-pipe-c:
                skip       -> INCOMPLETE (ilk-hp8440p)
        Subgroup nonblocking-crc-pipe-c-frame-sequence:
                incomplete -> SKIP       (snb-x220t)
        Subgroup read-crc-pipe-a:
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup read-crc-pipe-a-frame-sequence:
                incomplete -> PASS       (snb-x220t)
        Subgroup read-crc-pipe-b:
                incomplete -> PASS       (snb-x220t)
        Subgroup read-crc-pipe-b-frame-sequence:
                pass       -> INCOMPLETE (ilk-hp8440p)
        Subgroup read-crc-pipe-c-frame-sequence:
                incomplete -> SKIP       (snb-x220t)
        Subgroup suspend-read-crc-pipe-a:
                pass       -> DMESG-WARN (skl-i5k-2) UNSTABLE
                incomplete -> PASS       (snb-x220t)
                pass       -> INCOMPLETE (hsw-gt2)
                dmesg-warn -> PASS       (skl-i7k-2) UNSTABLE
        Subgroup suspend-read-crc-pipe-c:
                dmesg-warn -> PASS       (skl-i5k-2) UNSTABLE
                skip       -> INCOMPLETE (snb-x220t)
                pass       -> DMESG-WARN (skl-i7k-2) UNSTABLE
                skip       -> INCOMPLETE (ilk-hp8440p)
Test kms_sink_crc_basic:
                skip       -> INCOMPLETE (ilk-hp8440p)
Test pm_backlight:
        Subgroup basic-brightness:
                pass       -> INCOMPLETE (ilk-hp8440p)
Test pm_rpm:
        Subgroup basic-pci-d3-state:
                incomplete -> FAIL       (snb-x220t)
                skip       -> INCOMPLETE (ilk-hp8440p)
                pass       -> DMESG-WARN (bsw-nuc-2)
        Subgroup basic-rte:
                dmesg-warn -> PASS       (bsw-nuc-2)
Test pm_rps:
        Subgroup basic-api:
                skip       -> INCOMPLETE (ilk-hp8440p)
Test prime_self_import:
        Subgroup basic-with_one_bo_two_files:
                pass       -> INCOMPLETE (snb-x220t)

bdw-nuci7        total:164  pass:153  dwarn:0   dfail:0   fail:0   skip:11 
bdw-ultra        total:167  pass:153  dwarn:0   dfail:0   fail:0   skip:14 
bsw-nuc-2        total:167  pass:136  dwarn:1   dfail:0   fail:0   skip:30 
byt-nuc          total:167  pass:141  dwarn:1   dfail:0   fail:0   skip:25 
hsw-gt2          total:133  pass:122  dwarn:0   dfail:1   fail:0   skip:9  
ilk-hp8440p      total:165  pass:83   dwarn:0   dfail:0   fail:1   skip:29 
ivb-t430s        total:167  pass:147  dwarn:0   dfail:0   fail:1   skip:14 
skl-i5k-2        total:167  pass:150  dwarn:1   dfail:0   fail:0   skip:16 
skl-i7k-2        total:167  pass:150  dwarn:1   dfail:0   fail:0   skip:16 
snb-dellxps      total:167  pass:144  dwarn:0   dfail:1   fail:0   skip:22 
snb-x220t        total:167  pass:127  dwarn:0   dfail:0   fail:2   skip:19 

Results at /archive/results/CI_IGT_test/Patchwork_1440/

e4599905334de9349501a383afb8503a1dde5728 drm-intel-nightly: 2016y-02m-18d-17h-13m-22s UTC integration manifest
c9f609139394ed62861bfb8e1000c5465806ff29 drm/i915: Before waiting for a vblank update drm frame counter.

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-19  8:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-18 16:30 [PATCH] drm/i915: Before waiting for a vblank update drm frame counter Rodrigo Vivi
2016-02-19  8:53 ` ✗ Fi.CI.BAT: failure for " Patchwork

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.