drm/i915: Allow the UMD to configure their own power clock state
Subsystems (2)
RFC 1/1 drm/i915: Allow the UMD to configure their own power clock state
This allows userspace to shutdown slices at will for performance/power reasons (because it doesn't have a use for more slices).
--- drivers/gpu/drm/i915/intel_engine_cs.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/gpu/drm/i915/intel_engine_cs.c +11 -0
@@ -628,6 +628,7 @@ static int wa_ring_whitelist_reg(struct intel_engine_cs *engine,static int gen8_init_workarounds (struct intel_engine_cs *engine) {struct drm_i915_private *dev_priv = engine->i915; +int ret;WA_SET_BIT_MASKED (INSTPM ,INSTPM_FORCE_ORDERING );
@@ -673,6 +674,11 @@ static int gen8_init_workarounds(struct intel_engine_cs *engine)GEN6_WIZ_HASHING_MASK , GEN6_WIZ_HASHING_16x4); +/* Allow the UMD to configure their own power clock state */ + ret =wa_ring_whitelist_reg (engine,GEN8_R_PWR_CLK_STATE ); +if (ret) +return ret; +return 0 ; }
@@ -841,6 +847,11 @@ static int gen9_init_workarounds(struct intel_engine_cs *engine)if (ret)return ret; +/* Allow the UMD to configure their own power clock state */ + ret =wa_ring_whitelist_reg (engine,GEN8_R_PWR_CLK_STATE ); +if (ret) +return ret; +return 0 ; }
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: Allow the UMD to configure their own power clock state
== Series Details ==
== Series Details ==
Series: drm/i915: Allow the UMD to configure their own power clock state
URL : https://patchwork.freedesktop.org/series/23846/
State : success
== Summary ==
Series 23846v1 drm/i915: Allow the UMD to configure their own power clock state
https://patchwork.freedesktop.org/api/1.0/series/23846/revisions/1/mbox/
Test drv_module_reload:
Subgroup basic-reload-final:
dmesg-warn -> PASS (fi-skl-6770hq) fdo#100248fdo#100248 https://bugs.freedesktop.org/show_bug.cgi?id=100248
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time:437s fi-bdw-gvtdvm total:278 pass:256 dwarn:8 dfail:0 fail:0 skip:14 time:427s fi-bsw-n3050 total:278 pass:242 dwarn:0 dfail:0 fail:0 skip:36 time:581s fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time:508s fi-bxt-t5700 total:278 pass:258 dwarn:0 dfail:0 fail:0 skip:20 time:562s fi-byt-j1900 total:278 pass:254 dwarn:0 dfail:0 fail:0 skip:24 time:491s fi-byt-n2820 total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:491s fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:409s fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:405s fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time:421s fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:493s fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:464s fi-kbl-7500u total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:458s fi-kbl-7560u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:568s fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:450s fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17 time:579s fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time:461s fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:490s fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time:431s fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:531s fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29 time:400s
7f027554339633cb4e6a2d3974510aaef1a9e24c drm-tip: 2017y-05m-02d-18h-48m-28s UTC integration manifest 7a90a9b drm/i915: Allow the UMD to configure their own power clock state
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4602/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Joonas Lahtinen
maintainerQuoted 6 lines · Oscar Mateo
This allows userspace to shutdown slices at will for performance/power reasons (because it doesn't have a use for more slices).
Cc Dmitry Rogozhkin <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Oscar Mateo <[email protected]>
<SNIP>
Quoted 16 lines
drivers/gpu/drm/i915/intel_engine_cs.c +0
-0@@ -673,6 +674,11 @@ static int gen8_init_workarounds(struct intel_engine_cs *engine) GEN6_WIZ_HASHING_MASK, GEN6_WIZ_HASHING_16x4);drivers/gpu/drm/i915/intel_engine_cs.c +5
-0+/* Allow the UMD to configure their own power clock state */ + ret =wa_ring_whitelist_reg (engine,GEN8_R_PWR_CLK_STATE ); +if (ret) +return ret; +return 0;
}drivers/gpu/drm/i915/intel_engine_cs.c +0
-0@@ -841,6 +847,11 @@ static int gen9_init_workarounds(struct intel_engine_cs *engine) if (ret) return ret;
drivers/gpu/drm/i915/intel_engine_cs.c static int gen8_init_workarounds(struct intel_engine_cs *engine) · line 680
Quoted 4 lines
drivers/gpu/drm/i915/intel_engine_cs.c +4
-0+/* Allow the UMD to configure their own power clock state */ + ret =wa_ring_whitelist_reg (engine,GEN8_R_PWR_CLK_STATE ); +if (ret) +return ret;
This is not a workaround, so it should be part of the cmd parser and have an userspace.
Regards, Joonas
Signature · 7 lines
Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 11 lines · Joonas Lahtinen
drivers/gpu/drm/i915/intel_engine_cs.c static int gen9_init_workarounds(struct intel_engine_cs *engine) · line 853
Quoted 8 lines
drivers/gpu/drm/i915/intel_engine_cs.c +4
-0@@ -841,6 +847,11 @@ static int gen9_init_workarounds(struct intel_engine_cs *engine)if (ret)return ret; +/* Allow the UMD to configure their own power clock state */ + ret =wa_ring_whitelist_reg (engine,GEN8_R_PWR_CLK_STATE ); +if (ret) +return ret;This is not a workaround, so it should be part of the cmd parser and have an userspace.
Yeah, the "This allows userspace ..." start of the commit message should have been a dead giveaway that we do indeed need the userspace patch for this too.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines · Daniel Vetter
Quoted 4 lines · Joonas Lahtinen
Quoted 4 lines
drivers/gpu/drm/i915/intel_engine_cs.c +0
-0@@ -841,6 +847,11 @@ static int gen9_init_workarounds(struct intel_engine_cs *engine)if (ret)return ret;
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/i915/intel_engine_cs.c static int gen8_init_workarounds(struct intel_engine_cs *engine) · line 680
Quoted 4 lines
drivers/gpu/drm/i915/intel_engine_cs.c +4
-0+/* Allow the UMD to configure their own power clock state */ + ret =wa_ring_whitelist_reg (engine,GEN8_R_PWR_CLK_STATE ); +if (ret) +return ret;This is not a workaround, so it should be part of the cmd parser and have an userspace.
cmd parser? This is Gen8+, so the cmd parser shouldn't even be active. Or am I missing something?
Quoted 4 lines
Yeah, the "This allows userspace ..." start of the commit message should have been a dead giveaway that we do indeed need the userspace patch for this too.
-Daniel
Yes, I got the memo :)
Dmitry has opened a ticket against intel-vaapi-driver (https://github.com/01org/intel-vaapi-driver/issues/152) so hopefully we will have a userspace soon.
-- Oscar
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Joonas Lahtinen
maintainerQuoted 23 lines · Oscar Mateo
Quoted 10 lines · Daniel Vetter
Quoted 7 lines · Joonas Lahtinen
Quoted 7 lines
drivers/gpu/drm/i915/intel_engine_cs.c +0
-0@@ -841,6 +847,11 @@ static int gen9_init_workarounds(struct intel_engine_cs *engine) if (ret) return ret;Quoted 9 lines
Quoted 9 lines
Review static int gen9_init_workarounds(struct · line 856
Quoted 6 lines
(quoted diff) +4
-0+ /* Allow the UMD to configure their own power clock state */ + ret = wa_ring_whitelist_reg(engine, GEN8_R_PWR_CLK_STATE); + if (ret) + return ret;This is not a workaround, so it should be part of the cmd parser and
have an userspace.
Quoted 3 lines
cmd parser? This is Gen8+, so the cmd parser shouldn't even be active.
Or am I missing something?
That's correct, my bad.
Quoted 8 lines
Quoted 7 lines
Yeah, the "This allows userspace ..." start of the commit message should have been a dead giveaway that we do indeed need the userspace
patch for this too.
-Daniel
Quoted 5 lines
Yes, I got the memo :)
Dmitry has opened a ticket against intel-vaapi-driver
(https://github.com/01org/intel-vaapi-driver/issues/152) so hopefully we
will have a userspace soon.
So with the userspace, we can merge.
Regards, Joonas
Signature · 7 lines
Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 23 lines · Oscar Mateo
This allows userspace to shutdown slices at will for performance/power reasons (because it doesn't have a use for more slices).
Cc Dmitry Rogozhkin <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Oscar Mateo <[email protected]>--- drivers/gpu/drm/i915/intel_engine_cs.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/gpu/drm/i915/intel_engine_cs.c +1
-0@@ -628,6 +628,7 @@ static int wa_ring_whitelist_reg(struct intel_engine_cs *engine,static int gen8_init_workarounds (struct intel_engine_cs *engine) {struct drm_i915_private *dev_priv = engine->i915; +int ret;WA_SET_BIT_MASKED (INSTPM ,INSTPM_FORCE_ORDERING );
drivers/gpu/drm/i915/intel_engine_cs.c static int gen8_init_workarounds(struct intel_engine_cs *engine) · line 681
Quoted 8 lines
drivers/gpu/drm/i915/intel_engine_cs.c +5
-0@@ -673,6 +674,11 @@ static int gen8_init_workarounds(struct intel_engine_cs *engine)GEN6_WIZ_HASHING_MASK , GEN6_WIZ_HASHING_16x4); +/* Allow the UMD to configure their own power clock state */ + ret =wa_ring_whitelist_reg (engine,GEN8_R_PWR_CLK_STATE ); +if (ret) +return ret; +
How will the different userspace clients coordinate with the slice state? I guess in another words, is this part of the context?
-Mika
Quoted 22 lines
drivers/gpu/drm/i915/intel_engine_cs.c +5
-0return 0 ; }@@ -841,6 +847,11 @@ static int gen9_init_workarounds(struct intel_engine_cs *engine)if (ret)return ret; +/* Allow the UMD to configure their own power clock state */ + ret =wa_ring_whitelist_reg (engine,GEN8_R_PWR_CLK_STATE ); +if (ret) +return ret; +return 0 ; }Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 37 lines · Mika Kuoppala
Quoted 23 lines · Oscar Mateo
This allows userspace to shutdown slices at will for performance/power reasons (because it doesn't have a use for more slices).
Cc Dmitry Rogozhkin <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Oscar Mateo <[email protected]>--- drivers/gpu/drm/i915/intel_engine_cs.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/gpu/drm/i915/intel_engine_cs.c +1
-0@@ -628,6 +628,7 @@ static int wa_ring_whitelist_reg(struct intel_engine_cs *engine,static int gen8_init_workarounds (struct intel_engine_cs *engine) {struct drm_i915_private *dev_priv = engine->i915; +int ret;WA_SET_BIT_MASKED (INSTPM ,INSTPM_FORCE_ORDERING );drivers/gpu/drm/i915/intel_engine_cs.c static int gen8_init_workarounds(struct intel_engine_cs *engine) · line 681
Quoted 8 lines
drivers/gpu/drm/i915/intel_engine_cs.c +5
-0@@ -673,6 +674,11 @@ static int gen8_init_workarounds(struct intel_engine_cs *engine)GEN6_WIZ_HASHING_MASK , GEN6_WIZ_HASHING_16x4); +/* Allow the UMD to configure their own power clock state */ + ret =wa_ring_whitelist_reg (engine,GEN8_R_PWR_CLK_STATE ); +if (ret) +return ret; +How will the different userspace clients coordinate with the slice state? I guess in another words, is this part of the context?
Quoted 2 lines
-Mika
Spec says (see IHD-OS-SKL-Vol2c-05.16 page 614):
"This register must be initialized correctly when the context is submitted for the first time. This register is context save/restored as part of Exec-List context image in both Exec-List and Ring-Buffer mode of scheduling."
So we're good, right?
Except there's also:
"This register must not be programmed using MI_LOAD_REGISTER_IMM command in ring buffer or in batch buffer, however programming "NON - SLM Indication" field through MI_LOAD_REGISTER_IMM is an exception defined below. If a need arises to change the render configuration for a context being executed in HW, Scheduler must preempt the context and update the desired render configuration in the logical render context image in memory and resubmit the context"
So... are we sure that we're fine with giving userspace control over this register? If so - it would still be a good idea to mention that the info in the spec is bogus (commit message or just a comment).
-Michał
Quoted 19 lines
Quoted 19 lines
drivers/gpu/drm/i915/intel_engine_cs.c +5
-0return 0 ; }@@ -841,6 +847,11 @@ static int gen9_init_workarounds(struct intel_engine_cs *engine)if (ret)return ret; +/* Allow the UMD to configure their own power clock state */ + ret =wa_ring_whitelist_reg (engine,GEN8_R_PWR_CLK_STATE ); +if (ret) +return ret; +return 0 ; }Signature · 1 line
1.9.1
Quoted 8 lines
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 56 lines · Michał Winiarski
Quoted 37 lines · Mika Kuoppala
Quoted 23 lines · Oscar Mateo
This allows userspace to shutdown slices at will for performance/power reasons (because it doesn't have a use for more slices).
Cc Dmitry Rogozhkin <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Oscar Mateo <[email protected]>--- drivers/gpu/drm/i915/intel_engine_cs.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/gpu/drm/i915/intel_engine_cs.c +1
-0@@ -628,6 +628,7 @@ static int wa_ring_whitelist_reg(struct intel_engine_cs *engine,static int gen8_init_workarounds (struct intel_engine_cs *engine) {struct drm_i915_private *dev_priv = engine->i915; +int ret;WA_SET_BIT_MASKED (INSTPM ,INSTPM_FORCE_ORDERING );drivers/gpu/drm/i915/intel_engine_cs.c static int gen8_init_workarounds(struct intel_engine_cs *engine) · line 681
Quoted 8 lines
drivers/gpu/drm/i915/intel_engine_cs.c +5
-0@@ -673,6 +674,11 @@ static int gen8_init_workarounds(struct intel_engine_cs *engine)GEN6_WIZ_HASHING_MASK , GEN6_WIZ_HASHING_16x4); +/* Allow the UMD to configure their own power clock state */ + ret =wa_ring_whitelist_reg (engine,GEN8_R_PWR_CLK_STATE ); +if (ret) +return ret; +How will the different userspace clients coordinate with the slice state? I guess in another words, is this part of the context?
Quoted 2 lines
-Mika
Spec says (see IHD-OS-SKL-Vol2c-05.16 page 614):
"This register must be initialized correctly when the context is submitted for the first time. This register is context save/restored as part of Exec-List context image in both Exec-List and Ring-Buffer mode of scheduling."So we're good, right?
Except there's also:
"This register must not be programmed usingMI_LOAD_REGISTER_IMMcommand in ring buffer or in batch buffer, however programming "NON - SLM Indication" field throughMI_LOAD_REGISTER_IMMis an exception defined below. If a need arises to change the render configuration for a context being executed in HW, Scheduler must preempt the context and update the desired render configuration in the logical render context image in memory and resubmit the context"
Quoted 3 lines
So... are we sure that we're fine with giving userspace control over this register? If so - it would still be a good idea to mention that the info in the spec is bogus (commit message or just a comment).
Doesn't sound like it. So we are back to doing the preempt and changing the context image as suggested in the other patch. Still we have the issue that OA config conflicts with changing the slice eu config. -Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 37 lines · Michał Winiarski
Quoted 36 lines · Mika Kuoppala
Quoted 23 lines · Oscar Mateo
This allows userspace to shutdown slices at will for performance/power reasons (because it doesn't have a use for more slices).
Cc Dmitry Rogozhkin <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Oscar Mateo <[email protected]>--- drivers/gpu/drm/i915/intel_engine_cs.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/gpu/drm/i915/intel_engine_cs.c +1
-0@@ -628,6 +628,7 @@ static int wa_ring_whitelist_reg(struct intel_engine_cs *engine,static int gen8_init_workarounds (struct intel_engine_cs *engine) {struct drm_i915_private *dev_priv = engine->i915; +int ret;WA_SET_BIT_MASKED (INSTPM ,INSTPM_FORCE_ORDERING );drivers/gpu/drm/i915/intel_engine_cs.c static int gen8_init_workarounds(struct intel_engine_cs *engine) · line 681
Quoted 8 lines
drivers/gpu/drm/i915/intel_engine_cs.c +5
-0@@ -673,6 +674,11 @@ static int gen8_init_workarounds(struct intel_engine_cs *engine)GEN6_WIZ_HASHING_MASK , GEN6_WIZ_HASHING_16x4); +/* Allow the UMD to configure their own power clock state */ + ret =wa_ring_whitelist_reg (engine,GEN8_R_PWR_CLK_STATE ); +if (ret) +return ret; +How will the different userspace clients coordinate with the slice state? I guess in another words, is this part of the context?
Quoted 1 line
Quoted 1 line
-Mika
As Michal said, this is context-saved/restored, so no need to coordinate between clients.
Quoted 6 lines
Spec says (see IHD-OS-SKL-Vol2c-05.16 page 614):
"This register must be initialized correctly when the context is submitted for the first time. This register is context save/restored as part of Exec-List context image in both Exec-List and Ring-Buffer mode of scheduling."So we're good, right?
Ditto :)
Quoted 9 lines
Except there's also:
"This register must not be programmed usingMI_LOAD_REGISTER_IMMcommand in ring buffer or in batch buffer, however programming "NON - SLM Indication" field throughMI_LOAD_REGISTER_IMMis an exception defined below. If a need arises to change the render configuration for a context being executed in HW, Scheduler must preempt the context and update the desired render configuration in the logical render context image in memory and resubmit the context"
Quoted 3 lines
So... are we sure that we're fine with giving userspace control over this register? If so - it would still be a good idea to mention that the info in the spec is bogus (commit message or just a comment).
This approach has been double-checked with HW and they believe there should be no problem, as long as the update is done as:
- PIPECONTROL - Stalling flish, flush all caches (color, depth, DC$)
- LOAD_REGISTER_IMMEDIATE - R_PWR_CLK_STATE
- Reprogram complete state
I'm trying to get them to change the BSpec accordingly.
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
drivers/gpu/drm/i915/intel_engine_cs.c +5
-0return 0 ; }@@ -841,6 +847,11 @@ static int gen9_init_workarounds(struct intel_engine_cs *engine)if (ret)return ret; +/* Allow the UMD to configure their own power clock state */ + ret =wa_ring_whitelist_reg (engine,GEN8_R_PWR_CLK_STATE ); +if (ret) +return ret; +return 0 ; }Signature · 1 line
1.9.1
Quoted 10 lines
Quoted 10 lines
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx