Skip to contentSkip to conversation

drm/i915/guc: Make intel_guc_send a function pointer

PATCH Superseded Oscar Mateo 4 participants 9 messages Feb 2, 2017 – Mar 4, 2017

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

PATCH 1/1 drm/i915/guc: Make intel_guc_send a function pointer

From: Michal Wajdeczko <[email protected]>

Prepare for an alternate GuC communication interface.

v2: Make a few functions static and name them correctly while we are at it (Oscar)

---
 drivers/gpu/drm/i915/intel_uc.c | 25 +++++++++++++++----------
 drivers/gpu/drm/i915/intel_uc.h |  9 ++++++++-
 2 files changed, 23 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_uc.c +15 -10
index c46bc85..0e45ef0 100644
@@ -25,16 +25,11 @@
 #include "i915_drv.h"
 #include "intel_uc.h"
 
-void intel_uc_init_early(struct drm_i915_private *dev_priv)
-{
-	mutex_init(&dev_priv->guc.send_mutex);
-}
-
 /*
  * Read GuC command/status register (SOFT_SCRATCH_0)
  * Return true if it contains a response rather than a command
  */
-static bool intel_guc_recv(struct intel_guc *guc, u32 *status)
+static bool guc_recv(struct intel_guc *guc, u32 *status)
 {
 	struct drm_i915_private *dev_priv = guc_to_i915(guc);
 
@@ -43,7 +38,10 @@ static bool intel_guc_recv(struct intel_guc *guc, u32 *status)
 	return INTEL_GUC_RECV_IS_RESPONSE(val);
 }
 
-int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len)
+/*
+ * This function implements the MMIO based host to GuC interface.
+ */
+static int guc_send_mmio(struct intel_guc *guc, const u32 *action, u32 len)
 {
 	struct drm_i915_private *dev_priv = guc_to_i915(guc);
 	u32 status;
@@ -71,9 +69,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(guc, &status), 10);
+	ret = wait_for_us(guc_recv(guc, &status), 10);
 	if (ret)
-		ret = wait_for(intel_guc_recv(guc, &status), 10);
+		ret = wait_for(guc_recv(guc, &status), 10);
 	if (status != INTEL_GUC_STATUS_SUCCESS) {
 		/*
 		 * Either the GuC explicitly returned an error (which
@@ -98,6 +96,14 @@ int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len)
 	return ret;
 }
 
+void intel_uc_init_early(struct drm_i915_private *dev_priv)
+{
+	struct intel_guc *guc = &dev_priv->guc;
+
+	mutex_init(&dev_priv->guc.send_mutex);
+	guc->send = guc_send_mmio;
+}
+
 int intel_guc_sample_forcewake(struct intel_guc *guc)
 {
 	struct drm_i915_private *dev_priv = guc_to_i915(guc);
@@ -113,4 +119,3 @@ int intel_guc_sample_forcewake(struct intel_guc *guc)
 
 	return intel_guc_send(guc, action, ARRAY_SIZE(action));
 }
-
drivers/gpu/drm/i915/intel_uc.h +8 -1
index d74f4d3..aed8653 100644
@@ -174,6 +174,9 @@ struct intel_guc {
 
 	/* To serialize the intel_guc_send actions */
 	struct mutex send_mutex;
+
+	/* GuC's FW specific send function */
+	int (*send)(struct intel_guc *guc, const u32 *data, u32 len);
 };
 
 struct intel_huc {
@@ -185,9 +188,13 @@ struct intel_huc {
 
 /* intel_uc.c */
 void intel_uc_init_early(struct drm_i915_private *dev_priv);
-int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len);
 int intel_guc_sample_forcewake(struct intel_guc *guc);
 
+static inline int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len)
+{
+	return guc->send(guc, action, len);
+}
+
 /* intel_guc_loader.c */
 extern void intel_guc_init(struct drm_i915_private *dev_priv);
 extern int intel_guc_setup(struct drm_i915_private *dev_priv);
Signature · 6 lines
1.9.1

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

✗ Fi.CI.BAT: failure for drm/i915/guc: Make intel_guc_send a function pointer

== Series Details ==

== Series Details ==

Series: drm/i915/guc: Make intel_guc_send a function pointer
URL : https://patchwork.freedesktop.org/series/19024/
State : failure

== Summary ==

Series 19024v1 drm/i915/guc: Make intel_guc_send a function pointer
https://patchwork.freedesktop.org/api/1.0/series/19024/revisions/1/mbox/

Test kms_flip:

        Subgroup basic-flip-vs-wf_vblank:
                pass       -> FAIL       (fi-skl-6700hq)
                pass       -> FAIL       (fi-skl-6770hq)
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:0   dfail:0   fail:0   skip:22 
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-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:224  dwarn:0   dfail:0   fail:2   skip:21 
fi-skl-6260u     total:247  pass:234  dwarn:0   dfail:0   fail:0   skip:13 
fi-skl-6700hq    total:247  pass:226  dwarn:0   dfail:0   fail:1   skip:20 
fi-skl-6700k     total:247  pass:222  dwarn:4   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:247  pass:233  dwarn:0   dfail:0   fail:1   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 

0f01216949002d20b9dc6d300c82df5ffa59e9a7 drm-tip: 2017y-02m-02d-19h-49m-15s UTC integration manifest 10d15f9 drm/i915/guc: Make intel_guc_send a function pointer

== Logs ==

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

Reviewed-by on v1 1/1
#2 lore raw
In reply to Oscar Mateo
Quoted 9 lines · Oscar Mateo

From: Michal Wajdeczko <[email protected]>

Prepare for an alternate GuC communication interface.

v2: Make a few functions static and name them correctly while we are at it (Oscar)

Looks reasonable,

-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
#3 lore raw
In reply to Oscar Mateo
Quoted 37 lines · Oscar Mateo

From: Michal Wajdeczko <[email protected]>

Prepare for an alternate GuC communication interface.

v2: Make a few functions static and name them correctly while we are at it (Oscar)

---
 drivers/gpu/drm/i915/intel_uc.c | 25 +++++++++++++++----------
 drivers/gpu/drm/i915/intel_uc.h |  9 ++++++++-
 2 files changed, 23 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_uc.c +1 -6
index c46bc85..0e45ef0 100644
@@ -25,16 +25,11 @@
 #include "i915_drv.h"
 #include "intel_uc.h"
 
-void intel_uc_init_early(struct drm_i915_private *dev_priv)
-{
-	mutex_init(&dev_priv->guc.send_mutex);
-}
-
 /*
  * Read GuC command/status register (SOFT_SCRATCH_0)
  * Return true if it contains a response rather than a command
  */
-static bool intel_guc_recv(struct intel_guc *guc, u32 *status)
+static bool guc_recv(struct intel_guc *guc, u32 *status)
 {
 	struct drm_i915_private *dev_priv = guc_to_i915(guc);
 

drivers/gpu/drm/i915/intel_uc.c static bool intel_guc_recv(struct intel_guc *guc, u32 *status) · line 44

Quoted 8 lines
drivers/gpu/drm/i915/intel_uc.c +4 -1
@@ -43,7 +38,10 @@ static bool intel_guc_recv(struct intel_guc *guc, u32 *status)
 	return INTEL_GUC_RECV_IS_RESPONSE(val);
 }
 
-int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len)
+/*
+ * This function implements the MMIO based host to GuC interface.
+ */
+static int guc_send_mmio(struct intel_guc *guc, const u32 *action, u32 len)

Btw, while this change is fine for now, what if in the future we will need MMIO based interface for some kind of OOB communication to GuC that bypasses alternate interface?

Quoted 16 lines
drivers/gpu/drm/i915/intel_uc.c +2 -2
 {
 	struct drm_i915_private *dev_priv = guc_to_i915(guc);
 	u32 status;
@@ -71,9 +69,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(guc, &status), 10);
+	ret = wait_for_us(guc_recv(guc, &status), 10);
 	if (ret)
-		ret = wait_for(intel_guc_recv(guc, &status), 10);
+		ret = wait_for(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.c int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len) · line 103

Quoted 8 lines
drivers/gpu/drm/i915/intel_uc.c +5 -0
@@ -98,6 +96,14 @@ int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len)
 	return ret;
 }
 
+void intel_uc_init_early(struct drm_i915_private *dev_priv)
+{
+	struct intel_guc *guc = &dev_priv->guc;
+
+	mutex_init(&dev_priv->guc.send_mutex);

No need to use dev_priv here, you can refer to the guc directly.

Regards,
Michal

Quoted 43 lines
drivers/gpu/drm/i915/intel_uc.c +3 -1
+	guc->send = guc_send_mmio;
+}
+
 int intel_guc_sample_forcewake(struct intel_guc *guc)
 {
 	struct drm_i915_private *dev_priv = guc_to_i915(guc);
@@ -113,4 +119,3 @@ int intel_guc_sample_forcewake(struct intel_guc *guc)
 
 	return intel_guc_send(guc, action, ARRAY_SIZE(action));
 }
-
drivers/gpu/drm/i915/intel_uc.h +8 -1
index d74f4d3..aed8653 100644
@@ -174,6 +174,9 @@ struct intel_guc {
 
 	/* To serialize the intel_guc_send actions */
 	struct mutex send_mutex;
+
+	/* GuC's FW specific send function */
+	int (*send)(struct intel_guc *guc, const u32 *data, u32 len);
 };
 
 struct intel_huc {
@@ -185,9 +188,13 @@ struct intel_huc {
 
 /* intel_uc.c */
 void intel_uc_init_early(struct drm_i915_private *dev_priv);
-int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len);
 int intel_guc_sample_forcewake(struct intel_guc *guc);
 
+static inline int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len)
+{
+	return guc->send(guc, action, len);
+}
+
 /* intel_guc_loader.c */
 extern void intel_guc_init(struct drm_i915_private *dev_priv);
 extern int intel_guc_setup(struct drm_i915_private *dev_priv);
Signature · 1 line
1.9.1

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

#4 lore raw
Quoted 41 lines · Michal Wajdeczko
Quoted 40 lines · Oscar Mateo

From: Michal Wajdeczko <[email protected]>

Prepare for an alternate GuC communication interface.

v2: Make a few functions static and name them correctly while we are at it (Oscar)

---
  drivers/gpu/drm/i915/intel_uc.c | 25 +++++++++++++++----------
  drivers/gpu/drm/i915/intel_uc.h |  9 ++++++++-
  2 files changed, 23 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_uc.c +1 -6
index c46bc85..0e45ef0 100644
@@ -25,16 +25,11 @@
  #include "i915_drv.h"
  #include "intel_uc.h"
 
-void intel_uc_init_early(struct drm_i915_private *dev_priv)
-{
-	mutex_init(&dev_priv->guc.send_mutex);
-}
-
  /*
   * Read GuC command/status register (SOFT_SCRATCH_0)
   * Return true if it contains a response rather than a command
   */
-static bool intel_guc_recv(struct intel_guc *guc, u32 *status)
+static bool guc_recv(struct intel_guc *guc, u32 *status)
  {
  	struct drm_i915_private *dev_priv = guc_to_i915(guc);
 
@@ -43,7 +38,10 @@ static bool intel_guc_recv(struct intel_guc *guc, u32 *status)
  	return INTEL_GUC_RECV_IS_RESPONSE(val);
  }
 
Quoted 8 lines

drivers/gpu/drm/i915/intel_uc.c static bool intel_guc_recv(struct intel_guc *guc, u32 *status) · line 44

Quoted 5 lines
drivers/gpu/drm/i915/intel_uc.c +4 -1
-int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len)
+/*
+ * This function implements the MMIO based host to GuC interface.
+ */
+static int guc_send_mmio(struct intel_guc *guc, const u32 *action, u32 len)

Btw, while this change is fine for now, what if in the future we will need MMIO based interface for some kind of OOB communication to GuC that bypasses alternate interface?

I see. So you'd prefer to have an intel_guc_send for normal communication with the GuC and an intel_guc_send_mmio for the few cases where you want to fallback to a MMIO style? I'll change this and resend.

Quoted 26 lines
Quoted 16 lines
drivers/gpu/drm/i915/intel_uc.c +2 -2
  {
  	struct drm_i915_private *dev_priv = guc_to_i915(guc);
  	u32 status;
@@ -71,9 +69,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(guc, &status), 10);
+	ret = wait_for_us(guc_recv(guc, &status), 10);
  	if (ret)
-		ret = wait_for(intel_guc_recv(guc, &status), 10);
+		ret = wait_for(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.c int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len) · line 103

Quoted 8 lines
drivers/gpu/drm/i915/intel_uc.c +5 -0
@@ -98,6 +96,14 @@ int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len)
  	return ret;
  }
 
+void intel_uc_init_early(struct drm_i915_private *dev_priv)
+{
+	struct intel_guc *guc = &dev_priv->guc;
+
+	mutex_init(&dev_priv->guc.send_mutex);

No need to use dev_priv here, you can refer to the guc directly.

Quoted 2 lines

Regards,
Michal

ACK. I'll fix it in the next version.

Quoted 32 lines
Quoted 32 lines
drivers/gpu/drm/i915/intel_uc.c +3 -1
+	guc->send = guc_send_mmio;
+}
+
  int intel_guc_sample_forcewake(struct intel_guc *guc)
  {
  	struct drm_i915_private *dev_priv = guc_to_i915(guc);
@@ -113,4 +119,3 @@ int intel_guc_sample_forcewake(struct intel_guc *guc)
 
  	return intel_guc_send(guc, action, ARRAY_SIZE(action));
  }
-
drivers/gpu/drm/i915/intel_uc.h +3 -1
index d74f4d3..aed8653 100644
@@ -174,6 +174,9 @@ struct intel_guc {
 
  	/* To serialize the intel_guc_send actions */
  	struct mutex send_mutex;
+
+	/* GuC's FW specific send function */
+	int (*send)(struct intel_guc *guc, const u32 *data, u32 len);
  };
 
  struct intel_huc {
@@ -185,9 +188,13 @@ struct intel_huc {
 
  /* intel_uc.c */
  void intel_uc_init_early(struct drm_i915_private *dev_priv);
-int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len);
  int intel_guc_sample_forcewake(struct intel_guc *guc);
 
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/i915/intel_uc.h +5 -0
+static inline int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len)
+{
+	return guc->send(guc, action, len);
+}
+
  /* intel_guc_loader.c */
  extern void intel_guc_init(struct drm_i915_private *dev_priv);
  extern int intel_guc_setup(struct drm_i915_private *dev_priv);
Signature · 1 line
1.9.1

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

#5 lore raw

PATCH v2 1/1 drm/i915/guc: Make intel_guc_send a function pointer

From: Michal Wajdeczko <[email protected]>

Prepare for an alternate GuC communication interface.

v2: Make a few functions static and name them correctly while we are at it (Oscar)
v3: Leave an intel_guc_send_mmio interface for users that require old-style communication

---
 drivers/gpu/drm/i915/intel_uc.c | 25 +++++++++++++++----------
 drivers/gpu/drm/i915/intel_uc.h | 10 +++++++++-
 2 files changed, 24 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_uc.c +15 -10
index c46bc85..2fa70a9 100644
@@ -25,16 +25,11 @@
 #include "i915_drv.h"
 #include "intel_uc.h"
 
-void intel_uc_init_early(struct drm_i915_private *dev_priv)
-{
-	mutex_init(&dev_priv->guc.send_mutex);
-}
-
 /*
  * Read GuC command/status register (SOFT_SCRATCH_0)
  * Return true if it contains a response rather than a command
  */
-static bool intel_guc_recv(struct intel_guc *guc, u32 *status)
+static bool guc_recv(struct intel_guc *guc, u32 *status)
 {
 	struct drm_i915_private *dev_priv = guc_to_i915(guc);
 
@@ -43,7 +38,10 @@ static bool intel_guc_recv(struct intel_guc *guc, u32 *status)
 	return INTEL_GUC_RECV_IS_RESPONSE(val);
 }
 
-int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len)
+/*
+ * This function implements the MMIO based host to GuC interface.
+ */
+int intel_guc_send_mmio(struct intel_guc *guc, const u32 *action, u32 len)
 {
 	struct drm_i915_private *dev_priv = guc_to_i915(guc);
 	u32 status;
@@ -71,9 +69,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(guc, &status), 10);
+	ret = wait_for_us(guc_recv(guc, &status), 10);
 	if (ret)
-		ret = wait_for(intel_guc_recv(guc, &status), 10);
+		ret = wait_for(guc_recv(guc, &status), 10);
 	if (status != INTEL_GUC_STATUS_SUCCESS) {
 		/*
 		 * Either the GuC explicitly returned an error (which
@@ -98,6 +96,14 @@ int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len)
 	return ret;
 }
 
+void intel_uc_init_early(struct drm_i915_private *dev_priv)
+{
+	struct intel_guc *guc = &dev_priv->guc;
+
+	mutex_init(&guc->send_mutex);
+	guc->send = intel_guc_send_mmio;
+}
+
 int intel_guc_sample_forcewake(struct intel_guc *guc)
 {
 	struct drm_i915_private *dev_priv = guc_to_i915(guc);
@@ -113,4 +119,3 @@ int intel_guc_sample_forcewake(struct intel_guc *guc)
 
 	return intel_guc_send(guc, action, ARRAY_SIZE(action));
 }
-
drivers/gpu/drm/i915/intel_uc.h +9 -1
index d74f4d3..8a33a46 100644
@@ -174,6 +174,9 @@ struct intel_guc {
 
 	/* To serialize the intel_guc_send actions */
 	struct mutex send_mutex;
+
+	/* GuC's FW specific send function */
+	int (*send)(struct intel_guc *guc, const u32 *data, u32 len);
 };
 
 struct intel_huc {
@@ -185,9 +188,14 @@ struct intel_huc {
 
 /* intel_uc.c */
 void intel_uc_init_early(struct drm_i915_private *dev_priv);
-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_send_mmio(struct intel_guc *guc, const u32 *action, u32 len);
+static inline int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len)
+{
+	return guc->send(guc, action, len);
+}
+
 /* intel_guc_loader.c */
 extern void intel_guc_init(struct drm_i915_private *dev_priv);
 extern int intel_guc_setup(struct drm_i915_private *dev_priv);
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#6 lore raw
Quoted 19 lines · Oscar Mateo

From: Michal Wajdeczko <[email protected]>

Prepare for an alternate GuC communication interface.

v2: Make a few functions static and name them correctly while we are at it (Oscar)
v3: Leave an intel_guc_send_mmio interface for users that require old-style communication

---
 drivers/gpu/drm/i915/intel_uc.c | 25 +++++++++++++++----------
 drivers/gpu/drm/i915/intel_uc.h | 10 +++++++++-
 2 files changed, 24 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_uc.c +0 -0
index c46bc85..2fa70a9 100644

<snip>

drivers/gpu/drm/i915/intel_uc.c int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len) · line 106

Quoted 12 lines
drivers/gpu/drm/i915/intel_uc.c +8 -0
@@ -98,6 +96,14 @@ int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len)
 	return ret;
 }
 
+void intel_uc_init_early(struct drm_i915_private *dev_priv)
+{
+	struct intel_guc *guc = &dev_priv->guc;
+
+	mutex_init(&guc->send_mutex);
+	guc->send = intel_guc_send_mmio;
+}
+

As intel_guc_send_mmio() is again public, there is no need to move intel_uc_init_early() down to this place, it can stay at the top of the file.

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

#7 lore raw

You are totally right. I'll update the patch and include it together with all the other GuC patches (less probability of it getting lost in the depths of the mailing list that way). Thanks!

Quoted 38 lines · Michal Wajdeczko
Quoted 19 lines · Oscar Mateo

From: Michal Wajdeczko <[email protected]>

Prepare for an alternate GuC communication interface.

v2: Make a few functions static and name them correctly while we are at it (Oscar)
v3: Leave an intel_guc_send_mmio interface for users that require old-style communication

---
  drivers/gpu/drm/i915/intel_uc.c | 25 +++++++++++++++----------
  drivers/gpu/drm/i915/intel_uc.h | 10 +++++++++-
  2 files changed, 24 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_uc.c +0 -0
index c46bc85..2fa70a9 100644

<snip>

drivers/gpu/drm/i915/intel_uc.c int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len) · line 106

Quoted 12 lines
drivers/gpu/drm/i915/intel_uc.c +8 -0
@@ -98,6 +96,14 @@ int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len)
  	return ret;
  }
 
+void intel_uc_init_early(struct drm_i915_private *dev_priv)
+{
+	struct intel_guc *guc = &dev_priv->guc;
+
+	mutex_init(&guc->send_mutex);
+	guc->send = intel_guc_send_mmio;
+}
+

As intel_guc_send_mmio() is again public, there is no need to move intel_uc_init_early() down to this place, it can stay at the top of the file.

Quoted 1 line

-Michal

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

#8 lore raw

✗ Fi.CI.BAT: failure for drm/i915/guc: Make intel_guc_send a function pointer (rev2)

In reply to Oscar Mateo
== Series Details ==

== Series Details ==

Series: drm/i915/guc: Make intel_guc_send a function pointer (rev2)
URL : https://patchwork.freedesktop.org/series/19024/
State : failure

== Summary ==

Series 19024v2 drm/i915/guc: Make intel_guc_send a function pointer
https://patchwork.freedesktop.org/api/1.0/series/19024/revisions/2/mbox/

Test gem_exec_fence:

        Subgroup await-hang-default:
                fail       -> PASS       (fi-bxt-j4205)
                pass       -> INCOMPLETE (fi-hsw-4770)
fi-bdw-5557u     total:252  pass:238  dwarn:0   dfail:0   fail:0   skip:14 
fi-bsw-n3050     total:252  pass:213  dwarn:0   dfail:0   fail:0   skip:39 
fi-bxt-j4205     total:252  pass:230  dwarn:0   dfail:0   fail:0   skip:22 
fi-bxt-t5700     total:83   pass:70   dwarn:0   dfail:0   fail:0   skip:12 
fi-byt-j1900     total:252  pass:225  dwarn:0   dfail:0   fail:0   skip:27 
fi-byt-n2820     total:252  pass:221  dwarn:0   dfail:0   fail:0   skip:31 
fi-hsw-4770      total:48   pass:41   dwarn:0   dfail:0   fail:0   skip:6  
fi-hsw-4770r     total:252  pass:233  dwarn:0   dfail:0   fail:0   skip:19 
fi-ilk-650       total:252  pass:199  dwarn:0   dfail:0   fail:0   skip:53 
fi-ivb-3520m     total:252  pass:231  dwarn:0   dfail:0   fail:0   skip:21 
fi-ivb-3770      total:252  pass:231  dwarn:0   dfail:0   fail:0   skip:21 
fi-kbl-7500u     total:252  pass:229  dwarn:0   dfail:0   fail:2   skip:21 
fi-skl-6260u     total:252  pass:239  dwarn:0   dfail:0   fail:0   skip:13 
fi-skl-6700hq    total:252  pass:232  dwarn:0   dfail:0   fail:0   skip:20 
fi-skl-6700k     total:252  pass:227  dwarn:4   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:252  pass:239  dwarn:0   dfail:0   fail:0   skip:13 
fi-snb-2520m     total:252  pass:221  dwarn:0   dfail:0   fail:0   skip:31 
fi-snb-2600      total:252  pass:220  dwarn:0   dfail:0   fail:0   skip:32 

b8157792b685dfcc86fa7dc23d66d663ad6fb93f drm-tip: 2017y-02m-07d-14h-55m-05s UTC integration manifest 852c39b drm/i915/guc: Make intel_guc_send a function pointer

== Logs ==

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