1. 10 Jun, 2013 9 commits
    • Daniel Vetter's avatar
      drm/i915: refactor PCH_DPLL_SEL #defines · 11887397
      Daniel Vetter authored
      The bits are evenly space, so we can cut down on two big switch
      blocks. This also greatly simplifies the hw state readout which
      follows in the next patch.
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      11887397
    • Daniel Vetter's avatar
      drm/i915: move shared_dpll into the pipe config · a43f6e0f
      Daniel Vetter authored
      With the big sed-job prep work done this is now really simple. With
      the exception that we only assign the right shared dpll id in the
      ->mode_set callback but also depend upon the old one still being
      around.
      
      Until that mess is fixed up we need to jump through a few hoops to
      keep the old value save.
      
      v2: Kill the funny whitespace spotted by Chris.
      
      v3: Move the shared_dpll pipe config fixup into this patch as noticed
      by Ville. Also unconditionally set the shared_dpll with the current
      one, since otherwise we won't handle direct pch port -> cpu edp
      transitions correctly.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      a43f6e0f
    • Daniel Vetter's avatar
      drm/i915: switch crtc->shared_dpll from a pointer to an enum · e2b78267
      Daniel Vetter authored
      Dealing with discrete enum values is simpler for hw state readout and
      pipe config computations than pointers - having neat names instead of
      chasing pointers should look better in the code.
      
      This isn't a that good reason for pch plls, but on haswell we actually
      have 3 different types of plls: WRPLL, SPLL and the DP clocks. Having
      explicit names should help there.
      
      Since this also adds the intel_crtc_to_shared_dpll helper to further
      abstract away the crtc -> dpll relationship this will also help to
      make the next patch simpler, which moves the shared dpll into the pipe
      configuration.
      
      Also note that for uniformity we have two special dpll ids: NONE for
      pipes which need a shared pll but don't have one (yet) and private for
      when there's a non-shared pll (e.g. per-pipe or per-port pll).
      
      I've thought whether we should also add a 2nd enum for the type of the
      pll we want (for really generic pll selection code) but thrown that
      idea out again - likely there's too much platform craziness going on
      to be able to share the pll selection logic much.
      
      Since this touched all the shared_pll functions a bit I've also done
      an s/intel_crtc/crtc/ replacement on a few of them.
      
      v2: Kill DPLL_ID_NONE. It's probably better to call it DPLL_ID_INVALID and use
      it to check that the compute config stage assigns a dpll to every pipe.
      But since that code isn't ready yet until we move the dpll selection out
      of the ->mode_set callback, there's no use for it.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      e2b78267
    • Daniel Vetter's avatar
      drm/i915: s/pch_pll/shared_dpll/ · e72f9fbf
      Daniel Vetter authored
      For fastboot we need some support to read out the sharing state of
      plls, at least for platforms where they can be shared (or freely
      assigned at least). Now for ivb we already have pretty extensive
      infrastructure for tracking pch plls, and it took us an aweful lot of
      tries to get that remotely right. Note that hsw could also share plls,
      but even now they're already freely assignable. So we need this on
      more than just ivb.
      
      So on top of the usual fastboot fun pll sharing seems to be an
      additional step up in fragility. Hence a common infrastructure for all
      shared/freely assignable display plls seems to be in order.
      
      The plan is to have a bit of dpll hw state readout code, which can be
      used individually, but also to fill in the pipe config. The hw state
      cross check code will then use that information to make sure that
      after every modeset every pipe still is connected to a pll which still
      has the correct configuration - a lot of the pch pll sharing bugs
      where due to incorrect sharing.
      
      We start this endeavour with a simple s/pch_pll/shared_dpll/ rename
      job.
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      e72f9fbf
    • Daniel Vetter's avatar
      drm/i915: lock down pch pll accouting some more · f4a091c7
      Daniel Vetter authored
      Before I start to make a complete mess out of this, crank up
      the paranoia level a bit.
      
      v2: Kill the has_pch_encoder check in put_shared_dpll - it's invalid
      as spotted by Ville since we currently only put the dpll when we
      already have the new pipe config. So a direct pch port -> cpu edp
      transition will hit this.
      
      v3: Now that I've lifted my blinders add the WARN_ON Ville requested.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      f4a091c7
    • Daniel Vetter's avatar
      drm/i915: conditionally disable pch resources in ilk_crtc_disable · d925c59a
      Daniel Vetter authored
      Simlar to how disable already works on haswell. This is possible
      since we now carefully track the pch state in the pipe config.
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      d925c59a
    • Daniel Vetter's avatar
      drm/i915: fix up pch pll handling in ->mode_set · cdbd2316
      Daniel Vetter authored
      We ->mode_set is called we can't just blindly reuse an existing pll
      since that might be shared with a different, still active pch output.
      
      v2: Only update the pll settings when the pch pll is know to be
      unused, otherwise we can wreak havoc with a running pipe. Which in the
      case of DP will likely result in a black screen due to loss of link
      lock.
      
      v3: Tighten up the asserts a bit more, especially make sure that the
      pch pll is still enabled when we try to disable it. This would have
      caught the bug fixed in this patch.
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      cdbd2316
    • Damien Lespiau's avatar
      drm/i915: Use FBINFO_STATE defines instead of 0 and 1 · b6f3eff7
      Damien Lespiau authored
      This makes, arguably, the condition on state easier to read.
      Suggested-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      b6f3eff7
    • Chris Wilson's avatar
      drm/i915: Remove dead code from SDVO initialisation · e596a02c
      Chris Wilson authored
      The hotplug_mask is no longer used as the hpd interrupt setup is now
      handled in the core.
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      e596a02c
  2. 07 Jun, 2013 8 commits
  3. 06 Jun, 2013 19 commits
  4. 05 Jun, 2013 4 commits