1. 03 9月, 2022 1 次提交
    • H
      drm/amdgpu: Register ACPI video backlight when skipping amdgpu backlight registration · c0f50c5d
      Hans de Goede 提交于
      Typically the acpi_video driver will initialize before amdgpu, which
      used to cause /sys/class/backlight/acpi_video0 to get registered and then
      amdgpu would register its own amdgpu_bl# device later. After which
      the drivers/acpi/video_detect.c code unregistered the acpi_video0 device
      to avoid there being 2 backlight devices.
      
      This means that userspace used to briefly see 2 devices and the
      disappearing of acpi_video0 after a brief time confuses the systemd
      backlight level save/restore code, see e.g.:
      https://bbs.archlinux.org/viewtopic.php?id=269920
      
      To fix this the ACPI video code has been modified to make backlight class
      device registration a separate step, relying on the drm/kms driver to
      ask for the acpi_video backlight registration after it is done setting up
      its native backlight device.
      
      Add a call to the new acpi_video_register_backlight() when amdgpu skips
      registering its own backlight device because of either the firmware_flags
      or the acpi_video_get_backlight_type() return value. This ensures that
      if the acpi_video backlight device should be used, it will be available
      before the amdgpu drm_device gets registered with userspace.
      Acked-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      c0f50c5d
  2. 25 8月, 2022 1 次提交
    • H
      drm/amdgpu: Don't register backlight when another backlight should be used (v3) · da11ef83
      Hans de Goede 提交于
      Before this commit when we want userspace to use the acpi_video backlight
      device we register both the GPU's native backlight device and acpi_video's
      firmware acpi_video# backlight device. This relies on userspace preferring
      firmware type backlight devices over native ones.
      
      Registering 2 backlight devices for a single display really is
      undesirable, don't register the GPU's native backlight device when
      another backlight device should be used.
      
      Changes in v2:
      - To avoid linker errors when amdgpu is builtin and video_detect.c is in
        a module, select ACPI_VIDEO and its deps if ACPI is enabled.
        When ACPI is disabled, ACPI_VIDEO is also always disabled, ensuring
        the stubs from acpi/video.h will be used.
      
      Changes in v3:
      - Use drm_info(drm_dev, "...") to log messages
      - ACPI_VIDEO can now be enabled on non X86 too,
        adjust the Kconfig changes to match this.
      Acked-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      da11ef83
  3. 25 7月, 2022 4 次提交
  4. 21 7月, 2022 1 次提交
  5. 15 7月, 2022 1 次提交
  6. 14 7月, 2022 5 次提交
  7. 13 7月, 2022 5 次提交
  8. 08 7月, 2022 1 次提交
  9. 07 7月, 2022 1 次提交
  10. 06 7月, 2022 4 次提交
  11. 30 6月, 2022 2 次提交
  12. 24 6月, 2022 2 次提交
  13. 22 6月, 2022 5 次提交
  14. 21 6月, 2022 2 次提交
  15. 16 6月, 2022 1 次提交
  16. 15 6月, 2022 3 次提交
  17. 08 6月, 2022 1 次提交