diff options
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/i915/i915_debugfs.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 24 |
3 files changed, 21 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 7944d301518a..9d4a2c2adf0e 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | #include <linux/debugfs.h> | 30 | #include <linux/debugfs.h> |
| 31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
| 32 | #include <linux/export.h> | 32 | #include <linux/export.h> |
| 33 | #include <generated/utsrelease.h> | ||
| 33 | #include <drm/drmP.h> | 34 | #include <drm/drmP.h> |
| 34 | #include "intel_drv.h" | 35 | #include "intel_drv.h" |
| 35 | #include "intel_ringbuffer.h" | 36 | #include "intel_ringbuffer.h" |
| @@ -690,6 +691,7 @@ static int i915_error_state(struct seq_file *m, void *unused) | |||
| 690 | 691 | ||
| 691 | seq_printf(m, "Time: %ld s %ld us\n", error->time.tv_sec, | 692 | seq_printf(m, "Time: %ld s %ld us\n", error->time.tv_sec, |
| 692 | error->time.tv_usec); | 693 | error->time.tv_usec); |
| 694 | seq_printf(m, "Kernel: " UTS_RELEASE); | ||
| 693 | seq_printf(m, "PCI ID: 0x%04x\n", dev->pci_device); | 695 | seq_printf(m, "PCI ID: 0x%04x\n", dev->pci_device); |
| 694 | seq_printf(m, "EIR: 0x%08x\n", error->eir); | 696 | seq_printf(m, "EIR: 0x%08x\n", error->eir); |
| 695 | seq_printf(m, "IER: 0x%08x\n", error->ier); | 697 | seq_printf(m, "IER: 0x%08x\n", error->ier); |
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index b401788e1791..59afb7eb6db6 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
| @@ -533,6 +533,7 @@ | |||
| 533 | #define MI_MODE 0x0209c | 533 | #define MI_MODE 0x0209c |
| 534 | # define VS_TIMER_DISPATCH (1 << 6) | 534 | # define VS_TIMER_DISPATCH (1 << 6) |
| 535 | # define MI_FLUSH_ENABLE (1 << 12) | 535 | # define MI_FLUSH_ENABLE (1 << 12) |
| 536 | # define ASYNC_FLIP_PERF_DISABLE (1 << 14) | ||
| 536 | 537 | ||
| 537 | #define GEN6_GT_MODE 0x20d0 | 538 | #define GEN6_GT_MODE 0x20d0 |
| 538 | #define GEN6_GT_MODE_HI (1 << 9) | 539 | #define GEN6_GT_MODE_HI (1 << 9) |
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index ae253e04c391..42ff97d667d2 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
| @@ -505,13 +505,25 @@ static int init_render_ring(struct intel_ring_buffer *ring) | |||
| 505 | struct drm_i915_private *dev_priv = dev->dev_private; | 505 | struct drm_i915_private *dev_priv = dev->dev_private; |
| 506 | int ret = init_ring_common(ring); | 506 | int ret = init_ring_common(ring); |
| 507 | 507 | ||
| 508 | if (INTEL_INFO(dev)->gen > 3) { | 508 | if (INTEL_INFO(dev)->gen > 3) |
| 509 | I915_WRITE(MI_MODE, _MASKED_BIT_ENABLE(VS_TIMER_DISPATCH)); | 509 | I915_WRITE(MI_MODE, _MASKED_BIT_ENABLE(VS_TIMER_DISPATCH)); |
| 510 | if (IS_GEN7(dev)) | 510 | |
| 511 | I915_WRITE(GFX_MODE_GEN7, | 511 | /* We need to disable the AsyncFlip performance optimisations in order |
| 512 | _MASKED_BIT_DISABLE(GFX_TLB_INVALIDATE_ALWAYS) | | 512 | * to use MI_WAIT_FOR_EVENT within the CS. It should already be |
| 513 | _MASKED_BIT_ENABLE(GFX_REPLAY_MODE)); | 513 | * programmed to '1' on all products. |
| 514 | } | 514 | */ |
| 515 | if (INTEL_INFO(dev)->gen >= 6) | ||
| 516 | I915_WRITE(MI_MODE, _MASKED_BIT_ENABLE(ASYNC_FLIP_PERF_DISABLE)); | ||
| 517 | |||
| 518 | /* Required for the hardware to program scanline values for waiting */ | ||
| 519 | if (INTEL_INFO(dev)->gen == 6) | ||
| 520 | I915_WRITE(GFX_MODE, | ||
| 521 | _MASKED_BIT_ENABLE(GFX_TLB_INVALIDATE_ALWAYS)); | ||
| 522 | |||
| 523 | if (IS_GEN7(dev)) | ||
| 524 | I915_WRITE(GFX_MODE_GEN7, | ||
| 525 | _MASKED_BIT_DISABLE(GFX_TLB_INVALIDATE_ALWAYS) | | ||
| 526 | _MASKED_BIT_ENABLE(GFX_REPLAY_MODE)); | ||
| 515 | 527 | ||
| 516 | if (INTEL_INFO(dev)->gen >= 5) { | 528 | if (INTEL_INFO(dev)->gen >= 5) { |
| 517 | ret = init_pipe_control(ring); | 529 | ret = init_pipe_control(ring); |
