Re: [PATCH] backlight: pwm_bl: Avoid backlight flicker if backlight control GPIO is input

2021-07-21 Thread Daniel Thompson
On Tue, Jul 20, 2021 at 10:28:32PM +0200, Marek Vasut wrote: > On 7/19/21 1:22 PM, Daniel Thompson wrote: > > On Sun, Jul 18, 2021 at 11:14:15PM +0200, Marek Vasut wrote: > > > If the backlight enable GPIO is configured as input, the driver currently > > > unconditionall

Re: [PATCH] backlight: pwm_bl: Avoid backlight flicker if backlight control GPIO is input

2021-07-21 Thread Daniel Thompson
On Wed, Jul 21, 2021 at 05:09:57PM +0200, Marek Vasut wrote: > On 7/21/21 12:49 PM, Daniel Thompson wrote: > > > I'm not sure that's correct, we can simply say that any new uses of the > > > pwm-backlight should specify the initial GPIO configuration, and for the >

Re: [PATCH] backlight: pwm_bl: Avoid backlight flicker if backlight control GPIO is input

2021-07-21 Thread Daniel Thompson
On Wed, Jul 21, 2021 at 05:09:57PM +0200, Marek Vasut wrote: > On 7/21/21 12:49 PM, Daniel Thompson wrote: > > > > However, on the basis of making things less fragile, I think the > > > > underlying problem here is the assumption that it is safe to modify > > >

Re: [PATCH] backlight: pwm_bl: Avoid backlight flicker if backlight control GPIO is input

2021-07-22 Thread Daniel Thompson
On Wed, Jul 21, 2021 at 08:46:42PM +0200, Marek Vasut wrote: > On 7/21/21 6:12 PM, Daniel Thompson wrote: > > On Wed, Jul 21, 2021 at 05:09:57PM +0200, Marek Vasut wrote: > > > On 7/21/21 12:49 PM, Daniel Thompson wrote: > > > > > I'm not sure that's corr

[PATCH] backlight: pwm_bl: Improve bootloader/kernel device handover

2021-07-22 Thread Daniel Thompson
also risks flickers). Fix this by moving the code to configure the GPIO output mode until after we have examines the handover state. That allows us to initialize enable_gpio to off if the backlight is currently off and on if the backlight is on. Reported-by: Marek Vasut Signed-off-by: Daniel Th

[PATCH v2] backlight: pwm_bl: Improve bootloader/kernel device handover

2021-07-22 Thread Daniel Thompson
also risks flickers). Fix this by moving the code to configure the GPIO output mode until after we have examines the handover state. That allows us to initialize enable_gpio to off if the backlight is currently off and on if the backlight is on. Reported-by: Marek Vasut Signed-off-by: Daniel Th

Re: [PATCH] backlight: pwm_bl: Avoid backlight flicker if backlight control GPIO is input

2021-07-23 Thread Daniel Thompson
On Thu, Jul 22, 2021 at 09:02:04PM +0200, Marek Vasut wrote: > On 7/22/21 1:28 PM, Daniel Thompson wrote: > > On Wed, Jul 21, 2021 at 08:46:42PM +0200, Marek Vasut wrote: > > > On 7/21/21 6:12 PM, Daniel Thompson wrote: > > > > On Wed, Jul 21, 2021 at 05:09

[PATCH v3] backlight: pwm_bl: Improve bootloader/kernel device handover

2021-07-23 Thread Daniel Thompson
about how pwm_bl inherits the initial state established by the bootloader (or by power-on reset if the bootloader doesn't do anything to the backlight). Let's take this chance to document the four handover cases. Reported-by: Marek Vasut Signed-off-by: Daniel Thompson Cc: sta...@v

Re: [PATCH] backlight: pwm_bl: Avoid backlight flicker if backlight control GPIO is input

2021-07-23 Thread Daniel Thompson
On Fri, Jul 23, 2021 at 11:15:10AM +0100, Daniel Thompson wrote: > On Thu, Jul 22, 2021 at 09:02:04PM +0200, Marek Vasut wrote: > > On 7/22/21 1:28 PM, Daniel Thompson wrote: > > > On Wed, Jul 21, 2021 at 08:46:42PM +0200, Marek Vasut wrote: > > > > On 7/21/21

Re: [RESEND PATCH v6 4/4] backlight: rt4831: Adds support for Richtek RT4831 backlight

2021-04-26 Thread Daniel Thompson
On Mon, Apr 26, 2021 at 03:18:11PM +0800, cy_huang wrote: > From: ChiYuan Huang > > Adds support for Richtek RT4831 backlight. > > Signed-off-by: ChiYuan Huang > Reviewed-by: Daniel Thompson > --- > Resend this v6 patch series to loop devicetree reviewers. >

Re: [v2 2/2] backlight: Add DisplayPort aux backlight driver

2021-04-26 Thread Daniel Thompson
On Sat, Apr 24, 2021 at 03:25:04AM +0530, Rajeev Nandan wrote: > Add backlight driver for the panels supporting backlight control > using DPCD registers on the DisplayPort aux channel. > > Changes in v2: > - New (most of the code reused from drm_dp_aux_backlight.c of v1) Did you respond to Jani's

Re: [RESEND PATCH v6 4/4] backlight: rt4831: Adds support for Richtek RT4831 backlight

2021-04-26 Thread Daniel Thompson
On Mon, Apr 26, 2021 at 06:50:15PM +0800, ChiYuan Huang wrote: > Hi, > > Daniel Thompson 於 2021年4月26日 週一 下午6:19寫道: > > > > On Mon, Apr 26, 2021 at 03:18:11PM +0800, cy_huang wrote: > > > From: ChiYuan Huang > > > > > > Adds support for Ric

Re: [led-backlight] default-brightness-level issue

2021-04-29 Thread Daniel Thompson
On Fri, Apr 23, 2021 at 01:04:23PM +, pgeiem wrote: > Dear all, > > On a custom board I have a simple DPI panel. Panel's backlight is > drive with an I2C led driver (PCA9632). led-backlight driver is sued > to manage this as a backlight. > > When using brightness-levels and default-brightness

Re: [led-backlight] default-brightness-level issue

2021-04-29 Thread Daniel Thompson
On Thu, Apr 29, 2021 at 11:31:20AM +, pgeiem wrote: > On Thursday, April 29, 2021 1:00 PM, Daniel Thompson > wrote: > > > On Fri, Apr 23, 2021 at 01:04:23PM +, pgeiem wrote: > > > > > Dear all, > > > On a custom board I have a simple DPI panel. P

Re: [PATCH] backlight: qcom-wled: Use sink_addr for sync toggle

2021-03-15 Thread Daniel Thompson
Shamoun > Signed-off-by: Konrad Dybcio > Signed-off-by: Marijn Suijten LGTM, although an acked-by from Kiran would be nice to have: Reviewed-by: Daniel Thompson Daniel. > --- > drivers/video/backlight/qcom-wled.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >

Re: [PATCH 2/2] backlight: ktd253: Support KTD259

2021-03-22 Thread Daniel Thompson
On Sun, Mar 21, 2021 at 12:43:41PM +0100, Linus Walleij wrote: > The KTD259 works just like KTD253 so add this compatible > to the driver. > > Signed-off-by: Linus Walleij Oh no... there's more of them ;-) . Reviewed-by: Daniel Thompson Daniel. > --- > drivers

Re: [PATCH 1/2] dt-bindings: backlight: Add Kinetic KTD259 bindings

2021-03-22 Thread Daniel Thompson
On Sun, Mar 21, 2021 at 12:43:40PM +0100, Linus Walleij wrote: > The KTD259 is just a newer version of the KTD253 and works > all the same. > > Signed-off-by: Linus Walleij (For Lee) Acked-by: Daniel Thompson Daniel. > --- > .../bindings/leds/backlight/kinetic,ktd253

Re: [PATCH 1/2] dt-bindings: leds: backlight: qcom-wled: Add PMI8994 compatible

2021-03-22 Thread Daniel Thompson
On Sun, Feb 28, 2021 at 01:41:04PM +0100, Konrad Dybcio wrote: > Document the newly added PMI8994 compatible. > > Signed-off-by: Konrad Dybcio (For Lee) Acked-by: Daniel Thompson Daniel. > --- > Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml | 1 + >

Re: [PATCH 2/2] video: backlight: qcom-wled: Add PMI8994 compatible

2021-03-22 Thread Daniel Thompson
On Sun, Feb 28, 2021 at 01:41:05PM +0100, Konrad Dybcio wrote: > Add a compatible for PMI8994 WLED. It uses the V4 of WLED IP. > > Signed-off-by: Konrad Dybcio Reviewed-by: Daniel Thompson Daniel. > --- > drivers/video/backlight/qcom-wled.c | 1 + > 1 file ch

Re: [PATCH] backlight: journada720: fix Wmisleading-indentation warning

2021-03-23 Thread Daniel Thompson
c0d17 ("backlight: Adds HP Jornada 700 series backlight driver") > Signed-off-by: Arnd Bergmann I'm dubious that the re-indent matches the original authors intent... but it certainly does match what was actually written and tested so on that basis: Reviewed-by: Daniel Thompson

Re: [PATCH 2/2] video: backlight: qcom-wled: Add PMI8994 compatible

2021-03-23 Thread Daniel Thompson
On Tue, Mar 23, 2021 at 08:39:35AM +, Lee Jones wrote: > On Mon, 22 Mar 2021, Daniel Thompson wrote: > > > On Sun, Feb 28, 2021 at 01:41:05PM +0100, Konrad Dybcio wrote: > > > Add a compatible for PMI8994 WLED. It uses the V4 of WLED IP. > > > >

Re: [PATCH v5 5/6] backlight: rt4831: Adds support for Richtek RT4831 backlight

2021-03-25 Thread Daniel Thompson
On Thu, Dec 17, 2020 at 11:00:43PM +0800, cy_huang wrote: > From: ChiYuan Huang > > Adds support for Richtek RT4831 backlight. > > Signed-off-by: ChiYuan Huang Looks ok but there are a few minor niggles. > --- > drivers/video/backlight/Kconfig| 8 ++ > drivers/video/backlight/Ma

Re: [PATCH v5 5/6] backlight: rt4831: Adds support for Richtek RT4831 backlight

2021-03-25 Thread Daniel Thompson
On Thu, Mar 25, 2021 at 04:22:11PM +0800, ChiYuan Huang wrote: > Dear reviewers: > >Didn't get any response about this backlight patch. > Is there any part need to be refined? Thanks for the reminders and sorry for the delay. Have just replied to the original message! Daniel. __

Re: [PATCH v6 4/4] backlight: rt4831: Adds support for Richtek RT4831 backlight

2021-03-29 Thread Daniel Thompson
It's common used to drive the display WLED. There're four channels Nitpicking but I was expecting the original typo be converted to "commonly". With that addressed: Reviewed-by: Daniel Thompson Daniel. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v6 2/4] backlight: rt4831: Adds DT binding document for Richtek RT4831 backlight

2021-03-29 Thread Daniel Thompson
On Sun, Mar 28, 2021 at 11:24:17PM +0800, cy_huang wrote: > From: ChiYuan Huang > > Adds DT binding document for Richtek RT4831 backlight. > > Signed-off-by: ChiYuan Huang Reviewed-by: Daniel Thompson ___ dri-devel mailing

Re: [PATCH -next] backlight: backlight: Use DEFINE_MUTEX() for mutex lock

2021-04-06 Thread Daniel Thompson
backlight_class->dev_groups = bl_device_groups; > backlight_class->pm = &backlight_class_dev_pm_ops; > INIT_LIST_HEAD(&backlight_dev_list); > - mutex_init(&backlight_dev_list_mutex); > BLOCKING_INIT_NOTIFIER_HEAD(&backlight_notifier); On Mon, 4 Jan 2021

Re: [PATCH] backlight: pcf50633: pdata may be a null pointer, null pointer dereference cause crash

2021-02-02 Thread Daniel Thompson
On Mon, Feb 01, 2021 at 08:41:38AM -0600, Wenjia Zhao wrote: > Signed-off-by: Wenjia Zhao There should be a patch description here explaining why the patch is needed and how it works. > --- > drivers/video/backlight/pcf50633-backlight.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [PATCH] backlight: pcf50633: pdata may be a null pointer, null pointer dereference cause crash

2021-02-03 Thread Daniel Thompson
plementing unused and untested special cases that they would have to reason about. Daniel. > > Daniel Thompson 于2021年2月2日周二 上午3:25写道: > > > On Mon, Feb 01, 2021 at 08:41:38AM -0600, Wenjia Zhao wrote: > > > Signed-off-by: Wenjia Zhao > > > > There should be

Re: [PATCH] backlight: ktd253: Bring up in a known state

2021-02-05 Thread Daniel Thompson
ly avoided. Therefore, slightly grudgingly, Reviewed-by: Daniel Thompson Daniel. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH V1 1/2] backlight: qcom-wled: Fix FSC update issue for WLED5

2021-02-24 Thread Daniel Thompson
On Wed, Feb 24, 2021 at 09:20:47AM +0530, Kiran Gunda wrote: > Currently, for WLED5, after FSC register update MOD_SYNC_BIT > is toggled instead of SYNC_BIT. MOD_SYNC_BIT has to be toggled > after the brightness update and SYNC_BIT has to be toggled after > FSC update for WLED5. Fix it. Code looks

Re: [PATCH V1 2/2] backlight: qcom-wled: Correct the sync_toggle sequence

2021-02-24 Thread Daniel Thompson
On Wed, Feb 24, 2021 at 09:20:48AM +0530, Kiran Gunda wrote: > Currently the FSC SYNC_BIT and MOD_SYNC_BIT are toggled > from 1 to 0 to update the FSC and brightenss settings. > Change this sequence form 0 to 1 as per the hardware team > recommendation to update the FSC and brightness correctly. A

Re: [PATCH V2 1/2] backlight: qcom-wled: Fix FSC update issue for WLED5

2021-02-26 Thread Daniel Thompson
s > update. For an FSC update we need to toggle the SYNC bits instead. > > Fix it by adopting the common wled3_sync_toggle() for WLED5 and > introducing new code to the brightness update path to compensate. > > Signed-off-by: Kiran Gunda Reviewed-by: Daniel Thompson Daniel.

Re: [PATCH V2 2/2] backlight: qcom-wled: Correct the sync_toggle sequence

2021-02-26 Thread Daniel Thompson
On Fri, Feb 26, 2021 at 05:42:24PM +0530, Kiran Gunda wrote: > As per the current implementation, after FSC (Full Scale Current) > and brightness update the sync bits are transitioned from 1 to 0. This still seems to incorrectly describe the current behaviour. Surely in most cases (i.e. every tim

Re: [PATCH V2 2/2] backlight: qcom-wled: Correct the sync_toggle sequence

2021-03-01 Thread Daniel Thompson
On Mon, Mar 01, 2021 at 02:15:12PM +0530, kgu...@codeaurora.org wrote: > On 2021-02-26 22:56, Daniel Thompson wrote: > > On Fri, Feb 26, 2021 at 05:42:24PM +0530, Kiran Gunda wrote: > > > As per the current implementation, after FSC (Full Scale Current) > > > and brig

Re: [PATCH V3 2/2] backlight: qcom-wled: Correct the sync_toggle sequence

2021-03-01 Thread Daniel Thompson
ous register state. > > Signed-off-by: Kiran Gunda With one of each of the changes proposed above: Reviewed-by: Daniel Thompson Daniel. > --- > drivers/video/backlight/qcom-wled.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/dr

Re: [PATCH] drm/nouveau/kms/nve4-nv108: Limit cursors to 128x128

2021-03-08 Thread Daniel Thompson
my way to this patch, which fixed the problem for me. Mine is an Armv8 system but there is nothing particularly exotic from a graphics card or software point of view: Debian bullseye/wayland (gnome-shell 3.38.3, mesa-20.3.4) running on a GT-710. However FWIW: Tested-by: Daniel Thompson Danie

Re: [PATCH v1 1/1] backlight: lm3630a_bl: Put fwnode in error case during ->probe()

2021-05-13 Thread Daniel Thompson
upport") > Cc: Brian Masney > Cc: Dan Murphy > Signed-off-by: Andy Shevchenko Reviewed-by: Daniel Thompson > --- > drivers/video/backlight/lm3630a_bl.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/video/backlight/lm3630a_bl.c

Re: [PATCH] backlight: Remove leading spaces in Kconfig

2021-05-17 Thread Daniel Thompson
On Mon, May 17, 2021 at 11:58:39AM +0200, Juerg Haefliger wrote: > Remove leading spaces before tabs in Kconfig file(s) by running the > following command: > > $ find drivers/video/backlight -name 'Kconfig*' | \ > xargs sed -r -i 's/^[ ]+\t/\t/' > > Signed-off-by: Juerg Haefliger > --- >

Re: [PATCH v2] backlight: Kconfig whitespace and indentation cleanups

2021-05-19 Thread Daniel Thompson
On Wed, May 19, 2021 at 01:03:00PM +0200, Juerg Haefliger wrote: > Remove leading whitespaces, replace multi spaces with tabs, and fix help > text indentation. > > Signed-off-by: Juerg Haefliger Reviewed-by: Daniel Thompson Daniel. > --- > drivers/video/back

Re: [PATCH] video: backlight: Only set maximum brightness for gpio-backlight

2021-07-09 Thread Daniel Thompson
helper in > backlight.c") > Signed-off-by: Marek Vasut > Cc: Daniel Thompson > Cc: Meghana Madhyastha > Cc: Noralf Trønnes > Cc: Sean Paul > Cc: Thierry Reding I have to admit that this patch really does makes it clear just how nasty the hack in of_find_backlight() cu

Re: [PATCH] video: backlight: Drop maximum brightness override for brightness zero

2021-07-12 Thread Daniel Thompson
e we need to make sure the Fixes: tag doesn't provoke regressions in v4.19. Is this the syntax appropriate? Cc: # 5.4+ Cc: # 4.19.x: ec665b756e6f7: backlight: gpio-backlight: Correct initial power state handling > > Signed-off-by: Marek Vasut > > Cc: Daniel Thompson &

Re: [PATCH] backlight: pwm_bl: Avoid backlight flicker if backlight control GPIO is input

2021-07-19 Thread Daniel Thompson
d-off-by: Marek Vasut > Cc: Christian Gmeiner > Cc: Daniel Thompson > Cc: Heiko Stuebner > Cc: Philipp Zabel > Cc: Thierry Reding > Cc: linux-...@vger.kernel.org > Cc: linux-fb...@vger.kernel.org > To: dri-devel@lists.freedesktop.org > --- > NOTE: I think this wh

Re: [PATCH v3] MAINTAINERS: add Dan Murphy as TI LP8xxx drivers maintainer

2020-11-03 Thread Daniel Thompson
; > Dear Lee, > > Could you take care about this patch? Just in case Lee wants it: Acked-by: Daniel Thompson Daniel. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] backlight: replace usage of found with dedicated list iterator variable

2022-03-24 Thread Daniel Thompson
e.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=ehreask5sqxpwr9y7k9sa6cwx...@mail.gmail.com/ > Signed-off-by: Jakob Koschel Reviewed-by: Daniel Thompson Daniel.

Re: [Kgdb-bugreport] [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-03 Thread Daniel Thompson
On Thu, Mar 03, 2022 at 03:26:57PM +0800, Xiaomeng Tong wrote: > On Thu, 3 Mar 2022 04:58:23 +, David Laight wrote: > > on 3 Mar 2022 10:27:29 +0800, Xiaomeng Tong wrote: > > > The problem is the mis-use of iterator outside the loop on exit, and > > > the iterator will be the HEAD's container_o

Re: [PATCH] backlight: backlight: Slighly simplify devm_of_find_backlight()

2022-03-08 Thread Daniel Thompson
le at it, remove a useless test in devm_backlight_release(). 'data' is > known to be not NULL when this function is called. > > Signed-off-by: Christophe JAILLET Reviewed-by: Daniel Thompson Daniel.

Re: [PATCH] backlight: propagate errors from get_brightness()

2021-09-07 Thread Daniel Thompson
On Mon, Sep 06, 2021 at 11:55:25PM +0200, Thomas Weißschuh wrote: > backlight.h documents "struct backlight_ops->get_brightness()" to return > a negative errno on failure. > So far these errors have not been handled in the backlight core. > This leads to negative values being exposed through sysfs

Re: [PATCH v2] backlight: propagate errors from get_brightness()

2021-09-07 Thread Daniel Thompson
ing exposed through sysfs although only > positive values are documented to be reported. > > Signed-off-by: Thomas Weißschuh Reviewed-by: Daniel Thompson > --- > > v1: > https://lore.kernel.org/dri-devel/20210906215525.15418-1-li...@weissschuh.net/ > > v1 -&

Re: [PATCH 1/2] backlight: bd6107: Make use of the helper function dev_err_probe()

2021-09-17 Thread Daniel Thompson
On Fri, Sep 17, 2021 at 11:13:06AM +0800, Cai Huoqing wrote: > When possible use dev_err_probe help to properly deal with the > PROBE_DEFER error, the benefit is that DEFER issue will be logged > in the devices_deferred debugfs file. > Using dev_err_probe() can reduce code size, and the error value

Re: [PATCH 1/2] backlight: bd6107: Make use of the helper function dev_err_probe()

2021-09-17 Thread Daniel Thompson
On Fri, Sep 17, 2021 at 07:05:28PM +0800, Cai Huoqing wrote: > Hi > Thanks for your feedback. > On 17 9月 21 10:17:29, Daniel Thompson wrote: > > On Fri, Sep 17, 2021 at 11:13:06AM +0800, Cai Huoqing wrote: > > > When possible use dev_err_probe help to properly deal with the

Re: [PATCH v2] video: backlight: Make use of the helper function dev_err_probe()

2021-09-17 Thread Daniel Thompson
On Fri, Sep 17, 2021 at 08:53:23PM +0800, Cai Huoqing wrote: > When possible use dev_err_probe help to properly deal with the > PROBE_DEFER error, the benefit is that DEFER issue will be logged > in the devices_deferred debugfs file. > Using dev_err_probe() can reduce code size, and the error value

Re: [PATCH] backlight: hx8357: Add SPI device ID table

2021-09-27 Thread Daniel Thompson
On Wed, Sep 22, 2021 at 04:10:14PM +0100, Mark Brown wrote: > Currently autoloading for SPI devices does not use the DT ID table, it uses > SPI modalises. Supporting OF modalises is going to be difficult if not > impractical, an attempt was made but has been reverted, so ensure that > module autolo

Re: [PATCH] backlight: hx8357: Add SPI device ID table

2021-09-27 Thread Daniel Thompson
On Mon, Sep 27, 2021 at 12:47:27PM +0100, Mark Brown wrote: > On Mon, Sep 27, 2021 at 10:42:00AM +0100, Daniel Thompson wrote: > > > Based on this I had expected to find spi_get_device_id() and a ->driver_data > > somewhere in this patch. > > > Where will this .dri

Re: [PATCH] backlight: hx8357: Add SPI device ID table

2021-10-01 Thread Daniel Thompson
On Mon, Sep 27, 2021 at 02:30:56PM +0100, Mark Brown wrote: > On Mon, Sep 27, 2021 at 02:24:17PM +0100, Daniel Thompson wrote: > > > In that case what is the point of including unconsumed driver data? Most > > DT centric drivers that included this for modalias reasons leave it &

Re: [PATCH 01/10] backlight: qcom-wled: Pass number of elements to read to read_u32_array

2021-10-05 Thread Daniel Thompson
ten > Reviewed-by: AngeloGioacchino Del Regno > Reviewed-by: Daniel Thompson > --- > drivers/video/backlight/qcom-wled.c | 13 ++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > > diff --git a/drivers/video/backlight/qcom-wled.c > b/drivers/video

Re: [PATCH 02/10] backlight: qcom-wled: Use cpu_to_le16 macro to perform conversion

2021-10-05 Thread Daniel Thompson
chino Del Regno > Reviewed-by: Daniel Thompson > --- > drivers/video/backlight/qcom-wled.c | 25 +++-- > 1 file changed, 11 insertions(+), 14 deletions(-) > > diff --git a/drivers/video/backlight/qcom-wled.c > b/drivers/video/backlight/qcom-wled.c > index 6a

Re: [PATCH 04/10] backlight: qcom-wled: Validate enabled string indices in DT

2021-10-05 Thread Daniel Thompson
On Mon, Oct 04, 2021 at 09:27:35PM +0200, Marijn Suijten wrote: > The strings passed in DT may possibly cause out-of-bounds register > accesses and should be validated before use. > > Fixes: 775d2ffb4af6 ("backlight: qcom-wled: Restructure the driver for WLED3") The first half of this patch actua

Re: [PATCH 05/10] backlight: qcom-wled: Fix off-by-one maximum with default num_strings

2021-10-05 Thread Daniel Thompson
On Mon, Oct 04, 2021 at 09:27:36PM +0200, Marijn Suijten wrote: > When not specifying num-strings in the DT the default is used, but +1 is > added to it which turns wled3 into 4 and wled4/5 into 5 strings instead > of 3 and 4 respectively, causing out of bounds reads and register > read/writes. Th

Re: [PATCH 06/10] backlight: qcom-wled: Remove unnecessary 4th default string in wled3

2021-10-05 Thread Daniel Thompson
; not mapped to the desired purpose. > Removing this value gets rid of undesired confusion and avoids the > possibility of accessing registers at this offset even if the 4th array > element is used by accident. > > Signed-off-by: Marijn Suijten > Reviewed-by: AngeloGioacchino Del

Re: [PATCH 07/10] backlight: qcom-wled: Provide enabled_strings default for wled 4 and 5

2021-10-05 Thread Daniel Thompson
ed, resuling in every string-specific register write > (currently only the setup and config functions, brightness follows in a > future patch) to only configure the zero'th string multiple times. > > Signed-off-by: Marijn Suijten > Reviewed-by: AngeloGioacchino Del Regno > Reviewed-by: Daniel Thompson

Re: [PATCH 08/10] backlight: qcom-wled: Remove unnecessary double whitespace

2021-10-05 Thread Daniel Thompson
> Reviewed-by: Daniel Thompson

Re: [PATCH 09/10] backlight: qcom-wled: Consistently use enabled-strings in set_brightness

2021-10-05 Thread Daniel Thompson
On Mon, Oct 04, 2021 at 09:27:40PM +0200, Marijn Suijten wrote: > The hardware is capable of controlling any non-contiguous sequence of > LEDs specified in the DT using qcom,enabled-strings as u32 > array, and this also follows from the DT-bindings documentation. The > numbers specified in this ar

Re: [PATCH 03/10] backlight: qcom-wled: Override num-strings when enabled-strings is set

2021-10-05 Thread Daniel Thompson
> and how many strings to enable. > > Fixes: 775d2ffb4af6 ("backlight: qcom-wled: Restructure the driver for WLED3") > Signed-off-by: Marijn Suijten > Reviewed-by: AngeloGioacchino Del Regno > Reviewed-by: Daniel Thompson

Re: [PATCH 05/10] backlight: qcom-wled: Fix off-by-one maximum with default num_strings

2021-10-05 Thread Daniel Thompson
On Tue, Oct 05, 2021 at 12:06:06PM +0200, Marijn Suijten wrote: > On 2021-10-05 10:19:47, Daniel Thompson wrote: > > On Mon, Oct 04, 2021 at 09:27:36PM +0200, Marijn Suijten wrote: > > > When not specifying num-strings in the DT the default is used, but +1 is > > > ad

Re: [PATCH 04/10] backlight: qcom-wled: Validate enabled string indices in DT

2021-10-05 Thread Daniel Thompson
On Tue, Oct 05, 2021 at 12:03:50PM +0200, Marijn Suijten wrote: > On 2021-10-05 10:14:52, Daniel Thompson wrote: > > On Mon, Oct 04, 2021 at 09:27:35PM +0200, Marijn Suijten wrote: > > > The strings passed in DT may possibly cause out-of-bounds register > > > acces

Re: [PATCH 05/10] backlight: qcom-wled: Fix off-by-one maximum with default num_strings

2021-10-05 Thread Daniel Thompson
On Tue, Oct 05, 2021 at 11:38:43AM +0100, Daniel Thompson wrote: > On Tue, Oct 05, 2021 at 12:06:06PM +0200, Marijn Suijten wrote: > > On 2021-10-05 10:19:47, Daniel Thompson wrote: > > > On Mon, Oct 04, 2021 at 09:27:36PM +0200, Marijn Suijten wrote: > > > > When not

Re: [PATCH 05/10] backlight: qcom-wled: Fix off-by-one maximum with default num_strings

2021-10-05 Thread Daniel Thompson
On Tue, Oct 05, 2021 at 01:44:35PM +0200, Marijn Suijten wrote: > On 2021-10-05 11:53:12, Daniel Thompson wrote: > > On Tue, Oct 05, 2021 at 11:38:43AM +0100, Daniel Thompson wrote: > > > On Tue, Oct 05, 2021 at 12:06:06PM +0200, Marijn Suijten wrote: > > > >

Re: [PATCH 05/10] backlight: qcom-wled: Fix off-by-one maximum with default num_strings

2021-10-05 Thread Daniel Thompson
On Tue, Oct 05, 2021 at 05:23:26PM +0200, Marijn Suijten wrote: > On 2021-10-05 15:03:49, Daniel Thompson wrote: > [..] > > > At that point one might ask why qcom,num_strings remains at all when > > > DT can use qcom,enabled_strings instead. We will supposedly have

Re: [PATCH 05/10] backlight: qcom-wled: Fix off-by-one maximum with default num_strings

2021-10-06 Thread Daniel Thompson
On Tue, Oct 05, 2021 at 07:34:00PM +0200, Marijn Suijten wrote: > On 2021-10-05 17:24:53, Daniel Thompson wrote: > > On Tue, Oct 05, 2021 at 05:23:26PM +0200, Marijn Suijten wrote: > > > Since there don't seem to be any substantial platforms/PMICs using this > > > f

Re: [PATCH 24/31] video: backlight: changing LED_* from enum led_brightness to actual value

2022-01-21 Thread Daniel Thompson
On Fri, Jan 21, 2022 at 01:54:29PM -0300, Luiz Sampaio wrote: > The enum led_brightness, which contains the declaration of LED_OFF, > LED_ON, LED_HALF and LED_FULL is obsolete, as the led class now supports > max_brightness. Reviewed-by: Daniel Thompson BTW it looks like this patch mi

[PATCH] drm/msm: Remove spurious IRQF_ONESHOT flags from dsi & hdmi

2022-01-27 Thread Daniel Thompson
MPT_RT kernels (and avoid calling any kernel API that uses regular spinlocks). Fix this by removing the spurious additional flag. This change is required for my Snapdragon 7cx Gen2 tablet to boot-to-GUI with PREEMPT_RT enabled. Signed-off-by: Daniel Thompson --- Notes: Just in case any

[PATCH v2 0/2] drm/msm: Remove spurious IRQF_ONESHOT flags from dsi & hdmi

2022-02-01 Thread Daniel Thompson
nges in v2: - Split into separate patches (Dmitry B) Daniel Thompson (2): drm/msm/dsi: Remove spurious IRQF_ONESHOT flag drm/msm/hdmi: Remove spurious IRQF_ONESHOT flag drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- drivers/gpu/drm/msm/hdmi/hdmi.c| 2 +- 2 files changed, 2 insertions(+), 2

[PATCH v2 2/2] drm/msm/hdmi: Remove spurious IRQF_ONESHOT flag

2022-02-01 Thread Daniel Thompson
nlock API for locking (in msm_hdmi_hdcp_irq() ). Neither of these APIs can be called from no-thread interrupt handlers on PREEMPT_RT systems. Fix this by removing IRQF_ONESHOT. Signed-off-by: Daniel Thompson --- drivers/gpu/drm/msm/hdmi/hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v2 1/2] drm/msm/dsi: Remove spurious IRQF_ONESHOT flag

2022-02-01 Thread Daniel Thompson
MPT_RT kernels (and avoid calling any kernel API that uses regular spinlocks). Fix this by removing the spurious additional flag. This change is required for my Snapdragon 7cx Gen2 tablet to boot-to-GUI with PREEMPT_RT enabled. Signed-off-by: Daniel Thompson --- drivers/gpu/drm/msm/dsi/dsi_host.c

[PATCH v3] drm/cma-helper: Describe what a "contiguous chunk" actually means

2022-02-01 Thread Daniel Thompson
elevant function pointers ;-) ). Improve the kernel doc comments accordingly. Signed-off-by: Daniel Thompson --- Notes: Changes in v3: - Rebased on v5.17-rc2 - Minor improvements to wording. Changes in v2: - Oops. I did a final proof read and acidentally committed these

Re: [PATCH] backlight: led_bl: Add support for an "enable" GPIO

2021-11-02 Thread Daniel Thompson
On Tue, Nov 02, 2021 at 10:04:55AM +, Corentin LABBE wrote: > From: Jean-Jacques Hiblot > > This patch adds support for an "enable GPIO". Before taking this kind of change is there a good reason why backlight should manage the GPIO? I thought that the LED subsystem was a sub system for LEDs

Re: [PATCH] backlight: led_bl: Add support for an "enable" GPIO

2021-11-02 Thread Daniel Thompson
On Tue, Nov 02, 2021 at 11:19:42AM +, Daniel Thompson wrote: > On Tue, Nov 02, 2021 at 10:04:55AM +, Corentin LABBE wrote: > > From: Jean-Jacques Hiblot > > > > This patch adds support for an "enable GPIO". > > Before taking this kind of change

Re: [PATCH 3/3] backlight: lp855x: Add support ACPI enumeration

2021-11-02 Thread Daniel Thompson
On Mon, Nov 01, 2021 at 07:55:17PM +0100, Hans de Goede wrote: > The Xiaomi Mi Pad 2 tablet uses an ACPI enumerated LP8556 backlight > controller for its LCD-panel, with a Xiaomi specific ACPI HID of > "XMCC0001", add support for this. > > Note the new "if (id)" check also fixes a NULL pointer der

Re: [PATCH 2/3] backlight: lp855x: Add dev helper variable to lp855x_probe()

2021-11-02 Thread Daniel Thompson
ing -EPROBE_DEFER errors for us. > > This is mostly a preparation for adding ACPI enumeration support which > will use the new "dev" variable more. > > Signed-off-by: Hans de Goede Reviewed-by: Daniel Thompson Daniel.

Re: [PATCH 1/3] backlight: lp855x: Move device_config setting out of lp855x_configure()

2021-11-02 Thread Daniel Thompson
g ACPI enumeration support. > > Signed-off-by: Hans de Goede Reviewed-by: Daniel Thompson Daniel.

Re: [PATCH v4] backlight: lp855x: Switch to atomic PWM API

2021-11-02 Thread Daniel Thompson
On Mon, Nov 01, 2021 at 10:19:21AM -0300, Maíra Canal wrote: > Remove legacy PWM interface (pwm_config, pwm_enable, pwm_disable) and > replace it for the atomic PWM API. > > Signed-off-by: Maíra Canal > --- > V1 -> V2: Initialize variable and simply conditional loop > V2 -> V3: Fix assignment of

Re: [PATCH v2 3/3] backlight: lp855x: Add support ACPI enumeration

2021-11-03 Thread Daniel Thompson
ot; check also fixes a NULL pointer deref when a user > tries to manually bind the driver from sysfs. > > When CONFIG_ACPI is disabled acpi_match_device() will always return NULL, > so the lp855x_parse_acpi() call will get optimized away. > > Signed-off-by: Hans de Goede Reviewed-by: Daniel Thompson Daniel.

Re: [PATCH v2 3/3] backlight: lp855x: Add support ACPI enumeration

2021-11-03 Thread Daniel Thompson
On Wed, Nov 03, 2021 at 06:28:15PM +0100, Hans de Goede wrote: > Hi, > > On 11/3/21 18:17, Daniel Thompson wrote: > > On Tue, Nov 02, 2021 at 11:55:04PM +0100, Hans de Goede wrote: > >> The Xiaomi Mi Pad 2 tablet uses an ACPI enumerated LP8556 backlight > >> con

Re: [PATCH v6] backlight: lp855x: Switch to atomic PWM API

2021-11-05 Thread Daniel Thompson
On Thu, Nov 04, 2021 at 02:58:38PM -0300, Maíra Canal wrote: > Remove legacy PWM interface (pwm_config, pwm_enable, pwm_disable) and > replace it for the atomic PWM API. > > Signed-off-by: Maíra Canal Reviewed-by: Daniel Thompson Daniel.

Re: [RESEND PATCH v2 01/13] backlight: qcom-wled: Validate enabled string indices in DT

2021-11-12 Thread Daniel Thompson
ed-off-by: Marijn Suijten > Reviewed-by: AngeloGioacchino Del Regno > Reviewed-by: Daniel Thompson Daniel.

Re: [RESEND PATCH v2 04/13] backlight: qcom-wled: Fix off-by-one maximum with default num_strings

2021-11-12 Thread Daniel Thompson
On Fri, Nov 12, 2021 at 01:26:57AM +0100, Marijn Suijten wrote: > When not specifying num-strings in the DT the default is used, but +1 is > added to it which turns WLED3 into 4 and WLED4/5 into 5 strings instead > of 3 and 4 respectively, causing out-of-bounds reads and register > read/writes. Th

Re: [RESEND PATCH v2 05/13] backlight: qcom-wled: Override default length with qcom,enabled-strings

2021-11-12 Thread Daniel Thompson
On Fri, Nov 12, 2021 at 01:26:58AM +0100, Marijn Suijten wrote: > The length of qcom,enabled-strings as property array is enough to > determine the number of strings to be enabled, without needing to set > qcom,num-strings to override the default number of strings when less > than the default (whic

Re: [RESEND PATCH v2 09/13] backlight: qcom-wled: Respect enabled-strings in set_brightness

2021-11-12 Thread Daniel Thompson
s on a different set of strings. > > Fixes: 775d2ffb4af6 ("backlight: qcom-wled: Restructure the driver for WLED3") > Fixes: 03b2b5e86986 ("backlight: qcom-wled: Add support for WLED4 peripheral") > Signed-off-by: Marijn Suijten > Reviewed-by: AngeloGioacchino Del Regno > Reviewed-by: Daniel Thompson Daniel.

Re: [RESEND PATCH v2 04/13] backlight: qcom-wled: Fix off-by-one maximum with default num_strings

2021-11-12 Thread Daniel Thompson
On Fri, Nov 12, 2021 at 01:35:01PM +0100, Marijn Suijten wrote: > On 2021-11-12 12:08:39, Daniel Thompson wrote: > > On Fri, Nov 12, 2021 at 01:26:57AM +0100, Marijn Suijten wrote: > > > + if (string_len > 0) { > > > + dev_warn(dev, "qcom,

Re: [RESEND PATCH v2 05/13] backlight: qcom-wled: Override default length with qcom,enabled-strings

2021-11-12 Thread Daniel Thompson
On Fri, Nov 12, 2021 at 01:45:22PM +0100, Marijn Suijten wrote: > On 2021-11-12 12:12:38, Daniel Thompson wrote: > > On Fri, Nov 12, 2021 at 01:26:58AM +0100, Marijn Suijten wrote: > > > The length of qcom,enabled-strings as property array is enough to > > > determine

Re: [RESEND PATCH v2 05/13] backlight: qcom-wled: Override default length with qcom,enabled-strings

2021-11-12 Thread Daniel Thompson
On Fri, Nov 12, 2021 at 03:19:17PM +0100, Marijn Suijten wrote: > On 2021-11-12 13:23:36, Daniel Thompson wrote: > > On Fri, Nov 12, 2021 at 01:45:22PM +0100, Marijn Suijten wrote: > > > On 2021-11-12 12:12:38, Daniel Thompson wrote: > > > > On Fri, Nov 12, 2021 at 01

Re: [RESEND PATCH v2 04/13] backlight: qcom-wled: Fix off-by-one maximum with default num_strings

2021-11-15 Thread Daniel Thompson
On Fri, Nov 12, 2021 at 10:43:37PM +0100, Marijn Suijten wrote: > On 2021-11-12 13:35:03, Marijn Suijten wrote: > > On 2021-11-12 12:08:39, Daniel Thompson wrote: > > > On Fri, Nov 12, 2021 at 01:26:57AM +0100, Marijn Suijten wrote: > > > > When not specifying num-st

Re: [PATCH] backlight: ili922x: fix kernel-doc warnings & notation

2021-11-15 Thread Daniel Thompson
return value of > 'ili922x_write' > ili922x.c:353: warning: No description found for return value of > 'ili922x_poweron' > ili922x.c:382: warning: No description found for return value of > 'ili922x_poweroff' > > Fixes: 4cfbfa971478 ("vide

Re: [PATCH v2] backlight: ili922x: fix kernel-doc warnings & notation

2021-11-16 Thread Daniel Thompson
return value of > 'ili922x_write' > ili922x.c:353: warning: No description found for return value of > 'ili922x_poweron' > ili922x.c:382: warning: No description found for return value of > 'ili922x_poweroff' > > Fixes: 4cfbfa971478 ("vide

Re: [PATCH v3 3/9] backlight: qcom-wled: Use cpu_to_le16 macro to perform conversion

2021-11-16 Thread Daniel Thompson
chino Del Regno > Reviewed-by: Daniel Thompson Daniel.

Re: [PATCH v3 4/9] backlight: qcom-wled: Fix off-by-one maximum with default num_strings

2021-11-16 Thread Daniel Thompson
fixed read of > four elements from that array (has been addressed in a prior patch) by > setting a lower num-strings where desired. > > Fixes: 93c64f1ea1e8 ("leds: add Qualcomm PM8941 WLED driver") > Signed-off-by: Marijn Suijten > Reviewed-By: AngeloGioacchino Del Regno > Reviewed-by: Daniel Thompson Daniel.

Re: [PATCH v3 5/9] backlight: qcom-wled: Override default length with qcom,enabled-strings

2021-11-16 Thread Daniel Thompson
e of strings is needed (the majority of the cases), or to only set > qcom,enabled-strings when a specific set of indices is desired. > > Fixes: 775d2ffb4af6 ("backlight: qcom-wled: Restructure the driver for WLED3") > Signed-off-by: Marijn Suijten > Reviewed-by: AngeloGi

Re: [PATCH v3 0/9] backlight: qcom-wled: fix and solidify handling of enabled-strings

2021-11-16 Thread Daniel Thompson
Hi Lee On Mon, Nov 15, 2021 at 09:34:50PM +0100, Marijn Suijten wrote: > This patchset fixes WLED's handling of enabled-strings: besides some > cleanup it is now actually possible to specify a non-contiguous array of > enabled strings (not necessarily starting at zero) and the values from > DT are

Re: [PATCH -next] backlight: sky81452-backlight: convert comma to semicolon

2020-12-14 Thread Daniel Thompson
On Mon, Dec 14, 2020 at 09:34:58PM +0800, Zheng Yongjun wrote: > Replace a comma between expression statements by a semicolon. > > Signed-off-by: Zheng Yongjun Weird! I guess it was harmless but still seriously weird ;-) Reviewed-by: Daniel Thompson Thanks! > --- > drivers/

Re: [PATCH -next] video: backlight: use DEFINE_MUTEX (and mutex_init() had been too late)

2021-01-04 Thread Daniel Thompson
On Wed, Dec 23, 2020 at 10:10:35PM +0800, Zheng Yongjun wrote: > Signed-off-by: Zheng Yongjun Can you explain the Subject for this patch in more detail? If this patch is required to correct a bug then it looks to me like it is incomplete. Daniel. > --- > drivers/video/backlight/backlight.c

  1   2   3   4   5   6   7   8   >