vmwgfx: Add helper function to get surface or dmabuf