Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4199549ybp; Mon, 14 Oct 2019 00:30:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxv8nLr+el36TiCXBZ6uUtFNmyYNv3IasUG1LV7iJ4GDL+Zc61kplE0PK1BIN6pGaibPWR+ X-Received: by 2002:a50:f742:: with SMTP id j2mr26522555edn.253.1571038206137; Mon, 14 Oct 2019 00:30:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571038206; cv=none; d=google.com; s=arc-20160816; b=uTqAzEVwLfG0FGmKx6lmDoa8iLo+1pW91awTC+SNJri1Swp2Ul1mk4sY8FIHVGXBWw f+mLsqSq3zgULri2yYYMx+ZD3AJEgK94cb30JvMD/gkbx13++s1cjHKsMv+h9lCUfkIr VPeoSgBh9Z6skd1w0Ewj2pRJk8Dbbzq9FC13zcgs8HoQlDxepAlB72WUA5UdD0bNK2lK 1o51EfPMwjguv7ZtWZyVuLo96Njfq6RvR/meiJPqvuBr1zT5b1mHBMgE1N0/8VaiiipM GKLAS0a0ZVavgWQRSmobq6w73kGiCaSn0zEnYP7BVtKbYd20nc3UlatQx0Oh+TLvo8iA IcjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Q5BHsZHxaQuBnsC0n/rsVoiaHAm2VXfTTXiC030BJgs=; b=hIJZBGeslUg7jRtyMud+2INK/sGp9uBJ0Q/r9NKeZkrXj0WFsQhyFXLkhvwZfM5Gc8 WcjfpJedAaBqrtkdmVNe2XYbLBbPam9ggZu84gXXGQ7czq8qcmhCbNdOCtD9oLxIplTO c9V0fLuYhlnylzJATgFdA+/F0cJ247vtBrhWn9TVlQLwSQ6UUNB3wBTPEn0WUZpwEo+f aJDJ6A5WC69DfFnkHBRK7ZmePdlbHIg8To1IY3bMylnfGQcgKauBMNzwUN2/c+/+Bffk uBy0hvTns5Vz4ZGyjKSeExruy0PAWvaBtrKFxEbZG/ZoodriKRU2ayTElAqBPGtqf3MO x6SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="K8uBglN/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gf9si10685251ejb.230.2019.10.14.00.29.42; Mon, 14 Oct 2019 00:30:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="K8uBglN/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730421AbfJNH1v (ORCPT + 99 others); Mon, 14 Oct 2019 03:27:51 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40668 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730279AbfJNH1v (ORCPT ); Mon, 14 Oct 2019 03:27:51 -0400 Received: by mail-wr1-f65.google.com with SMTP id h4so18379914wrv.7 for ; Mon, 14 Oct 2019 00:27:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Q5BHsZHxaQuBnsC0n/rsVoiaHAm2VXfTTXiC030BJgs=; b=K8uBglN/gYVEhhG9uvD0jxpL+kBC7VMC3W6M/I1GYQtLwoF+9PBzncmew5ihD7lRR/ TNfGGegf5VdqF1Bz+s6k/sVm2IVvUeOPyQsiHPQ0px5gkz9Rd9s6Pm6s0Rnl8GdvL1pt sCt23Tm3/dh+zeCrWdDNF2Mxmt3Ok4iwrRpVu3+vJCEi4yulCnHktAiOkCRJjIFBcq9m eKdm5Op2XTuFc4d0ys4Jqpxa6y1uZlSo9BAgkCq7WwhELcX0kF2OB+OB+k7UhSEjrxU+ QrLa9LQ8Urk0ltRsYf74NGzLUvIPrvWYHhtlZuuLXN7ZVXrtxOxZGzYVJ4z+xf+D/Q6m CMQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=Q5BHsZHxaQuBnsC0n/rsVoiaHAm2VXfTTXiC030BJgs=; b=PW8Z/wE0sRgk/VbMiuctPPiUSWjMgfRa+Ijnvo9XvWLGs0OL0Tx8fwuOV8z1BpGRzP YvwNuEHkbJ65pDPPEYKz9QW6Yb67kr3OE9lk1vsho6GsD+d2zG69DDS2D7aI6p+Zn5Ks AnHUxI0H8DzMKgPkOCT/VM0losQMamlysJ8j6jVUDe/fVD37hJZoIJDEg7wZTHEsfCj7 BMPZmToqyhuFFMhcEj8N3+KhP6EsoKnJbj0Q46zSCNDCzNj46ROhB15kLDGcgbey9iQb UViQN4rXGpgWCzHsEN371wCe96qNQj/1gypNswOfK8P1AIPqeoVwcoZgk+qp1E6y2WQc V0GQ== X-Gm-Message-State: APjAAAWyCVgCrke2PLPioQspG6z9zAiLNz0zl8fNy0er8Tv99CnEPQC7 Y8uscrsfpRhZA68fXjxMyOl5vg== X-Received: by 2002:a5d:540d:: with SMTP id g13mr20624080wrv.8.1571038067578; Mon, 14 Oct 2019 00:27:47 -0700 (PDT) Received: from dell ([2.27.167.11]) by smtp.gmail.com with ESMTPSA id n3sm7073653wrr.50.2019.10.14.00.27.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Oct 2019 00:27:47 -0700 (PDT) Date: Mon, 14 Oct 2019 08:27:45 +0100 From: Lee Jones To: Rasmus Villemoes Cc: Thierry Reding , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , 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 Subject: Re: [PATCH v2 4/4] backlight: pwm_bl: switch to power-of-2 base for fixed-point math Message-ID: <20191014072745.GH4545@dell> References: <20191008120327.24208-1-linux@rasmusvillemoes.dk> <20191008120327.24208-5-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191008120327.24208-5-linux@rasmusvillemoes.dk> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 08 Oct 2019, Rasmus Villemoes wrote: > Using a power-of-2 instead of power-of-10 base makes the computations > much cheaper. 2^16 is safe; retval never becomes more than 2^48 + > 2^32/2. On a 32 bit platform, the very expensive 64/32 division at the > end of cie1931() instead becomes essentially free (a shift by 32 is > just a register rename). > > Reviewed-by: Daniel Thompson > Signed-off-by: Rasmus Villemoes > --- > drivers/video/backlight/pwm_bl.c | 22 ++++++++++++---------- > 1 file changed, 12 insertions(+), 10 deletions(-) Applied, thanks. -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog