diff mbox series

drm/i915: Don't set update_wm_post on g4x+

Message ID 20190206185433.8116-1-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Don't set update_wm_post on g4x+ | expand

Commit Message

Ville Syrjälä Feb. 6, 2019, 6:54 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

update_wm_post is meant for pre-g4x only. Don't ever set
it on g4x+.

The only effect of a bogus update_wm_post on g4x+ could
be that we clear the legacy_cursor_update flag in
intel_atomic_commit(). Since legacy_cursor_update is
only set for legacy cursor updates (as the name suggests)
and we only set update_wm_post for a modeset the two
cases should never occur at the same time. But let's
be consistent in setting update_wm_post so we don't
end up confusing so many people.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Rodrigo Vivi Feb. 6, 2019, 7:19 p.m. UTC | #1
On Wed, Feb 06, 2019 at 08:54:33PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> update_wm_post is meant for pre-g4x only. Don't ever set
> it on g4x+.
> 
> The only effect of a bogus update_wm_post on g4x+ could
> be that we clear the legacy_cursor_update flag in
> intel_atomic_commit(). Since legacy_cursor_update is
> only set for legacy cursor updates (as the name suggests)
> and we only set update_wm_post for a modeset the two
> cases should never occur at the same time. But let's
> be consistent in setting update_wm_post so we don't
> end up confusing so many people.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

as one of the people that got confused with this at
some point as well,


Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>



> ---
>  drivers/gpu/drm/i915/intel_display.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 4d5ec929f987..91b274ea16c4 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -11063,7 +11063,8 @@ static int intel_crtc_atomic_check(struct drm_crtc *crtc,
>  	int ret;
>  	bool mode_changed = needs_modeset(crtc_state);
>  
> -	if (mode_changed && !crtc_state->active)
> +	if (INTEL_GEN(dev_priv) < 5 && !IS_G4X(dev_priv) &&
> +	    mode_changed && !crtc_state->active)
>  		pipe_config->update_wm_post = true;
>  
>  	if (mode_changed && crtc_state->enable &&
> -- 
> 2.19.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 4d5ec929f987..91b274ea16c4 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11063,7 +11063,8 @@  static int intel_crtc_atomic_check(struct drm_crtc *crtc,
 	int ret;
 	bool mode_changed = needs_modeset(crtc_state);
 
-	if (mode_changed && !crtc_state->active)
+	if (INTEL_GEN(dev_priv) < 5 && !IS_G4X(dev_priv) &&
+	    mode_changed && !crtc_state->active)
 		pipe_config->update_wm_post = true;
 
 	if (mode_changed && crtc_state->enable &&