Skip to contentSkip to conversation

drm/i915/guc: Make intel_guc_recv static.

PATCH In review Michal Wajdeczko 3 participants 4 messages Dec 20, 2016 – Jan 3, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/guc: Make intel_guc_recv static.

This function is only used by intel_guc_send() and it doesn't need to be exposed outside of intel_uc.o file. Also when defined as static, compiler will generate smaller code. Additionally let it take guc param instead dev_priv to match function name.

Cc Joonas Lahtinen <[email protected]>
Cc Arkadiusz Hiler <[email protected]>
---
 drivers/gpu/drm/i915/intel_uc.c | 8 +++++---
 drivers/gpu/drm/i915/intel_uc.h | 1 -
 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_uc.c +5 -3
index 8ae6795..c6be352 100644
@@ -34,8 +34,10 @@ void intel_uc_init_early(struct drm_i915_private *dev_priv)
  * Read GuC command/status register (SOFT_SCRATCH_0)
  * Return true if it contains a response rather than a command
  */
-bool intel_guc_recv(struct drm_i915_private *dev_priv, u32 *status)
+static bool intel_guc_recv(struct intel_guc *guc, u32 *status)
 {
+	struct drm_i915_private *dev_priv = guc_to_i915(guc);
+
 	u32 val = I915_READ(SOFT_SCRATCH(0));
 	*status = val;
 	return INTEL_GUC_RECV_IS_RESPONSE(val);
@@ -69,9 +71,9 @@ int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len)
 	 * up to that length of time, then switch to a slower sleep-wait loop.
 	 * No inte_guc_send command should ever take longer than 10ms.
 	 */
-	ret = wait_for_us(intel_guc_recv(dev_priv, &status), 10);
+	ret = wait_for_us(intel_guc_recv(guc, &status), 10);
 	if (ret)
-		ret = wait_for(intel_guc_recv(dev_priv, &status), 10);
+		ret = wait_for(intel_guc_recv(guc, &status), 10);
 	if (status != INTEL_GUC_STATUS_SUCCESS) {
 		/*
 		 * Either the GuC explicitly returned an error (which
drivers/gpu/drm/i915/intel_uc.h +0 -1
index 11f5608..406b06a 100644
@@ -170,7 +170,6 @@ struct intel_guc {
 
 /* intel_uc.c */
 void intel_uc_init_early(struct drm_i915_private *dev_priv);
-bool intel_guc_recv(struct drm_i915_private *dev_priv, u32 *status);
 int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len);
 int intel_guc_sample_forcewake(struct intel_guc *guc);
 int intel_guc_log_flush_complete(struct intel_guc *guc);
Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✓ Fi.CI.BAT: success for drm/i915/guc: Make intel_guc_recv static.

== Series Details ==

== Series Details ==

Series: drm/i915/guc: Make intel_guc_recv static.
URL : https://patchwork.freedesktop.org/series/17052/
State : success

== Summary ==

Series 17052v1 drm/i915/guc: Make intel_guc_recv static.
https://patchwork.freedesktop.org/api/1.0/series/17052/revisions/1/mbox/

Test gem_sync:

        Subgroup basic-store-all:
                fail       -> PASS       (fi-ivb-3520m)
fi-bdw-5557u     total:247  pass:233  dwarn:0   dfail:0   fail:0   skip:14 
fi-bsw-n3050     total:247  pass:208  dwarn:0   dfail:0   fail:0   skip:39 
fi-bxt-j4205     total:247  pass:225  dwarn:1   dfail:0   fail:0   skip:21 
fi-byt-j1900     total:247  pass:220  dwarn:0   dfail:0   fail:0   skip:27 
fi-byt-n2820     total:247  pass:216  dwarn:0   dfail:0   fail:0   skip:31 
fi-hsw-4770      total:247  pass:228  dwarn:0   dfail:0   fail:0   skip:19 
fi-hsw-4770r     total:247  pass:228  dwarn:0   dfail:0   fail:0   skip:19 
fi-ilk-650       total:247  pass:195  dwarn:0   dfail:0   fail:0   skip:52 
fi-ivb-3520m     total:247  pass:226  dwarn:0   dfail:0   fail:0   skip:21 
fi-ivb-3770      total:247  pass:226  dwarn:0   dfail:0   fail:0   skip:21 
fi-kbl-7500u     total:247  pass:226  dwarn:0   dfail:0   fail:0   skip:21 
fi-skl-6260u     total:247  pass:234  dwarn:0   dfail:0   fail:0   skip:13 
fi-skl-6700hq    total:247  pass:227  dwarn:0   dfail:0   fail:0   skip:20 
fi-skl-6700k     total:247  pass:224  dwarn:3   dfail:0   fail:0   skip:20 
fi-skl-6770hq    total:247  pass:234  dwarn:0   dfail:0   fail:0   skip:13 
fi-snb-2520m     total:247  pass:216  dwarn:0   dfail:0   fail:0   skip:31 
fi-snb-2600      total:247  pass:215  dwarn:0   dfail:0   fail:0   skip:32 

b8e68c1d31266b62356d578435246516c39de36b drm-tip: 2016y-12m-20d-12h-47m-27s UTC integration manifest 3a2f809 drm/i915/guc: Make intel_guc_recv static.

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3339/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

Re: ✓ Fi.CI.BAT: success for drm/i915/guc: Make intel_guc_recv static.

Quoted 33 lines · Patchwork

== Series Details ==

Series: drm/i915/guc: Make intel_guc_recv static.
URL : https://patchwork.freedesktop.org/series/17052/
State : success

== Summary ==

Series 17052v1 drm/i915/guc: Make intel_guc_recv static.
https://patchwork.freedesktop.org/api/1.0/series/17052/revisions/1/mbox/

Test gem_sync:

        Subgroup basic-store-all:
                fail       -> PASS       (fi-ivb-3520m)
fi-bdw-5557u     total:247  pass:233  dwarn:0   dfail:0   fail:0   skip:14
fi-bsw-n3050     total:247  pass:208  dwarn:0   dfail:0   fail:0   skip:39
fi-bxt-j4205     total:247  pass:225  dwarn:1   dfail:0   fail:0   skip:21
fi-byt-j1900     total:247  pass:220  dwarn:0   dfail:0   fail:0   skip:27
fi-byt-n2820     total:247  pass:216  dwarn:0   dfail:0   fail:0   skip:31
fi-hsw-4770      total:247  pass:228  dwarn:0   dfail:0   fail:0   skip:19
fi-hsw-4770r     total:247  pass:228  dwarn:0   dfail:0   fail:0   skip:19
fi-ilk-650       total:247  pass:195  dwarn:0   dfail:0   fail:0   skip:52
fi-ivb-3520m     total:247  pass:226  dwarn:0   dfail:0   fail:0   skip:21
fi-ivb-3770      total:247  pass:226  dwarn:0   dfail:0   fail:0   skip:21
fi-kbl-7500u     total:247  pass:226  dwarn:0   dfail:0   fail:0   skip:21
fi-skl-6260u     total:247  pass:234  dwarn:0   dfail:0   fail:0   skip:13
fi-skl-6700hq    total:247  pass:227  dwarn:0   dfail:0   fail:0   skip:20
fi-skl-6700k     total:247  pass:224  dwarn:3   dfail:0   fail:0   skip:20
fi-skl-6770hq    total:247  pass:234  dwarn:0   dfail:0   fail:0   skip:13
fi-snb-2520m     total:247  pass:216  dwarn:0   dfail:0   fail:0   skip:31
fi-snb-2600      total:247  pass:215  dwarn:0   dfail:0   fail:0   skip:32
Quoted 2 lines

b8e68c1d31266b62356d578435246516c39de36b drm-tip: 2016y-12m-20d-12h-47m-27s UTC integration manifest 3a2f809 drm/i915/guc: Make intel_guc_recv static.

Pushed, thanks for the patch!

Regards,

Tvrtko

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/1
#3 lore raw
In reply to Michal Wajdeczko
Quoted 47 lines · Michal Wajdeczko

This function is only used by intel_guc_send() and it doesn't need to be exposed outside of intel_uc.o file. Also when defined as static, compiler will generate smaller code. Additionally let it take guc param instead dev_priv to match function name.

Cc Joonas Lahtinen <[email protected]>
Cc Arkadiusz Hiler <[email protected]>
---
 drivers/gpu/drm/i915/intel_uc.c | 8 +++++---
 drivers/gpu/drm/i915/intel_uc.h | 1 -
 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_uc.c +5 -3
index 8ae6795..c6be352 100644
@@ -34,8 +34,10 @@ void intel_uc_init_early(struct drm_i915_private *dev_priv)
  * Read GuC command/status register (SOFT_SCRATCH_0)
  * Return true if it contains a response rather than a command
  */
-bool intel_guc_recv(struct drm_i915_private *dev_priv, u32 *status)
+static bool intel_guc_recv(struct intel_guc *guc, u32 *status)
 {
+	struct drm_i915_private *dev_priv = guc_to_i915(guc);
+
 	u32 val = I915_READ(SOFT_SCRATCH(0));
 	*status = val;
 	return INTEL_GUC_RECV_IS_RESPONSE(val);
@@ -69,9 +71,9 @@ int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len)
 	 * up to that length of time, then switch to a slower sleep-wait loop.
 	 * No inte_guc_send command should ever take longer than 10ms.
 	 */
-	ret = wait_for_us(intel_guc_recv(dev_priv, &status), 10);
+	ret = wait_for_us(intel_guc_recv(guc, &status), 10);
 	if (ret)
-		ret = wait_for(intel_guc_recv(dev_priv, &status), 10);
+		ret = wait_for(intel_guc_recv(guc, &status), 10);
 	if (status != INTEL_GUC_STATUS_SUCCESS) {
 		/*
 		 * Either the GuC explicitly returned an error (which
drivers/gpu/drm/i915/intel_uc.h +0 -0
index 11f5608..406b06a 100644

drivers/gpu/drm/i915/intel_uc.h struct intel_guc { · line 175

Quoted 7 lines
drivers/gpu/drm/i915/intel_uc.h +0 -1
@@ -170,7 +170,6 @@ struct intel_guc {
 
 /* intel_uc.c */
 void intel_uc_init_early(struct drm_i915_private *dev_priv);
-bool intel_guc_recv(struct drm_i915_private *dev_priv, u32 *status);
 int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len);
 int intel_guc_sample_forcewake(struct intel_guc *guc);
 int intel_guc_log_flush_complete(struct intel_guc *guc);

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx