diff mbox series

[3/3] drm/i915: Forcing a modeset when resetting HDMI link

Message ID 20190302003349.19189-3-jose.souza@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/3] drm/i915: Fix atomic state leak when resetting HDMI link | expand

Commit Message

Souza, Jose March 2, 2019, 12:33 a.m. UTC
With fastboot enabled in gen9+ it broke the HDMI reset as just
setting mode_changed to true causes a fastset and here we want a full
modeset that will disable and then enable the encoder of this HDMI
link actually, so setting connectors_changed instead that will cause
modeset as desired.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ville Syrjälä March 4, 2019, 4:34 p.m. UTC | #1
On Fri, Mar 01, 2019 at 04:33:49PM -0800, José Roberto de Souza wrote:
> With fastboot enabled in gen9+ it broke the HDMI reset as just
> setting mode_changed to true causes a fastset and here we want a full
> modeset that will disable and then enable the encoder of this HDMI
> link actually, so setting connectors_changed instead that will cause
> modeset as desired.
> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>

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

The two other questionable places seem to be:

* intel_digital_connector_atomic_check()
  Looks like this is currently broken as we don't do infoframe/audio
  updates from the .update_pipe() hook yet. Also we have no
  .update_pipe() for pre-ddi platforms.

* intel_modeset_all_pipes()
  Should work because we set the flag after the modeset->fastset
  downgrade has occurred. Might make sense to change this one as
  well though, just to avoid copy paste errors in the future.

> ---
>  drivers/gpu/drm/i915/intel_ddi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index c22ddde2dfc1..d329f0c206ec 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -3973,7 +3973,7 @@ static int modeset_pipe(struct drm_crtc *crtc,
>  		goto out;
>  	}
>  
> -	crtc_state->mode_changed = true;
> +	crtc_state->connectors_changed = true;
>  
>  	ret = drm_atomic_commit(state);
>  out:
> -- 
> 2.21.0
Souza, Jose March 4, 2019, 11:07 p.m. UTC | #2
On Mon, 2019-03-04 at 18:34 +0200, Ville Syrjälä wrote:
> On Fri, Mar 01, 2019 at 04:33:49PM -0800, José Roberto de Souza
> wrote:
> > With fastboot enabled in gen9+ it broke the HDMI reset as just
> > setting mode_changed to true causes a fastset and here we want a
> > full
> > modeset that will disable and then enable the encoder of this HDMI
> > link actually, so setting connectors_changed instead that will
> > cause
> > modeset as desired.
> > 
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> 
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Merged this patched to dinq, I will take a look at those places bellow.

> 
> The two other questionable places seem to be:
> 
> * intel_digital_connector_atomic_check()
>   Looks like this is currently broken as we don't do infoframe/audio
>   updates from the .update_pipe() hook yet. Also we have no
>   .update_pipe() for pre-ddi platforms.
> 
> * intel_modeset_all_pipes()
>   Should work because we set the flag after the modeset->fastset
>   downgrade has occurred. Might make sense to change this one as
>   well though, just to avoid copy paste errors in the future.
> 
> > ---
> >  drivers/gpu/drm/i915/intel_ddi.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_ddi.c
> > b/drivers/gpu/drm/i915/intel_ddi.c
> > index c22ddde2dfc1..d329f0c206ec 100644
> > --- a/drivers/gpu/drm/i915/intel_ddi.c
> > +++ b/drivers/gpu/drm/i915/intel_ddi.c
> > @@ -3973,7 +3973,7 @@ static int modeset_pipe(struct drm_crtc
> > *crtc,
> >  		goto out;
> >  	}
> >  
> > -	crtc_state->mode_changed = true;
> > +	crtc_state->connectors_changed = true;
> >  
> >  	ret = drm_atomic_commit(state);
> >  out:
> > -- 
> > 2.21.0
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index c22ddde2dfc1..d329f0c206ec 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -3973,7 +3973,7 @@  static int modeset_pipe(struct drm_crtc *crtc,
 		goto out;
 	}
 
-	crtc_state->mode_changed = true;
+	crtc_state->connectors_changed = true;
 
 	ret = drm_atomic_commit(state);
 out: