Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2226720ybd; Thu, 27 Jun 2019 08:50:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqwIgVzmkLUbW9SzqrKes0ziaQhJ/uW4CtpDSD6Zi8VaTMZBdoujTXcGalGjwODSki1qtxxW X-Received: by 2002:a17:902:6848:: with SMTP id f8mr5473982pln.102.1561650605681; Thu, 27 Jun 2019 08:50:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561650605; cv=none; d=google.com; s=arc-20160816; b=a47+kH/Zo64pa/2AUAsfEfsHOLIPcyaX12l3ZVTePAK7sy/6eoxgSw+M2nh8FoX4/u QQzyKj6W6UN5zp80VmsqRmrB5ra84vVljcglPQ4J6A+xnoDwK0c16XcPweCFaggWXc46 9KwvnTRxjroZ315o469C2KZXtGeKWyyp4TcU/xZVm4X/t+2lBtYsSU9He59Jhsmk5YQq g/600UXLi01XpulKGnZuV/mzi9A6y+A2JoMWBqpR+YDi6qGMJJlk4EJVO4BysKhxPEfE B1saYm/DWtZYx2jb4EzO6/DGy3cUg+6o3JSFWnq5mhyCNohCHGn/ot3jz4F3D823euUP I6yg== 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=44Mu8dUj9L0ids6Sb6CWNDIoEklnO4VYTdbwKc4aKyc=; b=WCL7hmQr4NLgo3T3HzlHZEkcjVdXSSHyzv+mJc2FcV0YmKrNkGkKpeTwwMBWs/feJ3 CYe4D7ej7tj/XVW7iSZNFzmk/06I/nORU5r5RAzWSc/efHG1GlS+Xb3omrvkhRyboHzy Ycy3/W+bcMwNVyRPp3Pl9ODB0iSlmUhVH9TO7JdIHjgdHfgzv7HdG4TAnHdT45UxCmgl oNb6iiXpxOYh2Bzws8D05pTt1t82fvPmQBdkpLrGLZbQYv5Z4+LxhWHAmRxIsIYIQxaR 6I0Lwmq1FLouhTJxNl0RN5OrjYQ4jeUTh/G+FHTMxvizeZtvl+U7tQIp9hHpRiFjfhSl 2kaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LnfYL9dE; 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 f5si2398108pgq.564.2019.06.27.08.49.50; Thu, 27 Jun 2019 08:50:05 -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=LnfYL9dE; 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 S1726543AbfF0PtZ (ORCPT + 99 others); Thu, 27 Jun 2019 11:49:25 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:39926 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726502AbfF0PtZ (ORCPT ); Thu, 27 Jun 2019 11:49:25 -0400 Received: by mail-wr1-f65.google.com with SMTP id x4so3149507wrt.6 for ; Thu, 27 Jun 2019 08:49:24 -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=44Mu8dUj9L0ids6Sb6CWNDIoEklnO4VYTdbwKc4aKyc=; b=LnfYL9dENRWp68RK7vG0qlql3IoqqpP/rxklMtbkkjRQYXe39yb7G4ucSqJIgltNt4 XhSr8NGEnd2Oag74G7xFEbVqtPwuaPpyHD7J8B2GHjzh5DiKFrDPFdQORgv1maS6vjcs KX41MbperZUATOEY2X29oQFxm0MvGxCKGw93sVcHgSpilZHjtAGxOU+uYwlvdQe81hqr evEnE2CcXdGYVoFT8OFTIqPE+AmdmGtIK7Av7XSSfUnuWJANIeqDkkMDeqwFFAPVW6mq CfALUOifrtw7WkfXULktuWj6djEi59osVSAET/syisCCbdFgO44iRn+3Cay10GR1smxJ l81A== 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=44Mu8dUj9L0ids6Sb6CWNDIoEklnO4VYTdbwKc4aKyc=; b=fMziKMHBtRxWdwm9HnSktqTgsJQN0nfu2ChTimPeOJ1DLIiwKAz1DDC4j/bfLL5QyF LI1R2mWgGdE1kV4wTeB7iUw1gGO5ze+YOo3bwMT5RTIwhvAEI+V4/R71vTCT10RNfWYL dgujGz8TR7MXvg+n92Yp3nPvQrh6kbRHGcQ8+jPEzl7K1GkTzcuz3dpNX0MVl4STV5+p z9VA03Lm1hEmZvFqAl0t4UCQcNkapaZbhMG6pzCdGg7wnqwNrh+MHHmbFh29sUYF2oDx nJoCT1f/uaLK9RO9fO8KcAoztPHDeqhK8YV2o54uczifWmFDiBVgsTm/grLTMyqPzhe+ iVCQ== X-Gm-Message-State: APjAAAXhRaOPekV8Z7QpQzohUFTCh/nh1GrA4qJBjQT5g1H/HkgyJqv3 gF9agiFDx5vZnoAr80ZZiOFU4g== X-Received: by 2002:adf:afe8:: with SMTP id y40mr3651106wrd.328.1561650563346; Thu, 27 Jun 2019 08:49:23 -0700 (PDT) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id 35sm3904679wrj.87.2019.06.27.08.49.22 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 27 Jun 2019 08:49:22 -0700 (PDT) Date: Thu, 27 Jun 2019 16:49:20 +0100 From: Daniel Thompson To: Lee Jones Cc: Matthias Kaehlcke , Thierry Reding , Jingoo Han , Bartlomiej Zolnierkiewicz , linux-pwm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Enric Balletbo i Serra , Douglas Anderson , Brian Norris , Pavel Machek , Jacek Anaszewski Subject: Re: [PATCH 3/4] backlight: pwm_bl: Set scale type for CIE 1931 curves Message-ID: <20190627154920.aucjtaguatd5yd4m@holly.lan> References: <20190613194326.180889-1-mka@chromium.org> <20190613194326.180889-4-mka@chromium.org> <61ed137c-31bb-c695-4174-0484fe667d6c@linaro.org> <20190627092453.GB2000@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190627092453.GB2000@dell> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 27, 2019 at 10:24:53AM +0100, Lee Jones wrote: > On Fri, 21 Jun 2019, Daniel Thompson wrote: > > > On 13/06/2019 20:43, Matthias Kaehlcke wrote: > > > For backlight curves calculated with the CIE 1931 algorithm set > > > the brightness scale type property accordingly. This makes the > > > scale type available to userspace via the 'scale' sysfs attribute. > > > > > > Signed-off-by: Matthias Kaehlcke > > > > I'd like to keep discussion on patch 2 open a bit longer (it's not part of > > the thread below patch 2 but Pavel had concerns about the sysfs interface) > > so this ack won't really push things forward but FWIW: > > > > Acked-by: Daniel Thompson > > Does this depend on patch 2, or is it orthogonal? IIRC it depends on patch 2 (since that't what introduces props.scale ). Daniel. > > > > --- > > > drivers/video/backlight/pwm_bl.c | 5 ++++- > > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c > > > index fb45f866b923..f067fe7aa35d 100644 > > > --- a/drivers/video/backlight/pwm_bl.c > > > +++ b/drivers/video/backlight/pwm_bl.c > > > @@ -553,6 +553,8 @@ static int pwm_backlight_probe(struct platform_device *pdev) > > > goto err_alloc; > > > } > > > + memset(&props, 0, sizeof(struct backlight_properties)); > > > + > > > if (data->levels) { > > > /* > > > * For the DT case, only when brightness levels is defined > > > @@ -591,6 +593,8 @@ static int pwm_backlight_probe(struct platform_device *pdev) > > > pb->levels = data->levels; > > > } > > > + > > > + props.scale = BACKLIGHT_SCALE_CIE1931; > > > } else { > > > /* > > > * That only happens for the non-DT case, where platform data > > > @@ -601,7 +605,6 @@ static int pwm_backlight_probe(struct platform_device *pdev) > > > pb->lth_brightness = data->lth_brightness * (state.period / pb->scale); > > > - memset(&props, 0, sizeof(struct backlight_properties)); > > > props.type = BACKLIGHT_RAW; > > > props.max_brightness = data->max_brightness; > > > bl = backlight_device_register(dev_name(&pdev->dev), &pdev->dev, pb, > > > > > > > -- > Lee Jones [李琼斯] > Linaro Services Technical Lead > Linaro.org │ Open source software for ARM SoCs > Follow Linaro: Facebook | Twitter | Blog