Re: [PATCH 03/13] drm: add Makefile support for drm buddy

2021-10-22 Thread Arunpravin
On 20/10/21 1:51 pm, Thomas Zimmermann wrote: > Hi > > Am 20.10.21 um 00:53 schrieb Arunpravin: >> - Include drm buddy to DRM root Makefile >> - Add drm buddy init and exit function calls >>to drm core > > Is there a hard requirement to have this code in the core? > > IMHO there's

Re: [PATCH] drm/amd/amdgpu: fix potential bad job hw_fence underflow

2021-10-22 Thread Andrey Grodzovsky
What do you mean by underflow in this case ? You mean use after free because of extra dma_fence_put() ? On 2021-10-22 4:14 a.m., JingWen Chen wrote: ping On 2021/10/22 AM11:33, Jingwen Chen wrote: [Why] In advance tdr mode, the real bad job will be resubmitted twice, while in

[pull] amdgpu, amdkfd drm-next-5.16

2021-10-22 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 5.16. The following changes since commit 48737ac4d70faffeb516e2a9847e24f9a7eee05f: drm/amdgpu/psp: add some missing cases to psp_check_pmfw_centralized_cstate_management (2021-10-13 22:51:41 -0400) are available in the Git repository at:

Re: [PATCH] drm/amdkfd: restore userptr ignore bad address error

2021-10-22 Thread Felix Kuehling
Am 2021-10-22 um 1:06 p.m. schrieb Philip Yang: > The userptr can be unmapped by application and still registered to > driver, restore userptr work return user pages will get -EFAULT bad > address error. Pretend this error as succeed. GPU access this userptr > will have VM fault later, it is

[PATCH] drm/amdkfd: restore userptr ignore bad address error

2021-10-22 Thread Philip Yang
The userptr can be unmapped by application and still registered to driver, restore userptr work return user pages will get -EFAULT bad address error. Pretend this error as succeed. GPU access this userptr will have VM fault later, it is better than application soft hangs with stalled user mode

Re: FW: [PATCH 1/3] drm/amdgpu: fix a potential memory leak in amdgpu_device_fini_sw()

2021-10-22 Thread Andrey Grodzovsky
On 2021-10-21 7:33 p.m., Yu, Lang wrote: [AMD Official Use Only] -Original Message- From: Grodzovsky, Andrey Sent: Thursday, October 21, 2021 11:18 PM To: Yu, Lang ; amd-gfx@lists.freedesktop.org Subject: Re: FW: [PATCH 1/3] drm/amdgpu: fix a potential memory leak in

Re: [PATCH] amd/display: remove ChromeOS workaround

2021-10-22 Thread Alex Deucher
On Fri, Oct 22, 2021 at 11:02 AM Simon Ser wrote: > > On Friday, October 22nd, 2021 at 15:58, Alex Deucher > wrote: > > > > Agreed that this patch is good but we'll need to also revert the > > > is_chromeos w/a. > > > > I've reverted that and applied this one. Thanks! > > Ah, didn't realize I

Re: [PATCH] amd/display: remove ChromeOS workaround

2021-10-22 Thread Simon Ser
On Friday, October 22nd, 2021 at 15:58, Alex Deucher wrote: > > Agreed that this patch is good but we'll need to also revert the > > is_chromeos w/a. > > I've reverted that and applied this one. Thanks! Ah, didn't realize I needed to revert that one too. Thank you!

Re: [PATCH] amd/display: remove ChromeOS workaround

2021-10-22 Thread Alex Deucher
On Thu, Oct 21, 2021 at 2:19 PM Harry Wentland wrote: > > > > On 2021-10-21 13:55, Rodrigo Siqueira Jordao wrote: > > Hi Simon, > > > > I tested this patch and it lgtm. I also agree to revert it. > > > > Btw, did you send the revert patch for "amd/display: only require overlay > > plane to cover

Re: [PATCH] drm/amd/pm: Disable fan control if not supported

2021-10-22 Thread Alex Deucher
On Fri, Oct 22, 2021 at 3:44 AM Lijo Lazar wrote: > > On arcturus, not all platforms use PMFW based fan control. On such > ASICs fan control by PMFW will be disabled in PPTable. Disable hwmon > knobs for fan control also as it is not possible to report or control > fan speed on such platforms

Re: [PATCH v4 1/3] drm/amdgpu: do not pass ttm_resource_manager to gtt_mgr

2021-10-22 Thread Das, Nirmoy
On 10/22/2021 1:46 PM, Christian König wrote: Reviewed-by: Christian König for the entire series. But please keep in mind that this here needs extensive testing. I will do multiple round of test again on gfx7-10 cards and gfx9 APU that I have but I don't have gfx6 and sriov cards to

Re: [Intel-gfx] [PATCH v3 13/13] drm/i915: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi

2021-10-22 Thread Ville Syrjälä
On Fri, Oct 22, 2021 at 03:01:52PM +0300, Ville Syrjälä wrote: > On Fri, Oct 22, 2021 at 12:25:33PM +0200, Claudio Suarez wrote: > > On Thu, Oct 21, 2021 at 04:49:59PM +0300, Ville Syrjälä wrote: > > > On Wed, Oct 20, 2021 at 12:51:21AM +0200, Claudio Suarez wrote: > > > > drm_get_edid()

Re: [PATCH v3 13/13] drm/i915: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi

2021-10-22 Thread Ville Syrjälä
On Fri, Oct 22, 2021 at 12:25:33PM +0200, Claudio Suarez wrote: > On Thu, Oct 21, 2021 at 04:49:59PM +0300, Ville Syrjälä wrote: > > On Wed, Oct 20, 2021 at 12:51:21AM +0200, Claudio Suarez wrote: > > > drm_get_edid() internally calls to drm_connector_update_edid_property() > > > and then

Re: [PATCH v4 1/3] drm/amdgpu: do not pass ttm_resource_manager to gtt_mgr

2021-10-22 Thread Christian König
Reviewed-by: Christian König for the entire series. But please keep in mind that this here needs extensive testing. Thanks, Christian. Am 22.10.21 um 12:54 schrieb Nirmoy Das: Do not allow exported amdgpu_gtt_mgr_*() to accept any ttm_resource_manager pointer. Also there is no need to force

Re: [PATCH v3 13/13] drm/i915: replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi

2021-10-22 Thread Claudio Suarez
On Thu, Oct 21, 2021 at 04:49:59PM +0300, Ville Syrjälä wrote: > On Wed, Oct 20, 2021 at 12:51:21AM +0200, Claudio Suarez wrote: > > drm_get_edid() internally calls to drm_connector_update_edid_property() > > and then drm_add_display_info(), which parses the EDID. > > This happens in the function

Re: [PATCH 3/3] drm/amdgpu: Implement bad_page_threshold = -2 case

2021-10-22 Thread Lazar, Lijo
On 10/21/2021 7:26 PM, Russell, Kent wrote: [AMD Official Use Only] -Original Message- From: Lazar, Lijo Sent: Thursday, October 21, 2021 1:25 AM To: Russell, Kent ; amd-gfx@lists.freedesktop.org Cc: Tuikov, Luben ; Joshi, Mukul Subject: Re: [PATCH 3/3] drm/amdgpu: Implement

[PATCH 1/1] drm/amdgpu: remove unnecessary checks

2021-10-22 Thread Nirmoy Das
amdgpu_ttm_backend_bind() only needed for TTM_PL_TT and AMDGPU_PL_PREEMPT. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index

Re: [PATCH v4 3/3] drm/amdgpu: recover gart table at resume

2021-10-22 Thread Nirmoy
On 10/22/21 12:54 PM, Nirmoy Das wrote: Get rid off pin/unpin of gart BO at resume/suspend and instead pin only once and try to recover gart content at resume time. This is much more stable in case there is OOM situation at 2nd call to amdgpu_device_evict_resources() while evicting GART table.

[PATCH 3/3] drm/amdgpu: recover gart table at resume

2021-10-22 Thread Nirmoy Das
Get rid off pin/unpin of gart BO at resume/suspend and instead pin only once and try to recover gart content at resume time. This is much more stable in case there is OOM situation at 2nd call to amdgpu_device_evict_resources() while evicting GART table. v3: remove gart recovery from other places

[PATCH 2/3] drm/amdgpu: do not pass ttm_resource_manager to vram_mgr

2021-10-22 Thread Nirmoy Das
Do not allow exported amdgpu_vram_mgr_*() to accept any ttm_resource_manager pointer. Also there is no need to force other module to call a ttm function just to eventually call vram_mgr functions. v2: pass adev's vram_mgr instead of adev Signed-off-by: Nirmoy Das Reviewed-by: Christian König

[PATCH v4 3/3] drm/amdgpu: recover gart table at resume

2021-10-22 Thread Nirmoy Das
Get rid off pin/unpin of gart BO at resume/suspend and instead pin only once and try to recover gart content at resume time. This is much more stable in case there is OOM situation at 2nd call to amdgpu_device_evict_resources() while evicting GART table. v4: return amdgpu_bo_create_kernel()

[PATCH v4 1/3] drm/amdgpu: do not pass ttm_resource_manager to gtt_mgr

2021-10-22 Thread Nirmoy Das
Do not allow exported amdgpu_gtt_mgr_*() to accept any ttm_resource_manager pointer. Also there is no need to force other module to call a ttm function just to eventually call gtt_mgr functions. v4: remove unused adev. v3: upcast mgr from ttm resopurce manager instead of getting it from adev. v2:

Re: [PATCH v3 3/3] drm/amdgpu: recover gart table at resume

2021-10-22 Thread Christian König
Am 22.10.21 um 11:32 schrieb Nirmoy Das: Get rid off pin/unpin of gart BO at resume/suspend and instead pin only once and try to recover gart content at resume time. This is much more stable in case there is OOM situation at 2nd call to amdgpu_device_evict_resources() while evicting GART table.

Re: [PATCH v3 1/3] drm/amdgpu: do not pass ttm_resource_manager to gtt_mgr

2021-10-22 Thread Nirmoy
On 10/22/21 11:44 AM, Christian König wrote: Am 22.10.21 um 11:32 schrieb Nirmoy Das: Do not allow exported amdgpu_gtt_mgr_*() to accept any ttm_resource_manager pointer. Also there is no need to force other module to call a ttm function just to eventually call gtt_mgr functions. v3: upcast

Re: [PATCH v2 2/3] drm/amdgpu: do not pass ttm_resource_manager to vram_mgr

2021-10-22 Thread Christian König
Am 22.10.21 um 11:32 schrieb Nirmoy Das: Do not allow exported amdgpu_vram_mgr_*() to accept any ttm_resource_manager pointer. Also there is no need to force other module to call a ttm function just to eventually call vram_mgr functions. v2: pass adev's vram_mgr instead of adev Signed-off-by:

Re: [PATCH v3 1/3] drm/amdgpu: do not pass ttm_resource_manager to gtt_mgr

2021-10-22 Thread Christian König
Am 22.10.21 um 11:32 schrieb Nirmoy Das: Do not allow exported amdgpu_gtt_mgr_*() to accept any ttm_resource_manager pointer. Also there is no need to force other module to call a ttm function just to eventually call gtt_mgr functions. v3: upcast mgr from ttm resopurce manager instead of

[PATCH v2 2/3] drm/amdgpu: do not pass ttm_resource_manager to vram_mgr

2021-10-22 Thread Nirmoy Das
Do not allow exported amdgpu_vram_mgr_*() to accept any ttm_resource_manager pointer. Also there is no need to force other module to call a ttm function just to eventually call vram_mgr functions. v2: pass adev's vram_mgr instead of adev Signed-off-by: Nirmoy Das ---

[PATCH v3 3/3] drm/amdgpu: recover gart table at resume

2021-10-22 Thread Nirmoy Das
Get rid off pin/unpin of gart BO at resume/suspend and instead pin only once and try to recover gart content at resume time. This is much more stable in case there is OOM situation at 2nd call to amdgpu_device_evict_resources() while evicting GART table. v3: remove gart recovery from other places

[PATCH v3 1/3] drm/amdgpu: do not pass ttm_resource_manager to gtt_mgr

2021-10-22 Thread Nirmoy Das
Do not allow exported amdgpu_gtt_mgr_*() to accept any ttm_resource_manager pointer. Also there is no need to force other module to call a ttm function just to eventually call gtt_mgr functions. v3: upcast mgr from ttm resopurce manager instead of getting it from adev. v2: pass adev's gtt_mgr

Re: [PATCH] drm/amd/amdgpu: fix potential bad job hw_fence underflow

2021-10-22 Thread JingWen Chen
ping On 2021/10/22 AM11:33, Jingwen Chen wrote: > [Why] > In advance tdr mode, the real bad job will be resubmitted twice, while > in drm_sched_resubmit_jobs_ext, there's a dma_fence_put, so the bad job > is put one more time than other jobs. > > [How] > Adding dma_fence_get before resbumit job

[PATCH] drm/amd/pm: Disable fan control if not supported

2021-10-22 Thread Lijo Lazar
On arcturus, not all platforms use PMFW based fan control. On such ASICs fan control by PMFW will be disabled in PPTable. Disable hwmon knobs for fan control also as it is not possible to report or control fan speed on such platforms through driver. Signed-off-by: Lijo Lazar ---