]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
drm: add "auto" dithering method
authorBen Skeggs <bskeggs@redhat.com>
Fri, 16 Jul 2010 05:09:17 +0000 (15:09 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 21 Jul 2010 01:19:45 +0000 (11:19 +1000)
There's no convenient/reliable way for drivers to both obey the dithering
mode property, and to be able to attempt to provide a good default in all
cases.

This commit adds an "auto" method to the property which drivers can default
to if they wish, whilst still allowing the user to override the choice as
they do now.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_crtc.c
include/drm/drm_mode.h

index b5802cf6664ef863b33a13c1ec9ac7d3cd45925b..d8d65f4232a9c3694ceaff7f5f5bafe9a6af605b 100644 (file)
@@ -80,6 +80,7 @@ static struct drm_prop_enum_list drm_dithering_mode_enum_list[] =
 {
        { DRM_MODE_DITHERING_OFF, "Off" },
        { DRM_MODE_DITHERING_ON, "On" },
+       { DRM_MODE_DITHERING_AUTO, "Automatic" },
 };
 
 /*
index c5ba1636613c0baac637fb169b28a17fb6a08aa0..0fc7397c8f1f4c3f6f9ab454c5f66343c6b3b949 100644 (file)
@@ -74,6 +74,7 @@
 /* Dithering mode options */
 #define DRM_MODE_DITHERING_OFF 0
 #define DRM_MODE_DITHERING_ON  1
+#define DRM_MODE_DITHERING_AUTO 2
 
 /* Dirty info options */
 #define DRM_MODE_DIRTY_OFF      0