Backmerge tag 'v4.7' into drm-next
authorDave Airlie <airlied@redhat.com>
Tue, 26 Jul 2016 07:26:29 +0000 (17:26 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 26 Jul 2016 07:26:29 +0000 (17:26 +1000)
Linux 4.7

As requested by Daniel Vetter as the conflicts were getting messy.

24 files changed:
1  2 
MAINTAINERS
Makefile
arch/x86/kernel/early-quirks.c
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.h
drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c
drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c
drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
drivers/gpu/drm/i915/i915_gem_shrinker.c
drivers/gpu/drm/i915/intel_csr.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_opregion.c
drivers/gpu/drm/i915/intel_pm.c
drivers/gpu/drm/sun4i/sun4i_crtc.c
drivers/gpu/drm/sun4i/sun4i_drv.c
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
include/drm/ttm/ttm_bo_api.h

diff --cc MAINTAINERS
Simple merge
diff --cc Makefile
Simple merge
Simple merge
Simple merge
index 9d764c4d253e3feeee4cd9ee921acf3c9805c0db,91e25f942d909b0ac6c07d85632514cef6a28023..a6c9b4201e25b1ad678e7495e393136108e43047
@@@ -2871,15 -2706,16 +2898,16 @@@ static int polaris10_get_evv_voltages(s
                                }
                        }
  
 -
 -                      PP_ASSERT_WITH_CODE(0 == atomctrl_get_voltage_evv_on_sclk_ai(hwmgr,
 -                                                      VOLTAGE_TYPE_VDDC, sclk, vv_id, &vddc),
 -                                              "Error retrieving EVV voltage value!",
 -                                              continue);
 -
 +                      if (atomctrl_get_voltage_evv_on_sclk_ai(hwmgr,
 +                                              VOLTAGE_TYPE_VDDC,
 +                                              sclk, vv_id, &vddc) != 0) {
 +                              printk(KERN_WARNING "failed to retrieving EVV voltage!\n");
 +                              continue;
 +                      }
  
-                       /* need to make sure vddc is less than 2v or else, it could burn the ASIC. */
-                       PP_ASSERT_WITH_CODE((vddc < 2000 && vddc != 0),
+                       /* need to make sure vddc is less than 2v or else, it could burn the ASIC.
+                        * real voltage level in unit of 0.01mv */
+                       PP_ASSERT_WITH_CODE((vddc < 200000 && vddc != 0),
                                        "Invalid VDDC value", result = -EINVAL;);
  
                        /* the voltage should not be zero nor equal to leakage ID */
@@@ -3105,9 -2941,34 +3133,34 @@@ static int polaris10_set_private_data_b
        return 0;
  }
  
+ int polaris10_patch_voltage_workaround(struct pp_hwmgr *hwmgr)
+ {
+       struct phm_ppt_v1_information *table_info =
+                      (struct phm_ppt_v1_information *)(hwmgr->pptable);
+       struct phm_ppt_v1_clock_voltage_dependency_table *dep_mclk_table =
+                       table_info->vdd_dep_on_mclk;
+       struct phm_ppt_v1_voltage_lookup_table *lookup_table =
+                       table_info->vddc_lookup_table;
+       uint32_t i;
+       if (hwmgr->chip_id == CHIP_POLARIS10 && hwmgr->hw_revision == 0xC7) {
+               if (lookup_table->entries[dep_mclk_table->entries[dep_mclk_table->count-1].vddInd].us_vdd >= 1000)
+                       return 0;
+               for (i = 0; i < lookup_table->count; i++) {
+                       if (lookup_table->entries[i].us_vdd < 0xff01 && lookup_table->entries[i].us_vdd >= 1000) {
+                               dep_mclk_table->entries[dep_mclk_table->count-1].vddInd = (uint8_t) i;
+                               return 0;
+                       }
+               }
+       }
+       return 0;
+ }
  int polaris10_hwmgr_backend_init(struct pp_hwmgr *hwmgr)
  {
 -      struct polaris10_hwmgr *data = (struct polaris10_hwmgr *)(hwmgr->backend);
 +      struct polaris10_hwmgr *data;
        struct pp_atomctrl_gpio_pin_assignment gpio_pin_assignment;
        uint32_t temp_reg;
        int result;
index fd38b0d7a3c2b27fb02b515e44434ba41dd7eadc,afc3434822d1589224ebfccc1b2826f4fedd9ffb..dbc6d9bfd5af58c26f581e3a507f9b57d819c6dd
@@@ -309,8 -309,13 +309,9 @@@ struct polaris10_hwmgr 
        uint32_t                           up_hyst;
        uint32_t disable_dpm_mask;
        bool apply_optimized_settings;
 -
 -      /* soft pptable for re-uploading into smu */
 -      void *soft_pp_table;
 -
        uint32_t                              avfs_vdroop_override_setting;
        bool                                  apply_avfs_cks_off_voltage;
+       uint32_t                              frame_time_x2;
  };
  
  /* To convert to Q8.8 format for firmware */
Simple merge
Simple merge
Simple merge
index 70c699043d0ef3029903f0aa158b12885e33ed7e,7f2d8415ed8b219b6ff5a2c16bf4c24fde66b90c..414ddda4392255b1d5479c66b4d75f86235ea2e8
@@@ -1097,6 -1103,7 +1097,7 @@@ static inline int gen8_emit_flush_coher
                                                uint32_t *const batch,
                                                uint32_t index)
  {
 -      struct drm_i915_private *dev_priv = engine->dev->dev_private;
++      struct drm_i915_private *dev_priv = engine->i915;
        uint32_t l3sqc4_flush = (0x40400000 | GEN8_LQSC_FLUSH_COHERENT_LINES);
  
        /*
@@@ -1267,11 -1274,13 +1268,12 @@@ static int gen9_init_indirectctx_bb(str
                                    uint32_t *offset)
  {
        int ret;
 -      struct drm_device *dev = engine->dev;
 -      struct drm_i915_private *dev_priv = dev->dev_private;
++      struct drm_i915_private *dev_priv = engine->i915;
        uint32_t index = wa_ctx_start(wa_ctx, *offset, CACHELINE_DWORDS);
  
        /* WaDisableCtxRestoreArbitration:skl,bxt */
-       if (IS_SKL_REVID(engine->i915, 0, SKL_REVID_D0) ||
-           IS_BXT_REVID(engine->i915, 0, BXT_REVID_A1))
 -      if (IS_SKL_REVID(dev, 0, SKL_REVID_D0) ||
 -          IS_BXT_REVID(dev, 0, BXT_REVID_A1))
++      if (IS_SKL_REVID(dev_priv, 0, SKL_REVID_D0) ||
++          IS_BXT_REVID(dev_priv, 0, BXT_REVID_A1))
                wa_ctx_emit(batch, index, MI_ARB_ON_OFF | MI_ARB_DISABLE);
  
        /* WaFlushCoherentL3CacheLinesAtContextSwitch:skl,bxt */
index c27d5eb063d0b21f8774cd786c7c40151b40471b,16e209d326b69469278fd93f47e8d7e26237a29c..adca262d591ac02c46577ee05fa6741741433d41
@@@ -1072,5 -1038,16 +1072,16 @@@ intel_opregion_get_panel_type(struct dr
                return -ENODEV;
        }
  
 -      if (IS_SKYLAKE(dev)) {
+       /*
+        * FIXME On Dell XPS 13 9350 the OpRegion panel type (0) gives us
+        * low vswing for eDP, whereas the VBT panel type (2) gives us normal
+        * vswing instead. Low vswing results in some display flickers, so
+        * let's simply ignore the OpRegion panel type on SKL for now.
+        */
++      if (IS_SKYLAKE(dev_priv)) {
+               DRM_DEBUG_KMS("Ignoring OpRegion panel type (%d)\n", ret - 1);
+               return -ENODEV;
+       }
        return ret - 1;
  }
index 5a8ee0c76593993345e1951581c9304d0cba54a6,2863b92c9da6d157bd45bdf4760b514e403899a6..f4f3fcc8b3becb59c0ed5d6bdd5dd27a177f3731
@@@ -7021,32 -6726,9 +7021,32 @@@ static void lpt_suspend_hw(struct drm_d
        }
  }
  
 +static void gen8_set_l3sqc_credits(struct drm_i915_private *dev_priv,
 +                                 int general_prio_credits,
 +                                 int high_prio_credits)
 +{
 +      u32 misccpctl;
 +
 +      /* WaTempDisableDOPClkGating:bdw */
 +      misccpctl = I915_READ(GEN7_MISCCPCTL);
 +      I915_WRITE(GEN7_MISCCPCTL, misccpctl & ~GEN7_DOP_CLOCK_GATE_ENABLE);
 +
 +      I915_WRITE(GEN8_L3SQCREG1,
 +                 L3_GENERAL_PRIO_CREDITS(general_prio_credits) |
 +                 L3_HIGH_PRIO_CREDITS(high_prio_credits));
 +
 +      /*
 +       * Wait at least 100 clocks before re-enabling clock gating.
 +       * See the definition of L3SQCREG1 in BSpec.
 +       */
 +      POSTING_READ(GEN8_L3SQCREG1);
 +      udelay(1);
 +      I915_WRITE(GEN7_MISCCPCTL, misccpctl);
 +}
 +
  static void kabylake_init_clock_gating(struct drm_device *dev)
  {
-       struct drm_i915_private *dev_priv = to_i915(dev);
+       struct drm_i915_private *dev_priv = dev->dev_private;
  
        gen9_init_clock_gating(dev);
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge