Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2423813ybk; Sun, 17 May 2020 21:27:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwY/Jr6aRnYEoKPQr8OBmbZDf9NpJJcuZbAgDeiqzVqKmNj5LQ3yq6jkiMqCSF9dfG7//1n X-Received: by 2002:a17:906:7083:: with SMTP id b3mr13244964ejk.57.1589776047307; Sun, 17 May 2020 21:27:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589776047; cv=none; d=google.com; s=arc-20160816; b=b6I3qHKcRt66vcyPE8/WrKnU+ciPenPAqLK2BXkAI/t2VwA9Im0lg7YbBqqqUvmhTh 8N7mb6UcrQbT7Czu73Tl/UBgEGBnjbEUoyZ/pJG+1uKfBJOXiu1TC0TO3bIYc/yYVGX/ my4CbamsglAWAx2QomfI4vptjo7TFX40210nRT+cJ2CIE9R5tC5iO7z3g1FcpFCq8wQY GYueCd7mPQRc4VNtQ11G7QGYduRC6ft0E2FRviBLGQ24I8dr19YODkjJ7eAeSmwPA4Sx vVCSIfBhnLxe4OkVU0Zorlfwzxbepqa8zinbkdzyODTXQK1huEU7SZ+Y4yIKjq9MaXLf /eJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject; bh=ekIXZzrCnsEE0UL348V3okhZK7T2Db9hjgnyPCpZFQo=; b=HpX6QBOlZbBKCCT2Syro+Bir6ZpM6kS8ohSP5FuEJQN6nDHJ9hdy/DCQwp55sjnJ4e k/iOo5j4g1g1sJ3UhPWEJn+SgxvSUButV8HuZIIraqw2ynh0Osu8Xy9JYv16dvEq8sVJ xpCCLneYpVbjnGU9CtI3A59BnIQs/K/QJSdVoMgAPTF0WefbMTj+Q73VAmw3YBhnIXIw TlsXmi6525StOOREvAgoHN4/wS6vrnL5iowbqbsQIgqgHNnwjUAKccMzROnVFrcpQPjb GqXkW4IuWP7BXRHY+GESdJQdNONw0rXmmGmSZd1g+qecraPWswRHFC5GMU3cq8KQYwTn /bcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=hnm9iVrq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p92si5706793edd.321.2020.05.17.21.27.03; Sun, 17 May 2020 21:27:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=hnm9iVrq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726412AbgEREZf (ORCPT + 99 others); Mon, 18 May 2020 00:25:35 -0400 Received: from hqnvemgate24.nvidia.com ([216.228.121.143]:10274 "EHLO hqnvemgate24.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725280AbgEREZe (ORCPT ); Mon, 18 May 2020 00:25:34 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Sun, 17 May 2020 21:23:12 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Sun, 17 May 2020 21:25:33 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Sun, 17 May 2020 21:25:33 -0700 Received: from [10.40.100.11] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 18 May 2020 04:25:25 +0000 Subject: Re: [PATCH v6 09/10] arm64: efi: Export screen_info From: Nikhil Mahale To: Michael Kelley , Arnd Bergmann CC: Will Deacon , Ard Biesheuvel , Catalin Marinas , Mark Rutland , Marc Zyngier , Linux ARM , gregkh , "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , linux-efi , linux-arch , "olaf@aepfle.de" , Andy Whitcroft , vkuznets , Jason Wang , "marcelo.cerri@canonical.com" , KY Srinivasan , Sunil Muthuswamy , Boqun Feng References: <1584200119-18594-1-git-send-email-mikelley@microsoft.com> <1584200119-18594-10-git-send-email-mikelley@microsoft.com> X-Nvconfidentiality: Public Message-ID: <4202ea20-6e51-31d3-44b1-3861798a8158@nvidia.com> Date: Mon, 18 May 2020 09:55:21 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1589775792; bh=ekIXZzrCnsEE0UL348V3okhZK7T2Db9hjgnyPCpZFQo=; h=X-PGP-Universal:Subject:From:To:CC:References:X-Nvconfidentiality: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=hnm9iVrq0+hxj9S+6CP6ONZHVycQsEsKBoV846kHFRHb/EfZmjjw1YnuEJO3PMK31 7Tp+RQs87fW+2hXs5HIPHryeAvOYSGRc9+UHWUBLrpullIG/JR1+KreOTaDSXJ19WR JeLOJXR3gWEmPz+++aLpibN4o5szDoMAzbSEfOaRDFTz/O5xkQ0PeyApkA3P9AbQ2q Ah8PsuSWn+XGG0FGIsl22iBXaOszg2/WJyQXMg2Twzrzi73HEYxTmN1cVqgTikkOak J3K/0UDgQIKk+PmsmQNzZ/lXwCqBwcbsDtRdcFPBs45EevrTD027c1ngLGKycG8D4V GD3lUMo+rBrHA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/13/20 7:56 PM, Nikhil Mahale wrote: > On 3/20/20 3:16 AM, Michael Kelley wrote: >> From: Arnd Bergmann Sent: Wednesday, March 18, 2020 2:27 AM >>> >>> On Wed, Mar 18, 2020 at 1:18 AM Michael Kelley wrote: >>>> From: Arnd Bergmann >>>>> On Sat, Mar 14, 2020 at 4:36 PM Michael Kelley wrote: >>>>>> >>>>>> The Hyper-V frame buffer driver may be built as a module, and >>>>>> it needs access to screen_info. So export screen_info. >>>>>> >>>>>> Signed-off-by: Michael Kelley >>>>> >>>>> Is there any chance of using a more modern KMS based driver for the screen >>>>> than the old fbdev subsystem? I had hoped to one day completely remove >>>>> support for the old CONFIG_VIDEO_FBDEV and screen_info from modern >>>>> architectures. >>>>> >>>> >>>> The current hyperv_fb.c driver is all we have today for the synthetic Hyper-V >>>> frame buffer device. That driver builds and runs on both ARM64 and x86. >>>> >>>> I'm not knowledgeable about video/graphics drivers, but when you >>>> say "a more modern KMS based driver", are you meaning one based on >>>> DRM & KMS? Does DRM make sense for a "dumb" frame buffer device? >>>> Are there any drivers that would be a good pattern to look at? >>> >>> It used to be a lot harder to write a DRM driver compared to an fbdev >>> driver, but this has changed to the opposite over the years. >>> >>> A fairly minimal example would be drivers/gpu/drm/pl111/pl111_drv.c >>> or anything in drivers/gpu/drm/tiny/, but you may want to look at the >>> other hypervisor platforms first, i.e drivers/gpu/drm/virtio/virtgpu_drv.c, >>> drivers/gpu/drm/vmwgfx/vmwgfx_drv.c, drivers/gpu/drm/xen/xen_drm_front.c, >>> drivers/gpu/drm/qxl/qxl_drv.c, and drivers/gpu/drm/bochs/bochs_drv.c. >>> >> >> Thanks for the pointers, especially for the other hypervisors. >> > Sorry if anybody in 'to' or 'cc' is receiving this reply multiple times. > I had configured by email client incorrectly to reply. > > screen_info is still useful with a modern KMS-based driver. It exposes > the mode parameters that the GOP driver chose. This information is > needed to implement seamless or glitchless boot, by both ensuring that > the scanout parameters don't change and being able to read back the > scanout image to populate the initial contents of the new surface. > > This works today on arches which implement (U)EFI and export > screen_info, including x86 and powerpc, but doesn't work on arm or > arm64. As arm64 systems that implement UEFI with real GOP drivers > become more prevalent, it would be nice to be have these features there > as well. In addition to this, even if a driver doesn't implement a framebuffer console, or if it does but has an option to disable it, the driver still needs to know whether the EFI console is using resources on the GPU so it can avoid clobbering them. For example screen_info provides information like offset and size of EFI console, using this information driver can reserve memory used by console and prevent corruption on it. I think arm64 should export screen_info. > Thanks, > Nikhil Mahale > >> Michael >>