[Intel-gfx] [CI v3] drm/i915: do not pass dev_priv to low-level forcewake functions
Chris Wilson
chris at chris-wilson.co.uk
Sat Mar 16 10:13:37 UTC 2019
Quoting Chris Wilson (2019-03-16 10:00:45)
> From: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
>
> The only usage we have for it is for the regs pointer. Save a pointer to
> the set and ack registers instead of the register offsets to remove this
> requirement
>
> v2: Keep passing uncore down to the lowest levels to avoid repeated
> pointer chasing in the innermost loops:
>
> add/remove: 0/0 grow/shrink: 3/15 up/down: 33/-155 (-122)
> Function old new delta
> fw_domain_init 320 351 +31
> hdmi_port_clock_valid 319 320 +1
> g4x_pre_enable_dp 364 365 +1
> ring_request_alloc 1852 1851 -1
> intel_engine_lookup_user 50 49 -1
> gen11_irq_handler 738 737 -1
> __intel_uncore_forcewake_get 115 112 -3
> intel_uncore_fw_release_timer 198 194 -4
> i915_forcewake_domains 154 150 -4
> fw_domain_fini 172 168 -4
> __intel_uncore_forcewake_put 163 159 -4
> ___force_wake_auto 138 134 -4
> fw_domains_put 98 92 -6
> __err_print_to_sgl 4058 4052 -6
> intel_uncore_forcewake_reset 459 444 -15
> fw_domains_get 563 548 -15
> fw_domain_wait_ack_with_fallback 490 450 -40
> fw_domains_get_with_fallback 875 828 -47
Interestingly, moving the u32 values from intel_uncore to each domain,
enum forcewake_domains fw_domains_active;
enum forcewake_domains fw_domains_saved; /* user domains saved for S3 */
- u32 fw_set;
- u32 fw_clear;
- u32 fw_reset;
-
struct intel_uncore_forcewake_domain {
enum forcewake_domain_id id;
enum forcewake_domains mask;
unsigned int wake_count;
bool active;
struct hrtimer timer;
+
+ u32 fw_set;
+ u32 fw_clear;
+ u32 fw_reset;
+
u32 __iomem *reg_set;
u32 __iomem *reg_ack;
} fw_domain[FW_DOMAIN_ID_COUNT];
is a loss as fw_domains_get() instead of shrinking grows,
add/remove: 0/0 grow/shrink: 11/7 up/down: 159/-136 (23)
Function old new delta
fw_domain_init 320 441 +121
fw_domains_get 563 572 +9
intel_uncore_forcewake_reset 459 466 +7
fw_domain_fini 172 176 +4
__intel_uncore_forcewake_get 115 119 +4
intel_uncore_fw_release_timer 198 201 +3
i915_forcewake_domains 154 157 +3
__intel_uncore_forcewake_put 163 166 +3
___force_wake_auto 138 141 +3
hdmi_port_clock_valid 319 320 +1
g4x_pre_enable_dp 364 365 +1
ring_request_alloc 1852 1851 -1
intel_engine_lookup_user 50 49 -1
gen11_irq_handler 738 737 -1
__err_print_to_sgl 4058 4052 -6
fw_domains_get_with_fallback 875 852 -23
fw_domain_wait_ack_with_fallback 490 450 -40
intel_uncore_init 2134 2070 -64
Will be interesting to review later as the picture will be quite
different with a primary intel_uncore, and I expect the shrinkage to
continue (as well as code clarity from improved encapsulation).
-Chris
More information about the Intel-gfx
mailing list