drm/i915/guc: Remove one unnecessary variable
Subsystems (2)
PATCH 1/1 drm/i915/guc: Remove one unnecessary variable
From: Tvrtko Ursulin <[email protected]>
No need for local struct drm_device * since dev_priv is the correct thing to pass in to NEEDS_WaRsDisableCoarsePowerGating anyway. Changed the macro definition for the latter to reflect that as well.
--- drivers/gpu/drm/i915/i915_drv.h | 7 ++++--- drivers/gpu/drm/i915/i915_guc_submission.c | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +4 -3
@@ -2788,9 +2788,10 @@ struct drm_i915_cmd_table {#define HAS_BROKEN_CS_TLB (dev) (IS_I830(dev) || IS_845G(dev))/* WaRsDisableCoarsePowerGating:skl,bxt */ -#define NEEDS_WaRsDisableCoarsePowerGating (dev) (IS_BXT_REVID(dev, 0, BXT_REVID_A1) || \ - IS_SKL_GT3(dev) || \ - IS_SKL_GT4(dev)) +#define NEEDS_WaRsDisableCoarsePowerGating (dev_priv) (IS_BXT_REVID(dev_priv, \ + 0, BXT_REVID_A1) || \ + IS_SKL_GT3(dev_priv) || \ + IS_SKL_GT4(dev_priv))/* * dp aux and gmbus irq on gen4 seems to be able to generate legacy interrupts
drivers/gpu/drm/i915/i915_guc_submission.c +1 -2
@@ -153,12 +153,11 @@ static int host2guc_sample_forcewake(struct intel_guc *guc, struct i915_guc_client *client) {struct drm_i915_private *dev_priv =guc_to_i915 (guc); -struct drm_device *dev = dev_priv->dev;u32 data[2 ]; data[0 ] =HOST2GUC_ACTION_SAMPLE_FORCEWAKE ;/* WaRsDisableCoarsePowerGating:skl,bxt */ -if (!intel_enable_rc6 () ||NEEDS_WaRsDisableCoarsePowerGating (dev)) +if (!intel_enable_rc6 () ||NEEDS_WaRsDisableCoarsePowerGating (dev_priv)) data[1 ] =0 ;else /* bit 0 and 1 are for Render and Media domain separately */
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 19 lines · Tvrtko Ursulin
From: Tvrtko Ursulin <[email protected]>
No need for local struct
drm_device* sincedev_privis the correct thing to pass in toNEEDS_WaRsDisableCoarsePowerGatinganyway. Changed the macro definition for the latter to reflect that as well.Signed-off-by Tvrtko Ursulin <[email protected]>Cc Dave Gordon <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 7 ++++--- drivers/gpu/drm/i915/i915_guc_submission.c | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/i915_drv.h +0
-0
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_cmd_table { · line 2794
Quoted 10 lines
drivers/gpu/drm/i915/i915_drv.h +4
-3@@ -2788,9 +2788,10 @@ struct drm_i915_cmd_table {#define HAS_BROKEN_CS_TLB (dev) (IS_I830(dev) || IS_845G(dev))/* WaRsDisableCoarsePowerGating:skl,bxt */ -#define NEEDS_WaRsDisableCoarsePowerGating (dev) (IS_BXT_REVID(dev, 0, BXT_REVID_A1) || \ - IS_SKL_GT3(dev) || \ - IS_SKL_GT4(dev)) +#define NEEDS_WaRsDisableCoarsePowerGating (dev_priv) (IS_BXT_REVID(dev_priv, \ + 0, BXT_REVID_A1) || \ + IS_SKL_GT3(dev_priv) || \ + IS_SKL_GT4(dev_priv))
#define NEEDS_WaRsDisableCoarsePowerGating(dev_priv) \ (IS_BXT_REVID(dev_priv, 0, BXT_REVID_A1) || \ IS_SKL_GT3(dev_priv) || IS_SKL_GT4(dev_priv))
Other than that,
Just wondering if you fancy having a go at IS_SKL_GT(dev_priv, min, max)... -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 36 lines · Chris Wilson
Quoted 19 lines · Tvrtko Ursulin
From: Tvrtko Ursulin <[email protected]>
No need for local struct
drm_device* sincedev_privis the correct thing to pass in toNEEDS_WaRsDisableCoarsePowerGatinganyway. Changed the macro definition for the latter to reflect that as well.Signed-off-by Tvrtko Ursulin <[email protected]>Cc Dave Gordon <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 7 ++++--- drivers/gpu/drm/i915/i915_guc_submission.c | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/i915_drv.h +0
-0drivers/gpu/drm/i915/i915_drv.h struct drm_i915_cmd_table { · line 2794
Quoted 10 lines
drivers/gpu/drm/i915/i915_drv.h +4
-3@@ -2788,9 +2788,10 @@ struct drm_i915_cmd_table {#define HAS_BROKEN_CS_TLB (dev) (IS_I830(dev) || IS_845G(dev))/* WaRsDisableCoarsePowerGating:skl,bxt */ -#define NEEDS_WaRsDisableCoarsePowerGating (dev) (IS_BXT_REVID(dev, 0, BXT_REVID_A1) || \ - IS_SKL_GT3(dev) || \ - IS_SKL_GT4(dev)) +#define NEEDS_WaRsDisableCoarsePowerGating (dev_priv) (IS_BXT_REVID(dev_priv, \ + 0, BXT_REVID_A1) || \ + IS_SKL_GT3(dev_priv) || \ + IS_SKL_GT4(dev_priv))#define NEEDS_WaRsDisableCoarsePowerGating(dev_priv) \ (IS_BXT_REVID(dev_priv, 0, BXT_REVID_A1) || \ IS_SKL_GT3(dev_priv) || IS_SKL_GT4(dev_priv))
Quoted 4 lines
Other than that,
Reviewed-by Chris Wilson <[email protected]>Just wondering if you fancy having a go at
IS_SKL_GT(dev_priv, min, max)...
What do you have in mind?
This is a single call site for them BTW. And GCC amazingly does manage to merge the two GT tests on its own already. :)
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 41 lines · Tvrtko Ursulin
Quoted 39 lines · Chris Wilson
Quoted 19 lines · Tvrtko Ursulin
From: Tvrtko Ursulin <[email protected]>
No need for local struct
drm_device* sincedev_privis the correct thing to pass in toNEEDS_WaRsDisableCoarsePowerGatinganyway. Changed the macro definition for the latter to reflect that as well.Signed-off-by Tvrtko Ursulin <[email protected]>Cc Dave Gordon <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 7 ++++--- drivers/gpu/drm/i915/i915_guc_submission.c | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/i915_drv.h +0
-0drivers/gpu/drm/i915/i915_drv.h struct drm_i915_cmd_table { · line 2794
Quoted 10 lines
drivers/gpu/drm/i915/i915_drv.h +4
-3@@ -2788,9 +2788,10 @@ struct drm_i915_cmd_table {#define HAS_BROKEN_CS_TLB (dev) (IS_I830(dev) || IS_845G(dev))/* WaRsDisableCoarsePowerGating:skl,bxt */ -#define NEEDS_WaRsDisableCoarsePowerGating (dev) (IS_BXT_REVID(dev, 0, BXT_REVID_A1) || \ - IS_SKL_GT3(dev) || \ - IS_SKL_GT4(dev)) +#define NEEDS_WaRsDisableCoarsePowerGating (dev_priv) (IS_BXT_REVID(dev_priv, \ + 0, BXT_REVID_A1) || \ + IS_SKL_GT3(dev_priv) || \ + IS_SKL_GT4(dev_priv))#define NEEDS_WaRsDisableCoarsePowerGating(dev_priv) \ (IS_BXT_REVID(dev_priv, 0, BXT_REVID_A1) || \ IS_SKL_GT3(dev_priv) || IS_SKL_GT4(dev_priv))Other than that,
Reviewed-by Chris Wilson <[email protected]>
Quoted 6 lines
Quoted 1 line
Just wondering if you fancy having a go at
IS_SKL_GT(dev_priv, min, max)...What do you have in mind?
This is a single call site for them BTW. And GCC amazingly does manage to merge the two GT tests on its own already. :)
#define GT(x) ((INTEL_DEVID(x) & 0xf0) >> 4)
IS_SKL_GT(dev, min, max) ({
int gt__ = GT(dev);
IS_SKYLAKE(dev) && gt__ >= (min) && gt__ < (min);
})Give or take some more massaging.
-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 9 lines · Tvrtko Ursulin
From: Tvrtko Ursulin <[email protected]>
No need for local struct
drm_device* sincedev_privis the correct thing to pass in toNEEDS_WaRsDisableCoarsePowerGatinganyway. Changed the macro definition for the latter to reflect that as well.Signed-off-by Tvrtko Ursulin <[email protected]>Cc Dave Gordon <[email protected]>
Quoted 48 lines
--- drivers/gpu/drm/i915/i915_drv.h | 7 ++++--- drivers/gpu/drm/i915/i915_guc_submission.c | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/i915_drv.h +4
-3@@ -2788,9 +2788,10 @@ struct drm_i915_cmd_table {#define HAS_BROKEN_CS_TLB (dev) (IS_I830(dev) || IS_845G(dev))/* WaRsDisableCoarsePowerGating:skl,bxt */ -#define NEEDS_WaRsDisableCoarsePowerGating (dev) (IS_BXT_REVID(dev, 0, BXT_REVID_A1) || \ - IS_SKL_GT3(dev) || \ - IS_SKL_GT4(dev)) +#define NEEDS_WaRsDisableCoarsePowerGating (dev_priv) (IS_BXT_REVID(dev_priv, \ + 0, BXT_REVID_A1) || \ + IS_SKL_GT3(dev_priv) || \ + IS_SKL_GT4(dev_priv))/* * dp aux and gmbus irq on gen4 seems to be able to generate legacy interrupts drivers/gpu/drm/i915/i915_guc_submission.c +1
-2@@ -153,12 +153,11 @@ static int host2guc_sample_forcewake(struct intel_guc *guc, struct i915_guc_client *client) {struct drm_i915_private *dev_priv =guc_to_i915 (guc); -struct drm_device *dev = dev_priv->dev;u32 data[2 ]; data[0 ] =HOST2GUC_ACTION_SAMPLE_FORCEWAKE ;/* WaRsDisableCoarsePowerGating:skl,bxt */ -if (!intel_enable_rc6 () ||NEEDS_WaRsDisableCoarsePowerGating (dev)) +if (!intel_enable_rc6 () ||NEEDS_WaRsDisableCoarsePowerGating (dev_priv)) data[1 ] =0 ;else /* bit 0 and 1 are for Render and Media domain separately */ Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Ro.CI.BAT: failure for drm/i915/guc: Remove one unnecessary variable
In reply to Tvrtko Ursulin== Series Details ==
== Series Details ==
Series: drm/i915/guc: Remove one unnecessary variable
URL : https://patchwork.freedesktop.org/series/8995/
State : failure
== Summary ==
Series 8995v1 drm/i915/guc: Remove one unnecessary variable
http://patchwork.freedesktop.org/api/1.0/series/8995/revisions/1/mbox
Test kms_flip:
Subgroup basic-flip-vs-wf_vblank:
pass -> FAIL (ro-bdw-i5-5250u)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
skip -> DMESG-WARN (ro-bdw-i5-5250u)
pass -> INCOMPLETE (fi-skl-i7-6700k)
Subgroup suspend-read-crc-pipe-c:
dmesg-warn -> SKIP (ro-bdw-i5-5250u)
Test pm_rpm:
Subgroup basic-rte:
skip -> PASS (fi-skl-i5-6260u)fi-hsw-i7-4770k total:225 pass:192 dwarn:0 dfail:0 fail:2 skip:31 fi-kbl-qkkr total:225 pass:159 dwarn:28 dfail:0 fail:2 skip:36 fi-skl-i5-6260u total:225 pass:200 dwarn:0 dfail:0 fail:2 skip:23 fi-skl-i7-6700k total:188 pass:162 dwarn:0 dfail:0 fail:2 skip:23 fi-snb-i7-2600 total:225 pass:172 dwarn:0 dfail:0 fail:2 skip:51 ro-bdw-i5-5250u total:225 pass:196 dwarn:2 dfail:0 fail:1 skip:26 ro-bdw-i7-5557U total:225 pass:198 dwarn:0 dfail:0 fail:0 skip:27 ro-bdw-i7-5600u total:225 pass:185 dwarn:0 dfail:0 fail:0 skip:40 ro-byt-n2820 total:225 pass:173 dwarn:0 dfail:0 fail:3 skip:49 ro-hsw-i3-4010u total:225 pass:190 dwarn:0 dfail:0 fail:0 skip:35 ro-hsw-i7-4770r total:225 pass:190 dwarn:0 dfail:0 fail:0 skip:35 ro-ilk-i7-620lm total:225 pass:150 dwarn:0 dfail:0 fail:1 skip:74 ro-ilk1-i5-650 total:220 pass:150 dwarn:0 dfail:0 fail:1 skip:69 ro-ivb-i7-3770 total:225 pass:181 dwarn:0 dfail:0 fail:0 skip:44 ro-ivb2-i7-3770 total:225 pass:185 dwarn:0 dfail:0 fail:0 skip:40 ro-skl3-i5-6260u total:225 pass:201 dwarn:1 dfail:0 fail:0 skip:23 ro-snb-i7-2620M total:225 pass:174 dwarn:0 dfail:0 fail:1 skip:50
Results at /archive/results/CI_IGT_test/RO_Patchwork_1256/
661e1d8 drm-intel-nightly: 2016y-06m-21d-12h-45m-27s UTC integration manifest d3941b1 drm/i915/guc: Remove one unnecessary variable
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/1 drm/i915/guc: Remove one unnecessary variable
In reply to Tvrtko UrsulinFrom: Tvrtko Ursulin <[email protected]>
No need for local struct drm_device * since dev_priv is the correct thing to pass in to NEEDS_WaRsDisableCoarsePowerGating anyway. Changed the macro definition for the latter to reflect that as well.
v2: Alignment bikeshed.
--- drivers/gpu/drm/i915/i915_drv.h | 7 ++++--- drivers/gpu/drm/i915/i915_guc_submission.c | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +4 -3
@@ -2788,9 +2788,10 @@ struct drm_i915_cmd_table {#define HAS_BROKEN_CS_TLB (dev) (IS_I830(dev) || IS_845G(dev))/* WaRsDisableCoarsePowerGating:skl,bxt */ -#define NEEDS_WaRsDisableCoarsePowerGating (dev) (IS_BXT_REVID(dev, 0, BXT_REVID_A1) || \ - IS_SKL_GT3(dev) || \ - IS_SKL_GT4(dev)) +#define NEEDS_WaRsDisableCoarsePowerGating (dev_priv) \ + (IS_BXT_REVID(dev_priv, 0, BXT_REVID_A1) || \ + IS_SKL_GT3(dev_priv) || \ + IS_SKL_GT4(dev_priv))/* * dp aux and gmbus irq on gen4 seems to be able to generate legacy interrupts
drivers/gpu/drm/i915/i915_guc_submission.c +1 -2
@@ -153,12 +153,11 @@ static int host2guc_sample_forcewake(struct intel_guc *guc, struct i915_guc_client *client) {struct drm_i915_private *dev_priv =guc_to_i915 (guc); -struct drm_device *dev = dev_priv->dev;u32 data[2 ]; data[0 ] =HOST2GUC_ACTION_SAMPLE_FORCEWAKE ;/* WaRsDisableCoarsePowerGating:skl,bxt */ -if (!intel_enable_rc6 () ||NEEDS_WaRsDisableCoarsePowerGating (dev)) +if (!intel_enable_rc6 () ||NEEDS_WaRsDisableCoarsePowerGating (dev_priv)) data[1 ] =0 ;else /* bit 0 and 1 are for Render and Media domain separately */
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Ro.CI.BAT: warning for drm/i915/guc: Remove one unnecessary variable (rev2)
In reply to Tvrtko Ursulin== Series Details ==
== Series Details ==
Series: drm/i915/guc: Remove one unnecessary variable (rev2)
URL : https://patchwork.freedesktop.org/series/8995/
State : warning
== Summary ==
Series 8995v2 drm/i915/guc: Remove one unnecessary variable
http://patchwork.freedesktop.org/api/1.0/series/8995/revisions/2/mbox
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
skip -> DMESG-WARN (ro-bdw-i5-5250u)
Subgroup suspend-read-crc-pipe-b:
skip -> DMESG-WARN (ro-bdw-i5-5250u)fi-hsw-i7-4770k total:225 pass:192 dwarn:0 dfail:0 fail:2 skip:31 fi-kbl-qkkr total:225 pass:158 dwarn:29 dfail:0 fail:2 skip:36 fi-skl-i5-6260u total:225 pass:200 dwarn:0 dfail:0 fail:2 skip:23 fi-snb-i7-2600 total:225 pass:172 dwarn:0 dfail:0 fail:2 skip:51 ro-bdw-i5-5250u total:225 pass:197 dwarn:3 dfail:0 fail:0 skip:25 ro-bdw-i7-5557U total:225 pass:198 dwarn:0 dfail:0 fail:0 skip:27 ro-bdw-i7-5600u total:225 pass:185 dwarn:0 dfail:0 fail:0 skip:40 ro-byt-n2820 total:225 pass:173 dwarn:0 dfail:0 fail:3 skip:49 ro-hsw-i3-4010u total:225 pass:190 dwarn:0 dfail:0 fail:0 skip:35 ro-hsw-i7-4770r total:225 pass:190 dwarn:0 dfail:0 fail:0 skip:35 ro-ilk-i7-620lm total:225 pass:150 dwarn:0 dfail:0 fail:1 skip:74 ro-ilk1-i5-650 total:220 pass:150 dwarn:0 dfail:0 fail:1 skip:69 ro-ivb-i7-3770 total:225 pass:181 dwarn:0 dfail:0 fail:0 skip:44 ro-ivb2-i7-3770 total:225 pass:185 dwarn:0 dfail:0 fail:0 skip:40 ro-skl3-i5-6260u total:225 pass:201 dwarn:1 dfail:0 fail:0 skip:23 ro-snb-i7-2620M total:225 pass:174 dwarn:0 dfail:0 fail:1 skip:50
fi-skl-i7-6700k failed to connect after reboot
Results at /archive/results/CI_IGT_test/RO_Patchwork_1257/
9d436e8 drm-intel-nightly: 2016y-06m-21d-13h-57m-22s UTC integration manifest 05a0233 drm/i915/guc: Remove one unnecessary variable
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Tvrtko Ursulin
AppliedRe: ✗ Ro.CI.BAT: warning for drm/i915/guc: Remove one unnecessary variable (rev2)
Quoted 8 lines · Patchwork
== Series Details ==
Series: drm/i915/guc: Remove one unnecessary variable (rev2)
URL : https://patchwork.freedesktop.org/series/8995/
State : warning== Summary ==
Quoted 8 lines
Series 8995v2 drm/i915/guc: Remove one unnecessary variable
http://patchwork.freedesktop.org/api/1.0/series/8995/revisions/2/mboxTest
kms_pipe_crc_basic:Subgroup suspend-read-crc-pipe-a: skip -> DMESG-WARN (ro-bdw-i5-5250u) Subgroup suspend-read-crc-pipe-b: skip -> DMESG-WARN (ro-bdw-i5-5250u)
https://bugs.freedesktop.org/show_bug.cgi?id=96614
Quoted 16 lines
fi-hsw-i7-4770k total:225 pass:192 dwarn:0 dfail:0 fail:2 skip:31 fi-kbl-qkkr total:225 pass:158 dwarn:29 dfail:0 fail:2 skip:36 fi-skl-i5-6260u total:225 pass:200 dwarn:0 dfail:0 fail:2 skip:23 fi-snb-i7-2600 total:225 pass:172 dwarn:0 dfail:0 fail:2 skip:51 ro-bdw-i5-5250u total:225 pass:197 dwarn:3 dfail:0 fail:0 skip:25 ro-bdw-i7-5557U total:225 pass:198 dwarn:0 dfail:0 fail:0 skip:27 ro-bdw-i7-5600u total:225 pass:185 dwarn:0 dfail:0 fail:0 skip:40 ro-byt-n2820 total:225 pass:173 dwarn:0 dfail:0 fail:3 skip:49 ro-hsw-i3-4010u total:225 pass:190 dwarn:0 dfail:0 fail:0 skip:35 ro-hsw-i7-4770r total:225 pass:190 dwarn:0 dfail:0 fail:0 skip:35 ro-ilk-i7-620lm total:225 pass:150 dwarn:0 dfail:0 fail:1 skip:74 ro-ilk1-i5-650 total:220 pass:150 dwarn:0 dfail:0 fail:1 skip:69 ro-ivb-i7-3770 total:225 pass:181 dwarn:0 dfail:0 fail:0 skip:44 ro-ivb2-i7-3770 total:225 pass:185 dwarn:0 dfail:0 fail:0 skip:40 ro-skl3-i5-6260u total:225 pass:201 dwarn:1 dfail:0 fail:0 skip:23 ro-snb-i7-2620M total:225 pass:174 dwarn:0 dfail:0 fail:1 skip:50
Quoted 6 lines
fi-skl-i7-6700k failed to connect after reboot
Results at /archive/results/CI_IGT_test/RO_Patchwork_1257/
9d436e8 drm-intel-nightly: 2016y-06m-21d-13h-57m-22s UTC integration manifest 05a0233 drm/i915/guc: Remove one unnecessary variable
Merged to dinq, thanks for the review!
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx