Re: [PATCH v2 11/14] drm/bridge: ti-sn65dsi86: Power things properly for reading the EDID

2021-04-06 Thread Andrzej Hajda
M Andrzej Hajda wrote: >> >> W dniu 31.03.2021 o 16:48, Doug Anderson pisze: >>> Hi, >>> >>> On Wed, Mar 31, 2021 at 4:08 AM Andrzej Hajda wrote: >>>> W dniu 30.03.2021 o 04:53, Douglas Anderson pisze: >>>>> eDP panels won't provid

Re: [PATCH v2 11/14] drm/bridge: ti-sn65dsi86: Power things properly for reading the EDID

2021-04-01 Thread Andrzej Hajda
W dniu 31.03.2021 o 16:48, Doug Anderson pisze: > Hi, > > On Wed, Mar 31, 2021 at 4:08 AM Andrzej Hajda wrote: >> >> W dniu 30.03.2021 o 04:53, Douglas Anderson pisze: >>> eDP panels won't provide their EDID unless they're powered on. Let's >>> c

Re: [PATCH v2 11/14] drm/bridge: ti-sn65dsi86: Power things properly for reading the EDID

2021-03-31 Thread Andrzej Hajda
W dniu 30.03.2021 o 04:53, Douglas Anderson pisze: > eDP panels won't provide their EDID unless they're powered on. Let's > chain a power-on before we read the EDID. This roughly matches what > was done in 'parade-ps8640.c'. > > NOTE: The old code attempted to call pm_runtime_get_sync() before >

Re: [PATCH v2 10/14] drm/bridge: ti-sn65dsi86: Stop caching the EDID ourselves

2021-03-31 Thread Andrzej Hajda
W dniu 30.03.2021 o 04:53, Douglas Anderson pisze: > Now that we have the patch ("drm/edid: Use the cached EDID in > drm_get_edid() if eDP") we no longer need to maintain our own > cache. Drop this code. > > Signed-off-by: Douglas Anderson Reviewed-by: Andrze

Re: [PATCH v2 08/14] drm/bridge: ti-sn65dsi86: Remove extra call: drm_connector_update_edid_property()

2021-03-31 Thread Andrzej Hajda
ned-off-by: Douglas Anderson Reviewed-by: Andrzej Hajda Regards Andrzej > --- > > (no changes since v1) > > drivers/gpu/drm/bridge/ti-sn65dsi86.c | 11 --- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.

Re: [PATCH v2 07/14] drm/bridge: ti-sn65dsi86: Get rid of the useless detect() function

2021-03-31 Thread Andrzej Hajda
W dniu 30.03.2021 o 04:53, Douglas Anderson pisze: > If we just leave the detect() function as NULL then the upper layers > assume we're always connected. There's no reason for a stub. > > Signed-off-by: Douglas Anderson Reviewed-by: Andrzej Hajda Regards Andrzej > --- > &

Re: [PATCH v2 06/14] drm/bridge: ti-sn65dsi86: Move drm_panel_unprepare() to post_disable()

2021-03-31 Thread Andrzej Hajda
f again) > when reading the EDID. > > Signed-off-by: Douglas Anderson Reviewed-by: Andrzej Hajda Regards Andrzej > --- > > (no changes since v1) > > drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/dr

Re: [PATCH v2 05/14] drm/bridge: ti-sn65dsi86: Move MIPI detach() / unregister() to detach()

2021-03-31 Thread Andrzej Hajda
W dniu 30.03.2021 o 04:53, Douglas Anderson pisze: > The register() / attach() for MIPI happen in the bridge's > attach(). That means that the inverse belongs in the bridge's > detach(). As I commented in previous patch, it would be better to fix mipi/bridge registration order in host and

Re: [PATCH v2 04/14] drm/bridge: ti-sn65dsi86: Reorder remove()

2021-03-31 Thread Andrzej Hajda
t; + kfree(pdata->edid); > + > + ti_sn_debugfs_remove(pdata); > + > drm_bridge_remove(>bridge); > > + pm_runtime_disable(pdata->dev); > + > + of_node_put(pdata->host_node); > + Looks good. Reviewed-by: Andrzej Hajda Regards Andrzej > return 0; > } >

Re: [PATCH v2 03/14] drm/bridge: ti-sn65dsi86: Remove incorrectly tagged kerneldoc comment

2021-03-31 Thread Andrzej Hajda
W dniu 30.03.2021 o 04:53, Douglas Anderson pisze: > A random comment inside a function had "/**" in front of it. That > doesn't make sense. Remove. > > Signed-off-by: Douglas Anderson Reviewed-by: Andrzej Hajda Regards Andrzej > --- > > (no changes since v1)

Re: [PATCH v2 02/14] drm/bridge: ti-sn65dsi86: Simplify refclk handling

2021-03-31 Thread Andrzej Hajda
re/unprepare. Let's make use of this to simplify > things a tiny bit. > > Signed-off-by: Douglas Anderson > Reviewed-by: Robert Foss > Reviewed-by: Bjorn Andersson > Reviewed-by: Stephen Boyd > Reviewed-by: Laurent Pinchart Reviewed-by: Andrzej Hajda Regards Andrzej > --

Re: [PATCH v2 01/14] drm/bridge: Fix the stop condition of drm_bridge_chain_pre_enable()

2021-03-31 Thread Andrzej Hajda
> if (iter->funcs->pre_enable) > iter->funcs->pre_enable(iter); > + > + if (iter == bridge) > + break; Looking at the bridge chaining code always makes me sick :) but beside this the change looks cor

Re: [PATCH v1] MAINTAINERS: Update Maintainers of DRM Bridge Drivers

2021-03-24 Thread Andrzej Hajda
bc7=https%3A%2F%2Fgitlab.freedesktop.org%2Ffreedesktop%2Ffreedesktop%2F-%2Fissues%2F338 > > Cc: Neil Armstrong > Cc: Laurent Pinchart > Cc: Jonas Karlman > Cc: Andrzej Hajda > Cc: Jernej Škrabec > Cc: Daniel Vetter > Signed-off-by: Robert Foss Great. Acked-b

Re: [PATCH 2/2] driver core: add helper for deferred probe reason setting

2021-03-22 Thread Andrzej Hajda
W dniu 18.03.2021 o 08:39, Ahmad Fatoum pisze: > We now have three places within the same file doing the same operation > of freeing this pointer and setting it anew. A helper make this > arguably easier to read, so add one. > > Signed-off-by: Ahmad Fatoum Reviewed-by: Andrzej

Re: [PATCH v2 1/2] driver core: clear deferred probe reason on probe retry

2021-03-22 Thread Andrzej Hajda
a misleading probe deferral reason. > > Cc: sta...@kernel.org > Fixes: d090b70ede02 ("driver core: add deferring probe reason to > devices_deferred property") > Reviewed-by: Andy Shevchenko > Signed-off-by: Ahmad Fatoum Reviewed-by: Andrzej Hajda Regards Andrzej

Re: [PATCH] drm/dsi: Add _NO_ to MIPI_DSI_* flags disabling features

2021-02-21 Thread Andrzej Hajda
ff-by: Nicolas Boichat >> This looks good to me, it increases readability. >> >> Reviewed-by: Laurent Pinchart >> >> Please however see the end of the mail for a comment. Reviewed-by: Andrzej Hajda And comment at the end. >> >>> --- >>> I consi

Re: [PATCH] drm/bridge: anx7625: enable DSI EOTP

2021-02-04 Thread Andrzej Hajda
W dniu 04.02.2021 o 13:34, Nicolas Boichat pisze: > On Thu, Feb 4, 2021 at 8:07 PM Robert Foss wrote: >> Hi Xin, >> >> Thanks for the patch. >> >> On Thu, 28 Jan 2021 at 12:17, Xin Ji wrote: >>> Enable DSI EOTP feature for fixing some panel screen constance >>> shift issue. >>> Removing MIPI

Re: [PATCH v6] drm/bridge: add it6505 driver

2021-01-22 Thread Andrzej Hajda
Hi Allen, Sorry for long delay. W dniu 08.12.2020 o 11:58, allen pisze: > This adds support for the iTE IT6505. > This device can convert DPI signal to DP output. > > From: Allen Chen > Signed-off-by: Jitao Shi > Signed-off-by: Pi-Hsun Shih > Signed-off-by: Yilun Lin > Signed-off-by: Hermes

Re: [PATCH RESEND] drm/bridge: tc358764: restore connector support

2020-10-05 Thread Andrzej Hajda
ot;drm/bridge: tc358764: drop drm_connector_(un)register" >> and removal of the calls to drm_panel_attach()/drm_panel_detach(), which >> were no-ops and has been removed in meanwhile. >> >> Signed-off-by: Marek Szyprowski >> Reviewed-by: Andrzej Hajda > Thanks for pr

Re: [PATCH] drm/bridge: tc358764: restore connector support

2020-09-30 Thread Andrzej Hajda
ach(), which > were no-ops and has been removed in meanwhile. > > Signed-off-by: Marek Szyprowski Reviewed-by: Andrzej Hajda Regards Andrzej > --- > As I've reported and Andrzej Hajda pointed, the reverted patches break > operation of the panel on the Arndale board. Noone sug

Re: [RFT 09/10] arm64: dts: exynos: Correct port of USB-C connector node on Exynos5433 TM2

2020-09-02 Thread Andrzej Hajda
USB > connector node. TM2(e) uses Samsung's 11-pin micro USB 2.0 connector, > which has nothing in common with USB Type-C. > > Anyway, this patch breaks DWC3 (tested in Device mode) driver operation, > so something has to be somehow adjusted or fixed. Added CC Andrzej > Hajda, who

Re: [PATCH 2/2] drm/exynos: hdmi: Simplify with dev_err_probe()

2020-08-26 Thread Andrzej Hajda
On 26.08.2020 16:55, Krzysztof Kozlowski wrote: > Common pattern of handling deferred probe can be simplified with > dev_err_probe(). Less code and also it prints the error value. > > Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andrzej Hajda Regards Andrzej

Re: [PATCH 1/2] drm/exynos: dsi: Simplify with dev_err_probe()

2020-08-26 Thread Andrzej Hajda
On 26.08.2020 16:55, Krzysztof Kozlowski wrote: > Common pattern of handling deferred probe can be simplified with > dev_err_probe(). Less code and also it prints the error value. > > Signed-off-by: Krzysztof Kozlowski Reviewed-by: Andrzej Hajda Regards Andrzej

Re: [PATCH v1] driver core: Annotate dev_err_probe() with __must_check

2020-08-26 Thread Andrzej Hajda
Hi Andy, On 26.08.2020 12:44, Andy Shevchenko wrote: > We have got already new users of this API which interpret it differently > and miss the opportunity to optimize their code. > > In order to avoid similar cases in the future, annotate dev_err_probe() > with __must_check. There are many

Re: [PATCH] driver core: Let dev_err_probe() use the symbolic error code

2020-08-11 Thread Andrzej Hajda
> - dev_dbg(dev, "error %d: %pV", err, ); > + dev_dbg(dev, "error %pE: %pV", ERR_PTR(err), ); Apparently I have misread docs about %pE flag. Thanks for spotting this. Reviewed-by: Andrzej Hajda Regards Andrzej > } > > va_end(args);

Re: [PATCH v9 0/4] driver core: add probe error check helper

2020-07-28 Thread Andrzej Hajda
Hi Greg, Apparently the patchset has no more comments. Could you take the patches to your tree? At least 1st and 2nd. Regards Andrzej On 13.07.2020 16:43, Andrzej Hajda wrote: > Hi All, > > Thanks for comments. > > Changes since v8: > - fixed typo in function name, > -

Re: [PATCH] drm/bridge: sil_sii8620: initialize return of sii8620_readb

2020-07-13 Thread Andrzej Hajda
+ b/drivers/gpu/drm/bridge/sil-sii8620.c > @@ -178,7 +178,7 @@ static void sii8620_read_buf(struct sii8620 *ctx, u16 > addr, u8 *buf, int len) > > static u8 sii8620_readb(struct sii8620 *ctx, u16 addr) > { > - u8 ret; > + u8 ret = 0; In theory it sho

[PATCH v9 0/4] driver core: add probe error check helper

2020-07-13 Thread Andrzej Hajda
that this helper can be used in at least 2700 places saving about 3500 lines of code. Regards Andrzej Andrzej Hajda (4): driver core: add device probe log helper driver core: add deferring probe reason to devices_deferred property drm/bridge/sii8620: fix resource acquisition error handling drm

[PATCH v9 2/4] driver core: add deferring probe reason to devices_deferred property

2020-07-13 Thread Andrzej Hajda
with -EPROBE_DEFER instead of printk the message will be attached to a deferred device and printed when user reads devices_deferred property. Signed-off-by: Andrzej Hajda Reviewed-by: Mark Brown Reviewed-by: Javier Martinez Canillas Reviewed-by: Andy Shevchenko Reviewed-by: Rafael J. Wysocki --- v9

[PATCH v9 4/4] drm/bridge: lvds-codec: simplify error handling

2020-07-13 Thread Andrzej Hajda
Using dev_err_probe code has following advantages: - shorter code, - recorded defer probe reason for debugging, - uniform error code logging. Signed-off-by: Andrzej Hajda Reviewed-by: Neil Armstrong --- drivers/gpu/drm/bridge/lvds-codec.c | 10 +++--- 1 file changed, 3 insertions(+), 7

[PATCH v9 3/4] drm/bridge/sii8620: fix resource acquisition error handling

2020-07-13 Thread Andrzej Hajda
In case of error during resource acquisition driver should print error message only in case it is not deferred probe, using dev_err_probe helper solves the issue. Moreover it records defer probe reason for debugging. Signed-off-by: Andrzej Hajda Reviewed-by: Neil Armstrong --- drivers/gpu/drm

[PATCH v9 1/4] driver core: add device probe log helper

2020-07-13 Thread Andrzej Hajda
partially. dev_err_probe helps to replace such code sequences with simple call, so code: if (err != -EPROBE_DEFER) dev_err(dev, ...); return err; becomes: return dev_err_probe(dev, err, ...); Signed-off-by: Andrzej Hajda Reviewed-by: Rafael J. Wysocki Reviewed

[PATCH v8 3/5] drm/bridge/sii8620: fix resource acquisition error handling

2020-07-10 Thread Andrzej Hajda
In case of error during resource acquisition driver should print error message only in case it is not deferred probe, using dev_err_probe helper solves the issue. Moreover it records defer probe reason for debugging. Signed-off-by: Andrzej Hajda Reviewed-by: Neil Armstrong --- drivers/gpu/drm

[PATCH v8 4/5] drm/bridge: lvds-codec: simplify error handling

2020-07-10 Thread Andrzej Hajda
Using dev_err_probe code has following advantages: - shorter code, - recorded defer probe reason for debugging, - uniform error code logging. Signed-off-by: Andrzej Hajda Reviewed-by: Neil Armstrong --- drivers/gpu/drm/bridge/lvds-codec.c | 10 +++--- 1 file changed, 3 insertions(+), 7

[PATCH v8 2/5] driver core: add deferring probe reason to devices_deferred property

2020-07-10 Thread Andrzej Hajda
with -EPROBE_DEFER instead of printk the message will be attached to a deferred device and printed when user reads devices_deferred property. Signed-off-by: Andrzej Hajda Reviewed-by: Mark Brown Reviewed-by: Javier Martinez Canillas Reviewed-by: Andy Shevchenko Reviewed-by: Rafael J. Wysocki --- v8

[PATCH v8 5/5] coccinelle: add script looking for cases where probe__err can be used

2020-07-10 Thread Andrzej Hajda
This is AD-HOC script, it should nt be merged. Signed-off-by: Andrzej Hajda --- probe_err.cocci | 247 1 file changed, 247 insertions(+) create mode 100644 probe_err.cocci diff --git a/probe_err.cocci b/probe_err.cocci new file mode 100644

[PATCH v8 1/5] driver core: add device probe log helper

2020-07-10 Thread Andrzej Hajda
partially. dev_err_probe helps to replace such code sequences with simple call, so code: if (err != -EPROBE_DEFER) dev_err(dev, ...); return err; becomes: return dev_err_probe(dev, err, ...); Signed-off-by: Andrzej Hajda Reviewed-by: Rafael J. Wysocki Reviewed

[PATCH v8 0/5] driver core: add probe error check helper

2020-07-10 Thread Andrzej Hajda
Andrzej Andrzej Hajda (5): driver core: add device probe log helper driver core: add deferring probe reason to devices_deferred property drm/bridge/sii8620: fix resource acquisition error handling drm/bridge: lvds-codec: simplify error handling coccinelle: add script looking for cases

Re: [PATCH v8 2/5] driver core: add deferring probe reason to devices_deferred property

2020-07-10 Thread Andrzej Hajda
On 10.07.2020 15:31, Greg Kroah-Hartman wrote: > On Thu, Jul 02, 2020 at 03:44:21PM +0200, Andrzej Hajda wrote: >> /sys/kernel/debug/devices_deferred property contains list of deferred >> devices. >> This list does not contain reason why the driver deferred probe,

Re: [PATCH v6 2/4] driver core: add deferring probe reason to devices_deferred property

2020-07-10 Thread Andrzej Hajda
On 07.07.2020 06:14, Dmitry Torokhov wrote: > On Thu, Jul 02, 2020 at 08:57:55AM +0200, Andrzej Hajda wrote: >> On 30.06.2020 20:00, Dmitry Torokhov wrote: >>> On Tue, Jun 30, 2020 at 8:42 AM Andrzej Hajda wrote: >>>> On 30.06.2020 10:59, Grygorii Strashko wrote:

Re: [PATCH v7 2/2] display/drm/bridge: TC358775 DSI/LVDS driver

2020-07-10 Thread Andrzej Hajda
3> , again we > need to set it in the bridge tree. > - There is no helper function to get the data-lanes of the DSI The code asks for proper helper, but since there is no such I think it can stay as is. Regards Andrzej > > On Tue, Jul 7, 2020 at 12:15 PM Andrzej Hajda

Re: [PATCH v7 08/36] drm: exynos: fix common struct sg_table related issues

2020-07-07 Thread Andrzej Hajda
On 07.07.2020 11:40, Andrzej Hajda wrote: > On 19.06.2020 12:36, Marek Szyprowski wrote: >> The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function >> returns the number of the created entries in the DMA address space. >> However the subsequent calls to

Re: [PATCH v7 07/36] drm: exynos: use common helper for a scatterlist contiguity check

2020-07-07 Thread Andrzej Hajda
On 07.07.2020 11:35, Andrzej Hajda wrote: > Hi, > > On 19.06.2020 12:36, Marek Szyprowski wrote: >> Use common helper for checking the contiguity of the imported dma-buf. >> >> Signed-off-by: Marek Szyprowski Just fixing my signature :) Reviewed-by: Andrzej Hajda Regards Andrzej

Re: [PATCH v7 01/36] drm: prime: add common helper to check scatterlist contiguity

2020-07-07 Thread Andrzej Hajda
On 07.07.2020 16:30, Andrzej Hajda wrote: > On 19.06.2020 12:36, Marek Szyprowski wrote: >> It is a common operation done by DRM drivers to check the contiguity >> of the DMA-mapped buffer described by a scatterlist in the >> sg_table object. Let's add a common help

Re: [PATCH v7 03/36] drm: core: fix common struct sg_table related issues

2020-07-07 Thread Andrzej Hajda
des references to the > nents and orig_nents entries, making the code robust, easier to follow > and copy/paste safe. > > Signed-off-by: Marek Szyprowski I guess whole patchset can go via drm-misc, after r-b/a-b. Reviewed-by: Andrzej Hajda Regards Andrzej > --- > drivers/gpu

Re: [PATCH v7 02/36] drm: prime: use sgtable iterators in drm_prime_sg_to_page_addr_arrays()

2020-07-07 Thread Andrzej Hajda
sulting code is simple and > easy to understand, so the comment describing the old code is no > longer needed. > > Signed-off-by: Marek Szyprowski Nice simplification. Reviewed-by: Andrzej Hajda Btw, I've wrongly re-configured my e-mail client, so my R-Bs for other patches

Re: [PATCH v7 01/36] drm: prime: add common helper to check scatterlist contiguity

2020-07-07 Thread Andrzej Hajda
On 19.06.2020 12:36, Marek Szyprowski wrote: > It is a common operation done by DRM drivers to check the contiguity > of the DMA-mapped buffer described by a scatterlist in the > sg_table object. Let's add a common helper for this operation. > > Signed-off-by: Marek Szyprowski > --- >

Re: [PATCH v7 08/36] drm: exynos: fix common struct sg_table related issues

2020-07-07 Thread Andrzej Hajda
On 19.06.2020 12:36, Marek Szyprowski wrote: > The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function > returns the number of the created entries in the DMA address space. > However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and > dma_unmap_sg must be called

Re: [PATCH v7 07/36] drm: exynos: use common helper for a scatterlist contiguity check

2020-07-07 Thread Andrzej Hajda
Hi, On 19.06.2020 12:36, Marek Szyprowski wrote: > Use common helper for checking the contiguity of the imported dma-buf. > > Signed-off-by: Marek Szyprowski > --- > drivers/gpu/drm/exynos/exynos_drm_gem.c | 23 +++ > 1 file changed, 3 insertions(+), 20 deletions(-) > >

Re: [PATCH v7 2/2] display/drm/bridge: TC358775 DSI/LVDS driver

2020-07-07 Thread Andrzej Hajda
bles > - check for bus_formats unsupported > - error handling enpoint data-lanes > - Kconfig proper indentation > - GENMASK and FIELD_PREP used > - bus_formats handeld in mode_valid > - MODE_CLOCK_HIGH handled properly > - len initialized > - static function for mode_valid >

[PATCH v8 2/5] driver core: add deferring probe reason to devices_deferred property

2020-07-02 Thread Andrzej Hajda
with -EPROBE_DEFER instead of printk the message will be attached to a deferred device and printed when user reads devices_deferred property. Signed-off-by: Andrzej Hajda Reviewed-by: Mark Brown Reviewed-by: Javier Martinez Canillas Reviewed-by: Andy Shevchenko Reviewed-by: Rafael J. Wysocki --- v8

Re: [PATCH v6 2/4] driver core: add deferring probe reason to devices_deferred property

2020-07-02 Thread Andrzej Hajda
On 30.06.2020 20:00, Dmitry Torokhov wrote: > On Tue, Jun 30, 2020 at 8:42 AM Andrzej Hajda wrote: >> >> On 30.06.2020 10:59, Grygorii Strashko wrote: >>> Hi >>> >>> On 29/06/2020 14:28, Andrzej Hajda wrote: >>>> Hi Grygorii, >>>&

Re: [PATCH v6 2/4] driver core: add deferring probe reason to devices_deferred property

2020-06-30 Thread Andrzej Hajda
On 30.06.2020 10:59, Grygorii Strashko wrote: > Hi > > On 29/06/2020 14:28, Andrzej Hajda wrote: >> Hi Grygorii, >> >> (...) >> >>>>    /* >>>>     * deferred_devs_show() - Show the devices in the deferred probe >>&

Re: [PATCH v7 2/4] driver core: add deferring probe reason to devices_deferred property

2020-06-30 Thread Andrzej Hajda
On 29.06.2020 18:36, Andy Shevchenko wrote: > On Mon, Jun 29, 2020 at 2:22 PM Andrzej Hajda wrote: >> /sys/kernel/debug/devices_deferred property contains list of deferred >> devices. >> This list does not contain reason why the driver deferred probe, the patch >>

Re: [PATCH v6 2/4] driver core: add deferring probe reason to devices_deferred property

2020-06-29 Thread Andrzej Hajda
Hi Grygorii, (...) >>   /* >>    * deferred_devs_show() - Show the devices in the deferred probe >> pending list. >>    */ >> @@ -221,7 +241,8 @@ static int deferred_devs_show(struct seq_file *s, >> void *data) >>   mutex_lock(_probe_mutex); >>     list_for_each_entry(curr,

[PATCH v7 2/4] driver core: add deferring probe reason to devices_deferred property

2020-06-29 Thread Andrzej Hajda
with -EPROBE_DEFER instead of printk the message will be attached to deferred device and printed when user read devices_deferred property. Signed-off-by: Andrzej Hajda Reviewed-by: Mark Brown Reviewed-by: Javier Martinez Canillas Reviewed-by: Andy Shevchenko Reviewed-by: Rafael J. Wysocki --- drivers

[PATCH v7 0/4] driver core: add probe error check helper

2020-06-29 Thread Andrzej Hajda
experience for developers/testers. I have also added two patches showing usage and benefits of the helper. My dirty/ad-hoc cocci scripts shows that this helper can be used in at least 2700 places saving about 3500 lines of code. Regards Andrzej Andrzej Hajda (4): driver core: add device probe

[PATCH v7 3/4] drm/bridge/sii8620: fix resource acquisition error handling

2020-06-29 Thread Andrzej Hajda
In case of error during resource acquisition driver should print error message only in case it is not deferred probe, using dev_err_probe helper solves the issue. Moreover it records defer probe reason for debugging. Signed-off-by: Andrzej Hajda Reviewed-by: Neil Armstrong --- drivers/gpu/drm

[PATCH v7 4/4] drm/bridge: lvds-codec: simplify error handling

2020-06-29 Thread Andrzej Hajda
Using dev_err_probe code has following advantages: - shorter code, - recorded defer probe reason for debugging, - uniform error code logging. Signed-off-by: Andrzej Hajda Reviewed-by: Neil Armstrong --- drivers/gpu/drm/bridge/lvds-codec.c | 10 +++--- 1 file changed, 3 insertions(+), 7

[PATCH v7 1/4] driver core: add device probe log helper

2020-06-29 Thread Andrzej Hajda
partially. dev_err_probe helps to replace such code sequences with simple call, so code: if (err != -EPROBE_DEFER) dev_err(dev, ...); return err; becomes: return dev_err_probe(dev, err, ...); Signed-off-by: Andrzej Hajda Reviewed-by: Rafael J. Wysocki --- drivers

[PATCH v6 3/4] drm/bridge/sii8620: fix resource acquisition error handling

2020-06-26 Thread Andrzej Hajda
In case of error during resource acquisition driver should print error message only in case it is not deferred probe, using dev_err_probe helper solves the issue. Moreover it records defer probe reason for debugging. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/bridge/sil-sii8620.c | 21

[PATCH v6 2/4] driver core: add deferring probe reason to devices_deferred property

2020-06-26 Thread Andrzej Hajda
instead of printk the message will be attached to deferred device and printed when user read devices_deferred property. Signed-off-by: Andrzej Hajda Reviewed-by: Mark Brown Reviewed-by: Javier Martinez Canillas Reviewed-by: Andy Shevchenko --- drivers/base/base.h | 3 +++ drivers/base/core.c

[PATCH v6 4/4] drm/bridge: lvds-codec: simplify error handling

2020-06-26 Thread Andrzej Hajda
Using dev_err_probe code has following advantages: - shorter code, - recorded defer probe reason for debugging, - uniform error code logging. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/bridge/lvds-codec.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git

[PATCH v6 0/4] driver core: add probe error check helper

2020-06-26 Thread Andrzej Hajda
and benefits of the helper. My dirty/ad-hoc cocci scripts shows that this helper can be used in at least 2700 places saving about 3500 lines of code. Regards Andrzej Andrzej Hajda (4): driver core: add device probe log helper driver core: add deferring probe reason to devices_deferred property drm

[PATCH v6 1/4] driver core: add device probe log helper

2020-06-26 Thread Andrzej Hajda
partially. dev_err_probe helps to replace such code sequences with simple call, so code: if (err != -EPROBE_DEFER) dev_err(dev, ...); return err; becomes: return probe_err(dev, err, ...); Signed-off-by: Andrzej Hajda --- drivers/base/core.c| 42

Re: [RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-25 Thread Andrzej Hajda
On 25.06.2020 10:41, Andy Shevchenko wrote: > On Wed, Jun 24, 2020 at 10:40 PM Andrzej Hajda wrote: >> On 24.06.2020 17:16, Robin Murphy wrote: > ... > >> I have proposed such thing in my previous iteration[1], except it was >> macro because of variadic arguments

Re: [RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-24 Thread Andrzej Hajda
On 24.06.2020 17:16, Robin Murphy wrote: > On 2020-06-24 16:04, Mark Brown wrote: >> On Wed, Jun 24, 2020 at 03:25:33PM +0100, Robin Murphy wrote: >> >>> And yeah, anyone who pipes up suggesting that places where an >>> ERR_PTR value >>> could be passed to probe_err() could simply refactor

Re: [RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-24 Thread Andrzej Hajda
On 24.06.2020 14:30, Greg Kroah-Hartman wrote: > On Wed, Jun 24, 2020 at 01:41:25PM +0200, Andrzej Hajda wrote: >> Many resource acquisition functions return error value encapsulated in >> pointer instead of integer value. To simplify coding we can use macro >> which w

Re: [RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-24 Thread Andrzej Hajda
On 24.06.2020 14:14, Rafael J. Wysocki wrote: > On Wed, Jun 24, 2020 at 1:41 PM Andrzej Hajda wrote: >> Many resource acquisition functions return error value encapsulated in >> pointer instead of integer value. To simplify coding we can use macro >> which will accep

Re: [RESEND PATCH v5 1/5] driver core: add probe_err log helper

2020-06-24 Thread Andrzej Hajda
On 24.06.2020 15:23, Laurent Pinchart wrote: > On Wed, Jun 24, 2020 at 02:31:40PM +0200, Greg Kroah-Hartman wrote: >> On Wed, Jun 24, 2020 at 01:41:23PM +0200, Andrzej Hajda wrote: >>> During probe every time driver gets resource it should usually check for >>> er

Re: [RESEND PATCH v5 5/5] drm/bridge: lvds-codec: simplify error handling code

2020-06-24 Thread Andrzej Hajda
On 24.06.2020 15:33, Laurent Pinchart wrote: > Hi Andrzej, > > On Wed, Jun 24, 2020 at 01:41:27PM +0200, Andrzej Hajda wrote: >> Using probe_err code has following advantages: >> - shorter code, >> - recorded defer probe reason for debugging, >> - uniform err

Re: [RESEND PATCH v5 2/5] driver core: add deferring probe reason to devices_deferred property

2020-06-24 Thread Andrzej Hajda
On 24.06.2020 14:11, Rafael J. Wysocki wrote: > On Wed, Jun 24, 2020 at 1:41 PM Andrzej Hajda wrote: >> /sys/kernel/debug/devices_deferred property contains list of deferred >> devices. >> This list does not contain reason why the driver deferred probe, the patch >>

Re: [RESEND PATCH v5 2/5] driver core: add deferring probe reason to devices_deferred property

2020-06-24 Thread Andrzej Hajda
On 24.06.2020 14:34, Greg Kroah-Hartman wrote: > On Wed, Jun 24, 2020 at 01:41:24PM +0200, Andrzej Hajda wrote: >> /sys/kernel/debug/devices_deferred property contains list of deferred >> devices. >> This list does not contain reason why the driver deferred probe,

Re: [RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-24 Thread Andrzej Hajda
On 24.06.2020 14:53, Andy Shevchenko wrote: > On Wed, Jun 24, 2020 at 2:41 PM Andrzej Hajda wrote: >> Many resource acquisition functions return error value encapsulated in >> pointer instead of integer value. To simplify coding we can use macro >> which will accep

[RESEND PATCH v5 1/5] driver core: add probe_err log helper

2020-06-24 Thread Andrzej Hajda
. probe_err helps to replace such code sequences with simple call, so code: if (err != -EPROBE_DEFER) dev_err(dev, ...); return err; becomes: return probe_err(dev, err, ...); Signed-off-by: Andrzej Hajda Reviewed-by: Javier Martinez Canillas Reviewed

[RESEND PATCH v5 5/5] drm/bridge: lvds-codec: simplify error handling code

2020-06-24 Thread Andrzej Hajda
Using probe_err code has following advantages: - shorter code, - recorded defer probe reason for debugging, - uniform error code logging. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/bridge/lvds-codec.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu

[RESEND PATCH v5 4/5] drm/bridge/sii8620: fix resource acquisition error handling

2020-06-24 Thread Andrzej Hajda
In case of error during resource acquisition driver should print error message only in case it is not deferred probe, using probe_err helper solves the issue. Moreover it records defer probe reason for debugging. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/bridge/sil-sii8620.c | 18

[RESEND PATCH v5 3/5] drivers core: allow probe_err accept integer and pointer types

2020-06-24 Thread Andrzej Hajda
), ...) Without loosing old functionality: probe_err(dev, err, ...) Signed-off-by: Andrzej Hajda --- drivers/base/core.c| 25 ++--- include/linux/device.h | 25 - 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/drivers/base/core.c b

[RESEND PATCH v5 2/5] driver core: add deferring probe reason to devices_deferred property

2020-06-24 Thread Andrzej Hajda
instead of printk the message will be attached to deferred device and printed when user read devices_deferred property. Signed-off-by: Andrzej Hajda Reviewed-by: Mark Brown Reviewed-by: Javier Martinez Canillas Reviewed-by: Andy Shevchenko --- drivers/base/base.h | 3 +++ drivers/base/core.c

[RESEND PATCH v5 0/5] driver core: add probe error check helper

2020-06-24 Thread Andrzej Hajda
calls: probe_err(dev, PTR_ERR(ptr), ...) with probe_err(dev, ptr, ...) I have also added two patches showing usage and benefits of the helper. My dirty/ad-hoc cocci scripts shows that this helper can be used in at least 2700 places saving about 3500 lines of code. Regards Andrzej Andrzej

Re: [PATCH v3] driver core: Break infinite loop when deferred probe can't be satisfied

2020-06-09 Thread Andrzej Hajda
On 09.06.2020 14:10, Marco Felsch wrote: > On 20-06-09 11:27, Andrzej Hajda wrote: >> On 09.06.2020 08:45, Marco Felsch wrote: >>> On 20-06-08 13:11, Andrzej Hajda wrote: >>>> On 08.06.2020 11:17, Marco Felsch wrote: >>>>> On 20-03-26 18:31, Andy

Re: [PATCH v3] driver core: Break infinite loop when deferred probe can't be satisfied

2020-06-09 Thread Andrzej Hajda
On 09.06.2020 08:45, Marco Felsch wrote: > On 20-06-08 13:11, Andrzej Hajda wrote: >> On 08.06.2020 11:17, Marco Felsch wrote: >>> On 20-03-26 18:31, Andy Shevchenko wrote: >>>> On Thu, Mar 26, 2020 at 03:01:22PM +, Grant Likely wrote: >>>>&g

Re: [PATCH v3] driver core: Break infinite loop when deferred probe can't be satisfied

2020-06-08 Thread Andrzej Hajda
On 08.06.2020 11:17, Marco Felsch wrote: > On 20-03-26 18:31, Andy Shevchenko wrote: >> On Thu, Mar 26, 2020 at 03:01:22PM +, Grant Likely wrote: >>> On 25/03/2020 12:51, Andy Shevchenko wrote: On Tue, Mar 24, 2020 at 08:29:01PM -0700, Saravana Kannan wrote: > On Tue, Mar 24, 2020

Re: [PATCH 05/11] drm/bridge: analogix-anx78xx: correct value of TX_P0

2019-09-16 Thread Andrzej Hajda
y wrote: >>>> On Mon, Sep 16, 2019 at 12:02:09PM +0200, Andrzej Hajda wrote: >>>>> On 15.08.2019 02:48, Brian Masney wrote: >>>>>> When attempting to configure this driver on a Nexus 5 phone (msm8974), >>>>>> setting up the dummy i2c bus

Re: [RFC][PATCH] drm: kirin: Fix dsi probe/attach logic

2019-09-13 Thread Andrzej Hajda
On 12.09.2019 16:18, Matt Redfearn wrote: > > On 12/09/2019 14:21, Andrzej Hajda wrote: >> On 12.09.2019 04:38, John Stultz wrote: >>> On Wed, Sep 4, 2019 at 3:26 AM Andrzej Hajda wrote: >>>> On 03.09.2019 18:18, John Stultz wrote: >>>>> On

Re: [PATCH 2/3] video: fbdev: mmp: add COMPILE_TEST support

2019-08-20 Thread Andrzej Hajda
On 27.06.2019 16:07, Bartlomiej Zolnierkiewicz wrote: > Add COMPILE_TEST support to mmp display subsystem for better compile > testing coverage. > > Signed-off-by: Bartlomiej Zolnierkiewicz Reviewed-by: Andrzej Hajda  -- Regards Andrzej > --- > drivers/video/fbdev/mmp

Re: [PATCH 00/12] treewide: Fix GENMASK misuses

2019-07-12 Thread Andrzej Hajda
Hi Joe, On 10.07.2019 07:04, Joe Perches wrote: > These GENMASK uses are inverted argument order and the > actual masks produced are incorrect. Fix them. > > Add checkpatch tests to help avoid more misuses too. > > Joe Perches (12): > checkpatch: Add GENMASK tests > clocksource/drivers/npcm:

Re: [PATCH 6/6] media: i2c: Convert to new i2c device probe()

2019-07-12 Thread Andrzej Hajda
; can easily convert them to utilise the simplfied i2c driver > registration. > > Signed-off-by: Kieran Bingham If needed, for S5K5BAF: Acked-by: Andrzej Hajda  -- Regards Andrzej > --- > drivers/media/i2c/adv7343.c | 5 ++--- > drivers/media/i2c/imx274.c | 5 ++--- > dri

Re: [PATCH 4/6] media: i2c: s5c73m3: Convert to new i2c device probe()

2019-07-12 Thread Andrzej Hajda
e can > easily convert it to utilise the simplfied i2c driver registration. > > Signed-off-by: Kieran Bingham Acked-by: Andrzej Hajda  -- Regards Andrzej

Re: [PATCH -next] drm/bridge: sii902x: Make sii902x_audio_digital_mute static

2019-07-04 Thread Andrzej Hajda
On 14.06.2019 17:36, YueHaibing wrote: > Fix sparse warning: > > drivers/gpu/drm/bridge/sii902x.c:665:5: warning: > symbol 'sii902x_audio_digital_mute' was not declared. Should it be static? > > Reported-by: Hulk Robot > Signed-off-by: YueHaibing > --- > drivers/gpu/drm/bridge/sii902x.c | 3

Re: [PATCH v7 1/2] drm/bridge: sil_sii8620: make remote control optional.

2019-07-02 Thread Andrzej Hajda
support in the driver optional and > contingent on RC_CORE being defined. And with this the hard dependency > on INPUT also goes away as that is only needed if RC_CORE is defined > (which in turn already depends on INPUT). > > CC: Inki Dae > CC: Andrzej Hajda > CC: Laurent Pin

Re: [PATCH 2/4] drm/rockchip: Enable DRM InfoFrame support on RK3328 and RK3399

2019-06-24 Thread Andrzej Hajda
On 26.05.2019 23:20, Jonas Karlman wrote: > This patch enables Dynamic Range and Mastering InfoFrame on RK3328 and RK3399. > > Cc: Sandy Huang > Cc: Heiko Stuebner > Signed-off-by: Jonas Karlman Reviewed-by: Andrzej Hajda  -- Regards Andrzej > --- > drivers/gpu

Re: [PATCH v2 3/7] drm/bridge: extract some Analogix I2C DP common code

2019-06-12 Thread Andrzej Hajda
tx.c > b/drivers/gpu/drm/bridge/analogix/analogix-i2c-dptx.c > new file mode 100644 > index ..d6016f789d80 > --- /dev/null > +++ b/drivers/gpu/drm/bridge/analogix/analogix-i2c-dptx.c > @@ -0,0 +1,174 @@ > +/* > + * Copyright(c) 2016, Analogix Semiconduc

Re: [PATCH v4 10/15] drm/bridge: tc358767: Add support for address-only I2C transfers

2019-06-07 Thread Andrzej Hajda
e HW as well. > > Signed-off-by: Andrey Smirnov Reviewed-by: Andrzej Hajda  -- Regards Andrzej > Cc: Andrzej Hajda > Cc: Laurent Pinchart > Cc: Tomi Valkeinen > Cc: Andrey Gusakov > Cc: Philipp Zabel > Cc: Cory Tusar > Cc: Chris Healy > Cc: Lucas Stach > Cc

Re: [PATCH v4 09/15] drm/bridge: tc358767: Use reported AUX transfer size

2019-06-07 Thread Andrzej Hajda
() is pointless (it > will always called after tc_aux_wait_busy()) and there's only one user > of it, inline its code into tc_aux_transfer() instead of trying to > accommodate the change above. > > Signed-off-by: Andrey Smirnov Reviewed-by: Andrzej Hajda  -- Regards Andrzej > Cc: Andrzej Ha

Re: [PATCH v3 06/15] drm/bridge: tc358767: Simplify AUX data read

2019-06-06 Thread Andrzej Hajda
hosts) > 3. Copy read data into user provided array. > > Signed-off-by: Andrey Smirnov > Cc: Archit Taneja > Cc: Andrzej Hajda > Cc: Laurent Pinchart > Cc: Tomi Valkeinen > Cc: Andrey Gusakov > Cc: Philipp Zabel > Cc: Cory Tusar >

Re: [PATCH v3 04/15] drm/bridge: tc358767: Simplify tc_set_video_mode()

2019-06-06 Thread Andrzej Hajda
On 05.06.2019 09:04, Andrey Smirnov wrote: > Simplify tc_set_video_mode() by replacing explicit shifting using > macros from . No functional change intended. > > Signed-off-by: Andrey Smirnov > Cc: Archit Taneja > Cc: Andrzej Hajda > Cc: Laurent Pinchart > Cc: Tomi

Re: [PATCH v2] drm/bridge: Remove duplicate header

2019-05-20 Thread Andrzej Hajda
On 16.05.2019 17:25, Sabyasachi Gupta wrote: > Remove duplicate header which is included twice > > Signed-off-by: Sabyasachi Gupta Queued to drm-misc-next. Regards Andrzej > --- > v2: rebased the code against drm -next and arranged the headers alphabetically > >

Re: [PATCH] drm/bridge/synopsys: dsi: Don't blindly call post_disable

2019-04-25 Thread Andrzej Hajda
On 24.04.2019 16:22, Matt Redfearn wrote: > The DRM documentation states that post_disable is an optional callback. > As such an implementing device may not populate it. To avoid panicing > the kernel by calling a NULL function pointer, we should NULL check it > before blindy calling it. > >

Re: [PATCH] drm/bridge: dw-hdmi: fix SCDC configuration for ddc-i2c-bus

2019-04-25 Thread Andrzej Hajda
On 21.04.2019 10:25, Jonas Karlman wrote: > When ddc-i2c-bus property is used, a NULL pointer dereference is reported: > > [ 31.041669] Unable to handle kernel NULL pointer dereference at virtual > address 0008 > [ 31.041671] pgd = 4d3c16f6 > [ 31.041673] [0008] *pgd= > [

  1   2   3   4   5   6   7   8   9   10   >