From nobody Fri May 17 12:58:23 2024 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=1601373646; cv=none; d=zohomail.com; s=zohoarc; b=GS488PZInnJ78F69P+DUudf5Z1o5jHlBRCMihGQaMb3tK+ojyl6Lc8NuyEhX0jwDDtjM5aZIF7aHNYABdZA+EEljVw++Mg9SRs7lLoVB2HmvwJGsk1bXSKzUrmni45BpELuhqI+p+vqSmxynIy7yiOphfJUrk/ShREDNIOMib/g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601373646; 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=WvAPUed3fHIHmP5uhTuPb1iAW95D/gwznzwHeZF0Rrc=; b=RPP37nebIxd7uXrGM7Wt2n23GycidVeHuZCSRnOOotkO63xUbT+aFmkYZXj0M3z3R0++bJ0AXfnhR4ndz1le+hfqMObku0LZHY0ugwlEsb97L+k8brK7x5WqUAxGhmVZnbxczf+3/LTzbFm7it+syAc9ouUHzy1S5cKUVI96uJk= 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 1601373646875639.0516922487818; Tue, 29 Sep 2020 03:00:46 -0700 (PDT) Received: from localhost ([::1]:35292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNCRA-0007VK-6j for importer@patchew.org; Tue, 29 Sep 2020 06:00:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNCO4-0002gb-Iu for qemu-devel@nongnu.org; Tue, 29 Sep 2020 05:57:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:23095) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kNCO2-0000pT-FY for qemu-devel@nongnu.org; Tue, 29 Sep 2020 05:57:32 -0400 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-332-ImogKb7dOTm8BZZIVRUqHg-1; Tue, 29 Sep 2020 05:57:26 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B69021074658; Tue, 29 Sep 2020 09:57:24 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9A08C5578A; Tue, 29 Sep 2020 09:57:18 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 8963E9CBC; Tue, 29 Sep 2020 11:57:17 +0200 (CEST) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601373449; 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=WvAPUed3fHIHmP5uhTuPb1iAW95D/gwznzwHeZF0Rrc=; b=Us22+C/cO3LuRDsiH2kpgYWzeY2l4SY8xIdBzG0OU9xf9llEk/pcE+1Mg8sS2tIu3kTD6P 3m/tMEO9VOu/TIJH/Kii9wwFVjXmA/6Mp94VB6CuDTDSg5p8Y7qIh10xi95cQg1J6ROmkI uBh0lBBI+fjUS99nqE7vT4Ebr3l+NOI= X-MC-Unique: ImogKb7dOTm8BZZIVRUqHg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 1/9] virtio-gpu-3d: fix abnormal display after a warm reboot Date: Tue, 29 Sep 2020 11:57:09 +0200 Message-Id: <20200929095717.26745-2-kraxel@redhat.com> In-Reply-To: <20200929095717.26745-1-kraxel@redhat.com> References: <20200929095717.26745-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/28 22:47:55 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.687, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: Guoqing Zhang , "Michael S. Tsirkin" , qemu-ppc@nongnu.org, Gerd Hoffmann , David Gibson , Qi Liu 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: Guoqing Zhang When resetting virtio-gpu, virgl_renderer_reset() should be called to ensure that the virglrenderer status is correct. Signed-off-by: Guoqing Zhang Reviewed-by: Qi Liu Message-id: 20200918111632.37354-1-zhangguoqing.kernel@bytedance.com Signed-off-by: Gerd Hoffmann --- hw/display/virtio-gpu-3d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c index 96621576c222..1bd33d7aedc6 100644 --- a/hw/display/virtio-gpu-3d.c +++ b/hw/display/virtio-gpu-3d.c @@ -595,7 +595,7 @@ void virtio_gpu_virgl_reset(VirtIOGPU *g) { int i; =20 - /* virgl_renderer_reset() ??? */ + 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); --=20 2.27.0 From nobody Fri May 17 12:58:23 2024 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=1601373549; cv=none; d=zohomail.com; s=zohoarc; b=mytD/2IMuT0eQuADi4n4kDoM6CEfVhVtQHaQvkhGyvmMiWESgE8H+MrDj+kVmR5YxLp+cR3/CaFMLA/vrOgF3FKxyP+gbuhdn8hjJatYTdBt+h+rZvA5LjKp0d/t/OjbLa2PZvyKYQsn7gnViWZotDuexU/xr5Tf2/usfHnADdE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601373549; 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=CopJZCVqrXVcKIjOGwoQ/L0LsSkhPwwJnVznRwPdBtA=; b=UmuJplzMuoWJfv9HUKygOuLXcM6NFL95G4sEBUDanvqlHS/FA6bl6aLu0QGe4V44jv2jE1TbM/ALnFodRqgyeyRiRlwOgbFj6SD5tOYhhmw56IRBdmK4RTAfk364y1VRerM3H1MnJoBRPT4i83fFXc/9dIHofLY9JzZypyxPEPY= 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 1601373549712520.7712282818018; Tue, 29 Sep 2020 02:59:09 -0700 (PDT) Received: from localhost ([::1]:56080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNCPc-0004Oe-Gy for importer@patchew.org; Tue, 29 Sep 2020 05:59:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNCO6-0002hR-5W for qemu-devel@nongnu.org; Tue, 29 Sep 2020 05:57:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:30039) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kNCO4-0000q7-Fh for qemu-devel@nongnu.org; Tue, 29 Sep 2020 05:57:33 -0400 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-59-Q6ZJhShQPNCII2bzWPXJHQ-1; Tue, 29 Sep 2020 05:57:28 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 700BF1074651; Tue, 29 Sep 2020 09:57:27 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id CCBB110013C0; Tue, 29 Sep 2020 09:57:18 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9285C9AFB; Tue, 29 Sep 2020 11:57:17 +0200 (CEST) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601373451; 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=CopJZCVqrXVcKIjOGwoQ/L0LsSkhPwwJnVznRwPdBtA=; b=LXCJxI5xPLbdkTSokfJ8CHLw3x05OGegHKAhHpsSDAo0sGVwWLPuOt3qA1UaZVz6PzRdZM tW+BIe9nUuCs3n2kVuoKXT5YCaKKOFOCzpxc+2BuWjGCO6c+g22bPNbNYaxrqkAfcL0ZcF lWGBKE51w/MFcsC6mLSugP560aoH1Tc= X-MC-Unique: Q6ZJhShQPNCII2bzWPXJHQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 2/9] edid: fix physical display size computation Date: Tue, 29 Sep 2020 11:57:10 +0200 Message-Id: <20200929095717.26745-3-kraxel@redhat.com> In-Reply-To: <20200929095717.26745-1-kraxel@redhat.com> References: <20200929095717.26745-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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-Type: text/plain; charset="utf-8" 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-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/29 02:22:44 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.687, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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?= , David Gibson , qemu-ppc@nongnu.org, Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Marc-Andr=C3=A9 Lureau Divide the resolution by the DPI, and multiply to mm. Note the computation done for edid[21/22] is correct (in cm). Signed-off-by: Marc-Andr=C3=A9 Lureau Message-id: 20200927145751.365446-2-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- hw/display/edid-generate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/display/edid-generate.c b/hw/display/edid-generate.c index e58472fde501..618c74e1df39 100644 --- a/hw/display/edid-generate.c +++ b/hw/display/edid-generate.c @@ -208,8 +208,8 @@ static void edid_desc_timing(uint8_t *desc, uint32_t dpi) { /* physical display size */ - uint32_t xmm =3D xres * dpi / 254; - uint32_t ymm =3D yres * dpi / 254; + uint32_t xmm =3D xres * 254 / 10 / dpi; + uint32_t ymm =3D yres * 254 / 10 / dpi; =20 /* pull some realistic looking timings out of thin air */ uint32_t xfront =3D xres * 25 / 100; --=20 2.27.0 From nobody Fri May 17 12:58:23 2024 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=1601373860; cv=none; d=zohomail.com; s=zohoarc; b=BUfoeg7a2grxbmIiO2yjXBo8ERhGQX8k1pSBklgfq56sPEjZWKVqd6Tr+ldROuivJEjVd6qV8tONRot4rF8NnLGzVLKaqMe+FvlGHjTnNU2eJe7hxliHceeyC0y8z4LIef/qTeq7PP/qUBAwv1mvqRHsPLpR5/uGaCatTC2akFk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601373860; 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=T6vR7CEHZjP6tIkEY/tDApjbrcwdlrNvMHTwJet+hLw=; b=CvkK8IZKh4srKJdaUoo1882Y3nIV8XT6rvKuqzjsH+VhgCXMUZJo1UtiIxg4jMzd5XRIWIStjXwnMrfccYHpqHuFXMClFmB29A3ltG6U9A8tA9ESP8FsounaZcEDmTnMjHeF1cJ8Yo16saPlJocalYtmbyx40OYDLJEGqiYl+nY= 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 1601373860362304.853676367551; Tue, 29 Sep 2020 03:04:20 -0700 (PDT) Received: from localhost ([::1]:41442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNCUd-0001tJ-1L for importer@patchew.org; Tue, 29 Sep 2020 06:04:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNCOW-0003rX-CL for qemu-devel@nongnu.org; Tue, 29 Sep 2020 05:58:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:33150) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kNCOU-0000uX-JJ for qemu-devel@nongnu.org; Tue, 29 Sep 2020 05:58:00 -0400 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-517-Ch6DBYTkMrSAWjIFom7HIA-1; Tue, 29 Sep 2020 05:57:31 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 236E4185A0C0; Tue, 29 Sep 2020 09:57:30 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6598678829; Tue, 29 Sep 2020 09:57:21 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9EE819A83; Tue, 29 Sep 2020 11:57:17 +0200 (CEST) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601373478; 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=T6vR7CEHZjP6tIkEY/tDApjbrcwdlrNvMHTwJet+hLw=; b=bg0zKEjm34BP8woWY3TgdQUR/wUbPD+SinWO8mFc6IafGelfRHI/+/TNSJxZumooFMI/8t 2AMEGginhJseOUvM71cvaHfiO6Y6ODpXbhYS3itDr7HM9h6let8yht6oNWNFj+DMFjhjQF HBT7lZccYIfVhGz+D+xdjxyH65bbiBE= X-MC-Unique: Ch6DBYTkMrSAWjIFom7HIA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 3/9] edid: use physical dimensions if available Date: Tue, 29 Sep 2020 11:57:11 +0200 Message-Id: <20200929095717.26745-4-kraxel@redhat.com> In-Reply-To: <20200929095717.26745-1-kraxel@redhat.com> References: <20200929095717.26745-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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-Type: text/plain; charset="utf-8" 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-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/29 02:22:44 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.687, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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?= , David Gibson , qemu-ppc@nongnu.org, Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Marc-Andr=C3=A9 Lureau Replace dpi with width_mm/height_mm in qemu_edid_info. Use it when set (non-zero) to compute the DPI and generate the EDID. Signed-off-by: Marc-Andr=C3=A9 Lureau Message-id: 20200927145751.365446-3-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- include/hw/display/edid.h | 5 ++++- hw/display/edid-generate.c | 36 +++++++++++++++++++++++++----------- qemu-edid.c | 11 +++++++++-- 3 files changed, 38 insertions(+), 14 deletions(-) diff --git a/include/hw/display/edid.h b/include/hw/display/edid.h index 5b1de57f24f9..1f8fc9b37500 100644 --- a/include/hw/display/edid.h +++ b/include/hw/display/edid.h @@ -5,7 +5,8 @@ typedef struct qemu_edid_info { const char *vendor; /* http://www.uefi.org/pnp_id_list */ const char *name; const char *serial; - uint32_t dpi; + uint16_t width_mm; + uint16_t height_mm; uint32_t prefx; uint32_t prefy; uint32_t maxx; @@ -18,6 +19,8 @@ size_t qemu_edid_size(uint8_t *edid); void qemu_edid_region_io(MemoryRegion *region, Object *owner, uint8_t *edid, size_t size); =20 +uint32_t qemu_edid_dpi_to_mm(uint32_t dpi, uint32_t res); + #define DEFINE_EDID_PROPERTIES(_state, _edid_info) \ DEFINE_PROP_UINT32("xres", _state, _edid_info.prefx, 0), \ DEFINE_PROP_UINT32("yres", _state, _edid_info.prefy, 0), \ diff --git a/hw/display/edid-generate.c b/hw/display/edid-generate.c index 618c74e1df39..1665b7cbb29a 100644 --- a/hw/display/edid-generate.c +++ b/hw/display/edid-generate.c @@ -205,12 +205,8 @@ static void edid_desc_dummy(uint8_t *desc) =20 static void edid_desc_timing(uint8_t *desc, uint32_t xres, uint32_t yres, - uint32_t dpi) + uint32_t xmm, uint32_t ymm) { - /* physical display size */ - uint32_t xmm =3D xres * 254 / 10 / dpi; - uint32_t ymm =3D yres * 254 / 10 / dpi; - /* pull some realistic looking timings out of thin air */ uint32_t xfront =3D xres * 25 / 100; uint32_t xsync =3D xres * 3 / 100; @@ -290,12 +286,24 @@ static void edid_colorspace(uint8_t *edid, edid[34] =3D white_y >> 2; } =20 +static uint32_t qemu_edid_dpi_from_mm(uint32_t mm, uint32_t res) +{ + return res * 254 / 10 / mm; +} + +uint32_t qemu_edid_dpi_to_mm(uint32_t dpi, uint32_t res) +{ + return res * 254 / 10 / dpi; +} + void qemu_edid_generate(uint8_t *edid, size_t size, qemu_edid_info *info) { uint32_t desc =3D 54; uint8_t *xtra3 =3D NULL; uint8_t *dta =3D NULL; + uint32_t width_mm, height_mm; + uint32_t dpi =3D 100; /* if no width_mm/height_mm */ =20 /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D set defaults =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ =20 @@ -305,15 +313,20 @@ void qemu_edid_generate(uint8_t *edid, size_t size, if (!info->name) { info->name =3D "QEMU Monitor"; } - if (!info->dpi) { - info->dpi =3D 100; - } if (!info->prefx) { info->prefx =3D 1024; } if (!info->prefy) { info->prefy =3D 768; } + if (info->width_mm && info->height_mm) { + width_mm =3D info->width_mm; + height_mm =3D info->height_mm; + dpi =3D qemu_edid_dpi_from_mm(width_mm, info->prefx); + } else { + width_mm =3D qemu_edid_dpi_to_mm(dpi, info->prefx); + height_mm =3D qemu_edid_dpi_to_mm(dpi, info->prefy); + } =20 /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D extensions =3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ =20 @@ -360,8 +373,8 @@ void qemu_edid_generate(uint8_t *edid, size_t size, edid[20] =3D 0xa5; =20 /* screen size: undefined */ - edid[21] =3D info->prefx * 254 / 100 / info->dpi; - edid[22] =3D info->prefy * 254 / 100 / info->dpi; + edid[21] =3D width_mm / 10; + edid[22] =3D height_mm / 10; =20 /* display gamma: 2.2 */ edid[23] =3D 220 - 100; @@ -387,7 +400,8 @@ void qemu_edid_generate(uint8_t *edid, size_t size, =20 /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D descriptor blocks =3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ =20 - edid_desc_timing(edid + desc, info->prefx, info->prefy, info->dpi); + edid_desc_timing(edid + desc, info->prefx, info->prefy, + width_mm, height_mm); desc +=3D 18; =20 edid_desc_ranges(edid + desc); diff --git a/qemu-edid.c b/qemu-edid.c index 46eef7049803..1db3372b982c 100644 --- a/qemu-edid.c +++ b/qemu-edid.c @@ -9,7 +9,10 @@ #include "qemu/cutils.h" #include "hw/display/edid.h" =20 -static qemu_edid_info info; +static qemu_edid_info info =3D (qemu_edid_info) { + .prefx =3D 1024, + .prefy =3D 768, +}; =20 static void usage(FILE *out) { @@ -39,6 +42,7 @@ int main(int argc, char *argv[]) { FILE *outfile =3D NULL; uint8_t blob[256]; + uint32_t dpi =3D 100; int rc; =20 for (;;) { @@ -83,7 +87,7 @@ int main(int argc, char *argv[]) } break; case 'd': - if (qemu_strtoui(optarg, NULL, 10, &info.dpi) < 0) { + if (qemu_strtoui(optarg, NULL, 10, &dpi) < 0) { fprintf(stderr, "not a number: %s\n", optarg); exit(1); } @@ -110,6 +114,9 @@ int main(int argc, char *argv[]) outfile =3D stdout; } =20 + info.width_mm =3D qemu_edid_dpi_to_mm(dpi, info.prefx); + info.height_mm =3D qemu_edid_dpi_to_mm(dpi, info.prefy); + memset(blob, 0, sizeof(blob)); qemu_edid_generate(blob, sizeof(blob), &info); fwrite(blob, sizeof(blob), 1, outfile); --=20 2.27.0 From nobody Fri May 17 12:58:23 2024 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=1601373844; cv=none; d=zohomail.com; s=zohoarc; b=TC/uJLmxuFvv1Ao8o1/sAsSXxf8+1SO6ZJFW81ATDhwUYImbzMn2pBcB3YMxgItr6nMCHVi24NUDD63IwQ+Q2+3tSGA86HwahPM9lskw/qw6m+TnyFeqXvWcvPBS6ERbZ6e82xCUAZS5yrVWuSdvNld+L2QDmpuL1vTU/P39oCA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601373844; 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=OH6ewEZJ1aIluR+ILgQcwjBWe5LNbi8bHbFwak4gOm8=; b=VTLCBWz/oeyjOQOUVD6XU43jxIlsl4rO24LN7vyEqrFSrv1182AxQ/jplt96ckUeY5U3Pe4FKYvZmmfMi6sqYCW+e1Ua3WiaHFpzph2YKSmbkEaQogjhOlpKcae1+dCLM8v6PJ3iyyqJxkKVWYIjEGdhSzqi3v1VWP7eNNyc6Z0= 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 1601373844771110.75880593639056; Tue, 29 Sep 2020 03:04:04 -0700 (PDT) Received: from localhost ([::1]:40056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNCUN-0001HB-J2 for importer@patchew.org; Tue, 29 Sep 2020 06:04:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNCO6-0002ib-T3 for qemu-devel@nongnu.org; Tue, 29 Sep 2020 05:57:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:44716) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kNCO4-0000qH-MF for qemu-devel@nongnu.org; Tue, 29 Sep 2020 05:57:34 -0400 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-269-sjS_RbqwOIS4tyCdNhy_-A-1; Tue, 29 Sep 2020 05:57:29 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 918618030C4; Tue, 29 Sep 2020 09:57:28 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7A36E5D9CD; Tue, 29 Sep 2020 09:57:19 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id AAF7F9A8F; Tue, 29 Sep 2020 11:57:17 +0200 (CEST) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601373452; 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=OH6ewEZJ1aIluR+ILgQcwjBWe5LNbi8bHbFwak4gOm8=; b=dl/rMpbkP9dL+2GELRedoiS+CD1Dhg13qcSNhLtcP8dPg5EH6NXmIR7BuTZvs3T3xYfxMO vIXPSi5KBKCV7qZNbgUwF57TQKUNg2Zpbuw8a7Jrb5D7mjNUqhCWOWGFSNrIx2w+flVlpM p0akZUBFK4wK0qdtdIDdnQCXz25PIkk= X-MC-Unique: sjS_RbqwOIS4tyCdNhy_-A-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 4/9] ui: add getter for UIInfo Date: Tue, 29 Sep 2020 11:57:12 +0200 Message-Id: <20200929095717.26745-5-kraxel@redhat.com> In-Reply-To: <20200929095717.26745-1-kraxel@redhat.com> References: <20200929095717.26745-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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-Type: text/plain; charset="utf-8" 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-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/29 02:22:44 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.687, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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?= , David Gibson , qemu-ppc@nongnu.org, Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Marc-Andr=C3=A9 Lureau The following patch is going to introduce extra fields / details to UIInfo. Add a getter and keep the current values, instead of memset(0) Signed-off-by: Marc-Andr=C3=A9 Lureau Message-id: 20200927145751.365446-4-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 1 + ui/console.c | 7 +++++++ ui/spice-display.c | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/ui/console.h b/include/ui/console.h index 79e301f946c7..353d2e49a1b2 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -264,6 +264,7 @@ void update_displaychangelistener(DisplayChangeListener= *dcl, void unregister_displaychangelistener(DisplayChangeListener *dcl); =20 bool dpy_ui_info_supported(QemuConsole *con); +const QemuUIInfo *dpy_get_ui_info(const QemuConsole *con); int dpy_set_ui_info(QemuConsole *con, QemuUIInfo *info); =20 void dpy_gfx_update(QemuConsole *con, int x, int y, int w, int h); diff --git a/ui/console.c b/ui/console.c index 7592c3c324ff..54a74c0b16c9 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1516,6 +1516,13 @@ bool dpy_ui_info_supported(QemuConsole *con) return con->hw_ops->ui_info !=3D NULL; } =20 +const QemuUIInfo *dpy_get_ui_info(const QemuConsole *con) +{ + assert(con !=3D NULL); + + return &con->ui_info; +} + int dpy_set_ui_info(QemuConsole *con, QemuUIInfo *info) { assert(con !=3D NULL); diff --git a/ui/spice-display.c b/ui/spice-display.c index 19632fdf6c16..625d9232b95a 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -672,7 +672,7 @@ static int interface_client_monitors_config(QXLInstance= *sin, return 1; } =20 - memset(&info, 0, sizeof(info)); + info =3D *dpy_get_ui_info(ssd->dcl.con); =20 if (mc->num_of_monitors =3D=3D 1) { /* --=20 2.27.0 From nobody Fri May 17 12:58:23 2024 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=1601373561; cv=none; d=zohomail.com; s=zohoarc; b=YFlmk7qSsTeh3/QjLt/bGLpExIM0N6r/rSEr5X0xLqMb/59dMatwGwhXTMf4/6Gh2UuRUXyPddkR10WQD2SnudhG/QpSO74hr1BtWWPGP2JwiwHbRFdrHxZAxcsbnuHUK9h60rmMjT7lPAsGMgVtaxzkUFLiYAaYiro+sWFy0pw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601373561; 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=1f3YTMl5c0j0SsKEbAXMyJZG9mnpbLedmZLZMwJ2AmE=; b=AlqDvruTSD73sICANcna9K6r0FQDDGybL4A0H9FJXFA2Qyht9OZtetTiokZ7RUb+0P8SzCOey6Ydb1rcUpjaprl2T0TJjaRRAqjRUH8Q6XjXvEQPtMj6kZz57cvA50+DFwYm83rGAo0ex0U6gfiu64cfssUighEucAySQfVRgwg= 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 1601373561006208.0551285587053; Tue, 29 Sep 2020 02:59:21 -0700 (PDT) Received: from localhost ([::1]:57224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNCPn-0004ra-JB for importer@patchew.org; Tue, 29 Sep 2020 05:59:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNCO8-0002lL-8S for qemu-devel@nongnu.org; Tue, 29 Sep 2020 05:57:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:29676) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kNCO6-0000qv-H8 for qemu-devel@nongnu.org; Tue, 29 Sep 2020 05:57:35 -0400 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-359-1nBExx7NOUmseJO-T7JUmA-1; Tue, 29 Sep 2020 05:57:30 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F27231074662; Tue, 29 Sep 2020 09:57:28 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8F51C7A431; Tue, 29 Sep 2020 09:57:25 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B41449A95; Tue, 29 Sep 2020 11:57:17 +0200 (CEST) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601373453; 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=1f3YTMl5c0j0SsKEbAXMyJZG9mnpbLedmZLZMwJ2AmE=; b=ekx07a9o1y3woYgkNGOAZdNQssMUJ/J5wFwSVI68hVHa7ZljdV3FvVjViWryYPoNPGKFkn vPBjpwYsh+A+CcZN62j+ezmcG6cfuLoXO+adGgFqxErcKi6AkVqi9LiEf7YvV703MjAjno R1IWLwZEHtD1LRxwBmziJuET4dRtoAo= X-MC-Unique: 1nBExx7NOUmseJO-T7JUmA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 5/9] spice: remove the single monitor config logic Date: Tue, 29 Sep 2020 11:57:13 +0200 Message-Id: <20200929095717.26745-6-kraxel@redhat.com> In-Reply-To: <20200929095717.26745-1-kraxel@redhat.com> References: <20200929095717.26745-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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-Type: text/plain; charset="utf-8" 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-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/29 02:22:44 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.687, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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?= , David Gibson , qemu-ppc@nongnu.org, Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Marc-Andr=C3=A9 Lureau Introduced in commit 9c956e646178fee8c14ce7dfae5a9d7cb901876c ("spice: prepare for upcoming spice-server change"), the new logic never materialized in the spice server source tree. Let's remove it for now, until it actually changes in Spice. Signed-off-by: Marc-Andr=C3=A9 Lureau Message-id: 20200927145751.365446-5-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- ui/spice-display.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/ui/spice-display.c b/ui/spice-display.c index 625d9232b95a..b304c13149a8 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -674,28 +674,10 @@ static int interface_client_monitors_config(QXLInstan= ce *sin, =20 info =3D *dpy_get_ui_info(ssd->dcl.con); =20 - if (mc->num_of_monitors =3D=3D 1) { - /* - * New spice-server version which filters the list of monitors - * to only include those that belong to our display channel. - * - * single-head configuration (where filtering doesn't matter) - * takes this code path too. - */ - info.width =3D mc->monitors[0].width; - info.height =3D mc->monitors[0].height; - } else { - /* - * Old spice-server which gives us all monitors, so we have to - * figure ourself which entry we need. Array index is the - * channel_id, which is the qemu console index, see - * qemu_spice_add_display_interface(). - */ - head =3D qemu_console_get_index(ssd->dcl.con); - if (mc->num_of_monitors > head) { - info.width =3D mc->monitors[head].width; - info.height =3D mc->monitors[head].height; - } + head =3D qemu_console_get_index(ssd->dcl.con); + if (mc->num_of_monitors > head) { + info.width =3D mc->monitors[head].width; + info.height =3D mc->monitors[head].height; } =20 trace_qemu_spice_ui_info(ssd->qxl.id, info.width, info.height); --=20 2.27.0 From nobody Fri May 17 12:58:23 2024 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=1601373596; cv=none; d=zohomail.com; s=zohoarc; b=NAB5NuX8c+nNguuwl+tMjSmhm1oUgBWcwm/UzPFMd/lMitSILfj2z5pO3ry5MmhJJMbvpoiarrIqa57IcsDE7VYDqmyH6bkINC+fX4fn4BRnhmnDG2JJyD8XkGUTyxIZxXK0CWW48BlNh8sB4sSjoDmN4QjuOzSR8n6ezYvHub8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601373596; 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=+aXjCBnVRFvGVFEeIBVm8Fihs/fPIESllo8uMtJcrjo=; b=llBjWOLpwSrnzYnA5VCyuKBKr7TVdw7Hb1pEbw0zVGfW84zNv2vmXw50IJFyhmuUxeOWv1+wUTLtWhMAHIQXhp7vkAi8uo+sbss7PQtsSuMngbwo5hf8sc+E5eipTn/Iz2r9lSp0qaZfAZdHAUuhRD2RyQpRzSSNh2Ptr+9bnoM= 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 1601373596058860.1538497035145; Tue, 29 Sep 2020 02:59:56 -0700 (PDT) Received: from localhost ([::1]:59694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNCQL-0005tY-Gz for importer@patchew.org; Tue, 29 Sep 2020 05:59:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNCOC-0002xZ-ON for qemu-devel@nongnu.org; Tue, 29 Sep 2020 05:57:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:46546) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kNCOA-0000tG-Sr for qemu-devel@nongnu.org; Tue, 29 Sep 2020 05:57:40 -0400 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-587-z3Y95y0OMXa16qfV5Mnw-Q-1; Tue, 29 Sep 2020 05:57:35 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B1F911007283; Tue, 29 Sep 2020 09:57:34 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 906AE60C84; Tue, 29 Sep 2020 09:57:25 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id BEAB031E21; Tue, 29 Sep 2020 11:57:17 +0200 (CEST) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601373458; 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=+aXjCBnVRFvGVFEeIBVm8Fihs/fPIESllo8uMtJcrjo=; b=R2Q83Ys5d69HckrWnNfPiN2opd5PQEMP27hAjNa4p1ZfeUpu8Jh7GH8RFWzVoZcrlyLLok eMEmE3d2f3LDNy8rELgdhDTbaAEdZhgMTuqinKtpItPCe3wQDKNsg7hYmiD/2+LDyBTMdD kAGm7t4UmdscfkkfY0tEqI39BNUmjys= X-MC-Unique: z3Y95y0OMXa16qfV5Mnw-Q-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 6/9] spice: get monitors physical dimension Date: Tue, 29 Sep 2020 11:57:14 +0200 Message-Id: <20200929095717.26745-7-kraxel@redhat.com> In-Reply-To: <20200929095717.26745-1-kraxel@redhat.com> References: <20200929095717.26745-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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-Type: text/plain; charset="utf-8" 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-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/29 02:22:44 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.687, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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?= , David Gibson , qemu-ppc@nongnu.org, Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Marc-Andr=C3=A9 Lureau With upcoming Spice server version 0.14.4, the monitor configuration can contain additional fields for the monitor physical dimensions. Signed-off-by: Marc-Andr=C3=A9 Lureau Message-id: 20200927145751.365446-6-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 3 +++ ui/spice-display.c | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/include/ui/console.h b/include/ui/console.h index 353d2e49a1b2..e7303d8b98a8 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -119,6 +119,9 @@ typedef struct DisplaySurface { } DisplaySurface; =20 typedef struct QemuUIInfo { + /* physical dimension */ + uint16_t width_mm; + uint16_t height_mm; /* geometry */ int xoff; int yoff; diff --git a/ui/spice-display.c b/ui/spice-display.c index b304c13149a8..0178d5766d2c 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -678,6 +678,13 @@ static int interface_client_monitors_config(QXLInstanc= e *sin, if (mc->num_of_monitors > head) { info.width =3D mc->monitors[head].width; info.height =3D mc->monitors[head].height; +#if SPICE_SERVER_VERSION >=3D 0x000e04 /* release 0.14.4 */ + if (mc->flags & VD_AGENT_CONFIG_MONITORS_FLAG_PHYSICAL_SIZE) { + VDAgentMonitorMM *mm =3D (void *)&mc->monitors[mc->num_of_moni= tors]; + info.width_mm =3D mm[head].width; + info.height_mm =3D mm[head].height; + } +#endif } =20 trace_qemu_spice_ui_info(ssd->qxl.id, info.width, info.height); --=20 2.27.0 From nobody Fri May 17 12:58:23 2024 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=1601374056; cv=none; d=zohomail.com; s=zohoarc; b=MrM994S/EaRoF0qaXZ8oyn78GB9yrtKMGlZz6EVTA1TMwWCc2lJ01vuOqIGe5M2S9VwdvfW03JHnhYM7rPcNt/vDpKHrccyJF9P4dNNzAngNfxQwCMBC9eB1NVd2XzoWS0vQLe/bbW/P7h1jZXYUh4XghbNKuT0Gj/MYMNYeqXo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601374056; 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=ak0SQ/thDlDdunDhe0gDqIoOHO6Ju9dm+uxYES+slTk=; b=MEZ5mQWykpCcJYww/CKksFSXi/J7BC4rJiSXDsEFC2/fx6amNn/osULuXzLqIcXoufSZa6scg9QYLlKgyjXOZwkv8Q1POoBiXlj6Cp7CegHhAA4Wzn3vaxrdpT1zSz3irA4vD5NUs6aAPjNcH+JxUImiXLEqJZDv23IOatGkDEE= 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 1601374056888380.0699208815755; Tue, 29 Sep 2020 03:07:36 -0700 (PDT) Received: from localhost ([::1]:49150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNCXn-000578-OE for importer@patchew.org; Tue, 29 Sep 2020 06:07:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNCOA-0002rJ-Ez for qemu-devel@nongnu.org; Tue, 29 Sep 2020 05:57:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:57127) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kNCO7-0000sY-Vk for qemu-devel@nongnu.org; Tue, 29 Sep 2020 05:57:38 -0400 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-407-gKucPc5IMQyryvap22cEcw-1; Tue, 29 Sep 2020 05:57:33 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 060AD1DDF3; Tue, 29 Sep 2020 09:57:32 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id CD46255774; Tue, 29 Sep 2020 09:57:28 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id CAFE231E22; Tue, 29 Sep 2020 11:57:17 +0200 (CEST) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601373455; 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=ak0SQ/thDlDdunDhe0gDqIoOHO6Ju9dm+uxYES+slTk=; b=Urk+x0c88ZdqMewM//jHU0mkcqKr0QXf9PtSi48dHOAEBWaNb8rcAdnwhMk7rodyVbkjOh EfsuCzJWCNSOz9tGj6pW1VijonjZc8T0XEW34fCJQJ3t9f2VidwFuh9zwkFh7nY/6OG/dE tXU0Y5QTlNK9arKtN/ZgL1eCiXpBkJw= X-MC-Unique: gKucPc5IMQyryvap22cEcw-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 7/9] virtio-gpu: set physical dimensions for EDID Date: Tue, 29 Sep 2020 11:57:15 +0200 Message-Id: <20200929095717.26745-8-kraxel@redhat.com> In-Reply-To: <20200929095717.26745-1-kraxel@redhat.com> References: <20200929095717.26745-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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-Type: text/plain; charset="utf-8" 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-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/29 02:22:44 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.687, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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?= , David Gibson , qemu-ppc@nongnu.org, Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau Message-id: 20200927145751.365446-7-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- include/hw/virtio/virtio-gpu.h | 1 + hw/display/virtio-gpu-base.c | 2 ++ hw/display/virtio-gpu.c | 2 ++ 3 files changed, 5 insertions(+) diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h index 455e0a743350..1aed7275c824 100644 --- a/include/hw/virtio/virtio-gpu.h +++ b/include/hw/virtio/virtio-gpu.h @@ -62,6 +62,7 @@ struct virtio_gpu_scanout { }; =20 struct virtio_gpu_requested_state { + uint16_t width_mm, height_mm; uint32_t width, height; int x, y; }; diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c index aeb87235420a..40ccd00f9421 100644 --- a/hw/display/virtio-gpu-base.c +++ b/hw/display/virtio-gpu-base.c @@ -82,6 +82,8 @@ static int virtio_gpu_ui_info(void *opaque, uint32_t idx,= QemuUIInfo *info) g->req_state[idx].y =3D info->yoff; g->req_state[idx].width =3D info->width; g->req_state[idx].height =3D info->height; + g->req_state[idx].width_mm =3D info->width_mm; + g->req_state[idx].height_mm =3D info->height_mm; =20 if (info->width && info->height) { g->enabled_output_bitmask |=3D (1 << idx); diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 90be4e3ed719..f3b71fa9c7c3 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -212,6 +212,8 @@ virtio_gpu_generate_edid(VirtIOGPU *g, int scanout, { VirtIOGPUBase *b =3D VIRTIO_GPU_BASE(g); qemu_edid_info info =3D { + .width_mm =3D b->req_state[scanout].width_mm, + .height_mm =3D b->req_state[scanout].height_mm, .prefx =3D b->req_state[scanout].width, .prefy =3D b->req_state[scanout].height, }; --=20 2.27.0 From nobody Fri May 17 12:58:23 2024 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=1601373961; cv=none; d=zohomail.com; s=zohoarc; b=JAw8v8H+CWlEbE77851xWZ7QbEe/Lv4hWZ9jB6zGBwv6/731mArkfDgHReH0hdQm/qooGg+btzGPA2OQDoB7uWqp5Q7fzgzHIkz3ZgiuLmd2xZ8JqyMspXinLXdUFaogs816KoT1Kp4I5HJO6TetkFu0ipWz+8qr7y9g/6lVTPg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601373961; 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=cDgOTF722Tnr9qf/sX0cySEoHobwdrhfgZYLnSfUis8=; b=EDxzwJhU1qWNE1jjg1uTOl5Wz4mpidJMFYeuiSiLvC7bAPKnHAeM5My2TGm03/iS3R2yrWzfB5QOGv0bYSNQQu3UoBl4H4vCoXAFdG1ej7vGZALSsHU9FDJ723rxm0Cow7FZQ1jaoSLOycbxmbBczwFQ2+miREyP6XyVnAkv/aM= 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 1601373961669938.2661816388461; Tue, 29 Sep 2020 03:06:01 -0700 (PDT) Received: from localhost ([::1]:44932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNCWE-0003Kf-Gw for importer@patchew.org; Tue, 29 Sep 2020 06:05:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNCO9-0002ou-NQ for qemu-devel@nongnu.org; Tue, 29 Sep 2020 05:57:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:52519) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kNCO8-0000sc-2N for qemu-devel@nongnu.org; Tue, 29 Sep 2020 05:57:37 -0400 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-537-lR1Kjf4fOO6vFJCbTeWKeA-1; Tue, 29 Sep 2020 05:57:33 -0400 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 EB8531007283; Tue, 29 Sep 2020 09:57:31 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id D2A745C1BD; Tue, 29 Sep 2020 09:57:25 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D403C31E23; Tue, 29 Sep 2020 11:57:17 +0200 (CEST) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601373455; 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=cDgOTF722Tnr9qf/sX0cySEoHobwdrhfgZYLnSfUis8=; b=Af1XooOLQW4hJfLVn8f5TcWbMvEOyg44yld907yHCmvMjYAVeO0ewfc8mZwZMmSMWQJuH1 lXKlDVCSdRZ6ZzRx1EymS+EUBTNI/xIpQpI5jw0g3nKip4Ev//NwOKQeUzuTR+R26mSTmM 9g0X74jfEbRiu/lQ1eSxO9oTjlu+EZk= X-MC-Unique: lR1Kjf4fOO6vFJCbTeWKeA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 8/9] virtio-vga: implement big-endian-framebuffer property Date: Tue, 29 Sep 2020 11:57:16 +0200 Message-Id: <20200929095717.26745-9-kraxel@redhat.com> In-Reply-To: <20200929095717.26745-1-kraxel@redhat.com> References: <20200929095717.26745-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-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/29 02:22:44 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.687, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: David Gibson , qemu-ppc@nongnu.org, Gerd Hoffmann , "Michael S. Tsirkin" 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" Allows to switch the (vga mode) framebuffer into bigendian mode by setting the property, simliar to stdvga. Signed-off-by: Gerd Hoffmann Message-id: 20200928085335.21961-2-kraxel@redhat.com --- hw/display/virtio-vga.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c index f9410a0c2e61..81f776ee36e7 100644 --- a/hw/display/virtio-vga.c +++ b/hw/display/virtio-vga.c @@ -168,6 +168,20 @@ static void virtio_vga_base_reset(DeviceState *dev) vga_dirty_log_start(&vvga->vga); } =20 +static bool virtio_vga_get_big_endian_fb(Object *obj, Error **errp) +{ + VirtIOVGABase *d =3D VIRTIO_VGA_BASE(obj); + + return d->vga.big_endian_fb; +} + +static void virtio_vga_set_big_endian_fb(Object *obj, bool value, Error **= errp) +{ + VirtIOVGABase *d =3D VIRTIO_VGA_BASE(obj); + + d->vga.big_endian_fb =3D value; +} + static Property virtio_vga_base_properties[] =3D { DEFINE_VIRTIO_GPU_PCI_PROPERTIES(VirtIOPCIProxy), DEFINE_PROP_END_OF_LIST(), @@ -190,6 +204,11 @@ static void virtio_vga_base_class_init(ObjectClass *kl= ass, void *data) k->realize =3D virtio_vga_base_realize; pcidev_k->romfile =3D "vgabios-virtio.bin"; pcidev_k->class_id =3D PCI_CLASS_DISPLAY_VGA; + + /* Expose framebuffer byteorder via QOM */ + object_class_property_add_bool(klass, "big-endian-framebuffer", + virtio_vga_get_big_endian_fb, + virtio_vga_set_big_endian_fb); } =20 static TypeInfo virtio_vga_base_info =3D { --=20 2.27.0 From nobody Fri May 17 12:58:23 2024 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=1601373695; cv=none; d=zohomail.com; s=zohoarc; b=c1mM0b/CvU90CMxd8Hr+ASPHPyASxQSdZhrt0MhscfaKKWF7oOBYEHXTWr8/eX9KqR3wGpNOdtgNKdSwtKpxaKRPT6vDIW0DkNm9vu518zC77e5JElE+ZO7kneKw6+S1IsdlifhgiIBnfenBITeK+8i0jTV9Oi8PHDyMeRRrCcg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601373695; 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=INR8IeW6lroyzPbDpx6fKgZS8ntG12gXbdx7c+M4hDo=; b=Z4dsjeQto32kgrbnrvBxssVyxlH8cf6YPxec/7H0TvN+Ugs4Lvl23YkmJGKSLbC37a+iK4DHMdYID/4gBFjnm4qKupEvI8hq97Em/FJz4MmQ6JMnnqktKoT6cSqWLZjjLuUgWorpvYpWrRjIJqDYoQY/D6N9vmeQyVcH9jCiAXM= 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 1601373695378580.4898624267918; Tue, 29 Sep 2020 03:01:35 -0700 (PDT) Received: from localhost ([::1]:35976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNCRy-0007re-3v for importer@patchew.org; Tue, 29 Sep 2020 06:01:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNCO7-0002iw-70 for qemu-devel@nongnu.org; Tue, 29 Sep 2020 05:57:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:59561) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kNCO4-0000q9-Sz for qemu-devel@nongnu.org; Tue, 29 Sep 2020 05:57:34 -0400 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-114-nfwdISjPPXCCf_u3ruHiSg-1; Tue, 29 Sep 2020 05:57:29 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7B997185A0D9; Tue, 29 Sep 2020 09:57:28 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2C0477BE42; Tue, 29 Sep 2020 09:57:28 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id DCF0E31FCE; Tue, 29 Sep 2020 11:57:17 +0200 (CEST) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601373451; 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=INR8IeW6lroyzPbDpx6fKgZS8ntG12gXbdx7c+M4hDo=; b=NMzCa3hMNO1O1MocDPntMs4FfrlXbDu7pK6QUvrFBK9XVNjODLLQMS7EP91uvbWaDKwfbT 1MFFIyelXdTP298yBKIqu2EuX/eiT+6tTwPPSVoGI8IjlA1APDSY6JBRAjOIkAyOdYV5k4 4XSafGQ/mQn5drWWDRpFe0A6JXrpDT0= X-MC-Unique: nfwdISjPPXCCf_u3ruHiSg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 9/9] ppc/pseries: enable big-endian-framebuffer quirk for bochs-display and virtio-vga Date: Tue, 29 Sep 2020 11:57:17 +0200 Message-Id: <20200929095717.26745-10-kraxel@redhat.com> In-Reply-To: <20200929095717.26745-1-kraxel@redhat.com> References: <20200929095717.26745-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/28 22:47:55 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.687, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: David Gibson , qemu-ppc@nongnu.org, Gerd Hoffmann , "Michael S. Tsirkin" 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" Already done for stdvga and secondary-vga, bochs-display and virtio-vga support the big-endian-framebuffer property too. Fixes blue console background at boot (offb firmware console). Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=3D1881912 Signed-off-by: Gerd Hoffmann Message-id: 20200928085335.21961-3-kraxel@redhat.com --- hw/ppc/spapr_pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 4d97ff6c70f2..5db912b48c41 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -2464,7 +2464,9 @@ static int spapr_switch_one_vga(DeviceState *dev, voi= d *opaque) bool be =3D *(bool *)opaque; =20 if (object_dynamic_cast(OBJECT(dev), "VGA") - || object_dynamic_cast(OBJECT(dev), "secondary-vga")) { + || object_dynamic_cast(OBJECT(dev), "secondary-vga") + || object_dynamic_cast(OBJECT(dev), "bochs-display") + || object_dynamic_cast(OBJECT(dev), "virtio-vga")) { object_property_set_bool(OBJECT(dev), "big-endian-framebuffer", be, &error_abort); } --=20 2.27.0