Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp315274rdf; Tue, 21 Nov 2023 03:41:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IFAS110ma/CcB9NTacp+lCB3fFz1uI/W0FXaTvf7SeI+2bVWHi41O5HKQppRXbQjPoMDGi4 X-Received: by 2002:a05:6808:10d4:b0:3a9:e8e2:5799 with SMTP id s20-20020a05680810d400b003a9e8e25799mr5655840ois.14.1700566898640; Tue, 21 Nov 2023 03:41:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700566898; cv=none; d=google.com; s=arc-20160816; b=KNXbad2knA+3gbm/gx1q8/PBcmHCGAm1Bqu8zYXU5uru9V+0A1dEtsXoYeU3eGGxIN iOYqZCFxrVIXO9pL6L5rW10V6TU/euCtOD5XTpwa19HzhNDsNWNr9zA/BrxVGnjjrcHm qEPJWtKJFHYac3jVsjc6PWUC2xbcFRmkRAvPRp6lVwRwYChE0cw1GUXtKCkfeHb2++3c Nnqft2kyMNr3kBJaSmsiuX06BUpYQI5Imhv2Xs2hFXuZMijvVCIgbj9fqhd9u7bm8Az3 J5QNgyxT7hHsO2OrH1jWrNCl1GlgZ0/fULt9MrjxT3+HABZtdsx9rWebPtSd4v5FlTyW TaVw== 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=bE/DZ6jSuHVY0GZUKmeiKrvkfUErx6XZ/rLhfW6+yWE=; fh=vig/Se6Wy18GzcbX1a01ayz0Kb7ci1mFQF32kc5Xgo4=; b=MVG5vJIWyIwrgMzmFwCKTKfIfM17XA8VdWuUFozSAkYcDIhhJfhslnEHwtFnZt01lL l1gyRcDq5m0J62D5GW1V8T8Vzv1NhjX/EyqbPYIRri3rLBdJoMeXc9CfRIHjt2/kHe0u CP2/mr/QrvWmnL86z+x2krO/dGWAtrqv8r06lFVySV0JXrqLD4Ve/98pnJpFk2MfQIVC dBSmdNUFIR2xG+k5qBxHcDcjy5zjqSotgOQpBD7vh/pxcWEoWsNfp47AuDe2YktEE9O2 IAyh/I0iUNbnbKGcO0dKZDdGBnCT8B7MyDVnnsWv3/csQMKpNUwuMvs6EF+N4r6Rqeo2 2bQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tuxedocomputers.com header.s=default header.b=thbtr9T8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tuxedocomputers.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id u15-20020a63140f000000b005898b0b851asi9868127pgl.530.2023.11.21.03.41.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 03:41:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxedocomputers.com header.s=default header.b=thbtr9T8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tuxedocomputers.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 7D9168031D61; Tue, 21 Nov 2023 03:41:35 -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 S230371AbjKULlU (ORCPT + 99 others); Tue, 21 Nov 2023 06:41:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbjKULlS (ORCPT ); Tue, 21 Nov 2023 06:41:18 -0500 X-Greylist: delayed 476 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 21 Nov 2023 03:41:13 PST Received: from mail.tuxedocomputers.com (mail.tuxedocomputers.com [157.90.84.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D28CA9C; Tue, 21 Nov 2023 03:41:13 -0800 (PST) Received: from [192.168.42.20] (p5b164862.dip0.t-ipconnect.de [91.22.72.98]) (Authenticated sender: wse@tuxedocomputers.com) by mail.tuxedocomputers.com (Postfix) with ESMTPSA id 10D352FC01F8; Tue, 21 Nov 2023 12:33:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxedocomputers.com; s=default; t=1700566395; 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=bE/DZ6jSuHVY0GZUKmeiKrvkfUErx6XZ/rLhfW6+yWE=; b=thbtr9T8Yuz+G62q4lI97f1h/EewjqDXX3f+f386nsC9W23YpT9QO1b1CmGW1avIKk10yr LgJU9QZ5xf26OisbyPn4UmNLt2Z5KKKtMWgIGoP8MPCoaIXc8tabtrq8knuJKvq1vET/yD G1Ssnz+cJoo5/oSznGQ/eBl7Oc2uqb4= Authentication-Results: mail.tuxedocomputers.com; auth=pass smtp.auth=wse@tuxedocomputers.com smtp.mailfrom=wse@tuxedocomputers.com Message-ID: Date: Tue, 21 Nov 2023 12:33:13 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Implement per-key keyboard backlight as auxdisplay? To: Pavel Machek , Jani Nikula , hdegoede@redhat.com, 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 From: Werner Sembach In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=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 03:41:35 -0800 (PST) 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. Kind regards, Werner > > Best regards, > Pavel