Skip to content

Commit b6b242d

Browse files
Revert "drm: Introduce 'power saving policy' drm property"
This reverts commit 76299a5. It was merged without meeting userspace requirements. Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240802145946.48073-1-hamza.mahfooz@amd.com
1 parent d97e71e commit b6b242d

4 files changed

Lines changed: 0 additions & 62 deletions

File tree

drivers/gpu/drm/drm_connector.c

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,11 +1043,6 @@ static const struct drm_prop_enum_list drm_scaling_mode_enum_list[] = {
10431043
{ DRM_MODE_SCALE_ASPECT, "Full aspect" },
10441044
};
10451045

1046-
static const struct drm_prop_enum_list drm_power_saving_policy_enum_list[] = {
1047-
{ __builtin_ffs(DRM_MODE_REQUIRE_COLOR_ACCURACY) - 1, "Require color accuracy" },
1048-
{ __builtin_ffs(DRM_MODE_REQUIRE_LOW_LATENCY) - 1, "Require low latency" },
1049-
};
1050-
10511046
static const struct drm_prop_enum_list drm_aspect_ratio_enum_list[] = {
10521047
{ DRM_MODE_PICTURE_ASPECT_NONE, "Automatic" },
10531048
{ DRM_MODE_PICTURE_ASPECT_4_3, "4:3" },
@@ -1634,16 +1629,6 @@ EXPORT_SYMBOL(drm_hdmi_connector_get_output_format_name);
16341629
*
16351630
* Drivers can set up these properties by calling
16361631
* drm_mode_create_tv_margin_properties().
1637-
* power saving policy:
1638-
* This property is used to set the power saving policy for the connector.
1639-
* This property is populated with a bitmask of optional requirements set
1640-
* by the drm master for the drm driver to respect:
1641-
* - "Require color accuracy": Disable power saving features that will
1642-
* affect color fidelity.
1643-
* For example: Hardware assisted backlight modulation.
1644-
* - "Require low latency": Disable power saving features that will
1645-
* affect latency.
1646-
* For example: Panel self refresh (PSR)
16471632
*/
16481633

16491634
int drm_connector_create_standard_properties(struct drm_device *dev)
@@ -2146,39 +2131,6 @@ int drm_mode_create_scaling_mode_property(struct drm_device *dev)
21462131
}
21472132
EXPORT_SYMBOL(drm_mode_create_scaling_mode_property);
21482133

2149-
/**
2150-
* drm_mode_create_power_saving_policy_property - create power saving policy property
2151-
* @dev: DRM device
2152-
* @supported_policies: bitmask of supported power saving policies
2153-
*
2154-
* Called by a driver the first time it's needed, must be attached to desired
2155-
* connectors.
2156-
*
2157-
* Returns: %0
2158-
*/
2159-
int drm_mode_create_power_saving_policy_property(struct drm_device *dev,
2160-
uint64_t supported_policies)
2161-
{
2162-
struct drm_property *power_saving;
2163-
2164-
if (dev->mode_config.power_saving_policy)
2165-
return 0;
2166-
WARN_ON((supported_policies & DRM_MODE_POWER_SAVING_POLICY_ALL) == 0);
2167-
2168-
power_saving =
2169-
drm_property_create_bitmask(dev, 0, "power saving policy",
2170-
drm_power_saving_policy_enum_list,
2171-
ARRAY_SIZE(drm_power_saving_policy_enum_list),
2172-
supported_policies);
2173-
if (!power_saving)
2174-
return -ENOMEM;
2175-
2176-
dev->mode_config.power_saving_policy = power_saving;
2177-
2178-
return 0;
2179-
}
2180-
EXPORT_SYMBOL(drm_mode_create_power_saving_policy_property);
2181-
21822134
/**
21832135
* DOC: Variable refresh properties
21842136
*

include/drm/drm_connector.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2267,8 +2267,6 @@ int drm_mode_create_dp_colorspace_property(struct drm_connector *connector,
22672267
u32 supported_colorspaces);
22682268
int drm_mode_create_content_type_property(struct drm_device *dev);
22692269
int drm_mode_create_suggested_offset_properties(struct drm_device *dev);
2270-
int drm_mode_create_power_saving_policy_property(struct drm_device *dev,
2271-
uint64_t supported_policies);
22722270

22732271
int drm_connector_set_path_property(struct drm_connector *connector,
22742272
const char *path);

include/drm/drm_mode_config.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -969,11 +969,6 @@ struct drm_mode_config {
969969
*/
970970
struct drm_atomic_state *suspend_state;
971971

972-
/**
973-
* @power_saving_policy: bitmask for power saving policy requests.
974-
*/
975-
struct drm_property *power_saving_policy;
976-
977972
const struct drm_mode_config_helper_funcs *helper_private;
978973
};
979974

include/uapi/drm/drm_mode.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,6 @@ extern "C" {
152152
#define DRM_MODE_SCALE_CENTER 2 /* Centered, no scaling */
153153
#define DRM_MODE_SCALE_ASPECT 3 /* Full screen, preserve aspect */
154154

155-
/* power saving policy options */
156-
#define DRM_MODE_REQUIRE_COLOR_ACCURACY BIT(0) /* Compositor requires color accuracy */
157-
#define DRM_MODE_REQUIRE_LOW_LATENCY BIT(1) /* Compositor requires low latency */
158-
159-
#define DRM_MODE_POWER_SAVING_POLICY_ALL (DRM_MODE_REQUIRE_COLOR_ACCURACY |\
160-
DRM_MODE_REQUIRE_LOW_LATENCY)
161-
162155
/* Dithering mode options */
163156
#define DRM_MODE_DITHERING_OFF 0
164157
#define DRM_MODE_DITHERING_ON 1

0 commit comments

Comments
 (0)