drm: virtio-gpu: get the fb from the plane state for atomic updates
authorRob Herring <robh@kernel.org>
Wed, 13 Jan 2016 21:52:07 +0000 (15:52 -0600)
committerDave Airlie <airlied@redhat.com>
Wed, 10 Feb 2016 22:56:21 +0000 (08:56 +1000)
When using the atomic API, plane->fb is not set when calling
virtio_gpu_plane_atomic_update. Use plane->state->fb instead.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/virtio/virtgpu_plane.c

index 572fb351feabe727aea0c1fa6117f0b029068ba8..cad1ca49ad313547dd746f5fcee3f109f2cd4fb1 100644 (file)
@@ -68,8 +68,8 @@ static void virtio_gpu_plane_atomic_update(struct drm_plane *plane,
        struct virtio_gpu_object *bo;
        uint32_t handle;
 
-       if (plane->fb) {
-               vgfb = to_virtio_gpu_framebuffer(plane->fb);
+       if (plane->state->fb) {
+               vgfb = to_virtio_gpu_framebuffer(plane->state->fb);
                bo = gem_to_virtio_gpu_obj(vgfb->obj);
                handle = bo->hw_res_handle;
        } else {