]> git.hungrycats.org Git - linux/commitdiff
drm/qxl: recreate the primary surface when the bo is not primary
authorFabiano FidĂȘncio <fidencio@redhat.com>
Thu, 24 Sep 2015 13:18:34 +0000 (15:18 +0200)
committerSasha Levin <sasha.levin@oracle.com>
Wed, 28 Oct 2015 02:13:42 +0000 (22:13 -0400)
[ Upstream commit 8d0d94015e96b8853c4f7f06eac3f269e1b3d866 ]

When disabling/enabling a crtc the primary area must be updated
independently of which crtc has been disabled/enabled.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1264735

Signed-off-by: Fabiano FidĂȘncio <fidencio@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/gpu/drm/qxl/qxl_display.c

index 8faacddae765883f5877afa9e97b38313c62af58..3a68f0e03b715bc6afc1057883106704ae71ba8c 100644 (file)
@@ -598,7 +598,7 @@ static int qxl_crtc_mode_set(struct drm_crtc *crtc,
                  adjusted_mode->hdisplay,
                  adjusted_mode->vdisplay);
 
-       if (qcrtc->index == 0)
+       if (bo->is_primary == false)
                recreate_primary = true;
 
        if (bo->surf.stride * bo->surf.height > qdev->vram_size) {