aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-04-22 11:07:23 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-04-23 07:52:57 -0400
commitae4edb8089df67d25fbd9386012a335a64aca287 (patch)
treee220d7ae390df3f2e0726cf109b38f8628ebbcf6 /drivers/gpu/drm
parente4bfff54ed3f5de88f5358504c78c2cb037813aa (diff)
drm/i915: avoid full modeset when changing the color range properties
Automatic color range selection was added in commit 55bc60db5988c8366751d3d04dd690698a53412c Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Jan 17 16:31:29 2013 +0200 drm/i915: Add "Automatic" mode for the "Broadcast RGB" property but that removed the check to avoid a full modeset if the value is unchanged. Unfortunately X sets all properties with their current value at start-up, resulting in some ugly flickering which shouldn't be there. v2: Change old_range from bool to uint32_t, spotted by Ville. v3: Actually git add everything ;-) Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c8
-rw-r--r--drivers/gpu/drm/i915/intel_hdmi.c8
-rw-r--r--drivers/gpu/drm/i915/intel_sdvo.c8
3 files changed, 24 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 89f89b727900..fc3bd9b4037c 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2428,6 +2428,9 @@ intel_dp_set_property(struct drm_connector *connector,
2428 } 2428 }
2429 2429
2430 if (property == dev_priv->broadcast_rgb_property) { 2430 if (property == dev_priv->broadcast_rgb_property) {
2431 bool old_auto = intel_dp->color_range_auto;
2432 uint32_t old_range = intel_dp->color_range;
2433
2431 switch (val) { 2434 switch (val) {
2432 case INTEL_BROADCAST_RGB_AUTO: 2435 case INTEL_BROADCAST_RGB_AUTO:
2433 intel_dp->color_range_auto = true; 2436 intel_dp->color_range_auto = true;
@@ -2443,6 +2446,11 @@ intel_dp_set_property(struct drm_connector *connector,
2443 default: 2446 default:
2444 return -EINVAL; 2447 return -EINVAL;
2445 } 2448 }
2449
2450 if (old_auto == intel_dp->color_range_auto &&
2451 old_range == intel_dp->color_range)
2452 return 0;
2453
2446 goto done; 2454 goto done;
2447 } 2455 }
2448 2456
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 3e6a3ef10d5c..a9057930f2b2 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -920,6 +920,9 @@ intel_hdmi_set_property(struct drm_connector *connector,
920 } 920 }
921 921
922 if (property == dev_priv->broadcast_rgb_property) { 922 if (property == dev_priv->broadcast_rgb_property) {
923 bool old_auto = intel_hdmi->color_range_auto;
924 uint32_t old_range = intel_hdmi->color_range;
925
923 switch (val) { 926 switch (val) {
924 case INTEL_BROADCAST_RGB_AUTO: 927 case INTEL_BROADCAST_RGB_AUTO:
925 intel_hdmi->color_range_auto = true; 928 intel_hdmi->color_range_auto = true;
@@ -935,6 +938,11 @@ intel_hdmi_set_property(struct drm_connector *connector,
935 default: 938 default:
936 return -EINVAL; 939 return -EINVAL;
937 } 940 }
941
942 if (old_auto == intel_hdmi->color_range_auto &&
943 old_range == intel_hdmi->color_range)
944 return 0;
945
938 goto done; 946 goto done;
939 } 947 }
940 948
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index a618a6a45a77..d15428404b9a 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1930,6 +1930,9 @@ intel_sdvo_set_property(struct drm_connector *connector,
1930 } 1930 }
1931 1931
1932 if (property == dev_priv->broadcast_rgb_property) { 1932 if (property == dev_priv->broadcast_rgb_property) {
1933 bool old_auto = intel_sdvo->color_range_auto;
1934 uint32_t old_range = intel_sdvo->color_range;
1935
1933 switch (val) { 1936 switch (val) {
1934 case INTEL_BROADCAST_RGB_AUTO: 1937 case INTEL_BROADCAST_RGB_AUTO:
1935 intel_sdvo->color_range_auto = true; 1938 intel_sdvo->color_range_auto = true;
@@ -1947,6 +1950,11 @@ intel_sdvo_set_property(struct drm_connector *connector,
1947 default: 1950 default:
1948 return -EINVAL; 1951 return -EINVAL;
1949 } 1952 }
1953
1954 if (old_auto == intel_sdvo->color_range_auto &&
1955 old_range == intel_sdvo->color_range)
1956 return 0;
1957
1950 goto done; 1958 goto done;
1951 } 1959 }
1952 1960