Re: [PATCH v2] drm/i915/hwmon: Get rid of devm

2024-04-16 Thread Rodrigo Vivi
On Tue, Apr 16, 2024 at 12:02:10PM -0700, Dixit, Ashutosh wrote: > On Tue, 16 Apr 2024 11:55:20 -0700, Rodrigo Vivi wrote: > > > > Hi Rodrigo, > > > > @@ -849,5 +849,26 @@ void i915_hwmon_register(struct drm_i915_private > > > *i915) > > > > > > void i915_hwmon_unregister(struct

Re: [PATCH v2] drm/i915/hwmon: Get rid of devm

2024-04-16 Thread Dixit, Ashutosh
On Tue, 16 Apr 2024 11:55:20 -0700, Rodrigo Vivi wrote: > Hi Rodrigo, > > @@ -849,5 +849,26 @@ void i915_hwmon_register(struct drm_i915_private *i915) > > > > void i915_hwmon_unregister(struct drm_i915_private *i915) > > { > > - fetch_and_zero(>hwmon); > > + struct i915_hwmon *hwmon =

Re: [PATCH v2] drm/i915/hwmon: Get rid of devm

2024-04-16 Thread Rodrigo Vivi
On Mon, Apr 15, 2024 at 03:36:12PM -0700, Ashutosh Dixit wrote: > When both hwmon and hwmon drvdata (on which hwmon depends) are device > managed resources, the expectation, on device unbind, is that hwmon will be > released before drvdata. However, in i915 there are two separate code > paths,

Re: [PATCH v2] drm/i915/hwmon: Get rid of devm

2024-04-16 Thread Armin Wolf
Am 16.04.24 um 00:36 schrieb Ashutosh Dixit: When both hwmon and hwmon drvdata (on which hwmon depends) are device managed resources, the expectation, on device unbind, is that hwmon will be released before drvdata. However, in i915 there are two separate code paths, which both release either

Re: [PATCH v2] drm/i915/hwmon: Get rid of devm

2024-04-16 Thread Jani Nikula
On Mon, 15 Apr 2024, "Dixit, Ashutosh" wrote: > On Mon, 15 Apr 2024 16:35:02 -0700, Armin Wolf wrote: >> > > Hi Armin, > >> Am 16.04.24 um 00:36 schrieb Ashutosh Dixit: >> > @@ -818,10 +818,10 @@ void i915_hwmon_register(struct drm_i915_private >> > *i915) >> >

Re: [PATCH v2] drm/i915/hwmon: Get rid of devm

2024-04-15 Thread Dixit, Ashutosh
On Mon, 15 Apr 2024 16:35:02 -0700, Armin Wolf wrote: > Hi Armin, > Am 16.04.24 um 00:36 schrieb Ashutosh Dixit: > > @@ -818,10 +818,10 @@ void i915_hwmon_register(struct drm_i915_private > > *i915) > > hwm_get_preregistration_info(i915); > > > > /* hwmon_dev points to device hwmon */

[PATCH v2] drm/i915/hwmon: Get rid of devm

2024-04-15 Thread Ashutosh Dixit
When both hwmon and hwmon drvdata (on which hwmon depends) are device managed resources, the expectation, on device unbind, is that hwmon will be released before drvdata. However, in i915 there are two separate code paths, which both release either drvdata or hwmon and either can be released