From patchwork Mon Jun 13 11:36:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 12879383 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 98F72CCA47F for ; Mon, 13 Jun 2022 11:37:37 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.347980.574365 (Exim 4.92) (envelope-from ) id 1o0iNh-0005rh-I0; Mon, 13 Jun 2022 11:37:17 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 347980.574365; Mon, 13 Jun 2022 11:37:17 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o0iNg-0005mi-P8; Mon, 13 Jun 2022 11:37:16 +0000 Received: by outflank-mailman (input) for mailman id 347980; Mon, 13 Jun 2022 11:37:14 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o0iNd-0003eX-T4 for xen-devel@lists.xenproject.org; Mon, 13 Jun 2022 11:37:14 +0000 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 2a94b216-eb0d-11ec-8901-93a377f238d6; Mon, 13 Jun 2022 13:37:13 +0200 (CEST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-546-czJqyPJ_Ov-1NAke0vpC9w-1; Mon, 13 Jun 2022 07:37:11 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4C54C833975; Mon, 13 Jun 2022 11:37:10 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 190C740C1247; Mon, 13 Jun 2022 11:37:10 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C60EF1800999; Mon, 13 Jun 2022 13:36:56 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 2a94b216-eb0d-11ec-8901-93a377f238d6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655120232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fjkT/ghvgIP+ASWCtRqN8cFZ3mDw+gAHZxFgoi4zHGM=; b=Ww6QgDXtpfiElI2nnlXuCkIzBD8thxW+HH/0px5Ug+/ps4Fx4sPn78QMlXWH5DxlihiojO aA5/1SAwE5beBZYRINs6KlyrnSBxXzjOfRwiY9hvYfBAbZDQLM+OoUWzzNQoA/WTEFiZ41 3oIvmRMBf+9zXkFKVU1oFXxI9OLxPJM= X-MC-Unique: czJqyPJ_Ov-1NAke0vpC9w-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , xen-devel@lists.xenproject.org, Akihiko Odaki , "Hongren (Zenithal) Zheng" , Peter Maydell , Alex Williamson , Stefano Stabellini , "Canokeys.org" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Paul Durrant , Anthony Perard , Gerd Hoffmann Subject: [PULL 15/16] virtio-gpu: Respect UI refresh rate for EDID Date: Mon, 13 Jun 2022 13:36:54 +0200 Message-Id: <20220613113655.3693872-16-kraxel@redhat.com> In-Reply-To: <20220613113655.3693872-1-kraxel@redhat.com> References: <20220613113655.3693872-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 From: Akihiko Odaki Signed-off-by: Akihiko Odaki Message-Id: <20220226115516.59830-4-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann --- include/hw/virtio/virtio-gpu.h | 1 + hw/display/virtio-gpu-base.c | 1 + hw/display/virtio-gpu.c | 1 + 3 files changed, 3 insertions(+) diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h index afff9e158e31..2e28507efe21 100644 --- a/include/hw/virtio/virtio-gpu.h +++ b/include/hw/virtio/virtio-gpu.h @@ -80,6 +80,7 @@ struct virtio_gpu_scanout { struct virtio_gpu_requested_state { uint16_t width_mm, height_mm; uint32_t width, height; + uint32_t refresh_rate; int x, y; }; diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c index b21d6e5b0be8..a29f191aa82e 100644 --- a/hw/display/virtio-gpu-base.c +++ b/hw/display/virtio-gpu-base.c @@ -79,6 +79,7 @@ static void virtio_gpu_ui_info(void *opaque, uint32_t idx, QemuUIInfo *info) g->req_state[idx].x = info->xoff; g->req_state[idx].y = info->yoff; + g->req_state[idx].refresh_rate = info->refresh_rate; g->req_state[idx].width = info->width; g->req_state[idx].height = info->height; g->req_state[idx].width_mm = info->width_mm; diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 55c6dd576318..20cc703dcc6e 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -217,6 +217,7 @@ virtio_gpu_generate_edid(VirtIOGPU *g, int scanout, .height_mm = b->req_state[scanout].height_mm, .prefx = b->req_state[scanout].width, .prefy = b->req_state[scanout].height, + .refresh_rate = b->req_state[scanout].refresh_rate, }; edid->size = cpu_to_le32(sizeof(edid->edid));