diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-03-31 04:40:13 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-03-31 04:45:15 -0400 |
commit | 0654a65f26d4b226c0b3e8a050db100200a6b924 (patch) | |
tree | 7b448b84cdc7ec0bbbd1ad6e9500eef94af0bfe8 /drivers/gpu/drm/i915 | |
parent | e1f23f3dd817f53f622e486913ac662add46eeed (diff) | |
parent | 455c6fdbd219161bd09b1165f11699d6d73de11c (diff) |
Merge tag 'v3.14' into drm-intel-next-queued
Linux 3.14
The vt-d w/a merged late in 3.14-rc needs a bit of fine-tuning, hence
backmerge.
Conflicts:
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/intel_ddi.c
drivers/gpu/drm/i915/intel_dp.c
All trivial adjacent lines changed type conflicts, so trivial git
doesn't even show them in the merg commit.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_stolen.c | 7 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 71 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 2 |
3 files changed, 49 insertions, 31 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c index d58b4e287e32..28d24caa49f3 100644 --- a/drivers/gpu/drm/i915/i915_gem_stolen.c +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c | |||
@@ -214,6 +214,13 @@ int i915_gem_init_stolen(struct drm_device *dev) | |||
214 | struct drm_i915_private *dev_priv = dev->dev_private; | 214 | struct drm_i915_private *dev_priv = dev->dev_private; |
215 | int bios_reserved = 0; | 215 | int bios_reserved = 0; |
216 | 216 | ||
217 | #ifdef CONFIG_INTEL_IOMMU | ||
218 | if (intel_iommu_gfx_mapped) { | ||
219 | DRM_INFO("DMAR active, disabling use of stolen memory\n"); | ||
220 | return 0; | ||
221 | } | ||
222 | #endif | ||
223 | |||
217 | if (dev_priv->gtt.stolen_size == 0) | 224 | if (dev_priv->gtt.stolen_size == 0) |
218 | return 0; | 225 | return 0; |
219 | 226 | ||
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 5e353a4af921..f5a74b70f5e5 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -718,33 +718,25 @@ static u32 gm45_get_vblank_counter(struct drm_device *dev, int pipe) | |||
718 | 718 | ||
719 | /* raw reads, only for fast reads of display block, no need for forcewake etc. */ | 719 | /* raw reads, only for fast reads of display block, no need for forcewake etc. */ |
720 | #define __raw_i915_read32(dev_priv__, reg__) readl((dev_priv__)->regs + (reg__)) | 720 | #define __raw_i915_read32(dev_priv__, reg__) readl((dev_priv__)->regs + (reg__)) |
721 | #define __raw_i915_read16(dev_priv__, reg__) readw((dev_priv__)->regs + (reg__)) | ||
722 | 721 | ||
723 | static bool ilk_pipe_in_vblank_locked(struct drm_device *dev, enum pipe pipe) | 722 | static bool ilk_pipe_in_vblank_locked(struct drm_device *dev, enum pipe pipe) |
724 | { | 723 | { |
725 | struct drm_i915_private *dev_priv = dev->dev_private; | 724 | struct drm_i915_private *dev_priv = dev->dev_private; |
726 | uint32_t status; | 725 | uint32_t status; |
727 | 726 | int reg; | |
728 | if (INTEL_INFO(dev)->gen < 7) { | 727 | |
729 | status = pipe == PIPE_A ? | 728 | if (INTEL_INFO(dev)->gen >= 8) { |
730 | DE_PIPEA_VBLANK : | 729 | status = GEN8_PIPE_VBLANK; |
731 | DE_PIPEB_VBLANK; | 730 | reg = GEN8_DE_PIPE_ISR(pipe); |
731 | } else if (INTEL_INFO(dev)->gen >= 7) { | ||
732 | status = DE_PIPE_VBLANK_IVB(pipe); | ||
733 | reg = DEISR; | ||
732 | } else { | 734 | } else { |
733 | switch (pipe) { | 735 | status = DE_PIPE_VBLANK(pipe); |
734 | default: | 736 | reg = DEISR; |
735 | case PIPE_A: | ||
736 | status = DE_PIPEA_VBLANK_IVB; | ||
737 | break; | ||
738 | case PIPE_B: | ||
739 | status = DE_PIPEB_VBLANK_IVB; | ||
740 | break; | ||
741 | case PIPE_C: | ||
742 | status = DE_PIPEC_VBLANK_IVB; | ||
743 | break; | ||
744 | } | ||
745 | } | 737 | } |
746 | 738 | ||
747 | return __raw_i915_read32(dev_priv, DEISR) & status; | 739 | return __raw_i915_read32(dev_priv, reg) & status; |
748 | } | 740 | } |
749 | 741 | ||
750 | static int i915_get_crtc_scanoutpos(struct drm_device *dev, int pipe, | 742 | static int i915_get_crtc_scanoutpos(struct drm_device *dev, int pipe, |
@@ -802,7 +794,28 @@ static int i915_get_crtc_scanoutpos(struct drm_device *dev, int pipe, | |||
802 | else | 794 | else |
803 | position = __raw_i915_read32(dev_priv, PIPEDSL(pipe)) & DSL_LINEMASK_GEN3; | 795 | position = __raw_i915_read32(dev_priv, PIPEDSL(pipe)) & DSL_LINEMASK_GEN3; |
804 | 796 | ||
805 | if (HAS_PCH_SPLIT(dev)) { | 797 | if (HAS_DDI(dev)) { |
798 | /* | ||
799 | * On HSW HDMI outputs there seems to be a 2 line | ||
800 | * difference, whereas eDP has the normal 1 line | ||
801 | * difference that earlier platforms have. External | ||
802 | * DP is unknown. For now just check for the 2 line | ||
803 | * difference case on all output types on HSW+. | ||
804 | * | ||
805 | * This might misinterpret the scanline counter being | ||
806 | * one line too far along on eDP, but that's less | ||
807 | * dangerous than the alternative since that would lead | ||
808 | * the vblank timestamp code astray when it sees a | ||
809 | * scanline count before vblank_start during a vblank | ||
810 | * interrupt. | ||
811 | */ | ||
812 | in_vbl = ilk_pipe_in_vblank_locked(dev, pipe); | ||
813 | if ((in_vbl && (position == vbl_start - 2 || | ||
814 | position == vbl_start - 1)) || | ||
815 | (!in_vbl && (position == vbl_end - 2 || | ||
816 | position == vbl_end - 1))) | ||
817 | position = (position + 2) % vtotal; | ||
818 | } else if (HAS_PCH_SPLIT(dev)) { | ||
806 | /* | 819 | /* |
807 | * The scanline counter increments at the leading edge | 820 | * The scanline counter increments at the leading edge |
808 | * of hsync, ie. it completely misses the active portion | 821 | * of hsync, ie. it completely misses the active portion |
@@ -2947,10 +2960,9 @@ static void ibx_irq_postinstall(struct drm_device *dev) | |||
2947 | return; | 2960 | return; |
2948 | 2961 | ||
2949 | if (HAS_PCH_IBX(dev)) { | 2962 | if (HAS_PCH_IBX(dev)) { |
2950 | mask = SDE_GMBUS | SDE_AUX_MASK | SDE_TRANSB_FIFO_UNDER | | 2963 | mask = SDE_GMBUS | SDE_AUX_MASK | SDE_POISON; |
2951 | SDE_TRANSA_FIFO_UNDER | SDE_POISON; | ||
2952 | } else { | 2964 | } else { |
2953 | mask = SDE_GMBUS_CPT | SDE_AUX_MASK_CPT | SDE_ERROR_CPT; | 2965 | mask = SDE_GMBUS_CPT | SDE_AUX_MASK_CPT; |
2954 | 2966 | ||
2955 | I915_WRITE(SERR_INT, I915_READ(SERR_INT)); | 2967 | I915_WRITE(SERR_INT, I915_READ(SERR_INT)); |
2956 | } | 2968 | } |
@@ -3010,20 +3022,19 @@ static int ironlake_irq_postinstall(struct drm_device *dev) | |||
3010 | display_mask = (DE_MASTER_IRQ_CONTROL | DE_GSE_IVB | | 3022 | display_mask = (DE_MASTER_IRQ_CONTROL | DE_GSE_IVB | |
3011 | DE_PCH_EVENT_IVB | DE_PLANEC_FLIP_DONE_IVB | | 3023 | DE_PCH_EVENT_IVB | DE_PLANEC_FLIP_DONE_IVB | |
3012 | DE_PLANEB_FLIP_DONE_IVB | | 3024 | DE_PLANEB_FLIP_DONE_IVB | |
3013 | DE_PLANEA_FLIP_DONE_IVB | DE_AUX_CHANNEL_A_IVB | | 3025 | DE_PLANEA_FLIP_DONE_IVB | DE_AUX_CHANNEL_A_IVB); |
3014 | DE_ERR_INT_IVB); | ||
3015 | extra_mask = (DE_PIPEC_VBLANK_IVB | DE_PIPEB_VBLANK_IVB | | 3026 | extra_mask = (DE_PIPEC_VBLANK_IVB | DE_PIPEB_VBLANK_IVB | |
3016 | DE_PIPEA_VBLANK_IVB); | 3027 | DE_PIPEA_VBLANK_IVB | DE_ERR_INT_IVB); |
3017 | 3028 | ||
3018 | I915_WRITE(GEN7_ERR_INT, I915_READ(GEN7_ERR_INT)); | 3029 | I915_WRITE(GEN7_ERR_INT, I915_READ(GEN7_ERR_INT)); |
3019 | } else { | 3030 | } else { |
3020 | display_mask = (DE_MASTER_IRQ_CONTROL | DE_GSE | DE_PCH_EVENT | | 3031 | display_mask = (DE_MASTER_IRQ_CONTROL | DE_GSE | DE_PCH_EVENT | |
3021 | DE_PLANEA_FLIP_DONE | DE_PLANEB_FLIP_DONE | | 3032 | DE_PLANEA_FLIP_DONE | DE_PLANEB_FLIP_DONE | |
3022 | DE_AUX_CHANNEL_A | | 3033 | DE_AUX_CHANNEL_A | |
3023 | DE_PIPEB_FIFO_UNDERRUN | DE_PIPEA_FIFO_UNDERRUN | | ||
3024 | DE_PIPEB_CRC_DONE | DE_PIPEA_CRC_DONE | | 3034 | DE_PIPEB_CRC_DONE | DE_PIPEA_CRC_DONE | |
3025 | DE_POISON); | 3035 | DE_POISON); |
3026 | extra_mask = DE_PIPEA_VBLANK | DE_PIPEB_VBLANK | DE_PCU_EVENT; | 3036 | extra_mask = DE_PIPEA_VBLANK | DE_PIPEB_VBLANK | DE_PCU_EVENT | |
3037 | DE_PIPEB_FIFO_UNDERRUN | DE_PIPEA_FIFO_UNDERRUN; | ||
3027 | } | 3038 | } |
3028 | 3039 | ||
3029 | dev_priv->irq_mask = ~display_mask; | 3040 | dev_priv->irq_mask = ~display_mask; |
@@ -3208,9 +3219,9 @@ static void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv) | |||
3208 | struct drm_device *dev = dev_priv->dev; | 3219 | struct drm_device *dev = dev_priv->dev; |
3209 | uint32_t de_pipe_masked = GEN8_PIPE_FLIP_DONE | | 3220 | uint32_t de_pipe_masked = GEN8_PIPE_FLIP_DONE | |
3210 | GEN8_PIPE_CDCLK_CRC_DONE | | 3221 | GEN8_PIPE_CDCLK_CRC_DONE | |
3211 | GEN8_PIPE_FIFO_UNDERRUN | | ||
3212 | GEN8_DE_PIPE_IRQ_FAULT_ERRORS; | 3222 | GEN8_DE_PIPE_IRQ_FAULT_ERRORS; |
3213 | uint32_t de_pipe_enables = de_pipe_masked | GEN8_PIPE_VBLANK; | 3223 | uint32_t de_pipe_enables = de_pipe_masked | GEN8_PIPE_VBLANK | |
3224 | GEN8_PIPE_FIFO_UNDERRUN; | ||
3214 | int pipe; | 3225 | int pipe; |
3215 | dev_priv->de_irq_mask[PIPE_A] = ~de_pipe_masked; | 3226 | dev_priv->de_irq_mask[PIPE_A] = ~de_pipe_masked; |
3216 | dev_priv->de_irq_mask[PIPE_B] = ~de_pipe_masked; | 3227 | dev_priv->de_irq_mask[PIPE_B] = ~de_pipe_masked; |
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 7ca38e11e695..6f767e522b3f 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -1621,7 +1621,7 @@ static void intel_edp_psr_enable_source(struct intel_dp *intel_dp) | |||
1621 | val |= EDP_PSR_LINK_DISABLE; | 1621 | val |= EDP_PSR_LINK_DISABLE; |
1622 | 1622 | ||
1623 | I915_WRITE(EDP_PSR_CTL(dev), val | | 1623 | I915_WRITE(EDP_PSR_CTL(dev), val | |
1624 | IS_BROADWELL(dev) ? 0 : link_entry_time | | 1624 | (IS_BROADWELL(dev) ? 0 : link_entry_time) | |
1625 | max_sleep_time << EDP_PSR_MAX_SLEEP_TIME_SHIFT | | 1625 | max_sleep_time << EDP_PSR_MAX_SLEEP_TIME_SHIFT | |
1626 | idle_frames << EDP_PSR_IDLE_FRAME_SHIFT | | 1626 | idle_frames << EDP_PSR_IDLE_FRAME_SHIFT | |
1627 | EDP_PSR_ENABLE); | 1627 | EDP_PSR_ENABLE); |