Dynamic EU configuration of Slice/Sub-slice/EU
Subsystems (2)
v8 cover Dynamic EU configuration of Slice/Sub-slice/EU
drm/i915: Context aware user agnostic EU/Slice/Sub-slice control within kernel
This patch sets improves GPU power consumption on Linux kernel based OS such as Chromium OS, Ubuntu, etc. Following are the power savings.
Power savings on GLK-GT1 Bobba platform running on Chrome OS.
-----------------------------------------------| App /KPI | % Power Benefit (mW) | ------------------------|----------------------| Hangout Call- 20 minute | 1.8% | Youtube 4K VPB | 14.13% | WebGL Aquarium | 13.76% | Unity3D | 6.78% | | | ------------------------|----------------------| Chrome PLT | BatteryLife Improves | | by ~45 minute | -----------------------------------------------|
Power savings on KBL-GT3 running on Android and Ubuntu (Linux). -----------------------------------------------|
App /KPI | % Power Benefit (mW) |
|----------------------| | Android | Ubuntu | ------------------------|----------|-----------| 3D Mark (Ice storm) | 2.30% | N.A. | TRex On screen | 2.49% | 2.97% | Manhattan On screen | 3.11% | 4.90% | Carchase On Screen | N.A. | 5.06% | AnTuTu 6.1.4 | 3.42% | N.A. | SynMark2 | N.A. | 1.7% | -----------------------------------------------|
We have also observed GPU core residencies improves by 1.035%.
Technical Insights of the patch:
Current GPU configuration code for i915 does not allow us to change EU/Slice/Sub-slice configuration dynamically. Its done only once while context is created.
While particular graphics application is running, if we examine the command requests from user space, we observe that command density is not consistent. It means there is scope to change the graphics configuration dynamically even while context is running actively. This patch series proposes the solution to find the active pending load for all active context at given time and based on that, dynamically perform graphics configuration for each context.
The feature can be enabled using sysfs. We examine pending commands for a context in the queue, essentially, we intercept them before they are executed by GPU and we update context with required number of EUs.
One questions, what's the right number of EUs?
Empirical data to achieve best performance in least power was considered. For the later one, we roughly categorized number of EUs logically based on platform. Now we compare number of pending commands with a particular threshold and then set number of EUs accordingly with update context. That threshold is also based on experiments & findings. If GPU is able to catch up with CPU, typically there are no pending commands, the EU config would remain unchanged there. In case there are more pending commands we reprogram context with higher number of EUs.
Ankit Navik (3):
drm/i915: Get active pending request for given context drm/i915: set optimum eu/slice/sub-slice configuration based on load
type
drm/i915: Predictive governor to control slice/subslice/eu
drivers/gpu/drm/i915/gem/i915_gem_context.c | 4 ++ drivers/gpu/drm/i915/gem/i915_gem_context_types.h | 37 +++++++++++ drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 + drivers/gpu/drm/i915/gt/intel_context_sseu.c | 2 + drivers/gpu/drm/i915/gt/intel_context_types.h | 2 + drivers/gpu/drm/i915/gt/intel_lrc.c | 79 ++++++++++++++++++++++- drivers/gpu/drm/i915/i915_drv.h | 5 ++ drivers/gpu/drm/i915/i915_sysfs.c | 32 +++++++++ drivers/gpu/drm/i915/intel_device_info.c | 59 ++++++++++++++++- 9 files changed, 218 insertions(+), 4 deletions(-)
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v8 1/3 drm/i915: Get active pending request for given context
This patch gives us the active pending request count which is yet to be submitted to the GPU.
V2:
* Change 64-bit to atomic for request count. (Tvrtko Ursulin)
V3:
* Remove mutex for request count.
* Rebase.
* Fixes hitting underflow for predictive request. (Tvrtko Ursulin)
V4:
* Rebase.
V5:
* Rebase.
V6:
* Rebase.
V7:
* Rebase.
* Add GEM_BUG_ON for req_cnt.
V8:
* Rebase.
--- drivers/gpu/drm/i915/gem/i915_gem_context.c | 1 + drivers/gpu/drm/i915/gem/i915_gem_context_types.h | 5 +++++ drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 ++ drivers/gpu/drm/i915/gt/intel_lrc.c | 9 +++++++++ 4 files changed, 17 insertions(+)
drivers/gpu/drm/i915/gem/i915_gem_context.c +1 -0
@@ -879,6 +879,7 @@ i915_gem_create_context(struct drm_i915_private *i915, unsigned int flags) }trace_i915_context_create (ctx); +atomic_set (&ctx->req_cnt,0 );return ctx; }
drivers/gpu/drm/i915/gem/i915_gem_context_types.h +5 -0
@@ -171,6 +171,11 @@ struct i915_gem_context {*/ struct radix_tree_root handles_vma; +/** req_cnt: tracks the pending commands, based on which we decide to +* go for low/medium/high load configuration of the GPU. +*/ +atomic_t req_cnt; +/** * @name: arbitrary name, used for user debug *
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +2 -0
@@ -2565,6 +2565,8 @@ i915_gem_do_execbuffer(struct drm_device *dev,if (batch->private)intel_engine_pool_mark_active (batch->private, eb.request); +atomic_inc (&eb.gem_context->req_cnt); +trace_i915_request_queue (eb.request, eb.batch_flags); err =eb_submit (&eb, batch); err_request:
drivers/gpu/drm/i915/gt/intel_lrc.c +9 -0
@@ -2143,6 +2143,8 @@ static void execlists_dequeue(struct intel_engine_cs *engine) }if (__i915_request_submit (rq)) { +struct i915_gem_context *ctx; +if (!merge) { *port =execlists_schedule_in (last, port - execlists->pending); port++;
@@ -2158,6 +2160,13 @@ static void execlists_dequeue(struct intel_engine_cs *engine) submit = true; last = rq; + + ctx =rcu_dereference_protected ( + rq->context->gem_context, true); + +GEM_BUG_ON (atomic_read (&ctx->req_cnt)); +if (atomic_read (&ctx->req_cnt) >0 ) +atomic_dec (&ctx->req_cnt); } }
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v8 2/3 drm/i915: set optimum eu/slice/sub-slice configuration based on load type
In reply to Ankit NavikThis patch will select optimum eu/slice/sub-slice configuration based on type of load (low, medium, high) as input.
Based on our readings and experiments we have predefined set of optimum configuration for each platform(CHT, KBL). i915_gem_context_set_load_type will select optimum configuration from pre-defined optimum configuration table(opt_config).
It also introduce flag update_render_config which can set by any governor.
v2:
* Move static optimum_config to device init time.
* Rename function to appropriate name, fix data types and patch ordering.
* Rename prev_load_type to pending_load_type. (Tvrtko Ursulin)
v3:
* Add safe guard check in i915_gem_context_set_load_type.
* Rename struct from optimum_config to i915_sseu_optimum_config to avoid namespace clashes.
* Reduces memcpy for space efficient.
* Rebase.
* Improved commit message. (Tvrtko Ursulin)
v4:
* Move optimum config table to file scope. (Tvrtko Ursulin)
v5:
* Adds optimal table of slice/sub-slice/EU for Gen 9 GT1.
* Rebase.
v6:
* Rebase.
* Fix warnings.
v7:
* Fix return conditions.
* Remove i915_gem_context_set_load_type and move logic to __execlists_update_reg_state. (Tvrtko Ursulin)
v8:
* Fix warnings.
* Rebase.
--- drivers/gpu/drm/i915/gem/i915_gem_context.c | 3 + drivers/gpu/drm/i915/gem/i915_gem_context_types.h | 32 +++++++++++ drivers/gpu/drm/i915/gt/intel_context_sseu.c | 2 + drivers/gpu/drm/i915/gt/intel_context_types.h | 2 + drivers/gpu/drm/i915/gt/intel_lrc.c | 70 ++++++++++++++++++++++- drivers/gpu/drm/i915/i915_drv.h | 5 ++ drivers/gpu/drm/i915/intel_device_info.c | 59 ++++++++++++++++++- 7 files changed, 169 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_context.c +3 -0
@@ -880,6 +880,9 @@ i915_gem_create_context(struct drm_i915_private *i915, unsigned int flags)trace_i915_context_create (ctx);atomic_set (&ctx->req_cnt,0 ); + ctx->slice_cnt =hweight8 (RUNTIME_INFO (i915)->sseu.slice_mask); + ctx->subslice_cnt =hweight8 (RUNTIME_INFO (i915)->sseu.subslice_mask[0 ]); + ctx->eu_cnt =RUNTIME_INFO (i915)->sseu.eu_per_subslice;return ctx; }
drivers/gpu/drm/i915/gem/i915_gem_context_types.h +32 -0
@@ -46,6 +46,19 @@ struct i915_gem_engines_iter {const struct i915_gem_engines *engines; }; +enum gem_load_type { +LOAD_TYPE_LOW , +LOAD_TYPE_MEDIUM , +LOAD_TYPE_HIGH , +LOAD_TYPE_LAST +}; + +struct i915_sseu_optimum_config { +u8 slice; +u8 subslice; +u8 eu; +}; +/** * struct i915_gem_context - client state *
@@ -155,6 +168,25 @@ struct i915_gem_context {*/ atomic_t active_count; +/** slice_cnt: used to set the # of slices to be enabled. */ +u8 slice_cnt; + +/** subslice_cnt: used to set the # of subslices to be enabled. */ +u8 subslice_cnt; + +/** eu_cnt: used to set the # of eu to be enabled. */ +u8 eu_cnt; + +/** load_type: The designated load_type (high/medium/low) for a given +* number of pending commands in the command queue. +*/ +enum gem_load_type load_type; + +/** pending_load_type: The earlier load type that the GPU was configured +* for (high/medium/low). +*/ +enum gem_load_type pending_load_type; +/** * @hang_timestamp: The last time(s) this context caused a GPU hang */
drivers/gpu/drm/i915/gt/intel_context_sseu.c +2 -0
@@ -84,6 +84,8 @@ intel_context_reconfigure_sseu(struct intel_context *ce,if (ret)return ret; + ce->user_sseu = true; +/* Nothing to do if unmodified. */ if (!memcmp (&ce->sseu, &sseu,sizeof (sseu))) goto unlock;
drivers/gpu/drm/i915/gt/intel_context_types.h +2 -0
@@ -93,6 +93,8 @@ struct intel_context {const struct intel_context_ops *ops; +bool user_sseu; +/** sseu: Control eu/slice partitioning */ struct intel_sseu sseu; };
drivers/gpu/drm/i915/gt/intel_lrc.c +68 -2
102 lines not on this page · raw message
drivers/gpu/drm/i915/i915_drv.h +5 -0
@@ -924,6 +924,11 @@ struct drm_i915_private {/* protects panel power sequencer state */ struct mutex pps_mutex; +/* optimal slice/subslice/EU configration state */ +struct i915_sseu_optimum_config *opt_config; + +bool predictive_load_enable; +unsigned int fsb_freq, mem_freq, is_ddr3;unsigned int skl_preferred_vco_freq;unsigned int max_cdclk_freq;
drivers/gpu/drm/i915/intel_device_info.c +57 -2
75 lines not on this page · raw message
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v8 2/3] drm/i915: set optimum eu/slice/sub-slice configuration based on load type
Quoted 218 lines · Ankit Navik
This patch will select optimum eu/slice/sub-slice configuration based on type of load (low, medium, high) as input.
Based on our readings and experiments we have predefined set of optimum configuration for eachplatform(CHT, KBL).i915_gem_context_set_load_typewill select optimum configuration from pre-defined optimum configurationtable(opt_config).It also introduce flag
update_render_configwhich can set by any governor.v2:
* Move staticoptimum_configto device init time.
* Rename function to appropriate name, fix data types and patch ordering.
* Renameprev_load_typetopending_load_type. (Tvrtko Ursulin)v3:
* Add safe guard check ini915_gem_context_set_load_type.
* Rename struct fromoptimum_configtoi915_sseu_optimum_configto avoid namespace clashes.
* Reduces memcpy for space efficient.
* Rebase.
* Improved commit message. (Tvrtko Ursulin)v4:
* Move optimum config table to file scope. (Tvrtko Ursulin)v5:
* Adds optimal table of slice/sub-slice/EU for Gen 9 GT1.
* Rebase.v6:
* Rebase.
* Fix warnings.v7:
* Fix return conditions.
* Removei915_gem_context_set_load_typeand move logic to__execlists_update_reg_state. (Tvrtko Ursulin)v8:
* Fix warnings.
* Rebase.Cc Vipin Anand <[email protected]>Signed-off-by Ankit Navik <[email protected]>--- drivers/gpu/drm/i915/gem/i915_gem_context.c | 3 + drivers/gpu/drm/i915/gem/i915_gem_context_types.h | 32 +++++++++++ drivers/gpu/drm/i915/gt/intel_context_sseu.c | 2 + drivers/gpu/drm/i915/gt/intel_context_types.h | 2 + drivers/gpu/drm/i915/gt/intel_lrc.c | 70 ++++++++++++++++++++++- drivers/gpu/drm/i915/i915_drv.h | 5 ++ drivers/gpu/drm/i915/intel_device_info.c | 59 ++++++++++++++++++- 7 files changed, 169 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/gem/i915_gem_context.c +3
-0@@ -880,6 +880,9 @@ i915_gem_create_context(struct drm_i915_private *i915, unsigned int flags)trace_i915_context_create (ctx);atomic_set (&ctx->req_cnt,0 ); + ctx->slice_cnt =hweight8 (RUNTIME_INFO (i915)->sseu.slice_mask); + ctx->subslice_cnt =hweight8 (RUNTIME_INFO (i915)->sseu.subslice_mask[0 ]); + ctx->eu_cnt =RUNTIME_INFO (i915)->sseu.eu_per_subslice;return ctx; }drivers/gpu/drm/i915/gem/i915_gem_context_types.h +32
-0@@ -46,6 +46,19 @@ struct i915_gem_engines_iter {const struct i915_gem_engines *engines; }; +enum gem_load_type { +LOAD_TYPE_LOW , +LOAD_TYPE_MEDIUM , +LOAD_TYPE_HIGH , +LOAD_TYPE_LAST +}; + +struct i915_sseu_optimum_config { +u8 slice; +u8 subslice; +u8 eu; +}; +/** * struct i915_gem_context - client state * @@ -155,6 +168,25 @@ struct i915_gem_context {*/ atomic_t active_count; +/** slice_cnt: used to set the # of slices to be enabled. */ +u8 slice_cnt; + +/** subslice_cnt: used to set the # of subslices to be enabled. */ +u8 subslice_cnt; + +/** eu_cnt: used to set the # of eu to be enabled. */ +u8 eu_cnt; + +/** load_type: The designated load_type (high/medium/low) for a given +* number of pending commands in the command queue. +*/ +enum gem_load_type load_type; + +/** pending_load_type: The earlier load type that the GPU was configured +* for (high/medium/low). +*/ +enum gem_load_type pending_load_type; +/** * @hang_timestamp: The last time(s) this context caused a GPU hang */ drivers/gpu/drm/i915/gt/intel_context_sseu.c +2
-0@@ -84,6 +84,8 @@ intel_context_reconfigure_sseu(struct intel_context *ce,if (ret)return ret; + ce->user_sseu = true; +/* Nothing to do if unmodified. */ if (!memcmp (&ce->sseu, &sseu,sizeof (sseu))) goto unlock;drivers/gpu/drm/i915/gt/intel_context_types.h +2
-0@@ -93,6 +93,8 @@ struct intel_context {const struct intel_context_ops *ops; +bool user_sseu; +/** sseu: Control eu/slice partitioning */ struct intel_sseu sseu; };drivers/gpu/drm/i915/gt/intel_lrc.c +45
-0@@ -177,6 +177,14 @@/* Typical size of the average request (2 pipecontrols and a MI_BB) */ #define EXECLISTS_REQUEST_SIZE 64/* bytes */ +/* +* Anything above threshold is considered as HIGH load, less is considered +* as LOW load and equal is considered as MEDIUM load. +* +* The threshold value of three active requests pending. +*/ +#define PENDING_THRESHOLD_MEDIUM 3 +struct virtual_engine {struct intel_engine_cs base;struct intel_context context;@@ -3002,6 +3010,36 @@ static void execlists_context_unpin(struct intel_context *ce)i915_gem_object_unpin_map (ce->state->obj); } +static u32 +get_context_rpcs_config (struct i915_gem_context *ctx) +{ +u32 rpcs =0 ; +struct drm_i915_private *dev_priv = ctx->i915; + +if (INTEL_GEN (dev_priv) <8 ) +return 0 ; + +if (RUNTIME_INFO (dev_priv)->sseu.has_slice_pg) { + rpcs |=GEN8_RPCS_S_CNT_ENABLE ; + rpcs |= ctx->slice_cnt <<GEN8_RPCS_S_CNT_SHIFT ; + rpcs |=GEN8_RPCS_ENABLE ; + } + +if (RUNTIME_INFO (dev_priv)->sseu.has_subslice_pg) { + rpcs |=GEN8_RPCS_SS_CNT_ENABLE ; + rpcs |= ctx->subslice_cnt <<GEN8_RPCS_SS_CNT_SHIFT ; + rpcs |=GEN8_RPCS_ENABLE ; + } + +if (RUNTIME_INFO (dev_priv)->sseu.has_eu_pg) { + rpcs |= ctx->eu_cnt <<GEN8_RPCS_EU_MIN_SHIFT ; + rpcs |= ctx->eu_cnt <<GEN8_RPCS_EU_MAX_SHIFT ; + rpcs |=GEN8_RPCS_ENABLE ; + } + +return rpcs; +} + static void __execlists_update_reg_state(const struct intel_context *ce, const struct intel_engine_cs *engine,@@ -3009,6 +3047,10 @@ __execlists_update_reg_state(const struct intel_context *ce, {struct intel_ring *ring = ce->ring;u32 *regs = ce->lrc_reg_state; +const struct i915_sseu_optimum_config *cfg; +struct i915_gem_context *ctx; +enum gem_load_type load_type; +u32 req_pending;GEM_BUG_ON (!intel_ring_offset_valid (ring, head));GEM_BUG_ON (!intel_ring_offset_valid (ring, ring->tail));@@ -3018,10 +3060,31 @@ __execlists_update_reg_state(const struct intel_context *ce, regs[CTX_RING_TAIL ] = ring->tail; regs[CTX_RING_CTL ] =RING_CTL_SIZE (ring->size) |RING_VALID ; +GEM_BUG_ON (ce->engine->class !=RENDER_CLASS ); + ctx =rcu_dereference_protected (ce->gem_context, true); +
drivers/gpu/drm/i915/gt/intel_lrc.c __execlists_update_reg_state(const struct intel_context *ce, · line 3075
Quoted 10 lines
drivers/gpu/drm/i915/gt/intel_lrc.c +10
-0+ req_pending =atomic_read (&ctx->req_cnt); + +if (req_pending >PENDING_THRESHOLD_MEDIUM ) + load_type =LOAD_TYPE_HIGH ; +else if (req_pending ==PENDING_THRESHOLD_MEDIUM ) + load_type =LOAD_TYPE_MEDIUM ; +else + load_type =LOAD_TYPE_LOW ; + + cfg = &ctx->i915->opt_config[load_type];
cfg = ...
drivers/gpu/drm/i915/gt/intel_lrc.c __execlists_update_reg_state(const struct intel_context *ce, · line 3086
Quoted 13 lines
drivers/gpu/drm/i915/gt/intel_lrc.c +9
-2+/* RPCS */ if (engine->class ==RENDER_CLASS ) { - regs[CTX_R_PWR_CLK_STATE ] = -intel_sseu_make_rpcs (engine->i915, &ce->sseu); + +if (!ctx || !ctx->i915->predictive_load_enable + || ce->user_sseu) { + regs[CTX_R_PWR_CLK_STATE ] = +intel_sseu_make_rpcs (engine->i915, &ce->sseu); + }else { + regs[CTX_R_PWR_CLK_STATE ] = +get_context_rpcs_config (ce->gem_context);
... cfg not used. It would be impressive if this series shows any measurable change! :)
Take https://patchwork.freedesktop.org/patch/348167/?series=71875&rev=1 as a base and just change the logic in intel_sseu_make please.
Regards,
Tvrtko
Quoted 102 lines
drivers/gpu/drm/i915/gt/intel_lrc.c +4
-0+ }i915_oa_init_reg_state (ce, engine); }@@ -3046,6 +3109,9 @@ __execlists_context_pin(struct intel_context *ce, ce->lrc_reg_state = vaddr +LRC_STATE_PN *PAGE_SIZE ;__execlists_update_reg_state (ce, engine, ce->ring->tail); +if (ce->gem_context->load_type != ce->gem_context->pending_load_type) + ce->gem_context->load_type = ce->gem_context->pending_load_type; +return 0 ; }drivers/gpu/drm/i915/i915_drv.h +5
-0@@ -924,6 +924,11 @@ struct drm_i915_private {/* protects panel power sequencer state */ struct mutex pps_mutex; +/* optimal slice/subslice/EU configration state */ +struct i915_sseu_optimum_config *opt_config; + +bool predictive_load_enable; +unsigned int fsb_freq, mem_freq, is_ddr3;unsigned int skl_preferred_vco_freq;unsigned int max_cdclk_freq;drivers/gpu/drm/i915/intel_device_info.c +50
-2@@ -899,6 +899,34 @@ void intel_device_info_subplatform_init(struct drm_i915_private *i915)RUNTIME_INFO (i915)->platform_mask[pi] |= mask; } +/* static table of slice/subslice/EU for Cherryview */ +static const struct i915_sseu_optimum_config chv_config[LOAD_TYPE_LAST ] = { + {1 ,1 ,4 },/* Low */ + {1 ,1 ,6 },/* Medium */ + {1 ,2 ,6 }/* High */ +}; + +/* static table of slice/subslice/EU for GLK GT1 */ +static const struct i915_sseu_optimum_config glk_gt1_config[LOAD_TYPE_LAST ] = { + {1 ,2 ,2 },/* Low */ + {1 ,2 ,3 },/* Medium */ + {1 ,2 ,6 }/* High */ +}; + +/* static table of slice/subslice/EU for KBL GT2 */ +static const struct i915_sseu_optimum_config kbl_gt2_config[LOAD_TYPE_LAST ] = { + {1 ,3 ,2 },/* Low */ + {1 ,3 ,4 },/* Medium */ + {1 ,3 ,8 }/* High */ +}; + +/* static table of slice/subslice/EU for KBL GT3 */ +static const struct i915_sseu_optimum_config kbl_gt3_config[LOAD_TYPE_LAST ] = { + {2 ,3 ,4 },/* Low */ + {2 ,3 ,6 },/* Medium */ + {2 ,3 ,8 }/* High */ +}; +/** * intel_device_info_runtime_init - initialize runtime info * @dev_priv: the i915 device @@ -1027,12 +1055,39 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)/* Initialize slice/subslice/EU info */ if (IS_HASWELL (dev_priv))hsw_sseu_info_init (dev_priv); -else if (IS_CHERRYVIEW (dev_priv)) +else if (IS_CHERRYVIEW (dev_priv)) {cherryview_sseu_info_init (dev_priv); +BUILD_BUG_ON (ARRAY_SIZE (chv_config) !=LOAD_TYPE_LAST ); + dev_priv->opt_config = (struct i915_sseu_optimum_config *) + chv_config; + }else if (IS_BROADWELL (dev_priv))bdw_sseu_info_init (dev_priv); -else if (IS_GEN (dev_priv,9 )) +else if (IS_GEN (dev_priv,9 )) {gen9_sseu_info_init (dev_priv); + +switch (info->gt) { +default :/* fall through */ +case 1 : +BUILD_BUG_ON (ARRAY_SIZE (glk_gt1_config) != +LOAD_TYPE_LAST ); + dev_priv->opt_config = + (struct i915_sseu_optimum_config *) glk_gt1_config; +break ; +case 2 : +BUILD_BUG_ON (ARRAY_SIZE (kbl_gt2_config) != +LOAD_TYPE_LAST ); + dev_priv->opt_config = + (struct i915_sseu_optimum_config *) kbl_gt2_config; +break ; +case 3 :
drivers/gpu/drm/i915/intel_device_info.c void intel_device_info_runtime_init(struct drm_i915_private *dev_priv) · line 1093
Quoted 10 lines
drivers/gpu/drm/i915/intel_device_info.c +7
-0+BUILD_BUG_ON (ARRAY_SIZE (kbl_gt3_config) != +LOAD_TYPE_LAST ); + dev_priv->opt_config = + (struct i915_sseu_optimum_config *)kbl_gt3_config; +break ; + } + }else if (IS_GEN (dev_priv,10 ))gen10_sseu_info_init (dev_priv);else if (IS_GEN (dev_priv,11 ))
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v8 3/3 drm/i915: Predictive governor to control slice/subslice/eu
In reply to Ankit NavikLoad classification is used for predictive governor to control eu/slice/subslice based on workloads.
sysfs is provided to enable/disable the feature
V2:
* Fix code style.
* Move predictive_load_timer into a drm_i915_private structure.
* Make generic function to set optimum config. (Tvrtko Ursulin)
V3:
* Rebase.
* Fix race condition for predictive load set.
* Add slack to start hrtimer for more power efficient. (Tvrtko Ursulin)
V4:
* Fix data type and initialization of mutex to protect predictive load state.
* Move predictive timer init to i915_gem_init_early. (Tvrtko Ursulin)
* Move debugfs to kernel parameter.
V5:
* Rebase.
* Remove mutex for pred_timer
V6:
* Rebase.
* Fix warnings.
V7:
* Drop timer and move logic to __execlists_update_reg_state. (Tvrtko Ursulin)
* Remove kernel boot param and make it to sysfs entry. (Jani Nikula)
v8:
* Rebase.
--- drivers/gpu/drm/i915/i915_sysfs.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
drivers/gpu/drm/i915/i915_sysfs.c +32 -0
@@ -433,12 +433,43 @@ static ssize_t gt_min_freq_mhz_store(struct device *kdev,return ret ?: count; } +static ssize_t deu_enable_show (struct device *kdev,struct device_attribute *attr,char *buf) +{ +struct drm_i915_private *i915 =kdev_minor_to_i915 (kdev); + +return snprintf (buf,PAGE_SIZE ,"%u\n" , i915->predictive_load_enable); +} + +static ssize_t deu_enable_store (struct device *kdev, +struct device_attribute *attr, +const char *buf, +size_t count) +{ +struct drm_i915_private *i915 =kdev_minor_to_i915 (kdev); +ssize_t ret; +u32 val; + + ret =kstrtou32 (buf,0 , &val); +if (ret) +return ret; + +/* Check invalid values */ +if (val !=0 && val !=1 ) + ret = -EINVAL ; + + i915->predictive_load_enable = val; + +return count; +} +static DEVICE_ATTR_RO (gt_act_freq_mhz);static DEVICE_ATTR_RO (gt_cur_freq_mhz);static DEVICE_ATTR_RW (gt_boost_freq_mhz);static DEVICE_ATTR_RW (gt_max_freq_mhz);static DEVICE_ATTR_RW (gt_min_freq_mhz); +static DEVICE_ATTR_RW (deu_enable); +static DEVICE_ATTR_RO (vlv_rpe_freq_mhz);static ssize_t gt_rp_mhz_show (struct device *kdev,struct device_attribute *attr,char *buf);
@@ -474,6 +505,7 @@ static const struct attribute * const gen6_attrs[] = { &dev_attr_gt_RP0_freq_mhz.attr, &dev_attr_gt_RP1_freq_mhz.attr, &dev_attr_gt_RPn_freq_mhz.attr, + &dev_attr_deu_enable.attr, NULL, };
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Dynamic EU configuration of Slice/Sub-slice/EU (rev8)
In reply to Ankit Navik== Series Details ==
== Series Details ==
Series: Dynamic EU configuration of Slice/Sub-slice/EU (rev8)
URL : https://patchwork.freedesktop.org/series/69980/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
bb031637fc75 drm/i915: Get active pending request for given context
-:95: CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#95: FILE: drivers/gpu/drm/i915/gt/intel_lrc.c:2164:
+ ctx = rcu_dereference_protected(total: 0 errors, 0 warnings, 1 checks, 47 lines checkeda8e1bd3e403d drm/i915: set optimum eu/slice/sub-slice configuration based on load type -:231: CHECK:BRACES: Blank lines aren't necessary after an open brace '{' #231: FILE: drivers/gpu/drm/i915/gt/intel_lrc.c:3079:
if (engine->class == RENDER_CLASS) {
+
-:233: CHECK:LOGICAL_CONTINUATIONS: Logical continuations should be on the previous line #233: FILE: drivers/gpu/drm/i915/gt/intel_lrc.c:3081:
+ if (!ctx || !ctx->i915->predictive_load_enable
+ || ce->user_sseu) {
-:261: WARNING:TYPO_SPELLING: 'configration' may be misspelled - perhaps 'configuration'? #261: FILE: drivers/gpu/drm/i915/i915_drv.h:927:
+ /* optimal slice/subslice/EU configration state */
-:331: CHECK:SPACING: No space is necessary after a cast #331: FILE: drivers/gpu/drm/i915/intel_device_info.c:1075:
+ (struct i915_sseu_optimum_config *) glk_gt1_config;
-:337: CHECK:SPACING: No space is necessary after a cast #337: FILE: drivers/gpu/drm/i915/intel_device_info.c:1081:
+ (struct i915_sseu_optimum_config *) kbl_gt2_config;
total: 0 errors, 1 warnings, 4 checks, 257 lines checked0267ce00b30c drm/i915: Predictive governor to control slice/subslice/eu
-:37: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #37:
* Drop timer and move logic to __execlists_update_reg_state. (Tvrtko Ursulin)
total: 0 errors, 1 warnings, 0 checks, 50 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Dynamic EU configuration of Slice/Sub-slice/EU (rev8)
In reply to Ankit Navik== Series Details ==
== Series Details ==
Series: Dynamic EU configuration of Slice/Sub-slice/EU (rev8)
URL : https://patchwork.freedesktop.org/series/69980/
State : warning
== Summary ==
$ dim sparse origin/drm-tip Sparse version: v0.6.0 Commit: drm/i915: Get active pending request for given context Okay!
Commit: drm/i915: set optimum eu/slice/sub-slice configuration based on load type+drivers/gpu/drm/i915/gt/intel_lrc.c:3086:59: expected struct i915_gem_context *ctx+drivers/gpu/drm/i915/gt/intel_lrc.c:3086:59: got struct i915_gem_context [noderef] <asn:4> *const gem_context+drivers/gpu/drm/i915/gt/intel_lrc.c:3086:59: warning: incorrect type in argument 1 (different address spaces) +drivers/gpu/drm/i915/gt/intel_lrc.c:3112:15: warning: dereference of noderef expression +drivers/gpu/drm/i915/gt/intel_lrc.c:3112:45: warning: dereference of noderef expression +drivers/gpu/drm/i915/gt/intel_lrc.c:3113:19: warning: dereference of noderef expression +drivers/gpu/drm/i915/gt/intel_lrc.c:3113:48: warning: dereference of noderef expression
Commit: drm/i915: Predictive governor to control slice/subslice/eu Okay!
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for Dynamic EU configuration of Slice/Sub-slice/EU (rev8)
In reply to Ankit Navik== Series Details ==
== Series Details ==
Series: Dynamic EU configuration of Slice/Sub-slice/EU (rev8)
URL : https://patchwork.freedesktop.org/series/69980/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_8141 -> Patchwork_16989
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_16989 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_16989, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16989/index.html
Changes
-------
No changes found
Participating hosts (47 -> 12)
------------------------------
ERROR: It appears as if the changes made in Patchwork_16989 prevented too many machines from booting.
Missing (35): fi-kbl-soraka fi-bdw-gvtdvm fi-icl-u2 fi-apl-guc fi-icl-y fi-skl-lmem fi-icl-guc fi-icl-dsi fi-skl-6600u fi-cml-u2 fi-bxt-dsi fi-bdw-5557u fi-cml-s fi-tgl-u fi-bsw-n3050 fi-glk-dsi fi-kbl-7500u fi-bsw-nick fi-skl-6700k2 fi-kbl-r fi-ehl-1 fi-tgl-dsi fi-skl-guc fi-cfl-8700k fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-cfl-guc fi-kbl-guc fi-kbl-x1275 fi-cfl-8109u fi-kbl-8809g fi-bsw-kefka fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_8141 -> Patchwork_16989
CI-20190529: 20190529
CI_DRM_8141: f7be958f2574d30bad18983c3afe2c5401674dfb @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5513: 417c926459dacf062f2945d3ba01a3f94551b16f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_16989: 0267ce00b30c4ebd3b4de30a1edf7c19c1a43b49 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
0267ce00b30c drm/i915: Predictive governor to control slice/subslice/eu a8e1bd3e403d drm/i915: set optimum eu/slice/sub-slice configuration based on load type bb031637fc75 drm/i915: Get active pending request for given context
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16989/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.DOCS: warning for Dynamic EU configuration of Slice/Sub-slice/EU (rev8)
In reply to Ankit Navik== Series Details ==
== Series Details ==
Series: Dynamic EU configuration of Slice/Sub-slice/EU (rev8)
URL : https://patchwork.freedesktop.org/series/69980/
State : warning
== Summary ==
$ make htmldocs 2>&1 > /dev/null | grep i915 Error: Cannot open file ./drivers/gpu/drm/i915/i915_gem_fence_reg.c Error: Cannot open file ./drivers/gpu/drm/i915/i915_gem_fence_reg.c Error: Cannot open file ./drivers/gpu/drm/i915/i915_gem_fence_reg.c Error: Cannot open file ./drivers/gpu/drm/i915/i915_gem_fence_reg.c WARNING: kernel-doc './scripts/kernel-doc -rst -enable-lineno -internal ./drivers/gpu/drm/i915/i915_gem_fence_reg.c' failed with return code 2 WARNING: kernel-doc './scripts/kernel-doc -rst -enable-lineno -function fence register handling ./drivers/gpu/drm/i915/i915_gem_fence_reg.c' failed with return code 1 WARNING: kernel-doc './scripts/kernel-doc -rst -enable-lineno -function tiling swizzling details ./drivers/gpu/drm/i915/i915_gem_fence_reg.c' failed with return code 1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx