Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp141630ybi; Tue, 2 Jul 2019 17:52:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqw0SXsEGZoT/S0gF485H/0ltL+hkozCM303drF9xzWorbII2M1FnE6l5U+anUecvM2fVOrz X-Received: by 2002:a17:90a:c481:: with SMTP id j1mr8767964pjt.96.1562115171681; Tue, 02 Jul 2019 17:52:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562115171; cv=none; d=google.com; s=arc-20160816; b=Ku8j9Yrqtock/qy/ui981nCx2BSdLt2nTKB8grlFtiUjuKdTyZBWEhDE3Qmfpf4mkg gNIMWAf/g/i8NIwAO/Lo/yK3KxuqCGighhYqx3/l8aB23dDiEOJX70rW8hQh/uhhqQDy vf4iVJNyHYWQ2bL8zbtIcx0QYCSkg1y4aYLoqFoPKdcCuKaEThIF4A3iNGu1GKioVFBk pM44Gm1rPDvQlLpg0u+m4cPSykYQsMLFp8QfCaW7tVsIg6YNh+s2bF7QMIbSPUmB7UtD ZQPInomZpDq3Fu5K3DMh7Wf0hBpYfMWWe2saQUrHuPbkjKmdDwU4TrjxVifh/VtYz9qw eakw== 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=F9/H9RAoH6E0au9JZUxTVdK2VUAjq3U7v2tg4NjLm2E=; b=yOF7Mj8AxX9Oq6G9bdwf9RvsSvMmHDjk4ufiOnNZ4UoKFyuTEJg1FLMaybFewOsgWT OwIsJur8/Lvh55bOLhPPzd7HU8jO+TXhrkO38jArigyw1fgggyXqkickDoEhZsO0vMzz p11KKe/9CtU2PbL3KC1HJwrlo1gxkpcqvmaMR44wFmpdgeOseHlm7fLGCN0m6qVEQUPT tMFnOv9nAHZjy14BgNpn3ssbVs5iiRav6PNC2MfHsnWqMTW+kP0oYMQjc75wtn8F7IHf SyBtD5FvlXwN2RAxVngHgdRvZw3QMzGXHCiq7x33qmR5clXBMhCOp0bivT9ENRVIcLoc NXAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SK3VY71b; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z5si349583pgj.213.2019.07.02.17.52.36; Tue, 02 Jul 2019 17:52:51 -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=@linaro.org header.s=google header.b=SK3VY71b; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727299AbfGCAut (ORCPT + 99 others); Tue, 2 Jul 2019 20:50:49 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:39367 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727189AbfGCAut (ORCPT ); Tue, 2 Jul 2019 20:50:49 -0400 Received: by mail-wr1-f68.google.com with SMTP id x4so697334wrt.6 for ; Tue, 02 Jul 2019 17:50:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=F9/H9RAoH6E0au9JZUxTVdK2VUAjq3U7v2tg4NjLm2E=; b=SK3VY71b9UfihRePdJGtKBSdbFrEGcoMgA1+oLMpx0UPe6Zi3uDRyGD2EMNmRcqIq+ l0yxeXPdzy0dawH3rtJ13sku4q+pHqx7YfCt0T/4f0C1De+u9h4Kz7vk989kCRBNZ824 mTFjAk2XxdC4yvnm3rbUtw188u5UCkTkf8iB9ychSLYnKHzkYHKzxWzg/0qF5Kfv/9Ig /GrTrehl6RSlBv6Ck2krL2WRej8+bAHwkMfScnrp4Eezc+lmMKJpg/mT/Sg9laJXC7bT NPJ2fF2dt1HcWXS/Ex0YgUuMz0yKlYeezBAJ9Kv3upJ4MbSyUkw1RN7KepizvqV+xWfx 5AhQ== 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=F9/H9RAoH6E0au9JZUxTVdK2VUAjq3U7v2tg4NjLm2E=; b=e+BVH2x841znx2fs2m3uDuqqEkVJS3MqyGzM2lvDjaToTM4U4aSSzOXJNBlwdkaFrd IsW+8rYPuj5RbwkrABh0PC2f9AkMVd1IuMFxeqK4sBPCj6QnEPR1fCjsO75boR12JrHA 2dvMj3Rx+ndmgGlAovwOEU2MmKO8nrle9rntals6DlO6NufIEnSFaWex0wae6T/7GD9c R/Kmaplw7WSxiVZP5DLQxGDui+pro2DySLn5YKsgwWCd3i4pH292rSc/NksuX1B1LA+u diGhaxiWFGEjRbOIOwEWYMky5DEFYHC0VAkLdX+oqYeEq6w5vL0NZ7c6Kp7poASD71tw rMag== X-Gm-Message-State: APjAAAVCODYCFLItDDcxaHC9UxT0VuEZiZCQUfMSIeelbWAm/aSv+Z6o bw8lreMUm2fi2Uq3KRVG46/pCPA64n+q0SVnVxsBEg== X-Received: by 2002:a5d:6743:: with SMTP id l3mr14273796wrw.241.1562104410996; Tue, 02 Jul 2019 14:53:30 -0700 (PDT) MIME-Version: 1.0 References: <20190630203614.5290-1-robdclark@gmail.com> <20190630203614.5290-3-robdclark@gmail.com> In-Reply-To: From: Ard Biesheuvel Date: Tue, 2 Jul 2019 23:53:16 +0200 Message-ID: Subject: Re: [PATCH 2/4] efi/libstub: detect panel-id To: Rob Clark Cc: dri-devel , linux-arm-msm , freedreno , aarch64-laptops@lists.linaro.org, Rob Clark , Ingo Molnar , Will Deacon , Leif Lindholm , 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, 2 Jul 2019 at 23:02, Rob Clark wrote: > > 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).. > True, but those don't describe the hardware. > it would be kinda nice to have an early-quirks mechanism where this > could fit, but I thought that might be equally unpopular ;-) > Very :-) > > > > > 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? > I guess some mobile SOC/snapdragon symbol would be more appropriate, but given that qcom left the server business, I guess it hardly matters, so default y if ARM64 && ARCH_QCOM is fine with me > (Just trying to minimize the things that can go wrong and the "I get a > blank screen at boot" bug reports I get ;-)) > Sure > > ... 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. > I'd argue that this does not belong in /chosen in the first place, i.e., it doesn't belong in the DT at all if the OS can access the config table (and therefore the variable) directly.