Re: [PATCH v7 12/20] drm/i915/guc: Provide register list to be saved/restored during engine reset

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

 





On 4/27/2017 4:58 PM, Chris Wilson wrote:
On Thu, Apr 27, 2017 at 04:12:52PM -0700, Michel Thierry wrote:
+#define WA_REG_WR_GUC_RESTORE(addr, val) do { \
+		const int r = guc_wa_add(dev_priv, (addr), (val)); \
+		if (r) \
+			return r; \
+	} while (0)

Try to avoid burying returns inside macros. Does this macro help code
readability? Would perhaps just a table of registers + values be easier?
-Chris


Sure, I can change it to something else.
I only replicated what the other WA_* macros (the ones we need in ctx switch) were doing.
_______________________________________________
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