Message ID | 20241129164010.29887-2-gustavo.sousa@intel.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Flush DMC wakelock release work at the end of runtime suspend | expand |
On Fri, Nov 29, 2024 at 01:37:54PM -0300, Gustavo Sousa wrote: > We will need to flush the release work from outside in an upcoming > change. Let's put that into a public interface and call it > intel_dmc_wl_flush_release_work(). > > Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> > --- > drivers/gpu/drm/i915/display/intel_dmc_wl.c | 12 +++++++++++- > drivers/gpu/drm/i915/display/intel_dmc_wl.h | 1 + > 2 files changed, 12 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_dmc_wl.c b/drivers/gpu/drm/i915/display/intel_dmc_wl.c > index 853d75610489..09075830c12f 100644 > --- a/drivers/gpu/drm/i915/display/intel_dmc_wl.c > +++ b/drivers/gpu/drm/i915/display/intel_dmc_wl.c > @@ -349,7 +349,7 @@ void intel_dmc_wl_disable(struct intel_display *display) > if (!__intel_dmc_wl_supported(display)) > return; > > - flush_delayed_work(&wl->work); > + intel_dmc_wl_flush_release_work(display); > > spin_lock_irqsave(&wl->lock, flags); > > @@ -377,6 +377,16 @@ void intel_dmc_wl_disable(struct intel_display *display) > spin_unlock_irqrestore(&wl->lock, flags); > } > > +void intel_dmc_wl_flush_release_work(struct intel_display *display) > +{ > + struct intel_dmc_wl *wl = &display->wl; > + > + if (!__intel_dmc_wl_supported(display)) > + return; > + > + flush_delayed_work(&wl->work); > +} > + > void intel_dmc_wl_get(struct intel_display *display, i915_reg_t reg) > { > struct intel_dmc_wl *wl = &display->wl; > diff --git a/drivers/gpu/drm/i915/display/intel_dmc_wl.h b/drivers/gpu/drm/i915/display/intel_dmc_wl.h > index 147eeb4d8432..5488fbdf29b8 100644 > --- a/drivers/gpu/drm/i915/display/intel_dmc_wl.h > +++ b/drivers/gpu/drm/i915/display/intel_dmc_wl.h > @@ -32,6 +32,7 @@ struct intel_dmc_wl { > void intel_dmc_wl_init(struct intel_display *display); > void intel_dmc_wl_enable(struct intel_display *display, u32 dc_state); > void intel_dmc_wl_disable(struct intel_display *display); > +void intel_dmc_wl_flush_release_work(struct intel_display *display); > void intel_dmc_wl_get(struct intel_display *display, i915_reg_t reg); > void intel_dmc_wl_put(struct intel_display *display, i915_reg_t reg); > void intel_dmc_wl_get_noreg(struct intel_display *display); > -- > 2.47.0 >
diff --git a/drivers/gpu/drm/i915/display/intel_dmc_wl.c b/drivers/gpu/drm/i915/display/intel_dmc_wl.c index 853d75610489..09075830c12f 100644 --- a/drivers/gpu/drm/i915/display/intel_dmc_wl.c +++ b/drivers/gpu/drm/i915/display/intel_dmc_wl.c @@ -349,7 +349,7 @@ void intel_dmc_wl_disable(struct intel_display *display) if (!__intel_dmc_wl_supported(display)) return; - flush_delayed_work(&wl->work); + intel_dmc_wl_flush_release_work(display); spin_lock_irqsave(&wl->lock, flags); @@ -377,6 +377,16 @@ void intel_dmc_wl_disable(struct intel_display *display) spin_unlock_irqrestore(&wl->lock, flags); } +void intel_dmc_wl_flush_release_work(struct intel_display *display) +{ + struct intel_dmc_wl *wl = &display->wl; + + if (!__intel_dmc_wl_supported(display)) + return; + + flush_delayed_work(&wl->work); +} + void intel_dmc_wl_get(struct intel_display *display, i915_reg_t reg) { struct intel_dmc_wl *wl = &display->wl; diff --git a/drivers/gpu/drm/i915/display/intel_dmc_wl.h b/drivers/gpu/drm/i915/display/intel_dmc_wl.h index 147eeb4d8432..5488fbdf29b8 100644 --- a/drivers/gpu/drm/i915/display/intel_dmc_wl.h +++ b/drivers/gpu/drm/i915/display/intel_dmc_wl.h @@ -32,6 +32,7 @@ struct intel_dmc_wl { void intel_dmc_wl_init(struct intel_display *display); void intel_dmc_wl_enable(struct intel_display *display, u32 dc_state); void intel_dmc_wl_disable(struct intel_display *display); +void intel_dmc_wl_flush_release_work(struct intel_display *display); void intel_dmc_wl_get(struct intel_display *display, i915_reg_t reg); void intel_dmc_wl_put(struct intel_display *display, i915_reg_t reg); void intel_dmc_wl_get_noreg(struct intel_display *display);
We will need to flush the release work from outside in an upcoming change. Let's put that into a public interface and call it intel_dmc_wl_flush_release_work(). Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> --- drivers/gpu/drm/i915/display/intel_dmc_wl.c | 12 +++++++++++- drivers/gpu/drm/i915/display/intel_dmc_wl.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-)