Re: [Intel-gfx] [PATCH] drm/i915/guc: Support programming the EU priority in the GuC descriptor

2022-05-04 Thread Tvrtko Ursulin
On 04/05/2022 02:06, Ceraolo Spurio, Daniele wrote: On 5/3/2022 5:44 PM, Daniele Ceraolo Spurio wrote: From: Matthew Brost The EU priority register must be updated by the GuC rather than the driver as it is context specific and only the GuC knows which context is currently executing. Cc:

Re: [PATCH v4] drm/ast: Create the driver for ASPEED proprietory Display-Port

2022-05-04 Thread Thomas Zimmermann
Hi Am 28.04.22 um 09:56 schrieb KuoHsiang Chou: V1: 1. The MCU FW controling ASPEED DP is loaded by BMC boot loader. 2. Driver starts after CR[3:1] == 111b that indicates Tx is ASTDP, and CRD1[5] has been asserted by BMVC boot loader. 3. EDID is prioritized by DP monitor. 4. DP's EDID has hi

[PATCH 1/8] drm: execution context for GEM buffers v2

2022-05-04 Thread Christian König
This adds the infrastructure for an execution context for GEM buffers which is similar to the existinc TTMs execbuf util and intended to replace it in the long term. The basic functionality is that we abstracts the necessary loop to lock many different GEM buffers with automated deadlock and dupli

Re: [PATCH 1/3] drm/panel: ltk050h3146w: add mipi_dsi_device.mode_flags to of_match_data

2022-05-04 Thread Quentin Schulz
Hi all, Seems I'm not the only one who forgot about this patch series, so, kindly pinging :) Thanks! Quentin On 1/31/22 17:47, quentin.sch...@theobroma-systems.com wrote: From: Quentin Schulz To prepare for a new display to be supported by this driver which has a slightly different set of

Re: [PATCH 0/4] Remove support for Hyper-V 2008 and 2008R2/Win7

2022-05-04 Thread Andrea Parri
On Mon, May 02, 2022 at 09:36:27AM -0700, Michael Kelley wrote: > Linux code for running as a Hyper-V guest includes special cases for the > first released versions of Hyper-V: 2008 and 2008R2/Windows 7. These > versions were very thinly used for running Linux guests when first > released more than

[RFC] Common DRM execution context v2

2022-05-04 Thread Christian König
Hello everyone, compared to the earlier version this has seen quite a bit of additional testing and can now handle both amdgpu as well as radeon without any performance drop. QXL is converted over as well and then the remaining ttm_execbuf_util implementation moved into VMWGFX which is the only r

[PATCH 1/8] drm: execution context for GEM buffers v2

2022-05-04 Thread Christian König
This adds the infrastructure for an execution context for GEM buffers which is similar to the existinc TTMs execbuf util and intended to replace it in the long term. The basic functionality is that we abstracts the necessary loop to lock many different GEM buffers with automated deadlock and dupli

[PATCH 2/8] drm: add drm_exec selftests

2022-05-04 Thread Christian König
Largely just the initial skeleton. Signed-off-by: Christian König --- drivers/gpu/drm/selftests/Makefile| 2 +- .../gpu/drm/selftests/drm_exec_selftests.h| 10 +++ drivers/gpu/drm/selftests/test-drm_exec.c | 74 +++ 3 files changed, 85 insertions(+), 1 deleti

[PATCH 3/8] drm/amdkfd: switch over to using drm_exec

2022-05-04 Thread Christian König
Avoids quite a bit of logic and kmalloc overhead. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h| 5 +- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 303 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c| 14 + drivers/gpu/drm/amd/amdgpu/a

[PATCH 5/8] drm/amdgpu: use the new drm_exec object for CS

2022-05-04 Thread Christian König
Use the new component here as well and remove the old handling. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 70 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h | 7 +- drivers/gpu/drm/amd/amdgpu/amdgp

[PATCH 8/8] drm: move ttm_execbuf_util into vmwgfx

2022-05-04 Thread Christian König
VMWGFX is the only remaining user of this and should probably moved over to drm_exec when it starts using GEM as well. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/Makefile | 4 ++-- drivers/gpu/drm/vmwgfx/Makefile | 2 +-

[PATCH 6/8] drm/radeon: switch over to drm_exec

2022-05-04 Thread Christian König
Just a straightforward conversion without any optimization. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon.h| 7 ++-- drivers/gpu/drm/radeon/radeon_cs.c | 45 +- drivers/gpu/drm/radeon/radeon_gem.c| 40 +-- drivers/gp

[PATCH 4/8] drm/amdgpu: use drm_exec for GEM and CSA handling

2022-05-04 Thread Christian König
Start using the new component here as well. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 42 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 77 +++-- 2 files changed, 53 insertions(+), 66 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH 7/8] drm/qxl: switch to using drm_exec

2022-05-04 Thread Christian König
Just a straightforward conversion without any optimization. Only compile tested for now. Signed-off-by: Christian König --- drivers/gpu/drm/qxl/qxl_drv.h | 7 ++-- drivers/gpu/drm/qxl/qxl_release.c | 67 --- 2 files changed, 38 insertions(+), 36 deletions(-) di

Re: [PATCH 02/15] dma-buf: introduce user fence support

2022-05-04 Thread Tvrtko Ursulin
On 02/05/2022 17:37, Christian König wrote: Start introducing a new part of the framework for handling user fences. In strict opposition to normal fences user fences don't reliable finish in reliably a fixed amount of time and therefore can't be used as dependency in memory management. Be

Re: [PATCH] drm/stm: dsi: Enable wrapper glue regulator early

2022-05-04 Thread Raphael Gallais-Pou
Hi Marek, Thanks for your patch On 4/29/22 22:45, Marek Vasut wrote: > Certain DSI bridge chips like TC358767/TC358867/TC9595 expect the DSI D0 > data lane to be in LP-11 state when released from reset. Currently the > STM32MP157 DSI host wrapper glue logic keeps D0 data lane in LP-00 state > un

[PATCH v2 00/20] drm/edid: CEA data block iterators, and more

2022-05-04 Thread Jani Nikula
I've kind of lost track of the version numbers on some of the iterator patches, but this is the next version (or mostly a resend) of [1]. There's an additional rename patch for SCDS. BR, Jani. [1] https://patchwork.freedesktop.org/series/102703/ Jani Nikula (19): drm/edid: reset display info

[Intel-gfx] [PATCH v2 01/20] drm/edid: reset display info in drm_add_edid_modes() for NULL edid

2022-05-04 Thread Jani Nikula
If a NULL edid gets passed to drm_add_edid_modes(), we should probably also reset the display info. Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_edid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gp

[PATCH] drm/todo: Add entry for using kunit in the subsystem

2022-05-04 Thread Javier Martinez Canillas
The Kernel Unit Testing (KUnit) framework provides a common framework for unit tests within the Linux kernel. Having a test suite would allow to identify regressions earlier. Signed-off-by: Javier Martinez Canillas --- Documentation/gpu/todo.rst | 14 ++ 1 file changed, 14 insertion

[PATCH v2 02/20] drm/edid: check for HF-SCDB block

2022-05-04 Thread Jani Nikula
From: Lee Shawn C Find HF-SCDB information in CEA extensions block. And retrieve Max_TMDS_Character_Rate that support by sink device. v2: HF-SCDB and HF-VSDBS carry the same SCDS data. Reuse drm_parse_hdmi_forum_vsdb() to parse this packet. Cc: Jani Nikula Cc: Ville Syrjala Cc: Ankit Naut

[Intel-gfx] [PATCH v2 03/20] drm/edid: rename HDMI Forum VSDB to SCDS

2022-05-04 Thread Jani Nikula
The HDMI spec talks about SCDS, Sink Capability Data Structure, exposed via HF-VSDB or HF-SCDB. Rename VSDB to SCDS. Suggested-by: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_edid.c | 41 +++--- 1 file changed, 21 insertions(+), 20 deletions(

[Intel-gfx] [PATCH v2 04/20] drm/edid: clean up CTA data block tag definitions

2022-05-04 Thread Jani Nikula
Add prefixed names, group, sort, add references. v2: - Updated references to CTA-861-H - s/CEA/CTA/ in data block macros Cc: Ville Syrjälä Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_edid.c | 65 -- 1 file changed, 35 inser

[Intel-gfx] [PATCH v2 06/20] drm/edid: add iterator for CTA data blocks

2022-05-04 Thread Jani Nikula
Add an iterator for CTA Data Blocks across EDID CTA Extensions and DisplayID CTA Data Blocks. v2: Update references, note why we can trust displayid ranges (Ville) Cc: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_edid.c | 202 ++--- 1 file ch

[Intel-gfx] [PATCH v2 05/20] drm/edid: add iterator for EDID base and extension blocks

2022-05-04 Thread Jani Nikula
Add an iterator abstraction for going through all the EDID blocks. Cc: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_edid.c | 48 ++ 1 file changed, 48 insertions(+) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c inde

[Intel-gfx] [PATCH v2 07/20] drm/edid: clean up cea_db_is_*() functions

2022-05-04 Thread Jani Nikula
Abstract helpers for matching vendor data blocks and extended tags, and use them to simplify all the cea_db_is_*() functions. Take void pointer as parameter to allow transitional use for both u8 * and struct cea_db *. v2: Remove superfluous parens (Ville) Cc: Ville Syrjälä Signed-off-by: Jani N

[Intel-gfx] [PATCH v2 09/20] drm/edid: convert drm_edid_to_speaker_allocation() to use cea db iter

2022-05-04 Thread Jani Nikula
Use the cea db iterator for speaker allocation. We'll still stop at the first speaker data block, but not at the first CTA extension if that doesn't have the info. Cc: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_edid.c | 47 -- 1 file cha

[Intel-gfx] [PATCH v2 08/20] drm/edid: convert add_cea_modes() to use cea db iter

2022-05-04 Thread Jani Nikula
Iterate through all CTA EDID extension blocks and DisplayID CTA data blocks to add CEA modes. Cc: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_edid.c | 67 ++ 1 file changed, 31 insertions(+), 36 deletions(-) diff --git a/drivers/gpu/drm/

[Intel-gfx] [PATCH v2 11/20] drm/edid: convert drm_detect_hdmi_monitor() to use cea db iter

2022-05-04 Thread Jani Nikula
Iterate through all CTA data blocks, not just the first CTA extension. Cc: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_edid.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edi

[Intel-gfx] [PATCH v2 10/20] drm/edid: convert drm_edid_to_sad() to use cea db iter

2022-05-04 Thread Jani Nikula
Use the cea db iterator for short audio descriptors. We'll still stop at the first audio data block, but not at the first CTA Extension if that doesn't have the info. Cc: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_edid.c | 34 +- 1 file chan

[Intel-gfx] [PATCH v2 12/20] drm/edid: convert drm_detect_monitor_audio() to use cea db iter

2022-05-04 Thread Jani Nikula
Iterate through all CEA data blocks. Cc: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_edid.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index ca594d502941..3433d9fa4799

[Intel-gfx] [PATCH v2 14/20] drm/edid: convert drm_edid_to_eld() to use cea db iter

2022-05-04 Thread Jani Nikula
Iterate through all CTA data blocks across all CTA extensions and DisplayID data blocks. This may gather more data than before, and if there's duplicated data, some is overwritten by whichever comes last. Cc: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_edid.c | 64 +

[Intel-gfx] [PATCH v2 15/20] drm/edid: sunset the old unused cea data block iterators

2022-05-04 Thread Jani Nikula
All CTA data block iteration has now been converted to the new cea db iterators. Cc: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_edid.c | 45 -- 1 file changed, 45 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/dr

[Intel-gfx] [PATCH v2 13/20] drm/edid: convert drm_parse_cea_ext() to use cea db iter

2022-05-04 Thread Jani Nikula
Iterate through all CTA data blocks across all CTA Extensions and DisplayID data blocks. Cc: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_edid.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drive

[Intel-gfx] [PATCH v2 16/20] drm/edid: restore some type safety to cea_db_*() functions

2022-05-04 Thread Jani Nikula
During the transition, we accepted a void pointer for a poor C programmer's version of polymorphism. Switch the functions to use struct cea_db * to regain some more type safety. Cc: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_edid.c | 21 + 1 file change

[Intel-gfx] [PATCH v2 17/20] drm/edid: detect basic audio in all CEA extensions

2022-05-04 Thread Jani Nikula
Convert drm_find_cea_extension() to EDID block iterator in basic audio detection. Detect basic audio in all CEA extensions. Cc: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_edid.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/g

[Intel-gfx] [PATCH v2 18/20] drm/edid: detect color formats and CTA revision in all CTA extensions

2022-05-04 Thread Jani Nikula
Convert drm_find_cea_extension() to EDID block iterator in color format and CTA revision detection. Detect them in all CTA extensions. Also parse CTA Data Blocks in DisplayID even if there's no CTA EDID extension. Cc: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_edid.c | 24

[PATCH v2 19/20] drm/edid: skip CTA extension scan in drm_edid_to_eld() just for CTA rev

2022-05-04 Thread Jani Nikula
The DisplayID CTA data block version does not necessarily match the CTA revision. Simplify by postponing drm_edid_to_eld() slightly, and reusing the CTA revision extracted by drm_parse_cea_ext(). By not bailing out early in drm_edid_to_eld() we may end up filling meaningless data to the ELD. Howev

[PATCH v2 20/20] drm/edid: sunset drm_find_cea_extension()

2022-05-04 Thread Jani Nikula
Convert drm_find_cea_extension() to a predicate function to check if the EDID has a CTA extension or a DisplayID CTA data block. This is mainly to avoid adding new users that only find the first CTA extension. Cc: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_edid.c | 19

Re: [PATCH v5 4/4] drm/mediatek: Add MT8186 DSI compatible for mtk_drm_drv.c

2022-05-04 Thread AngeloGioacchino Del Regno
Il 28/04/22 15:37, Rex-BC Chen ha scritto: The compatible "mediatek,mt8186-dsi" is used by MT8186 DSI, so add it to mtk_ddp_comp_dt_ids in mtk_drm_drv.c. Signed-off-by: Rex-BC Chen Reviewed-by: AngeloGioacchino Del Regno

Re: [PATCH v2 00/20] drm/edid: CEA data block iterators, and more

2022-05-04 Thread Jani Nikula
On Tue, 03 May 2022, Jani Nikula wrote: > I've kind of lost track of the version numbers on some of the iterator > patches, but this is the next version (or mostly a resend) of > [1]. There's an additional rename patch for SCDS. Argh, forgot to send this series to dri-devel. Instead of sending th

Re: [PATCH] drm/todo: Add entry for using kunit in the subsystem

2022-05-04 Thread Maxime Ripard
Hi, On Wed, May 04, 2022 at 10:02:12AM +0200, Javier Martinez Canillas wrote: > The Kernel Unit Testing (KUnit) framework provides a common framework for > unit tests within the Linux kernel. Having a test suite would allow to > identify regressions earlier. > > Signed-off-by: Javier Martinez Can

Re: [PATCH] drm/etnaviv: avoid cleaning up sched_job when submit succeeded

2022-05-04 Thread Daniel Vetter
On Fri, Apr 29, 2022 at 09:17:31PM +0200, Lucas Stach wrote: > While the labels may mislead the casual reader, the tail of the function > etnaviv_ioctl_gem_submit is always executed, as a lot of the structures > set up in this function need to be cleaned up regardless of whether the > submit succee

Re: [PATCH v2] fbdev: Use helper to get fb_info in all file operations

2022-05-04 Thread Thomas Zimmermann
Hi Am 03.05.22 um 22:19 schrieb Javier Martinez Canillas: A reference to the framebuffer device struct fb_info is stored in the file private data, but this reference could no longer be valid and must not be accessed directly. Instead, the file_fb_info() accessor function must be used since it do

Re: [PATCH] drm/bridge: ite-it6505: add missing Kconfig option select

2022-05-04 Thread Neil Armstrong
Hi, On Tue, 26 Apr 2022 16:15:36 +0200, Fabien Parent wrote: > The IT6505 is using functions provided by the DRM_DP_HELPER driver. > In order to avoid having the bridge enabled but the helper disabled, > let's add a select in order to be sure that the DP helper functions are > always available. >

Re: [PATCH v4 10/15] drm/shmem-helper: Take reservation lock instead of drm_gem_shmem locks

2022-05-04 Thread Daniel Vetter
On Thu, Apr 28, 2022 at 09:31:00PM +0300, Dmitry Osipenko wrote: > Hello Daniel, > > 27.04.2022 17:50, Daniel Vetter пишет: > > On Mon, Apr 18, 2022 at 10:18:54PM +0300, Dmitry Osipenko wrote: > >> Hello, > >> > >> On 4/18/22 21:38, Thomas Zimmermann wrote: > >>> Hi > >>> > >>> Am 18.04.22 um 00:3

Re: [PATCH v4 11/15] drm/shmem-helper: Add generic memory shrinker

2022-05-04 Thread Daniel Vetter
On Thu, Apr 28, 2022 at 09:20:15PM +0300, Dmitry Osipenko wrote: > 27.04.2022 18:03, Daniel Vetter wrote: > >> ... > @@ -172,6 +172,41 @@ struct drm_gem_object_funcs { >    * This is optional but necessary for mmap support. >    */ >   const struct vm_operations_stru

Re: [PATCH v2] fbdev: Use helper to get fb_info in all file operations

2022-05-04 Thread Javier Martinez Canillas
Hello Thomas, On 5/4/22 10:15, Thomas Zimmermann wrote: > Hi > > Am 03.05.22 um 22:19 schrieb Javier Martinez Canillas: >> A reference to the framebuffer device struct fb_info is stored in the file >> private data, but this reference could no longer be valid and must not be >> accessed directly.

Re: [PATCH 1/3] dma-buf/sync_file: cleanup fence merging a bit

2022-05-04 Thread Daniel Vetter
On Tue, Apr 26, 2022 at 02:46:35PM +0200, Christian König wrote: > krealloc_array() ignores attempts to reduce the array size, so the attempt > to save memory is completely pointless here. > > Also move testing for the no fence case into sync_file_set_fence(), this > way we don't even touch the fe

Re: [PATCH] drm/todo: Add entry for using kunit in the subsystem

2022-05-04 Thread Javier Martinez Canillas
Hello Maxime, Thanks for your feedback. On 5/4/22 10:10, Maxime Ripard wrote: > Hi, > > On Wed, May 04, 2022 at 10:02:12AM +0200, Javier Martinez Canillas wrote: >> The Kernel Unit Testing (KUnit) framework provides a common framework for >> unit tests within the Linux kernel. Having a test suit

Re: [PATCH 2/3] dma-buf: cleanup dma_fence_unwrap implementation and selftest

2022-05-04 Thread Daniel Vetter
On Tue, Apr 26, 2022 at 02:46:36PM +0200, Christian König wrote: > Move the code from the inline functions into exported functions. > > While at it also cleanup the the selftests, fix the error handling, > remove unused functions and stop leaking memory in failed tests. Can you split this out? At

Re: [PATCH 3/3] dma-buf: generalize fence merging

2022-05-04 Thread Daniel Vetter
On Tue, Apr 26, 2022 at 02:46:37PM +0200, Christian König wrote: > Introduce a dma_fence_merge() macro which allows to unwrap fences which > potentially can be containers as well and then merge them back together > into a flat dma_fence_array. > > Signed-off-by: Christian König So this is really

Re: [PATCH] drm: fix typo in comment

2022-05-04 Thread Daniel Vetter
On Tue, Apr 26, 2022 at 03:19:12PM +0200, Raphael Gallais-Pou wrote: > Fix typo in a doxygen comment (replaced green by blue) in drm_color_mgmt.c > > Signed-off-by: Raphael Gallais-Pou Thanks for your patch, applied to drm-misc-next. -Daniel > --- > drivers/gpu/drm/drm_color_mgmt.c | 2 +- > 1

[PATCH RFC v6 07/21] dept: Apply Dept to seqlock

2022-05-04 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 | 60 +++-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/include/linux/seq

[PATCH RFC v6 05/21] dept: Apply Dept to rwlock

2022-05-04 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 | 42 ++ include/linux/rwlock_api_smp.h | 8 include/linux/rwlock_typ

[PATCH RFC v6 01/21] llist: Move llist_{head, node} definition to types.h

2022-05-04 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 file

[PATCH RFC v6 04/21] dept: Apply Dept to mutex families

2022-05-04 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 | 22 ++ include/linux/rtmutex.h | 1 + 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/include

[PATCH RFC v6 00/21] DEPT(Dependency Tracker)

2022-05-04 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.18-rc3 tag. https://github.com/lgebyungchulpark/linux-dept/commits/dept1.20_on_v5.18-rc3

[PATCH RFC v6 10/21] dept: Introduce split map concept and new APIs for them

2022-05-04 Thread Byungchul Park
There is a case where total maps for its wait/event is so large in size. For instance, struct page for PG_locked and PG_writeback is the case. 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 to

[PATCH RFC v6 08/21] dept: Apply Dept to rwsem

2022-05-04 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 | 4 +++- include/linux/rwsem.h| 22 ++ 3 files changed, 45 insertions(+), 5 deletions(-) diff

[PATCH RFC v6 15/21] dept: Distinguish each syscall context from another

2022-05-04 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,

[PATCH RFC v6 03/21] dept: Apply Dept to spinlock

2022-05-04 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 | 21 + include/linux/spinlock_types_raw.h | 3 +++ 3 files changed, 39 insertions(+), 3 deleti

[PATCH RFC v6 19/21] dept: Differentiate onstack maps from others of different tasks in class

2022-05-04 Thread Byungchul Park
Dept assumes that maps might belong to the same class if the running code is the same for possibility detection. However, maps on stack would never belong to a common class between different tasks because each task has its own instance on stack. So differentiated onstack maps from others in class,

[PATCH RFC v6 18/21] dept: Disable Dept on struct crypto_larval's completion for now

2022-05-04 Thread Byungchul Park
struct crypto_larval's completion is used for multiple purposes e.g. waiting for test to complete or waiting for probe to complete. The completion variable needs to be split according to what it's used for. Otherwise, Dept cannot distinguish one from another and doesn't work properly. Now that it

[PATCH RFC v6 13/21] dept: Apply SDT to wait(waitqueue)

2022-05-04 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 851e07d..e6375

[PATCH RFC v6 11/21] dept: Apply Dept to wait/event of PG_{locked, writeback}

2022-05-04 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 RFC v6 16/21] dept: Distinguish each work from another

2022-05-04 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 RFC v6 17/21] dept: Disable Dept within the wait_bit layer by default

2022-05-04 Thread Byungchul Park
The struct wait_queue_head array, bit_wait_table[] in sched/wait_bit.c are shared by all its users, which unfortunately vary in terms of class. So each should've been assigned its own class to avoid false positives. It'd better let Dept work at a higher layer than wait_bit. So disabled Dept within

[PATCH RFC v6 02/21] dept: Implement Dept(Dependency Tracker)

2022-05-04 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 a

[PATCH RFC v6 21/21] dept: Unstage wait when tagging a normal sleep wait

2022-05-04 Thread Byungchul Park
Staging a wait and commit have been introduced to handle conditional sleeps that can be determined in __schedule() whether it actually goes to sleep or not. With this feature, actual wait tagging is delayed until __schedule(). Unfortunately, an ambiguity arises when a normal sleep wait that doesn'

[PATCH RFC v6 09/21] dept: Add proc knobs to show stats and dependency graph

2022-05-04 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

[PATCH RFC v6 20/21] dept: Do not add dependencies between events within scheduler and sleeps

2022-05-04 Thread Byungchul Park
A sleep is not a wait that prevents the events within __schedule(). It rather goes through __schedule() so all the events are going to be triggered while sleeping. So they don't have any dependencies with each other. So distinguished sleep type of wait from the other type e.i. spinning and made it

[PATCH RFC v6 06/21] dept: Apply Dept to wait_for_completion()/complete()

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

[PATCH RFC v6 12/21] dept: Apply SDT to swait

2022-05-04 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..8080b29 100644 --- a/include/linux

[PATCH RFC v6 14/21] locking/lockdep, cpu/hotplus: Use a weaker annotation in AP thread

2022-05-04 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, fal

Re: [PATCH 1/2] module: add a function to add module references

2022-05-04 Thread Daniel Vetter
On Fri, Apr 29, 2022 at 12:36:01PM +0200, Greg KH wrote: > On Fri, Apr 29, 2022 at 11:23:51AM +0100, Mauro Carvalho Chehab wrote: > > Em Fri, 29 Apr 2022 12:10:07 +0200 > > Greg KH escreveu: > > > > > On Fri, Apr 29, 2022 at 10:15:03AM +0100, Mauro Carvalho Chehab wrote: > > > > HI Greg, > > > >

Re: [PATCH 3/3] dma-buf: generalize fence merging

2022-05-04 Thread Christian König
Am 04.05.22 um 10:43 schrieb Daniel Vetter: On Tue, Apr 26, 2022 at 02:46:37PM +0200, Christian König wrote: Introduce a dma_fence_merge() macro which allows to unwrap fences which potentially can be containers as well and then merge them back together into a flat dma_fence_array. Signed-off-by

Re: [PATCH] drm/todo: Add entry for using kunit in the subsystem

2022-05-04 Thread Daniel Vetter
On Wed, May 04, 2022 at 10:10:30AM +0200, Maxime Ripard wrote: > Hi, > > On Wed, May 04, 2022 at 10:02:12AM +0200, Javier Martinez Canillas wrote: > > The Kernel Unit Testing (KUnit) framework provides a common framework for > > unit tests within the Linux kernel. Having a test suite would allow t

Re: [PATCH v2] fbdev: Use helper to get fb_info in all file operations

2022-05-04 Thread Daniel Vetter
On Tue, May 03, 2022 at 10:19:34PM +0200, Javier Martinez Canillas wrote: > A reference to the framebuffer device struct fb_info is stored in the file > private data, but this reference could no longer be valid and must not be > accessed directly. Instead, the file_fb_info() accessor function must

[PATCH v2] drm/etnaviv: avoid cleaning up sched_job when submit succeeded

2022-05-04 Thread Lucas Stach
While the labels may mislead the casual reader, the tail of the function etnaviv_ioctl_gem_submit is always executed, as a lot of the structures set up in this function need to be cleaned up regardless of whether the submit succeeded or failed. An exception is the newly added drm_sched_job_cleanup

Re: [PATCH] drm/etnaviv: avoid cleaning up sched_job when submit succeeded

2022-05-04 Thread Lucas Stach
Am Mittwoch, dem 04.05.2022 um 10:14 +0200 schrieb Daniel Vetter: > On Fri, Apr 29, 2022 at 09:17:31PM +0200, Lucas Stach wrote: > > While the labels may mislead the casual reader, the tail of the function > > etnaviv_ioctl_gem_submit is always executed, as a lot of the structures > > set up in thi

Re: [PATCH 02/15] dma-buf: introduce user fence support

2022-05-04 Thread Christian König
Am 04.05.22 um 09:53 schrieb Tvrtko Ursulin: On 02/05/2022 17:37, Christian König wrote: [SNIP]   @@ -398,6 +408,8 @@ void dma_fence_enable_sw_signaling(struct dma_fence *fence);   static inline bool   dma_fence_is_signaled_locked(struct dma_fence *fence)   { +    WARN_ON(test_bit(DMA_FENC

Re: [PATCH v20 06/25] soc: mediatek: add mtk_mmsys_update_bits API

2022-05-04 Thread AngeloGioacchino Del Regno
Il 04/05/22 11:14, Nancy.Lin ha scritto: Add mtk_mmsys_update_bits API. Simplify code for update mmsys reg. It is a preparation for adding support for mmsys config API. Signed-off-by: Nancy.Lin Reviewed-by: AngeloGioacchino Del Regno

Re: [PATCH 01/11] drm: bridge: Add Samsung DSIM bridge driver

2022-05-04 Thread Jagan Teki
Hi Marek, On Tue, Apr 12, 2022 at 3:15 PM Marek Szyprowski wrote: > > Hi Jagan, > > On 08.04.2022 18:20, Jagan Teki wrote: > > Samsung MIPI DSIM controller is common DSI IP that can be used in various > > SoCs like Exynos, i.MX8M Mini/Nano. > > > > In order to access this DSI controller between v

Re: [PATCH 3/3] dma-buf: generalize fence merging

2022-05-04 Thread Daniel Vetter
On Tue, Apr 26, 2022 at 02:46:37PM +0200, Christian König wrote: > Introduce a dma_fence_merge() macro which allows to unwrap fences which > potentially can be containers as well and then merge them back together > into a flat dma_fence_array. > > Signed-off-by: Christian König > --- > drivers/d

Re: [PATCH v2] fbdev: Use helper to get fb_info in all file operations

2022-05-04 Thread Thomas Zimmermann
Hi Am 04.05.22 um 11:02 schrieb Daniel Vetter: On Tue, May 03, 2022 at 10:19:34PM +0200, Javier Martinez Canillas wrote: A reference to the framebuffer device struct fb_info is stored in the file private data, but this reference could no longer be valid and must not be accessed directly. Instea

Re: [PATCH 4/4] drm/qxl: add drm_gem_plane_helper_prepare_fb

2022-05-04 Thread Daniel Vetter
On Fri, Apr 29, 2022 at 03:42:30PM +0200, Christian König wrote: > We could need to wait for the pin to complete here. > > Signed-off-by: Christian König > Cc: Dave Airlie > Cc: Gerd Hoffmann > Cc: virtualizat...@lists.linux-foundation.org > Cc: spice-de...@lists.freedesktop.org Reviewed-by: D

Re: [PATCH v2] fbdev: Use helper to get fb_info in all file operations

2022-05-04 Thread Javier Martinez Canillas
Hello Daniel, On 5/4/22 11:02, Daniel Vetter wrote: > On Tue, May 03, 2022 at 10:19:34PM +0200, Javier Martinez Canillas wrote: >> A reference to the framebuffer device struct fb_info is stored in the file >> private data, but this reference could no longer be valid and must not be >> accessed dir

Re: [PATCH v4] drm/ast: Create the driver for ASPEED proprietory Display-Port

2022-05-04 Thread Thomas Zimmermann
Hi Am 04.05.22 um 10:49 schrieb Kuo-Hsiang Chou: Hi Thomas, Thanks for your efforts to review this patch. Now, I observe a change that after DP unplugged and then the system is unable to get EDID from D-sub connecting. The reason seems that TXs are merged into union structure in /drivers/g

Re: [PATCH] drm: drm_gem.h: Add explicit includes for DEFINE_DRM_GEM_FOPS

2022-05-04 Thread Daniel Vetter
On Mon, May 02, 2022 at 06:41:39PM +0300, Jani Nikula wrote: > On Fri, 29 Apr 2022, Jeffrey Hugo wrote: > > DEFINE_DRM_GEM_FOPS() references drm functions from other headers. For > > example drm_open() is defined in drm_file.h and drm_ioctl() is defined > > in drm_ioctl.h. Since drm_gem.h doesn'

Re: [Intel-gfx] [PATCH 0/3] i915 private writeback framework

2022-05-04 Thread Daniel Vetter
On Mon, May 02, 2022 at 11:12:16AM +0530, Suraj Kandpal wrote: > A patch series was floated in the drm mailing list which aimed to change > the drm_connector and drm_encoder fields to pointer in the > drm_connector_writeback structure, this received a huge pushback from > the community but since i9

Re: [PATCH 01/11] drm: bridge: Add Samsung DSIM bridge driver

2022-05-04 Thread Marek Szyprowski
Hi Jagan, On 04.05.2022 11:16, Jagan Teki wrote: > Hi Marek, > > On Tue, Apr 12, 2022 at 3:15 PM Marek Szyprowski > wrote: >> Hi Jagan, >> >> On 08.04.2022 18:20, Jagan Teki wrote: >>> Samsung MIPI DSIM controller is common DSI IP that can be used in various >>> SoCs like Exynos, i.MX8M Mini/Nano

Re: [PATCH 2/2] fbdev: Make fb_release() return -ENODEV if fbdev was unregistered

2022-05-04 Thread Daniel Vetter
On Mon, May 02, 2022 at 03:09:44PM +0200, Javier Martinez Canillas wrote: > A reference to the framebuffer device struct fb_info is stored in the file > private data, but this reference could no longer be valid and must not be > accessed directly. Instead, the file_fb_info() accessor function must

Re: [PATCH v2] fbdev: Make fb_release() return -ENODEV if fbdev was unregistered

2022-05-04 Thread Daniel Vetter
On Tue, May 03, 2022 at 05:28:09PM +0200, Javier Martinez Canillas wrote: > On 5/2/22 15:50, Javier Martinez Canillas wrote: > > A reference to the framebuffer device struct fb_info is stored in the file > > private data, but this reference could no longer be valid and must not be > > accessed dire

Re: [PATCH 1/3] drm: Add DRM-managed mutex_init()

2022-05-04 Thread Daniel Vetter
On Mon, May 02, 2022 at 04:25:12PM +0200, Thomas Zimmermann wrote: > Add drmm_mutex_init(), a helper that provides managed mutex cleanup. The > mutex will be destroyed with the final reference of the DRM device. > > Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter on this one, ack fo

RE: [Intel-gfx] [PATCH 0/3] i915 private writeback framework

2022-05-04 Thread Kandpal, Suraj
Hi Daniel, > > A patch series was floated in the drm mailing list which aimed to > > change the drm_connector and drm_encoder fields to pointer in the > > drm_connector_writeback structure, this received a huge pushback from > > the community but since i915 expects each connector present in the >

Re: [Intel-gfx] [PATCH 0/3] i915 private writeback framework

2022-05-04 Thread Daniel Vetter
On Wed, May 04, 2022 at 09:52:34AM +, Kandpal, Suraj wrote: > Hi Daniel, > > > > A patch series was floated in the drm mailing list which aimed to > > > change the drm_connector and drm_encoder fields to pointer in the > > > drm_connector_writeback structure, this received a huge pushback from

Re: [PATCH 1/4] mgag200: Add FB_DAMAGE_CLIPS support

2022-05-04 Thread Thomas Zimmermann
Am 26.04.22 um 18:41 schrieb Jocelyn Falempe: The driver does support damage clips, but doesn't advertise it. So when running gnome/wayland on Matrox hardware, the full frame is copied to the slow Matrox memory, which leads to very poor performances. Add drm_plane_enable_fb_damage_clips() to a

Re: [PATCH 2/4] mgag200: Optimize damage clips

2022-05-04 Thread Thomas Zimmermann
Hi Am 26.04.22 um 18:41 schrieb Jocelyn Falempe: when there are multiple damage clips, previous code merged them into one big rectangle. As the Matrox memory is very slow, it's faster to copy each damage clip. Signed-off-by: Jocelyn Falempe Reviewed-by: Thomas Zimmermann How do you measure

Re: Tackling the indefinite/user DMA fence problem

2022-05-04 Thread Daniel Vetter
On Mon, May 02, 2022 at 06:37:07PM +0200, Christian König wrote: > Hello everyone, > > it's a well known problem that the DMA-buf subsystem mixed > synchronization and memory management requirements into the same > dma_fence and dma_resv objects. Because of this dma_fence objects need > to guarant

Re: [PATCH 2/2] fbdev: Make fb_release() return -ENODEV if fbdev was unregistered

2022-05-04 Thread Javier Martinez Canillas
Hello Daniel, On 5/4/22 11:47, Daniel Vetter wrote: > On Mon, May 02, 2022 at 03:09:44PM +0200, Javier Martinez Canillas wrote: >> A reference to the framebuffer device struct fb_info is stored in the file >> private data, but this reference could no longer be valid and must not be >> accessed dir

  1   2   3   >