drm/virtio: track virtual output state

Track whenever an virtual output (crtc) is enabled or disabled.

On atomic updates check for both framebuffer being present and crtc
being enabled to figure whenever the output is active or not.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20180813152855.12863-1-kraxel@redhat.com
This commit is contained in:
Gerd Hoffmann
2018-08-13 17:28:55 +02:00
parent 7948a2b158
commit 6c19787e10
3 changed files with 6 additions and 1 deletions

View File

@@ -152,7 +152,7 @@ static void virtio_gpu_primary_plane_update(struct drm_plane *plane,
if (WARN_ON(!output))
return;
if (plane->state->fb) {
if (plane->state->fb && output->enabled) {
vgfb = to_virtio_gpu_framebuffer(plane->state->fb);
bo = gem_to_virtio_gpu_obj(vgfb->base.obj[0]);
handle = bo->hw_res_handle;