drm/connector: Add support for privacy-screen properties (v4)
authorRajat Jain <rajatja@google.com>
Tue, 5 Oct 2021 20:23:13 +0000 (22:23 +0200)
committerHans de Goede <hdegoede@redhat.com>
Thu, 14 Oct 2021 11:12:20 +0000 (13:12 +0200)
commit107fe904302092c683cf5462b4af3cb3cfa40998
tree5acbd1645cc23187a00bca0c15a50587b0b132e8
parentb3ec8cdf457e5e63d396fe1346cc788cf7c1b578
drm/connector: Add support for privacy-screen properties (v4)

Add support for generic electronic privacy screen properties, that
can be added by systems that have an integrated EPS.

Changes in v2 (Hans de Goede)
- Create 2 properties, "privacy-screen sw-state" and
  "privacy-screen hw-state", to deal with devices where the OS might be
  locked out of making state changes
- Write kerneldoc explaining how the 2 properties work together, what
  happens when changes to the state are made outside of the DRM code's
  control, etc.

Changes in v3 (Hans de Goede)
- Some small tweaks to the kerneldoc describing the 2 properties

Changes in v4 (Hans de Goede)
- Change the "Enabled, locked" and "Disabled, locked" hw-state enum value
  names to "Enabled-locked" and "Disabled-locked". The xrandr command shows
  all possible enum values separated by commas in its output, so having a
  comma in an enum name is not a good idea.
- Do not add a privacy_screen_hw_state member to drm_connector_state
  since this property is immutable its value must be directly stored in the
  obj->properties->values array

Signed-off-by: Rajat Jain <rajatja@google.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Reviewed-by: Mario Limonciello <Mario.limonciello@dell.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Co-developed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211005202322.700909-2-hdegoede@redhat.com
Documentation/gpu/drm-kms.rst
drivers/gpu/drm/drm_atomic_uapi.c
drivers/gpu/drm/drm_connector.c
include/drm/drm_connector.h