drm/i915/guc/slpc: Define and initialize boost frequency
authorVinay Belgaumkar <vinay.belgaumkar@intel.com>
Tue, 2 Nov 2021 01:26:06 +0000 (18:26 -0700)
committerJohn Harrison <John.C.Harrison@Intel.com>
Thu, 4 Nov 2021 00:44:02 +0000 (17:44 -0700)
commit292e4fb05f14d54c90cb165335c6d4dfaf1cfb32
tree36b4852481b74a7a1a588030b5e630e5dca54363
parentc1f110eeb2a58df95bac8c11e5687c1761333952
drm/i915/guc/slpc: Define and initialize boost frequency

Define helpers and struct members required to record boost info.
Boost frequency is initialized to RP0 at SLPC init. Also define num_waiters
which can track the pending boost requests.

Boost will be done by scheduling a worker thread. This will avoid
the need to make H2G calls inside an interrupt context. Initialize the
worker function during SLPC init as well. Had to move intel_guc_slpc_init
a few lines below to accommodate this.

v2: Add a workqueue to handle waitboost
v3: Code review comments (Ashutosh)

Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211102012608.8609-2-vinay.belgaumkar@intel.com
drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h