On Sun, 24 Apr 2022 15:00:24 -0700, Andi Shyti wrote: > > Hi Ashutosh, > > On Tue, Apr 19, 2022 at 11:25:05PM -0700, Ashutosh Dixit wrote: > > From: Dale B Stimson <dale.b.stimson@xxxxxxxxx> > > > > Add a couple of helpers to help formatting pcode commands and improve code > > readability. > > Can you please add some more details on the helpers? Done in v3, please take a look. > > +/* > > + * Helpers for dGfx PCODE mailbox command formatting > > + */ > > +int __intel_gt_pcode_read(struct intel_gt *gt, u32 mbcmd, u32 p1, u32 p2, u32 *val); > > +int __intel_gt_pcode_write(struct intel_gt *gt, u32 mbcmd, u32 p1, u32 p2, u32 val); > > + > > +#define __snb_pcode_read(i915, mbcmd, p1, p2, val) \ > > + __intel_gt_pcode_read(&(i915)->gt0, mbcmd, p1, p2, val) > > + > > +#define __snb_pcode_write(i915, mbcmd, p1, p2, val) \ > > + __intel_gt_pcode_write(&(i915)->gt0, mbcmd, p1, p2, val) > > to_gt(i915) > > Why do we need these defines? Looks hacky and lazy. Can't we just > replace all __snb_pcode_read/write()? You are right, I've removed the #define's in v3. Thanks. -- Ashutosh