Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp195539rdg; Thu, 12 Oct 2023 03:03:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHqDTKq4mwWF10QNAtgUfbIYIoBzhltTqfluzHHwHkwDPKnbncgS0LPSk4Ofl3B0l1nKjcV X-Received: by 2002:a17:902:e54b:b0:1c9:d46e:d52d with SMTP id n11-20020a170902e54b00b001c9d46ed52dmr3945508plf.64.1697104999888; Thu, 12 Oct 2023 03:03:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697104999; cv=none; d=google.com; s=arc-20160816; b=uE2P8ODI54fNTCKIddkoyeZB8su1BSFYgUkNmvpl3v0x09TootqXqD5JKNMkAxvtB8 d1YL1yJ0LynOM5kLOSv/fGbNstk2drziRgx3M6Gzk9IiH8SmWp/pVllN4ZbraXQKxG3V ZOy+JFcDfhCp41Bl/prE7kt9I2ehNMVstXX1VbO5kxtRKbKlbUy6G7vCaRoouJwhxEjE Y6M+/HY3mpfVcZ0kn+MEktn3NOgMIyhwu4soH5PM0F3bxiypPyxAGX4y7sh+p8kSsx9f AIV2PfzgijN/JUc2Yqrq7Pbwy2dfaKqnHprJG2NIRz6hVSulFhQPMIuq9DmjPmy0oKBg 1RbA== 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 :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=tKwmlTlHRKLmKTIlMWUJwMtc2osuoYdOh412C/2t6iQ=; fh=8UFvXOI0FV1HnaUyjvYREtBD5czi94EuNsHDRZNuUbE=; b=fUkm1GtBS4CDvviZb+b4GvPz1AdYRXYOOgA3RKfP65aauFYR7Mu66H9xLIG6fwuSwL qfsWFeBwTou+OG/wmdrv/tUYzyjplcwKYQK84naarvqEDfhwC2G0tY+HPZVmD/aIm7cW /D4v91B/3osS4c3hLokqWitwBKLc4VLqhHH9AL1ZTUiAlHDK5vWsQdrwRo30ClNUTH/X ENdyNXvNTqwmkgjwTSFPCAVcskOPo9bIWeVTG9K7oKOk5x0TpggiZGtBTEDpQVn21sMk ZXvqzBJ/BAZgMtyy8/+RH6EIItQikYun3Lhc5OLv0Trv99nTUEeZEPQBE8r6ormx6ZXC DbiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tuxedocomputers.com header.s=default header.b=emvbv3gQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id x1-20020a1709028ec100b001c9af77fc54si1772441plo.649.2023.10.12.03.03.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 03:03:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxedocomputers.com header.s=default header.b=emvbv3gQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 2403B8090E9E; Thu, 12 Oct 2023 03:03:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235618AbjJLKDJ (ORCPT + 99 others); Thu, 12 Oct 2023 06:03:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235654AbjJLKDH (ORCPT ); Thu, 12 Oct 2023 06:03:07 -0400 Received: from mail.tuxedocomputers.com (mail.tuxedocomputers.com [157.90.84.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7E93C9; Thu, 12 Oct 2023 03:02:57 -0700 (PDT) Received: from [192.168.42.20] (p5b164245.dip0.t-ipconnect.de [91.22.66.69]) (Authenticated sender: wse@tuxedocomputers.com) by mail.tuxedocomputers.com (Postfix) with ESMTPSA id 25D0B2FC0048; Thu, 12 Oct 2023 12:02:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxedocomputers.com; s=default; t=1697104976; 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=tKwmlTlHRKLmKTIlMWUJwMtc2osuoYdOh412C/2t6iQ=; b=emvbv3gQGIGGlIjZqrO6KJpSevP2m5GZ1j/mOoMNdgl0Ii0JPJjMKTLiUQtGETG7ftbc8s 4KaYUjuIhNGnqVtihtoiibwvYHkpN5TWNoOtY5R6T0WXxcARr9m7vNnT68dgUUSTPT5AGv K/Ua8wtBNYwUvrM886H3LJjjXnN8dzA= Authentication-Results: mail.tuxedocomputers.com; auth=pass smtp.auth=wse@tuxedocomputers.com smtp.mailfrom=wse@tuxedocomputers.com Message-ID: <0440ed38-c53b-4aa1-8899-969e5193cfef@tuxedocomputers.com> Date: Thu, 12 Oct 2023 12:02:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] leds: rgb: Implement per-key keyboard backlight for several TUXEDO devices Content-Language: en-US To: Pavel Machek Cc: Lee Jones , linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org References: <20231011190017.1230898-1-wse@tuxedocomputers.com> 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.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Thu, 12 Oct 2023 03:03:17 -0700 (PDT) Hi, Am 12.10.23 um 10:58 schrieb Pavel Machek: > Hi! > >> From: Christoffer Sandberg >> >> Implement per-key keyboard backlight in the leds sysfs interface for >> several TUXEDO devices using the ite8291 controller. >> >> There are however some known short comings: >> - The sysfs leds interface does only allow to write one key at a time. The >> controller however can only update row wise or the whole keyboard at once >> (whole keyboard update is currently not implemented). This means that even >> when you want to updated a whole row, the whole row is actually updated >> once for each key. So you actually write up to 18x as much as would be >> required. >> - When you want to update the brightness of the whole keyboard you have to >> write 126 sysfs entries, which inherently is somewhat slow, especially when >> using a slider that is live updating the brightness. >> - While the controller manages up to 126 leds, not all are actually >> populated. However the unused are not grouped at the end but also in >> between. To not have dead sysfs entries, this would require manual testing >> for each implemented device to see which leds are used and some kind of >> bitmap in the driver to sort out the unconnected ones. >> - It is not communicated to userspace which led entry controls which key >> exactly > Sooner or later, we'll need to support these keyboards. > > But this has way too many shortcomings (and we'd be stuck with the > interface forever). I had some thoughts on how the current userspace api could be expanded to better reflect the capabilities of RGB keyboards. What would be required for such an expansion to be considered? I'm in contact with the KDE folks. Plasma already has a keyboard brightness slider, that soon https://gitlab.freedesktop.org/upower/upower/-/merge_requests/203 will work with multiple kbd_backlight. However the slowness of 126 sysfs entries makes it a little bit janky still. They are also thinking about expanding desktop accent colors to the keyboard backlight when it supports RGB. I have not reached out to the OpenRGB project yet, but is it alive and well and under constant development: https://gitlab.com/CalcProgrammer1/OpenRGB. Afaik it is currently a userspace only driver interacting directly with hidraw mostly and has not yet implemented the sysfs leds interface. Just listing this to show that there is definitely interest in this. > > These days, displays with weird shapes are common. Like rounded > corners and holes in them. Perhaps this should be better modelled as a > weird display? I'm not sure if I can follow you here. Where would this be implemented? Also I asume displays asume equal distance between pixels and that columns are straight lines perpendicular to rows, which the key backlights have and are not. Kind regards, Werner > > Best regards, > Pavel