Index: trunk/src/VBox/Additions/linux/drm/vbox_drv.c
===================================================================
--- trunk/src/VBox/Additions/linux/drm/vbox_drv.c	(revision 59558)
+++ trunk/src/VBox/Additions/linux/drm/vbox_drv.c	(revision 59568)
@@ -232,5 +232,9 @@
     .dumb_create = vbox_dumb_create,
     .dumb_map_offset = vbox_dumb_mmap_offset,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0)
     .dumb_destroy = vbox_dumb_destroy,
+#else
+    .dumb_destroy = drm_gem_dumb_destroy,
+#endif
 
 };
Index: trunk/src/VBox/Additions/linux/drm/vbox_drv.h
===================================================================
--- trunk/src/VBox/Additions/linux/drm/vbox_drv.h	(revision 59558)
+++ trunk/src/VBox/Additions/linux/drm/vbox_drv.h	(revision 59568)
@@ -88,13 +88,12 @@
 struct vbox_fbdev;
 
-struct vbox_private
-{
+struct vbox_private {
     struct drm_device *dev;
 
     void __iomem *vram;
-    HGSMIGUESTCOMMANDCONTEXT Ctx;
-    struct VBVABUFFERCONTEXT *paVBVACtx;
-    bool fAnyX;
-    unsigned cCrtcs;
+    HGSMIGUESTCOMMANDCONTEXT submit_info;
+    struct VBVABUFFERCONTEXT *vbva_info;
+    bool any_pitch;
+    unsigned num_crtcs;
     bool vga2_clone;
     /** Amount of available VRAM, including space used for buffers. */
@@ -103,7 +102,7 @@
     uint32_t vram_size;
     /** Offset to the host flags in the VRAM. */
-    uint32_t offHostFlags;
+    uint32_t host_flags_offset;
     /** Array of structures for receiving mode hints. */
-    VBVAMODEHINT *paVBVAModeHints;
+    VBVAMODEHINT *last_mode_hints;
 
     struct vbox_fbdev *fbdev;
@@ -111,6 +110,5 @@
     int fb_mtrr;
 
-    struct
-    {
+    struct {
         struct drm_global_reference mem_global_ref;
         struct ttm_bo_global_ref bo_global_ref;
@@ -126,26 +124,23 @@
 struct vbox_gem_object;
 
-struct vbox_connector
-{
+struct vbox_connector {
     struct drm_connector base;
-    char szName[32];
-    unsigned iCrtc;
+    char name[32];
+    unsigned crtc_id;
     /** Device attribute for sysfs file used for receiving mode hints from user
      * space. */
-    struct device_attribute deviceAttribute;
-    struct
-    {
-        uint16_t cX;
-        uint16_t cY;
-        bool fDisconnected;
-    } modeHint;
-};
-
-struct vbox_crtc
-{
+    struct device_attribute sysfs_node;
+    struct {
+        uint16_t width;
+        uint16_t height;
+        bool disconnected;
+    } mode_hint;
+};
+
+struct vbox_crtc {
     struct drm_crtc base;
-    bool fBlanked;
+    bool blanked;
     unsigned crtc_id;
-    uint32_t offFB;
+    uint32_t fb_offset;
     struct drm_gem_object *cursor_bo;
     uint64_t cursor_addr;
@@ -154,20 +149,16 @@
 };
 
-struct vbox_encoder
-{
+struct vbox_encoder {
     struct drm_encoder base;
 };
 
-struct vbox_framebuffer
-{
+struct vbox_framebuffer {
     struct drm_framebuffer base;
     struct drm_gem_object *obj;
 };
 
-struct vbox_fbdev
-{
+struct vbox_fbdev {
     struct drm_fb_helper helper;
     struct vbox_framebuffer afb;
-    struct list_head fbdev_list;
     void *sysram;
     int size;
@@ -183,5 +174,5 @@
 extern int vbox_mode_init(struct drm_device *dev);
 extern void vbox_mode_fini(struct drm_device *dev);
-extern void VBoxRefreshModes(struct drm_device *pDev);
+extern void vbox_refresh_modes(struct drm_device *dev);
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
@@ -198,6 +189,6 @@
 
 void vbox_framebuffer_dirty_rectangles(struct drm_framebuffer *fb,
-                                       struct drm_clip_rect *pRects,
-                                       unsigned cRects);
+                                       struct drm_clip_rect *rects,
+                                       unsigned num_rects);
 
 int vbox_framebuffer_init(struct drm_device *dev,
@@ -210,6 +201,5 @@
 void vbox_fbdev_set_suspend(struct drm_device *dev, int state);
 
-struct vbox_bo
-{
+struct vbox_bo {
     struct ttm_buffer_object bo;
     struct ttm_placement placement;
@@ -225,5 +215,6 @@
 #define gem_to_vbox_bo(gobj) container_of((gobj), struct vbox_bo, gem)
 
-static inline struct vbox_bo * vbox_bo(struct ttm_buffer_object *bo)
+static inline struct vbox_bo *
+vbox_bo(struct ttm_buffer_object *bo)
 {
     return container_of(bo, struct vbox_bo, bo);
@@ -236,7 +227,9 @@
                struct drm_device *dev,
                struct drm_mode_create_dumb *args);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0)
 extern int vbox_dumb_destroy(struct drm_file *file,
                 struct drm_device *dev,
                 uint32_t handle);
+#endif
 
 extern void vbox_gem_free_object(struct drm_gem_object *obj);
@@ -280,11 +273,6 @@
 }
 
-int vbox_bo_reserve(struct vbox_bo *bo, bool no_wait);
-void vbox_bo_unreserve(struct vbox_bo *bo);
 void vbox_ttm_placement(struct vbox_bo *bo, int domain);
 int vbox_bo_push_sysram(struct vbox_bo *bo);
 int vbox_mmap(struct file *filp, struct vm_area_struct *vma);
-
-/* vbox post */
-void vbox_post_gpu(struct drm_device *dev);
-#endif
+#endif
Index: trunk/src/VBox/Additions/linux/drm/vbox_fb.c
===================================================================
--- trunk/src/VBox/Additions/linux/drm/vbox_fb.c	(revision 59558)
+++ trunk/src/VBox/Additions/linux/drm/vbox_fb.c	(revision 59568)
@@ -80,15 +80,15 @@
 {
     struct vbox_fbdev *pVFBDev = pInfo->par;
-    struct drm_device *pDev;
+    struct drm_device *dev;
     struct vbox_private *pVBox;
     unsigned i;
 
     LogFunc(("vboxvideo: %d\n", __LINE__));
-    pDev = pVFBDev->helper.dev;
-    pVBox = pDev->dev_private;
-    VBoxRefreshModes(pDev);
-    for (i = 0; i < pVBox->cCrtcs; ++i)
-        VBoxVBVADisable(&pVBox->paVBVACtx[i], &pVBox->Ctx, i);
-    VBoxHGSMISendCapsInfo(&pVBox->Ctx, 0);
+    dev = pVFBDev->helper.dev;
+    pVBox = dev->dev_private;
+    vbox_refresh_modes(dev);
+    for (i = 0; i < pVBox->num_crtcs; ++i)
+        VBoxVBVADisable(&pVBox->vbva_info[i], &pVBox->submit_info, i);
+    VBoxHGSMISendCapsInfo(&pVBox->submit_info, 0);
     return drm_fb_helper_set_par(pInfo);
 }
@@ -427,5 +427,5 @@
     drm_fb_helper_prepare(dev, &afbdev->helper, &vbox_fb_helper_funcs);
 #endif
-    ret = drm_fb_helper_init(dev, &afbdev->helper, vbox->cCrtcs, vbox->cCrtcs);
+    ret = drm_fb_helper_init(dev, &afbdev->helper, vbox->num_crtcs, vbox->num_crtcs);
     if (ret)
         goto free;
Index: trunk/src/VBox/Additions/linux/drm/vbox_main.c
===================================================================
--- trunk/src/VBox/Additions/linux/drm/vbox_main.c	(revision 59558)
+++ trunk/src/VBox/Additions/linux/drm/vbox_main.c	(revision 59568)
@@ -70,6 +70,6 @@
  * takes over the console that is not aware of VBVA (i.e. the VESA BIOS). */
 void vbox_framebuffer_dirty_rectangles(struct drm_framebuffer *fb,
-                                       struct drm_clip_rect *pRects,
-                                       unsigned cRects)
+                                       struct drm_clip_rect *rects,
+                                       unsigned num_rects)
 {
     struct vbox_private *vbox = fb->dev->dev_private;
@@ -77,14 +77,14 @@
     unsigned long flags;
 
-    LogFunc(("vboxvideo: %d: fb=%p, cRects=%u, vbox=%p\n", __LINE__, fb,
-             cRects, vbox));
+    LogFunc(("vboxvideo: %d: fb=%p, num_rects=%u, vbox=%p\n", __LINE__, fb,
+             num_rects, vbox));
     spin_lock_irqsave(&vbox->dev_lock, flags);
-    for (i = 0; i < cRects; ++i)
+    for (i = 0; i < num_rects; ++i)
     {
         struct drm_crtc *crtc;
         list_for_each_entry(crtc, &fb->dev->mode_config.crtc_list, head)
         {
-            unsigned iCrtc = to_vbox_crtc(crtc)->crtc_id;
-            struct VBVABUFFER *pVBVA = vbox->paVBVACtx[iCrtc].pVBVA;
+            unsigned crtc_id = to_vbox_crtc(crtc)->crtc_id;
+            struct VBVABUFFER *pVBVA = vbox->vbva_info[crtc_id].pVBVA;
             VBVACMDHDR cmdHdr;
 
@@ -94,29 +94,29 @@
                 pVBVA = (struct VBVABUFFER *) (  ((uint8_t *)vbox->vram)
                                                + vbox->vram_size
-                                               + iCrtc * VBVA_MIN_BUFFER_SIZE);
-                if (!VBoxVBVAEnable(&vbox->paVBVACtx[iCrtc], &vbox->Ctx, pVBVA, iCrtc))
+                                               + crtc_id * VBVA_MIN_BUFFER_SIZE);
+                if (!VBoxVBVAEnable(&vbox->vbva_info[crtc_id], &vbox->submit_info, pVBVA, crtc_id))
                     AssertReleaseMsgFailed(("VBoxVBVAEnable failed - heap allocation error, very old host or driver error.\n"));
                 /* Assume that if the user knows to send dirty rectangle information
                  * they can also handle hot-plug events. */
-                VBoxHGSMISendCapsInfo(&vbox->Ctx, VBVACAPS_VIDEO_MODE_HINTS | VBVACAPS_DISABLE_CURSOR_INTEGRATION);
+                VBoxHGSMISendCapsInfo(&vbox->submit_info, VBVACAPS_VIDEO_MODE_HINTS | VBVACAPS_DISABLE_CURSOR_INTEGRATION);
             }
             if (   CRTC_FB(crtc) != fb
-                || pRects[i].x1 >   crtc->x
+                || rects[i].x1 >   crtc->x
                                   + crtc->hwmode.hdisplay
-                || pRects[i].y1 >   crtc->y
+                || rects[i].y1 >   crtc->y
                                   + crtc->hwmode.vdisplay
-                || pRects[i].x2 < crtc->x
-                || pRects[i].y2 < crtc->y)
+                || rects[i].x2 < crtc->x
+                || rects[i].y2 < crtc->y)
                 continue;
-            cmdHdr.x = (int16_t)pRects[i].x1;
-            cmdHdr.y = (int16_t)pRects[i].y1;
-            cmdHdr.w = (uint16_t)pRects[i].x2 - pRects[i].x1;
-            cmdHdr.h = (uint16_t)pRects[i].y2 - pRects[i].y1;
-            if (VBoxVBVABufferBeginUpdate(&vbox->paVBVACtx[iCrtc],
-                                          &vbox->Ctx))
+            cmdHdr.x = (int16_t)rects[i].x1;
+            cmdHdr.y = (int16_t)rects[i].y1;
+            cmdHdr.w = (uint16_t)rects[i].x2 - rects[i].x1;
+            cmdHdr.h = (uint16_t)rects[i].y2 - rects[i].y1;
+            if (VBoxVBVABufferBeginUpdate(&vbox->vbva_info[crtc_id],
+                                          &vbox->submit_info))
             {
-                VBoxVBVAWrite(&vbox->paVBVACtx[iCrtc], &vbox->Ctx, &cmdHdr,
+                VBoxVBVAWrite(&vbox->vbva_info[crtc_id], &vbox->submit_info, &cmdHdr,
                               sizeof(cmdHdr));
-                VBoxVBVABufferEndUpdate(&vbox->paVBVACtx[iCrtc]);
+                VBoxVBVABufferEndUpdate(&vbox->vbva_info[crtc_id]);
             }
         }
@@ -129,9 +129,9 @@
                                        struct drm_file *file_priv,
                                        unsigned flags, unsigned color,
-                                       struct drm_clip_rect *pRects,
-                                       unsigned cRects)
+                                       struct drm_clip_rect *rects,
+                                       unsigned num_rects)
 {
     LogFunc(("vboxvideo: %d, flags=%u\n", __LINE__, flags));
-    vbox_framebuffer_dirty_rectangles(fb, pRects, cRects);
+    vbox_framebuffer_dirty_rectangles(fb, rects, num_rects);
     return 0;
 }
@@ -202,10 +202,10 @@
     unsigned i;
 
-    if (pVBox->paVBVACtx)
+    if (pVBox->vbva_info)
     {
-        for (i = 0; i < pVBox->cCrtcs; ++i)
-            VBoxVBVADisable(&pVBox->paVBVACtx[i], &pVBox->Ctx, i);
-        kfree(pVBox->paVBVACtx);
-        pVBox->paVBVACtx = NULL;
+        for (i = 0; i < pVBox->num_crtcs; ++i)
+            VBoxVBVADisable(&pVBox->vbva_info[i], &pVBox->submit_info, i);
+        kfree(pVBox->vbva_info);
+        pVBox->vbva_info = NULL;
     }
 }
@@ -215,22 +215,22 @@
     unsigned i;
     bool fRC = true;
-    LogFunc(("vboxvideo: %d: vbox=%p, vbox->cCrtcs=%u, vbox->paVBVACtx=%p\n",
-             __LINE__, vbox, (unsigned)vbox->cCrtcs, vbox->paVBVACtx));
-    if (!vbox->paVBVACtx)
+    LogFunc(("vboxvideo: %d: vbox=%p, vbox->num_crtcs=%u, vbox->vbva_info=%p\n",
+             __LINE__, vbox, (unsigned)vbox->num_crtcs, vbox->vbva_info));
+    if (!vbox->vbva_info)
     {
-        vbox->paVBVACtx = kzalloc(  sizeof(struct VBVABUFFERCONTEXT)
-                                  * vbox->cCrtcs,
+        vbox->vbva_info = kzalloc(  sizeof(struct VBVABUFFERCONTEXT)
+                                  * vbox->num_crtcs,
                                   GFP_KERNEL);
-        if (!vbox->paVBVACtx)
+        if (!vbox->vbva_info)
             return -ENOMEM;
     }
     /* Take a command buffer for each screen from the end of usable VRAM. */
-    vbox->vram_size -= vbox->cCrtcs * VBVA_MIN_BUFFER_SIZE;
-    for (i = 0; i < vbox->cCrtcs; ++i)
-        VBoxVBVASetupBufferContext(&vbox->paVBVACtx[i],
+    vbox->vram_size -= vbox->num_crtcs * VBVA_MIN_BUFFER_SIZE;
+    for (i = 0; i < vbox->num_crtcs; ++i)
+        VBoxVBVASetupBufferContext(&vbox->vbva_info[i],
                                    vbox->vram_size + i * VBVA_MIN_BUFFER_SIZE,
                                    VBVA_MIN_BUFFER_SIZE);
-    LogFunc(("vboxvideo: %d: vbox->paVBVACtx=%p, vbox->vram_size=%u\n",
-             __LINE__, vbox->paVBVACtx, (unsigned)vbox->vram_size));
+    LogFunc(("vboxvideo: %d: vbox->vbva_info=%p, vbox->vram_size=%u\n",
+             __LINE__, vbox->vbva_info, (unsigned)vbox->vram_size));
     return 0;
 }
@@ -263,11 +263,11 @@
 
 /** Do we support the 4.3 plus mode hint reporting interface? */
-static bool haveHGSMIModeHintAndCursorReportingInterface(struct vbox_private *pVBox)
-{
-    uint32_t fModeHintReporting, fCursorReporting;
-
-    return    RT_SUCCESS(VBoxQueryConfHGSMI(&pVBox->Ctx, VBOX_VBVA_CONF32_MODE_HINT_REPORTING, &fModeHintReporting))
-           && RT_SUCCESS(VBoxQueryConfHGSMI(&pVBox->Ctx, VBOX_VBVA_CONF32_GUEST_CURSOR_REPORTING, &fCursorReporting))
-           && fModeHintReporting == VINF_SUCCESS
+static bool haveHGSMImode_hintAndCursorReportingInterface(struct vbox_private *pVBox)
+{
+    uint32_t fmode_hintReporting, fCursorReporting;
+
+    return    RT_SUCCESS(VBoxQueryConfHGSMI(&pVBox->submit_info, VBOX_VBVA_CONF32_MODE_HINT_REPORTING, &fmode_hintReporting))
+           && RT_SUCCESS(VBoxQueryConfHGSMI(&pVBox->submit_info, VBOX_VBVA_CONF32_GUEST_CURSOR_REPORTING, &fCursorReporting))
+           && fmode_hintReporting == VINF_SUCCESS
            && fCursorReporting == VINF_SUCCESS;
 }
@@ -278,12 +278,12 @@
 static int setupAcceleration(struct vbox_private *pVBox)
 {
-    uint32_t offBase, offGuestHeap, cbGuestHeap, offHostFlags;
+    uint32_t offBase, offGuestHeap, cbGuestHeap, host_flags_offset;
     void *pvGuestHeap;
 
     VBoxHGSMIGetBaseMappingInfo(pVBox->full_vram_size, &offBase, NULL,
-                                &offGuestHeap, &cbGuestHeap, &offHostFlags);
+                                &offGuestHeap, &cbGuestHeap, &host_flags_offset);
     pvGuestHeap =   ((uint8_t *)pVBox->vram) + offBase + offGuestHeap;
-    pVBox->offHostFlags = offBase + offHostFlags;
-    if (RT_FAILURE(VBoxHGSMISetupGuestContext(&pVBox->Ctx, pvGuestHeap,
+    pVBox->host_flags_offset = offBase + host_flags_offset;
+    if (RT_FAILURE(VBoxHGSMISetupGuestContext(&pVBox->submit_info, pvGuestHeap,
                                               cbGuestHeap,
                                               offBase + offGuestHeap,
@@ -293,9 +293,9 @@
     pVBox->vram_size = offBase;
     /* Linux drm represents monitors as a 32-bit array. */
-    pVBox->cCrtcs = RT_MIN(VBoxHGSMIGetMonitorCount(&pVBox->Ctx), 32);
-    if (!haveHGSMIModeHintAndCursorReportingInterface(pVBox))
+    pVBox->num_crtcs = RT_MIN(VBoxHGSMIGetMonitorCount(&pVBox->submit_info), 32);
+    if (!haveHGSMImode_hintAndCursorReportingInterface(pVBox))
         return -ENOTSUPP;
-    pVBox->paVBVAModeHints = kzalloc(sizeof(VBVAMODEHINT) * pVBox->cCrtcs, GFP_KERNEL);
-    if (!pVBox->paVBVAModeHints)
+    pVBox->last_mode_hints = kzalloc(sizeof(VBVAMODEHINT) * pVBox->num_crtcs, GFP_KERNEL);
+    if (!pVBox->last_mode_hints)
         return -ENOMEM;
     return vbox_vbva_init(pVBox);
@@ -326,5 +326,5 @@
     }
     vbox->full_vram_size = VBoxVideoGetVRAMSize();
-    vbox->fAnyX = VBoxVideoAnyWidthAllowed();
+    vbox->any_pitch = VBoxVideoAnyWidthAllowed();
     DRM_INFO("VRAM %08x\n", vbox->full_vram_size);
 
@@ -438,4 +438,5 @@
 }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0)
 int vbox_dumb_destroy(struct drm_file *file,
              struct drm_device *dev,
@@ -446,4 +447,5 @@
     return drm_gem_handle_delete(file, handle);
 }
+#endif
 
 static void vbox_bo_unref(struct vbox_bo **bo)
Index: trunk/src/VBox/Additions/linux/drm/vbox_mode.c
===================================================================
--- trunk/src/VBox/Additions/linux/drm/vbox_mode.c	(revision 59558)
+++ trunk/src/VBox/Additions/linux/drm/vbox_mode.c	(revision 59568)
@@ -72,5 +72,5 @@
     struct vbox_private *vbox;
     int width, height, cBPP, pitch;
-    unsigned iCrtc;
+    unsigned crtc_id;
     uint16_t fFlags;
 
@@ -80,5 +80,5 @@
     width = mode->hdisplay ? mode->hdisplay : 640;
     height = mode->vdisplay ? mode->vdisplay : 480;
-    iCrtc = vbox_crtc->crtc_id;
+    crtc_id = vbox_crtc->crtc_id;
     cBPP = crtc->enabled ? CRTC_FB(crtc)->bits_per_pixel : 32;
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
@@ -93,11 +93,11 @@
     fFlags = VBVA_SCREEN_F_ACTIVE;
     fFlags |= (crtc->enabled ? 0 : VBVA_SCREEN_F_DISABLED);
-    VBoxHGSMIProcessDisplayInfo(&vbox->Ctx, vbox_crtc->crtc_id,
+    VBoxHGSMIProcessDisplayInfo(&vbox->submit_info, vbox_crtc->crtc_id,
                                 crtc->x, crtc->y,
                                 crtc->x * cBPP / 8 + crtc->y * pitch,
                                 pitch, width, height,
-                                vbox_crtc->fBlanked ? 0 : cBPP, fFlags);
-    VBoxHGSMIReportFlagsLocation(&vbox->Ctx, vbox->offHostFlags);
-    VBoxHGSMISendCapsInfo(&vbox->Ctx, VBVACAPS_VIDEO_MODE_HINTS | VBVACAPS_DISABLE_CURSOR_INTEGRATION);
+                                vbox_crtc->blanked ? 0 : cBPP, fFlags);
+    VBoxHGSMIReportFlagsLocation(&vbox->submit_info, vbox->host_flags_offset);
+    VBoxHGSMISendCapsInfo(&vbox->submit_info, VBVACAPS_VIDEO_MODE_HINTS | VBVACAPS_DISABLE_CURSOR_INTEGRATION);
     LogFunc(("vboxvideo: %d\n", __LINE__));
 }
@@ -118,5 +118,5 @@
      * the first view be the managed memory plus the first command buffer, the
      * second the same plus the second buffer and so on. */
-    p = VBoxHGSMIBufferAlloc(&vbox->Ctx, sizeof(VBVAINFOVIEW), HGSMI_CH_VBVA,
+    p = VBoxHGSMIBufferAlloc(&vbox->submit_info, sizeof(VBVAINFOVIEW), HGSMI_CH_VBVA,
                              VBVA_INFO_VIEW);
     if (p)
@@ -124,10 +124,10 @@
         VBVAINFOVIEW *pInfo = (VBVAINFOVIEW *)p;
         pInfo->u32ViewIndex = vbox_crtc->crtc_id;
-        pInfo->u32ViewOffset = vbox_crtc->offFB;
-        pInfo->u32ViewSize =   vbox->vram_size - vbox_crtc->offFB
+        pInfo->u32ViewOffset = vbox_crtc->fb_offset;
+        pInfo->u32ViewSize =   vbox->vram_size - vbox_crtc->fb_offset
                              + vbox_crtc->crtc_id * VBVA_MIN_BUFFER_SIZE;
-        pInfo->u32MaxScreenSize = vbox->vram_size - vbox_crtc->offFB;
-        VBoxHGSMIBufferSubmit(&vbox->Ctx, p);
-        VBoxHGSMIBufferFree(&vbox->Ctx, p);
+        pInfo->u32MaxScreenSize = vbox->vram_size - vbox_crtc->fb_offset;
+        VBoxHGSMIBufferSubmit(&vbox->submit_info, p);
+        VBoxHGSMIBufferFree(&vbox->submit_info, p);
     }
     else
@@ -152,10 +152,10 @@
     switch (mode) {
     case DRM_MODE_DPMS_ON:
-        vbox_crtc->fBlanked = false;
+        vbox_crtc->blanked = false;
         break;
     case DRM_MODE_DPMS_STANDBY:
     case DRM_MODE_DPMS_SUSPEND:
     case DRM_MODE_DPMS_OFF:
-        vbox_crtc->fBlanked = true;
+        vbox_crtc->blanked = true;
         break;
     }
@@ -222,5 +222,5 @@
 
     /* vbox_set_start_address_crt1(crtc, (u32)gpu_addr); */
-    vbox_crtc->offFB = gpu_addr;
+    vbox_crtc->fb_offset = gpu_addr;
 
     LogFunc(("vboxvideo: %d: vbox_fb=%p, obj=%p, bo=%p, gpu_addr=%u\n",
@@ -413,14 +413,14 @@
     LogFunc(("vboxvideo: %d: vbox_connector=%p\n", __LINE__, vbox_connector));
     pVBox = vbox_connector->base.dev->dev_private;
-    rc = VBoxHGSMIGetModeHints(&pVBox->Ctx, pVBox->cCrtcs, pVBox->paVBVAModeHints);
+    rc = VBoxHGSMIGetModeHints(&pVBox->submit_info, pVBox->num_crtcs, pVBox->last_mode_hints);
     AssertMsgRCReturnVoid(rc, ("VBoxHGSMIGetModeHints failed, rc=%Rrc.\n", rc));
-    if (pVBox->paVBVAModeHints[vbox_connector->iCrtc].magic == VBVAMODEHINT_MAGIC)
+    if (pVBox->last_mode_hints[vbox_connector->crtc_id].magic == VBVAMODEHINT_MAGIC)
     {
-        vbox_connector->modeHint.cX = pVBox->paVBVAModeHints[vbox_connector->iCrtc].cx & 0x8fff;
-        vbox_connector->modeHint.cY = pVBox->paVBVAModeHints[vbox_connector->iCrtc].cy & 0x8fff;
-        vbox_connector->modeHint.fDisconnected = !(pVBox->paVBVAModeHints[vbox_connector->iCrtc].fEnabled);
-        LogFunc(("vboxvideo: %d: cX=%u, cY=%u, fDisconnected=%RTbool\n", __LINE__,
-                 (unsigned)vbox_connector->modeHint.cX, (unsigned)vbox_connector->modeHint.cY,
-                 vbox_connector->modeHint.fDisconnected));
+        vbox_connector->mode_hint.width = pVBox->last_mode_hints[vbox_connector->crtc_id].cx & 0x8fff;
+        vbox_connector->mode_hint.height = pVBox->last_mode_hints[vbox_connector->crtc_id].cy & 0x8fff;
+        vbox_connector->mode_hint.disconnected = !(pVBox->last_mode_hints[vbox_connector->crtc_id].fEnabled);
+        LogFunc(("vboxvideo: %d: width=%u, height=%u, disconnected=%RTbool\n", __LINE__,
+                 (unsigned)vbox_connector->mode_hint.width, (unsigned)vbox_connector->mode_hint.height,
+                 vbox_connector->mode_hint.disconnected));
     }
 }
@@ -431,5 +431,5 @@
     struct drm_display_mode *pMode = NULL;
     unsigned cModes = 0;
-    int cxPreferred, cyPreferred;
+    int widthPreferred, heightPreferred;
 
     LogFunc(("vboxvideo: %d: connector=%p\n", __LINE__, connector));
@@ -437,7 +437,7 @@
     vboxUpdateHints(vbox_connector);
     cModes = drm_add_modes_noedid(connector, 2560, 1600);
-    cxPreferred = vbox_connector->modeHint.cX ? vbox_connector->modeHint.cX : 1024;
-    cyPreferred = vbox_connector->modeHint.cY ? vbox_connector->modeHint.cY : 768;
-    pMode = drm_cvt_mode(connector->dev, cxPreferred, cyPreferred, 60, false,
+    widthPreferred = vbox_connector->mode_hint.width ? vbox_connector->mode_hint.width : 1024;
+    heightPreferred = vbox_connector->mode_hint.height ? vbox_connector->mode_hint.height : 768;
+    pMode = drm_cvt_mode(connector->dev, widthPreferred, heightPreferred, 60, false,
                          false, false);
     if (pMode)
@@ -462,5 +462,5 @@
     LogFunc(("vboxvideo: %d: connector=%p\n", __LINE__, connector));
     vbox_connector = to_vbox_connector(connector);
-    device_remove_file(connector->dev->dev, &vbox_connector->deviceAttribute);
+    device_remove_file(connector->dev->dev, &vbox_connector->sysfs_node);
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
     drm_sysfs_connector_remove(connector);
@@ -481,5 +481,5 @@
     vbox_connector = to_vbox_connector(connector);
     vboxUpdateHints(vbox_connector);
-    return !vbox_connector->modeHint.fDisconnected;
+    return !vbox_connector->mode_hint.disconnected;
 }
 
@@ -525,5 +525,5 @@
              dev, pAttr, psz, (unsigned long long)cch));
     vbox_connector = container_of(pAttr, struct vbox_connector,
-                                  deviceAttribute);
+                                  sysfs_node);
     pVBox = vbox_connector->base.dev->dev_private;
     drm_kms_helper_hotplug_event(vbox_connector->base.dev);
@@ -547,5 +547,5 @@
 
     connector = &vbox_connector->base;
-    vbox_connector->iCrtc = cScreen;
+    vbox_connector->crtc_id = cScreen;
 
     /*
@@ -553,11 +553,11 @@
      * space.
      */
-    snprintf(vbox_connector->szName, sizeof(vbox_connector->szName),
+    snprintf(vbox_connector->name, sizeof(vbox_connector->name),
              "vbox_screen_%u", cScreen);
-    vbox_connector->deviceAttribute.attr.name = vbox_connector->szName;
-    vbox_connector->deviceAttribute.attr.mode = S_IWUSR;
-    vbox_connector->deviceAttribute.show      = NULL;
-    vbox_connector->deviceAttribute.store     = vbox_connector_write_sysfs;
-    rc = device_create_file(dev->dev, &vbox_connector->deviceAttribute);
+    vbox_connector->sysfs_node.attr.name = vbox_connector->name;
+    vbox_connector->sysfs_node.attr.mode = S_IWUSR;
+    vbox_connector->sysfs_node.show      = NULL;
+    vbox_connector->sysfs_node.store     = vbox_connector_write_sysfs;
+    rc = device_create_file(dev->dev, &vbox_connector->sysfs_node);
     if (rc < 0)
     {
@@ -638,5 +638,5 @@
     /* vbox_cursor_init(dev); */
     LogFunc(("vboxvideo: %d: dev=%p\n", __LINE__, dev));
-    for (i = 0; i < pVBox->cCrtcs; ++i)
+    for (i = 0; i < pVBox->num_crtcs; ++i)
     {
         vbox_crtc_init(dev, i);
@@ -654,5 +654,5 @@
 
 
-void VBoxRefreshModes(struct drm_device *dev)
+void vbox_refresh_modes(struct drm_device *dev)
 {
     struct vbox_private *vbox = dev->dev_private;
@@ -702,5 +702,5 @@
     if (!handle) {
         /* Hide cursor. */
-        VBoxHGSMIUpdatePointerShape(&vbox->Ctx, 0, 0, 0, 0, 0, NULL, 0);
+        VBoxHGSMIUpdatePointerShape(&vbox->submit_info, 0, 0, 0, 0, 0, NULL, 0);
         return 0;
     }
@@ -733,5 +733,5 @@
                                           | VBOX_MOUSE_POINTER_ALPHA;
                         copy_cursor_image(src, dst, width, height, cbMask);
-                        rc = VBoxHGSMIUpdatePointerShape(&vbox->Ctx, fFlags,
+                        rc = VBoxHGSMIUpdatePointerShape(&vbox->submit_info, fFlags,
                                                          hot_x, hot_y, width,
                                                          height, dst, cbData);
