1. 18 Sep, 2022 2 commits
    • Hans de Goede's avatar
      drm/gma500: Change registered backlight device type to raw/native · dec4ddbe
      Hans de Goede authored
      Change the type for the registered backlight class device from platform
      to raw/native.
      
      The poulsbo/cedarview/oaktrail backlight support is using native GPU
      backlight control and as such the type should be raw (aka native) as
      is done by all the other native GPU backlight driver code.
      
      Note this will not change much from userspace's point of view.
      poulsbo/cedarview laptops typically offer both an ACPI-video
      backlight interface as well as the native GPU backlight interface.
      
      The /sys/class/backlight/acpi_video0 has a type of firmware and
      userspace typically looks for firmware devices before looking
      for platform devices. The typical standard lookup order is:
      firmware -> platform -> raw
      
      This means that both before and after this change typical userspace
      backlight consumers (sich as e.g. GNOME) will prefer the firmware
      acpi_video0 backlight device.
      
      This has been tested on a Packard Bell Dot SC (Intel Atom N2600, cedarview)
      and a Sony Vaio vpc-x11s1e (Intel N540, poulsbo) laptop.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Acked-by: default avatarPatrik Jakobsson <patrik.r.jakobsson@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220917205920.647212-3-hdegoede@redhat.com
      dec4ddbe
    • Hans de Goede's avatar
      drm/gma500: Refactor backlight support (v2) · 1f90b123
      Hans de Goede authored
      Refactor backlight support so that the gma_backlight_enable() /
      gma_backlight_disable() / gma_backlight_set() functions used by
      the Opregion handle will also work if no backlight_device gets
      registered.
      
      This is a preparation patch for not registering the gma500's own backlight
      device when acpi_video should be used, since registering 2 backlight
      devices for a single display really is undesirable.
      
      Since the acpi-video interface often uses the OpRegion we need to keep
      the OpRegion functional even when dev_priv->backlight_device is NULL.
      
      As a result of this refactor the actual backlight_device_register()
      call is moved to the shared backlight.c code and all #ifdefs related to
      CONFIG_BACKLIGHT_CLASS_DEVICE are now also limited to backlight.c .
      
      No functional changes intended.
      
      This has been tested on a Packard Bell Dot SC (Intel Atom N2600, cedarview)
      and a Sony Vaio vpc-x11s1e (Intel N540, poulsbo) laptop.
      
      Changes in v2:
      - Fix unused variable warnings when CONFIG_BACKLIGHT is not selected by
        marking the 2 variables as  __maybe_unused.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Acked-by: default avatarPatrik Jakobsson <patrik.r.jakobsson@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220917205920.647212-2-hdegoede@redhat.com
      1f90b123
  2. 17 Sep, 2022 9 commits
  3. 16 Sep, 2022 6 commits
  4. 15 Sep, 2022 3 commits
  5. 14 Sep, 2022 4 commits
  6. 13 Sep, 2022 15 commits
  7. 12 Sep, 2022 1 commit