1. 16 12月, 2015 6 次提交
  2. 11 12月, 2015 1 次提交
  3. 31 10月, 2015 1 次提交
  4. 13 10月, 2015 1 次提交
  5. 02 10月, 2015 1 次提交
    • S
      drm/i915/bxt: DSI encoder support in CRTC modeset · 7d4aefd0
      Shashank Sharma 提交于
      SKL and BXT qualifies the HAS_DDI() check, and hence haswell
      modeset functions are re-used for modeset sequence. But DDI
      interface doesn't include support for DSI.
      This patch adds:
      1. cases for DSI encoder, in those modeset functions and allows
         a CRTC modeset
      2. Adds call to pre_pll enabled from CRTC modeset function. Nothing
         needs to be done as such in CRTC for DSI encoder, as PLL, clock
         and and transcoder programming will be taken care in encoder's
         pre_enable and pre_pll_enable function.
      
      v2: Fixed Jani's review comments. Added INVALID_PORT for non DDI
          encoder like DSI for platforms having HAS_DDI as true.
      
      v3: Rebased on latest drm-nightly branch. Added a WARN_ON for invalid
          encoder.
      
      v4: WARN_ON for invalid encoder is refactored as per Jani's suggestion.
          Fixed the sequence for pre_pll_enable.
      
      v5: Protected DDI code paths in case of DSI encoder calls.
      Signed-off-by: NShashank Sharma <shashank.sharma@intel.com>
      Signed-off-by: NUma Shankar <uma.shankar@intel.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7d4aefd0
  6. 06 7月, 2015 5 次提交
  7. 19 6月, 2015 1 次提交
  8. 28 2月, 2015 1 次提交
  9. 30 9月, 2014 1 次提交
  10. 23 7月, 2014 1 次提交
    • J
      drm/i915: respect the VBT minimum backlight brightness · 6dda730e
      Jani Nikula 提交于
      Historically we've exposed the full backlight PWM duty cycle range to
      the userspace, in the name of "mechanism, not policy". However, it turns
      out there are both panels and board designs where there is a minimum
      duty cycle that is required for proper operation. The minimum duty cycle
      is available in the VBT.
      
      The backlight class sysfs interface does not make any promises to the
      userspace about the physical meaning of the range
      0..max_brightness. Specifically there is no guarantee that 0 means off;
      indeed for acpi_backlight 0 usually is not off, but the minimum
      acceptable value.
      
      Respect the minimum backlight, and expose the range acceptable to the
      hardware as 0..max_brightness to the userspace via the backlight class
      device; 0 means the minimum acceptable enabled value. To switch off the
      backlight, the user must disable the encoder.
      
      As a side effect, make the backlight class device max brightness and
      physical PWM modulation frequency (i.e. max duty cycle)
      independent. This allows a follow-up patch to virtualize the max value
      exposed to the userspace.
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      [danvet: s/BUG_ON/WARN_ON/]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6dda730e
  11. 22 7月, 2014 1 次提交
    • D
      drm/i915: add DP 1.2 MST support (v0.7) · 0e32b39c
      Dave Airlie 提交于
      This adds DP 1.2 MST support on Haswell systems.
      
      Notes:
      a) this reworks irq handling for DP MST ports, so that we can
      avoid the mode config locking in the current hpd handlers, as
      we need to process up/down msgs at a better time.
      
      Changes since v0.1:
      use PORT_PCH_HOTPLUG to detect short vs long pulses
      add a workqueue to deal with digital events as they can get blocked on the
      main workqueue beyong mode_config mutex
      fix a bunch of modeset checker warnings
      acks irqs in the driver
      cleanup the MST encoders
      
      Changes since v0.2:
      check irq status again in work handler
      move around bring up and tear down to fix DPMS on/off
      use path properties.
      
      Changes since v0.3:
      updates for mst apis
      more state checker fixes
      irq handling improvements
      fbcon handling support
      improved reference counting of link - fixes redocking.
      
      Changes since v0.4:
      handle gpu reset hpd reinit without oopsing
      check link status on HPD irqs
      fix suspend/resume
      
      Changes since v0.5:
      use proper functions to get max link/lane counts
      fix another checker backtrace - due to connectors disappearing.
      set output type in more places fro, unknown->displayport
      don't talk to devices if no HPD asserted
      check mst on short irqs only
      check link status properly
      rebase onto prepping irq changes.
      drop unsued force_act
      
      Changes since v0.6:
      cleanup unused struct entry.
      
      [airlied: fix some sparse warnings].
      Reviewed-by: NTodd Previte <tprevite@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      0e32b39c
  12. 08 7月, 2014 1 次提交
  13. 05 6月, 2014 1 次提交
    • R
      drm: convert crtc and connection_mutex to ww_mutex (v5) · 51fd371b
      Rob Clark 提交于
      For atomic, it will be quite necessary to not need to care so much
      about locking order.  And 'state' gives us a convenient place to stash a
      ww_ctx for any sort of update that needs to grab multiple crtc locks.
      
      Because we will want to eventually make locking even more fine grained
      (giving locks to planes, connectors, etc), split out drm_modeset_lock
      and drm_modeset_acquire_ctx to track acquired locks.
      
      Atomic will use this to keep track of which locks have been acquired
      in a transaction.
      
      v1: original
      v2: remove a few things not needed until atomic, for now
      v3: update for v3 of connection_mutex patch..
      v4: squash in docbook
      v5: doc tweaks/fixes
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      51fd371b
  14. 04 6月, 2014 1 次提交
    • D
      drm: Split connection_mutex out of mode_config.mutex (v3) · 6e9f798d
      Daniel Vetter 提交于
      After the split-out of crtc locks from the big mode_config.mutex
      there's still two major areas it protects:
      - Various connector probe states, like connector->status, EDID
        properties, probed mode lists and similar information.
      - The links from connector->encoder and encoder->crtc and other
        modeset-relevant connector state (e.g. properties which control the
        panel fitter).
      
      The later is used by modeset operations. But they don't really care
      about the former since it's allowed to e.g. enable a disconnected VGA
      output or with a mode not in the probed list.
      
      Thus far this hasn't been a problem, but for the atomic modeset
      conversion Rob Clark needs to convert all modeset relevant locks into
      w/w locks. This is required because the order of acquisition is
      determined by how userspace supplies the atomic modeset data. This has
      run into troubles in the detect path since the i915 load detect code
      needs _both_ protections offered by the mode_config.mutex: It updates
      probe state and it needs to change the modeset configuration to enable
      the temporary load detect pipe.
      
      The big deal here is that for the probe/detect users of this lock a
      plain mutex fits best, but for atomic modesets we really want a w/w
      mutex. To fix this lets split out a new connection_mutex lock for the
      modeset relevant parts.
      
      For simplicity I've decided to only add one additional lock for all
      connector/encoder links and modeset configuration states. We have
      piles of different modeset objects in addition to those (like bridges
      or panels), so adding per-object locks would be much more effort.
      
      Also, we're guaranteed (at least for now) to do a full modeset if we
      need to acquire this lock. Which means that fine-grained locking is
      fairly irrelevant compared to the amount of time the full modeset will
      take.
      
      I've done a full audit, and there's just a few things that justify
      special focus:
      - Locking in drm_sysfs.c is almost completely absent. We should
        sprinkle mode_config.connection_mutex over this file a bit, but
        since it already lacks mode_config.mutex this patch wont make the
        situation any worse. This is material for a follow-up patch.
      
      - omap has a omap_framebuffer_flush function which walks the
        connector->encoder->crtc links and is called from many contexts.
        Some look like they don't acquire mode_config.mutex, so this is
        already racy. Again fixing this is material for a separate patch.
      
      - The radeon hot_plug function to retrain DP links looks at
        connector->dpms. Currently this happens without any locking, so is
        already racy. I think radeon_hotplug_work_func should gain
        mutex_lock/unlock calls for the mode_config.connection_mutex.
      
      - Same applies to i915's intel_dp_hot_plug. But again, this is already
        racy.
      
      - i915 load_detect code needs to acquire this lock. Which means the
        w/w dance due to Rob's work will be nicely contained to _just_ this
        function.
      
      I've added fixme comments everywhere where it looks suspicious but in
      the sysfs code. After a quick irc discussion with Dave Airlie it
      sounds like the lack of locking in there is due to sysfs cleanup fun
      at module unload.
      
      v1: original (only compile tested)
      
      v2: missing mutex_init(), etc (from Rob Clark)
      
      v3: i915 needs more care in the conversion:
      - Protect the edp pp logic with the connection_mutex.
      - Use connection_mutex in the backlight code due to
        get_pipe_from_connector.
      - Use drm_modeset_lock_all in suspend/resume paths.
      - Update lock checks in the overlay code.
      
      Cc: Alex Deucher <alexdeucher@gmail.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      6e9f798d
  15. 05 2月, 2014 1 次提交
  16. 22 1月, 2014 1 次提交
  17. 07 12月, 2013 1 次提交
  18. 04 12月, 2013 1 次提交
  19. 15 11月, 2013 1 次提交
  20. 13 11月, 2013 1 次提交
  21. 09 11月, 2013 1 次提交
  22. 07 11月, 2013 2 次提交
  23. 14 10月, 2013 1 次提交
  24. 12 10月, 2013 1 次提交
    • P
      drm/i915: increase the SWSCI DSLP default timeout to 50ms · 4994aa8c
      Paulo Zanoni 提交于
      The spec says the default timeout should be 2ms, but on my machine
      this doesn't seem to be enough. Sometimes it works, sometimes I get
      these messages when booting:
        - SWSCI request timed out
        - SWSCI request already in progress
      
      And my guess is that the "already in progress" message is because the
      first one is still happening.
      
      I did some experiments on my machine (that has CONFIG_HZ=1000) and the
      wait_for function usually takes 4-6 jiffies to finish, but I've seen
      up to 9. So increase the timeout to 50ms. We only expect to wait for
      the actual amount of time the operation takes, so even a huge timeout
      shouldn't delay us more than what the hardware actually requires.
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      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>
      4994aa8c
  25. 18 9月, 2013 1 次提交
    • P
      drm/i915: check for more ASLC interrupts · 507c1a45
      Paulo Zanoni 提交于
      Sometimes I see the "non asle set request??" message on my Haswell
      machine, so I decided to get the spec and see if some bits are missing
      from the mask. We do have some bits missing from the mask, so this
      patch adds them, and the corresponding code to print "unsupported"
      messages just like we do with the other bits we don't support.
      
      But I still see the "non asle set request??" message on my machine :(
      
      Also use the proper ASLC name to indicate the registers we're talking
      about.
      
      v2: - Properly set the new FAILED bits
          - Rename the old FAILED bits
          - Print everything we don't support
      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>
      507c1a45
  26. 13 9月, 2013 1 次提交
  27. 06 9月, 2013 1 次提交
    • J
      drm/i915: try not to lose backlight CBLV precision · cac6a5ae
      Jani Nikula 提交于
      ACPI has _BCM and _BQC methods to set and query the backlight
      brightness, respectively. The ACPI opregion has variables BCLP and CBLV
      to hold the requested and current backlight brightness, respectively.
      
      The BCLP variable has range 0..255 while the others have range
      0..100. This means the _BCM method has to scale the brightness for BCLP,
      and the gfx driver has to scale the requested value back for CBLV. If
      the _BQC method uses the CBLV variable (apparently some implementations
      do, some don't) for current backlight level reporting, there's room for
      rounding errors.
      
      Use DIV_ROUND_UP for scaling back to CBLV to get back to the same values
      that were passed to _BCM, presuming the _BCM simply uses bclp = (in *
      255) / 100 for scaling to BCLP.
      
      Reference: https://gist.github.com/aaronlu/6314920Reported-by: NAaron Lu <aaron.lu@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Reviewed-by: NAaron Lu <aaron.lu@intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      cac6a5ae
  28. 04 9月, 2013 3 次提交