Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp280593rdb; Thu, 22 Feb 2024 03:40:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWNLm/vfLBIyfZVw9WVJYACrsg0YouWKREtyoCWuHplsS2KpENEp/IVyN2R2EQdDw1kJN/WA3HnUlG15ZUTlDTkR5SDOp+6XOHmRRSiuQ== X-Google-Smtp-Source: AGHT+IHIcdvmS/ymeb7vBwfdMl7cCucJdEGukDOs1Q7O2YJ6dFgtEnj/zDmU3gbDv+TEh9xfSem3 X-Received: by 2002:a05:622a:216:b0:42d:ae52:76a3 with SMTP id b22-20020a05622a021600b0042dae5276a3mr23828085qtx.1.1708602018002; Thu, 22 Feb 2024 03:40:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708602017; cv=pass; d=google.com; s=arc-20160816; b=xBDLQ+aPwpq/+gZgZnAYOGJi8i9vNUbG1aMyeInRrhKkwFdtRHIlTocn3MT4DnQGG4 rWfno6u9VaWuNMPTV4Ejmhb+09F+JJx+k0xsiVwMyafJhLygcyVR94SMd+M8TRx2gMJD pVwOEFakWfkR17+huN7ihst7Vuxfh/PmNVX0C00GuzmkJmisb9W9KDofrO/ZpxhqgNj1 7h3BCMvaJSPtxp7K7hxBK/SkHFaVR+t2Wb7P4e9cO+yBj6Oe0V/9r+3sNl3hHQaYfXYk u29miauZZSOdsQOejtOJ0s1X/7GA37SWxRaol3k0RcBRODotaoMyE1uBniKCBlEt4w1x T1xQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=Q4j+GQLy+4UDOE+jrUoWuh2+LJUqbegRz7zLOxtcxl8=; fh=6A/Oxl79jDeAxm2a0mhtcpTc1T3wW5COT06gFxpt9ss=; b=V8v+dxzeoyzsXPUMnwttwhA6otsiLRR3qmNWzWBdl4lQedHR13rXd2NCzCBJJpickM vJQbrPQ4WvWb5rKtoUsI5O54YddHrvJWFvXRCnx+jhwlZYhG8mArdt0Xt/NMXJveak2D jN/H0n7LzLkwQGp2VPjq7vHvMq23cs+aaWjpQZM+McRjs4VMNZwPWkUAEPUbwYDIyeby tFNdVXH09uiJjHmyW1kKFF6JTMhKS/73yHt552FjbrvrhI3fdGHzaQ6dmD3mXkI3h3j3 XdxqonQNXPjDlIYxLnkaywFro/5ibehsihy9iHMLdiHMrzHAmPQC+w/5JET+k5THP2Dx 78fg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=X5blD3Xn; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-76437-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76437-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v12-20020ac8748c000000b0042dd4c520besi12146633qtq.260.2024.02.22.03.40.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 03:40:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76437-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=X5blD3Xn; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-76437-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76437-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 650861C233FA for ; Thu, 22 Feb 2024 11:40:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A17DD46546; Thu, 22 Feb 2024 11:38:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="X5blD3Xn" Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (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 B9652405D4; Thu, 22 Feb 2024 11:38:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708601894; cv=none; b=Alob+qW5OqlUrAQazicF3CEvnz2jjdIVuesV4++1UMkVUuzE5KLj39YMKOfx0t8U2koXf7RzTplYKoCPnW3XYyw5D8mcyWnGh52eeUW1vL81atODfzKFL0qm4EeQbYKITMhVZ3R14TZXkgX4RaLqyX8/MlXxgslGO56K7dhnHDI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708601894; c=relaxed/simple; bh=uLn85H6BfgHQmu6Lkpo3kyKem1I/giGYKE2Jvsin2kE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=L/+mylnlzxMiwq3ZAoUHMX5EYJKDHuyH0CMWCYIt7OxF8uEZsVYS38ar54j1TeBpbUn+4hEfuUfWGbJvTLBRHSwCQgNVbyPw39f/jJZa8MD8tABbCAUyGgM/H68aa9ZNlCZH7uc3meW9By90wjG/X7py4GmOPxoLdA05FiJlOGo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=X5blD3Xn; arc=none smtp.client-ip=209.85.218.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a3f1bf03722so312542866b.1; Thu, 22 Feb 2024 03:38:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708601891; x=1709206691; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=Q4j+GQLy+4UDOE+jrUoWuh2+LJUqbegRz7zLOxtcxl8=; b=X5blD3Xn2I+EZIPUm6KESusfJPhoSxmPmKxPUeD7theFuaH5rTWm/LIimtMUhh1Kph ZNpxxoTvisdMXhRRsJ3B+IFFnc+irQyn5BJzQebNXEclRoKIueR5Bu/uU83mf0TP+ACH EGtLigphJE+ohIitf5Zzio22QLDsZevD+W6LBwWRbO/kAMwSjkxLysEWPgPAbcl4pzz8 gKx1CUvvkhc/e03THjrzS4UdnxSsELW2OvfmUEGoouxd6UoVOsUZ7H76pWXwgaji6FAL G2B1Wc+oDqfpseFmSY1h8moBB4zIGDAU8OApd4BRm2473ykSYIRA16Ep/VaJylcyHG6I 8D+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708601891; x=1709206691; h=content-transfer-encoding:in-reply-to:autocrypt: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=Q4j+GQLy+4UDOE+jrUoWuh2+LJUqbegRz7zLOxtcxl8=; b=W6U6QxJaTkRBV5NZ2sasbwabw9DGm7sdDakpT7lX9YQtqjLJa3N4USHbA/SzjsDWgg IU1HSemqumJ7Uly6Ua2+o7uDROun1R10TNMyeMCft1ZPy8oRd26ipfs92D3UI9vyK/E/ NNshiA+VLCe+EQn8APN5vjIWt30OrePRac/lbVcUPTKrG+l3B6O3FfXbCJroGnOApYXV ZU3gjcH7CRv+CN8XkUoV0bIWUdwrN8IDc8qharcFGFFHD0npopsWxKVrIDFeVlTJLBWN U+tDQDqCz0RlhPIg71AVKMUtdLVm1hPnfx2lf2B0rTObSjRSdTY6jr3LtYZEmKFNvnOu Q3ZA== X-Forwarded-Encrypted: i=1; AJvYcCV0gMoHJ6Q4ZP8kuXUTKLeY+UZnKKmoe1BBKKsdJ9H2NJ/iKV/gy6UoQnTZbUJDaqajc6NgfZ73jXhvRWUFqEV+ItIUOSd0BVC4CbLP0SIR9OGkpP8W/WDqJN0+jaeM6vrK8jUZ8jyvESfo4dcgEbnBel0LPQBjZC+2N2wxab4bw8/mAvJd X-Gm-Message-State: AOJu0YxozFAs+jJ6rjBR8MNJsWFHVQHA6GnkiCChS8iWvyJq+ffJqgrm aEcyk0vMnKiywNq8carwRt2eb8EZY+VBXxuGlNJQfv4uJu2z7CSR X-Received: by 2002:a17:906:3559:b0:a3f:a562:ded2 with SMTP id s25-20020a170906355900b00a3fa562ded2mr96896eja.73.1708601890657; Thu, 22 Feb 2024 03:38:10 -0800 (PST) Received: from [100.125.116.68] ([213.55.188.37]) by smtp.googlemail.com with ESMTPSA id wb1-20020a170907d50100b00a3ec215f130sm3435903ejc.103.2024.02.22.03.38.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Feb 2024 03:38:09 -0800 (PST) Message-ID: Date: Thu, 22 Feb 2024 12:38:07 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Future handling of complex RGB devices on Linux v2 To: Werner Sembach Cc: Lee Jones , jikos@kernel.org, linux-kernel@vger.kernel.org, Jelle van der Waa , Miguel Ojeda , "dri-devel@lists.freedesktop.org" , linux-input@vger.kernel.org, ojeda@kernel.org, linux-leds@vger.kernel.org, Pavel Machek , Hans de Goede References: <0cdb78b1-7763-4bb6-9582-d70577781e61@tuxedocomputers.com> <7228f2c6-fbdd-4e19-b703-103b8535d77d@redhat.com> <730bead8-6e1d-4d21-90d2-4ee73155887a@tuxedocomputers.com> <952409e1-2f0e-4d7a-a7a9-3b78f2eafec7@redhat.com> <9851a06d-956e-4b57-be63-e10ff1fce8b4@tuxedocomputers.com> <1bc6d6f0-a13d-4148-80cb-9c13dec7ed32@redhat.com> <477d30ee-247e-47e6-bc74-515fd87fdc13@redhat.com> <247b5dcd-fda8-45a7-9896-eabc46568281@tuxedocomputers.com> Content-Language: en-US, de-CH, fr-CH From: Gregor Riepl Autocrypt: addr=onitake@gmail.com; keydata= xsFNBFRqKQQBEACvTLgUh15kgWIDo7+YoE4g5Nf9eZb9U3tKw9gDLbkhn8t5gdMWMXrV2sSM QyJhkzEWdCY9CMgEhw4kLjGK1jUaH6VtSq++J5+WqgJ2yfdruBClkKC8pdqtQzgo6HvFf5+b mm1orwDu66KkgunMfwFlVy4XtXcV0cxpq9xCfNd+Z7EV6XHDlPbJa/9Z1Jvo5/sh6sJKzLR2 JOHi2MqpTh1Z2nUv6jmo4qiO4WFnkL0PGAmiaEOUplLDs4ImXEfhvSS3bodZKaIFMMS4/kCd 6I+VfICJARN6DAxLaOrhOveG2AaYxH7syBu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C31C1LKd/I2sIAETuu3pMvOpACXtyspBEiVvNoK5Wu gjQLktZwdjEbadSa6VUaHxsmn6tjqYq7T3CLlTXtMGpaj1/kY1QF/jpB0l+ZY7d1R+2mfylm SLhifR31zJjj/FqISDUf253MftZGvMEDMzyxX08oFRq3EM/B3MZLIKyk+IJDw3gH9jsRB3Z/ iTsQSvOwYYFFyIm6w0yyuPhk4HKjzC0HKqLLwq8GiFNpIMkYLfQWfdRLO3TASqWPPdySP4NO gJK6XYeRDF39qo493q4Klgym5HUDibpJ1heNLGQhojNoAV7YX5Pc/Rnoi7qxO/Wdb4vdG8BW e4t3UaDs0pRVghO+VnP7lxyYsnPgeHDKhUBDNM97bWVkfHZDgeD50wpynCWrl0IFveZAZaJG a0cmtan5CnxHkscTFmQN3xr+y2/GaQm37qc/Xdeynknu2idbWlV5wc/9cKuIKxPbyQ7tCSVw OJnKk5hmCyPRlBg4QACPP62jE7o1s05l7aPeMhYJOhJYKprkIBqPheyloQD0qYssenz3XZHE DMcsQA== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit > This certainly is the most KISS approach. This proposal > in essence is just an arbitrary command multiplexer / > demultiplexer and ioctls already are exactly that. > > With the added advantage of being able to directly use > pass the vendor-cmd-specific struct to the ioctl instead > of having to first embed it in some other struct. There's also the question of how much complexity needs to remain in the kernel, if vendor-specific ioctls are made available. Does every vendor driver implement a complex mapping to hardware registers? What about drivers that basically implement no mapping at all and simply forward all data to the hardware without any checking? The latter case would match Pavel's concerns, although I don't see how this is any different from the situation today, where userspace talks directly to the hardware via libusb etc. To be honest, I think the kernel shouldn't include too much high-level complexity. If there is a desire to implement a generic display device on top of the RGB device, this should be a configurable service running in user space. The kernel should provide an interface to expose this emulated display as a "real" display to applications - unless this can also be done entirely in user space in a generic way.