Re: [PATCH 1/7] mm/memory.c: Fix race when faulting a device private page

2022-09-28 Thread Michael Ellerman
Alistair Popple writes: > When the CPU tries to access a device private page the migrate_to_ram() > callback associated with the pgmap for the page is called. However no > reference is taken on the faulting page. Therefore a concurrent > migration of the device private page can free the page and

Re: [PATCH 1/7] mm/memory.c: Fix race when faulting a device private page

2022-09-28 Thread Alistair Popple
Michael Ellerman writes: > Alistair Popple writes: >> When the CPU tries to access a device private page the migrate_to_ram() >> callback associated with the pgmap for the page is called. However no >> reference is taken on the faulting page. Therefore a concurrent >> migration of the device

RE: [PATCH] drm/amdgpu/gfx10: ignore rlc ucode validation

2022-09-28 Thread Chen, Guchun
Reviewed-by: Guchun Chen Regards, Guchun -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Thursday, September 29, 2022 3:31 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH] drm/amdgpu/gfx10: ignore rlc ucode validation There are apparently

Re: [PATCH] drm/amdgpu: Skip put_reset_domain if it doesnt exist

2022-09-28 Thread Liu, Shaoyun
Looks OK to me. Reviewed by : shaoyun.liu From: Chander, Vignesh Sent: September 28, 2022 3:03 PM To: amd-gfx@lists.freedesktop.org Cc: Liu, Shaoyun ; Chander, Vignesh Subject: [PATCH] drm/amdgpu: Skip put_reset_domain if it doesnt exist For xgmi sriov, the

Re: [PATCH v3 5/5] drm/amdgpu: switch workload context to/from compute

2022-09-28 Thread Alex Deucher
On Wed, Sep 28, 2022 at 4:57 AM Sharma, Shashank wrote: > > > > On 9/27/2022 10:40 PM, Alex Deucher wrote: > > On Tue, Sep 27, 2022 at 11:38 AM Sharma, Shashank > > wrote: > >> > >> > >> > >> On 9/27/2022 5:23 PM, Felix Kuehling wrote: > >>> Am 2022-09-27 um 10:58 schrieb Sharma, Shashank: >

Re: [PATCH 6/7] nouveau/dmem: Evict device private memory during release

2022-09-28 Thread Lyude Paul
Re comments about infinite retry: gotcha, makes sense to me. On Tue, 2022-09-27 at 09:45 +1000, Alistair Popple wrote: > John Hubbard writes: > > > On 9/26/22 14:35, Lyude Paul wrote: > > > > + for (i = 0; i < npages; i++) { > > > > + if (src_pfns[i] & MIGRATE_PFN_MIGRATE) {

Re: [PATCH v2 7/8] nouveau/dmem: Evict device private memory during release

2022-09-28 Thread Lyude Paul
Reviewed-by: Lyude Paul On Wed, 2022-09-28 at 22:01 +1000, Alistair Popple wrote: > When the module is unloaded or a GPU is unbound from the module it is > possible for device private pages to still be mapped in currently > running processes. This can lead to a hangs and RCU stall warnings when

Re: [PATCH 6/7] nouveau/dmem: Evict device private memory during release

2022-09-28 Thread Lyude Paul
On Tue, 2022-09-27 at 11:39 +1000, Alistair Popple wrote: > Felix Kuehling writes: > > > On 2022-09-26 17:35, Lyude Paul wrote: > > > On Mon, 2022-09-26 at 16:03 +1000, Alistair Popple wrote: > > > > When the module is unloaded or a GPU is unbound from the module it is > > > > possible for

[PATCH 36/36] drm/amd/display: Minor code style change

2022-09-28 Thread Hamza Mahfooz
From: Rodrigo Siqueira This commit adds some minor code style changes just to reduce the merge conflicts we have when we upstream some of the VBA code. Reviewed-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira --- .../drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 9 ++--- 1

[PATCH 08/36] Revert "drm/amd/display: correct hostvm flag"

2022-09-28 Thread Hamza Mahfooz
From: Aric Cyr This reverts commit bbd46fc8daae7c2a1c79b63854621d8446e9794a. 4K144 resolution isn't available on DCN31. Reviewed-by: Sherry Wang Acked-by: Hamza Mahfooz Signed-off-by: Aric Cyr --- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH 29/36] drm/amd/display: Adding missing HDMI ACP SEND register

2022-09-28 Thread Hamza Mahfooz
From: Rodrigo Siqueira Add HDMI ACP bit field definition for DCN32. Reviewed-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dio_stream_encoder.h | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 27/36] drm/amd/display: Fix disable DSC logic in ghe DIO code

2022-09-28 Thread Hamza Mahfooz
From: Eric Bernstein [Why] In DIO stream encoder, definition of DP_DSC_MODE is changed (only enable/disable) In OPTC, OTG_SET_V_TOTAL_MIN_MASK_EN is removed (same as DCN3.1) [How] In DIO stream encoder, update enc32_dp_set_dsc_config(). In OPTC, use DCN3.1 version for function interfaces

[PATCH 28/36] drm/amd/display: Add missing SDP registers to DCN32 reglist

2022-09-28 Thread Hamza Mahfooz
From: George Shen [Why] Certain features require the additional DP SDP configuration registers DP_SEC_CNTL1 and DP_SEC_CNTL5 in order to function correctly. The DCN32 DIO stream encoder reglist is currently missing these two registers. [How] Add the missing registers to the DCN32 DIO stream

[PATCH 23/36] drm/amd/display: Drop unused code for DCN32/321

2022-09-28 Thread Hamza Mahfooz
From: Rodrigo Siqueira Under DCN32/321 we identified some code paths that DC never executes. This commit removes those unused codes to avoid distractions when debugging issues. Reviewed-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira --- .../display/dc/dcn32/dcn32_dio_link_encoder.c |

[PATCH 35/36] drm/amd/display: update DSC for DCN32

2022-09-28 Thread Hamza Mahfooz
From: Rodrigo Siqueira Update DSC checks in the DCN32 VBA. Reviewed-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira --- .../drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git

[PATCH 19/36] drm/amd/display: Fix vupdate and vline position calculation

2022-09-28 Thread Hamza Mahfooz
From: Aric Cyr [how] Large deltas for periodic interrupts could result in the interrupt not being programmed properly and thus not firing. [why] Add proper wrap-around support for calculating VUPDATE and VLINE positions. Reviewed-by: Jun Lei Acked-by: Hamza Mahfooz Signed-off-by: Aric Cyr

[PATCH 34/36] drm/amd/display: Disconnect DSC for unused pipes during ODM transition

2022-09-28 Thread Hamza Mahfooz
From: Rodrigo Siqueira [Why] During transition from ODM combine to ODM bypass, if DSC is enabled need to disconnect the DSC mux for pipes no longer in use. [How] During ODM update, detect pipes with DSC that are no longer being used for new state and call new DSC interface to disconnect. Add

[PATCH 11/36] drm/amd/display: AUX tracing cleanup

2022-09-28 Thread Hamza Mahfooz
From: "Leo (Hanghong) Ma" [Why && How] Remove the unnecessary AUX trace and use one trace for AUX failure. Reviewed-by: Martin Leung Acked-by: Hamza Mahfooz Signed-off-by: Leo (Hanghong) Ma --- drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 13 +++-- 1 file changed, 3 insertions(+),

[PATCH 26/36] drm/amd/display: Remove OPTC lock check

2022-09-28 Thread Hamza Mahfooz
From: Rodrigo Siqueira At some point, we decided to blank HUBP during pixel data blank, and to handle that, we added some OPTC lock checks. Later, we realized that this change caused multiple regression, and we removed it. Nevertheless, we still have some leftovers that might affect some ASIC

[PATCH 32/36] drm/amd/display: unblock mcm_luts

2022-09-28 Thread Hamza Mahfooz
From: "Leung, Martin" why and how: needed to fix bad assumption for enable mcm_luts Reviewed-by: Rodrigo Siqueira Signed-off-by: Martin Leung --- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH 09/36] drm/amd/display: prevent S4 test from failing

2022-09-28 Thread Hamza Mahfooz
From: Charlene Liu [why] limit the vm prefetch check for now, until the feature is fully verified. Reviewed-by: Hansen Dsouza Acked-by: Hamza Mahfooz Signed-off-by: Charlene Liu --- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubbub.c | 8 +--- 1 file changed, 1 insertion(+), 7

[PATCH 33/36] drm/amd/display: Enable 2 to 1 ODM policy if supported

2022-09-28 Thread Hamza Mahfooz
From: Rodrigo Siqueira If the current configuration supports 2 to 1 ODM policy, let's also enable the windowed MPO feature. Reviewed-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 4 1 file changed, 4 insertions(+) diff

[PATCH 15/36] drm/amd/display: Keep OTG on when Z10 is disable

2022-09-28 Thread Hamza Mahfooz
From: Lewis Huang [Why] Disable OTG when PSRSU with z10 even if z10 is disable [How] Reverse condition to keep OTG on when Z10 is disable Reviewed-by: Robin Chen Acked-by: Hamza Mahfooz Signed-off-by: Lewis Huang --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++-- 1 file changed, 2

[PATCH 14/36] drm/amd/display: skip commit minimal transition state

2022-09-28 Thread Hamza Mahfooz
From: Zhikai Zhai [WHY] Now dynamic ODM will now be disabled when MPO is required safe transitions to avoid underflow, but we are triggering the way of minimal transition too often. Commit state of dc with no check will do pipeline setup which may re-initialize the component with no need such as

[PATCH 13/36] drm/amd/display: Add log for LTTPR

2022-09-28 Thread Hamza Mahfooz
From: Leo Chen [Why & How] Adding log for LTTPR to facilitate debugging. Reviewed-by: Charlene Liu Acked-by: Hamza Mahfooz Signed-off-by: Leo Chen --- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 29 +++ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git

[PATCH 30/36] drm/amd/display: Add missing mask sh for SYM32_TP_SQ_PULSE register

2022-09-28 Thread Hamza Mahfooz
From: Wenjing Liu There is a missing register mask in dcn32 causing the hardware programming is not executed when programming SQ_num test pattern for DP2. Reviewed-by: Rodrigo Siqueira Signed-off-by: Wenjing Liu --- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hpo_dp_link_encoder.h | 1 + 1

[PATCH 07/36] drm/amd/display: Refactor edp ILR caps codes

2022-09-28 Thread Hamza Mahfooz
From: Ian Chen We split out ILR config from "global" to "per-panel" config settings. Reviewed-by: Anthony Koo Acked-by: Hamza Mahfooz Signed-off-by: Ian Chen --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 5 - drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c| 4 ++--

[PATCH 17/36] drm/amd/display: fix integer overflow during MSA V_Freq calculation

2022-09-28 Thread Hamza Mahfooz
From: Wenjing Liu [why] Analyzer shows incorrect V freq in MSA for some large timing. [how] Cast an 32 bit integer to uint64_t before multiplication to avoid integer overflow for a very large timing. Reviewed-by: Ariel Bernstein Acked-by: Hamza Mahfooz Signed-off-by: Wenjing Liu ---

[PATCH 20/36] drm/amd/display: Fix merging dynamic ODM+MPO configs on DCN32

2022-09-28 Thread Hamza Mahfooz
From: Dillon Varone [WHY?] When merging ODM pipes that are using MPO, we must copy the stream_res from the new top pipe to the bottom pipe so that the overlayed plane is not pointing to the wrong stream assets. Reviewed-by: Martin Leung Reviewed-by: Jun Lei Acked-by: Hamza Mahfooz

[PATCH 22/36] drm/amd/display: 3.2.206

2022-09-28 Thread Hamza Mahfooz
From: Aric Cyr This version brings along following: - ILR improvements - PSR fixes - DCN315 fixes - DCN32 fixes - ODM fixes - DSC fixes - SubVP fixes Acked-by: Hamza Mahfooz Signed-off-by: Aric Cyr --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 31/36] drm/amd/display: Add PState change high hook for DCN32

2022-09-28 Thread Hamza Mahfooz
From: Rodrigo Siqueira For some reason, we missed the PState check for DCN32 which may cause issues for clock transition. This commit add that required hook. Reviewed-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hubbub.c | 1 + 1 file

[PATCH 24/36] drm/amd/display: Update DCN321 hook that deals with pipe aquire

2022-09-28 Thread Hamza Mahfooz
From: Rodrigo Siqueira DCN provides a hook to check if we can have a new pipe allocation based on some DC constraints. If the current configuration supports the new pipe request, DC updates its context; otherwise, it will keep the same configuration. This behavior is similar across multiple

[PATCH 25/36] drm/amd/display: Fix SubVP control flow in the MPO context

2022-09-28 Thread Hamza Mahfooz
From: Rodrigo Siqueira SubVP has some issues related to how we allocate and enable it. This commit fixes this behavior by adding the proper check and configuration to the SubVP code path. Reviewed-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira ---

[PATCH 18/36] drm/amd/display: write all 4 bytes of FFE_PRESET dpcd value

2022-09-28 Thread Hamza Mahfooz
From: Wenjing Liu [why] According to specs, it expects us to write all 4 bytes even if current lane count is less than 4. Reviewed-by: George Shen Acked-by: Hamza Mahfooz Signed-off-by: Wenjing Liu --- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 37 +-- 1 file changed,

[PATCH 21/36] drm/amd/display: block odd h_total timings from halving pixel rate

2022-09-28 Thread Hamza Mahfooz
From: Martin Leung why: when dynamic odm was turned on, there is also logic to halve the pixelclk this still turned on when we avoided odm in the case of odd h_total timings how: block the pixel clk mechanism also in the case of odd h_total timings Reviewed-by: Jun Lei Acked-by: Hamza Mahfooz

[PATCH 12/36] drm/amd/display: For SubVP pipe split case use min transition into MPO

2022-09-28 Thread Hamza Mahfooz
From: Alvin Lee [Description] - For SubVP pipe split case we need to use a minimial transition when opening MPO video since we are transitioning from 4 pipes to 3 pipes where an OPP for a previous MPCC will change - Also save and restore mall config when doing fast_validate in case there

[PATCH 16/36] drm/amd/display: Increase compbuf size prior to updating clocks

2022-09-28 Thread Hamza Mahfooz
From: Dillon Varone [WHY?] Clocks are updating based on the incoming context's support, however the new compbuf size is not programmed prior to udpating clocks, which can result in P-State hangs. [HOW?] Increase compbuf size prior to updating clocks. Reviewed-by: Alvin Lee Reviewed-by: Martin

[PATCH 04/36] drm/amd/display: fix dcn315 dml detile overestimation

2022-09-28 Thread Hamza Mahfooz
From: Dmytro Laktyushkin DML does not take the fact that dcn315 does not have enough detile buffer to max all pipes. This change adds a workaround to apply the same logic DC does when calculating detile buffer size in DML. Reviewed-by: Charlene Liu Acked-by: Hamza Mahfooz Signed-off-by:

[PATCH 10/36] drm/amd/display: Disable GSL when enabling phantom pipe

2022-09-28 Thread Hamza Mahfooz
From: Alvin Lee [Description] When enabling phantom pipe on a pipe that was previously using immediate flip, we have to disable GSL or this will prevent the update from taking place right away on the phantom pipe when we enable it in FW Reviewed-by: Jun Lei Acked-by: Hamza Mahfooz

[PATCH 05/36] drm/amd/display: Block SubVP if rotation being used

2022-09-28 Thread Hamza Mahfooz
From: Alvin Lee [Description] - SubVP rotation support is not explicitly implemented, so block SubVP in rotation cases to avoid unexpected behaviors Reviewed-by: Nevenko Stupar Reviewed-by: Jun Lei Acked-by: Hamza Mahfooz Signed-off-by: Alvin Lee ---

[PATCH 06/36] drm/amd/display: Allow PSR exit when panel is disconnected

2022-09-28 Thread Hamza Mahfooz
From: Iswara Nagulendran [HOW] Fixed check to only avoid PSR entry when panel is disconnected. PSR exit can be permitted to restore the HW to it's non-PSR state. Reviewed-by: Jayendran Ramani Acked-by: Hamza Mahfooz Signed-off-by: Iswara Nagulendran ---

[PATCH 03/36] drm/amd/display: add dummy pstate workaround to dcn315

2022-09-28 Thread Hamza Mahfooz
From: Dmytro Laktyushkin DCN315 has to always allow pstate change or SMU will hang. This workaround achieves this by applying a low pstate change latency to be used when pstate is calculated to be unsupported. This lower latency only accounts for memory retraining; a previous change handles

[PATCH 02/36] drm/amd/display: Reorder FCLK P-state switch sequence for DCN32

2022-09-28 Thread Hamza Mahfooz
From: Dillon Varone [WHY?] In some cases, DCFCLK hardmin requests are not acknowledged by SMU as the requested clock does not have a compatible ratio with current FCLK, and it cannot be changed as FCLK P-state is not allowed. [HOW?] Allow FCLK p-state change prior to changing DCFCLK hardmin.

[PATCH 01/36] drm/amd/display: Program SubVP in dc_commit_state_no_check

2022-09-28 Thread Hamza Mahfooz
From: Dillon Varone [Why?] Currently SubVP programming is only done in commit_planes_for_stream, as it was expected only this call would add/remove planes from a display. [How?] Add SubVP programming to dc_commit_state_no_check. Reviewed-by: Alvin Lee Acked-by: Hamza Mahfooz Signed-off-by:

[PATCH 00/36] DC Patches September 26, 2022

2022-09-28 Thread Hamza Mahfooz
This DC patch-set brings improvements in multiple areas. In summary, we highlight: * ILR improvements; * PSR fixes; * DCN315 fixes; * DCN32 fixes; * ODM fixes; * DSC fixes; * SubVP fixes. Cc: Daniel Wheeler Alvin Lee (3): drm/amd/display: Block SubVP if rotation being used drm/amd/display:

Re: [PATCH 09/10] drm/amdgpu/gfx10: switch to amdgpu_gfx_rlc_init_microcode

2022-09-28 Thread Alex Deucher
On Wed, Sep 28, 2022 at 3:24 PM Dmitry Osipenko wrote: > > On 9/28/22 20:47, Dmitry Osipenko wrote: > > On 9/28/22 20:44, Deucher, Alexander wrote: > >> [AMD Official Use Only - General] > >> > >> This should be fixed in a backwards compatible way with this patch: > >>

[PATCH] drm/amdgpu/gfx10: ignore rlc ucode validation

2022-09-28 Thread Alex Deucher
There are apparently ucode versions in the wild with incorrect sizes specified in the header. We never checked this before, so don't start now. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2170 Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 7 ++- 1 file

[PATCH v6 07/21] drm/omapdrm: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare OMAP DRM driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v6 05/21] drm/armada: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare Armada driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/armada/armada_gem.c | 8 1 file changed, 4 insertions(+), 4

[PATCH v6 19/21] dma-buf: Document dynamic locking convention

2022-09-28 Thread Dmitry Osipenko
Add documentation for the dynamic locking convention. The documentation tells dma-buf API users when they should take the reservation lock and when not. Acked-by: Sumit Semwal Reviewed-by: Christian König Signed-off-by: Dmitry Osipenko --- Documentation/driver-api/dma-buf.rst | 6 +++

[PATCH v6 08/21] drm/tegra: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare Tegra DRM driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/tegra/gem.c | 17 + 1 file changed, 9 insertions(+), 8

[PATCH v6 20/21] media: videobuf2: Stop using internal dma-buf lock

2022-09-28 Thread Dmitry Osipenko
All drivers that use dma-bufs have been moved to the updated locking specification and now dma-buf reservation is guaranteed to be locked by importers during the mapping operations. There is no need to take the internal dma-buf lock anymore. Remove locking from the videobuf2 memory allocators.

[PATCH v6 11/21] misc: fastrpc: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare fastrpc to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Acked-by: Srinivas Kandagatla Signed-off-by: Dmitry Osipenko --- drivers/misc/fastrpc.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH v6 18/21] dma-buf: Move dma_buf_mmap() to dynamic locking specification

2022-09-28 Thread Dmitry Osipenko
Move dma_buf_mmap() function to the dynamic locking specification by taking the reservation lock. Neither of the today's drivers take the reservation lock within the mmap() callback, hence it's safe to enforce the locking. Acked-by: Sumit Semwal Acked-by: Christian König Signed-off-by: Dmitry

Re: [PATCH 09/10] drm/amdgpu/gfx10: switch to amdgpu_gfx_rlc_init_microcode

2022-09-28 Thread Dmitry Osipenko
On 9/28/22 20:47, Dmitry Osipenko wrote: > On 9/28/22 20:44, Deucher, Alexander wrote: >> [AMD Official Use Only - General] >> >> This should be fixed in a backwards compatible way with this patch: >> https://patchwork.freedesktop.org/patch/504869/ > > Good to know that it's already addressed,

[PATCH v6 00/21] Move all drivers to a common dma-buf locking convention

2022-09-28 Thread Dmitry Osipenko
Hello, This series moves all drivers to a dynamic dma-buf locking specification. >From now on all dma-buf importers are made responsible for holding dma-buf's reservation lock around all operations performed over dma-bufs in accordance to the locking specification. This allows us to utilize

[PATCH v6 15/21] dma-buf: Move dma_buf_vmap() to dynamic locking specification

2022-09-28 Thread Dmitry Osipenko
Move dma_buf_vmap/vunmap() functions to the dynamic locking specification by asserting that the reservation lock is held. Acked-by: Sumit Semwal Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c | 4 1 file changed, 4 insertions(+) diff --git

[PATCH v6 21/21] dma-buf: Remove obsoleted internal lock

2022-09-28 Thread Dmitry Osipenko
The internal dma-buf lock isn't needed anymore because the updated locking specification claims that dma-buf reservation must be locked by importers, and thus, the internal data is already protected by the reservation lock. Remove the obsoleted internal lock. Acked-by: Sumit Semwal Acked-by:

[PATCH v6 12/21] xen/gntdev: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare gntdev driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Juergen Gross Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/xen/gntdev-dmabuf.c | 8 1 file changed, 4

[PATCH v6 10/21] RDMA/umem: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare InfiniBand drivers to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/infiniband/core/umem_dmabuf.c | 7 --- 1 file changed, 4 insertions(+), 3

[PATCH v6 13/21] media: videobuf2: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare V4L2 memory allocators to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Tomasz Figa Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/media/common/videobuf2/videobuf2-dma-contig.c | 11

[PATCH v6 16/21] dma-buf: Move dma_buf_attach() to dynamic locking specification

2022-09-28 Thread Dmitry Osipenko
Move dma-buf attachment API functions to the dynamic locking specification by taking the reservation lock around the mapping operations. The strict locking convention prevents deadlock situations for dma-buf importers and exporters. Acked-by: Sumit Semwal Reviewed-by: Christian König

[PATCH v6 02/21] dma-buf: Add unlocked variant of attachment-mapping functions

2022-09-28 Thread Dmitry Osipenko
Add unlocked variant of dma_buf_map/unmap_attachment() that will be used by drivers that don't take the reservation lock explicitly. Acked-by: Sumit Semwal Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c | 53 +++

[PATCH v6 17/21] dma-buf: Move dma_buf_map_attachment() to dynamic locking specification

2022-09-28 Thread Dmitry Osipenko
Move dma-buf attachment mapping functions to the dynamic locking specification by asserting that the reservation lock is held. Acked-by: Sumit Semwal Reviewed-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c | 10 ++ 1 file changed, 2 insertions(+), 8

[PATCH v6 09/21] drm/etnaviv: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare Etnaviv driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v6 14/21] media: tegra-vde: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare Tegra video decoder driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/media/platform/nvidia/tegra-vde/dmabuf-cache.c | 6 +++--- 1 file changed,

[PATCH v6 01/21] dma-buf: Add unlocked variant of vmapping functions

2022-09-28 Thread Dmitry Osipenko
Add unlocked variant of dma_buf_vmap/vunmap() that will be utilized by drivers that don't take the reservation lock explicitly. Acked-by: Sumit Semwal Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c | 41 +++

[PATCH v6 06/21] drm/i915: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare i915 driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions and handling cases where importer now holds the reservation lock. Acked-by: Christian König Reviewed-by: Michael J. Ruhl Signed-off-by: Dmitry Osipenko ---

[PATCH v6 04/21] drm/prime: Prepare to dynamic dma-buf locking specification

2022-09-28 Thread Dmitry Osipenko
Prepare DRM prime core to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Reviewed-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_prime.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH v6 03/21] drm/gem: Take reservation lock for vmap/vunmap operations

2022-09-28 Thread Dmitry Osipenko
The new common dma-buf locking convention will require buffer importers to hold the reservation lock around mapping operations. Make DRM GEM core to take the lock around the vmapping operations and update DRM drivers to use the locked functions for the case where DRM core now holds the lock. This

Re: [PATCH] drm/amdgpu: remove switch from amdgpu_gmc_noretry_set

2022-09-28 Thread Felix Kuehling
Am 2022-09-28 um 11:21 schrieb Graham Sider: Simplify the logic in amdgpu_gmc_noretry_set by getting rid of the switch. Also set noretry=1 as default for GFX 10.3.0 and greater since retry faults are not supported. Signed-off-by: Graham Sider Reviewed-by: Felix Kuehling ---

Re: [PATCH v5] drm/sched: Add FIFO sched policy to run queue

2022-09-28 Thread Luben Tuikov
Inlined: On 2022-09-28 14:49, Andrey Grodzovsky wrote: > When many entities are competing for the same run queue > on the same scheduler, we observe an unusually long wait > times and some jobs get starved. This has been observed on GPUVis. > > The issue is due to the Round Robin policy used by

[PATCH] drm/amdgpu: Skip put_reset_domain if it doesnt exist

2022-09-28 Thread Vignesh Chander
For xgmi sriov, the reset is handled by host driver and hive->reset_domain is not initialized so need to check if it exists before doing a put. Signed-off-by: Vignesh Chander --- drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] drm/amdgpu: remove switch from amdgpu_gmc_noretry_set

2022-09-28 Thread Alex Deucher
On Wed, Sep 28, 2022 at 11:22 AM Graham Sider wrote: > > Simplify the logic in amdgpu_gmc_noretry_set by getting rid of the > switch. Also set noretry=1 as default for GFX 10.3.0 and greater since > retry faults are not supported. > > Signed-off-by: Graham Sider Acked-by: Alex Deucher > --- >

Re: [PATCH v5 1/1] drm/amdkfd: Track unified memory when switching xnack mode

2022-09-28 Thread Felix Kuehling
Am 2022-09-28 um 12:11 schrieb Philip Yang: Unified memory usage with xnack off is tracked to avoid oversubscribe system memory, with xnack on, we don't track unified memory usage to allow memory oversubscribe. When switching xnack mode from off to on, subsequent free ranges allocated with

[PATCH v5] drm/sched: Add FIFO sched policy to run queue

2022-09-28 Thread Andrey Grodzovsky
When many entities are competing for the same run queue on the same scheduler, we observe an unusually long wait times and some jobs get starved. This has been observed on GPUVis. The issue is due to the Round Robin policy used by schedulers to pick up the next entity's job queue for execution.

Re: [PATCH] drm/amdgpu: Skip put_reset_domain if it doesnt exist

2022-09-28 Thread Christian König
Am 28.09.22 um 20:22 schrieb Vignesh Chander: For xgmi sriov, the reset is handled by host driver and hive->reset_domain is not initialized so need to check if it exists before doing a put. Once more: General practice is to make the *_put_*() functions NULL tolerant. So rather make this

[PATCH] drm/amdgpu: Skip put_reset_domain if it doesnt exist

2022-09-28 Thread Vignesh Chander
For xgmi sriov, the reset is handled by host driver and hive->reset_domain is not initialized so need to check if it exists before doing a put. Signed-off-by: Vignesh Chander --- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

RE: [PATCH] drm/amdgpu: Skip put_reset_domain if it doesnt exist

2022-09-28 Thread Chander, Vignesh
[AMD Official Use Only - General] Hi Christian, It is because the host driver handles the reset for xgmi sriov case. I will update the commit body as For xgmi sriov, the reset is handled by host driver and hive->reset_domain is not initialized so need to check if it exists before doing a put.

Re: [PATCH 09/10] drm/amdgpu/gfx10: switch to amdgpu_gfx_rlc_init_microcode

2022-09-28 Thread Dmitry Osipenko
On 9/28/22 20:44, Deucher, Alexander wrote: > [AMD Official Use Only - General] > > This should be fixed in a backwards compatible way with this patch: > https://patchwork.freedesktop.org/patch/504869/ Good to know that it's already addressed, thank you very much for the quick reply. -- Best

Re: RE: [PATCH 09/10] drm/amdgpu/gfx10: switch to amdgpu_gfx_rlc_init_microcode

2022-09-28 Thread Dmitry Osipenko
On 9/24/22 10:14, Zhang, Hawking wrote: > [Public] > > Hi Alex, > > Sienna cichlid rlc firmware binary needs to be updated to match with the > kernel change. > > I shall add this comment to commit description. > > Regards, > Hawking > > From: Deucher, Alexander > Sent: Saturday, September

Re: [PATCH] drm/amdgpu: Skip put_reset_domain if it doesnt exist

2022-09-28 Thread Christian König
Am 28.09.22 um 19:43 schrieb Vignesh Chander: For sriov, the reset domain is no longer created so need to check if it exists before doing a put. Why is the reset domain no longer created for SRIOV? Regards, Christian. Signed-off-by: Vignesh Chander ---

RE: [PATCH] drm/amdgpu: Skip put_reset_domain if it doesnt exist

2022-09-28 Thread Liu, Shaoyun
[AMD Official Use Only - General] Please add description like under sriov xgmi configuration , the hive reset is handled by host driver , hive->reset_domain is not been in initialized so need to skip it . Regards Shaoyun.liu -Original Message- From: Chander, Vignesh Sent:

Re: [PATCH] drm/amdgpu: Skip put_reset_domain if it doesnt exist

2022-09-28 Thread Christian König
Am 28.09.22 um 19:37 schrieb Vignesh Chander: Change-Id: Ifd6121fb94db3fadaa1dee61d35699abe1259409 Signed-off-by: Vignesh Chander --- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c

Re: RE: [PATCH 09/10] drm/amdgpu/gfx10: switch to amdgpu_gfx_rlc_init_microcode

2022-09-28 Thread Deucher, Alexander
[AMD Official Use Only - General] This should be fixed in a backwards compatible way with this patch: https://patchwork.freedesktop.org/patch/504869/ Alex From: Dmitry Osipenko Sent: Wednesday, September 28, 2022 1:40 PM To: Zhang, Hawking ; Deucher, Alexander

[PATCH] drm/amdgpu: Skip put_reset_domain if it doesnt exist

2022-09-28 Thread Vignesh Chander
For sriov, the reset domain is no longer created so need to check if it exists before doing a put. Signed-off-by: Vignesh Chander --- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c

Re: [PATCH] drm/amdgpu: Skip put_reset_domain if it doesnt exist

2022-09-28 Thread Hamza Mahfooz
On 2022-09-28 13:37, Vignesh Chander wrote: Change-Id: Ifd6121fb94db3fadaa1dee61d35699abe1259409 Signed-off-by: Vignesh Chander Please remove the Change-Id and provide commit message body. --- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH] drm/amdgpu: Skip put_reset_domain if it doesnt exist

2022-09-28 Thread Vignesh Chander
Change-Id: Ifd6121fb94db3fadaa1dee61d35699abe1259409 Signed-off-by: Vignesh Chander --- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c index

Re: [PATCH] drm/amdgpu: Fix mc_umc_status used uninitialized warning

2022-09-28 Thread Leo Li
On 2022-09-28 10:53, Hamza Mahfooz wrote: On 2022-09-28 10:49, sunpeng...@amd.com wrote: From: Leo Li On ChromeOS clang build, the following warning is seen: /mnt/host/source/src/third_party/kernel/v5.15/drivers/gpu/drm/amd/amdgpu/umc_v6_7.c:463:6: error: variable 'mc_umc_status' is used

[PATCH v2] drm/amd/display: Prevent OTG shutdown during PSR SU

2022-09-28 Thread sunpeng.li
From: Leo Li [Why] Enabling Z10 optimizations allows DMUB to disable the OTG during PSR link-off. This theoretically saves power by putting more of the display hardware to sleep. However, we observe that with PSR SU, it causes visual artifacts, higher power usage, and potential system hang.

Re: [PATCH] drm/amd/display: Prevent OTG shutdown during PSR SU

2022-09-28 Thread Leo Li
On 2022-09-28 09:52, Harry Wentland wrote: On 2022-09-27 19:13, sunpeng...@amd.com wrote: From: Leo Li [Why] Enabling Z10 optimizations allows DMUB to disable the OTG during PSR link-off. This theoretically saves power by putting more of the display hardware to sleep. However, we

Re: [PATCH v2 8/8] hmm-tests: Add test for migrate_device_range()

2022-09-28 Thread Andrew Morton
On Wed, 28 Sep 2022 22:01:22 +1000 Alistair Popple wrote: > @@ -1401,22 +1494,7 @@ static int dmirror_device_init(struct dmirror_device > *mdevice, int id) > > static void dmirror_device_remove(struct dmirror_device *mdevice) > { > - unsigned int i; > - > - if

[PATCH v5 1/1] drm/amdkfd: Track unified memory when switching xnack mode

2022-09-28 Thread Philip Yang
Unified memory usage with xnack off is tracked to avoid oversubscribe system memory, with xnack on, we don't track unified memory usage to allow memory oversubscribe. When switching xnack mode from off to on, subsequent free ranges allocated with xnack off will not unreserve memory. When switching

Re: [PATCH v4 1/1] drm/amdkfd: Track unified memory when switching xnack mode

2022-09-28 Thread Felix Kuehling
Am 2022-09-28 um 11:55 schrieb Philip Yang: On 2022-09-27 14:58, Felix Kuehling wrote: Am 2022-09-27 um 11:43 schrieb Philip Yang: Unified memory usage with xnack off is tracked to avoid oversubscribe system memory, with xnack on, we don't track unified memory usage to allow memory

Re: [PATCH v4 1/1] drm/amdkfd: Track unified memory when switching xnack mode

2022-09-28 Thread Philip Yang
On 2022-09-27 14:58, Felix Kuehling wrote: Am 2022-09-27 um 11:43 schrieb Philip Yang: Unified memory usage with xnack off is tracked to avoid oversubscribe system memory, with xnack on, we don't track unified memory usage to allow memory oversubscribe. When switching xnack mode from off to

[PATCH] drm/amdgpu: remove switch from amdgpu_gmc_noretry_set

2022-09-28 Thread Graham Sider
Simplify the logic in amdgpu_gmc_noretry_set by getting rid of the switch. Also set noretry=1 as default for GFX 10.3.0 and greater since retry faults are not supported. Signed-off-by: Graham Sider --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 48 + 1 file changed, 9

Re: [PATCH 4/4] drm/amdgpu: MCBP based on DRM scheduler (v6)

2022-09-28 Thread Michel Dänzer
On 2022-09-28 16:46, Christian König wrote: > Am 28.09.22 um 15:52 schrieb Michel Dänzer: >> On 2022-09-28 03:01, Zhu, Jiadong wrote:> >>> Please make sure umd is calling the libdrm function to create context with >>> different priories, >>> amdgpu_cs_ctx_create2(device_handle,

Re: [PATCH] drm/amdgpu: Fix mc_umc_status used uninitialized warning

2022-09-28 Thread Hamza Mahfooz
On 2022-09-28 10:49, sunpeng...@amd.com wrote: From: Leo Li On ChromeOS clang build, the following warning is seen: /mnt/host/source/src/third_party/kernel/v5.15/drivers/gpu/drm/amd/amdgpu/umc_v6_7.c:463:6: error: variable 'mc_umc_status' is used uninitialized whenever 'if' condition is

[PATCH] drm/amdgpu: Fix mc_umc_status used uninitialized warning

2022-09-28 Thread sunpeng.li
From: Leo Li On ChromeOS clang build, the following warning is seen: /mnt/host/source/src/third_party/kernel/v5.15/drivers/gpu/drm/amd/amdgpu/umc_v6_7.c:463:6: error: variable 'mc_umc_status' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if

Re: [PATCH 4/4] drm/amdgpu: MCBP based on DRM scheduler (v6)

2022-09-28 Thread Christian König
Am 28.09.22 um 15:52 schrieb Michel Dänzer: On 2022-09-28 03:01, Zhu, Jiadong wrote:> Please make sure umd is calling the libdrm function to create context with different priories, amdgpu_cs_ctx_create2(device_handle, AMDGPU_CTX_PRIORITY_HIGH, _handle). Yes, I double-checked that, and that it

  1   2   >