drm/i915/guc: Update GuC CTB response definition
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Mon, 27 May 2019 18:36:09 +0000 (18:36 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 28 May 2019 09:07:20 +0000 (10:07 +0100)
Current GuC firmwares identify response message in a different way.

v2: update comments for other H2G bits (Daniele)

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Kelvin Gardiner <kelvin.gardiner@intel.com>
Cc: John Spotswood <john.a.spotswood@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190527183613.17076-14-michal.wajdeczko@intel.com
drivers/gpu/drm/i915/intel_guc_ct.c
drivers/gpu/drm/i915/intel_guc_fwif.h

index dde1dc0d6e69d7bc87a96962d429e8c9ff49334d..2d5dc2aa22a71d67c912021e2c4f994b5600319f 100644 (file)
@@ -565,7 +565,7 @@ static inline unsigned int ct_header_get_action(u32 header)
 
 static inline bool ct_header_is_response(u32 header)
 {
-       return ct_header_get_action(header) == INTEL_GUC_ACTION_DEFAULT;
+       return !!(header & GUC_CT_MSG_IS_RESPONSE);
 }
 
 static int ctb_read(struct intel_guc_ct_buffer *ctb, u32 *data)
index fa745a58d38d8afa6fc3e8dc79b7b66f1d0c5962..3d1de288d96c77e2ddedfbef611dfa7eb468b573 100644 (file)
@@ -355,14 +355,16 @@ struct guc_ct_buffer_desc {
  *
  * bit[4..0]   message len (in dwords)
  * bit[7..5]   reserved
- * bit[8]      write fence to desc
- * bit[9]      write status to H2G buff
- * bit[10]     send status (via G2H)
+ * bit[8]      response (G2H only)
+ * bit[8]      write fence to desc (H2G only)
+ * bit[9]      write status to H2G buff (H2G only)
+ * bit[10]     send status back via G2H (H2G only)
  * bit[15..11] reserved
  * bit[31..16] action code
  */
 #define GUC_CT_MSG_LEN_SHIFT                   0
 #define GUC_CT_MSG_LEN_MASK                    0x1F
+#define GUC_CT_MSG_IS_RESPONSE                 (1 << 8)
 #define GUC_CT_MSG_WRITE_FENCE_TO_DESC         (1 << 8)
 #define GUC_CT_MSG_WRITE_STATUS_TO_BUFF                (1 << 9)
 #define GUC_CT_MSG_SEND_STATUS                 (1 << 10)