[PATCH] drm/bridge: chipone-icn6211: switch to devm_drm_of_get_bridge

2022-02-20 Thread José Expósito
The function "drm_of_find_panel_or_bridge" has been deprecated in favor of "devm_drm_of_get_bridge". Switch to the new function and reduce boilerplate. Signed-off-by: José Expósito --- drivers/gpu/drm/bridge/chipone-icn6211.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff

[PATCH] drm: rcar-du: switch to devm_drm_of_get_bridge

2022-02-20 Thread José Expósito
The function "drm_of_find_panel_or_bridge" has been deprecated in favor of "devm_drm_of_get_bridge". Switch to the new function and reduce boilerplate. Signed-off-by: José Expósito --- drivers/gpu/drm/rcar-du/rcar_lvds.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-)

[PATCH] drm/msm/dp: switch to devm_drm_of_get_bridge

2022-02-20 Thread José Expósito
The function "drm_of_find_panel_or_bridge" has been deprecated in favor of "devm_drm_of_get_bridge". Switch to the new function and reduce boilerplate. Signed-off-by: José Expósito --- drivers/gpu/drm/msm/dp/dp_parser.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff

Re: [PATCH v10 2/4] Documentation/dt: Add descriptions for loongson display controller

2022-02-20 Thread Krzysztof Kozlowski
On 20/02/2022 19:22, Jiaxun Yang wrote: > > > 在 2022/2/20 14:55, Sui Jingfeng 写道: >> From: suijingfeng >> >> Add DT documentation for loongson display controller found in LS2K1000, >> LS2K0500 and LS7A1000. >> >> v2: DT binding docs and includes should be a separate patch, >> fix a

[PATCH] drm/bridge: anx7625: switch to devm_drm_of_get_bridge

2022-02-20 Thread José Expósito
The function "drm_of_find_panel_or_bridge" has been deprecated in favor of "devm_drm_of_get_bridge". Switch to the new function and reduce boilerplate. Signed-off-by: José Expósito --- drivers/gpu/drm/bridge/analogix/anx7625.c | 16 +--- 1 file changed, 5 insertions(+), 11

Re: [PATCH] drm/amdkfd: rework criu_restore_bos error handling

2022-02-20 Thread Christian König
Am 18.02.22 um 19:35 schrieb Felix Kuehling: Am 2022-02-18 um 12:39 schrieb t...@redhat.com: From: Tom Rix Clang static analysis reports this problem kfd_chardev.c:2327:2: warning: 1st function call argument    is an uninitialized value    kvfree(bo_privs);    ^~~~ If the

Re: [PATCH] drm/amdgpu: Initialize value of r in amdgpu_fill_buffer()

2022-02-20 Thread Christian König
Am 18.02.22 um 19:53 schrieb Souptick Joarder: From: "Souptick Joarder (HPE)" Kernel test robot reported warning -> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2129:2: warning: Undefined or garbage value returned to caller [clang-analyzer-core. uninitialized.UndefReturn] Good catch, but that fix

Re: [PATCH 1/2] drm/panel-edp: Add eDP innolux panel support

2022-02-20 Thread Hsin-Yi Wang
On Fri, Feb 18, 2022 at 5:59 PM Rex Nie wrote: > > Add hsi...@chromium.org to cc list > > On Fri, 18 Feb 2022 at 17:44, Rex Nie wrote: >> >> From: Daocai Nie >> >> Add support for the 14" innolux,n140hca-eac eDP panel. >> >> Signed-off-by: Daocai Nie Acked-by: Hsin-Yi Wang >> --- >>

Re: [Intel-gfx] [PATCH topic/core-for-CI] drm/i915/dg2: Add relocation exception

2022-02-20 Thread Lucas De Marchi
On Fri, Feb 18, 2022 at 02:38:53PM -0800, Lucas De Marchi wrote: The move to softpin in igt is ongoing and should land soon. Meanwhile, like was done for ADL and RKL, add an exception to allow running the igt display tests before that conversion is complete so we can unblock CI. Cc: Zbigniew

Re: [PATCH] drm/sched: Add device pointer to drm_gpu_scheduler

2022-02-20 Thread Andrey Grodzovsky
On 2022-02-20 22:32, Gu, JiaWei (Will) wrote: [AMD Official Use Only] Pinging. -Original Message- From: Jiawei Gu Sent: Thursday, February 17, 2022 6:44 PM To: dri-devel@lists.freedesktop.org; amd-...@lists.freedesktop.org; Koenig, Christian ; Grodzovsky, Andrey ; Liu, Monk ; Deng,

Re: [PATCH v8 13/19] drm/mediatek: dpi: Add dpintf support

2022-02-20 Thread Chun-Kuang Hu
'.Hi, Guillaume: Guillaume Ranquet 於 2022年2月18日 週五 下午10:56寫道: > > dpintf is the displayport interface hardware unit. This unit is similar > to dpi and can reuse most of the code. > > This patch adds support for mt8195-dpintf to this dpi driver. Main > differences are: > - Some

Re: [PATCH v8 12/19] drm/mediatek: dpi: move the csc_enable bit to board config

2022-02-20 Thread Chun-Kuang Hu
Hi, Guillaume: Guillaume Ranquet 於 2022年2月18日 週五 下午10:56寫道: > > Add flexibility by moving the csc_enable bit to board config After replace 'board' with 'SoC', Reviewed-by: Chun-Kuang Hu > > Signed-off-by: Guillaume Ranquet > --- > drivers/gpu/drm/mediatek/mtk_dpi.c | 8 +++- > 1 file

RE: [PATCH] drm/sched: Add device pointer to drm_gpu_scheduler

2022-02-20 Thread Gu, JiaWei (Will)
[AMD Official Use Only] Pinging. -Original Message- From: Jiawei Gu Sent: Thursday, February 17, 2022 6:44 PM To: dri-devel@lists.freedesktop.org; amd-...@lists.freedesktop.org; Koenig, Christian ; Grodzovsky, Andrey ; Liu, Monk ; Deng, Emily ; Chen, Horace Cc: Gu, JiaWei (Will)

Re: [PATCH v8 11/19] drm/mediatek: dpi: move the yuv422_en_bit to board config

2022-02-20 Thread Chun-Kuang Hu
Hi, Guillaume: Guillaume Ranquet 於 2022年2月18日 週五 下午10:56寫道: > > Add flexibility by moving the yuv422 en bit to board config After replace 'board' with 'SoC', Reviewed-by: Chun-Kuang Hu > > Signed-off-by: Guillaume Ranquet > --- > drivers/gpu/drm/mediatek/mtk_dpi.c | 8 +++- > 1 file

Re: [PATCH] drm/amdgpu: check vm bo eviction valuable at last

2022-02-20 Thread Qiang Yu
On Fri, Feb 18, 2022 at 6:24 PM Christian König wrote: > > Am 18.02.22 um 11:16 schrieb Qiang Yu: > > [SNIP] > >>> If amdgpu_vm_ready() use evicting flag, it's still not equivalent to check > >>> vm idle: true -> vm idle, false -> vm may be idle or busy. > >> Yeah, but why should that be

Re: [PATCH v8 10/19] drm/mediatek: dpi: move swap_shift to board config

2022-02-20 Thread Chun-Kuang Hu
Hi, Guillaume: Guillaume Ranquet 於 2022年2月18日 週五 下午10:56寫道: > > Add flexibility by moving the swap shift value to board config > > Signed-off-by: Guillaume Ranquet > --- > drivers/gpu/drm/mediatek/mtk_dpi.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git

Re: [PATCH v8 09/19] drm/mediatek: dpi: move dimension_mask to board config

2022-02-20 Thread Chun-Kuang Hu
Hi, Guillaume: Guillaume Ranquet 於 2022年2月18日 週五 下午10:56寫道: > > Add flexibility by moving the dimension mask to board config Replace 'board' with 'SoC'. > > Signed-off-by: Guillaume Ranquet > --- > drivers/gpu/drm/mediatek/mtk_dpi.c | 12 ++-- > 1 file changed, 10 insertions(+), 2

Re: [PATCH v8 08/19] drm/mediatek: dpi: move dimension mask to board config

2022-02-20 Thread Chun-Kuang Hu
Hi, Guillaume: Chun-Kuang Hu 於 2022年2月21日 週一 上午10:40寫道: > > HI, Guillaume: > > Guillaume Ranquet 於 2022年2月18日 週五 下午10:56寫道: > > > > Add flexibility by moving the dimension mask to the board config > > After change 'board' to 'SoC', > > Reviewed-by: Chun-Kuang Hu > > > > > Signed-off-by:

Re: [PATCH v8 08/19] drm/mediatek: dpi: move dimension mask to board config

2022-02-20 Thread Chun-Kuang Hu
HI, Guillaume: Guillaume Ranquet 於 2022年2月18日 週五 下午10:56寫道: > > Add flexibility by moving the dimension mask to the board config After change 'board' to 'SoC', Reviewed-by: Chun-Kuang Hu > > Signed-off-by: Guillaume Ranquet > --- > drivers/gpu/drm/mediatek/mtk_dpi.c | 26

Re: [PATCH v8 02/19] dt-bindings: mediatek, dp: Add Display Port binding

2022-02-20 Thread Rob Herring
On Fri, 18 Feb 2022 15:54:20 +0100, Guillaume Ranquet wrote: > From: Markus Schneider-Pargmann > > This controller is present on several mediatek hardware. Currently > mt8195 and mt8395 have this controller without a functional difference, > so only one compatible field is added. > > The

Re: [PATCH v4 1/3] dt-bindings: display: add bindings for MIPI DBI compatible SPI panels

2022-02-20 Thread Rob Herring
On Fri, 18 Feb 2022 16:11:08 +0100, Noralf Trønnes wrote: > Add binding for MIPI DBI compatible SPI panels. > > v4: > - There should only be two compatible (Maxime) > - s/panel-dbi-spi/panel-mipi-dbi-spi/in compatible > > v3: > - Move properties to Device Tree (Maxime) > - Use contains for

Re: [PATCH v8 07/19] drm/mediatek: dpi: implement a swap_input toggle in board config

2022-02-20 Thread Chun-Kuang Hu
Hi, Guillaume: Guillaume Ranquet 於 2022年2月18日 週五 下午10:56寫道: > > Adds a bit of flexibility to support boards without swap_input support > > Signed-off-by: Guillaume Ranquet > --- > drivers/gpu/drm/mediatek/mtk_dpi.c | 14 +++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > >

Re: [REPOST PATCH v4 01/13] drm/msm/dsi: add support for dsc data

2022-02-20 Thread Dmitry Baryshkov
On 10/02/2022 13:34, Vinod Koul wrote: Display Stream Compression (DSC) parameters need to be calculated. Add helpers and struct msm_display_dsc_config in msm_drv for this msm_display_dsc_config uses drm_dsc_config for DSC parameters. Signed-off-by: Vinod Koul ---

Re: [PATCH v8 06/19] drm/mediatek: dpi: implement a CK/DE pol toggle in board config

2022-02-20 Thread Chun-Kuang Hu
HI, Guillaume: Guillaume Ranquet 於 2022年2月18日 週五 下午10:56寫道: > > Adds a bit of flexibility to support boards without CK/DE pol support I'm not sure what the term 'board' mean. Do you mean different board with different panel but all with mt8195-dpintf? If so, you should get CK/DE support from

Re: [REPOST PATCH v4 13/13] drm/msm/dsi: Add support for DSC configuration

2022-02-20 Thread Dmitry Baryshkov
On 10/02/2022 13:34, Vinod Koul wrote: When DSC is enabled, we need to configure DSI registers accordingly and configure the respective stream compression registers. Add support to calculate the register setting based on DSC params and timing information and configure these registers.

Re: [PATCH] drm/omap: switch to drm_of_find_panel_or_bridge

2022-02-20 Thread kernel test robot
ented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Jos-Exp-sito/drm-omap-switch-to-drm_of_find_panel_or_bridge/20220221-035403 base: git://anongit.freedesktop.org/drm/drm drm-next config: arm-randconfig-r022-20220220 (https://download.01.org/0d

[PATCH] drm/armada: Use of_device_get_match_data()

2022-02-20 Thread cgel . zte
From: Minghao Chi (CGEL ZTE) Use of_device_get_match_data() to simplify the code. Reported-by: Zeal Robot Signed-off-by: Minghao Chi (CGEL ZTE) --- drivers/gpu/drm/armada/armada_crtc.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git

Re: [PATCH v8 05/19] drm/mediatek: dpi: move dpi limits to board config

2022-02-20 Thread Chun-Kuang Hu
Hi, Guillaume: Guillaume Ranquet 於 2022年2月18日 週五 下午10:56寫道: > > Add flexibility by moving the dpi limits to the board config This patch looks good to me. But I would like to know what's this limit and why it vary in different SoC. If possible, would you please provide more description for this?

Re: [REPOST PATCH v4 07/13] drm/msm/disp/dpu1: Add support for DSC in encoder

2022-02-20 Thread Dmitry Baryshkov
On 10/02/2022 13:34, Vinod Koul wrote: We need to configure the encoder for DSC configuration and calculate DSC parameters for the given timing so this patch adds that support by adding dpu_encoder_prep_dsc() which is invoked when DSC is enabled. Signed-off-by: Vinod Koul ---

Re: [PATCH v8 2/3] MIPS: Loongson64: dts: update the display controller device node

2022-02-20 Thread Sui Jingfeng
On 2022/2/18 00:39, Rob Herring wrote: On Thu, 17 Feb 2022 02:17:11 +0800, Sui Jingfeng wrote: From: suijingfeng The display controller is a pci device, its PCI vendor id is 0x0014 its PCI device id is 0x7a06. 1) In order to let the lsdc kms driver to know which chip the DC is

Re: [PATCH v10 1/4] MIPS: Loongson64: dts: update the display controller device node

2022-02-20 Thread Sui Jingfeng
On 2022/2/21 02:18, Jiaxun Yang wrote: 在 2022/2/20 14:55, Sui Jingfeng 写道: From: suijingfeng The display controller is a pci device, its PCI vendor id is 0x0014 its PCI device id is 0x7a06. 1) In order to let the driver to know which chip the DC is contained     in, the compatible string

Re: [PATCH v4 7/9] drm: vkms: Refactor the plane composer to accept new formats

2022-02-20 Thread Igor Torrente
Hi Melissa, On 2/9/22 18:45, Melissa Wen wrote: On 02/08, Igor Torrente wrote: Hi Melissa, On 2/8/22 07:40, Melissa Wen wrote: On 01/21, Igor Torrente wrote: Currently the blend function only accepts XRGB_ and ARGB_ as a color input. This patch refactors all the functions related

Re: [PULL] drm-intel-gt-next

2022-02-20 Thread Dave Airlie
On Thu, 17 Feb 2022 at 20:26, Joonas Lahtinen wrote: > > Hi Dave & Daniel, > > Here is the first drm-intel-gt-next feature PR towards v5.18. Am I missing some previous drm-intel pull? /home/airlied/devel/kernel/dim/src/drivers/gpu/drm/i915/gt/intel_workarounds.c: In function

Re: [PATCH] drm/omap: switch to drm_of_find_panel_or_bridge

2022-02-20 Thread Sam Ravnborg
Hi José, On Sun, Feb 20, 2022 at 08:52:12PM +0100, José Expósito wrote: > Use the "drm_of_find_panel_or_bridge" function instead of a custom > version of it to reduce the boilerplate. Thanks for looking into this. >From the documentation of drm_of_find_panel_or_bridge(): * This function is

Re: [PATCH v4 3/3] drm/tiny: Add MIPI DBI compatible SPI driver

2022-02-20 Thread Sam Ravnborg
Hi Noralf, On Sun, Feb 20, 2022 at 04:59:34PM +0100, Noralf Trønnes wrote: > > > Den 19.02.2022 23.10, skrev Sam Ravnborg: > > Hi Noralf, > > On Fri, Feb 18, 2022 at 04:11:10PM +0100, Noralf Trønnes wrote: > >> Add a driver that will work with most MIPI DBI compatible SPI panels. > >> This

Re: [PATCH v4 3/3] drm/tiny: Add MIPI DBI compatible SPI driver

2022-02-20 Thread Sam Ravnborg
Hi Noralf, > >>mode->flags) { > >>dev_err(dev, "%pOF: panel-timing out of bounds\n", > >> dev->of_node); > >>return -EINVAL; > >>} > > With the display_timing => drm_display_mode I think the above is no > > longer required. > > > > I still need to verify the

Re: [PATCH v4 3/3] drm/tiny: Add MIPI DBI compatible SPI driver

2022-02-20 Thread Noralf Trønnes
Den 20.02.2022 20.57, skrev Sam Ravnborg: > Hi Noralf. > > On Sun, Feb 20, 2022 at 07:11:14PM +0100, Noralf Trønnes wrote: >>> Den 20.02.2022 11.04, skrev Sam Ravnborg: Hi Noralf, >> +static int panel_mipi_dbi_get_mode(struct mipi_dbi_dev *dbidev, >> struct drm_display_mode

Re: [PATCH v4 3/3] drm/tiny: Add MIPI DBI compatible SPI driver

2022-02-20 Thread Sam Ravnborg
Hi Noralf. On Sun, Feb 20, 2022 at 07:11:14PM +0100, Noralf Trønnes wrote: > > Den 20.02.2022 11.04, skrev Sam Ravnborg: > > > Hi Noralf, > > > > > >>> +static int panel_mipi_dbi_get_mode(struct mipi_dbi_dev *dbidev, > struct drm_display_mode *mode) > > >>> +{ > > >>> + struct device *dev =

[PATCH] drm/omap: switch to drm_of_find_panel_or_bridge

2022-02-20 Thread José Expósito
Use the "drm_of_find_panel_or_bridge" function instead of a custom version of it to reduce the boilerplate. Signed-off-by: José Expósito --- drivers/gpu/drm/omapdrm/dss/output.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git

Re: [PATCH v10 2/4] Documentation/dt: Add descriptions for loongson display controller

2022-02-20 Thread Jiaxun Yang
在 2022/2/20 14:55, Sui Jingfeng 写道: From: suijingfeng Add DT documentation for loongson display controller found in LS2K1000, LS2K0500 and LS7A1000. v2: DT binding docs and includes should be a separate patch, fix a warnning because of that. v3: split dt-bindings from other changes

Re: [PATCH v10 1/4] MIPS: Loongson64: dts: update the display controller device node

2022-02-20 Thread Jiaxun Yang
在 2022/2/20 14:55, Sui Jingfeng 写道: From: suijingfeng The display controller is a pci device, its PCI vendor id is 0x0014 its PCI device id is 0x7a06. 1) In order to let the driver to know which chip the DC is contained in, the compatible string of the display controller is updated

Re: [PATCH v4 3/3] drm/tiny: Add MIPI DBI compatible SPI driver

2022-02-20 Thread Noralf Trønnes
> Den 20.02.2022 11.04, skrev Sam Ravnborg: > > Hi Noralf, > > > >>> +static int panel_mipi_dbi_get_mode(struct mipi_dbi_dev *dbidev, struct drm_display_mode *mode) > >>> +{ > >>> + struct device *dev = dbidev->drm.dev; > >>> + u32 width_mm = 0, height_mm = 0; > >>> + struct display_timing timing;

Re: [PATCH v4 3/3] drm/tiny: Add MIPI DBI compatible SPI driver

2022-02-20 Thread Noralf Trønnes
Den 19.02.2022 23.10, skrev Sam Ravnborg: > Hi Noralf, > On Fri, Feb 18, 2022 at 04:11:10PM +0100, Noralf Trønnes wrote: >> Add a driver that will work with most MIPI DBI compatible SPI panels. >> This avoids adding a driver for every new MIPI DBI compatible controller >> that is to be used by

[PATCH v2 2/2] drm/amd: use fixed dsc bits-per-pixel from edid

2022-02-20 Thread Yaroslav Bolyukin
VESA vendor header from DisplayID spec may contain fixed bit per pixel rate, it should be respected by drm driver Signed-off-by: Yaroslav Bolyukin Reviewed-by: Wayne Lin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 ++ drivers/gpu/drm/amd/display/dc/core/dc_stream.c

[PATCH v2 1/2] drm/edid: parse DRM VESA dsc bpp target

2022-02-20 Thread Yaroslav Bolyukin
As per DisplayID v2.0 Errata E9 spec "DSC pass-through timing support" VESA vendor-specific data block may contain target DSC bits per pixel fields Signed-off-by: Yaroslav Bolyukin --- drivers/gpu/drm/drm_edid.c | 33 ++--- include/drm/drm_connector.h | 6 ++

[PATCH v10 3/4] drm/lsdc: add drm driver for loongson display controller

2022-02-20 Thread Sui Jingfeng
From: suijingfeng There is a display controller in loongson's LS2K1000 SoC and LS7A1000 bridge chip, the display controller is a PCI device in those chips. It has two display pipes but with only one hardware cursor. Each way has a DVO interface which provide RGB888 signals, vertical & horizontal

[PATCH v10 0/4] drm/lsdc: add drm driver for loongson display controller

2022-02-20 Thread Sui Jingfeng
There is a display controller in loongson's LS2K1000 SoC and LS7A1000 bridge chip, the display controller is a PCI device in those chips. It has two display pipes but with only one hardware cursor. Each way has a DVO interface which provide RGB888 signals, vertical & horizontal synchronisations,

[PATCH v10 2/4] Documentation/dt: Add descriptions for loongson display controller

2022-02-20 Thread Sui Jingfeng
From: suijingfeng Add DT documentation for loongson display controller found in LS2K1000, LS2K0500 and LS7A1000. v2: DT binding docs and includes should be a separate patch, fix a warnning because of that. v3: split dt-bindings from other changes into a separate patch. v4: fix warnings

[PATCH v10 4/4] MAINTAINERS: add maintainers for DRM LSDC driver

2022-02-20 Thread Sui Jingfeng
From: suijingfeng v2: Fix warnnings reported by checkpatch script Reported-by: Joe Perches Reported-by: Krzysztof Kozlowski Signed-off-by: suijingfeng Signed-off-by: Sui Jingfeng <15330273...@189.cn> --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS

[PATCH v10 1/4] MIPS: Loongson64: dts: update the display controller device node

2022-02-20 Thread Sui Jingfeng
From: suijingfeng The display controller is a pci device, its PCI vendor id is 0x0014 its PCI device id is 0x7a06. 1) In order to let the driver to know which chip the DC is contained in, the compatible string of the display controller is updated according to the chip's name. 2) Add

Re: [PATCH v4 3/3] drm/tiny: Add MIPI DBI compatible SPI driver

2022-02-20 Thread Noralf Trønnes
Den 20.02.2022 11.04, skrev Sam Ravnborg: > Hi Noralf, > >>> +static int panel_mipi_dbi_get_mode(struct mipi_dbi_dev *dbidev, struct >>> drm_display_mode *mode) >>> +{ >>> + struct device *dev = dbidev->drm.dev; >>> + u32 width_mm = 0, height_mm = 0; >>> + struct display_timing timing;

Re: [Intel-gfx] [PATCH 00/15] drm/i915: Enable DG2

2022-02-20 Thread Lucas De Marchi
On Sat, Feb 19, 2022 at 12:17:37AM +0530, Ramalingam C wrote: Enabling the Dg2 on drm/i915. This series adds support for 64k pagesize and documents the uapi impacts. And also adds basic flat-ccs enabling patches to support the local memory initialization and object creation. Kdoc is added to

Re: [PATCH v4 3/3] drm/tiny: Add MIPI DBI compatible SPI driver

2022-02-20 Thread Sam Ravnborg
Hi Noralf, > > +static int panel_mipi_dbi_get_mode(struct mipi_dbi_dev *dbidev, struct > > drm_display_mode *mode) > > +{ > > + struct device *dev = dbidev->drm.dev; > > + u32 width_mm = 0, height_mm = 0; > > + struct display_timing timing; > > + struct videomode vm; > > + int ret; > >

[PATCH v2 04/18] dept: Add a API for skipping dependency check temporarily

2022-02-20 Thread Byungchul Park
Dept would skip check for dmaps marked by dept_map_nocheck() permanently. However, sometimes it needs to skip check for some dmaps temporarily and back to normal, for instance, lock acquisition with a nest lock. Lock usage check with regard to nest lock could be performed by Lockdep, however,

[PATCH v2 18/18] dept: Distinguish each work from another

2022-02-20 Thread Byungchul Park
Workqueue already provides concurrency control. By that, any wait in a work doesn't prevents events in other works with the control enabled. Thus, each work would better be considered a different context. So let Dept assign a different context id to each work. Signed-off-by: Byungchul Park ---

[PATCH v2 13/18] dept: Apply Dept to wait/event of PG_{locked, writeback}

2022-02-20 Thread Byungchul Park
Makes Dept able to track dependencies by PG_{locked,writeback}. For instance, (un)lock_page() generates that type of dependency. Signed-off-by: Byungchul Park --- include/linux/dept_page.h | 78 + include/linux/page-flags.h | 45

[PATCH v2 07/18] dept: Apply Dept to rwlock

2022-02-20 Thread Byungchul Park
Makes Dept able to track dependencies by rwlock. Signed-off-by: Byungchul Park --- include/linux/lockdep.h| 25 include/linux/rwlock.h | 52 ++ include/linux/rwlock_api_smp.h | 8 +++ include/linux/rwlock_types.h

[PATCH v2 16/18] locking/lockdep, cpu/hotplus: Use a weaker annotation in AP thread

2022-02-20 Thread Byungchul Park
cb92173d1f0 (locking/lockdep, cpu/hotplug: Annotate AP thread) was introduced to make lockdep_assert_cpus_held() work in AP thread. However, the annotation is too strong for that purpose. We don't have to use more than try lock annotation for that. Furthermore, now that Dept was introduced,

[PATCH v2 12/18] dept: Introduce split map concept and new APIs for them

2022-02-20 Thread Byungchul Park
There is a case where all maps used for a type of wait/event is so large in size. For instance, struct page can be a type for (un)lock_page(). The additional memory size for the maps would be 'the # of pages * sizeof(struct dept_map)' if each struct page keeps its map all the way, which might be

[PATCH v2 08/18] dept: Apply Dept to wait_for_completion()/complete()

2022-02-20 Thread Byungchul Park
Makes Dept able to track dependencies by wait_for_completion()/complete(). Signed-off-by: Byungchul Park --- include/linux/completion.h | 42 -- kernel/sched/completion.c | 12 ++-- 2 files changed, 50 insertions(+), 4 deletions(-) diff --git

[PATCH v2 15/18] dept: Apply SDT to wait(waitqueue)

2022-02-20 Thread Byungchul Park
Makes SDT able to track dependencies by wait(waitqueue). Signed-off-by: Byungchul Park --- include/linux/wait.h | 6 +- kernel/sched/wait.c | 16 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/include/linux/wait.h b/include/linux/wait.h index

[PATCH v2 14/18] dept: Apply SDT to swait

2022-02-20 Thread Byungchul Park
Makes SDT able to track dependencies by swait. Signed-off-by: Byungchul Park --- include/linux/swait.h | 4 kernel/sched/swait.c | 10 ++ 2 files changed, 14 insertions(+) diff --git a/include/linux/swait.h b/include/linux/swait.h index 6a8c22b..dbdf2ce 100644 ---

[PATCH v2 03/18] dept: Embed Dept data in Lockdep

2022-02-20 Thread Byungchul Park
Dept should work independently from Lockdep. However, there's no choise but to rely on Lockdep code and its instances for now. Signed-off-by: Byungchul Park --- include/linux/lockdep.h | 71 --- include/linux/lockdep_types.h | 3 ++

[PATCH v2 05/18] dept: Apply Dept to spinlock

2022-02-20 Thread Byungchul Park
Makes Dept able to track dependencies by spinlock. Signed-off-by: Byungchul Park --- include/linux/lockdep.h| 18 +++--- include/linux/spinlock.h | 26 ++ include/linux/spinlock_types_raw.h | 13 + 3 files changed, 54

[PATCH v2 06/18] dept: Apply Dept to mutex families

2022-02-20 Thread Byungchul Park
Makes Dept able to track dependencies by mutex families. Signed-off-by: Byungchul Park --- include/linux/lockdep.h | 18 +++--- include/linux/mutex.h | 33 + include/linux/rtmutex.h | 7 +++ 3 files changed, 55 insertions(+), 3 deletions(-)

[PATCH v2 01/18] llist: Move llist_{head,node} definition to types.h

2022-02-20 Thread Byungchul Park
llist_head and llist_node can be used by very primitives. For example, Dept for tracking dependency uses llist things in its header. To avoid header dependency, move those to types.h. Signed-off-by: Byungchul Park --- include/linux/llist.h | 8 include/linux/types.h | 8 2

[PATCH v2 02/18] dept: Implement Dept(Dependency Tracker)

2022-02-20 Thread Byungchul Park
CURRENT STATUS -- Lockdep tracks acquisition order of locks in order to detect deadlock, and IRQ and IRQ enable/disable state as well to take accident acquisitions into account. Lockdep should be turned off once it detects and reports a deadlock since the data structure and algorithm

[PATCH v2 10/18] dept: Apply Dept to rwsem

2022-02-20 Thread Byungchul Park
Makes Dept able to track dependencies by rwsem. Signed-off-by: Byungchul Park --- include/linux/lockdep.h | 24 include/linux/percpu-rwsem.h | 10 +- include/linux/rwsem.h| 33 + 3 files changed, 62 insertions(+), 5

[PATCH v2 00/18] DEPT(Dependency Tracker)

2022-02-20 Thread Byungchul Park
Hi Linus and folks, I've been developing a tool for detecting deadlock possibilities by tracking wait/event rather than lock(?) acquisition order to try to cover all synchonization machanisms. It's done on v5.17-rc1 tag.

Re: [PATCH 00/16] DEPT(Dependency Tracker)

2022-02-20 Thread Byungchul Park
On Thu, Feb 17, 2022 at 11:19:15PM -0500, Theodore Ts'o wrote: > On Thu, Feb 17, 2022 at 12:00:05PM -0500, Steven Rostedt wrote: > > > > I personally believe that there's potential that this can be helpful and we > > will want to merge it. > > > > But, what I believe Ted is trying to say is, if

[PATCH v2 09/18] dept: Apply Dept to seqlock

2022-02-20 Thread Byungchul Park
Makes Dept able to track dependencies by seqlock with adding wait annotation on read side of seqlock. Signed-off-by: Byungchul Park --- include/linux/seqlock.h | 59 - 1 file changed, 58 insertions(+), 1 deletion(-) diff --git

[PATCH v2 17/18] dept: Distinguish each syscall context from another

2022-02-20 Thread Byungchul Park
It enters kernel mode on each syscall and each syscall handling should be considered independently from the point of view of Dept. Otherwise, Dept may wrongly track dependencies across different syscalls. That might be a real dependency from user mode. However, now that Dept just started to work,

Re: [PATCH 00/16] DEPT(Dependency Tracker)

2022-02-20 Thread Byungchul Park
On Thu, Feb 17, 2022 at 05:06:18PM +, Matthew Wilcox wrote: > On Thu, Feb 17, 2022 at 12:00:05PM -0500, Steven Rostedt wrote: > > On Thu, 17 Feb 2022 10:51:09 -0500 > > "Theodore Ts'o" wrote: > > > > > I know that you're trying to help us, but this tool needs to be far > > > better than

Re: [PATCH 00/16] DEPT(Dependency Tracker)

2022-02-20 Thread Byungchul Park
On Thu, Feb 17, 2022 at 12:00:05PM -0500, Steven Rostedt wrote: > On Thu, 17 Feb 2022 10:51:09 -0500 > "Theodore Ts'o" wrote: > > > I know that you're trying to help us, but this tool needs to be far > > better than Lockdep before we should think about merging it. Even if > > it finds 5% more

[PATCH v2 11/18] dept: Add proc knobs to show stats and dependency graph

2022-02-20 Thread Byungchul Park
It'd be useful to show Dept internal stats and dependency graph on runtime via proc for better information. Introduced the knobs. Signed-off-by: Byungchul Park --- kernel/dependency/Makefile| 1 + kernel/dependency/dept.c | 24 -- kernel/dependency/dept_internal.h | 26