Re: [PATCH v7 10/12] drm/i915/guc: Handle default action received over CT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 3/27/2018 3:49 PM, Michel Thierry wrote:
On 3/27/2018 2:41 PM, Michal Wajdeczko wrote:
When running on platform with CTB based GuC communication enabled,
GuC to Host event data will be delivered as CT request message.
However, content of the data[1] of this CT message follows format
of the scratch register used in MMIO based communication, so some
code reuse is still possible.

v2:  filter disabled messages (Daniele)

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
Cc: Oscar Mateo <oscar.mateo@xxxxxxxxx>
Reviewed-by: Michel Thierry <michel.thierry@xxxxxxxxx> #1
   ^ still applies for v2, but I would wait for Daniele's blessing


Acked-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx>

A minor comment below.

Daniele

<snip>

--- a/drivers/gpu/drm/i915/intel_guc_ct.c
+++ b/drivers/gpu/drm/i915/intel_guc_ct.c
@@ -694,8 +694,17 @@ static int ct_handle_response(struct intel_guc_ct *ct, const u32 *msg)
  static void ct_process_request(struct intel_guc_ct *ct,
                     u32 action, u32 len, const u32 *payload)
  {
+    struct intel_guc *guc = ct_to_guc(ct);
+
      switch (action) {
+    case INTEL_GUC_ACTION_DEFAULT:
+        if (unlikely(len < 1))
+            goto fail_unexpected;
+        intel_guc_to_host_process_recv_msg(guc, *payload);
+        break;
+
      default:
+fail_unexpected:
          DRM_ERROR("CT: unexpected request %x %*phn\n",
                action, 4 * len, payload);

if we end up here from the goto with len == 0 this print will probably not output a fully clear message (error with a correct action number and no data). Not a blocker because we can still infer it was a length issue.

          break;

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux