Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6b7902e authored by Francisco Jerez's avatar Francisco Jerez Committed by Dave Airlie
Browse files

drm: Define some new standard TV properties.



Namely "brightness", "contrast" and "flicker reduction".

Signed-off-by: default avatarFrancisco Jerez <currojerez@riseup.net>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent aeaa1ad3
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -718,6 +718,24 @@ int drm_mode_create_tv_properties(struct drm_device *dev, int num_modes,
		drm_property_add_enum(dev->mode_config.tv_mode_property, i,
				      i, modes[i]);

	dev->mode_config.tv_brightness_property =
		drm_property_create(dev, DRM_MODE_PROP_RANGE,
				    "brightness", 2);
	dev->mode_config.tv_brightness_property->values[0] = 0;
	dev->mode_config.tv_brightness_property->values[1] = 100;

	dev->mode_config.tv_contrast_property =
		drm_property_create(dev, DRM_MODE_PROP_RANGE,
				    "contrast", 2);
	dev->mode_config.tv_contrast_property->values[0] = 0;
	dev->mode_config.tv_contrast_property->values[1] = 100;

	dev->mode_config.tv_flicker_reduction_property =
		drm_property_create(dev, DRM_MODE_PROP_RANGE,
				    "flicker reduction", 2);
	dev->mode_config.tv_flicker_reduction_property->values[0] = 0;
	dev->mode_config.tv_flicker_reduction_property->values[1] = 100;

	return 0;
}
EXPORT_SYMBOL(drm_mode_create_tv_properties);
+3 −0
Original line number Diff line number Diff line
@@ -572,6 +572,9 @@ struct drm_mode_config {
	struct drm_property *tv_right_margin_property;
	struct drm_property *tv_top_margin_property;
	struct drm_property *tv_bottom_margin_property;
	struct drm_property *tv_brightness_property;
	struct drm_property *tv_contrast_property;
	struct drm_property *tv_flicker_reduction_property;

	/* Optional properties */
	struct drm_property *scaling_mode_property;