Skip to content

Commit f568eee

Browse files
dceraoloickle
authored andcommitted
drm/i915: use intel_uncore in fw get/put internal paths
Get/put functions used outside of uncore.c are updated in the next patch for a nicer split. v2: use dev_priv where we still have it (Paulo) Signed-off-by: Daniele Ceraolo Spurio <[email protected]> Cc: Paulo Zanoni <[email protected]> Reviewed-by: Paulo Zanoni <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 159367b commit f568eee

File tree

6 files changed

+121
-108
lines changed

6 files changed

+121
-108
lines changed

drivers/gpu/drm/i915/i915_debugfs.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,13 +1414,14 @@ static int ironlake_drpc_info(struct seq_file *m)
14141414
static int i915_forcewake_domains(struct seq_file *m, void *data)
14151415
{
14161416
struct drm_i915_private *i915 = node_to_i915(m->private);
1417+
struct intel_uncore *uncore = &i915->uncore;
14171418
struct intel_uncore_forcewake_domain *fw_domain;
14181419
unsigned int tmp;
14191420

14201421
seq_printf(m, "user.bypass_count = %u\n",
1421-
i915->uncore.user_forcewake.count);
1422+
uncore->user_forcewake.count);
14221423

1423-
for_each_fw_domain(fw_domain, i915, tmp)
1424+
for_each_fw_domain(fw_domain, uncore, tmp)
14241425
seq_printf(m, "%s.wake_count = %u\n",
14251426
intel_uncore_forcewake_domain_to_str(fw_domain->id),
14261427
READ_ONCE(fw_domain->wake_count));

drivers/gpu/drm/i915/i915_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2952,7 +2952,7 @@ static int intel_runtime_suspend(struct device *kdev)
29522952
intel_opregion_notify_adapter(dev_priv, PCI_D1);
29532953
}
29542954

2955-
assert_forcewakes_inactive(dev_priv);
2955+
assert_forcewakes_inactive(&dev_priv->uncore);
29562956

29572957
if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv))
29582958
intel_hpd_poll_init(dev_priv);

drivers/gpu/drm/i915/i915_drv.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2102,6 +2102,11 @@ static inline struct drm_i915_private *huc_to_i915(struct intel_huc *huc)
21022102
return container_of(huc, struct drm_i915_private, huc);
21032103
}
21042104

2105+
static inline struct drm_i915_private *uncore_to_i915(struct intel_uncore *uncore)
2106+
{
2107+
return container_of(uncore, struct drm_i915_private, uncore);
2108+
}
2109+
21052110
/* Simple iterator over all initialised engines */
21062111
#define for_each_engine(engine__, dev_priv__, id__) \
21072112
for ((id__) = 0; \

0 commit comments

Comments
 (0)