From patchwork Tue Oct 8 12:03:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 11179475 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 14F9315AB for ; Tue, 8 Oct 2019 12:05:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E9E6B206C2 for ; Tue, 8 Oct 2019 12:05:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=rasmusvillemoes.dk header.i=@rasmusvillemoes.dk header.b="AponybTx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730819AbfJHMFR (ORCPT ); Tue, 8 Oct 2019 08:05:17 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:42825 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730332AbfJHMFR (ORCPT ); Tue, 8 Oct 2019 08:05:17 -0400 Received: by mail-lf1-f68.google.com with SMTP id c195so11743317lfg.9 for ; Tue, 08 Oct 2019 05:05:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yIqqIP3EIw1WUky7Dl5KboQRqFaypkEePxm8k0rEc9o=; b=AponybTxAeH4Qwys7uf32YeqpoJ78jgDddTlKOmqmCAlexPcNn8x24ajVQ+O7+xRkR RuBT096o6RaBaaTnFRhKPGbBnK69SeSdi0jX5VxETzV8yWF+FlbeSjLE8LtoSz+LXe/9 1SJ01i6mDKGlRWpaglFSkyprM69Ur66rByxaU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yIqqIP3EIw1WUky7Dl5KboQRqFaypkEePxm8k0rEc9o=; b=RjwTfmHEJn8GkI0DxCoIGIZF8tpBmi6Iut8pnfaQmLbI85huRrWNsXRqw1Z1XfyepX 19BJJSy80vbjoEvEqWRBQ6f2hPULsRvabKhLq6ps/DP6W2Uvex18K/fPform7kemmX78 ZjtAO0ViZ/kpg55o8DU16SlCrxojR2OUX+ix5mvPqzq4aJS/D04LV6s0FL3dCVa8knuP BvwKHDYIVyD2mtOlxykOgRYZNnGTxg2KnhtVm4R3JaSNK5qTvGBQrXbMibk7GX7rpX5w K1uhjUP6gbWRETZyArXp5EPXKCEeC8jurKZnA0E+VVKbzZzMS47GZgFowkJTUFM5ACJs d/1A== X-Gm-Message-State: APjAAAVOGFVbSmfBk26c3Cn4iQHSTgY8NmF9CoMT75FgLO9BWHZ9QAmq eESAxdcgUI1ShxA9FyGmHmniZw== X-Google-Smtp-Source: APXvYqykeLmJ/WUhlQxva8zZaqPikrZhQ2ld9WnisNftyHunM8rSa4gXa55Lqcwffs1sdJgebXd04g== X-Received: by 2002:a19:ec16:: with SMTP id b22mr20438594lfa.189.1570536316077; Tue, 08 Oct 2019 05:05:16 -0700 (PDT) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id z18sm3918033ljh.17.2019.10.08.05.05.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2019 05:05:15 -0700 (PDT) From: Rasmus Villemoes To: Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6n?= =?utf-8?q?ig?= , Lee Jones , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz , linux-pwm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Rasmus Villemoes Subject: [PATCH v2 0/4] backlight: pwm_bl: optimizations and small fix for cie1913 Date: Tue, 8 Oct 2019 14:03:23 +0200 Message-Id: <20191008120327.24208-1-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org These patches optimize the cie1913() implementation by using fewer 64 bit divisions and multiplications. It also contains a minor fix for the linear constant used. v2: - Drop patch 5. - Fix thinko in patch 4, otherwise no code change. - Better changelog in patch 3. - Add Daniel's Reviewed-By to the four patches. Daniel, I took the liberty of adding your R-B to patch 4 despite changing it a little to fix a thinko - I should add 1<<31 and not 1<<15. Please tell me if that was inappropriate. Rasmus Villemoes (4): backlight: pwm_bl: fix cie1913 comments and constant backlight: pwm_bl: eliminate a 64/32 division backlight: pwm_bl: drop use of int_pow() backlight: pwm_bl: switch to power-of-2 base for fixed-point math drivers/video/backlight/pwm_bl.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-)