Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp337573rdf; Tue, 21 Nov 2023 04:21:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IHsD7y3aUJ1nyomMIBLzIul/cgYi5BcsdIiyY74/4BuWcepRf8stXk6Gts5sUJrDiViPai1 X-Received: by 2002:a17:902:e80b:b0:1cf:73ff:b180 with SMTP id u11-20020a170902e80b00b001cf73ffb180mr587612plg.37.1700569303521; Tue, 21 Nov 2023 04:21:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700569303; cv=none; d=google.com; s=arc-20160816; b=H7ktaUIGWFS3wFqQoo9X7aDCyYms9QAz2kBM+GAJfMnln+M7EJV1hq2jYUmXFbQptY oE1D0hz3oBogMRjmGNSCARLYIO/aHWM9+1TORP+IQ2J000ykkGZCeONUqbsRCshg67/p 03qWYZDoLOGa7tNFysDNh27j0nAn97o+hk5FhHkDsAAXa+qc3+5mfEW61RVFv64psJRo kv+LuMtMwGl82W0IaC8AYXfTOurc6WZ8XO3X2diM8ycoIiHszqKYaKqgcmksPSNsnRIP XqKE7VyF3GAfHL3T5/3DS+XFdTnlsvHvkmksnWJ+V/RmhRNmmWEHUcbHJ9t45FrGfYwJ RV4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=0lxOA43UTP/R6zFUk37R+i+jJVYEbt1d8xZiecNyn/E=; fh=MWGzRJZEAGgjR5FtYp9BzxNctf13iF4249cRhZA8T8I=; b=cW3fNk6X4co5vqBMxITNt2UEDlGjDLK1rBc07HUFdflwbhxUuN36vfPL+nwsFkVSyT efJsR3btTopZww0oqTg9ZaWUNJPOmMooSdE3agnBiU6BdIDni9vXZimMFNagJy3NtHPr 1b+z95cEcrgL9qEcH3GZK2GPKcuUYn4/OOWxZnj7BTkNoYmGxWZIbilrLbG2geyR8wjI LnMCNg+BnqxUspq9QXWKpr9duGh0eEs3+nAPe9aXFHHPqcCUoSC49hu/qkzYM0pOr88G V06F7I54JhPs4d3OzNNwYhGZ3Siw3HIcokHqUam9g1InFsGxzuC2sudMEMJb6moyWO32 0R3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dnbfuPlU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id b6-20020a170902bd4600b001c60c5bbff2si9908339plx.201.2023.11.21.04.21.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 04:21:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dnbfuPlU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 8646B805E001; Tue, 21 Nov 2023 04:20:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234697AbjKUMUO (ORCPT + 99 others); Tue, 21 Nov 2023 07:20:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233895AbjKUMUM (ORCPT ); Tue, 21 Nov 2023 07:20:12 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D6D0185 for ; Tue, 21 Nov 2023 04:20:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700569206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0lxOA43UTP/R6zFUk37R+i+jJVYEbt1d8xZiecNyn/E=; b=dnbfuPlU0W/gPa6/yQJH9Gfd5NZ4qLBlK5Cwr1+nCyWx4Gl7KSkUm5sWZM3vzW5MTdycbx kKXbUsbXNCzBUDQctLRmzLeoJ8Ay3P//cZD4F/rCO/xlpGEmkrPOuyyUbo9S6Y7Wtdw9ut X0rQjnjOWeVqps0A+Lo3zkSsrf3kdxM= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-510-V5yaX18EP5eTNB-5six-9A-1; Tue, 21 Nov 2023 07:20:05 -0500 X-MC-Unique: V5yaX18EP5eTNB-5six-9A-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a02da20c311so21641766b.3 for ; Tue, 21 Nov 2023 04:20:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700569204; x=1701174004; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0lxOA43UTP/R6zFUk37R+i+jJVYEbt1d8xZiecNyn/E=; b=UwRT9CQCGxh5Sxa+qx31kUV0+DZXjFCO7wt18ogtixwJi/ImMlxRmbczGNHNsQUhxi 7n7G746ZoYhJj19Njf/BOAZi7RgDrcIDZsgunVd+/K4NyS9gs2F5zGz6rvnNZb+xKLOC oH0rwpiFhVTdVgdVtR3WTMyRtL4JBqUqrAWLGSFSz1iigArGSYCRTE8Zjgpwdsd1v2Bi Us5ZrWPWVYJQyKhp6HYQrj/O9mtm5BnB1l45lOYNfr3SAg0P4pb+CK1kEN1Hw8F/SLWN 6QWDM2mwyJJ6msPrqFmdJ+0HZwRHYzC3JPPxNDZ5lqG16jvZpdeeTqMvBanFWUzoSmde FKbw== X-Gm-Message-State: AOJu0Ywq0Pl8hV8YTyBEVup7QncnTlGzH2oUKljG0gDsjW2Eni1Q6n1B g+/5j6QM8gIDD92NY6NhU5O1Si9I22RiQ2Kltj1wkV2IWd4okhqonBspOHbWz6agBchOXUFacfo bRaFA8x1Mrjtlzh8ZYRNxJp1j X-Received: by 2002:a17:906:2e85:b0:9c7:5667:5643 with SMTP id o5-20020a1709062e8500b009c756675643mr6684062eji.72.1700569203964; Tue, 21 Nov 2023 04:20:03 -0800 (PST) X-Received: by 2002:a17:906:2e85:b0:9c7:5667:5643 with SMTP id o5-20020a1709062e8500b009c756675643mr6684039eji.72.1700569203641; Tue, 21 Nov 2023 04:20:03 -0800 (PST) Received: from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec? (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id l20-20020a1709060e1400b009ff783d892esm1938300eji.146.2023.11.21.04.20.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Nov 2023 04:20:03 -0800 (PST) Message-ID: <8096a042-83bd-4b9f-b633-79e86995c9b8@redhat.com> Date: Tue, 21 Nov 2023 13:20:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Implement per-key keyboard backlight as auxdisplay? To: Werner Sembach , Pavel Machek , Jani Nikula , jikos@kernel.org Cc: Miguel Ojeda , Lee Jones , linux-kernel@vger.kernel.org, "dri-devel@lists.freedesktop.org" , linux-input@vger.kernel.org, ojeda@kernel.org, linux-leds@vger.kernel.org References: <20231011190017.1230898-1-wse@tuxedocomputers.com> <0440ed38-c53b-4aa1-8899-969e5193cfef@tuxedocomputers.com> <87sf61bm8t.fsf@intel.com> Content-Language: en-US, nl From: Hans de Goede In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 21 Nov 2023 04:20:29 -0800 (PST) Hi Werner, On 11/21/23 12:33, Werner Sembach wrote: > Hi, > > Am 20.11.23 um 21:52 schrieb Pavel Machek: >> Hi! >> >>>>> So... a bit of rationale. The keyboard does not really fit into the >>>>> LED subsystem; LEDs are expected to be independent ("hdd led") and not >>>>> a matrix of them. >>>> Makes sense. >>>> >>>>> We do see various strange displays these days -- they commonly have >>>>> rounded corners and holes in them. I'm not sure how that's currently >>>>> supported, but I believe it is reasonable to view keyboard as a >>>>> display with slightly weird placing of pixels. >>>>> >>>>> Plus, I'd really like to play tetris on one of those :-). >>>>> >>>>> So, would presenting them as auxdisplay be acceptable? Or are there >>>>> better options? >>>> It sounds like a fair use case -- auxdisplay are typically simple >>>> character-based or small graphical displays, e.g. 128x64, that may not >>>> be a "main" / usual screen as typically understood, but the concept is >>>> a bit fuzzy and we are a bit of a catch-all. >>>> >>>> And "keyboard backlight display with a pixel/color per-key" does not >>>> sound like a "main" screen, and having some cute effects displayed >>>> there are the kind of thing that one could do in the usual small >>>> graphical ones too. :) >>>> >>>> But if somebody prefers to create new categories (or subcategories >>>> within auxdisplay) to hold these, that could be nice too (in the >>>> latter case, I would perhaps suggest reorganizing all of the existing >>>> ones while at it). >>> One could also reasonably make the argument that controlling the >>> individual keyboard key backlights should be part of the input >>> subsystem. It's not a display per se. (Unless you actually have small >>> displays on the keycaps, and I think that's a thing too.) >> While it would not be completely crazy to do that... I believe the >> backlight is more of a display and less of a keyboard. Plus input >> subystem is very far away from supporting this, and we had no input >> from input people here. >> >> I don't think LED subsystem is right place for this, and I believe >> auxdisplay makes slightly more sense than input. >> >> Unless someone steps up, I'd suggest Werner tries to implement this as >> an auxdisplay. [And yes, this will not be simple task. RGB on LED is >> different from RGB on display. But there are other LED displays, so >> auxdisplay should handle this. Plus pixels are really funnily >> shaped. But displays with missing pixels -- aka holes for camera -- >> are common in phones, and I believe we'll get variable pixel densities >> -- less dense over camera -- too. So displays will have to deal with >> these in the end.] > > Another idea I want to throw in the mix: > > Maybe the kernel is not the right place to implement this at all. RGB stuff is not at all standardized and every vendor is doing completely different interfaces, which does not fit the kernel userpsace apis desire to be uniformal and fixed. e.g. Auxdisplay might fit static setting of RGB values, but it does not fit the snake-effect mode, or the raindrops mode, or the 4-different-colors-in-the-edges-breathing-and-color-cycling mode. > > So my current idea: Implement these keyboards as a single zone RGB kbd_backlight in the leds interface to have something functional out of the box, but make it runtime disable-able if something like https://gitlab.com/CalcProgrammer1/OpenRGB wants to take over more fine granular control from userspace via hidraw. That sounds like a good approach to me. We are seeing the same with game controllers where steam and wine/proton also sometimes use hidraw mode to get access to all the crazy^W interesting features. That would mean that all we need to standardize and the kernel <-> userspace API level is adding a standard way to disable the single zone RGB kbd_backlight support in the kernel. Regards, Hans