1. 20 1月, 2013 1 次提交
    • V
      drm/i915: Fix RGB color range property for PCH platforms · 3685a8f3
      Ville Syrjälä 提交于
      The RGB color range select bit on the DP/SDVO/HDMI registers
      disappeared when PCH was introduced, and instead a new PIPECONF bit
      was added that performs the same function.
      
      Add a new INTEL_MODE_LIMITED_COLOR_RANGE private mode flag, and set
      it in the encoder mode_fixup if limited color range is requested.
      Set the the PIPECONF bit 13 based on the flag.
      
      Experimentation showed that simply toggling the bit while the pipe is
      active doesn't work. We need to restart the pipe, which luckily already
      happens.
      
      The DP/SDVO/HDMI bit 8 is marked MBZ in the docs, so avoid setting it,
      although it doesn't seem to do any harm in practice.
      
      TODO:
      - the PIPECONF bit too seems to have disappeared from HSW. Need a
        volunteer to test if it's just a documentation issue or if it's really
        gone. If the bit is gone and no easy replacement is found, then I suppose
        we may need to use the pipe CSC unit to perform the range compression.
      
      v2: Use mode private_flags instead of intel_encoder virtual functions
      v3: Moved the intel_dp color_range handling after bpc check to help
          later patches
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46800Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3685a8f3
  2. 21 12月, 2012 1 次提交
  3. 14 12月, 2012 1 次提交
  4. 12 12月, 2012 1 次提交
    • D
      drm/i915: Fixup hpd irq register setup ordering · 20afbda2
      Daniel Vetter 提交于
      For GMCH platforms we set up the hpd irq registers in the irq
      postinstall hook. But since we only enable the irq sources we actually
      need in PORT_HOTPLUG_EN/STATUS, taking dev_priv->hotplug_supported_mask
      into account, no hpd interrupt sources is enabled since
      
      commit 52d7eced
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Sat Dec 1 21:03:22 2012 +0100
      
          drm/i915: reorder setup sequence to have irqs for output setup
      
      Wrongly set-up interrupts also lead to broken hw-based load-detection
      on at least GM45, resulting in ghost VGA/TV-out outputs.
      
      To fix this, delay the hotplug register setup until after all outputs
      are set up, by moving it into a new dev_priv->display.hpd_irq_callback.
      We might also move the PCH_SPLIT platforms to such a setup eventually.
      
      Another funny part is that we need to delay the fbdev initial config
      probing until after the hpd regs are setup, for otherwise it'll detect
      ghost outputs. But we can only enable the hpd interrupt handling
      itself (and the output polling) _after_ that initial scan, due to
      massive locking brain-damage in the fbdev setup code. Add a big
      comment to explain this cute little dragon lair.
      
      v2: Encapsulate all the fbdev handling by wrapping the move call into
      intel_fbdev_initial_config in intel_fb.c. Requested by Chris Wilson.
      
      v3: Applied bikeshed from Jesse Barnes.
      
      v4: Imre Deak noticed that we also need to call intel_hpd_init after
      the drm_irqinstall calls in the gpu reset and resume paths - otherwise
      hotplug will be broken. Also improve the comment a bit about why
      hpd_init needs to be called before we set up the initial fbdev config.
      
      Bugzilla: Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54943Reported-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> (v3)
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      20afbda2
  5. 08 12月, 2012 1 次提交
  6. 06 12月, 2012 1 次提交
    • C
      drm/i915: Close race between processing unpin task and queueing the flip · e7d841ca
      Chris Wilson 提交于
      Before queuing the flip but crucially after attaching the unpin-work to
      the crtc, we continue to setup the unpin-work. However, should the
      hardware fire early, we see the connected unpin-work and queue the task.
      The task then promptly runs and unpins the fb before we finish taking
      the required references or even pinning it... Havoc.
      
      To close the race, we use the flip-pending atomic to indicate when the
      flip is finally setup and enqueued. So during the flip-done processing,
      we can check more accurately whether the flip was expected.
      
      v2: Add the appropriate mb() to ensure that the writes to the page-flip
      worker are complete prior to marking it active and emitting the MI_FLIP.
      On the read side, the mb should be enforced by the spinlocks.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: stable@vger.kernel.org
      [danvet: Review the barriers a bit, we need a write barrier both
      before and after updating ->pending. Similarly we need a read barrier
      in the interrupt handler both before and after reading ->pending. With
      well-ordered irqs only one barrier in each place should be required,
      but since this patch explicitly sets out to combat spurious interrupts
      with is staged activation of the unpin work we need to go full-bore on
      the barriers, too. Discussed with Chris Wilson on irc and changes
      acked by him.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e7d841ca
  7. 29 11月, 2012 2 次提交
    • D
      drm/i915: move is_dual_link_lvds to intel_lvds.c · 1974cad0
      Daniel Vetter 提交于
      Just a prep patch to make this a property of intel_lvds. Makes more
      sense, removes clutter from intel_display.c and eventually I want to
      move all the encoder special cases wrt clock handling to encoders
      anyway.
      
      v2: Add an intel_ prefixe to is_dual_link_lvds since it's non-static
      now.
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1974cad0
    • D
      drm/i915: add encoder->pre_pll_enable callback · dafd226c
      Daniel Vetter 提交于
      Currently we have two encoder specific bits in the common mode_set
      functions:
      - lvds pin pair enabling
      - dp m/n setting and computation
      
      Now the lvds stuff needs to happen before the pll is enabled. Since
      that is done in the crtc_mode_set functions, we need to add a new
      callback to be able to move them to the encoder code (where they
      belong). The dp m/n stuff is a giant mess anyway (since it also
      confuses itself with the fdi link m/n handling), so that needs to be
      handled separately.
      
      I think that we can move the pll enabling down quite a bit, which
      might allow us to eventually merge encoder->pre_enable with this new
      pre_pll_enable callback. But for now this will allow us to clean
      things up a bit.
      
      Note that vlv doesn't support lvds, hence we don't need to change
      anything in there.
      
      v2: Fixup commit message, both suggested from Paulo Zanoni.
      - dp m/n doesn't need to happen before pll enabling
      - lvds doesn't exist on vlv, hence no changes required in the vlv pll
        function.
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      dafd226c
  8. 22 11月, 2012 1 次提交
  9. 12 11月, 2012 6 次提交
  10. 27 10月, 2012 1 次提交
  11. 26 10月, 2012 6 次提交
  12. 24 10月, 2012 2 次提交
  13. 23 10月, 2012 4 次提交
  14. 19 10月, 2012 2 次提交
  15. 18 10月, 2012 2 次提交
  16. 10 10月, 2012 4 次提交
  17. 03 10月, 2012 2 次提交
  18. 26 9月, 2012 1 次提交
  19. 20 9月, 2012 1 次提交
    • D
      drm/i915: add encoder->pre_enable/post_disable · bf49ec8c
      Daniel Vetter 提交于
      The cpu eDP encoder has some horrible hacks to set up the DP pll at
      the right time. To be able to move them to the right place, add some
      more encoder callbacks so that this can happen at the right time.
      
      LVDS has some similar funky hacks, but that would require more work
      (we need to move around the pll setup a bit). Hence for now only
      wire these new callbacks up for ilk+ - we only have cpu eDP on these
      platforms.
      
      v2: Bikeshed the vtable ordering, requested by Chris Wilson.
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bf49ec8c