[Intel-gfx] [PATCH] drm/i915/eDP: When enabling panel VDD cancel pending disable worker

Ville Syrjälä ville.syrjala at linux.intel.com
Mon Nov 24 18:44:11 CET 2014


On Mon, Nov 24, 2014 at 07:32:49PM +0200, Ville Syrjälä wrote:
> On Mon, Nov 24, 2014 at 05:56:20PM +0100, Egbert Eich wrote:
> > Before testing if the panel VDD is enabled on eDP cancel any pending
> > disable worker. This makes sure the worker doesn't fire when we expect
> > VDD to be enabled.
> > 
> > https://bugs.freedesktop.org/show_bug.cgi?id=86201
> > 
> > Signed-off-by: Egbert Eich <eich at suse.de>
> > ---
> >  drivers/gpu/drm/i915/intel_dp.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index 70bb8d0b..81f959d 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -1503,6 +1503,7 @@ static bool edp_panel_vdd_on(struct intel_dp *intel_dp)
> >  	if (!is_edp(intel_dp))
> >  		return false;
> >  
> > +	cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
> 
> This can deadlock since we're already holding pps_mutex and
> edp_panel_vdd_work() also grabs it.
> 
> I'm thinking we may want something like mod_delayed_work() instead.

Or rather just cancel_delayed_work() is enough here I guess. W/o the
_sync we shouldn't deadlock. And if we always cancel here the timer
shoduln't be pending in edp_panel_vdd_schedule_off() anymore, so
mod_delayed_work() there would anyway just be the same as
schedule_delayed_work().

> 
> 
> >  	intel_dp->want_panel_vdd = true;
> >  
> >  	if (edp_have_panel_vdd(intel_dp))
> > -- 
> > 1.8.4.5
> 
> -- 
> Ville Syrjälä
> Intel OTC

-- 
Ville Syrjälä
Intel OTC



More information about the Intel-gfx mailing list