1. 06 9月, 2020 2 次提交
    • H
      drm/i915: panel: Honor the VBT PWM frequency for devs with an external PWM controller · 6b51e7d2
      Hans de Goede 提交于
      So far for devices using an external PWM controller (devices using
      pwm_setup_backlight()), we have been hardcoding the period-time passed to
      pwm_config() to 21333 ns.
      
      I suspect this was done because many VBTs set the PWM frequency to 200
      which corresponds to a period-time of 5000000 ns, which greatly exceeds
      the PWM_MAX_PERIOD_NS define in the Crystal Cove PMIC PWM driver, which
      used to be 21333.
      
      This PWM_MAX_PERIOD_NS define was actually based on a bug in the PWM
      driver where its period and duty-cycle times where off by a factor of 256.
      
      Due to this bug the hardcoded CRC_PMIC_PWM_PERIOD_NS value of 21333 would
      result in the PWM driver using its divider of 128, which would result in
      a PWM output frequency of 6000000 Hz / 256 / 128 = 183 Hz. So actually
      pretty close to the default VBT value of 200 Hz.
      
      Now that this bug in the pwm-crc driver is fixed, we can actually use
      the VBT defined frequency.
      
      This is important because:
      
      a) With the pwm-crc driver fixed it will now translate the hardcoded
      CRC_PMIC_PWM_PERIOD_NS value of 21333 ns / 46 Khz to a PWM output
      frequency of 23 KHz (the max it can do).
      
      b) The pwm-lpss driver used on many models has always honored the
      21333 ns / 46 Khz request
      
      Some panels do not like such high output frequencies. E.g. on a Terra
      Pad 1061 tablet, using the LPSS PWM controller, the backlight would go
      from off to max, when changing the sysfs backlight brightness value from
      90-100%, anything under aprox. 90% would turn the backlight fully off.
      
      Honoring the VBT specified PWM frequency will also hopefully fix the
      various bug reports which we have received about users perceiving the
      backlight to flicker after a suspend/resume cycle.
      Acked-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200903112337.4113-16-hdegoede@redhat.com
      6b51e7d2
    • H
      drm/i915: panel: Add get_vbt_pwm_freq() helper · 27a79cbc
      Hans de Goede 提交于
      Factor the code which checks and drm_dbg_kms-s the VBT PWM frequency
      out of get_backlight_max_vbt().
      
      This is a preparation patch for honering the VBT PWM frequency for
      devices which use an external PWM controller (devices using
      pwm_setup_backlight()).
      Acked-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200903112337.4113-15-hdegoede@redhat.com
      27a79cbc
  2. 23 6月, 2020 1 次提交
    • J
      drm/i915/params: switch to device specific parameters · 8a25c4be
      Jani Nikula 提交于
      Start using device specific parameters instead of module parameters for
      most things. The module parameters become the immutable initial values
      for i915 parameters. The device specific parameters in i915->params
      start life as a copy of i915_modparams. Any later changes are only
      reflected in the debugfs.
      
      The stragglers are:
      
      * i915.force_probe and i915.modeset. Needed before dev_priv is
        available. This is fine because the parameters are read-only and never
        modified.
      
      * i915.verbose_state_checks. Passing dev_priv to I915_STATE_WARN and
        I915_STATE_WARN_ON would result in massive and ugly churn. This is
        handled by not exposing the parameter via debugfs, and leaving the
        parameter writable in sysfs. This may be fixed up in follow-up work.
      
      * i915.inject_probe_failure. Only makes sense in terms of the module,
        not the device. This is handled by not exposing the parameter via
        debugfs.
      
      v2: Fix uc i915 lookup code (Michał Winiarski)
      
      Cc: Juha-Pekka Heikkilä <juha-pekka.heikkila@intel.com>
      Cc: Venkata Sandeep Dhanalakota <venkata.s.dhanalakota@intel.com>
      Cc: Michał Winiarski <michal.winiarski@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Acked-by: NMichał Winiarski <michal.winiarski@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20200618150402.14022-1-jani.nikula@intel.com
      8a25c4be
  3. 19 5月, 2020 1 次提交
  4. 16 5月, 2020 1 次提交
  5. 24 4月, 2020 4 次提交
  6. 21 4月, 2020 1 次提交
  7. 08 4月, 2020 1 次提交
    • J
      drm/i915/panel: use struct drm_device based logging · 2b3c472c
      Jani Nikula 提交于
      Convert all the DRM_* logging macros to the struct drm_device based
      macros to provide device specific logging.
      
      No functional changes.
      
      Generated using the following semantic patch, originally written by
      Wambui Karuga <wambui.karugax@gmail.com>, with manual fixups on top:
      
      @@
      identifier fn, T;
      @@
      
      fn(...,struct drm_i915_private *T,...) {
      <+...
      (
      -DRM_INFO(
      +drm_info(&T->drm,
      ...)
      |
      -DRM_NOTE(
      +drm_notice(&T->drm,
      ...)
      |
      -DRM_ERROR(
      +drm_err(&T->drm,
      ...)
      |
      -DRM_WARN(
      +drm_warn(&T->drm,
      ...)
      |
      -DRM_DEBUG_DRIVER(
      +drm_dbg(&T->drm,
      ...)
      |
      -DRM_DEBUG_KMS(
      +drm_dbg_kms(&T->drm,
      ...)
      |
      -DRM_DEBUG_ATOMIC(
      +drm_dbg_atomic(&T->drm,
      ...)
      )
      ...+>
      }
      
      @@
      identifier fn, T;
      @@
      
      fn(...) {
      ...
      struct drm_i915_private *T = ...;
      <+...
      (
      -DRM_INFO(
      +drm_info(&T->drm,
      ...)
      |
      -DRM_NOTE(
      +drm_notice(&T->drm,
      ...)
      |
      -DRM_ERROR(
      +drm_err(&T->drm,
      ...)
      |
      -DRM_WARN(
      +drm_warn(&T->drm,
      ...)
      |
      -DRM_DEBUG_DRIVER(
      +drm_dbg(&T->drm,
      ...)
      |
      -DRM_DEBUG_KMS(
      +drm_dbg_kms(&T->drm,
      ...)
      |
      -DRM_DEBUG_ATOMIC(
      +drm_dbg_atomic(&T->drm,
      ...)
      )
      ...+>
      }
      
      Cc: Wambui Karuga <wambui.karugax@gmail.com>
      Reviewed-by: NWambui Karuga <wambui.karugax@gmail.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200402114819.17232-2-jani.nikula@intel.com
      2b3c472c
  8. 04 4月, 2020 1 次提交
  9. 04 3月, 2020 1 次提交
  10. 21 2月, 2020 1 次提交
  11. 19 2月, 2020 1 次提交
  12. 04 2月, 2020 2 次提交
  13. 27 1月, 2020 1 次提交
  14. 17 12月, 2019 1 次提交
    • H
      drm/i915: DSI: select correct PWM controller to use based on the VBT · b6941311
      Hans de Goede 提交于
      At least Bay Trail (BYT) and Cherry Trail (CHT) devices can use 1 of 2
      different PWM controllers for controlling the LCD's backlight brightness.
      Either the one integrated into the PMIC or the one integrated into the
      SoC (the 1st LPSS PWM controller).
      
      So far in the LPSS code on BYT we have skipped registering the LPSS PWM
      controller "pwm_backlight" lookup entry when a Crystal Cove PMIC is
      present, assuming that in this case the PMIC PWM controller will be used.
      
      On CHT we have been relying on only 1 of the 2 PWM controllers being
      enabled in the DSDT at the same time; and always registered the lookup.
      
      So far this has been working, but the correct way to determine which PWM
      controller needs to be used is by checking a bit in the VBT table and
      recently I've learned about 2 different BYT devices:
      Point of View MOBII TAB-P800W
      Acer Switch 10 SW5-012
      
      Which use a Crystal Cove PMIC, yet the LCD is connected to the SoC/LPSS
      PWM controller (and the VBT correctly indicates this), so here our old
      heuristics fail.
      
      This commit fixes using the wrong PWM controller on these devices by
      calling pwm_get() for the right PWM controller based on the
      VBT dsi.config.pwm_blc bit.
      
      Note this is part of a series which contains 2 other patches which renames
      the PWM lookup for the 1st SoC/LPSS PWM from "pwm_backlight" to
      "pwm_pmic_backlight" and the PWM lookup for the Crystal Cove PMIC PWM
      from "pwm_backlight" to "pwm_pmic_backlight".
      Acked-by: NJani Nikula <jani.nikula@intel.com>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191216202906.1662893-4-hdegoede@redhat.com
      b6941311
  15. 01 11月, 2019 2 次提交
  16. 07 8月, 2019 1 次提交
  17. 17 6月, 2019 1 次提交
  18. 14 6月, 2019 1 次提交
  19. 30 4月, 2019 2 次提交
  20. 08 4月, 2019 2 次提交
  21. 23 3月, 2019 5 次提交
  22. 14 3月, 2019 1 次提交
  23. 24 1月, 2019 2 次提交
  24. 15 1月, 2019 3 次提交
  25. 13 12月, 2018 1 次提交