Re: [PATCH 5/6] drm/i915: Disable DC states for all commits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 20, 2023 at 01:51:54PM +0200, Imre Deak wrote:
> On Mon, Mar 20, 2023 at 11:54:37AM +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > [...]
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
> > index f86060195987..f2c9f88e7aef 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_power.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
> > @@ -2502,3 +2502,18 @@ intel_display_power_tbt_aux_domain(struct drm_i915_private *i915, enum aux_ch au
> >  
> >  	return domains->aux_tbt + (int)(aux_ch - domains->aux_ch_start);
> >  }
> > +
> > +void intel_display_power_assert_dc_off(struct drm_i915_private *i915)
> > +{
> > +	struct i915_power_domains *power_domains = &i915->display.power.domains;
> > +	struct i915_power_well *power_well;
> > +
> > +	mutex_lock(&power_domains->lock);
> > +
> > +	power_well = lookup_power_well(i915, SKL_DISP_DC_OFF);
> > +
> > +	drm_WARN_ON(&i915->drm, power_well &&
> > +		    !intel_power_well_is_enabled(i915, power_well));
> > +
> > +	mutex_unlock(&power_domains->lock);
> 
> intel_display_power_is_enabled() returns the cached state, but I think
> it could be used here, as the hw vs. sw state is checked already at
> other places. Either way, the patch looks ok.

Yeah, intel_display_power_is_enabled() seems fine now that we use the
DC_OFF domain. I guess originally I was still using the MODESET domain
and asserting that seemed a bit too vague to my liking.

> 
> > +}
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_power.h b/drivers/gpu/drm/i915/display/intel_display_power.h
> > index 8e96be8e6330..9ca48e233185 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_power.h
> > +++ b/drivers/gpu/drm/i915/display/intel_display_power.h
> > @@ -182,6 +182,7 @@ void intel_display_power_suspend(struct drm_i915_private *i915);
> >  void intel_display_power_resume(struct drm_i915_private *i915);
> >  void intel_display_power_set_target_dc_state(struct drm_i915_private *dev_priv,
> >  					     u32 state);
> > +void intel_display_power_assert_dc_off(struct drm_i915_private *dev_priv);
> >  
> >  const char *
> >  intel_display_power_domain_str(enum intel_display_power_domain domain);
> > -- 
> > 2.39.2
> > 

-- 
Ville Syrjälä
Intel



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux