From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A083F365A00 for ; Fri, 31 Jul 2026 07:20:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785482418; cv=none; b=ZhPa3UtnYud172eqPpElFDsKvGF8oHtXOba/TxKQKhOIE9HRfaxiGvCZMiJ4mrPpqXaAzYSzvMYS1yLXGldHhoW7RE3HNBOiAIMTHhYrQSgRDB71IS9Mpsd3QGkRWn12Kd1cRrOmBD4PvlcHfo0+otgZ8/rjq0pH863BJMmQqQE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785482418; c=relaxed/simple; bh=gpifJxOEj/2q3J/12Nd+2d9x56WlBdyXyjmspLMG3co=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=u0ur7iwyKDl8/0+g3lywU2l67ITb4kI0BnmGpGGYjgpvks//asZv8keK5VXWxwY/l9+c+XgM5jWeFrGANkU3UmNgJIEioSumF2GUtbh1CRb2pb7L0tLC5WoRA/r3saaxzivxxBqQQX5INJSHPHQfcr6+BdirlNtzZBt8oCDmNGI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=NoPi5OCn; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=BxrMF8VQ; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NoPi5OCn"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="BxrMF8VQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1785482414; 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: in-reply-to:in-reply-to:references:references; bh=dj8rz8VUz5drdM9tkyErMU4LmSj7E0FEy06SzAi9zFE=; b=NoPi5OCn0h3WDX3JFCmdG3hPD59OFTRKVlsJ7SGMaYIANEJpfBWXGVg0i2oGeaSPYd8YUk 0O3u73Lw3jfOFcE+9EsLFuoQACuDOvHfVctBGHalTSdiCD+7EtOgUpmeSWliVE6k1Vk4HY XKtMJ2YOoUFXdFm3IlL7exgn2dUA7jA= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-12-cYwXXaXpMxSKhfEFe4C7MA-1; Fri, 31 Jul 2026 03:20:12 -0400 X-MC-Unique: cYwXXaXpMxSKhfEFe4C7MA-1 X-Mimecast-MFC-AGG-ID: cYwXXaXpMxSKhfEFe4C7MA_1785482411 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-47fd3c114bdso199930f8f.2 for ; Fri, 31 Jul 2026 00:20:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1785482411; x=1786087211; darn=vger.kernel.org; h=content-type:mime-version:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to :content-type; bh=dj8rz8VUz5drdM9tkyErMU4LmSj7E0FEy06SzAi9zFE=; b=BxrMF8VQZRywfgc3h8/DJc1iYsvTv5sBQ6RljoFiX30dTg5fJBEJaMTm125GvECWts GqoehecEpjHfkWIq3VsPbSm8K2IvZU2qxzXFnDryZ0cgYviBEch076RNu3scVvQBDXP1 vUajVCzeL5bsdZl/vWq4DKl8fyZrYjHlQN+YR1Ng615vL7xdJKOkH998vW8jGD4vqPQB AYJpADGDKxkTOkIypzh0VgcspITTrIKSxK6v0v8UDaqqvvKn8Txv9IaO6LgmGWviwZ7S XEQD7uiM3OL32NNLv5Oh708n4fpNjWru250WuT64kE57G99BCPab8iTY7odS/0pzT/by pSUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785482411; x=1786087211; h=content-type:mime-version:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=dj8rz8VUz5drdM9tkyErMU4LmSj7E0FEy06SzAi9zFE=; b=QVFpfqqcd8JjR93ELSTzY+9HncpD3AOSZwm2szPB3s2HkwybDeYZ8QmJG432UDhb0T CPKWPxYPf9zB6m2umM0RHV1Lr8qpPDI4zTcSkWxo4lzP3PzOj5/AA7BSY8KFjQxv2aSN 8flbC1L1HB8iZaDecxT+ExQCTlP4SFyuZRlLRXlgsKqVbM0zpcNJP3+NuRqGeNZnT7Ro LUAjD6spBFMLWeNXmez9S+45iiV0sEFiR9vYnktSUBDLclapZtuf0WurQVRPBwcWs3Zm x+33ngi4l2lE0A7u+gbg55O6j/J7rUZ/lhz+Q6ij0sKYBcCbeU5CRHA3P0wR6MrPkAu9 QOoA== X-Forwarded-Encrypted: i=1; AHgh+RpjvJvaCojp7mtSpiIA55vA19Mtqf4sovc1Ry+bvHs1FXx1dEqN8kkt3lQp2a1ZhHaSLab+jrfFF1mpcFs=@vger.kernel.org X-Gm-Message-State: AOJu0YyakAR2UOBnQklhMDINedubecaCUeJVe9d1kfbK8RyKjqRn3knC 5WNf9MUjOwLxFC2/xxC/uXqdcQO74uf6Zo1QldeMMl/PeM3qvfjbxyjzbeJAROQFbBlSRbtX0I4 3CfHSX2z+fv4+rJyhAA/ialfa0FbCb8GP/lO7PfX68jo/z7nslIqj7vT4JlRW4FP76Q== X-Gm-Gg: AR+sD106js6q1BJU7bQuSNzysPJ/gcKbkb3cf8ithwFfs20C8281s+VHKjrp6dcV6uS w0C0pebAvO7ibxxu49F3vaEbNOEIkZm+kA00ZJWhGJuyfBBob9hAcKsvgGOELRQEu1EmLfTXf1B IvWFsv9sfEmiJPMOK3/UnXgz6C02PYoHDC7K3df1OZi4v81xOisPu0pbjuYOoe+whqDxVZUP7gH gGpYiErnj7MnUQTG+KQC5bBxEAL4NiO8UWd89heM23oTASLav/bHy/T4UqZKikaMdbfyVc5CsWT GLeSRSETB/VSMPep1n+g+648l1Pcbhj/wiZS1jWn+t8O5mxoH+ya/Vs6fwuHBym7R+4HqwLUw9H IqmGQIO/L3yj8ksWz3uogzhmfkeWs X-Received: by 2002:a05:6000:4a10:b0:474:b860:b7b1 with SMTP id ffacd0b85a97d-47fd2ab9f6cmr2051931f8f.9.1785482411145; Fri, 31 Jul 2026 00:20:11 -0700 (PDT) X-Received: by 2002:a05:6000:4a10:b0:474:b860:b7b1 with SMTP id ffacd0b85a97d-47fd2ab9f6cmr2051861f8f.9.1785482410614; Fri, 31 Jul 2026 00:20:10 -0700 (PDT) Received: from localhost ([84.78.248.203]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd456a5a4sm1592645f8f.20.2026.07.31.00.20.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2026 00:20:09 -0700 (PDT) From: Javier Martinez Canillas To: Amit Barzilai , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Amit Barzilai Subject: Re: [PATCH 0/2] drm/ssd130x: Wire up ssd133x backlight/dimming In-Reply-To: <20260729053054.29374-1-amit.barzilai22@gmail.com> References: <20260729053054.29374-1-amit.barzilai22@gmail.com> Date: Fri, 31 Jul 2026 09:20:07 +0200 Message-ID: <874ihfeic8.fsf@ocarina.mail-host-address-is-not-set> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Amit Barzilai writes: Hello Amit, > The ssd130x backlight controller adjusts brightness by writing the panel's > contrast, but ssd130x_update_bl() writes the single global SSD13XX_CONTRAST > (0x81) command that only the SSD130x and SSD132x families expose. SSD133x > has no such command: brightness is controlled through three per-channel > contrast registers (CONTRAST_A/B/C) that form a white-balance calibration > and must be scaled together. As a result the backlight device registered > for an ssd133x panel had no effect. > > This series adds ssd133x dimming: > > - Patch 1 extracts the ssd133x_init() contrast magic values into > ssd133x_set_contrast(), which scales the per-channel calibration by a > requested brightness so the white point is preserved while dimming. > > - Patch 2 makes backlight_ops.update_status a per-family choice, so > ssd133x uses a handler that drives the three channels while SSD130x and > SSD132x keep the existing single-register path. > > Note patch 1 changes the ssd133x power-on brightness: it previously booted > at the unscaled (full) calibration and ignored the contrast field, and now > honours the shared default contrast of 127, i.e. half of MAX_CONTRAST. > This is intentional and matches ssd130x, whose contrast register also > defaults to mid-scale, so all families now power on at ~50%. > > WARNING - NOT TESTED ON HARDWARE: this series is compile-tested only. I do > not have an ssd133x panel, so the runtime behaviour -- in particular the > ssd133x contrast scaling and the new per-family backlight update -- is > unverified. It is posted now so that dependent work (ssd1351 support) can > be based on it. Review and testing by anyone with the hardware is welcome. > I've reviewed the patches and are quite straightforward so I think is safe to merge them. I'll wait a few days in case someone else have comments but feel free to post your ssd1351 patches if you have them already, just note in the cover letter that depend on this patch-set. -- Best regards, Javier Martinez Canillas Core Platforms Red Hat