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

2024-04-17 Thread Dixit, Ashutosh
On Wed, 17 Apr 2024 01:28:48 -0700, Andi Shyti wrote: > Hi Andi, > > @@ -839,16 +837,38 @@ void i915_hwmon_register(struct drm_i915_private > > *i915) > > if (!hwm_gt_is_visible(ddat_gt, hwmon_energy, > > hwmon_energy_input, 0)) > > continue; > > > > -

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

2024-04-17 Thread Andi Shyti
Hi Ashutosh, > @@ -839,16 +837,38 @@ void i915_hwmon_register(struct drm_i915_private *i915) > if (!hwm_gt_is_visible(ddat_gt, hwmon_energy, > hwmon_energy_input, 0)) > continue; > > - hwmon_dev = devm_hwmon_device_register_with_info(dev, >

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

2024-04-16 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