1. 18 Jun, 2013 8 commits
  2. 13 Jun, 2013 7 commits
  3. 12 Jun, 2013 9 commits
  4. 11 Jun, 2013 4 commits
  5. 10 Jun, 2013 12 commits
    • Damien Lespiau's avatar
      drm/i915: Initialize active_outputs to never read unitialized values · 2f28c50b
      Damien Lespiau authored
      In case of intel_sdvo_get_active_outputs() failing, we end up reading a
      value from the stack.
      Signed-off-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      2f28c50b
    • Damien Lespiau's avatar
      drm/i915: Fix old reference to i830_sdvo_get_capabilities() · 19d415a2
      Damien Lespiau authored
      It's now intel_sdvo_get_capabilities().
      Signed-off-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      19d415a2
    • Daniel Vetter's avatar
      drm/i915: drop crtc checking from assert_shared_dpll · e9d6944e
      Daniel Vetter authored
      The hw state readout code for the pipe config will now check
      this for us, so rip out this hand-rolled complexity.
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      e9d6944e
    • Daniel Vetter's avatar
      drm/i915: enable/disable hooks for shared dplls · e7b903d2
      Daniel Vetter authored
      Looks at first like a bit of overkill, but
      - Haswell actually wants different enable/disable functions for
        different plls.
      - And once we have full dpll hw state tracking we can move the full
        register setup into the ->enable hook.
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      e7b903d2
    • Daniel Vetter's avatar
      drm/i915: scrap register address storage · e9a632a5
      Daniel Vetter authored
      Using ids in register macros is much more common in our driver. Also
      this way we can reduce the platform specific stuff a bit.
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      e9a632a5
    • Daniel Vetter's avatar
      drm/i915: metadata for shared dplls · 46edb027
      Daniel Vetter authored
      An id to match the idx (useful for register access macros) and a name
      fore neater debug output.
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      46edb027
    • Daniel Vetter's avatar
      drm/i915: consolidate ->num_shared_dplls assignement · 7c74ade1
      Daniel Vetter authored
      In the future this won't be just for pch plls, so move it into the
      shared dpll init code.
      
      v2: Bikeshed the uncessary {} away while applying to appease
      checkpatch.
      
      Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v1)
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      7c74ade1
    • Daniel Vetter's avatar
      drm/i915: hw state readout for shared pch plls · c0d43d62
      Daniel Vetter authored
      Well, the first step of a long road at least, it only reads out
      the pipe -> shared dpll association thus far. Other state which needs
      to follow:
      
      - hw state of the dpll (on/off + dpll registers). Currently we just
        read that out from the hw state, but that doesn't work too well when
        the dpll is in use, but not yet fully enabled. We get away since
        most likely it already has been enabled and so the correct state is
        left behind in the registers. But that doesn't hold for atomic
        modesets when we want to enable all pipes at once.
      
      - Refcount reconstruction for each dpll.
      
      - Cross-checking of all the above. For that we need to keep the dpll
        register state both in the pipe and in the shared_dpll struct, so
        that we can check that every pipe is still connected to a correctly
        configured dpll.
      
      Note that since the refcount resconstruction isn't done yet this will
      spill a few WARNs at boot-up while trying to disable pch plls which
      have bogus refcounts. But since there's still a pile of refactoring to
      do I'd like to lock down the state handling as soon as possible hence
      decided against reordering the patches to quiet these WARNs - after
      all the issues they're complaining about have existed since forever,
      as Jesse can testify by having pch pll states blow up consistently in
      his fastboot patches ...
      
      v2: We need to preserve the old shared_dpll since currently the
      shared dpll refcount dropping/getting is done in ->mode_set. With
      the usual pipe_config infrastructure the old dpll id is already lost
      at that point, hence preserve it in the new config.
      
      v3: Rebase on top of the ips patch from Paulo.
      
      v4: We need to unconditionally take over the shared_dpll id from the
      old pipe config when e.g. doing a direct pch port -> cpu edp
      transition.
      
      v5: Move the saving of the old shared_dpll id to an ealier patch.
      
      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>
      c0d43d62
    • 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