Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp139229ybi; Tue, 2 Jul 2019 17:49:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqztt0UXrPANp3dmasxwormlvSCKqyPJWOEJAio3iJAgNgyq+tagWKRUGps3hp0lV9zQZAtL X-Received: by 2002:a17:902:2bc5:: with SMTP id l63mr39735194plb.30.1562114973996; Tue, 02 Jul 2019 17:49:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562114973; cv=none; d=google.com; s=arc-20160816; b=TAeRUfCPCIkp7DSdB3ItRXkgVWdnFnim7GnFIOEqHCPWgpqMTyFHMhMY67xU7/VEK4 I0ONO0i/5UUzPcfI5uaKKvZaUbYOfzSEYsly5Md7sVuSMDrtodKVq5rCpP/47M0s4t4J iKlPJjcMT3Rlg/bx5ls51Iglq8HD+qaUuWOkQ/fJiCEvCq4omgkXxAWWQkpI0m4fmveQ TWImcmCYtJ5+4fYKEyPC043seFhwFpVmTwBuLRa7JzK9ewkPZTzE8jn/ASTTEYlQyChB H3MPKoYQGMVQftZ6me/er3fFFFIboc/E+7W3GA9cD2xn+iPZhJSsk0A1KYNQfWRdTYmw BgPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=HvMK1U3mSSIhGP7RCajA7JG3xXgs2w4egMaNm/sjjUA=; b=JhnS3381uyamR2l19SAR/T5VFE69VRfFkco1p9iyx91ElT9AxjbxczIWEZmfcYDK4z 22S18N6VEGg0GAYzcdOMc3bdos/zQeqtxwkYgpeX+m6ZxDcDN3PwFx7YVcMik5i53mTY jJ/Z9n7wTHZ86/X8/KQ6srzJxbjlUhjFhz40qmRrFHintKHFZaz4//7DvjFkOZ7nDwr5 +xoP8/piI2hYivKy2CuWIqpedL2bVnkC+ZSqVUIny60Gj4U9r1I+v78rhLCewHjgmr9H gB5pvI9IizCVePqKuAQhaJx5wKSzCPBuMKqndcce1XFyARt5CWoWTsR9245jtuOn9dev Jsbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MW9ZpERJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v13si381936pgs.358.2019.07.02.17.49.18; Tue, 02 Jul 2019 17:49:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MW9ZpERJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727171AbfGCAsm (ORCPT + 99 others); Tue, 2 Jul 2019 20:48:42 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:44313 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726963AbfGCAsm (ORCPT ); Tue, 2 Jul 2019 20:48:42 -0400 Received: by mail-ed1-f66.google.com with SMTP id k8so309249edr.11; Tue, 02 Jul 2019 17:48:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HvMK1U3mSSIhGP7RCajA7JG3xXgs2w4egMaNm/sjjUA=; b=MW9ZpERJUQAII+y5hHpAXfKIB35FrQAFXdgIxpVSE/K3dtOZ8jbYpV1hW8xe8FJz+K 0ClnaWJEzQWyez0nkZgKubQEdncxmmkvd1669rbTlj4+KDro37xffkFpMQXDtHEIP+24 r1uc0v219ClLkICFhc894IOs6ubynozVJb6CSJ4oDFDRC9UpNgxOK+XECgubHiq0YIhB mqqT0cpFlxHgIwN48d/VhgHnBZ3n5bc0Wrw5Dv8PDmdGmtIyfB26KN/RYZqONoFXgl1q BSnW6MiWfFcbGg+YtjIVlwwFaW1zO5MIjD0vaXqVIdv1aIED6+KqqZhe5S/cGilU/WLV z8Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HvMK1U3mSSIhGP7RCajA7JG3xXgs2w4egMaNm/sjjUA=; b=DIusMBw91GJIARtzGU708+dTRWlv3O2CyDX5u7IssiR8DP20+C+tUK2PzpA6fQLKI1 i7vhotdF62c1fJ1rKrPONR3ll/i1N2YkkbKjLjcOS8JQIlI+YlOdOgBpNaQAYGgqgkdg LEKiyAgY3BkejAU18COrQKPDatL93vT1B4AS7FPMlJ2Ol7jfce2/cxsyA8e2AVJ3conY CiqBSnuTB4JeT5REBMBYr1gL+qBFLh/lP+H8uV07X1zuMjX5OiVyN9YSkGsWWpug3P6q kPuoZMxzN1sqxS0ifQhRgVKA7rmaIBBm8q124nsrDasrWiizxiVGr2dABmaZcVqRJS+t W6UQ== X-Gm-Message-State: APjAAAWhJqc9Sc5EacTrsC4ZrluwdIoD7rBsVwubRKXZLuZCoriYosiJ ni+q5gA66anRhsuKlKJiJyHwQ6D3au+Bb0bEC/N3FS8esZf+IA== X-Received: by 2002:a50:9203:: with SMTP id i3mr38838506eda.302.1562101325167; Tue, 02 Jul 2019 14:02:05 -0700 (PDT) MIME-Version: 1.0 References: <20190630203614.5290-1-robdclark@gmail.com> <20190630203614.5290-3-robdclark@gmail.com> In-Reply-To: From: Rob Clark Date: Tue, 2 Jul 2019 14:01:49 -0700 Message-ID: Subject: Re: [PATCH 2/4] efi/libstub: detect panel-id To: Ard Biesheuvel Cc: dri-devel , linux-arm-msm , freedreno , aarch64-laptops@lists.linaro.org, Rob Clark , Ingo Molnar , Will Deacon , Leif Lindholm , Alexander Graf , Steve Capper , Lukas Wunner , Julien Thierry , linux-efi , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 2, 2019 at 1:35 PM Ard Biesheuvel wrote: > > On Tue, 2 Jul 2019 at 22:26, Ard Biesheuvel wrote: > > > > On Sun, 30 Jun 2019 at 22:36, Rob Clark wrote: > > > > > > From: Rob Clark > > > > > > On snapdragon aarch64 laptops, a 'UEFIDisplayInfo' variable is provided > > > to communicate some information about the display. Crutially it has the > > > panel-id, so the appropriate panel driver can be selected. Read this > > > out and stash in /chosen/panel-id so that display driver can use it to > > > pick the appropriate panel. > > > > > > Signed-off-by: Rob Clark > > > > Hi Rob, > > > > I understand why you are doing this, but this *really* belongs elsewhere. > > > > So we are dealing with a platform that violates the UEFI spec, since > > it does not bother to implement variable services at runtime (because > > MS let the vendor get away with this). > > > > To clarify, the above remark applies to populating the DT from the OS > rather than from the firmware. yeah, it isn't pretty, but there *are* some other similar cases where efi-stub is populating DT.. (like update_fdt_memmap() and kaslr-seed).. it would be kinda nice to have an early-quirks mechanism where this could fit, but I thought that might be equally unpopular ;-) > > > First of all, to pass data between the EFI stub and the OS proper, we > > should use a configuration table rather than a DT property, since the > > former is ACPI/DT agnostic. Also, I'd like the consumer of the data to > > actually interpret it, i.e., just dump the whole opaque thing into a > > config table in the stub, and do the parsing in the OS proper. > > > > However, I am not thrilled at adding code to the stub that > > unconditionally looks for some variable with some magic name on all > > ARM/arm64 EFI systems, so this will need to live under a Kconfig > > option that depends on ARM64 (and does not default to y) I defn can add this under kconfig.. is it ok if that option is select'd by ARCH_QCOM? (Just trying to minimize the things that can go wrong and the "I get a blank screen at boot" bug reports I get ;-)) > ... but saving variables at boot time for consumption at runtime is > something that we will likely see more of in the future. I think this will be nice, but it also doesn't address the need for a quirk to get this into /chosen.. I guess we *could* use a shim or something that runs before the kernel to do this. But that just seems like a logistical/support nightmare. There is one kernel, and there are N distro's, so debugging a users "I don't get a screen at boot" problem because their distro missed some shim patch really just doesn't seem like a headache I want to have. BR, -R