Merge tag 'drm-intel-fixes-2013-11-07' of git://people.freedesktop.org/~danvet/drm...
authorDave Airlie <airlied@redhat.com>
Fri, 8 Nov 2013 06:34:39 +0000 (16:34 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 8 Nov 2013 06:34:39 +0000 (16:34 +1000)
Bit a bit -fixes pull request in the merge window than usual dua to two
feauture-y things:
- Display CRCs are now enabled on all platforms, including the odd DP case
  on gm45/vlv. Since this is a testing-only feature it should ever hurt,
  but I figured it'll help with regression-testing -fixes. So I left it
  in and didn't postpone it to 3.14.
- Display power well refactoring from Imre. Would have caused major pain
  conflict with the bdw stage 1 patches if I'd postpone this to -next.
  It's only an relatively small interface rework, so shouldn't cause pain.
  It's also been in my tree since almost 3 weeks already.

That accounts for about two thirds of the pull, otherwise just bugfixes:
- vlv backlight fix from Jesse/Jani
- vlv vblank timestamp fix from Jesse
- improved edp detection through vbt from Ville (fixes a vlv issue)
- eDP vdd fix from Paulo
- fixes for dvo lvds on i830M
- a few smaller things all over

Note: This contains a backmerge of v3.12. Since the -internal branch
always applied on top of -nightly I need that unified base to merge bdw
patches. So you'll get a conflict with radeon connector props when pulling
this (and nouveau/master will also conflict a bit when Ben doesn't
rebase). The backmerge itself only had conflicts in drm/i915.

There's also a tiny conflict between Jani's backlight fix and your sysfs
lifetime fix in drm-next.

* tag 'drm-intel-fixes-2013-11-07' of git://people.freedesktop.org/~danvet/drm-intel: (940 commits)
  drm/i915/vlv: use per-pipe backlight controls v2
  drm/i915: make backlight functions take a connector
  drm/i915: move opregion asle request handling to a work queue
  drm/i915/vlv: use PIPE_START_VBLANK interrupts on VLV
  drm/i915: Make intel_dp_is_edp() less specific
  drm/i915: Give names to the VBT child device type bits
  drm/i915/vlv: enable HDA display audio for Valleyview2
  drm/i915/dvo: call ->mode_set callback only when the port is running
  drm/i915: avoid unclaimed registers when capturing the error state
  drm/i915: Enable DP port CRC for the "auto" source on g4x/vlv
  drm/i915: scramble reset support for DP port CRC on vlv
  drm/i915: scramble reset support for DP port CRC on g4x
  drm/i916: add "auto" pipe CRC source
  ...

Conflicts:
MAINTAINERS
drivers/gpu/drm/i915/intel_panel.c
drivers/gpu/drm/nouveau/core/subdev/mc/base.c
drivers/gpu/drm/radeon/atombios_encoders.c
drivers/gpu/drm/radeon/radeon_connectors.c

28 files changed:
1  2 
MAINTAINERS
drivers/gpu/drm/drm_drv.c
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_panel.c
drivers/gpu/drm/nouveau/core/subdev/mc/base.c
drivers/gpu/drm/radeon/atombios_encoders.c
drivers/gpu/drm/radeon/cik.c
drivers/gpu/drm/radeon/dce6_afmt.c
drivers/gpu/drm/radeon/evergreen.c
drivers/gpu/drm/radeon/evergreen_hdmi.c
drivers/gpu/drm/radeon/evergreend.h
drivers/gpu/drm/radeon/ni.c
drivers/gpu/drm/radeon/r600.c
drivers/gpu/drm/radeon/r600_hdmi.c
drivers/gpu/drm/radeon/r600d.h
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon_connectors.c
drivers/gpu/drm/radeon/radeon_cs.c
drivers/gpu/drm/radeon/radeon_drv.c
drivers/gpu/drm/radeon/radeon_pm.c
drivers/gpu/drm/radeon/radeon_uvd.c
drivers/gpu/drm/radeon/si.c
drivers/gpu/drm/radeon/si_dpm.c
drivers/gpu/drm/radeon/sid.h
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c

diff --cc MAINTAINERS
index 4907a747f3e02fed8cd6ded387cf430adcba0c7e,ffcaf975bed7e399197e0fd93c761d9ff7c8570d..63dbfc384d5dbe1e6f38fdb9181afcd1099e0a04
@@@ -2815,10 -2833,8 +2833,10 @@@ M:    Terje Bergström <tbergstrom@nvidia.
  L:    dri-devel@lists.freedesktop.org
  L:    linux-tegra@vger.kernel.org
  T:    git git://anongit.freedesktop.org/tegra/linux.git
- S:    Maintained
+ S:    Supported
 +F:    drivers/gpu/drm/tegra/
  F:    drivers/gpu/host1x/
 +F:    include/linux/host1x.h
  F:    include/uapi/drm/tegra_drm.h
  F:    Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt
  
Simple merge
Simple merge
Simple merge
Simple merge
index 1e3d2720d811fc7b2fa51dc794d5479426227eda,4609eedf52aa3653f993f18cb25bba16b22b9b82..045d464751212bf60bb38e4d9b92dd7bbd353a0f
@@@ -737,11 -747,9 +747,9 @@@ intel_dp_i2c_init(struct intel_dp *inte
        strncpy(intel_dp->adapter.name, name, sizeof(intel_dp->adapter.name) - 1);
        intel_dp->adapter.name[sizeof(intel_dp->adapter.name) - 1] = '\0';
        intel_dp->adapter.algo_data = &intel_dp->algo;
 -      intel_dp->adapter.dev.parent = &intel_connector->base.kdev;
 +      intel_dp->adapter.dev.parent = intel_connector->base.kdev;
  
-       ironlake_edp_panel_vdd_on(intel_dp);
        ret = i2c_dp_aux_add_bus(&intel_dp->adapter);
-       ironlake_edp_panel_vdd_off(intel_dp, false);
        return ret;
  }
  
index 09b2994c9b374b36e026bfc074d417701a5227d3,cad41ac330e830efb941a9d8bcf4fcf4cebe5f52..f161ac02c4f6e613efbfc7f763cbb3566dc75248
@@@ -726,7 -802,8 +802,8 @@@ int intel_panel_setup_backlight(struct 
        }
        dev_priv->backlight.device =
                backlight_device_register("intel_backlight",
-                                         connector->kdev, dev,
 -                                        &connector->kdev,
++                                        connector->kdev,
+                                         to_intel_connector(connector),
                                          &intel_panel_bl_ops, &props);
  
        if (IS_ERR(dev_priv->backlight.device)) {
index bc19aa497d5bfb9f0b05b3f422ffcd71ff9a9176,e290cfa4acee09bd8f0a1a2b54462e38abf0bcec..b4b9943773bcfa710580244d43daf69a13d5043b
@@@ -38,36 -29,34 +38,35 @@@ static irqreturn_
  nouveau_mc_intr(int irq, void *arg)
  {
        struct nouveau_mc *pmc = arg;
 -      const struct nouveau_mc_intr *map = pmc->intr_map;
 -      struct nouveau_device *device = nv_device(pmc);
 +      const struct nouveau_mc_oclass *oclass = (void *)nv_object(pmc)->oclass;
 +      const struct nouveau_mc_intr *map = oclass->intr;
-       struct nouveau_device *device = nv_device(pmc);
        struct nouveau_subdev *unit;
 -      u32 stat, intr;
 -
 -      intr = stat = nv_rd32(pmc, 0x000100);
 -      if (intr == 0xffffffff)
 -              return IRQ_NONE;
 -      while (stat && map->stat) {
 -              if (stat & map->stat) {
 -                      unit = nouveau_subdev(pmc, map->unit);
 -                      if (unit && unit->intr)
 -                              unit->intr(unit);
 -                      intr &= ~map->stat;
 -              }
 -              map++;
 -      }
 +      u32 intr;
  
 +      nv_wr32(pmc, 0x000140, 0x00000000);
 +      nv_rd32(pmc, 0x000140);
 +      intr = nouveau_mc_intr_mask(pmc);
        if (pmc->use_msi)
 -              nv_wr08(pmc->base.base.parent, 0x00088068, 0xff);
 +              oclass->msi_rearm(pmc);
  
        if (intr) {
 -              nv_error(pmc, "unknown intr 0x%08x\n", stat);
 +              u32 stat = intr = nouveau_mc_intr_mask(pmc);
 +              while (map->stat) {
 +                      if (intr & map->stat) {
 +                              unit = nouveau_subdev(pmc, map->unit);
 +                              if (unit && unit->intr)
 +                                      unit->intr(unit);
 +                              stat &= ~map->stat;
 +                      }
 +                      map++;
 +              }
 +
 +              if (stat)
 +                      nv_error(pmc, "unknown intr 0x%08x\n", stat);
        }
  
 -      if (stat == IRQ_HANDLED)
 -              pm_runtime_mark_last_busy(&device->pdev->dev);
 -      return stat ? IRQ_HANDLED : IRQ_NONE;
 +      nv_wr32(pmc, 0x000140, 0x00000001);
 +      return intr ? IRQ_HANDLED : IRQ_NONE;
  }
  
  int
Simple merge
Simple merge
Simple merge
index 678736542ed8e23949916c1f4721dec99c31589d,57fcc4b16a526d166fd6be21955a86d5ee7d87dc..a82b6f78d7f2b490bd163f751afff2221e833da5
@@@ -105,11 -67,12 +105,14 @@@ static void dce4_afmt_write_speaker_all
        u8 *sadb;
        int sad_count;
  
+       /* XXX: setting this register causes hangs on some asics */
+       return;
        list_for_each_entry(connector, &encoder->dev->mode_config.connector_list, head) {
 -              if (connector->encoder == encoder)
 +              if (connector->encoder == encoder) {
                        radeon_connector = to_radeon_connector(connector);
 +                      break;
 +              }
        }
  
        if (!radeon_connector) {
Simple merge
Simple merge
Simple merge
index 21f2b74e20e65bea4db4ec571437e43c737300ca,06022e3b9c3bdc0a0660a60c448e25038659e41d..0977c303aeec4dfae6cd31aba199dba40d8be3bf
@@@ -302,11 -309,12 +309,14 @@@ static void dce3_2_afmt_write_speaker_a
        u8 *sadb;
        int sad_count;
  
+       /* XXX: setting this register causes hangs on some asics */
+       return;
        list_for_each_entry(connector, &encoder->dev->mode_config.connector_list, head) {
 -              if (connector->encoder == encoder)
 +              if (connector->encoder == encoder) {
                        radeon_connector = to_radeon_connector(connector);
 +                      break;
 +              }
        }
  
        if (!radeon_connector) {
Simple merge
Simple merge
index e972143e5a36c8611c4ca7ae8b9ea98cfaecd139,64565732cb98cf25af4e4d1f564e307c85cf4a8f..f60b310b1399518673ccc29ca69a3833c2131283
@@@ -1720,12 -1658,12 +1720,18 @@@ radeon_add_atom_connector(struct drm_de
                        drm_object_attach_property(&radeon_connector->base.base,
                                                      rdev->mode_info.underscan_vborder_property,
                                                      0);
-                       drm_object_attach_property(&radeon_connector->base.base,
-                                                  rdev->mode_info.audio_property,
-                                                  RADEON_AUDIO_AUTO);
++
 +                      drm_object_attach_property(&radeon_connector->base.base,
 +                                                 rdev->mode_info.dither_property,
 +                                                 RADEON_FMT_DITHER_DISABLE);
++
+                       if (radeon_audio != 0)
+                               drm_object_attach_property(&radeon_connector->base.base,
+                                                          rdev->mode_info.audio_property,
+                                                          (radeon_audio == 1) ?
+                                                          RADEON_AUDIO_AUTO :
+                                                          RADEON_AUDIO_DISABLE);
++
                        subpixel_order = SubPixelHorizontalRGB;
                        connector->interlace_allowed = true;
                        if (connector_type == DRM_MODE_CONNECTOR_HDMIB)
                                                              rdev->mode_info.underscan_vborder_property,
                                                              0);
                        }
-                       if (ASIC_IS_DCE2(rdev)) {
+                       if (ASIC_IS_DCE2(rdev) && (radeon_audio != 0)) {
                                drm_object_attach_property(&radeon_connector->base.base,
-                                                             rdev->mode_info.audio_property,
-                                                             RADEON_AUDIO_AUTO);
+                                                          rdev->mode_info.audio_property,
+                                                          (radeon_audio == 1) ?
+                                                          RADEON_AUDIO_AUTO :
+                                                          RADEON_AUDIO_DISABLE);
                        }
 +                      if (ASIC_IS_AVIVO(rdev)) {
 +                              drm_object_attach_property(&radeon_connector->base.base,
 +                                                         rdev->mode_info.dither_property,
 +                                                         RADEON_FMT_DITHER_DISABLE);
 +                      }
                        if (connector_type == DRM_MODE_CONNECTOR_DVII) {
                                radeon_connector->dac_load_detect = true;
                                drm_object_attach_property(&radeon_connector->base.base,
                                                              rdev->mode_info.underscan_vborder_property,
                                                              0);
                        }
-                       if (ASIC_IS_DCE2(rdev)) {
+                       if (ASIC_IS_DCE2(rdev) && (radeon_audio != 0)) {
                                drm_object_attach_property(&radeon_connector->base.base,
-                                                             rdev->mode_info.audio_property,
-                                                             RADEON_AUDIO_AUTO);
+                                                          rdev->mode_info.audio_property,
+                                                          (radeon_audio == 1) ?
+                                                          RADEON_AUDIO_AUTO :
+                                                          RADEON_AUDIO_DISABLE);
                        }
 +                      if (ASIC_IS_AVIVO(rdev)) {
 +                              drm_object_attach_property(&radeon_connector->base.base,
 +                                                         rdev->mode_info.dither_property,
 +                                                         RADEON_FMT_DITHER_DISABLE);
 +                      }
                        subpixel_order = SubPixelHorizontalRGB;
                        connector->interlace_allowed = true;
                        if (connector_type == DRM_MODE_CONNECTOR_HDMIB)
                                                              rdev->mode_info.underscan_vborder_property,
                                                              0);
                        }
-                       if (ASIC_IS_DCE2(rdev)) {
+                       if (ASIC_IS_DCE2(rdev) && (radeon_audio != 0)) {
                                drm_object_attach_property(&radeon_connector->base.base,
-                                                             rdev->mode_info.audio_property,
-                                                             RADEON_AUDIO_AUTO);
+                                                          rdev->mode_info.audio_property,
+                                                          (radeon_audio == 1) ?
+                                                          RADEON_AUDIO_AUTO :
+                                                          RADEON_AUDIO_DISABLE);
                        }
 +                      if (ASIC_IS_AVIVO(rdev)) {
 +                              drm_object_attach_property(&radeon_connector->base.base,
 +                                                         rdev->mode_info.dither_property,
 +                                                         RADEON_FMT_DITHER_DISABLE);
++
 +                      }
                        connector->interlace_allowed = true;
                        /* in theory with a DP to VGA converter... */
                        connector->doublescan_allowed = false;
Simple merge
Simple merge
Simple merge
Simple merge
index 2acfe561796f111df7830a66299a50fa2102968e,d96f7cbca0a115f58eaeca9df3a6e585d6b3445d..6a64ccaa0695643add9ee7e6b3f383202d35a988
@@@ -78,8 -78,16 +78,11 @@@ extern void evergreen_mc_resume(struct 
  extern u32 evergreen_get_number_of_dram_channels(struct radeon_device *rdev);
  extern void evergreen_print_gpu_status_regs(struct radeon_device *rdev);
  extern bool evergreen_is_display_hung(struct radeon_device *rdev);
 -extern void si_dma_vm_set_page(struct radeon_device *rdev,
 -                             struct radeon_ib *ib,
 -                             uint64_t pe,
 -                             uint64_t addr, unsigned count,
 -                             uint32_t incr, uint32_t flags);
  static void si_enable_gui_idle_interrupt(struct radeon_device *rdev,
                                         bool enable);
+ static void si_fini_pg(struct radeon_device *rdev);
+ static void si_fini_cg(struct radeon_device *rdev);
+ static void si_rlc_stop(struct radeon_device *rdev);
  
  static const u32 verde_rlc_save_restore_register_list[] =
  {
Simple merge
Simple merge
Simple merge