drm/nouveau/bios/init: add a new devinit script interpreter entry-point
authorBen Skeggs <bskeggs@redhat.com>
Fri, 19 May 2017 13:59:34 +0000 (23:59 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 16 Jun 2017 04:04:44 +0000 (14:04 +1000)
This will ensure unspecified args are easily identified.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/init.h

index 84d9e58..c7383e1 100644 (file)
@@ -22,6 +22,19 @@ struct nvbios_init {
        u32 ramcfg;
 };
 
+#define nvbios_init(s,o,ARGS...) ({                                            \
+       struct nvbios_init init = {                                            \
+               .subdev = (s),                                                 \
+               .offset = (o),                                                 \
+               .or = -1,                                                      \
+               .link = 0,                                                     \
+               .head = -1,                                                    \
+               .execute = 1,                                                  \
+       };                                                                     \
+       ARGS                                                                   \
+       nvbios_exec(&init);                                                    \
+})
 int nvbios_exec(struct nvbios_init *);
+
 int nvbios_post(struct nvkm_subdev *, bool execute);
 #endif