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. 04 9月, 2020 4 次提交
  3. 03 9月, 2020 1 次提交
  4. 01 9月, 2020 17 次提交
  5. 29 8月, 2020 5 次提交
  6. 28 8月, 2020 3 次提交
  7. 27 8月, 2020 2 次提交
  8. 26 8月, 2020 2 次提交
  9. 25 8月, 2020 1 次提交
  10. 21 8月, 2020 1 次提交
  11. 20 8月, 2020 1 次提交
  12. 18 8月, 2020 1 次提交