1. 29 3月, 2014 1 次提交
    • D
      drm/i915: add locking to fixed panel edid probing · 4da98541
      Daniel Vetter 提交于
      With the recent addition of locking checks in
      
      commit 62ff94a5
      Author:     Daniel Vetter <daniel.vetter@ffwll.ch>
      AuthorDate: Thu Jan 23 22:18:47 2014 +0100
      
          drm/crtc-helper: remove LOCKING from kerneldoc
      
      drm_add_edid_modes started to WARN about the mode_config.mutex not
      being held in the lvds and dp initialization code.
      
      Now since this is init code locking is fairly redudant if it wouldn't
      be for the drm core registering sysfs files a bit early. And the
      locking WARNINGs nicely enforce that indeed all access to the mode
      lists are properly protected. And a full audit shows that only i915
      and gma500 touch the modes lists at init time.
      
      Hence I've opted to wrap up this entire mode detection sequence for
      fixed panels with the mode_config mutex for both lvds and edp outputs.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4da98541
  2. 18 3月, 2014 7 次提交
  3. 11 3月, 2014 1 次提交
    • V
      drm/i915: Make encoder cloning more flexible · bc079e8b
      Ville Syrjälä 提交于
      Currently we allow encoders to indicate whether they can be part of a
      cloned set with just one flag. That's not flexible enough to describe
      the actual hardware capabilities. Instead make it a bitmask of encoder
      types with which the current encoder can be cloned.
      
      For now we set the bitmask to allow DVO+DVO and DVO+VGA, which should
      match what the old boolean flag allowed. We will add some more cloning
      options in the future.
      
      Note that this patch also removes the encoder.possible_clones setting
      from encoder setup code - we compute this dynamically.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      [danvet: Add Ville's explanation why removing the encoder
      possible_clones is save.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bc079e8b
  4. 08 3月, 2014 2 次提交
  5. 06 3月, 2014 2 次提交
  6. 14 2月, 2014 2 次提交
  7. 13 2月, 2014 3 次提交
  8. 07 2月, 2014 1 次提交
    • D
      drm/i915: Disable dp aux irq on g4x · 4e6b788c
      Daniel Vetter 提交于
      Apparently it's broken in the exact same way as the gmbus irq. For
      reference of the full story see
      
      commit c12aba5a
      Author: Jiri Kosina <jkosina@suse.cz>
      Date:   Tue Mar 19 09:56:57 2013 +0100
      
          drm/i915: stop using GMBUS IRQs on Gen4 chips
      
      The effect is that we have a storm of unclaimed interrupts on the
      legacy irq line. If that one is used by a different device then the
      kernel will complain and rather quickly kill the irq source. Which
      breaks any device trying to actually use the legacy irq line.
      
      This regression has been introduced
      
      commit 4aeebd74
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Thu Oct 31 09:53:36 2013 +0100
      
          drm/i915: dp aux irq support for g4x/vlv
      
      Note that disabling MSI works around the issue, but we can't do that
      since apparently then the hw will miss interrupts. At least if
      relevant comments in i915_irq.c are accurate.
      
      v2: Cross-reference dp aux and gmbus gen4 comments.
      
      v3: Consolidate harder into i915_drv.h as suggested by Chris.
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reported-and-tested-by: NJiri Kosina <jkosina@suse.cz>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4e6b788c
  9. 31 1月, 2014 1 次提交
    • I
      drm/i915: vlv: fix DP PHY lockup due to invalid PP sequencer setup · 2cac613b
      Imre Deak 提交于
      Atm we setup the HW panel power sequencer logic both for eDP and DP
      ports. On eDP we then go on and start the power on sequence and commence
      with link training when it's ready. On DP we don't do the power on
      sequencing but do the link training immediately. At this point the DP
      PHY block gets stuck, since - supposedly - it is waiting for the power
      on sequence to finish. The actual register write that seems to hold off
      the PHY is PIPEX_PP_ON_DELAYS[Panel Control Port Select]. Writing here
      a non-0 value eventually sets PIPEX_PP_STATUS[Require Asset Status] to
      1 and blocks the PHY until the panel power on is ready.
      
      Fix this by not doing any PP sequencing setup for DP ports.
      
      Thanks to Ville Syrjälä, Jesse Barnes and Todd Previte for the help in
      tracking this down.
      
      Note that on older gmch platforms (where we have lvds instead of edp)
      we've hacked around this by writing the magic ABCD unlock key to PP
      registers, which disables the hw sanity checks.
      
      For edp all platforms thus far had the pch split, with the edp port in
      the north display complex and the PP registers on the pch the hw
      sanity checks (expressed through the "Require Asset Status" bit) was
      never functional, hence never a real issue.
      
      This regression has been introduce in
      
      commit bf13e81b
      Author: Jani Nikula <jani.nikula@intel.com>
      Date:   Fri Sep 6 07:40:05 2013 +0300
      
          drm/i915: add support for per-pipe power sequencing on vlv
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      [danvet: Add note about the bigger story here.]
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2cac613b
  10. 30 1月, 2014 1 次提交
  11. 28 1月, 2014 1 次提交
    • J
      drm/i915: move module parameters into a struct, in a new file · d330a953
      Jani Nikula 提交于
      With 20+ module parameters, I think referring to them via a struct
      improves clarity over just having a bunch of globals. While at it, move
      the parameter initialization and definitions into a new file
      i915_params.c to reduce clutter in i915_drv.c.
      
      Apart from the ill-named i915_enable_rc6, i915_enable_fbc and
      i915_enable_ppgtt parameters, for which we lose the "i915_" prefix
      internally, the module parameters now look the same both on the kernel
      command line and in code. For example, "i915.modeset".
      
      The downsides of the change are losing static on a couple of variables
      and not having the initialization and module_param_named() right next to
      each other. On the other hand, all module parameters are now defined in
      one place at i915_params.c. Plus you can do this to find all module
      parameter references:
      
      $ git grep "i915\." -- drivers/gpu/drm/i915
      
      v2:
      - move the definitions into a new file
      - s/i915_params/i915/
      - make i915_try_reset i915.reset, for consistency
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d330a953
  12. 27 1月, 2014 1 次提交
    • R
      drm/i915: debugfs: Add support for probing DP sink CRC. · d2e216d0
      Rodrigo Vivi 提交于
      This debugfs interface will allow intel-gpu-tools test case
      to verify if screen has been updated properly on cases like PSR.
      
      v2: Accepted all Daniel's suggestions:
          * grab modeset lock
          * loop over connector and check DPMS on
          * return errors
          * use _eDP1 suffix for easy future extension
          * don't cache crc_supported neither latest crc
          * return crc as a full array and read it at once with aux.
          * use 0 to turn TEST_SINK off.
          * split the drm_helpers definitions in another patch.
      
      v3: Accepted 2 Damien's suggestion: remove h from printf hexa
          and return ENODEV when eDP not present instead of EAGAIN.
      
      v4: Accepted 2 Jani' s suggestion: 1 path for unlock and remove
          _retry from aux read.
      
      v5: removing last missing useless _retry (by Damien)
      
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Damien Lespiau <damien.lespiau@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d2e216d0
  13. 25 1月, 2014 11 次提交
    • D
      drm/i915: Introduce a get_aux_send_ctl() vfunc · 153b1100
      Damien Lespiau 提交于
      We need a bit more flexibility here in the future, bits get shuffled
      around.
      
      v2: more descriptive commit message (Jani Nikula)
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      153b1100
    • D
      drm/i915: Reorder the AUX_CTL bits in descending order · 788d4433
      Damien Lespiau 提交于
      So it's easier to compare what we program with the documentation, not
      having to jump at all.
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      788d4433
    • D
      drm/i915: Factor out a function returning the AUX_CTL value to start a send · 5ed12a19
      Damien Lespiau 提交于
      Also, move that computation outside of the for loop that tries 5 times,
      this value doesn't change between tries.
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5ed12a19
    • D
      drm/i915: Turn get_aux_clock_divider() into per-platform vfuncs · ec5b01dd
      Damien Lespiau 提交于
      A tiny clean-up to allow better code separation between platforms.
      
      v2: Fix comment placement (put in in i9xx_get_aux_clock_divider()) and
          nuke the outdated PCH eDP comment (Jani Nikula)
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ec5b01dd
    • T
      drm/i915: Enable 5.4Ghz (HBR2) link rate for Displayport 1.2-capable devices · 06ea66b6
      Todd Previte 提交于
      For HSW+ platforms, enable the 5.4Ghz (HBR2) link rate for devices that support it. The
      sink device must report that is supports Displayport 1.2 and the HBR2 bit rate in the
      DPCD in order to use HBR2.
      Signed-off-by: NTodd Previte <tprevite@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      06ea66b6
    • P
      drm/i915: set the backlight panel delays registers to 1 · b2f19d1a
      Paulo Zanoni 提交于
      Because we already do the wait in software: see
      ironlake_wait_backlight_on and ironlake_edp_wait_backlight_off.
      
      For the "backlight on" delay, even BSpec says we need to program 0x1
      to PP_ON_DELAYS 12:0.
      
      For the "backlight off" delay, if we don't do the same thing, when we
      call ironlake_wait_panel_off we'll end up waiting for the it again.
      
      On my machine the off delay is 200ms, so we save this amount of time
      whenever we disable the panel (e.g, suspend).
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b2f19d1a
    • P
      drm/i915: don't wait for power cycle when waiting for power off · 1a5ef5b7
      Paulo Zanoni 提交于
      Function ironlake_wait_panel_off should just wait for the power off
      delay, while function ironlake_wait_panel_power_cycle should wait for
      the panel cycle (that's required after we turn the panel off, before
      we enable it again).
      
      The problem is that, currently, ironlake_wait_panel_off is waiting not
      just for the panel to be off, but also for the power cycle delay and
      the backlight off delay. This function relies on the PP_STATUS bits
      3:0, which are not documented and not supposed to be used. A quick
      analysis of the values we get while waiting quickly shows that power
      off is reached while bits 3:0 are still 0x1, and the time it takes to
      become 0x0 is the power cycle delay.
      
      On my system with backlight off delay of 200ms, power down delay of
      50ms and power cycle delay of 500ms, this is what I get:
       - Start waiting with value 0x80000008, timestamp 6.429364.
       - Jumps to 0xa0000003, timestamp 6.431360 (time waited: 0.001996)
       - Jumps to 0xa0000002, timestamp 6.631277 (time waited: 0.201913)
       - Jumps to 0x08000001, timestamp 6.681258 (time waited: 0.251894)
       - Jumps to 0x00000000, timestamp 7.192012 (time waited: 0.762648)
      
      As you can see, ironlake_wait_panel_off is sleeping 760ms instead of
      the expected 50ms: the first 200ms matches the backlight off delay
      (which we should already have waited for!), then the 50ms for the real
      panel off delay, then the 500ms for the panel power cycle.
      
      This patch makes is look just at bits 31 and 29:28, which will ignore
      the panel power cycle.
      
      And just to be clear: this saves 500ms on my system every time we
      disable the panel. But we can still save 200ms more (the backlight off
      delay) on the next patches.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuougseek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1a5ef5b7
    • P
      drm/i915: remove a column of zeros from the eDP wait definitions · ffd6749d
      Paulo Zanoni 提交于
      I like how the macros are nicely column-aligned, so we can properly
      compare what each macro waits for, but a column full of zeroes doesn't
      really help anything: it just makes the lines bigger, and they're
      already way past 80 columns. I imagine this column was used in the
      past, but IMHO now we can get rid of it.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ffd6749d
    • D
      drm/i915: drop ironlake_ prefix from edp panel/backlight functions · 4be73780
      Daniel Vetter 提交于
      They now also work on vlv, which has the regs somewhere else. And
      daring a glance into the looking glass it seems like this
      functionality will continue to work the same for the next few hardware
      platforms.
      
      So it's better to just remove that misleading prefix and have a bit
      shorter code for better readability.
      
      The only exceptions are the panel/backlight functions shared with
      intel_ddi.c, those get an intel_ prefix.
      
      While at it make the vdd_on/off functions static.
      
      And one straggler was missing the edp_ in the name, so make everything
      neatly OCD.
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4be73780
    • P
      drm/i915: save some time when waiting the eDP timings · dce56b3c
      Paulo Zanoni 提交于
      The eDP spec defines some points where after you do action A, you have
      to wait some time before action B. The thing is that in our driver
      action B does not happen exactly after action A, but we still use
      msleep() calls directly. What this patch does is that we record the
      timestamp of when action A happened, then, just before action B, we
      look at how much time has passed and only sleep the remaining amount
      needed.
      
      With this change, I am able to save about 5-20ms (out of the total
      200ms) of the backlight_off delay and completely skip the 1ms
      backlight_on delay. The 600ms vdd_off delay doesn't happen during
      normal usage anymore due to a previous patch.
      
      v2: - Rename ironlake_wait_jiffies_delay to intel_wait_until_after and
            move it to intel_display.c
          - Fix the msleep call: diff is in jiffies
      v3: - Use "tmp_jiffies" so we don't need to worry about the value of
            "jiffies" advancing while we're doing the math.
      v4: - Rename function again.
          - Move function to i915_drv.h.
          - Store last_power_cycle at edp_panel_off too.
          - Use msecs_to_jiffies_timeout, then replace the msleep with an
            open-coded version that avoids the extra +1 jiffy.
          - Try to add units to every variable name so we don't confuse
            jiffies with milliseconds.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      dce56b3c
    • P
      drm/i915: init the DP panel power seq variables earlier · 0095e6dc
      Paulo Zanoni 提交于
      Our driver has two different ways of waiting for panel power
      sequencing delays. One of these ways is through
      ironlake_wait_panel_status, which implicitly uses the values written
      to our registers. The other way is through the functions that call
      intel_wait_until_after, and on this case we do direct msleep() calls
      on the intel_dp->xxx_delay variables.
      
      Function intel_dp_init_panel_power_sequencer is responsible for
      initializing the _delay variables and deciding which values we need to
      write to the registers, but it does not write these values to the
      registers. Only at intel_dp_init_panel_power_sequencer_registers we
      actually do this write.
      
      Then problem is that when we call intel_dp_i2c_init, we will get some
      I2C calls, which will trigger a VDD enable, which will make use of the
      panel power sequencing registers and the _delay variables, so we need
      to have both ready by this time. Today, when this happens, the _delay
      variables are zero (because they were not computed) and the panel
      power sequence registers contain whatever values were written by the
      BIOS (which are usually correct).
      
      What this patch does is to make sure that function
      intel_dp_init_panel_power_sequencer is called earlier, so by the time
      we call intel_dp_i2c_init, the _delay variables will already be
      initialized. The actual registers won't contain their final values,
      but at least they will contain the values set by the BIOS.
      
      The good side is that we were reading the values, but were not using
      them for anything (because we were just skipping the msleep(0) calls),
      so this "fix" shouldn't fix any real existing bugs. I was only able to
      identify the problem because I added some debug code to check how much
      time time we were saving with my previous patch.
      
      Regression introduced by:
          commit ed92f0b2
          Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
          Date:   Wed Jun 12 17:27:24 2013 -0300
              drm/i915: extract intel_edp_init_connector
      
      v2: - Rewrite commit message.
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0095e6dc
  14. 23 1月, 2014 1 次提交
  15. 22 1月, 2014 2 次提交
  16. 18 12月, 2013 1 次提交
  17. 12 12月, 2013 2 次提交