*/
        struct list_head link;
 
+       intel_wakeref_t wakeref;
+
        /**
         * @sample_flags: Flags representing the `DRM_I915_PERF_PROP_SAMPLE_*`
         * properties given when opening a stream, representing the contents
 
        free_oa_buffer(dev_priv);
 
        intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
-       intel_runtime_pm_put_unchecked(dev_priv);
+       intel_runtime_pm_put(dev_priv, stream->wakeref);
 
        if (stream->ctx)
                oa_put_render_ctx_id(stream);
         *   In our case we are expecting that taking pm + FORCEWAKE
         *   references will effectively disable RC6.
         */
-       intel_runtime_pm_get(dev_priv);
+       stream->wakeref = intel_runtime_pm_get(dev_priv);
        intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL);
 
        ret = alloc_oa_buffer(dev_priv);
        put_oa_config(dev_priv, stream->oa_config);
 
        intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
-       intel_runtime_pm_put_unchecked(dev_priv);
+       intel_runtime_pm_put(dev_priv, stream->wakeref);
 
 err_config:
        if (stream->ctx)