1. 25 1月, 2014 8 次提交
    • 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
  2. 23 1月, 2014 1 次提交
  3. 22 1月, 2014 2 次提交
  4. 18 12月, 2013 1 次提交
  5. 12 12月, 2013 2 次提交
  6. 11 12月, 2013 2 次提交
  7. 04 12月, 2013 2 次提交
  8. 28 11月, 2013 3 次提交
  9. 18 11月, 2013 1 次提交
    • D
      drm/i915: dp aux irq support for g4x/vlv · 4aeebd74
      Daniel Vetter 提交于
      Now we have this everywhere. Next up would be to wire up the DP
      hotplug pin to speed up panel power sequencing for eDP panels ...
      
      I've decided to leave the has_aux_irq logic in the code, it should
      come handy for hw bringup.
      
      For testing/fail-safety the dp aux code already has a timeout when
      waiting for interrupts to signal completion and screams rather loud if
      they don't arrive in time. Given that we need a real piece of hw to
      talk to anyway this is probably as good as it gets.
      
      v2: Don't check the dp aux channel bits on i965 machines, they have a
      different meaning there. Yay for reusing bits at will! Spotted by
      Jani.
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4aeebd74
  10. 14 11月, 2013 1 次提交
  11. 11 11月, 2013 1 次提交
  12. 09 11月, 2013 4 次提交
  13. 07 11月, 2013 1 次提交
    • J
      drm/i915: make backlight functions take a connector · 752aa88a
      Jesse Barnes 提交于
      On VLV/BYT, backlight controls a per-pipe, so when adjusting the
      backlight we need to pass the correct info.  So make the externally
      visible backlight functions take a connector argument, which can be used
      internally to figure out the pipe backlight to adjust.
      
      v2: make connector pipe lookup check for NULL crtc (Jani)
          fixup connector check in ASLE code (Jani)
      v3: make sure we take the mode config lock around lookups (Daniel)
      v4: fix double unlock in panel_get_brightness (Daniel)
      v5: push ASLE work into a work queue (Daniel)
      v6: separate ASLE work to a prep patch, rebase (Jani)
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      752aa88a
  14. 05 11月, 2013 1 次提交
  15. 01 11月, 2013 1 次提交
  16. 31 10月, 2013 2 次提交
  17. 29 10月, 2013 1 次提交
    • J
      drm/i915/dp: workaround BIOS eDP bpp clamping issue · c6cd2ee2
      Jani Nikula 提交于
      This isn't a real fix to the problem, but rather a stopgap measure while
      trying to find a proper solution.
      
      There are several laptops out there that fail to light up the eDP panel
      in UEFI boot mode. They seem to be mostly IVB machines, including but
      apparently not limited to Dell XPS 13, Asus TX300, Asus UX31A, Asus
      UX32VD, Acer Aspire S7. They seem to work in CSM or legacy boot.
      
      The difference between UEFI and CSM is that the BIOS provides a
      different VBT to the kernel. The UEFI VBT typically specifies 18 bpp and
      1.62 GHz link for eDP, while CSM VBT has 24 bpp and 2.7 GHz link. We end
      up clamping to 18 bpp in UEFI mode, which we can fit in the 1.62 Ghz
      link, and for reasons yet unknown fail to light up the panel.
      
      Dithering from 24 to 18 bpp itself seems to work; if we use 18 bpp with
      2.7 GHz link, the eDP panel lights up. So essentially this is a link
      speed issue, and *not* a bpp clamping issue.
      
      The bug raised its head since
      commit 657445fe
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Sat May 4 10:09:18 2013 +0200
      
          Revert "drm/i915: revert eDP bpp clamping code changes"
      
      which started clamping bpp *before* computing the link requirements, and
      thus affecting the required bandwidth. Clamping after the computations
      kept the link at 2.7 GHz.
      
      Even though the BIOS tells us to use 18 bpp through the VBT, it happily
      boots up at 24 bpp and 2.7 GHz itself! Use this information to
      selectively ignore the VBT provided value.
      
      We can't ignore the VBT eDP bpp altogether, as there are other laptops
      that do require the clamping to be used due to EDID reporting higher bpp
      than the panel can support.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59841
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67950Tested-by: NUlf Winkelvos <ulf@winkelvos.de>
      Tested-by: Njkp <jkp@iki.fi>
      CC: stable@vger.kernel.org
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c6cd2ee2
  18. 22 10月, 2013 1 次提交
    • D
      drm/sysfs: sort out minor and connector device object lifetimes. · 5bdebb18
      Dave Airlie 提交于
      So drm was abusing device lifetimes, by having embedded device structures
      in the minor and connector it meant that the lifetime of the internal drm
      objects (drm_minor and drm_connector) were tied to the lifetime of the device
      files in sysfs, so if something kept those files opened the current code
      would kfree the objects and things would go downhill from there.
      
      Now in reality there is no need for these lifetimes to be so intertwined,
      especailly with hotplugging of devices where we wish to remove the sysfs
      and userspace facing pieces before we can unwind the internal objects due
      to open userspace files or mmaps, so split the objects out so the struct
      device is no longer embedded and do what fbdev does and just allocate
      and remove the sysfs inodes separately.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      5bdebb18
  19. 18 10月, 2013 1 次提交
  20. 15 10月, 2013 1 次提交
  21. 10 10月, 2013 3 次提交