[PATCH] drm: bridge: it66121: Added it66121 chip external screen status judgment

2021-09-21 Thread Yunlongli
In the actual tests, the IT66121 chip sometimes misjudged whether it had an external screen, so, reference the it66121_user_guid.pdf about Audio/Video data is stable or not A typical initialization of HDMI link should be based on interrupt signal and appropriate register probing. Recommended flow

Re: [PATCH] drm: bridge: it66121: Added it66121 chip external screen status judgment

2021-09-21 Thread Neil Armstrong
Hi, On 21/09/2021 09:54, Yunlongli wrote: > In the actual tests, the IT66121 chip sometimes misjudged whether > it had an external screen, so, reference the it66121_user_guid.pdf > about Audio/Video data is stable or not A typical initialization > of HDMI link should be based on interrupt signal

Re: [PATCH v2 0/4] CMDQ refinement of Mediatek DRM driver

2021-09-21 Thread Enric Balletbo Serra
Hi Chun-Kuang, Missatge de Chun-Kuang Hu del dia dj., 12 d’ag. 2021 a les 2:13: > Chun-Kuang Hu 於 2021年8月9日 週一 上午7:47寫道: > > > > These refinements include using standard mailbox callback interface, > > timeout detection, and a fixed cmdq_handle. > > For this series, applied to mediatek-drm-next

Re: [PATCH v2 0/4] CMDQ refinement of Mediatek DRM driver

2021-09-21 Thread Enric Balletbo Serra
Hi Chun-Kuang, (again without html format, sorry for the noise) Missatge de Chun-Kuang Hu del dia dj., 12 d’ag. 2021 a les 2:13: > > Chun-Kuang Hu 於 2021年8月9日 週一 上午7:47寫道: > > > > These refinements include using standard mailbox callback interface, > > timeout detection, and a fixed cmdq_handle

Re: [PATCH v3 00/13] drm/i915/dp: dp 2.0 enabling prep work

2021-09-21 Thread Jani Nikula
On Fri, 17 Sep 2021, Maxime Ripard wrote: > On Fri, Sep 17, 2021 at 03:54:23PM +0300, Jani Nikula wrote: >> On Thu, 09 Sep 2021, Jani Nikula wrote: >> > v3 of https://patchwork.freedesktop.org/series/93800/ with minor tweaks >> > and the already merged patches obviously dropped. >> > >> > Jani Ni

Re: [PATCH v3 12/13] drm/i915/dg2: configure TRANS_DP2_VFREQ{HIGH, LOW} for 128b/132b

2021-09-21 Thread Jani Nikula
On Fri, 17 Sep 2021, Ville Syrjälä wrote: > On Thu, Sep 09, 2021 at 03:52:04PM +0300, Jani Nikula wrote: >> There's a new register pair for 128b/132b mode where you need to set the >> pixel clock in Hz. >> >> v2: Fix UHBR rate check, use intel_dp_is_uhbr() helper >> >> Bspec: 54128 >> Signed-off

Re: [PATCH 2/2] Add drm buddy manager support to amdgpu driver

2021-09-21 Thread Christian König
Am 20.09.21 um 21:21 schrieb Arunpravin: Replace drm_mm with drm buddy manager for VRAM memory management Signed-off-by: Arunpravin --- .../gpu/drm/amd/amdgpu/amdgpu_res_cursor.h| 78 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vram

Re: [PATCH v3] drm/rockchip: Update crtc fixup to account for fractional clk change

2021-09-21 Thread Heiko Stuebner
On Thu, 16 Sep 2021 15:29:07 -0500, Chris Morgan wrote: > After commit 928f9e268611 ("clk: fractional-divider: Hide > clk_fractional_divider_ops from wide audience") was merged it appears > that the DSI panel on my Odroid Go Advance stopped working. Upon closer > examination of the problem, it look

[PATCH] drm/nouveau/fifo/ga102: initialise chid on return from channel creation

2021-09-21 Thread Ben Skeggs
From: Ben Skeggs Turns out caller isn't zero-initialised after-all. Fixes: 6b457230bfa1 ("drm/nouveau/ga102-: support ttm buffer moves via copy engine") Reported-by: Karol Herbst Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/nvkm/engine/fifo/ga102.c | 3 +++ 1 file changed, 3 inserti

Re: [PATCH v2] drm/rockchip: cdn-dp-core: Fix cdn_dp_resume unused warning

2021-09-21 Thread Heiko Stuebner
On Fri, 10 Sep 2021 20:43:18 -0700, Palmer Dabbelt wrote: > cdn_dp_resume is only used under PM_SLEEP, and now that it's static an > unused function warning is triggered undner !PM_SLEEP. This marks the > function as possibly unused, to avoid triggering compiler warnings. Applied, thanks! [1/1]

Re: [Intel-gfx] [PATCH 13/26] drm/i915: use the new iterator in i915_gem_busy_ioctl

2021-09-21 Thread Christian König
Am 20.09.21 um 12:33 schrieb Tvrtko Ursulin: On 20/09/2021 11:13, Christian König wrote: Am 20.09.21 um 10:45 schrieb Tvrtko Ursulin: On 17/09/2021 13:35, Christian König wrote: This makes the function much simpler since the complex retry logic is now handled else where. Signed-off-by: Chris

Re: [PATCH v2 3/6] drm/edid: Add cea_sad helpers for freq/length

2021-09-21 Thread Jani Nikula
On Mon, 20 Sep 2021, Markus Schneider-Pargmann wrote: > This patch adds two helper functions that extract the frequency and word > length from a struct cea_sad. > > For these helper functions new defines are added that help translate the > 'freq' and 'byte2' fields into real numbers. > > Signed-of

Re: [PATCH] doc: gpu: drm-internals: Create reference to DRM mm

2021-09-21 Thread Jani Nikula
On Mon, 20 Sep 2021, Markus Schneider-Pargmann wrote: > Hi Jani, > > On Mon, Sep 20, 2021 at 02:01:57PM +0300, Jani Nikula wrote: >> On Mon, 20 Sep 2021, Markus Schneider-Pargmann wrote: >> > This short sentence references nothing for details about memory manager. >> > Replace it with the documen

Re: [PATCH] drm/rockchip: Check iommu itself instead of it's parent for device_is_available

2021-09-21 Thread Heiko Stuebner
On Sun, 27 Jun 2021 16:47:37 +0800, Andy Yan wrote: > When iommu itself is disabled in dts, we should > fallback to non-iommu buffer, check iommu parent > is meanless here. Applied, thanks! [1/1] drm/rockchip: Check iommu itself instead of it's parent for device_is_available commit: e1202c

Re: [PATCH] drm/rockchip: add DRM_BRIDGE_ATTACH_NO_CONNECTOR flag to drm_bridge_attach

2021-09-21 Thread Heiko Stuebner
On Mon, 13 Sep 2021 14:51:08 +0200, Alex Bee wrote: > Commit a25b988ff83f ("drm/bridge: Extend bridge API to disable connector > creation") > added DRM_BRIDGE_ATTACH_NO_CONNECTOR bridge flag and all bridges handle > this flag in some way since then. > Newly added bridge drivers must no longer cont

Re: [PATCH] drm/rockchip: dsi: Fix duplicate included linux/phy/phy.h

2021-09-21 Thread Heiko Stuebner
On Fri, 20 Aug 2021 18:18:49 +0800, Jiapeng Chong wrote: > Clean up the following includecheck warning: > > ./drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c: linux/phy/phy.h is > included more than once. Applied, thanks! [1/1] drm/rockchip: dsi: Fix duplicate included linux/phy/phy.h comm

Re: [PATCH] drm/rockchip: handle non-platform devices in rockchip_drm_endpoint_is_subdriver

2021-09-21 Thread Heiko Stuebner
On Tue, 14 Sep 2021 17:07:56 +0200, Alex Bee wrote: > As discussed at [1] rockchip_drm_endpoint_is_subdriver will currently always > return -ENODEV for non-platform-devices (e.g. external i2c bridges), what > makes them never being considered in rockchip_rgb_init. > > As suggested at [1] this addi

Re: [PATCH] drm/rockchip: Make use of the helper function devm_platform_ioremap_resource()

2021-09-21 Thread Heiko Stuebner
On Tue, 31 Aug 2021 21:57:21 +0800, Cai Huoqing wrote: > Use the devm_platform_ioremap_resource() helper instead of > calling platform_get_resource() and devm_ioremap_resource() > separately Applied, thanks! [1/1] drm/rockchip: Make use of the helper function devm_platform_ioremap_resource()

Re: [PATCH] drm/rockchip: dsi: make hstt_table static

2021-09-21 Thread Heiko Stuebner
On Fri, 6 Aug 2021 10:57:44 +0800, Jiapeng Chong wrote: > This symbol is not used outside of dw-mipi-dsi-rockchip.c, so marks > it static. > > Fix the following sparse warning: > > drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c:646:13: warning: symbol > 'hstt_table' was not declared. Should it b

Re: [PATCH] drm/rockchip: remove unused psr_list{,_lock}

2021-09-21 Thread Heiko Stuebner
On Wed, 15 Sep 2021 13:50:11 -0700, Brian Norris wrote: > Some leftover cleanup from commit 6c836d965bad ("drm/rockchip: Use the > helpers for PSR"). Applied, thanks! [1/1] drm/rockchip: remove unused psr_list{,_lock} commit: d3e2ec6cd1636ced67c6f57d95d8ad24f964691d Best regards, -- Heiko

Re: [PATCH] drm/rockchip: remove of_match_ptr() from vop_driver_dt_match

2021-09-21 Thread Heiko Stuebner
On Tue, 8 Jun 2021 00:38:00 +0530, Souptick Joarder wrote: > kernel test robot throws warning when CONFIG_OF not set. > > >> drivers/gpu/drm/rockchip/rockchip_vop_reg.c:1038:34: > warning: unused variable 'vop_driver_dt_match' [-Wunused-const-variable] >static const struct of_device_id vop_dri

Re: [PATCH v2] drm/rockchip: remove of_match_ptr()

2021-09-21 Thread Heiko Stuebner
On Tue, 8 Jun 2021 00:18:36 +0530, Souptick Joarder wrote: > Kernel test robot throws below warning when CONFIG_OF > is not set. > > >> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34: > warning: unused variable 'rockchip_dp_dt_ids' [-Wunused-const-variable] >static const struct of_devi

Re: [PATCH v2 3/6] drm/edid: Add cea_sad helpers for freq/length

2021-09-21 Thread Markus Schneider-Pargmann
Hi Jani, On Tue, Sep 21, 2021 at 12:49:31PM +0300, Jani Nikula wrote: > On Mon, 20 Sep 2021, Markus Schneider-Pargmann wrote: > > This patch adds two helper functions that extract the frequency and word > > length from a struct cea_sad. > > > > For these helper functions new defines are added tha

Re: [PATCH v1] drm/i915/bdb: Fix version check

2021-09-21 Thread Lukasz Majczak
pon., 20 wrz 2021 o 22:47 Souza, Jose napisał(a): > > On Mon, 2021-09-20 at 16:11 +0200, Lukasz Majczak wrote: > > With patch "drm/i915/vbt: Fix backlight parsing for VBT 234+" > > the size of bdb_lfp_backlight_data structure has been increased, > > causing if-statement in the parse_lfp_backlight

Re: [PATCH v1] drm/i915/bdb: Fix version check

2021-09-21 Thread Jani Nikula
On Tue, 21 Sep 2021, Radosław Biernacki wrote: > - dropping stable > > ... > >> > diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h >> > b/drivers/gpu/drm/i915/display/intel_vbt_defs.h >> > index 330077c2e588..fff456bf8783 100644 >> > --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h >

[PATCH v4 01/14] drm/ttm: stop calling tt_swapin in vm_access

2021-09-21 Thread Matthew Auld
In commit: commit 09ac4fcb3f255e9225967c75f5893325c116cdbe Author: Felix Kuehling Date: Thu Jul 13 17:01:16 2017 -0400 drm/ttm: Implement vm_operations_struct.access v2 we added the vm_access hook, where we also directly call tt_swapin for some reason. If something is swapped-out then the

[PATCH v4 02/14] drm/ttm: stop setting page->index for the ttm_tt

2021-09-21 Thread Matthew Auld
In commit: commit 58aa6622d32af7d2c08d45085f44c54554a16ed7 Author: Thomas Hellstrom Date: Fri Jan 3 11:47:23 2014 +0100 drm/ttm: Correctly set page mapping and -index members we started setting the page->mapping and page->index to point to the virtual address space, if the pages were faul

[PATCH v4 03/14] drm/ttm: move ttm_tt_{add, clear}_mapping into amdgpu

2021-09-21 Thread Matthew Auld
Now that setting page->index shouldn't be needed anymore, we are just left with setting page->mapping, and here it looks like amdgpu is the only user, where pointing the page->mapping at the dev_mapping is used to verify that the pages do indeed belong to the device, if userspace later tries to tou

[PATCH v4 04/14] drm/ttm: remove TTM_PAGE_FLAG_NO_RETRY

2021-09-21 Thread Matthew Auld
No longer used it seems. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Christian König Reviewed-by: Christian König --- include/drm/ttm/ttm_tt.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h index 89b15d673b22..842ce756213c 10064

[PATCH v4 05/14] drm/ttm: s/FLAG_SG/FLAG_EXTERNAL/

2021-09-21 Thread Matthew Auld
It covers more than just ttm_bo_type_sg usage, like with say dma-buf, since one other user is userptr in amdgpu, and in the future we might have some more. Hence EXTERNAL is likely a more suitable name. v2(Christian): - Rename these to TTM_TT_FLAGS_* - Fix up all the holes in the flag values

[PATCH v4 06/14] drm/ttm: add some kernel-doc for TTM_TT_FLAG_*

2021-09-21 Thread Matthew Auld
Move it to inline kernel-doc, otherwise we can't add empty lines it seems. Also drop the kernel-doc for pages_list, which doesn't seem to exist. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Christian König --- include/drm/ttm/ttm_tt.h | 57 ++-- 1 fi

[PATCH v4 09/14] drm/i915/ttm: add tt shmem backend

2021-09-21 Thread Matthew Auld
For cached objects we can allocate our pages directly in shmem. This should make it possible(in a later patch) to utilise the existing i915-gem shrinker code for such objects. For now this is still disabled. v2(Thomas): - Add optional try_to_writeback hook for objects. Importantly we need to

[PATCH v4 07/14] drm/ttm: add TTM_TT_FLAG_EXTERNAL_MAPPABLE

2021-09-21 Thread Matthew Auld
In commit: commit 667a50db0477d47fdff01c666f5ee1ce26b5264c Author: Thomas Hellstrom Date: Fri Jan 3 11:17:18 2014 +0100 drm/ttm: Refuse to fault (prime-) imported pages we introduced the restriction that imported pages should not be directly mappable through TTM(this also extends to userp

[PATCH v4 08/14] drm/i915/gem: Break out some shmem backend utils

2021-09-21 Thread Matthew Auld
From: Thomas Hellström Break out some shmem backend utils for future reuse by the TTM backend: shmem_alloc_st(), shmem_free_st() and __shmem_writeback() which we can use to provide a shmem-backed TTM page pool for cached-only TTM buffer objects. Main functional change here is that we now compute

[PATCH v4 11/14] drm/i915/ttm: use cached system pages when evicting lmem

2021-09-21 Thread Matthew Auld
This should let us do an accelerated copy directly to the shmem pages when temporarily moving lmem-only objects, where the i915-gem shrinker can later kick in to swap out the pages, if needed. Signed-off-by: Matthew Auld Cc: Thomas Hellström --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 8 -

[PATCH v4 10/14] drm/i915/ttm: hide shmem objects from TTM LRU

2021-09-21 Thread Matthew Auld
This is probably a NAK. But ideally we need to somehow prevent TTM from seeing shmem objects when doing its LRU swap walk. Since these are EXTERNAL they are ignored anyway, but keeping them in the LRU seems pretty wasteful. Trying to use bo_pin() for this is all kinds of nasty since we need to be

[PATCH v4 12/14] drm/i915: try to simplify make_{un}shrinkable

2021-09-21 Thread Matthew Auld
Drop the atomic shrink_pin stuff, and just have make_{un}shrinkable update the shrinker visible lists immediately. This at least simplifies the next patch, and does make the behaviour more obvious. The potential downside is that make_unshrinkable now grabs a global lock even when the object itself

[PATCH v4 13/14] drm/i915/ttm: make evicted shmem pages visible to the shrinker

2021-09-21 Thread Matthew Auld
We currently just evict lmem objects to system memory when under memory pressure. For this case we lack the usual object mm.pages, which effectively hides the pages from the i915-gem shrinker, until we actually "attach" the TT to the object, or in the case of lmem-only objects it just gets migrated

[PATCH v4 14/14] drm/i915/ttm: enable shmem tt backend

2021-09-21 Thread Matthew Auld
Enable shmem tt backend, and enable shrinking. Signed-off-by: Matthew Auld Cc: Thomas Hellström --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c index f68481b852ff..

[RFC PATCH] component: do not leave master devres group open after bind

2021-09-21 Thread Kai Vehmanen
In current code, the devres group for aggregate master is left open after call to component_master_add_*(). This leads to problems when the master does further managed allocations on its own. When any participating driver calls component_del(), this leads to immediate release of resources. This ca

Re: [PATCH v4 01/14] drm/ttm: stop calling tt_swapin in vm_access

2021-09-21 Thread Christian König
Am 21.09.21 um 13:01 schrieb Matthew Auld: In commit: commit 09ac4fcb3f255e9225967c75f5893325c116cdbe Author: Felix Kuehling Date: Thu Jul 13 17:01:16 2017 -0400 drm/ttm: Implement vm_operations_struct.access v2 we added the vm_access hook, where we also directly call tt_swapin for som

Re: [PATCH v4 03/14] drm/ttm: move ttm_tt_{add,clear}_mapping into amdgpu

2021-09-21 Thread Christian König
Am 21.09.21 um 13:01 schrieb Matthew Auld: Now that setting page->index shouldn't be needed anymore, we are just left with setting page->mapping, and here it looks like amdgpu is the only user, where pointing the page->mapping at the dev_mapping is used to verify that the pages do indeed belong t

Re: [PATCH v4 05/14] drm/ttm: s/FLAG_SG/FLAG_EXTERNAL/

2021-09-21 Thread Christian König
Am 21.09.21 um 13:01 schrieb Matthew Auld: It covers more than just ttm_bo_type_sg usage, like with say dma-buf, since one other user is userptr in amdgpu, and in the future we might have some more. Hence EXTERNAL is likely a more suitable name. v2(Christian): - Rename these to TTM_TT_FLAGS_*

Re: [PATCH v4 06/14] drm/ttm: add some kernel-doc for TTM_TT_FLAG_*

2021-09-21 Thread Christian König
Am 21.09.21 um 13:01 schrieb Matthew Auld: Move it to inline kernel-doc, otherwise we can't add empty lines it seems. Also drop the kernel-doc for pages_list, which doesn't seem to exist. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Christian König One comment below, with that fixed

Re: [PATCH v4 01/14] drm/ttm: stop calling tt_swapin in vm_access

2021-09-21 Thread Thomas Hellström
HI, Christian, On Tue, 2021-09-21 at 13:28 +0200, Christian König wrote: > Am 21.09.21 um 13:01 schrieb Matthew Auld: > > In commit: > > > > commit 09ac4fcb3f255e9225967c75f5893325c116cdbe > > Author: Felix Kuehling > > Date:   Thu Jul 13 17:01:16 2017 -0400 > > > > drm/ttm: Implement vm_op

Re: [PATCH v4 01/14] drm/ttm: stop calling tt_swapin in vm_access

2021-09-21 Thread Christian König
Am 21.09.21 um 13:37 schrieb Thomas Hellström: HI, Christian, On Tue, 2021-09-21 at 13:28 +0200, Christian König wrote: Am 21.09.21 um 13:01 schrieb Matthew Auld: In commit: commit 09ac4fcb3f255e9225967c75f5893325c116cdbe Author: Felix Kuehling Date:   Thu Jul 13 17:01:16 2017 -0400 dr

Re: [PATCH] drm/nouveau/fifo/ga102: initialise chid on return from channel creation

2021-09-21 Thread Karol Herbst
On Tue, Sep 21, 2021 at 11:07 AM Ben Skeggs wrote: > > From: Ben Skeggs > > Turns out caller isn't zero-initialised after-all. > > Fixes: 6b457230bfa1 ("drm/nouveau/ga102-: support ttm buffer moves via copy > engine") > Reported-by: Karol Herbst > Signed-off-by: Ben Skeggs > --- > drivers/gpu

Re: [PATCH v4 10/14] drm/i915/ttm: hide shmem objects from TTM LRU

2021-09-21 Thread Christian König
Am 21.09.21 um 13:01 schrieb Matthew Auld: This is probably a NAK. But ideally we need to somehow prevent TTM from seeing shmem objects when doing its LRU swap walk. Since these are EXTERNAL they are ignored anyway, but keeping them in the LRU seems pretty wasteful. Trying to use bo_pin() for th

[PATCH] MAINTAINERS: fix typo in DRM DRIVER FOR SAMSUNG S6D27A1 PANELS

2021-09-21 Thread Lukas Bulwahn
Commit ebd8cbf1fb96 ("drm/panel: s6d27a1: Add driver for Samsung S6D27A1 display panel") introduces a new section DRM DRIVER FOR SAMSUNG S6D27A1 PANELS with a minor typo in one of its file entries. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains: warning: no file matches F:

Re: [PATCH 1/3] drm/bridge: Add a function to abstract away panels

2021-09-21 Thread Patrik Jakobsson
On Fri, Sep 10, 2021 at 3:10 PM Maxime Ripard wrote: > > Display drivers so far need to have a lot of boilerplate to first > retrieve either the panel or bridge that they are connected to using > drm_of_find_panel_or_bridge(), and then either deal with each with ad-hoc > functions or create a drm

Re: [Intel-gfx] [PATCH] drm/i915/guc/slpc: remove unneeded clflush calls

2021-09-21 Thread Ville Syrjälä
On Mon, Sep 20, 2021 at 10:47:08PM -0700, Lucas De Marchi wrote: > On Wed, Sep 15, 2021 at 12:29:12PM -0700, John Harrison wrote: > >On 9/15/2021 12:24, Belgaumkar, Vinay wrote: > >>On 9/14/2021 12:51 PM, Lucas De Marchi wrote: > >>>The clflush calls here aren't doing anything since we are not writ

Re: [Intel-gfx] [PATCH 13/26] drm/i915: use the new iterator in i915_gem_busy_ioctl

2021-09-21 Thread Tvrtko Ursulin
On 21/09/2021 10:41, Christian König wrote: Am 20.09.21 um 12:33 schrieb Tvrtko Ursulin: On 20/09/2021 11:13, Christian König wrote: Am 20.09.21 um 10:45 schrieb Tvrtko Ursulin: On 17/09/2021 13:35, Christian König wrote: This makes the function much simpler since the complex retry logic i

Re: [PATCH v2 0/4] CMDQ refinement of Mediatek DRM driver

2021-09-21 Thread Chun-Kuang Hu
Hi, Enric: Enric Balletbo Serra 於 2021年9月21日 週二 下午4:36寫道: > > Hi Chun-Kuang, > > (again without html format, sorry for the noise) > > Missatge de Chun-Kuang Hu del dia dj., 12 > d’ag. 2021 a les 2:13: > > > > Chun-Kuang Hu 於 2021年8月9日 週一 上午7:47寫道: > > > > > > These refinements include using sta

Re: [PATCH v2 6/9] vfio/mdev: Add mdev available instance checking to the core

2021-09-21 Thread Jason Gunthorpe
On Mon, Sep 20, 2021 at 08:02:29PM +0200, Cornelia Huck wrote: > On Thu, Sep 09 2021, Jason Gunthorpe wrote: > > > Many of the mdev drivers use a simple counter for keeping track of the > > available instances. Move this code to the core code and store the counter > > in the mdev_type. Implement

Re: [PATCH] drm/nouveau/ga102: Free resources on error in ga102_chan_new()

2021-09-21 Thread Tim Gardner
On 9/20/21 8:07 PM, Karol Herbst wrote: On Mon, Sep 20, 2021 at 8:17 PM Tim Gardner wrote: Coverity complains of a resource leak in ga102_chan_new(): CID 119637 (#7 of 7): Resource leak (RESOURCE_LEAK) 13. leaked_storage: Variable chan going out of scope leaks the storage it points to. 19

Re: [RFC PATCH v3 1/6] drm/doc: Color Management and HDR10 RFC

2021-09-21 Thread Pekka Paalanen
On Mon, 20 Sep 2021 20:14:50 -0400 Harry Wentland wrote: > On 2021-09-15 10:01, Pekka Paalanen wrote:> On Fri, 30 Jul 2021 16:41:29 -0400 > > Harry Wentland wrote: > > > >> Use the new DRM RFC doc section to capture the RFC previously only > >> described in the cover letter at > >> https://pa

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

2021-09-21 Thread Lee Jones
On Sat, 11 Sep 2021, Marek Vasut wrote: > On 7/13/21 9:16 PM, Marek Vasut wrote: > > The note in c2adda27d202f ("video: backlight: Add of_find_backlight helper > > in backlight.c") says that gpio-backlight uses brightness as power state. > > This has been fixed since in ec665b756e6f7 ("backlight:

[PATCH v2] drm/i915/request: fix early tracepoints

2021-09-21 Thread Matthew Auld
Currently we blow up in trace_dma_fence_init, when calling into get_driver_name or get_timeline_name, since both the engine and context might be NULL(or contain some garbage address) in the case of newly allocated slab objects via the request ctor. Note that we also use SLAB_TYPESAFE_BY_RCU here, w

Re: [Intel-gfx] [PATCH v2 2/6] drm/i915/uncore: Associate shadow table with uncore

2021-09-21 Thread Tvrtko Ursulin
On 10/09/2021 21:10, Matt Roper wrote: Store a reference to a platform's shadow table inside the uncore, the same as we do with the forcewake table. This will allow us to use a single set of functions that operate on the shadow table reference rather than generating lots of nearly-identical fu

Re: [PATCH v2 1/6] drm/i915/uncore: Convert gen6/gen7 read operations to fwtable

2021-09-21 Thread Tvrtko Ursulin
On 10/09/2021 21:10, Matt Roper wrote: On gen6-gen8 (except vlv/chv) we don't use a forcewake lookup table; we simply check whether the register offset is < 0x4, and return FORCEWAKE_RENDER if it is. To prepare for upcoming refactoring, let's define a single-entry forcewake table from [0x0

[PATCH 0/3] drm/omap: add crtc properties

2021-09-21 Thread Neil Armstrong
This patchset adds the following CRTC properties: - background color - transparency keying property - alpha blender on DSS3 Tomi Valkeinen (3): drm/omap: add crtc background property drm/omap: add crtc transparency key property drm/omap: add alpha blender property drivers/gpu/drm/omapdrm/d

[PATCH 1/3] drm/omap: add crtc background property

2021-09-21 Thread Neil Armstrong
From: Tomi Valkeinen Add DRM properties for crtc background color property. Background color is shown on areas where there are no planes. Signed-off-by: Tomi Valkeinen Signed-off-by: Neil Armstrong --- drivers/gpu/drm/omapdrm/omap_crtc.c | 22 +- drivers/gpu/drm/omapdrm/om

[PATCH 2/3] drm/omap: add crtc transparency key property

2021-09-21 Thread Neil Armstrong
From: Tomi Valkeinen Add support for transparency keying. User space must understand how the TCK works and needs to place the planes to correct zpos. The generic zpos normalization in DRM however is going to do normalization and might move the position of the planes which breaks the TCK as plane

[PATCH 3/3] drm/omap: add alpha blender property

2021-09-21 Thread Neil Armstrong
From: Tomi Valkeinen Add support to enable/disable alpha blender on DSS3. Signed-off-by: Tomi Valkeinen Signed-off-by: Neil Armstrong --- drivers/gpu/drm/omapdrm/dss/dispc.c | 4 ++-- drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 +- drivers/gpu/drm/omapdrm/omap_crtc.c | 10 +- driv

Re: [Intel-gfx] [PATCH v2 3/6] drm/i915/uncore: Replace gen8 write functions with general fwtable

2021-09-21 Thread Tvrtko Ursulin
On 10/09/2021 21:10, Matt Roper wrote: Now that we have both a standard forcewake table (albeit a single-entry table) and the shadow table stored in the uncore, we can drop the gen8-specific write handlers in favor of the general fwtable version. Signed-off-by: Matt Roper --- drivers/gpu/dr

Re: [PATCH 0/3] drm/omap: add crtc properties

2021-09-21 Thread Tomi Valkeinen
Hi Neil, On 21/09/2021 17:16, Neil Armstrong wrote: This patchset adds the following CRTC properties: - background color - transparency keying property - alpha blender on DSS3 Tomi Valkeinen (3): drm/omap: add crtc background property drm/omap: add crtc transparency key property drm/om

[PATCH] drm/i915/selftests: exercise shmem_writeback with THP

2021-09-21 Thread Matthew Auld
In commit: commit 1e6decf30af5c5c75445ed6ad4e65a26de578a03 Author: Hugh Dickins Date: Thu Sep 2 14:54:43 2021 -0700 shmem: shmem_writepage() split unlikely i915 THP it looks THP + shmem_writeback was an unexpected combination, and ends up hitting some BUG_ON, but it also looks like that i

Re: [PATCH 0/3] drm/omap: add crtc properties

2021-09-21 Thread Neil Armstrong
Hi Tomi, On 21/09/2021 16:28, Tomi Valkeinen wrote: > Hi Neil, > > On 21/09/2021 17:16, Neil Armstrong wrote: >> This patchset adds the following CRTC properties: >> - background color >> - transparency keying property >> - alpha blender on DSS3 >> >> Tomi Valkeinen (3): >>    drm/omap: add crtc

[Bug 211277] sometimes crash at s2ram-wake (Ryzen 3500U): amdgpu, drm, commit_tail, amdgpu_dm_atomic_commit_tail

2021-09-21 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=211277 --- Comment #67 from James Zhu (jam...@amd.com) --- (In reply to youling257 from comment #66) > resume failed record video, > https://drive.google.com/drive/folders/1bWMC4ByGvudC9zBk-9Xgamz- > shir0pqX?usp=sharing Can you try apply this patch: h

Re: [PATCH v2 4/6] drm/i915/uncore: Drop gen11/gen12 mmio write handlers

2021-09-21 Thread Tvrtko Ursulin
On 10/09/2021 21:10, Matt Roper wrote: Now that the reference to the shadow table is stored within the uncore, we don't need to generate separate fwtable, gen11_fwtable, and gen12_fwtable variants of the register write functions; a single 'fwtable' implementation will work for all of those plat

Re: [PATCH v2 5/6] drm/i915/uncore: Drop gen11 mmio read handlers

2021-09-21 Thread Tvrtko Ursulin
On 10/09/2021 21:10, Matt Roper wrote: Consolidate down to just a single 'fwtable' implementation. For reads we don't need to worry about shadow tables. Also, the NEEDS_FORCE_WAKE() check we previously had in the fwtable implementation can be dropped --- if a register is outside that range on

Re: [Intel-gfx] [PATCH 19/27] drm/i915: Fix bug in user proto-context creation that leaked contexts

2021-09-21 Thread Tvrtko Ursulin
On 20/09/2021 23:57, John Harrison wrote: On 8/20/2021 15:44, Matthew Brost wrote: Set number of engines before attempting to create contexts so the function free_engines can clean up properly. Fixes: d4433c7600f7 ("drm/i915/gem: Use the proto-context to handle create parameters (v5)") Sign

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

2021-09-21 Thread Thomas Weißschuh
On 2021-09-07T14:47+0200, Thomas Weißschuh wrote: > backlight.h documents "struct backlight_ops->get_brightness()" to return > a negative errno on failure. > So far these errors have not been handled in the backlight core. > This leads to negative values being exposed through sysfs although only >

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

2021-09-21 Thread Lee Jones
On Tue, 21 Sep 2021, Thomas Weißschuh wrote: > On 2021-09-07T14:47+0200, Thomas Weißschuh wrote: > > backlight.h documents "struct backlight_ops->get_brightness()" to return > > a negative errno on failure. > > So far these errors have not been handled in the backlight core. > > This leads to nega

Re: [PATCH v2] drm/rockchip: cdn-dp-core: Fix cdn_dp_resume unused warning

2021-09-21 Thread Palmer Dabbelt
On Tue, 21 Sep 2021 02:12:17 PDT (-0700), he...@sntech.de wrote: On Fri, 10 Sep 2021 20:43:18 -0700, Palmer Dabbelt wrote: cdn_dp_resume is only used under PM_SLEEP, and now that it's static an unused function warning is triggered undner !PM_SLEEP. This marks the function as possibly unused, to

[RFC PATCH] drm/print: Add deprecation notes to DRM_...() functions

2021-09-21 Thread Douglas Anderson
It's hard for someone (like me) who's not following closely to know what the suggested best practices are for error printing in DRM drivers. Add some hints to the header file. In general, my understanding is that: * When possible we should be using a `struct drm_device` for logging and recent pa

RE: [PATCH 2/2] Add drm buddy manager support to amdgpu driver

2021-09-21 Thread Paneer Selvam, Arunpravin
[AMD Public Use] Hi Christian, Please find my comments. Thanks, Arun -Original Message- From: Koenig, Christian Sent: Tuesday, September 21, 2021 2:34 PM To: Paneer Selvam, Arunpravin ; dri-devel@lists.freedesktop.org; intel-...@lists.freedesktop.org; amd-...@lists.freedesktop.org; ma

[PATCH v11 08/16] arm64: dts: mt8195: add display node for vdosys0

2021-09-21 Thread jason-jh . lin
Add display node for vdosys0. Signed-off-by: jason-jh.lin --- This patch is based on [1][2][3] [1]arm64: dts: Add Mediatek SoC MT8195 and evaluation board dts and Makefile - https://patchwork.kernel.org/project/linux-mediatek/patch/20210601075350.31515-2-seiya.w...@mediatek.com/ [2]arm64: dts:

[PATCH v11 01/16] dt-bindings: arm: mediatek: mmsys: add power and gce properties

2021-09-21 Thread jason-jh . lin
Power: 1. Add description for power-domains property. GCE: 1. Add description for mboxes property. 2. Add description for mediatek,gce-client-reg property. Signed-off-by: jason-jh.lin --- .../bindings/arm/mediatek/mediatek,mmsys.yaml | 30 ++- 1 file changed, 29 insertions(+), 1

[PATCH v11 05/16] dt-bindings: display: mediatek: merge: add additional prop for mt8195

2021-09-21 Thread jason-jh . lin
add MERGE additional properties description for mt8195: 1. async clock 2. fifo setting enable 3. reset controller Signed-off-by: jason-jh.lin --- .../display/mediatek/mediatek,merge.yaml | 31 +++ 1 file changed, 31 insertions(+) diff --git a/Documentation/devicetree/bindi

[PATCH v11 14/16] drm/mediatek: add DSC support for mediatek-drm

2021-09-21 Thread jason-jh . lin
DSC is designed for real-time systems with real-time compression, transmission, decompression and display. The DSC standard is a specification of the algorithms used for compressing and decompressing image display streams, including the specification of the syntax and semantics of the compressed vi

[PATCH v11 03/16] dt-bindings: display: mediatek: disp: split each block to individual yaml

2021-09-21 Thread jason-jh . lin
1. Remove mediatek,dislpay.txt 2. Split each display function block to individual yaml file. Signed-off-by: jason-jh.lin --- .../display/mediatek/mediatek,aal.yaml| 79 +++ .../display/mediatek/mediatek,ccorr.yaml | 74 ++ .../display/mediatek/mediatek,color.yaml | 8

[PATCH v11 00/16] Add Mediatek Soc DRM (vdosys0) support for mt8195

2021-09-21 Thread jason-jh . lin
Change in v11: - rebase on kernel-5.15-rc1 - change mbox label to gce0 for dts node of vdosys0 - change ovl compatibale to mt8192 to set smi_id_en=true in driver data - move common module from display folder to common folder, such as AAL, COCLOR, CCORR and MUTEX Change in v10: - rebase on "drm/m

[PATCH v11 13/16] drm/mediatek: adjust to the alphabetic order for mediatek-drm

2021-09-21 Thread jason-jh . lin
Adjust to the alphabetic order for the define, function, struct and array in mediatek-drm driver Signed-off-by: jason-jh.lin --- rebase on series [1] [1] drm/mediatek: add support for mediatek SOC MT8192 - https://patchwork.kernel.org/project/linux-mediatek/list/?series=529489 --- drivers/gpu/d

[PATCH v11 11/16] drm/mediatek: remove unused define in mtk_drm_ddp_comp.c

2021-09-21 Thread jason-jh . lin
Remove the unsed define in mtk_drm_ddp_comp.c Signed-off-by: jason-jh.lin Reviewed-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp

[PATCH v11 09/16] soc: mediatek: add mtk-mmsys support for mt8195 vdosys0

2021-09-21 Thread jason-jh . lin
Add mt8195 vdosys0 clock driver name and routing table to the driver data of mtk-mmsys. Signed-off-by: jason-jh.lin --- This patch is base on [1] [1] soc: mediatek: mmsys: add mt8192 mmsys support - https://patchwork.kernel.org/project/linux-mediatek/list/?series=524857 The vdosys1 impelmentatio

[PATCH v11 12/16] drm/mediatek: rename the define of register offset

2021-09-21 Thread jason-jh . lin
Add DISP_REG prefix for the define of register offset to make the difference from the define of register value. Signed-off-by: jason-jh.lin --- rebase on series [1] [1] drm/mediatek: add support for mediatek SOC MT8192 - https://patchwork.kernel.org/project/linux-mediatek/list/?series=529489 ---

[PATCH v11 02/16] dt-bindings: arm: mediatek: mmsys: add mt8195 SoC binding

2021-09-21 Thread jason-jh . lin
There are 2 mmsys, namely vdosys0 and vdosys1 in mt8195. Each of them is bound to a display pipeline, so add their definition in mtk-mmsys documentation with 2 compatibles. Signed-off-by: jason-jh.lin --- .../devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml| 2 ++ 1 file changed, 2 i

[PATCH v11 06/16] dt-bindings: display: mediatek: add mt8195 SoC binding for vdosys0

2021-09-21 Thread jason-jh . lin
Add mt8195 SoC binding to AAL, CCORR, COLOR, DITHER, GAMMA, MERGE, MUTEX, OVL and RDMA yaml schema for vdosys0. Signed-off-by: jason-jh.lin --- .../devicetree/bindings/display/mediatek/mediatek,aal.yaml | 1 + .../devicetree/bindings/display/mediatek/mediatek,ccorr.yaml | 5 + .../devicetr

Re: [PATCH v3 4/9] drm/scheduler: Add fence deadline support

2021-09-21 Thread Rob Clark
On Wed, Sep 8, 2021 at 10:45 AM Daniel Vetter wrote: > > On Fri, Sep 03, 2021 at 11:47:55AM -0700, Rob Clark wrote: > > From: Rob Clark > > > > As the finished fence is the one that is exposed to userspace, and > > therefore the one that other operations, like atomic update, would > > block on, w

[PATCH v11 07/16] dt-bindings: arm: mediatek: move common module from display folder

2021-09-21 Thread jason-jh . lin
AAL, COLOR, CCORR, MUTEX, WDMA could be used by other modules, such as MDP, so move their binding document into the common folder. Signed-off-by: jason-jh.lin --- .../{display => arm}/mediatek/mediatek,aal.yaml | 9 - .../{display => arm}/mediatek/mediatek,ccorr.yaml| 9 --

[PATCH v11 15/16] drm/mediatek: add MERGE support for mediatek-drm

2021-09-21 Thread jason-jh . lin
Add MERGE engine file: MERGE module is used to merge two slice-per-line inputs into one side-by-side output. Signed-off-by: jason-jh.lin --- rebase on series [1] [1] drm/mediatek: add support for mediatek SOC MT8192 - https://patchwork.kernel.org/project/linux-mediatek/list/?series=529489 --- d

[PATCH v11 10/16] soc: mediatek: add mtk-mutex support for mt8195 vdosys0

2021-09-21 Thread jason-jh . lin
Add mtk-mutex support for mt8195 vdosys0. Signed-off-by: jason-jh.lin --- This patch is base on [1] [1] soc: mediatek: add mtk mutex support for MT8192 - https://patchwork.kernel.org/project/linux-mediatek/patch/1628647802-5127-5-git-send-email-yongqiang@mediatek.com/ --- drivers/soc/media

[PATCH v11 16/16] drm/mediatek: add mediatek-drm of vdosys0 support for mt8195

2021-09-21 Thread jason-jh . lin
Add driver data of mt8195 vdosys0 to mediatek-drm and the sub driver. Signed-off-by: jason-jh.lin --- rebase on series [1] [1] drm/mediatek: add support for mediatek SOC MT8192 - https://patchwork.kernel.org/project/linux-mediatek/list/?series=529489 --- drivers/gpu/drm/mediatek/mtk_disp_rdma.c

[PATCH v11 04/16] dt-bindings: display: mediatek: dsc: add yaml for mt8195 SoC binding

2021-09-21 Thread jason-jh . lin
1. Add mediatek,dsc.yaml to describe DSC module in details. 2. Add mt8195 SoC binding to mediatek,dsc.yaml. Signed-off-by: jason-jh.lin --- .../display/mediatek/mediatek,dsc.yaml| 71 +++ 1 file changed, 71 insertions(+) create mode 100644 Documentation/devicetree/bindi

Re: [RESEND] [PATCH v2 1/2] dt-bindings: display: bridge: Add binding for R-Car MIPI DSI/CSI-2 TX

2021-09-21 Thread Geert Uytterhoeven
Hi Laurent, On Wed, Jul 28, 2021 at 6:26 PM Laurent Pinchart wrote: > The R-Car MIPI DSI/CSI-2 TX is embedded in the Renesas R-Car V3U SoC. It > can operate in either DSI or CSI-2 mode, with up to four data lanes. > > Signed-off-by: Laurent Pinchart > Reviewed-by: Kieran Bingham Thanks for you

Re: [PATCH v5 2/2] drm/bridge: parade-ps8640: Add support for AUX channel

2021-09-21 Thread Doug Anderson
Hi, On Sat, Sep 18, 2021 at 10:21 AM Philip Chen wrote: > > +static ssize_t ps8640_aux_transfer(struct drm_dp_aux *aux, > + struct drm_dp_aux_msg *msg) > +{ > + struct ps8640 *ps_bridge = aux_to_ps8640(aux); > + struct regmap *map = ps_bridge->regmap[P

[PATCH] drm/msm/dsi: do not install irq handler before power up the host

2021-09-21 Thread Dmitry Baryshkov
The DSI host might be left in some state by the bootloader. If this state generates an IRQ, it might hang the system by holding the interrupt line before the driver sets up the DSI host to the known state. Move the request/free_irq calls into msm_dsi_host_power_on/_off calls, so that we can be sur

Re: [PATCH v3 4/9] drm/scheduler: Add fence deadline support

2021-09-21 Thread Rob Clark
On Tue, Sep 21, 2021 at 8:57 AM Rob Clark wrote: > > On Wed, Sep 8, 2021 at 10:45 AM Daniel Vetter wrote: > > > > On Fri, Sep 03, 2021 at 11:47:55AM -0700, Rob Clark wrote: > > > From: Rob Clark > > > > > > As the finished fence is the one that is exposed to userspace, and > > > therefore the on

[PATCH] drm/msm/dsi/phy: fix clock names in 28nm_8960 phy

2021-09-21 Thread Dmitry Baryshkov
The commit 9f91f22aafcd ("drm/msm/dsi: remove duplicate fields from dsi_pll_Nnm instances") mistakenly changed registered clock names. While the platform is in progress of migration to using clock properties in the dts rather than the global clock names, we should provide backwards compatibility. T

  1   2   3   >