diff options
| author | Rajat Jain <[email protected]> | 2021-10-05 20:23:13 +0000 |
|---|---|---|
| committer | Hans de Goede <[email protected]> | 2021-10-14 11:12:20 +0000 |
| commit | 107fe904302092c683cf5462b4af3cb3cfa40998 (patch) | |
| tree | 5acbd1645cc23187a00bca0c15a50587b0b132e8 /drivers/gpu/drm/drm_atomic_uapi.c | |
| parent | fbdev: Garbage collect fbdev scrolling acceleration, part 1 (from TODO list) (diff) | |
| download | kernel-107fe904302092c683cf5462b4af3cb3cfa40998.tar.gz kernel-107fe904302092c683cf5462b4af3cb3cfa40998.zip | |
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 <[email protected]>
Acked-by: Pekka Paalanen <[email protected]>
Reviewed-by: Mario Limonciello <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Lyude Paul <[email protected]>
Co-developed-by: Hans de Goede <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/drm_atomic_uapi.c')
| -rw-r--r-- | drivers/gpu/drm/drm_atomic_uapi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index 909f31833181..cdd31fc78bfc 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -797,6 +797,8 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector, fence_ptr); } else if (property == connector->max_bpc_property) { state->max_requested_bpc = val; + } else if (property == connector->privacy_screen_sw_state_property) { + state->privacy_screen_sw_state = val; } else if (connector->funcs->atomic_set_property) { return connector->funcs->atomic_set_property(connector, state, property, val); @@ -874,6 +876,8 @@ drm_atomic_connector_get_property(struct drm_connector *connector, *val = 0; } else if (property == connector->max_bpc_property) { *val = state->max_requested_bpc; + } else if (property == connector->privacy_screen_sw_state_property) { + *val = state->privacy_screen_sw_state; } else if (connector->funcs->atomic_get_property) { return connector->funcs->atomic_get_property(connector, state, property, val); |
