From nobody Mon Feb 9 18:44:10 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614862770; cv=none; d=zohomail.com; s=zohoarc; b=l2ZgDXiHPexLGUCFm+tzHC848lol0DsrVraJMZ1E3CS2fMoxDFPxfmqwmtfGPjRJj2YlkfZXbmPnEjwl/ngTB1Ae+pyMdpKzDhjbwkjFcPer8sR5cjUEE87MDKV8BZ6Y5VuZJfi2Q0wn34rkTDK5evQ3kDEFSGvJMGnQVqejIU4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614862770; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=VCrcx5KnxDYf0WVWh41HGB+RrfSfd+rZwguNloOHZBQ=; b=RYQWVH2UckRlp5xa9rktW2hl5csEyjbzaemaN3tUWCEbJdNV+WyzdHgk1EpAUByHhshVkNjDe3PMEKFnhRwSufOaY88LhbAu0fDebLCuWyAOWJdfHYwGkfk/Ig7J48xaLmnG2KQWESyB5TfpwHXD1LvgoI615ZYCaWfMkpj2nh4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1614862770618239.25178364231715; Thu, 4 Mar 2021 04:59:30 -0800 (PST) Received: from localhost ([::1]:37296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHnZh-0006TO-JA for importer@patchew.org; Thu, 04 Mar 2021 07:59:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55938) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHnT3-0007k4-LH for qemu-devel@nongnu.org; Thu, 04 Mar 2021 07:52:37 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:34456) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1lHnT2-0005BA-3o for qemu-devel@nongnu.org; Thu, 04 Mar 2021 07:52:37 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-577-jO5k3Bm9Nd-WaL5HIaX3tg-1; Thu, 04 Mar 2021 07:52:31 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4D77B1005D4D; Thu, 4 Mar 2021 12:52:30 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-115-129.ams2.redhat.com [10.36.115.129]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 71BAF5C1C2; Thu, 4 Mar 2021 12:52:20 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id AC0C8180063D; Thu, 4 Mar 2021 09:37:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614862355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VCrcx5KnxDYf0WVWh41HGB+RrfSfd+rZwguNloOHZBQ=; b=LO9jXdpjvUHGo9KRkLwfS1NgoczjhEfzeMAkTS1m+wSV9kjG3fd7YzJQuhMgUGX3/r0+tA GKVDVaWC3Tb9wrI7mQw1ILGCUXIOynNIX4mORXlbw5vwc+CTrSxbXQWneHsY//Vrwn58Od e9KdUSYG69kIz2XntSFwkxYkILkx5Qw= X-MC-Unique: jO5k3Bm9Nd-WaL5HIaX3tg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 8/8] virtio-gpu: Do not distinguish the primary console Date: Thu, 4 Mar 2021 09:37:05 +0100 Message-Id: <20210304083705.1046645-9-kraxel@redhat.com> In-Reply-To: <20210304083705.1046645-1-kraxel@redhat.com> References: <20210304083705.1046645-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_03_06=1.592, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , "Michael S. Tsirkin" , Gerd Hoffmann , Akihiko Odaki , Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Akihiko Odaki In the past, virtio-gpu set NULL as the surface for the secondary consoles to hide its window. The distinction is now handled in ui/console and the display backends and virtio-gpu does no longer have to do that. Signed-off-by: Akihiko Odaki Message-Id: <20210225101316.83940-3-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann --- hw/display/vhost-user-gpu.c | 6 ++---- hw/display/virtio-gpu-3d.c | 10 +++------- hw/display/virtio-gpu-base.c | 3 --- hw/display/virtio-gpu.c | 9 +-------- 4 files changed, 6 insertions(+), 22 deletions(-) diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c index 3e911da795ea..a01f9315e199 100644 --- a/hw/display/vhost-user-gpu.c +++ b/hw/display/vhost-user-gpu.c @@ -193,10 +193,8 @@ vhost_user_gpu_handle_display(VhostUserGPU *g, VhostUs= erGpuMsg *msg) s =3D &g->parent_obj.scanout[m->scanout_id]; con =3D s->con; =20 - if (m->scanout_id =3D=3D 0 && m->width =3D=3D 0) { - s->ds =3D qemu_create_placeholder_surface(640, 480, - "Guest disabled displa= y."); - dpy_gfx_replace_surface(con, s->ds); + if (m->width =3D=3D 0) { + dpy_gfx_replace_surface(con, NULL); } else { s->ds =3D qemu_create_displaysurface(m->width, m->height); /* replace surface on next update */ diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c index 0b0c11474dd3..9eb489077b17 100644 --- a/hw/display/virtio-gpu-3d.c +++ b/hw/display/virtio-gpu-3d.c @@ -179,10 +179,8 @@ static void virgl_cmd_set_scanout(VirtIOGPU *g, info.width, info.height, ss.r.x, ss.r.y, ss.r.width, ss.r.height); } else { - if (ss.scanout_id !=3D 0) { - dpy_gfx_replace_surface( - g->parent_obj.scanout[ss.scanout_id].con, NULL); - } + dpy_gfx_replace_surface( + g->parent_obj.scanout[ss.scanout_id].con, NULL); dpy_gl_scanout_disable(g->parent_obj.scanout[ss.scanout_id].con); } g->parent_obj.scanout[ss.scanout_id].resource_id =3D ss.resource_id; @@ -595,9 +593,7 @@ void virtio_gpu_virgl_reset(VirtIOGPU *g) =20 virgl_renderer_reset(); for (i =3D 0; i < g->parent_obj.conf.max_outputs; i++) { - if (i !=3D 0) { - dpy_gfx_replace_surface(g->parent_obj.scanout[i].con, NULL); - } + dpy_gfx_replace_surface(g->parent_obj.scanout[i].con, NULL); dpy_gl_scanout_disable(g->parent_obj.scanout[i].con); } } diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c index 4a57350917cd..25f8920fdb67 100644 --- a/hw/display/virtio-gpu-base.c +++ b/hw/display/virtio-gpu-base.c @@ -193,9 +193,6 @@ virtio_gpu_base_device_realize(DeviceState *qdev, for (i =3D 0; i < g->conf.max_outputs; i++) { g->scanout[i].con =3D graphic_console_init(DEVICE(g), i, &virtio_gpu_ops, g); - if (i > 0) { - dpy_gfx_replace_surface(g->scanout[i].con, NULL); - } } =20 return true; diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index c1f17bec17e4..c9f5e36fd076 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -325,7 +325,6 @@ static void virtio_gpu_disable_scanout(VirtIOGPU *g, in= t scanout_id) { struct virtio_gpu_scanout *scanout =3D &g->parent_obj.scanout[scanout_= id]; struct virtio_gpu_simple_resource *res; - DisplaySurface *ds =3D NULL; =20 if (scanout->resource_id =3D=3D 0) { return; @@ -336,13 +335,7 @@ static void virtio_gpu_disable_scanout(VirtIOGPU *g, i= nt scanout_id) res->scanout_bitmask &=3D ~(1 << scanout_id); } =20 - if (scanout_id =3D=3D 0) { - /* primary head */ - ds =3D qemu_create_placeholder_surface(scanout->width ?: 640, - scanout->height ?: 480, - "Guest disabled display."); - } - dpy_gfx_replace_surface(scanout->con, ds); + dpy_gfx_replace_surface(scanout->con, NULL); scanout->resource_id =3D 0; scanout->ds =3D NULL; scanout->width =3D 0; --=20 2.29.2