OSDN Git Service

drm/vmwgfx: Delay pinning fbdev framebuffer until after mode set
authorSinclair Yeh <syeh@vmware.com>
Wed, 29 Jun 2016 20:23:18 +0000 (13:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jul 2016 16:47:35 +0000 (09:47 -0700)
commit82c882ccb21f2345cfea2781c8e6f75eb695a055
tree6a3e46287f16385a816ab56e896ef41a64a92881
parente587d4e630827c5207ee15986fc83e29d78073c9
drm/vmwgfx: Delay pinning fbdev framebuffer until after mode set

commit d5f1a291e32309324a8c481ed84b5c118d1360ea upstream.

For the Screen Object display unit, we need to reserve a
guest-invisible region equal to the size of the framebuffer for
the host.  This region can only be reserved in VRAM, whereas
the guest-visible framebuffer can be reserved in either VRAM or
GMR.

As such priority should be given to the guest-invisible
region otherwise in a limited VRAM situation, we can fail to
allocate this region.

This patch makes it so that vmw_sou_backing_alloc() is called
before the framebuffer is pinned.

Signed-off-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c