All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: avoid full modeset when changing the color range properties
@ 2013-04-19 15:26 Daniel Vetter
  2013-04-22 11:24 ` Ville Syrjälä
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2013-04-19 15:26 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Paulo Zanoni

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.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_dp.c   | 8 ++++++++
 drivers/gpu/drm/i915/intel_hdmi.c | 8 ++++++++
 drivers/gpu/drm/i915/intel_sdvo.c | 8 ++++++++
 3 files changed, 24 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 50a9d9f..be529da 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2666,6 +2666,9 @@ intel_dp_set_property(struct drm_connector *connector,
 	}
 
 	if (property == dev_priv->broadcast_rgb_property) {
+		bool old_auto = intel_dp->color_range_auto;
+		bool old_range = intel_dp->color_range;
+
 		switch (val) {
 		case INTEL_BROADCAST_RGB_AUTO:
 			intel_dp->color_range_auto = true;
@@ -2681,6 +2684,11 @@ intel_dp_set_property(struct drm_connector *connector,
 		default:
 			return -EINVAL;
 		}
+
+		if (old_auto == intel_dp->color_range_auto &&
+		    old_range == intel_dp->color_range)
+			return 0;
+
 		goto done;
 	}
 
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 3942041..40d5812 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -947,6 +947,9 @@ intel_hdmi_set_property(struct drm_connector *connector,
 	}
 
 	if (property == dev_priv->broadcast_rgb_property) {
+		bool old_auto = intel_hdmi->color_range_auto;
+		bool old_range = intel_hdmi->color_range;
+
 		switch (val) {
 		case INTEL_BROADCAST_RGB_AUTO:
 			intel_hdmi->color_range_auto = true;
@@ -962,6 +965,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;
 	}
 
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index a618a6a..c1f7e0a 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,
 	}
 
 	if (property == dev_priv->broadcast_rgb_property) {
+		bool old_auto = intel_sdvo->color_range_auto;
+		bool old_range = intel_sdvo->color_range;
+
 		switch (val) {
 		case INTEL_BROADCAST_RGB_AUTO:
 			intel_sdvo->color_range_auto = true;
@@ -1947,6 +1950,11 @@ intel_sdvo_set_property(struct drm_connector *connector,
 		default:
 			return -EINVAL;
 		}
+
+		if (old_auto == intel_sdvo->color_range_auto &&
+		    old_range == intel_sdvo->color_range)
+			return 0;
+
 		goto done;
 	}
 
-- 
1.7.11.7

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: avoid full modeset when changing the color range properties
  2013-04-19 15:26 [PATCH] drm/i915: avoid full modeset when changing the color range properties Daniel Vetter
@ 2013-04-22 11:24 ` Ville Syrjälä
  2013-04-22 15:06   ` Daniel Vetter
  2013-04-22 15:07   ` Daniel Vetter
  0 siblings, 2 replies; 6+ messages in thread
From: Ville Syrjälä @ 2013-04-22 11:24 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Intel Graphics Development, Paulo Zanoni

On Fri, Apr 19, 2013 at 05:26:27PM +0200, Daniel Vetter wrote:
> 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.

How silly of me to drop the unchanged check.

> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/i915/intel_dp.c   | 8 ++++++++
>  drivers/gpu/drm/i915/intel_hdmi.c | 8 ++++++++
>  drivers/gpu/drm/i915/intel_sdvo.c | 8 ++++++++
>  3 files changed, 24 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 50a9d9f..be529da 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -2666,6 +2666,9 @@ intel_dp_set_property(struct drm_connector *connector,
>  	}
>  
>  	if (property == dev_priv->broadcast_rgb_property) {
> +		bool old_auto = intel_dp->color_range_auto;
> +		bool old_range = intel_dp->color_range;

This looks like it shouldn't work.

We have these guys:
#define   HDMI_COLOR_RANGE_16_235               (1 << 8) /* HDMI only */
#define   DP_COLOR_RANGE_16_235         (1 << 8)

When assigned to bool they become true (== 1), and then that gets
promoted to uint32_t for the comparison below, so it will never match.

> +
>  		switch (val) {
>  		case INTEL_BROADCAST_RGB_AUTO:
>  			intel_dp->color_range_auto = true;
> @@ -2681,6 +2684,11 @@ intel_dp_set_property(struct drm_connector *connector,
>  		default:
>  			return -EINVAL;
>  		}
> +
> +		if (old_auto == intel_dp->color_range_auto &&
> +		    old_range == intel_dp->color_range)
> +			return 0;
> +
>  		goto done;
>  	}
>  
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 3942041..40d5812 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -947,6 +947,9 @@ intel_hdmi_set_property(struct drm_connector *connector,
>  	}
>  
>  	if (property == dev_priv->broadcast_rgb_property) {
> +		bool old_auto = intel_hdmi->color_range_auto;
> +		bool old_range = intel_hdmi->color_range;
> +
>  		switch (val) {
>  		case INTEL_BROADCAST_RGB_AUTO:
>  			intel_hdmi->color_range_auto = true;
> @@ -962,6 +965,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;
>  	}
>  
> diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
> index a618a6a..c1f7e0a 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,
>  	}
>  
>  	if (property == dev_priv->broadcast_rgb_property) {
> +		bool old_auto = intel_sdvo->color_range_auto;
> +		bool old_range = intel_sdvo->color_range;
> +
>  		switch (val) {
>  		case INTEL_BROADCAST_RGB_AUTO:
>  			intel_sdvo->color_range_auto = true;
> @@ -1947,6 +1950,11 @@ intel_sdvo_set_property(struct drm_connector *connector,
>  		default:
>  			return -EINVAL;
>  		}
> +
> +		if (old_auto == intel_sdvo->color_range_auto &&
> +		    old_range == intel_sdvo->color_range)
> +			return 0;
> +
>  		goto done;
>  	}
>  
> -- 
> 1.7.11.7

-- 
Ville Syrjälä
Intel OTC

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] drm/i915: avoid full modeset when changing the color range properties
  2013-04-22 11:24 ` Ville Syrjälä
@ 2013-04-22 15:06   ` Daniel Vetter
  2013-04-22 15:07   ` Daniel Vetter
  1 sibling, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2013-04-22 15:06 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Paulo Zanoni

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.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_dp.c   | 8 ++++++++
 drivers/gpu/drm/i915/intel_hdmi.c | 8 ++++++++
 drivers/gpu/drm/i915/intel_sdvo.c | 8 ++++++++
 3 files changed, 24 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 97edbb2..994a05d 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2649,6 +2649,9 @@ intel_dp_set_property(struct drm_connector *connector,
 	}
 
 	if (property == dev_priv->broadcast_rgb_property) {
+		bool old_auto = intel_dp->color_range_auto;
+		uint32_t old_range = intel_dp->color_range;
+
 		switch (val) {
 		case INTEL_BROADCAST_RGB_AUTO:
 			intel_dp->color_range_auto = true;
@@ -2664,6 +2667,11 @@ intel_dp_set_property(struct drm_connector *connector,
 		default:
 			return -EINVAL;
 		}
+
+		if (old_auto == intel_dp->color_range_auto &&
+		    old_range == intel_dp->color_range)
+			return 0;
+
 		goto done;
 	}
 
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 3942041..4dca486 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -947,6 +947,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;
@@ -962,6 +965,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;
 	}
 
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index a618a6a..c1f7e0a 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,
 	}
 
 	if (property == dev_priv->broadcast_rgb_property) {
+		bool old_auto = intel_sdvo->color_range_auto;
+		bool old_range = intel_sdvo->color_range;
+
 		switch (val) {
 		case INTEL_BROADCAST_RGB_AUTO:
 			intel_sdvo->color_range_auto = true;
@@ -1947,6 +1950,11 @@ intel_sdvo_set_property(struct drm_connector *connector,
 		default:
 			return -EINVAL;
 		}
+
+		if (old_auto == intel_sdvo->color_range_auto &&
+		    old_range == intel_sdvo->color_range)
+			return 0;
+
 		goto done;
 	}
 
-- 
1.7.11.7

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] drm/i915: avoid full modeset when changing the color range properties
  2013-04-22 11:24 ` Ville Syrjälä
  2013-04-22 15:06   ` Daniel Vetter
@ 2013-04-22 15:07   ` Daniel Vetter
  2013-04-23  9:13     ` Ville Syrjälä
  1 sibling, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2013-04-22 15:07 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Paulo Zanoni

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>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_dp.c   | 8 ++++++++
 drivers/gpu/drm/i915/intel_hdmi.c | 8 ++++++++
 drivers/gpu/drm/i915/intel_sdvo.c | 8 ++++++++
 3 files changed, 24 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 97edbb2..994a05d 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2649,6 +2649,9 @@ intel_dp_set_property(struct drm_connector *connector,
 	}
 
 	if (property == dev_priv->broadcast_rgb_property) {
+		bool old_auto = intel_dp->color_range_auto;
+		uint32_t old_range = intel_dp->color_range;
+
 		switch (val) {
 		case INTEL_BROADCAST_RGB_AUTO:
 			intel_dp->color_range_auto = true;
@@ -2664,6 +2667,11 @@ intel_dp_set_property(struct drm_connector *connector,
 		default:
 			return -EINVAL;
 		}
+
+		if (old_auto == intel_dp->color_range_auto &&
+		    old_range == intel_dp->color_range)
+			return 0;
+
 		goto done;
 	}
 
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 3942041..4dca486 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -947,6 +947,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;
@@ -962,6 +965,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;
 	}
 
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index a618a6a..d154284 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,
 	}
 
 	if (property == dev_priv->broadcast_rgb_property) {
+		bool old_auto = intel_sdvo->color_range_auto;
+		uint32_t old_range = intel_sdvo->color_range;
+
 		switch (val) {
 		case INTEL_BROADCAST_RGB_AUTO:
 			intel_sdvo->color_range_auto = true;
@@ -1947,6 +1950,11 @@ intel_sdvo_set_property(struct drm_connector *connector,
 		default:
 			return -EINVAL;
 		}
+
+		if (old_auto == intel_sdvo->color_range_auto &&
+		    old_range == intel_sdvo->color_range)
+			return 0;
+
 		goto done;
 	}
 
-- 
1.7.11.7

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: avoid full modeset when changing the color range properties
  2013-04-22 15:07   ` Daniel Vetter
@ 2013-04-23  9:13     ` Ville Syrjälä
  2013-04-23 11:53       ` Daniel Vetter
  0 siblings, 1 reply; 6+ messages in thread
From: Ville Syrjälä @ 2013-04-23  9:13 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Intel Graphics Development, Paulo Zanoni

On Mon, Apr 22, 2013 at 05:07:23PM +0200, Daniel Vetter wrote:
> 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>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/intel_dp.c   | 8 ++++++++
>  drivers/gpu/drm/i915/intel_hdmi.c | 8 ++++++++
>  drivers/gpu/drm/i915/intel_sdvo.c | 8 ++++++++
>  3 files changed, 24 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 97edbb2..994a05d 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -2649,6 +2649,9 @@ intel_dp_set_property(struct drm_connector *connector,
>  	}
>  
>  	if (property == dev_priv->broadcast_rgb_property) {
> +		bool old_auto = intel_dp->color_range_auto;
> +		uint32_t old_range = intel_dp->color_range;
> +
>  		switch (val) {
>  		case INTEL_BROADCAST_RGB_AUTO:
>  			intel_dp->color_range_auto = true;
> @@ -2664,6 +2667,11 @@ intel_dp_set_property(struct drm_connector *connector,
>  		default:
>  			return -EINVAL;
>  		}
> +
> +		if (old_auto == intel_dp->color_range_auto &&
> +		    old_range == intel_dp->color_range)
> +			return 0;
> +
>  		goto done;
>  	}
>  
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 3942041..4dca486 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -947,6 +947,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;
> @@ -962,6 +965,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;
>  	}
>  
> diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
> index a618a6a..d154284 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,
>  	}
>  
>  	if (property == dev_priv->broadcast_rgb_property) {
> +		bool old_auto = intel_sdvo->color_range_auto;
> +		uint32_t old_range = intel_sdvo->color_range;
> +
>  		switch (val) {
>  		case INTEL_BROADCAST_RGB_AUTO:
>  			intel_sdvo->color_range_auto = true;
> @@ -1947,6 +1950,11 @@ intel_sdvo_set_property(struct drm_connector *connector,
>  		default:
>  			return -EINVAL;
>  		}
> +
> +		if (old_auto == intel_sdvo->color_range_auto &&
> +		    old_range == intel_sdvo->color_range)
> +			return 0;
> +
>  		goto done;
>  	}
>  
> -- 
> 1.7.11.7

-- 
Ville Syrjälä
Intel OTC

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: avoid full modeset when changing the color range properties
  2013-04-23  9:13     ` Ville Syrjälä
@ 2013-04-23 11:53       ` Daniel Vetter
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2013-04-23 11:53 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: Daniel Vetter, Intel Graphics Development, Paulo Zanoni

On Tue, Apr 23, 2013 at 12:13:34PM +0300, Ville Syrjälä wrote:
> On Mon, Apr 22, 2013 at 05:07:23PM +0200, Daniel Vetter wrote:
> > 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>
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Picked up for -fixes, thanks for the review.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-04-23 11:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-19 15:26 [PATCH] drm/i915: avoid full modeset when changing the color range properties Daniel Vetter
2013-04-22 11:24 ` Ville Syrjälä
2013-04-22 15:06   ` Daniel Vetter
2013-04-22 15:07   ` Daniel Vetter
2013-04-23  9:13     ` Ville Syrjälä
2013-04-23 11:53       ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.