drm/i915/guc: Unify parameters of public CT functions
Subsystems (2)
PATCH v2 1/1 drm/i915/guc: Unify parameters of public CT functions
There is no need to mix parameter types in public CT functions as we can always accept intel_guc_ct.
v2: fix 'Return' doc, s/dev_priv/i915 (Sagar)
--- drivers/gpu/drm/i915/intel_guc_ct.c | 41 ++++++++++++++++++++++++------------- drivers/gpu/drm/i915/intel_guc_ct.h | 6 ++---- drivers/gpu/drm/i915/intel_uc.c | 4 ++-- 3 files changed, 31 insertions(+), 20 deletions(-)
drivers/gpu/drm/i915/intel_guc_ct.c +27 -14
@@ -28,12 +28,21 @@enum {CTB_OWNER_HOST =0 }; +/** +* intel_guc_ct_init_early - Initialize CT state without requiring device access +* @ct: pointer to CT struct +*/ void intel_guc_ct_init_early (struct intel_guc_ct *ct) {/* we're using static channel owners */ ct->host_channel.owner =CTB_OWNER_HOST ; } +static inline struct intel_guc *ct_to_guc (struct intel_guc_ct *ct) +{ + return container_of(ct, struct intel_guc, ct); +} +static inline const char *guc_ct_buffer_type_to_str (u32 type) {switch (type) {
@@ -416,19 +425,21 @@ static int intel_guc_send_ct(struct intel_guc *guc, const u32 *action, u32 len) }/** -* Enable buffer based command transport +* intel_guc_ct_enable - Enable buffer based command transport. +* @ct: pointer to CT struct +* * Shall only be called for platforms with HAS_GUC_CT. -* @guc: the guc -* return: 0 on success -* non-zero on failure +* +* Return: 0 on success, a negative errno code on failure. */ -int intel_guc_enable_ct (struct intel_guc *guc) +int intel_guc_ct_enable (struct intel_guc_ct *ct) { -struct drm_i915_private *dev_priv =guc_to_i915 (guc); -struct intel_guc_ct_channel *ctch = &guc->ct.host_channel; +struct intel_guc *guc =ct_to_guc (ct); +struct drm_i915_private *i915 =guc_to_i915 (guc); +struct intel_guc_ct_channel *ctch = &ct->host_channel;int err; -GEM_BUG_ON (!HAS_GUC_CT (dev_priv)); +GEM_BUG_ON (!HAS_GUC_CT (i915)); err =ctch_open (guc, ctch);if (unlikely (err))
@@ -441,16 +452,18 @@ int intel_guc_enable_ct(struct intel_guc *guc) }/** -* Disable buffer based command transport. +* intel_guc_ct_disable - Disable buffer based command transport. +* @ct: pointer to CT struct +* * Shall only be called for platforms with HAS_GUC_CT. -* @guc: the guc */ -void intel_guc_disable_ct (struct intel_guc *guc) +void intel_guc_ct_disable (struct intel_guc_ct *ct) { -struct drm_i915_private *dev_priv =guc_to_i915 (guc); -struct intel_guc_ct_channel *ctch = &guc->ct.host_channel; +struct intel_guc *guc =ct_to_guc (ct); +struct drm_i915_private *i915 =guc_to_i915 (guc); +struct intel_guc_ct_channel *ctch = &ct->host_channel; -GEM_BUG_ON (!HAS_GUC_CT (dev_priv)); +GEM_BUG_ON (!HAS_GUC_CT (i915));if (!ctch_is_open (ctch))return ;
drivers/gpu/drm/i915/intel_guc_ct.h +2 -4
@@ -78,9 +78,7 @@ struct intel_guc_ct { };void intel_guc_ct_init_early (struct intel_guc_ct *ct); - -/* XXX: move to intel_uc.h ? don't fit there either */ -int intel_guc_enable_ct (struct intel_guc *guc); -void intel_guc_disable_ct (struct intel_guc *guc); +int intel_guc_ct_enable (struct intel_guc_ct *ct); +void intel_guc_ct_disable (struct intel_guc_ct *ct);#endif /* _INTEL_GUC_CT_H_ */
drivers/gpu/drm/i915/intel_uc.c +2 -2
@@ -231,7 +231,7 @@ static int guc_enable_communication(struct intel_guc *guc)gen9_enable_guc_interrupts (dev_priv);if (HAS_GUC_CT (dev_priv)) -return intel_guc_enable_ct (guc); +return intel_guc_ct_enable (&guc->ct); guc->send = intel_guc_send_mmio;return 0 ;
@@ -242,7 +242,7 @@ static void guc_disable_communication(struct intel_guc *guc)struct drm_i915_private *dev_priv =guc_to_i915 (guc);if (HAS_GUC_CT (dev_priv)) -intel_guc_disable_ct (guc); +intel_guc_ct_disable (&guc->ct);gen9_disable_guc_interrupts (dev_priv);
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/guc: Unify parameters of public CT functions (rev2)
== Series Details ==
== Series Details ==
Series: drm/i915/guc: Unify parameters of public CT functions (rev2)
URL : https://patchwork.freedesktop.org/series/40197/
State : success
== Summary ==
Series 40197v2 drm/i915/guc: Unify parameters of public CT functions
https://patchwork.freedesktop.org/api/1.0/series/40197/revisions/2/mbox/
---- Possible new issues:
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
incomplete -> PASS (fi-cfl-s2)---- Known issues:
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-c:
pass -> INCOMPLETE (fi-bxt-dsi) fdo#103927fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fi-bdw-5557u total:285 pass:264 dwarn:0 dfail:0 fail:0 skip:21 time:431s fi-bdw-gvtdvm total:285 pass:261 dwarn:0 dfail:0 fail:0 skip:24 time:441s fi-blb-e6850 total:285 pass:220 dwarn:1 dfail:0 fail:0 skip:64 time:384s fi-bsw-n3050 total:285 pass:239 dwarn:0 dfail:0 fail:0 skip:46 time:542s fi-bwr-2160 total:285 pass:180 dwarn:0 dfail:0 fail:0 skip:105 time:297s fi-bxt-dsi total:243 pass:216 dwarn:0 dfail:0 fail:0 skip:26 fi-bxt-j4205 total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:512s fi-byt-j1900 total:285 pass:250 dwarn:0 dfail:0 fail:0 skip:35 time:514s fi-byt-n2820 total:285 pass:246 dwarn:0 dfail:0 fail:0 skip:39 time:504s fi-cfl-8700k total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:412s fi-cfl-s2 total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:577s fi-cfl-u total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:512s fi-cnl-drrs total:285 pass:254 dwarn:3 dfail:0 fail:0 skip:28 time:527s fi-elk-e7500 total:285 pass:225 dwarn:1 dfail:0 fail:0 skip:59 time:429s fi-gdg-551 total:285 pass:177 dwarn:0 dfail:0 fail:0 skip:108 time:317s fi-glk-1 total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:536s fi-hsw-4770 total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:402s fi-ilk-650 total:285 pass:225 dwarn:0 dfail:0 fail:0 skip:60 time:418s fi-ivb-3520m total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:468s fi-ivb-3770 total:285 pass:252 dwarn:0 dfail:0 fail:0 skip:33 time:437s fi-kbl-7500u total:285 pass:260 dwarn:1 dfail:0 fail:0 skip:24 time:478s fi-kbl-7567u total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:467s fi-kbl-r total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:510s fi-pnv-d510 total:285 pass:219 dwarn:1 dfail:0 fail:0 skip:65 time:658s fi-skl-6260u total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:440s fi-skl-6600u total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:529s fi-skl-6700hq total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:541s fi-skl-6700k2 total:285 pass:261 dwarn:0 dfail:0 fail:0 skip:24 time:505s fi-skl-6770hq total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:495s fi-skl-guc total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:427s fi-skl-gvtdvm total:285 pass:262 dwarn:0 dfail:0 fail:0 skip:23 time:447s fi-snb-2520m total:285 pass:245 dwarn:0 dfail:0 fail:0 skip:40 time:569s fi-snb-2600 total:285 pass:245 dwarn:0 dfail:0 fail:0 skip:40 time:401s
9d737cebc219c821989021a3115424165ff7b052 drm-tip: 2018y-03m-20d-14h-56m-05s UTC integration manifest 788a06534dc8 drm/i915/guc: Unify parameters of public CT functions
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8418/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/guc: Unify parameters of public CT functions (rev2)
In reply to Michal Wajdeczko== Series Details ==
== Series Details ==
Series: drm/i915/guc: Unify parameters of public CT functions (rev2)
URL : https://patchwork.freedesktop.org/series/40197/
State : success
== Summary ==
---- Known issues:
Test kms_setmode:
Subgroup basic:
pass -> FAIL (shard-apl) fdo#99912
Test kms_sysfs_edid_timing:
warn -> PASS (shard-apl) fdo#100047
Test kms_vblank:
Subgroup pipe-b-ts-continuation-dpms-suspend:
incomplete -> PASS (shard-hsw) fdo#105054
Subgroup pipe-b-ts-continuation-suspend:
pass -> SKIP (shard-snb) fdo#105411
Test perf:
Subgroup blocking:
pass -> FAIL (shard-hsw) fdo#102252
Test pm_rpm:
Subgroup system-suspend-execbuf:
pass -> INCOMPLETE (shard-hsw) fdo#103375fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#105054 https://bugs.freedesktop.org/show_bug.cgi?id=105054
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
shard-apl total:3478 pass:1815 dwarn:1 dfail:0 fail:7 skip:1655 time:13027s shard-hsw total:3427 pass:1739 dwarn:1 dfail:0 fail:2 skip:1683 time:11488s shard-snb total:3478 pass:1357 dwarn:1 dfail:0 fail:2 skip:2118 time:7225s
Blacklisted hosts:
shard-kbl total:3478 pass:1938 dwarn:1 dfail:0 fail:9 skip:1530 time:9849s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8418/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Michal Wajdeczko (2018-03-20 16:20:20)
Quoted 9 lines
There is no need to mix parameter types in public CT functions as we can always accept
intel_guc_ct.v2: fix 'Return' doc, s/dev_priv/i915 (Sagar)
Signed-off-by Michal Wajdeczko <[email protected]>Cc Sagar Arun Kamble <[email protected]>Cc Chris Wilson <[email protected]>Reviewed-by Sagar Arun Kamble <[email protected]>
And pushed, thanks for the patch and review,
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx