drm/i915/pmdemand: convert to_intel_pmdemand_state() to a function

In preparation for making struct intel_pmdemand_state an opaque type,
convert to_intel_pmdemand_state() to a function.

Cc: Gustavo Sousa <gustavo.sousa@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/10324781f9f7eae5a92506aaa7a40403efd345dd.1735662324.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
Jani Nikula 2024-12-31 18:27:37 +02:00
parent ef0a0757bb
commit eb18e25b60
2 changed files with 6 additions and 2 deletions

View File

@ -15,6 +15,11 @@
#include "intel_pmdemand.h"
#include "skl_watermark.h"
struct intel_pmdemand_state *to_intel_pmdemand_state(struct intel_global_state *obj_state)
{
return container_of(obj_state, struct intel_pmdemand_state, base);
}
static struct intel_global_state *
intel_pmdemand_duplicate_state(struct intel_global_obj *obj)
{

View File

@ -43,8 +43,7 @@ struct intel_pmdemand_state {
struct pmdemand_params params;
};
#define to_intel_pmdemand_state(global_state) \
container_of_const((global_state), struct intel_pmdemand_state, base)
struct intel_pmdemand_state *to_intel_pmdemand_state(struct intel_global_state *obj_state);
void intel_pmdemand_init_early(struct drm_i915_private *i915);
int intel_pmdemand_init(struct drm_i915_private *i915);