From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web12.3313.1639722547745274295 for ; Thu, 16 Dec 2021 22:29:08 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=danET95J; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639722546; 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: in-reply-to:in-reply-to:references:references; bh=6gFXqV5YtON1uYIiTMHtPsSc8n2iqKmCdw9Vw3TvwVE=; b=danET95Jz4ZKsaX41rtAfUMCcW247ZvZ1JFIp1FJqQ9arQThWK0uJVMp/ThVUMa1f26zDF z0NdodEyc/UK9TGxdtKFe+9MJ3st+GLfHpbV0jwH9af96XACscQluVa2d8om6f5FkIyzze mHrVYb9qpFP9wjzRuRb9q1xblFcmMT4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-663-LQbeztMTMd2AGSu5sQy3DQ-1; Fri, 17 Dec 2021 01:29:03 -0500 X-MC-Unique: LQbeztMTMd2AGSu5sQy3DQ-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 CA14D593D0; Fri, 17 Dec 2021 06:29:01 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.14]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4773C77E99; Fri, 17 Dec 2021 06:29:01 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 938841800097; Fri, 17 Dec 2021 07:28:59 +0100 (CET) Date: Fri, 17 Dec 2021 07:28:59 +0100 From: "Gerd Hoffmann" To: Ard Biesheuvel Cc: edk2-devel-groups-io , Erdem Aktas , Julien Grall , Brijesh Singh , Pawel Polawski , Min Xu , Jiewen Yao , Tom Lendacky , Ard Biesheuvel , Jordan Justen , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , James Bottomley , Anthony Perard Subject: Re: [edk2-devel] [PATCH 0/5] OvmfPkg/QemuVideoDxe: pick up display resolution settings from the host Message-ID: <20211217062859.qaihpvf7lq3435jp@sirius.home.kraxel.org> References: <20211216142959.1998191-1-kraxel@redhat.com> MIME-Version: 1.0 In-Reply-To: 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=us-ascii Content-Disposition: inline Hi, > I don't think this is very idiomatic for EDK2, and I wonder if it > would be better to use [fixed] PCDs for build time configuration, and > perhaps expose the other width/height data (and the associated policy > of what takes precedence over what) via a protocol instead. Well, yes. Ideally we would just tag the resolution in the GOP protocol mode list, simliar to the linux kernel which has a DRM_MODE_TYPE_PREFERRED flag for that purpose. Problem is the GOP protocol doesn't support that ... It's also kind-of specific to virtual machines. On physical hardware just using the highest resolution available works just fine as that is typically the native display resolution. In a virtual machine you don't want come up with a huge 4k window by default just because the virtual vga is able to handle that. Cutting down the video mode list isn't a great solution either as that would also remove the modes from the platform configuration so the user wouldn't be able to pick a resolution higher than the default any more. > In general, I am not too keen on overusing PCDs for any of this, as it > does not have the implied dependency ordering that PPIs or protocols > have. Laszlo mentioned OvmfPkg has a less strict policy than the rest of edk2 for this kind of pcd usage. take care, Gerd