From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C6F7BCA5FA1 for ; Mon, 28 Sep 2026 17:24:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CzE2GE5JN/tI9+vf5ceSYktDtLDt2Ax4ATT81DGIpY4=; b=wKPtNbWx1Fo4ObI+c0OTDdnEe+ PyDhvRh25AHtcxHQDmx+OOfPmf0FPsvtYxFS29xokgF8xGY7pnI81mI/6UxeIvfcbgL6zAMFHIB79 9sZlM9NxHbF5673/8nRkAe94FWEQGTve7DcOp5KMGhMf1X1zZWNdJq/dOOh+ULTa4jx8aDtQ8W0NA zz7oiUFTj6yOm7HYUxpWl3rSk3eGayYdmgze6G/FqOeTqY6N4BMJAVaxVO6ShZ4rpXI6JH6xuXfcu h3GhuWOSDryb/m/wIOvb42iABIx4JRVazQsgwk5onoMWmgSfW52e8alQnR0mvCFTDrCwj9JwS3Osh Nvfc3cyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xBF5d-000000019co-1N09; Mon, 28 Sep 2026 17:24:33 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xBF5b-000000019ce-3rhP; Mon, 28 Sep 2026 17:24:31 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 48BCC40751; Mon, 28 Sep 2026 17:24:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2A4B1F000FF; Mon, 28 Sep 2026 17:24:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1790616271; bh=CzE2GE5JN/tI9+vf5ceSYktDtLDt2Ax4ATT81DGIpY4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=BTTnwgHo3e7c9o0rEnQRB7ZYUXhkhD5eIFXOeC520HyCwUZwp8jntGIY9n5YsIix9 /Ym50PIIpYqM37fQQXINrRbjumZpkwgpqOull3Vidwl2FElBE4K/ZGUVeOGKt8cKu4 a+UKkqCjaVec32acLq750VC4ry62UJhA1lTT4gGp/y+DstTdzx6MC0BJ24rg7StUJf dgv845cDIgkefff7Lc7OjPDgek/7/hApSlYTBXj74Uhnqg/3FzAsZ6YruF/Wkt4mBa F4lCS7i9EpYsGaacidhpQDKTKg3WlYFlUrNt18dgBccYqZ94wbeGNi0MRC87EwDbH+ BDQNjNC1bQU2A== Date: Mon, 28 Sep 2026 19:24:21 +0200 From: Benjamin Tissoires To: Neil Armstrong Cc: Maxime Ripard , 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 Subject: Re: [PATCH 0/6] drm/bridge: Add a BPF-based MIPI-DSI panel driver Message-ID: References: <20260928-drm-mipi-dsi-panel-ebpf-v1-0-5244926aace4@kernel.org> <6b80cb97-6706-412a-b013-9423f6f75153@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6b80cb97-6706-412a-b013-9423f6f75153@linaro.org> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sep 28 2026, Neil Armstrong wrote: > Hi, > > On 9/28/26 18:22, Maxime Ripard wrote: > > Hi, > > > > 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. > > > > > 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. > > > > > * 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... > > > > > - 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, 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 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. Quick answer on this, because I had the very same questions regarding HID-BPF: - in BPF, you can require (and by default it does) that only GPL compatible BPF programs are loaded, closing the argument of "closed licence and distribution restriction" - also, a BPF program can be disassembled much easier than a binary blob, and I remember Alexei showing me an example where you get almost the source code from the BPF object in just one pass. Cheers, Benjamin