Commit eb18e25b authored by Jani Nikula's avatar Jani Nikula
Browse files

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: default avatarGustavo Sousa <gustavo.sousa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/10324781f9f7eae5a92506aaa7a40403efd345dd.1735662324.git.jani.nikula@intel.com


Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent ef0a0757
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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)
{
+1 −2
Original line number Diff line number Diff line
@@ -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);