drm: Add more standard TV properties.
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 12 Aug 2009 00:30:10 +0000 (02:30 +0200)
committerDave Airlie <airlied@redhat.com>
Thu, 13 Aug 2009 00:33:48 +0000 (10:33 +1000)
Overscan, saturation, hue. Used in the nouveau driver for GPUs with
integrated TV encoders.

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 a8c831134fc33a7ae9088e72ef8495c262b95ab1..362a538cdedc053d4a6cea08dc6eaba5c61b5eba 100644 (file)
@@ -736,6 +736,24 @@ int drm_mode_create_tv_properties(struct drm_device *dev, int num_modes,
        dev->mode_config.tv_flicker_reduction_property->values[0] = 0;
        dev->mode_config.tv_flicker_reduction_property->values[1] = 100;
 
+       dev->mode_config.tv_overscan_property =
+               drm_property_create(dev, DRM_MODE_PROP_RANGE,
+                                   "overscan", 2);
+       dev->mode_config.tv_overscan_property->values[0] = 0;
+       dev->mode_config.tv_overscan_property->values[1] = 100;
+
+       dev->mode_config.tv_saturation_property =
+               drm_property_create(dev, DRM_MODE_PROP_RANGE,
+                                   "saturation", 2);
+       dev->mode_config.tv_saturation_property->values[0] = 0;
+       dev->mode_config.tv_saturation_property->values[1] = 100;
+
+       dev->mode_config.tv_hue_property =
+               drm_property_create(dev, DRM_MODE_PROP_RANGE,
+                                   "hue", 2);
+       dev->mode_config.tv_hue_property->values[0] = 0;
+       dev->mode_config.tv_hue_property->values[1] = 100;
+
        return 0;
 }
 EXPORT_SYMBOL(drm_mode_create_tv_properties);
index 5f2cc0ca4c7d21c886fe2495610d864880296bd2..db92a83f8ca96d147680da9de870ca0bbbe43ee8 100644 (file)
@@ -575,6 +575,9 @@ struct drm_mode_config {
        struct drm_property *tv_brightness_property;
        struct drm_property *tv_contrast_property;
        struct drm_property *tv_flicker_reduction_property;
+       struct drm_property *tv_overscan_property;
+       struct drm_property *tv_saturation_property;
+       struct drm_property *tv_hue_property;
 
        /* Optional properties */
        struct drm_property *scaling_mode_property;