Skip to content

Commit 2cb2cb5

Browse files
committed
drm/i915/panel: Track temporary rpm wakeref
Keep track of the temporary rpm wakeref used for panel backlight access, so that we can cancel it immediately upon release and so more clearly identify leaks. Signed-off-by: Chris Wilson <[email protected]> Cc: Jani Nikula <[email protected]> Reviewed-by: Mika Kuoppala <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 6a712a2 commit 2cb2cb5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpu/drm/i915/intel_panel.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,17 +1203,18 @@ static int intel_backlight_device_get_brightness(struct backlight_device *bd)
12031203
struct intel_connector *connector = bl_get_data(bd);
12041204
struct drm_device *dev = connector->base.dev;
12051205
struct drm_i915_private *dev_priv = to_i915(dev);
1206+
intel_wakeref_t wakeref;
12061207
u32 hw_level;
12071208
int ret;
12081209

1209-
intel_runtime_pm_get(dev_priv);
1210+
wakeref = intel_runtime_pm_get(dev_priv);
12101211
drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
12111212

12121213
hw_level = intel_panel_get_backlight(connector);
12131214
ret = scale_hw_to_user(connector, hw_level, bd->props.max_brightness);
12141215

12151216
drm_modeset_unlock(&dev->mode_config.connection_mutex);
1216-
intel_runtime_pm_put_unchecked(dev_priv);
1217+
intel_runtime_pm_put(dev_priv, wakeref);
12171218

12181219
return ret;
12191220
}

0 commit comments

Comments
 (0)