1. 17 4月, 2015 1 次提交
  2. 27 1月, 2015 2 次提交
  3. 26 1月, 2015 1 次提交
    • J
      drm/i915: fix inconsistent brightness after resume · 13f3fbe8
      Jeremiah Mahler 提交于
      commit 6dda730e
      Author: Jani Nikula <jani.nikula@intel.com>
      Date:   Tue Jun 24 18:27:40 2014 +0300
      
          drm/i915: respect the VBT minimum backlight brightness
      
      introduced a bug which resulted in inconsistent brightness levels on
      different machines. If a suspended was entered with the screen off some
      machines would resume with the screen at minimum brightness and others
      at maximum brightness.
      
      The following commands can be used to produce this behavior.
      
        xset dpms force off
        sleep 1
        sudo systemctl suspend
        (resume ...)
      
      The root cause of this problem is a comparison which checks to see if
      the backlight level is zero when the panel is enabled.  If it is zero,
      it is set to the maximum level.  Unfortunately, not all machines have a
      minimum level of zero. On those machines the level is left at the
      minimum instead of begin set to the maximum.
      
      Fix the bug by updating the comparison to check for the minimum
      backlight level instead of zero.  Also, expand the comparison for
      the possible case when the level is less than the minimum.
      
      Fixes: 6dda730e ("respect the VBT minimum backlight brightness")
      Signed-off-by: NJeremiah Mahler <jmmahler@gmail.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      13f3fbe8
  4. 14 11月, 2014 5 次提交
  5. 07 11月, 2014 1 次提交
  6. 24 10月, 2014 1 次提交
  7. 06 10月, 2014 2 次提交
  8. 24 9月, 2014 1 次提交
  9. 19 9月, 2014 1 次提交
  10. 03 9月, 2014 3 次提交
  11. 27 8月, 2014 1 次提交
  12. 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
  13. 14 7月, 2014 1 次提交
  14. 09 7月, 2014 1 次提交
  15. 11 6月, 2014 1 次提交
  16. 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
  17. 04 6月, 2014 2 次提交
    • 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
    • J
      drm/i915: replace drm_get_connector_name() with direct name field use · c23cc417
      Jani Nikula 提交于
      Generated using semantic patches:
      
      @@
      expression E;
      @@
      
      - drm_get_connector_name(&E)
      + E.name
      
      @@
      expression E;
      @@
      
      - drm_get_connector_name(E)
      + E->name
      
      v2: Turn drm_get_connector_name(&E) into E.name instead of &(E)->name.
      Acked-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      c23cc417
  18. 21 5月, 2014 1 次提交
  19. 15 5月, 2014 1 次提交
  20. 13 4月, 2014 1 次提交
  21. 11 4月, 2014 1 次提交
  22. 03 3月, 2014 1 次提交
  23. 13 2月, 2014 1 次提交
  24. 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
  25. 25 1月, 2014 1 次提交
  26. 22 1月, 2014 1 次提交
  27. 11 12月, 2013 1 次提交
  28. 10 12月, 2013 1 次提交
  29. 14 11月, 2013 3 次提交