1. 25 4月, 2013 1 次提交
  2. 20 4月, 2013 1 次提交
  3. 19 4月, 2013 3 次提交
    • P
      drm/i915: report Gen5+ CPU and PCH FIFO underruns · 8664281b
      Paulo Zanoni 提交于
      In this commit we enable both CPU and PCH FIFO underrun reporting and
      start reporting them. We follow a few rules:
        - after we receive one of these errors, we mask the interrupt, so
          we won't get an "interrupt storm" and we also won't flood dmesg;
        - at each mode set we enable the interrupts again, so we'll see each
          message at most once per mode set;
        - in the specific places where we need to ignore the errors, we
          completely mask the interrupts.
      
      The downside of this patch is that since we're completely disabling
      (masking) the interrupts instead of just not printing error messages,
      we will mask more than just what we want on IVB/HSW CPU interrupts
      (due to GEN7_ERR_INT) and on CPT/PPT/LPT PCHs (due to SERR_INT). So
      when we decide to mask PCH FIFO underruns for pipe A on CPT, we'll
      also be masking PCH FIFO underruns for pipe B, because both are
      reported by SERR_INT, which has to be either completely enabled or
      completely disabled (in othe words, there's no way to disable/enable
      specific bits of GEN7_ERR_INT and SERR_INT).
      
      V2: Rename some functions and variables, downgrade messages to
      DRM_DEBUG_DRIVER and rebase.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8664281b
    • J
      drm/i915: update VLV PLL and DPIO code v11 · 89b667f8
      Jesse Barnes 提交于
      In Valleyview voltage swing, pre-emphasis and lane control registers can
      be programmed only through the h/w side band fabric.  Update
      vlv_update_pll, i9xx_crtc_enable, and intel_enable_pll with the
      appropriate programming.
      
      We need to make sure that the tx lane reset occurs in both the full mode
      set and DPMS paths, so factor things out to allow that.
      
      v2: use different DPIO_DIVISOR values for VGA and DisplayPort
      v3: Fix update pll logic to use same DPIO_DIVISOR & DPIO_REFSFR values
              for all display interfaces
      v4: collapse with various updates
      v5: squash with crtc enable/pll enable bits
      v6: split out DP code (jbarnes)
          put phyready check under IS_VALLEYVIEW (jbarnes)
          remove unneeded check in 9xx pll div update (Jani)
          wrap VLV pll update call in IS_VALLEYVIEW (Jani)
          move port enable back to end of crtc enable (jbarnes)
          put phyready check under IS_VALLEYVIEW (jbarnes)
      v7: fix up conflicts against latest drm-intel-next-queued
      v8: use DPIO reg names, fix pipes (Jani)
          from mPhy_registers_VLV2_ww20p5 doc
      v9: update to latest info from driver enabling notes doc
          driver_vbios_notes_9
      v10: fixup a bit of pipe/port confusion to allow eDP and HDMI to work
           simultaneously (Jesse)
      v11: use pll/port callbacks for DPIO port activity (Daniel)
           use separate VLV CRTC enable function (Daniel)
           move around port ready checks (Jesse)
      Signed-off-by: NPallavi G <pallavi.g@intel.com>
      Signed-off-by: NVijay Purushothaman <vijay.a.purushothaman@intel.com>
      Signed-off-by: NGajanan Bhat <gajanan.bhat@intel.com>
      Signed-off-by: NBen Widawsky <benjamin.widawsky@intel.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      [danvet: Drop pfit changes and add a little comment explaining that
      vlv has a different enable sequence and so needs it's own crtc_enable
      callback. Also apply a fixup patch from Wu Fengguang to shut up some
      compiler warnings.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      89b667f8
    • P
      drm/i915/dp: program VSwing and Preemphasis control settings on VLV v2 · e2fa6fba
      Pallavi G 提交于
      Program few Tx buffer Swing control settings through DPIO.
      
      v2: fix up codingstyle (Daniel)
          call from set_signal_levels (Ville, Daniel)
          use proper port numbers (Jesse)
      Signed-off-by: NPallavi G <pallavi.g@intel.com>
      Signed-off-by: NYogesh M <yogesh.mohan.marimuthu@intel.com>
      Signed-off-by: NGajanan Bhat <gajanan.bhat@intel.com>
      Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> (v2 changes)
      [danvet: Reorder if-ladder to avoid two IS_VLV checks.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e2fa6fba
  4. 18 4月, 2013 3 次提交
    • D
      drm/i915: move cpu_transcoder to the pipe configuration · 3b117c8f
      Daniel Vetter 提交于
      For a bunch of reason we need to more accurately track this:
      - hw pipe state readout for Haswell needs the cpu transcoder.
      - We need to know the right cpu transcoder in a bunch of places in
        ->disable and other modeset callbacks.
      
      In the future we need to add hw state readout&check support, too. But
      to avoid ugly merge conflicts do the rote sed job now without any
      functional changes.
      
      v2: Preserve the cpu_transcoder value when overwriting crtc->config.
      Reported by Paulo.
      
      Cc: Paulo Zanoni <przanoni@gmail.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v1)
      [danvet: Removed rough whitespace that Chris spotted.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3b117c8f
    • E
      drm/i915: (re)init HPD interrupt storm statistics · 821450c6
      Egbert Eich 提交于
      When an encoder is shared on several connectors there is only
      one hotplug line, thus this line needs to be shared among these
      connectors.
      If HPD detect only works reliably on a subset of those connectors,
      we want to poll the others. Thus we need to make sure that storm
      detection doesn't mess up the settings for those connectors.
      Therefore we store the settings in the intel_connector struct and
      restore them from there.
      If nothing is set but the encoder has a hpd_pin set we assume this
      connector is hotplug capable.
      On init/reset we make sure the polled state of the connectors
      is (re)set to the default value, the HPD interrupts are marked
      enabled.
      Signed-off-by: NEgbert Eich <eich@suse.de>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      821450c6
    • P
      drm/i915: add intel_using_power_well · 15d199ea
      Paulo Zanoni 提交于
      It returns true if we've requested to turn the power well on and it's
      really on. It also returns true for all the previous gens.
      
      For now there's just one caller, but I'm going to add more.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      15d199ea
  5. 03 4月, 2013 6 次提交
    • D
      drm/i915: create pipe_config->dpll for clock state · f47709a9
      Daniel Vetter 提交于
      Clock computations and handling are highly encoder specific, both in
      the optimal clock selection and also in which clocks to use and when
      sharing of clocks is possible.
      
      So the best place to do this is somewhere in the encoders, with a
      generic fallback for those encoders without special needs. To facility
      this, add a pipe_config->clocks_set boolean.
      
      This patch here is only prep work, it simply sets the computed clock
      values in pipe_config->dpll, and uses that data in the hw clock
      setting functions.
      
      Haswell code isn't touched, simply because Haswell clocks work much
      different and need their own infrastructure (with probably a
      Haswell-specific config->ddi_clock substruct).
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f47709a9
    • D
      drm/i915: remove leaky eDP functions · 947978fa
      Daniel Vetter 提交于
      Jesse Barnes noticed in his review of my DP cleanup series that
      intel_edp_target_clock is now unused. Checking related code I've
      noticed that also intel_edp_link_config is long unused.
      
      Kill them both.
      
      Wrt leaky eDP functions used in the common crtc code, the only thing
      still left is intel_encoder_is_pch_edp. That one is just due to the
      massive confusion between eDP vs. DP and port A vs. port D. Crtc code
      should at most concern itself with the later, never with the former.
      
      But that's material for another patch series.
      
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      947978fa
    • D
      drm/i915: track dp target_clock in pipe_config · df92b1e6
      Daniel Vetter 提交于
      We need it in the fdi m_n computation, which nicely kills almost
      all ugly special cases in there.
      
      It looks like we also need this to handle 12bpc hdmi correctly.
      
      Eventually it might be better to switch things around and put the
      target clock into adjusted_mode->clock and create a new pipe_config
      parameter for the port link clock.
      
      v2: Add a massive comment in the code to explain this mess.
      
      v3: s/dp_target_clock/pixel_target_clock in anticipation of the hdmi
      use-case.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      df92b1e6
    • D
      drm/i915: move dp_m_n computation to dp_encoder->compute_config · 03afc4a2
      Daniel Vetter 提交于
      We need a flag to designate dp encoders and the dp link m_n parameters
      in the pipe config for that. And now that the pipe bpp computations
      have been moved up and stored in the pipe config, too, we can do this
      without losing our sanity.
      
      v2: Rebased on top of Takashi Iwai's fix to (again) fix the target
      clock handling for eDP. Luckily the new code is sane enough and just
      does the right thing!
      
      v3: Move ->has_dp_encoder to this patch (Jesse).
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      03afc4a2
    • D
      drm/i915: clear up the fdi/dp set_m_n confusion · 6cf86a5e
      Daniel Vetter 提交于
      There's a rather decent confusion going on around transcoder m_n
      values. So let's clarify:
      - All dp encoders need this, either on the pch transcoder if it's a
        pch port, or on the cpu transcoder/pipe if it's a cpu port.
      - fdi links need to have the right m_n values for the fdi link set in
        the cpu transcoder.
      
      To handle the pch vs transcoder stuff a bit better, extract transcoder
      set_m_n helpers. To make them simpler, set intel_crtc->cpu_transcoder
      als in ironlake_crtc_mode_set, so that gen5+ (where the cpu m_n
      registers are all at the same offset) can use it.
      
      Haswell modeset is decently confused about dp vs. edp vs. fdi. dp vs.
      edp works exactly the same as dp (since there's no pch dp any more),
      so use that as a check. And only set up the fdi m_n values if we
      really have a pch encoder present (which means we have a VGA encoder).
      
      On ilk+ we've called ironlake_set_m_n both for cpu_edp and for pch
      encoders. Now that dp_set_m_n handles all dp links (thanks to the
      pch encoder check), we can ditch the cpu_edp stuff from the
      fdi_set_m_n function.
      
      Since the dp_m_n values are not readily available, we need to
      carefully coax the edp values out of the encoder. Hence we can't (yet)
      kill this superflous complexity.
      
      v2: Rebase on top of the ivb fdi B/C check patch - we need to properly
      clear intel_crtc->fdi_lane, otherwise those checks will misfire.
      
      v3: Rebased on top of a s/IS_HASWELL/HAS_DDI/ patch from Paulo Zanoni.
      
      v4: Drop the addition of has_dp_encoder, it's in the wrong patch (Jesse).
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6cf86a5e
    • J
      drm/i915: sprite support for ValleyView v4 · 7f1f3851
      Jesse Barnes 提交于
      No constant alpha yet though, that needs a new ioctl and/or property to
      get/set.
      
      v2: use drm_plane_format_cpp (Ville)
          fix up vlv_disable_plane, remove IVB bits (Ville)
          remove error path rework (Ville)
          fix component order confusion (Ville)
          clean up platform init (Ville)
          use compute_offset_xtiled (Ville)
      v3: fix up more format confusion (Ville)
          update to new page offset function (Ville)
      v4: remove incorrect formats from framebuffer_init (Ville)
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7f1f3851
  6. 28 3月, 2013 9 次提交
  7. 27 3月, 2013 2 次提交
  8. 23 3月, 2013 1 次提交
  9. 22 2月, 2013 1 次提交
  10. 20 2月, 2013 5 次提交
  11. 14 2月, 2013 1 次提交
  12. 31 1月, 2013 1 次提交
  13. 28 1月, 2013 1 次提交
  14. 27 1月, 2013 1 次提交
    • P
      drm/i915: fix intel_init_power_wells · fa42e23c
      Paulo Zanoni 提交于
      The current code was wrong in many different ways, so this is a full
      rewrite. We don't have "different power wells for different parts of
      the GPU", we have a single power well, but we have multiple registers
      that can be used to request enabling/disabling the power well. So
      let's be a good citizen and only use the register we're suppose to
      use, except when we're loading the driver, where we clear the request
      made by the BIOS.
      
      If any of the registers is requesting the power well to be enabled, it
      will be enabled. If none of the registers is requesting the power well
      to be enabled, it will be disabled.
      
      For now we're just forcing the power well to be enabled, but in the
      next commits we'll change this.
      
      V2:
        - Remove debug messages that could be misleading due to possible
          race conditions with KVMr, Debug and BIOS.
        - Don't wait on disabling: after a conversaion with a hardware
          engineer we discovered that the "restriction" on bit 31 is just
          for the "enable" case, and we don't even need to wait on the
          "disable" case.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fa42e23c
  15. 23 1月, 2013 1 次提交
  16. 20 1月, 2013 3 次提交
    • V
      drm/i915: Provide the quantization range in the AVI infoframe · abedc077
      Ville Syrjälä 提交于
      The AVI infoframe is able to inform the display whether the source is
      sending full or limited range RGB data.
      
      As per CEA-861 [1] we must first check whether the display reports the
      quantization range as selectable, and if so we can set the approriate
      bits in the AVI inforframe.
      
      [1] CEA-861-E - 6.4 Format of Version 2 AVI InfoFrame
      
      v2: Give the Q bits better names, add spec chapter information
      Reviewed-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>
      abedc077
    • V
      drm/i915: Add "Automatic" mode for the "Broadcast RGB" property · 55bc60db
      Ville Syrjälä 提交于
      Add a new "Automatic" mode to the "Broadcast RGB" range property.
      When selected the driver automagically selects between full range and
      limited range output.
      
      Based on CEA-861 [1] guidelines, limited range output is selected if the
      mode is a CEA mode, except 640x480. Otherwise full range output is used.
      Additionally DVI monitors should most likely default to full range
      always.
      
      As per DP1.2a [2] DisplayPort should always use full range for 18bpp, and
      otherwise will follow CEA-861 rules.
      
      NOTE: The default value for the property will now be "Automatic"
      so some people may be affected in case they're relying on the
      current full range default.
      
      [1] CEA-861-E - 5.1 Default Encoding Parameters
      [2] VESA DisplayPort Ver.1.2a - 5.1.1.1 Video Colorimetry
      
      v2: Use has_hdmi_sink to check if a HDMI monitor is present
      v3: Add information about relevant spec chapters
      Reviewed-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>
      55bc60db
    • 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