diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-08-04 08:50:29 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-08-09 14:24:29 -0400 |
commit | e044218a8ecb560b6fad65912a4e7e509db40414 (patch) | |
tree | db1ade3dedc4a2dd20662e6150eb2361e4a775b8 | |
parent | c55217064eb728fc9348de781979b533e7cc116c (diff) |
drm/i915/sdvo: Add dot crawl property
This property is slightly unusual in that it is a boolean and so has no
GET_MAX command.
Reference:
Bug 28636 - missing TV parameter "Dot Crawl freeze"
https://bugs.freedesktop.org/show_bug.cgi?id=28636
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
-rw-r--r-- | drivers/gpu/drm/i915/intel_sdvo.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 2344fb056793..1e31724d1616 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c | |||
@@ -161,6 +161,7 @@ struct intel_sdvo_connector { | |||
161 | struct drm_property *flicker_filter_2d; | 161 | struct drm_property *flicker_filter_2d; |
162 | struct drm_property *tv_chroma_filter; | 162 | struct drm_property *tv_chroma_filter; |
163 | struct drm_property *tv_luma_filter; | 163 | struct drm_property *tv_luma_filter; |
164 | struct drm_property *dot_crawl; | ||
164 | 165 | ||
165 | /* add the property for the SDVO-TV/LVDS */ | 166 | /* add the property for the SDVO-TV/LVDS */ |
166 | struct drm_property *brightness; | 167 | struct drm_property *brightness; |
@@ -182,6 +183,7 @@ struct intel_sdvo_connector { | |||
182 | u32 cur_flicker_filter_2d, max_flicker_filter_2d; | 183 | u32 cur_flicker_filter_2d, max_flicker_filter_2d; |
183 | u32 cur_tv_chroma_filter, max_tv_chroma_filter; | 184 | u32 cur_tv_chroma_filter, max_tv_chroma_filter; |
184 | u32 cur_tv_luma_filter, max_tv_luma_filter; | 185 | u32 cur_tv_luma_filter, max_tv_luma_filter; |
186 | u32 cur_dot_crawl, max_dot_crawl; | ||
185 | }; | 187 | }; |
186 | 188 | ||
187 | static struct intel_sdvo *enc_to_intel_sdvo(struct drm_encoder *encoder) | 189 | static struct intel_sdvo *enc_to_intel_sdvo(struct drm_encoder *encoder) |
@@ -1751,6 +1753,8 @@ intel_sdvo_destroy_enhance_property(struct drm_connector *connector) | |||
1751 | drm_property_destroy(dev, intel_sdvo_connector->tv_luma_filter); | 1753 | drm_property_destroy(dev, intel_sdvo_connector->tv_luma_filter); |
1752 | if (intel_sdvo_connector->tv_chroma_filter) | 1754 | if (intel_sdvo_connector->tv_chroma_filter) |
1753 | drm_property_destroy(dev, intel_sdvo_connector->tv_chroma_filter); | 1755 | drm_property_destroy(dev, intel_sdvo_connector->tv_chroma_filter); |
1756 | if (intel_sdvo_connector->dot_crawl) | ||
1757 | drm_property_destroy(dev, intel_sdvo_connector->dot_crawl); | ||
1754 | if (intel_sdvo_connector->brightness) | 1758 | if (intel_sdvo_connector->brightness) |
1755 | drm_property_destroy(dev, intel_sdvo_connector->brightness); | 1759 | drm_property_destroy(dev, intel_sdvo_connector->brightness); |
1756 | } | 1760 | } |
@@ -1867,6 +1871,7 @@ intel_sdvo_set_property(struct drm_connector *connector, | |||
1867 | CHECK_PROPERTY(flicker_filter_adaptive, FLICKER_FILTER_ADAPTIVE) | 1871 | CHECK_PROPERTY(flicker_filter_adaptive, FLICKER_FILTER_ADAPTIVE) |
1868 | CHECK_PROPERTY(tv_chroma_filter, TV_CHROMA_FILTER) | 1872 | CHECK_PROPERTY(tv_chroma_filter, TV_CHROMA_FILTER) |
1869 | CHECK_PROPERTY(tv_luma_filter, TV_LUMA_FILTER) | 1873 | CHECK_PROPERTY(tv_luma_filter, TV_LUMA_FILTER) |
1874 | CHECK_PROPERTY(dot_crawl, DOT_CRAWL) | ||
1870 | } | 1875 | } |
1871 | 1876 | ||
1872 | return -EINVAL; /* unknown property */ | 1877 | return -EINVAL; /* unknown property */ |
@@ -2439,6 +2444,25 @@ intel_sdvo_create_enhance_property_tv(struct intel_sdvo *intel_sdvo, | |||
2439 | ENHANCEMENT(tv_chroma_filter, TV_CHROMA_FILTER); | 2444 | ENHANCEMENT(tv_chroma_filter, TV_CHROMA_FILTER); |
2440 | ENHANCEMENT(tv_luma_filter, TV_LUMA_FILTER); | 2445 | ENHANCEMENT(tv_luma_filter, TV_LUMA_FILTER); |
2441 | 2446 | ||
2447 | if (enhancements.dot_crawl) { | ||
2448 | if (!intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_DOT_CRAWL, &response, 2)) | ||
2449 | return false; | ||
2450 | |||
2451 | intel_sdvo_connector->max_dot_crawl = 1; | ||
2452 | intel_sdvo_connector->cur_dot_crawl = response & 0x1; | ||
2453 | intel_sdvo_connector->dot_crawl = | ||
2454 | drm_property_create(dev, DRM_MODE_PROP_RANGE, "dot_crawl", 2); | ||
2455 | if (!intel_sdvo_connector->dot_crawl) | ||
2456 | return false; | ||
2457 | |||
2458 | intel_sdvo_connector->dot_crawl->values[0] = 0; | ||
2459 | intel_sdvo_connector->dot_crawl->values[1] = 1; | ||
2460 | drm_connector_attach_property(connector, | ||
2461 | intel_sdvo_connector->dot_crawl, | ||
2462 | intel_sdvo_connector->cur_dot_crawl); | ||
2463 | DRM_DEBUG_KMS("dot crawl: current %d\n", response); | ||
2464 | } | ||
2465 | |||
2442 | return true; | 2466 | return true; |
2443 | } | 2467 | } |
2444 | 2468 | ||