drm: Define some new standard TV properties.
authorFrancisco Jerez <currojerez@riseup.net>
Sun, 2 Aug 2009 02:19:20 +0000 (04:19 +0200)
committerDave Airlie <airlied@redhat.com>
Tue, 4 Aug 2009 04:14:46 +0000 (14:14 +1000)
Namely "brightness", "contrast" and "flicker reduction".

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_crtc.c
include/drm/drm_crtc.h

index ed53c5c37ac41b5a80bea2006df78ed4360dad25..a8c831134fc33a7ae9088e72ef8495c262b95ab1 100644 (file)
@@ -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);
index 125994d8ac0b3a212e5df82d30e88f0eb1603932..5f2cc0ca4c7d21c886fe2495610d864880296bd2 100644 (file)
@@ -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;