drm/i915: Populate primary_disabled in intel_modeset_readout_hw_state()
Subsystems (2)
PATCH 1/2 drm/i915: Populate primary_disabled in intel_modeset_readout_hw_state()
From: Ville Syrjälä <[email protected]>
Make sure our primary_disabled matches our expectations after driver init.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70270
--- drivers/gpu/drm/i915/intel_display.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/i915/intel_display.c +1 -0
@@ -10702,6 +10702,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev) &crtc->config); crtc->base.enabled = crtc->active; + crtc->primary_disabled = !crtc->active; DRM_DEBUG_KMS("[CRTC:%d] hw state readout: %s\n", crtc->base.base.id,
Signature · 6 lines
1.8.1.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915: Rename primary_disabled to primary_enabled
From: Ville Syrjälä <[email protected]>
Let's try to avoid these confusing negated booleans.
--- drivers/gpu/drm/i915/intel_display.c | 10 +++++----- drivers/gpu/drm/i915/intel_drv.h | 2 +- drivers/gpu/drm/i915/intel_pm.c | 2 +- drivers/gpu/drm/i915/intel_sprite.c | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_display.c +5 -5
@@ -1840,9 +1840,9 @@ static void intel_enable_primary_plane(struct drm_i915_private *dev_priv,/* If the pipe isn't enabled, we can't pump pixels and may hang */ assert_pipe_enabled (dev_priv, pipe); -WARN (!intel_crtc->primary_disabled,"Primary plane already enabled\n" ); +WARN (intel_crtc->primary_enabled,"Primary plane already enabled\n" ); - intel_crtc->primary_disabled = false; + intel_crtc->primary_enabled = true; reg =DSPCNTR (plane); val =I915_READ (reg);
@@ -1870,9 +1870,9 @@ static void intel_disable_primary_plane(struct drm_i915_private *dev_priv,int reg;u32 val; -WARN (intel_crtc->primary_disabled,"Primary plane already disabled\n" ); +WARN (!intel_crtc->primary_enabled,"Primary plane already disabled\n" ); - intel_crtc->primary_disabled = true; + intel_crtc->primary_enabled = false; reg =DSPCNTR (plane); val =I915_READ (reg);
@@ -10702,7 +10702,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev) &crtc->config); crtc->base.enabled = crtc->active; - crtc->primary_disabled = !crtc->active; + crtc->primary_enabled = crtc->active; DRM_DEBUG_KMS("[CRTC:%d] hw state readout: %s\n", crtc->base.base.id,
drivers/gpu/drm/i915/intel_drv.h +1 -1
@@ -321,7 +321,7 @@ struct intel_crtc {*/ bool active;bool eld_vld; -bool primary_disabled;/* is the crtc obscured by a plane? */ +bool primary_enabled;/* is the primary plane (partially) visible? */ bool lowfreq_avail;struct intel_overlay *overlay;struct intel_unpin_work *unpin_work;
drivers/gpu/drm/i915/intel_pm.c +1 -1
@@ -475,7 +475,7 @@ void intel_update_fbc(struct drm_device *dev)*/ list_for_each_entry (tmp_crtc, &dev->mode_config.crtc_list, head) {if (intel_crtc_active (tmp_crtc) && - !to_intel_crtc (tmp_crtc)->primary_disabled) { +to_intel_crtc (tmp_crtc)->primary_enabled) {if (crtc) {if (set_no_fbc_reason (dev_priv,FBC_MULTIPLE_PIPES ))DRM_DEBUG_KMS ("more than one pipe active, disabling compression\n" );
drivers/gpu/drm/i915/intel_sprite.c +4 -4
@@ -521,10 +521,10 @@ intel_enable_primary(struct drm_crtc *crtc)struct intel_crtc *intel_crtc =to_intel_crtc (crtc);int reg =DSPCNTR (intel_crtc->plane); -if (!intel_crtc->primary_disabled) +if (intel_crtc->primary_enabled)return ; - intel_crtc->primary_disabled = false; + intel_crtc->primary_enabled = true;I915_WRITE (reg,I915_READ (reg) |DISPLAY_PLANE_ENABLE );intel_flush_primary_plane (dev_priv, intel_crtc->plane);
@@ -553,10 +553,10 @@ intel_disable_primary(struct drm_crtc *crtc)struct intel_crtc *intel_crtc =to_intel_crtc (crtc);int reg =DSPCNTR (intel_crtc->plane); -if (intel_crtc->primary_disabled) +if (!intel_crtc->primary_enabled)return ; - intel_crtc->primary_disabled = true; + intel_crtc->primary_enabled = false;mutex_lock (&dev->struct_mutex);if (dev_priv->fbc.plane == intel_crtc->plane)
Signature · 6 lines
1.8.1.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Rename primary_disabled to primary_enabled
Quoted 3 lines · On Wed, 09 Oct 2013, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Let's try to avoid these confusing negated booleans.
Thanks for such a positive patch!
For the series,
Quoted 108 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 10 +++++----- drivers/gpu/drm/i915/intel_drv.h | 2 +- drivers/gpu/drm/i915/intel_pm.c | 2 +- drivers/gpu/drm/i915/intel_sprite.c | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-)drivers/gpu/drm/i915/intel_display.c +5
-5@@ -1840,9 +1840,9 @@ static void intel_enable_primary_plane(struct drm_i915_private *dev_priv,/* If the pipe isn't enabled, we can't pump pixels and may hang */ assert_pipe_enabled (dev_priv, pipe); -WARN (!intel_crtc->primary_disabled,"Primary plane already enabled\n" ); +WARN (intel_crtc->primary_enabled,"Primary plane already enabled\n" ); - intel_crtc->primary_disabled = false; + intel_crtc->primary_enabled = true; reg =DSPCNTR (plane); val =I915_READ (reg);@@ -1870,9 +1870,9 @@ static void intel_disable_primary_plane(struct drm_i915_private *dev_priv,int reg;u32 val; -WARN (intel_crtc->primary_disabled,"Primary plane already disabled\n" ); +WARN (!intel_crtc->primary_enabled,"Primary plane already disabled\n" ); - intel_crtc->primary_disabled = true; + intel_crtc->primary_enabled = false; reg =DSPCNTR (plane); val =I915_READ (reg);@@ -10702,7 +10702,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev) &crtc->config); crtc->base.enabled = crtc->active; - crtc->primary_disabled = !crtc->active; + crtc->primary_enabled = crtc->active; DRM_DEBUG_KMS("[CRTC:%d] hw state readout: %s\n", crtc->base.base.id,drivers/gpu/drm/i915/intel_drv.h +1
-1@@ -321,7 +321,7 @@ struct intel_crtc {*/ bool active;bool eld_vld; -bool primary_disabled;/* is the crtc obscured by a plane? */ +bool primary_enabled;/* is the primary plane (partially) visible? */ bool lowfreq_avail;struct intel_overlay *overlay;struct intel_unpin_work *unpin_work;drivers/gpu/drm/i915/intel_pm.c +1
-1@@ -475,7 +475,7 @@ void intel_update_fbc(struct drm_device *dev)*/ list_for_each_entry (tmp_crtc, &dev->mode_config.crtc_list, head) {if (intel_crtc_active (tmp_crtc) && - !to_intel_crtc (tmp_crtc)->primary_disabled) { +to_intel_crtc (tmp_crtc)->primary_enabled) {if (crtc) {if (set_no_fbc_reason (dev_priv,FBC_MULTIPLE_PIPES ))DRM_DEBUG_KMS ("more than one pipe active, disabling compression\n" );drivers/gpu/drm/i915/intel_sprite.c +4
-4@@ -521,10 +521,10 @@ intel_enable_primary(struct drm_crtc *crtc)struct intel_crtc *intel_crtc =to_intel_crtc (crtc);int reg =DSPCNTR (intel_crtc->plane); -if (!intel_crtc->primary_disabled) +if (intel_crtc->primary_enabled)return ; - intel_crtc->primary_disabled = false; + intel_crtc->primary_enabled = true;I915_WRITE (reg,I915_READ (reg) |DISPLAY_PLANE_ENABLE );intel_flush_primary_plane (dev_priv, intel_crtc->plane);@@ -553,10 +553,10 @@ intel_disable_primary(struct drm_crtc *crtc)struct intel_crtc *intel_crtc =to_intel_crtc (crtc);int reg =DSPCNTR (intel_crtc->plane); -if (intel_crtc->primary_disabled) +if (!intel_crtc->primary_enabled)return ; - intel_crtc->primary_disabled = true; + intel_crtc->primary_enabled = false;mutex_lock (&dev->struct_mutex);if (dev_priv->fbc.plane == intel_crtc->plane)Signature · 6 lines
1.8.1.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Rename primary_disabled to primary_enabled
Quoted 9 lines · Jani Nikula
Quoted 3 lines · On Wed, 09 Oct 2013, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Let's try to avoid these confusing negated booleans.
Thanks for such a positive patch!
For the series,
Reviewed-by Jani Nikula <[email protected]>
Both merged, thanks for patches&review.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 8 lines · On Wed, Oct 09, 2013 at 05:24:57PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Make sure our
primary_disabledmatches our expectations after driver init.Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70270
Tested-by Paulo Zanoni <[email protected]>Signed-off-by Ville Syrjälä <[email protected]>
Also
Quoted 23 lines
--- drivers/gpu/drm/i915/intel_display.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/i915/intel_display.c +1
-0@@ -10702,6 +10702,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev) &crtc->config); crtc->base.enabled = crtc->active; + crtc->primary_disabled = !crtc->active; DRM_DEBUG_KMS("[CRTC:%d] hw state readout: %s\n", crtc->base.base.id,Signature · 6 lines
1.8.1.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Ville Syrjälä Intel OTC