From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr2-f34.google.com (mail-wr2-f34.google.com [74.125.225.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C4944E4C3A for ; Wed, 30 Sep 2026 13:46:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.98 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790775986; cv=none; b=HXhGkgOdfjV7vfILDxan5IlAbkO6KboNTy05gRD40tvJdzF6xxdeADlQdQzCV58BqMoPzYtXqlGjBVHjXRGW0kvTNGyIP5gxKE+v1t3cng9CGeAel2LimK7a591d1HtAj1tfOHrq0JaloCO1tKkR8vyVLCOtR64zm9VpdhoTnyo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790775986; c=relaxed/simple; bh=7Nh6EI3LZQzPWseqkE8KELp9TSy2sy0wDOC/Rv8pmcU=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=KHkSYm8bcdbAA3CBYDUM/OtfqGJJPUooX41DFH9BiCMOwac9WaCLO4pbcdlaCdMZVzSRd5AJe1muiMHZB/55zB+zECXGxAfg6/fpb+rnc3ZbM0rijCBM1YHUZQQxGN+TUuY0+MQ/1Kvk0FnMHKZt0cMoW0kY3FQVkedqYfY88Xs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Xcxcl+U5; arc=none smtp.client-ip=74.125.225.98 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Xcxcl+U5" Received: by mail-wr2-f34.google.com with SMTP id ffacd0b85a97d-48aff58e6abso513411f8f.3 for ; Wed, 30 Sep 2026 06:46:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1790775972; x=1791380772; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:organization :autocrypt:content-language:references:cc:to:subject:reply-to:from :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to:content-type; bh=CHcqKszk+BLOaoNOEO2+3FAWySZdw8cPx3mMZwkgNqk=; b=Xcxcl+U5qcQRd2VbgTjtIVucE+ieNBGFJZ9WdLE9FW7ei8D0EbEtjYvw84vATDRq9f 97luY2pQNaAAWWtrpNAAPXOWwbMszSpp1qjjd/dux8YnBEVDzjzQY7KOy/HyVfuVdIdx qUgb1+ARuM0k2IvbTKc79HYY1v2OedsYiOxqxEPVJC2U0eQF95hDfdGU/s2Js38E5yTN 58CDuo2uLDfvL1KbOj8kFUCFHaToum1c6ZouxpoW/Jne3/n9pxaNu8kVBZ060WDR5BUf oXmr8vWIT0amR9kxBDNzoacOPGgwn0jee+vxn6k7Y+4DsrXKXTMoIoGKEEvUnl1FOkiT xRzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790775972; x=1791380772; h=content-transfer-encoding:content-type:in-reply-to:organization :autocrypt:content-language:references:cc:to:subject:reply-to:from :user-agent:mime-version:date:message-id:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to:content-type; bh=CHcqKszk+BLOaoNOEO2+3FAWySZdw8cPx3mMZwkgNqk=; b=opBOb1ZVY+N5fr1YORbY/U920Sn3Oibb7L5PdcSbL4zp46prUzRFn2p0+4t3Nrw6xF FGp0Il7KyPvhln6HlsRzeQCwC8ftLg4b5mKVxYfueDZiGVqDArMKwGI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zLuuhHU= X-Received: by 2002:a5d:5f81:0:b0:488:84e2:cb0b with SMTP id ffacd0b85a97d-48b02549be8mr3355158f8f.51.1790775971655; Wed, 30 Sep 2026 06:46:11 -0700 (PDT) Received: from [10.21.51.184] (ipagstaticip-88fc351e-cb28-db3e-3f52-ad13c70f08da.sdsl.bell.ca. [142.127.77.63]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48b029e51b8sm3780276f8f.20.2026.09.30.06.46.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Sep 2026 06:46:10 -0700 (PDT) Message-ID: Date: Wed, 30 Sep 2026 15:46:04 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Neil Armstrong Reply-To: Neil Armstrong Subject: Re: [PATCH 0/6] drm/bridge: Add a BPF-based MIPI-DSI panel driver To: Maxime Ripard Cc: Jessica Zhang , David Airlie , Simona Vetter , Maarten Lankhorst , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Florian Fainelli , Broadcom internal kernel review list , Andrzej Hajda , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , Albert Esteve , Dave Stevenson , Javier Martinez Canillas , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, llvm@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Benjamin Tissoires References: <20260928-drm-mipi-dsi-panel-ebpf-v1-0-5244926aace4@kernel.org> <6b80cb97-6706-412a-b013-9423f6f75153@linaro.org> Content-Language: en-US, fr Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTW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ZjnqZGoM Mtsyw18YoX9BqMFInxqYQQ3j/HpVgTSvmo5ea5qQDDUaCsaTf8UeDcwYOtgI8iL4oHcsGtUX oUk33HEAEQEAAcLAXwQYAQIACQUCTVkGzwIbDAAKCRAWmrexpM/4rrXiB/sGbkQ6itMrAIfn M7IbRuiSZS1unlySUVYu3SD6YBYnNi3G5EpbwfBNuT3H8//rVvtOFK4OD8cRYkxXRQmTvqa3 3eDIHu/zr1HMKErm+2SD6PO9umRef8V82o2oaCLvf4WeIssFjwB0b6a12opuRP7yo3E3gTCS KmbUuLv1CtxKQF+fUV1cVaTPMyT25Od+RC1K+iOR0F54oUJvJeq7fUzbn/KdlhA8XPGzwGRy 4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/29/26 09:13, Maxime Ripard wrote: > Hi Neil, > > On Mon, Sep 28, 2026 at 06:39:58PM +0200, Neil Armstrong wrote: >> On 9/28/26 18:22, Maxime Ripard wrote: >>> Panels in general, and MIPI-DSI panels in particular, are pretty >>> difficult to support and require pretty much a panel driver for each >>> panel produced. Most of them are pretty simple, and require an opaque >>> initialization sequence that is usually poorly documented. >>> >>> This creates a tension between OEMs and distros because OEMs will >>> typically get a new panel to react to a sourcing issue during >>> production, and thus need some swift turnaround between getting their >>> new panel and it being operational in the OS. Distributions on the other >>> hand can take years to ship a kernel with that new panel driver. >>> >>> To solve this, I followed the example of HID-BPF and wrote a panel >>> driver that will rely on BPF programs to perform the panel >>> initialization. That way, we can ship the programs separately from the >>> kernel, and with a different lifecycle. If this driver is accepted, the >>> plan is to have a userspace component started by udev to identify and >>> load the right BPF program for the panels found on the device. >> >> This is kind of late for serious applications except if we manage to >> solve the bootloader to Linux display engine transition. > > Virtually all "generic" distributions are shipping the panel as modules > today anyway, because anything else is nothing but impractical. But > maybe you don't consider them serious enough. Also, applications live in > userspace already, so can be ran after this driver would be initialized > anyway. So what would this exactly solve ? keeping out-of-tree BPF driver + bindings driver forever and never upstreaming then ? Is this what we really want ? > >>> This driver is fully functional and works with both 5" and 7" Touch >>> Display 2 panels for the RaspberryPi. However, it breaks away from the >>> typical panel driver in multiple ways: >>> >>> - BPF programs can only be loaded by userspace. This leaves us with two >>> choices: >>> >>> * We prevent the driver from loading until the script itself is >>> loaded. This has the side effect of preventing any other output to >>> be used until the initramfs is ran at the earliest, and possibly >>> ever if the loader isn't installed for example. >> >> This adds a dependency on user-space behavior and if somehow the >> initramfs doesn't load for a reason we won't have a way to display >> an error. > > Yes, if an error happens before the DRM driver loads, it won't be shown > on the screen. This is already the case for any panel driver today on > any major !embedded distribution. And with built-in drivers, this can > also happen before or while the DRM driver loads. > > The solution is always the same though: load simpledrm first, move to > the proper DRM device once it's functional. It still works with this > solution. Module != bpf programs, maybe one day it will change. > >>> >>> * Or we probe the driver all the time, but only report it as connected >>> once a program has been registered. This is somewhat unconventional, >>> but allows the other outputs to be functional, *and* allows the user >>> to force the output if their panel doesn't require any >>> initialization or during debugging. I chose this solution. >> >> Both options are not really great... > > Feel free to make any suggestions > >>> >>> - It's not a panel driver, but a bridge one, which is also pretty >>> unconventional. This is required because panel drivers don't have >>> access to a detect callback that is required for the above, but I also >>> think that the recent work from Luca blurs the line from panels and >>> bridges and we'll end up going that road anyway. >> >> On this point, DDIC _are_ bridges, > > I have no idea what a DDIC mean. The DDIC is the Display Driver Interface Controller, basically the IC which received DSI packets and physically drives the display. It's basically a bridge to the panel, and this is mainly what we program. > >> but in the current panel API we blur the line between the panel and >> the DDIC. So being a bridge is fine, but in a general way we lack a >> proper way to describe the display/panel/monitor independently of the >> DDIC. >> >> At first glance it's a nice driver, but moving the timings into a blob > > Let's not kid ourselves, it's *already* a blob. We just sugar-coated it > enough that we can be happy and call it GPL. It's the case for most drivers, but since we don't get proper documentation we're stuck using registers list and can't implement advanced features. And moving this to a bpf won't solve but enhance the problem by a large factor. > >> moves something into possible proprietary binaries with possible >> closed licence and distribution restriction so it's a downgrade for >> the same of bringing up a panel faster. > > We can already make a proprietary, out-of-tree, panel driver today. That > being said, the only license we allow for BPF programs here is GPL, so > if anything it would be less of a concern for this than it would be for > regular panels. So you're on to facilitate keeping panel driver out-of-tree and never upstream them ? this is awkward TBH. > > Maxime