diff options
| author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-04-22 17:07:23 +0200 | 
|---|---|---|
| committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-04-23 13:52:57 +0200 | 
| commit | ae4edb8089df67d25fbd9386012a335a64aca287 (patch) | |
| tree | e220d7ae390df3f2e0726cf109b38f8628ebbcf6 /drivers/gpu/drm/i915/intel_hdmi.c | |
| parent | e4bfff54ed3f5de88f5358504c78c2cb037813aa (diff) | |
| download | olio-linux-3.10-ae4edb8089df67d25fbd9386012a335a64aca287.tar.xz olio-linux-3.10-ae4edb8089df67d25fbd9386012a335a64aca287.zip  | |
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/i915/intel_hdmi.c')
| -rw-r--r-- | drivers/gpu/drm/i915/intel_hdmi.c | 8 | 
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index 3e6a3ef10d5..a9057930f2b 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,  	}  	if (property == dev_priv->broadcast_rgb_property) { +		bool old_auto = intel_hdmi->color_range_auto; +		uint32_t old_range = intel_hdmi->color_range; +  		switch (val) {  		case INTEL_BROADCAST_RGB_AUTO:  			intel_hdmi->color_range_auto = true; @@ -935,6 +938,11 @@ intel_hdmi_set_property(struct drm_connector *connector,  		default:  			return -EINVAL;  		} + +		if (old_auto == intel_hdmi->color_range_auto && +		    old_range == intel_hdmi->color_range) +			return 0; +  		goto done;  	}  |