From patchwork Tue Sep 29 09:57:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 304192 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5E38C4346E for ; Tue, 29 Sep 2020 10:00:41 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 48405206A5 for ; Tue, 29 Sep 2020 10:00:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Us22+C/c" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 48405206A5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNCR6-0007VK-5d for qemu-devel@archiver.kernel.org; Tue, 29 Sep 2020 06:00:40 -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 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= 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 X-MC-Unique: ImogKb7dOTm8BZZIVRUqHg-1 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) 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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; - /* virgl_renderer_reset() ??? */ + virgl_renderer_reset(); for (i = 0; i < g->parent_obj.conf.max_outputs; i++) { if (i != 0) { dpy_gfx_replace_surface(g->parent_obj.scanout[i].con, NULL); From patchwork Tue Sep 29 09:57:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 272521 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 951AEC4727F for ; Tue, 29 Sep 2020 09:59:06 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DDABC20897 for ; Tue, 29 Sep 2020 09:59:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="LXCJxI5x" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DDABC20897 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNCPY-0004Oe-MF for qemu-devel@archiver.kernel.org; Tue, 29 Sep 2020 05:59:04 -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 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= 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 X-MC-Unique: Q6ZJhShQPNCII2bzWPXJHQ-1 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) 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 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_Lureau?= , David Gibson , qemu-ppc@nongnu.org, Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André 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é 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 = xres * dpi / 254; - uint32_t ymm = yres * dpi / 254; + uint32_t xmm = xres * 254 / 10 / dpi; + uint32_t ymm = yres * 254 / 10 / dpi; /* pull some realistic looking timings out of thin air */ uint32_t xfront = xres * 25 / 100; From patchwork Tue Sep 29 09:57:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 272518 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CB66C4346E for ; Tue, 29 Sep 2020 10:04:17 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0EF8F206B8 for ; Tue, 29 Sep 2020 10:04:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bg0zKEjm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0EF8F206B8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNCUa-0001tJ-32 for qemu-devel@archiver.kernel.org; Tue, 29 Sep 2020 06:04:16 -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 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= 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 X-MC-Unique: Ch6DBYTkMrSAWjIFom7HIA-1 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) 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 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_Lureau?= , David Gibson , qemu-ppc@nongnu.org, Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André 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é 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); +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) 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 = xres * 254 / 10 / dpi; - uint32_t ymm = yres * 254 / 10 / dpi; - /* pull some realistic looking timings out of thin air */ uint32_t xfront = xres * 25 / 100; uint32_t xsync = xres * 3 / 100; @@ -290,12 +286,24 @@ static void edid_colorspace(uint8_t *edid, edid[34] = white_y >> 2; } +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 = 54; uint8_t *xtra3 = NULL; uint8_t *dta = NULL; + uint32_t width_mm, height_mm; + uint32_t dpi = 100; /* if no width_mm/height_mm */ /* =============== set defaults =============== */ @@ -305,15 +313,20 @@ void qemu_edid_generate(uint8_t *edid, size_t size, if (!info->name) { info->name = "QEMU Monitor"; } - if (!info->dpi) { - info->dpi = 100; - } if (!info->prefx) { info->prefx = 1024; } if (!info->prefy) { info->prefy = 768; } + if (info->width_mm && info->height_mm) { + width_mm = info->width_mm; + height_mm = info->height_mm; + dpi = qemu_edid_dpi_from_mm(width_mm, info->prefx); + } else { + width_mm = qemu_edid_dpi_to_mm(dpi, info->prefx); + height_mm = qemu_edid_dpi_to_mm(dpi, info->prefy); + } /* =============== extensions =============== */ @@ -360,8 +373,8 @@ void qemu_edid_generate(uint8_t *edid, size_t size, edid[20] = 0xa5; /* screen size: undefined */ - edid[21] = info->prefx * 254 / 100 / info->dpi; - edid[22] = info->prefy * 254 / 100 / info->dpi; + edid[21] = width_mm / 10; + edid[22] = height_mm / 10; /* display gamma: 2.2 */ edid[23] = 220 - 100; @@ -387,7 +400,8 @@ void qemu_edid_generate(uint8_t *edid, size_t size, /* =============== descriptor blocks =============== */ - 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 += 18; 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" -static qemu_edid_info info; +static qemu_edid_info info = (qemu_edid_info) { + .prefx = 1024, + .prefy = 768, +}; static void usage(FILE *out) { @@ -39,6 +42,7 @@ int main(int argc, char *argv[]) { FILE *outfile = NULL; uint8_t blob[256]; + uint32_t dpi = 100; int rc; 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 = stdout; } + info.width_mm = qemu_edid_dpi_to_mm(dpi, info.prefx); + info.height_mm = 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); From patchwork Tue Sep 29 09:57:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 304191 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32B6AC4346E for ; Tue, 29 Sep 2020 10:04:01 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A27C8208B8 for ; Tue, 29 Sep 2020 10:04:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dl/rMpbk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A27C8208B8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:40056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNCUJ-0001HB-MO for qemu-devel@archiver.kernel.org; Tue, 29 Sep 2020 06:03:59 -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 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= 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 X-MC-Unique: sjS_RbqwOIS4tyCdNhy_-A-1 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) 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 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_Lureau?= , David Gibson , qemu-ppc@nongnu.org, Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André 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é 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); 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); 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 != NULL; } +const QemuUIInfo *dpy_get_ui_info(const QemuConsole *con) +{ + assert(con != NULL); + + return &con->ui_info; +} + int dpy_set_ui_info(QemuConsole *con, QemuUIInfo *info) { assert(con != 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; } - memset(&info, 0, sizeof(info)); + info = *dpy_get_ui_info(ssd->dcl.con); if (mc->num_of_monitors == 1) { /* From patchwork Tue Sep 29 09:57:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 304193 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9651C4346E for ; Tue, 29 Sep 2020 09:59:17 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5586F20897 for ; Tue, 29 Sep 2020 09:59:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ekx07a9o" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5586F20897 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNCPk-0004ra-9x for qemu-devel@archiver.kernel.org; Tue, 29 Sep 2020 05:59:16 -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 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= 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 X-MC-Unique: 1nBExx7NOUmseJO-T7JUmA-1 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) 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 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_Lureau?= , David Gibson , qemu-ppc@nongnu.org, Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André 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é 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(QXLInstance *sin, info = *dpy_get_ui_info(ssd->dcl.con); - if (mc->num_of_monitors == 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 = mc->monitors[0].width; - info.height = 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 = qemu_console_get_index(ssd->dcl.con); - if (mc->num_of_monitors > head) { - info.width = mc->monitors[head].width; - info.height = mc->monitors[head].height; - } + head = qemu_console_get_index(ssd->dcl.con); + if (mc->num_of_monitors > head) { + info.width = mc->monitors[head].width; + info.height = mc->monitors[head].height; } trace_qemu_spice_ui_info(ssd->qxl.id, info.width, info.height); From patchwork Tue Sep 29 09:57:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 272520 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C22A0C4346E for ; Tue, 29 Sep 2020 09:59:51 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 33F7820897 for ; Tue, 29 Sep 2020 09:59:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="R2Q83Ys5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 33F7820897 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNCQH-0005tY-W7 for qemu-devel@archiver.kernel.org; Tue, 29 Sep 2020 05:59:50 -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 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= 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 X-MC-Unique: z3Y95y0OMXa16qfV5Mnw-Q-1 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) 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 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_Lureau?= , David Gibson , qemu-ppc@nongnu.org, Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André 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é 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; 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(QXLInstance *sin, if (mc->num_of_monitors > head) { info.width = mc->monitors[head].width; info.height = mc->monitors[head].height; +#if SPICE_SERVER_VERSION >= 0x000e04 /* release 0.14.4 */ + if (mc->flags & VD_AGENT_CONFIG_MONITORS_FLAG_PHYSICAL_SIZE) { + VDAgentMonitorMM *mm = (void *)&mc->monitors[mc->num_of_monitors]; + info.width_mm = mm[head].width; + info.height_mm = mm[head].height; + } +#endif } trace_qemu_spice_ui_info(ssd->qxl.id, info.width, info.height); From patchwork Tue Sep 29 09:57:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 304189 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49164C4346E for ; Tue, 29 Sep 2020 10:07:34 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A8840208FE for ; Tue, 29 Sep 2020 10:07:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Urk+x0c8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A8840208FE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNCXk-000578-QJ for qemu-devel@archiver.kernel.org; Tue, 29 Sep 2020 06:07:32 -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 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= 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 X-MC-Unique: gKucPc5IMQyryvap22cEcw-1 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) 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 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_Lureau?= , David Gibson , qemu-ppc@nongnu.org, Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André 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 { }; 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 = info->yoff; g->req_state[idx].width = info->width; g->req_state[idx].height = info->height; + g->req_state[idx].width_mm = info->width_mm; + g->req_state[idx].height_mm = info->height_mm; if (info->width && info->height) { g->enabled_output_bitmask |= (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 = VIRTIO_GPU_BASE(g); qemu_edid_info info = { + .width_mm = b->req_state[scanout].width_mm, + .height_mm = b->req_state[scanout].height_mm, .prefx = b->req_state[scanout].width, .prefy = b->req_state[scanout].height, }; From patchwork Tue Sep 29 09:57:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 304190 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8EA0C4346E for ; Tue, 29 Sep 2020 10:05:50 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 38C54208FE for ; Tue, 29 Sep 2020 10:05:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Af1XooOL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38C54208FE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNCW5-0003Kf-7k for qemu-devel@archiver.kernel.org; Tue, 29 Sep 2020 06:05:49 -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 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= 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 X-MC-Unique: lR1Kjf4fOO6vFJCbTeWKeA-1 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) 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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); } +static bool virtio_vga_get_big_endian_fb(Object *obj, Error **errp) +{ + VirtIOVGABase *d = 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 = VIRTIO_VGA_BASE(obj); + + d->vga.big_endian_fb = value; +} + static Property virtio_vga_base_properties[] = { DEFINE_VIRTIO_GPU_PCI_PROPERTIES(VirtIOPCIProxy), DEFINE_PROP_END_OF_LIST(), @@ -190,6 +204,11 @@ static void virtio_vga_base_class_init(ObjectClass *klass, void *data) k->realize = virtio_vga_base_realize; pcidev_k->romfile = "vgabios-virtio.bin"; pcidev_k->class_id = 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); } static TypeInfo virtio_vga_base_info = { From patchwork Tue Sep 29 09:57:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 272519 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56000C4346E for ; Tue, 29 Sep 2020 10:01:12 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A594E208B8 for ; Tue, 29 Sep 2020 10:01:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NMzCa3hM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A594E208B8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNCRa-0007re-Fn for qemu-devel@archiver.kernel.org; Tue, 29 Sep 2020 06:01:10 -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 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= 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 X-MC-Unique: nfwdISjPPXCCf_u3ruHiSg-1 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) 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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=1881912 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, void *opaque) bool be = *(bool *)opaque; 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); }