1. 08 8月, 2013 2 次提交
  2. 07 8月, 2013 1 次提交
  3. 06 8月, 2013 1 次提交
  4. 05 8月, 2013 1 次提交
    • D
      drm/i915: clean up crtc timings computation · 135c81b8
      Daniel Vetter 提交于
      In the old days of the crtc helpers we've only had the encoder and
      crtc ->mode_fixup callbacks. So when the lvds connector wanted to
      adjust the crtc timings it had to set a driver-private mode flag to
      tell the crtc mode fixup code to not overwrite them with the generic
      ones.
      
      When converting things to the new infrastructure I've kept the entire
      logic and only moved the flag to pipe_config->timings_set. But this
      logic is pretty tricky and already caused regressions:
      
      commit 21d8a475
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Fri Jul 12 08:07:30 2013 +0200
      
          drm/i915: fix pfit regression for non-autoscaled resolutions
      
      So take advantage of the flexibility our own modeset infrastructure
      affords us and prefill default crtc timings. This allows us to rip out
      ->timings_set. Note that we overwrite things again when retrying the
      pipe config computation due to bandwidth constraints to avoid bogus
      crtc timings if the encoder only does relative adjustments (which is
      how the pfit code works). Only a theoretical concern though since
      platforms where we retry (pch-split platforms) do not need
      adjustements (since only the old gmch pfit needs that). But let's
      better be safe than sorry.
      
      Since we now initialize the crtc timings before calling the
      encoder->compute_config functions the crtc initialization in the gmch
      pfit code is now redudant and so can be removed.
      
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      [danvet: Add a paragraph to the commit message to explain why we can
      ditch the crtc timings initialization call from the gmch pfit code, to
      answer a question from Rodrigo's review.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      135c81b8
  5. 25 7月, 2013 1 次提交
    • C
      drm/i915: Colocate all GT access routines in the same file · 907b28c5
      Chris Wilson 提交于
      Currently, the register access code is split between i915_drv.c and
      intel_pm.c. It only bares a superficial resemblance to the reset of the
      powermanagement code, so move it all into its own file. This is to ease
      further patches to enforce serialised register access.
      
      v2: Scan for random abuse of I915_WRITE_NOTRACE
      v3: Take the opportunity to rename the GT functions as uncore. Uncore is
      the term used by the hardware design (and bspec) for all functions
      outside of the GPU (and CPU) cores in what is also known as the System
      Agent.
      v4: Rebase onto SNB rc6 fixes
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      [danvet: Wrestle patch into applying and inline
      intel_uncore_early_sanitize (plus move the old comment to the new
      function). Also keep the _santize postfix for intel_uncore_sanitize.]
      [danvet: Squash in fixup spotted by Chris on irc: We need to call
      intel_pm_init before intel_uncore_sanitize since the later will call
      cancel_work on the delayed rps setup work the former initializes.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      907b28c5
  6. 24 7月, 2013 1 次提交
    • P
      drm/i915: add functions to disable and restore LCPLL · be256dc7
      Paulo Zanoni 提交于
      For now there are no callers, but these functions are going to be
      needed for the code that allows Package C8+. Other future features may
      also require this code.
      
      Also merge the commit which introduced assert_can_disable_lcpll and
      had the following commit message:
      
      Most of the hardware needs to be disabled before LCPLL is disabled, so
      let's add a function to assert some of items listed in the "Display
      Sequences for LCPLL disabling" documentation.
      
      The idea is that hsw_disable_lcpll should not disable the hardware,
      the callers need to take care of calling hsw_disable_lcpll only once
      everything is already disabled.
      
      v2: - Rebase.
          - Fix D_COMP wait timeout.
      v3: - Use wait_for_atomic_use (Ben)
          - Remove/add a useless/needed POSTING_READ (Ben)
          - Early return in case LCPLL is already restored (Ben)
          - Add ndelay(100) (Ben)
      v4: - Merge the commit that added assert_can_disable_lcpll (Ben)
          - Add interrupt assertions (Ben)
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      [danvet: Fix compile fail since there's no HAS_LP_PCH yet.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      be256dc7
  7. 18 7月, 2013 3 次提交
  8. 13 7月, 2013 1 次提交
  9. 01 7月, 2013 4 次提交
  10. 28 6月, 2013 1 次提交
  11. 18 6月, 2013 1 次提交
    • D
      drm/i915: stop killing pfit on i9xx · c9093354
      Daniel Vetter 提交于
      Nowadays (i.e. with Valleyview) we also have edp on non-PCH_SPLIT
      platforms, so just checking for LVDS is not good enough.
      
      Secondly we have full pfit pipe config tracking, so we'll correctly
      disable the pfit as part of the initial modeset.
      
      For fastboot we need a bit of work here to correctly kill unsupported
      configs (if e.g. the pfit is used on anything else than the built-in
      panel). But since that's not yet supported we don't need to worry.
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c9093354
  12. 13 6月, 2013 1 次提交
    • D
      drm/i915: hw state readout and cross-checking for shared dplls · 66e985c0
      Daniel Vetter 提交于
      Just the plumbing, all the modeset and enable code has not yet been
      switched over to use the new state. It seems to be decently broken
      anyway, at least wrt to handling of the special pixel mutliplier
      enabling sequence. Follow-up patches will clean up that mess.
      
      Another missing piece is more careful handling (and fixup) of the fp1
      alternate divisor state. The BIOS most likely doesn't bother to
      program that one to what we expect. So we need to be more careful with
      comparing that state, both for cross checking but also when checking
      for dpll sharing when acquiring shared dpll. Otherwise fastboot will
      deny a few shared dpll configurations which would otherwise work.
      
      v2: We need to memcpy the pipe config dpll hw state into the pll, for
      otherwise the cross-check code will get angry.
      
      v3: Don't forget to read the pch pll state in the crtc get_pipe_config
      function for ibx/ilk platforms.
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      66e985c0
  13. 12 6月, 2013 1 次提交
  14. 11 6月, 2013 3 次提交
    • D
      drm/i915: move shared_dpll into the pipe config · a43f6e0f
      Daniel Vetter 提交于
      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: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a43f6e0f
    • D
      drm/i915: switch crtc->shared_dpll from a pointer to an enum · e2b78267
      Daniel Vetter 提交于
      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: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e2b78267
    • D
      drm/i915: s/pch_pll/shared_dpll/ · e72f9fbf
      Daniel Vetter 提交于
      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: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e72f9fbf
  15. 07 6月, 2013 2 次提交
    • C
      drm/i915: Track when we dirty the scanout with render commands · c65355bb
      Chris Wilson 提交于
      This is required for tracking render damage for use with FBC and will be
      used in subsequent patches.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c65355bb
    • D
      drm/i915: pipe config quirk infrastructure plus sdvo mode.flags fix · bb760063
      Daniel Vetter 提交于
      For various reasons the hw state readout might not be able to
      faithfully match the hw state:
      - broken hw (like the case which motivated this patch here where the
        sdvo encoder does not implemented mandatory functionality
        correctly).
      - platforms which are not supported fully with the pipe config
        infrastructure
      - if our code doesn't support a given hw configuration natively, e.g.
        special restrictions on the per-pipe panel fitters when they're used
        in high-quality scaling modes.
      
      In all these cases both fastboot and the hw state cross checker need
      to be aware of these cases and act accordingly. To be able to do this
      add a new quirk flag to the pipe config structure.
      
      The specific case at hand is an sdvo encoder which doesn't implement
      the get_timings function, so adjusted_mode flags will be wrong. The
      strange thing though is that the encoder _does_ work, even though it
      doesn't implement any of the timings functions (so neither get nor
      set, neither for input nor output timings).
      
      Not that non-compliant sdvo encoder are any surprise at all ...
      
      v2:
      - Don't read random garbage from the dtd if the get_timings call
        failed (suggested by Chris).
      - Still check the interlaced flag, that's read out from someplace
        else. We want maximal paranoia, after all.
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bb760063
  16. 06 6月, 2013 2 次提交
  17. 05 6月, 2013 1 次提交
    • D
      drm/i915: consolidate and tighten encoder cloning checks · accfc0c5
      Daniel Vetter 提交于
      Only lvds/tv did actually check for cloning or not, but many more
      places should.
      
      Notices because my ivb tried to enable both cpu edp and vga on the
      first crtc - the resulting confusion between has_pch_encoder,
      has_dp_encoder but not actually being a pch dp encoder resulting in
      hilarity (hitting a BUG).
      
      We _really_ need an igt to random-walk our modeset space more
      exhaustively.
      
      The bug seems to have been exposed due to a race in the hw load
      detection support for VGA: Right after a hotplug VGA was still
      detected as connected, but obviously reading the EDID wasn't possible
      any more. Hence why restarting X a bit later fixed things. Due to the
      1024x756 fallback resolution suddenly more outputs had the same
      resolution.
      
      On top of that SNA was confused with the possible_clones mask, trying
      to clone outputs which cannot be cloned. That bug is now fixed with
      
      commit fc1e0702b25e647cb423851fb7228989fec28bd6
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Wed May 29 11:25:28 2013 +0100
      
          sna: fixup up possible_clones kms->X impedance mismatch
      
      v2: Kill intel_encoder_check_is_cloned, spotted by Paulo.
      
      v3: Drop the now unused pipe param.
      
      v4: Kill the stray printk Chris spotted.
      
      v5: Elaborate on how the bug in userspace happened and why it was racy
      to reproduce.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: stable@vger.kernel.org
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      accfc0c5
  18. 04 6月, 2013 1 次提交
    • D
      drm/i915: store adjusted dotclock in adjusted_mode->clock · ff9a6750
      Daniel Vetter 提交于
      ... not the port clock. This allows us to kill the funny semantics
      around pixel_target_clock.
      
      Since the dpll code still needs the real port clock, add a new
      port_clock field to the pipe configuration. Handling the default case
      for that one is a bit tricky, since encoders might not consistently
      overwrite it when retrying the crtc/encoder bw arbitrage step in the
      compute config stage. Hence we need to always clear port_clock and
      update it again if the encoder hasn't put in something more specific.
      This can't be done in one step since the encoder might want to adjust
      the mode first.
      
      I was a bit on the fence whether I should subsume the pixel multiplier
      handling into the port_clock, too. But then I decided against this
      since it's on an abstract level still the dotclock of the adjusted
      mode, and only our hw makes it a bit special due to the separate pixel
      mulitplier setting (which requires that the dpll runs at the
      non-multiplied dotclock).
      
      So after this patch the adjusted_mode accurately describes the mode we
      feed into the port, after the panel fitter and pixel multiplier (or
      line doubling, if we ever bother with that) have done their job.
      Since the fdi link is between the pfit and the pixel multiplier steps
      we need to be careful with calculating the fdi link config.
      
      v2: Fix up ilk cpu pll handling.
      
      v3: Introduce an fdi_dotclock variable in ironlake_fdi_compute_config
      to make it clearer that we transmit the adjusted_mode without the
      pixel multiplier taken into account. The old code multiplied the the
      available link bw with the pixel multiplier, which results in the same
      fdi configuration, but is much more confusing.
      
      v4: Rebase on top of Imre's is_cpu_edp removal.
      
      v5: Rebase on top of Paulo's haswell watermark fixes, which introduce
      a new place which looked at the pixel_clock and so needed conversion.
      
      v6: Split out prep patches as requested by Paulo Zanoni. Also rebase
      on top of the fdi dotclock handling fix in the fdi lanes/bw
      computation code.
      
      Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> (v3)
      Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> (v6)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ff9a6750
  19. 01 6月, 2013 3 次提交
  20. 24 5月, 2013 1 次提交
  21. 21 5月, 2013 2 次提交
    • P
      drm/i915: remove intel_update_linetime_watermarks · 1011d8c4
      Paulo Zanoni 提交于
      The spec says the linetime watermarks must be programmed before
      enabling any display low power watermarks, but we're currently
      updating the linetime watermarks after we call intel_update_watermarks
      (and only at crtc_mode_set, not at crtc_{enable,disable}). So IMHO the
      best way guarantee the linetime watermarks will be updated before the
      low power watermarks is inside the update_wm function, because it's
      the function that enables low power watermarks. And since Haswell is
      the only platform that has linetime watermarks, let's completely kill
      the "intel_update_linetime_watermarks" abstraction and just use the
      intel_update_watermarks abstraction by creating haswell_update_wm.
      
      For now haswell_update_wm is still calling sandybridge_update_wm, but
      in the future I plan to implement a function specific to Haswell.
      
      v2: - Rename patch
          - Disable LP watermarks before changing linetime WMs (Chris)
          - Add a comment explaining that this is just temporary code.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1011d8c4
    • J
      drm/i915: add encoder get_config function v5 · 045ac3b5
      Jesse Barnes 提交于
      We can use this for fetching encoder specific pipe_config state, like
      mode flags, adjusted clock, etc.
      
      Just used for mode flags atm, so we can check the pipe config state at
      mode set time.
      
      v2: get_config when checking hw state too
      v3: fix DVO and LVDS mode flags (Ville)
          get SDVO DTD for flag fetch (Ville)
      v4: use input timings (Ville)
          correct command used (Ville)
          remove gen4 check (Ville)
      v5: get DDI flag config too
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v4)
      Tested-by: Paulo Zanoni <przanoni@gmail.com> (the new hsw ddi stuff)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      045ac3b5
  22. 11 5月, 2013 5 次提交
  23. 06 5月, 2013 1 次提交