subscribe to the mailing list

2021-10-19 Thread 王 会
Thanks!

[PATCH 13/13] drm/amdgpu: cleanup drm_mm and apply DRM buddy

2021-10-19 Thread Arunpravin
Remove drm_mm references and add DRM buddy functions Signed-off-by: Arunpravin --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 233 +++ 2 files changed, 138 insertions(+), 99 deletions(-) diff --git

[PATCH 12/13] drm/amdgpu: add cursor support for drm buddy

2021-10-19 Thread Arunpravin
- Add res cursor support for drm buddy - Replace if..else statement with switch case statement Signed-off-by: Arunpravin --- .../gpu/drm/amd/amdgpu/amdgpu_res_cursor.h| 97 +++ 1 file changed, 78 insertions(+), 19 deletions(-) diff --git

[PATCH 11/13] drm/amdgpu: move vram defines into a header

2021-10-19 Thread Arunpravin
Move vram defines and inline functions into a header file Signed-off-by: Arunpravin --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 18 + drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h | 72 2 files changed, 73 insertions(+), 17 deletions(-) create mode 100644

[PATCH 09/13] drm: remove i915 selftest config check

2021-10-19 Thread Arunpravin
i915 buddy selftests will be moved to drm selftest folder, hence the config condition check may be removed. Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c index

[PATCH 10/13] drm/i915: cleanup i915 buddy and apply DRM buddy

2021-10-19 Thread Arunpravin
Remove i915 buddy references and add DRM buddy functions Signed-off-by: Arunpravin --- drivers/gpu/drm/i915/Makefile | 1 - drivers/gpu/drm/i915/i915_module.c| 3 - drivers/gpu/drm/i915/i915_scatterlist.c | 11 +--

[PATCH 08/13] drm: export functions and write description

2021-10-19 Thread Arunpravin
Export functions and write kerneldoc description Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 89 ++--- 1 file changed, 83 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c index

[PATCH 07/13] drm: Implement method to free unused pages

2021-10-19 Thread Arunpravin
On contiguous allocation, we round up the size to the nearest power of 2, implement a function to free unused pages. Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 87 + include/drm/drm_buddy.h | 4 ++ 2 files changed, 91 insertions(+) diff

[PATCH 06/13] drm: implement top-down allocation method

2021-10-19 Thread Arunpravin
Implemented a function which walk through the order list, compares the offset and returns the maximum offset block, this method is unpredictable in obtaining the high range address blocks which depends on allocation and deallocation. for instance, if driver requests address at a low specific

[PATCH 05/13] drm: remove drm_buddy_alloc_range

2021-10-19 Thread Arunpravin
This function becomes obsolete and may be removed. Signed-off-by: Arunpravin --- drivers/gpu/drm/drm_buddy.c | 101 include/drm/drm_buddy.h | 4 -- 2 files changed, 105 deletions(-) diff --git a/drivers/gpu/drm/drm_buddy.c

[PATCH 04/13] drm: make drm_buddy_alloc a commonplace

2021-10-19 Thread Arunpravin
- Make drm_buddy_alloc a single function to handle range allocation and non-range allocation demands. - Implemented a new function alloc_range() which allocates the requested order (in bytes) comply with range limitations - Moved memory alignment logic from i915 driver Signed-off-by:

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

2021-10-19 Thread Arunpravin
- Include drm buddy to DRM root Makefile - Add drm buddy init and exit function calls to drm core Signed-off-by: Arunpravin --- drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_drv.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/Makefile

[PATCH 02/13] drm: Move and rename i915 buddy source

2021-10-19 Thread Arunpravin
- Move i915_buddy.c to drm root folder - Rename "i915" string with "drm" string wherever applicable - Rename "I915" string with "DRM" string wherever applicable - Fix header file dependencies - Fix alignment issues Signed-off-by: Arunpravin --- .../drm/{i915/i915_buddy.c => drm_buddy.c}|

[PATCH 01/13] drm: Move and rename i915 buddy header

2021-10-19 Thread Arunpravin
- Move i915_buddy.h to include/drm - rename "i915" string to "drm" - rename "I915" string to "DRM" Signed-off-by: Arunpravin --- drivers/gpu/drm/i915/i915_buddy.h | 143 -- include/drm/drm_buddy.h | 143 ++ 2 files changed, 143

[PATCH 00/13] drm: Enable buddy allocator support

2021-10-19 Thread Arunpravin
This series of patches implemented to move i915 buddy allocator to drm root, and introduce new features include - make drm_buddy_alloc a prime vehicle for allocation - TOPDOWN range of address allocation support - a function to free unused pages on contiguous allocation - a function to allocate

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

2021-10-19 Thread Claudio Suarez
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 intel_hdmi_set_edid() and intel_sdvo_tmds_sink_detect() (via intel_sdvo_get_edid()). Once EDID is parsed, the monitor HDMI support

Re: [PATCH v3 01/13] gpu/drm: make drm_add_edid_modes() consistent when updating connector->display_info

2021-10-19 Thread Claudio Suarez
According to the documentation, drm_add_edid_modes "... Also fills out the _display_info structure and ELD in @connector with any information which can be derived from the edid." drm_add_edid_modes accepts a struct edid *edid parameter which may have a value or may be null. When it is not null,

Re: [PATCH v2 01/13] gpu/drm: make drm_add_edid_modes() consistent when updating connector->display_info

2021-10-19 Thread Claudio Suarez
On Tue, Oct 19, 2021 at 09:35:08PM +0300, Ville Syrjälä wrote: > On Sat, Oct 16, 2021 at 08:42:14PM +0200, Claudio Suarez wrote: > > According to the documentation, drm_add_edid_modes > > "... Also fills out the _display_info structure and ELD in @connector > > with any information which can be

Re: [PATCH] drm/amd/pm: Enable GPU metrics for One VF mode

2021-10-19 Thread Alex Deucher
On Tue, Oct 19, 2021 at 5:49 PM Vignesh Chander wrote: > Please add a patch description, something like: Enable GPU metrics feature in one VF mode. These are only possible in one VF mode because the VF is dedicated in that case. With that fixed: Reviewed-by: Alex Deucher > Signed-off-by:

[PATCH] drm/amd/pm: Enable GPU metrics for One VF mode

2021-10-19 Thread Vignesh Chander
Signed-off-by: Vignesh Chander Change-Id: I14a5c4d6b9d790b7f298b67cece2c501a003e2a7 --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c index

[PATCH 10/13] drm/amdkfd: replace kgd_dev in get amdgpu_amdkfd funcs

2021-10-19 Thread Graham Sider
Modified definitions: - amdgpu_amdkfd_get_fw_version - amdgpu_amdkfd_get_local_mem_info - amdgpu_amdkfd_get_gpu_clock_counter - amdgpu_amdkfd_get_max_engine_clock_in_mhz - amdgpu_amdkfd_get_cu_info - amdgpu_amdkfd_get_dmabuf_info - amdgpu_amdkfd_get_vram_usage - amdgpu_amdkfd_get_hive_id -

[PATCH 08/13] drm/amdkfd: replace kgd_dev in various kfd2kgd funcs

2021-10-19 Thread Graham Sider
Modified definitions: - program_sh_mem_settings - set_pasid_vmid_mapping - init_interrupts - address_watch_disable - address_watch_execute - wave_control_execute - address_watch_get_offset - get_atc_vmid_pasid_mapping_info - set_scratch_backing_va - set_vm_context_page_table_base -

[PATCH 04/13] drm/amdkfd: replace kgd_dev in static gfx v9 funcs

2021-10-19 Thread Graham Sider
Static funcs in amdgpu_amdkfd_gfx_v9.c now using amdgpu_device. Signed-off-by: Graham Sider --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 52 --- 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c

[PATCH 07/13] drm/amdkfd: replace kgd_dev in hqd/mqd kfd2kgd funcs

2021-10-19 Thread Graham Sider
Modified definitions: - hqd_load - hiq_mqd_load - hqd_sdma_load - hqd_dump - hqd_sdma_dump - hqd_is_occupied - hqd_destroy - hqd_sdma_is_occupied - hqd_sdma_destroy --- .../drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c | 13 +++ .../drm/amd/amdgpu/amdgpu_amdkfd_arcturus.h | 9 +++--

[PATCH 13/13] drm/amdkfd: remove kgd_dev declaration and initialization

2021-10-19 Thread Graham Sider
Signed-off-by: Graham Sider --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 4 ++-- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 4 +--- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 -

[PATCH 12/13] drm/amdkfd: replace/remove remaining kgd_dev references

2021-10-19 Thread Graham Sider
Signed-off-by: Graham Sider --- .../drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c | 5 --- .../drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c| 5 --- .../drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10_3.c | 5 --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 5 ---

[PATCH 09/13] drm/amdkfd: replace kgd_dev in various amgpu_amdkfd funcs

2021-10-19 Thread Graham Sider
Modified definitions: - amdgpu_amdkfd_submit_ib - amdgpu_amdkfd_set_compute_idle - amdgpu_amdkfd_have_atomics_support - amdgpu_amdkfd_flush_gpu_tlb_pasid - amdgpu_amdkfd_flush_gpu_tlb_pasid - amdgpu_amdkfd_gpu_reset - amdgpu_amdkfd_alloc_gtt_mem - amdgpu_amdkfd_free_gtt_mem -

[PATCH 11/13] drm/amdkfd: replace kgd_dev in gpuvm amdgpu_amdkfd funcs

2021-10-19 Thread Graham Sider
Modified definitions: - amdgpu_amdkfd_gpuvm_acquire_process_vm - amdgpu_amdkfd_gpuvm_release_process_vm - amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu - amdgpu_amdkfd_gpuvm_free_memory_of_gpu - amdgpu_amdkfd_gpuvm_map_memory_to_gpu - amdgpu_amdkfd_gpuvm_unmap_memory_from_gpu -

[PATCH 06/13] drm/amdkfd: replace kgd_dev in static gfx v10_3 funcs

2021-10-19 Thread Graham Sider
Static funcs in amdgpu_amdkfd_gfx_v10_3.c now using amdgpu_device. Signed-off-by: Graham Sider --- .../drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10_3.c | 52 --- 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10_3.c

[PATCH 05/13] drm/amdkfd: replace kgd_dev in static gfx v10 funcs

2021-10-19 Thread Graham Sider
Static funcs in amdgpu_amdkfd_gfx_v10.c now using amdgpu_device. Signed-off-by: Graham Sider --- .../drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c| 52 --- 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c

[PATCH 02/13] drm/amdkfd: replace kgd_dev in static gfx v7 funcs

2021-10-19 Thread Graham Sider
Static funcs in amdgpu_amdkfd_gfx_v7.c now using amdgpu_device. Signed-off-by: Graham Sider --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 51 +-- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c

[PATCH 03/13] drm/amdkfd: replace kgd_dev in static gfx v8 funcs

2021-10-19 Thread Graham Sider
Static funcs in amdgpu_amdkfd_gfx_v8.c now using amdgpu_device. Signed-off-by: Graham Sider --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 51 +-- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c

[PATCH 01/13] drm/amdkfd: add amdgpu_device entry to kfd_dev

2021-10-19 Thread Graham Sider
Patch series to remove kgd_dev struct and replace all instances with amdgpu_device objects. amdgpu_device needs to be declared in kgd_kfd_interface.h to be visible to kfd2kgd_calls. Signed-off-by: Graham Sider --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 1 +

[PATCH] drm/amdgpu/display: remove unused variable in dcn31_init_hw()

2021-10-19 Thread Alex Deucher
Unused. Remove it. Fixes: d1065882691179 ("Revert "drm/amd/display: Add helper for blanking all dp displays"") Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.c | 1 - 1 file changed, 1 deletion(-) diff --git

Re: [PATCH] amdgpu: replace snprintf in show functions with sysfs_emit

2021-10-19 Thread Alex Deucher
Applied. thanks! On Fri, Oct 15, 2021 at 2:48 AM Qing Wang wrote: > > show() must not use snprintf() when formatting the value to be > returned to user space. > > Fix the following coccicheck warning: > drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c:427: > WARNING: use scnprintf or sprintf. > >

[PATCH 4/4] drm/amdgpu/vcn3.0: remove intermediate variable

2021-10-19 Thread Alex Deucher
No need to use the id variable, just use the constant plus instance offset directly. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c

[PATCH 3/4] drm/amdgpu/vcn2.0: remove intermediate variable

2021-10-19 Thread Alex Deucher
No need to use the tmp variable, just use the constant directly. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c index

[PATCH 2/4] drm/amdgpu: Consolidate VCN firmware setup code

2021-10-19 Thread Alex Deucher
Roughly the same code was present in all VCN versions. Consolidate it into a single function. v2: use AMDGPU_UCODE_ID_VCN + i, check if num_inst >= 2 Signed-off-by: Alex Deucher Reviewed-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 27 +

[PATCH 1/4] drm/amdgpu/vcn3.0: handle harvesting in firmware setup

2021-10-19 Thread Alex Deucher
Only enable firmware for the instance that is enabled. v2: use AMDGPU_UCODE_ID_VCN + i Fixes: 1b592d00b4ac83 ("drm/amdgpu/vcn: remove manual instance setting") Reviewed-by: James Zhu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 16 1 file changed, 8

Re: [PATCH v1 2/2] mm: remove extra ZONE_DEVICE struct page refcount

2021-10-19 Thread Dan Williams
On Tue, Oct 19, 2021 at 9:02 AM Jason Gunthorpe wrote: > > On Tue, Oct 19, 2021 at 04:13:34PM +0100, Joao Martins wrote: > > On 10/19/21 00:06, Jason Gunthorpe wrote: > > > On Mon, Oct 18, 2021 at 12:37:30PM -0700, Dan Williams wrote: > > > > > >>> device-dax uses PUD, along with TTM, they are

Re: [PATCH 2/4] drm/amdgpu: Clarify error when hitting bad page threshold

2021-10-19 Thread Luben Tuikov
Reviewed-by: Luben Tuikov Regards, Luben On 2021-10-19 13:50, Kent Russell wrote: > Change the error message when the bad_page_threshold is reached, > explicitly stating that the GPU will not be initialized. > > Cc: Luben Tuikov > Cc: Mukul Joshi > Signed-off-by: Kent Russell > --- >

Re: [PATCH 1/4] drm/amdgpu: Warn when bad pages approaches threshold

2021-10-19 Thread Luben Tuikov
On 2021-10-19 14:22, Russell, Kent wrote: > [AMD Official Use Only] > > > >> -Original Message- >> From: Kuehling, Felix >> Sent: Tuesday, October 19, 2021 2:09 PM >> To: Russell, Kent ; amd-gfx@lists.freedesktop.org >> Cc: Tuikov, Luben ; Joshi, Mukul >> Subject: Re: [PATCH 1/4]

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

2021-10-19 Thread Ville Syrjälä
On Sat, Oct 16, 2021 at 08:42:26PM +0200, Claudio Suarez wrote: > Once EDID is parsed, the monitor HDMI support information is available > through drm_display_info.is_hdmi. Retriving the same information with > drm_detect_hdmi_monitor() is less efficient. Change to > drm_display_info.is_hdmi where

Re: [PATCH v2 01/13] gpu/drm: make drm_add_edid_modes() consistent when updating connector->display_info

2021-10-19 Thread Ville Syrjälä
On Sat, Oct 16, 2021 at 08:42:14PM +0200, Claudio Suarez wrote: > According to the documentation, drm_add_edid_modes > "... Also fills out the _display_info structure and ELD in @connector > with any information which can be derived from the edid." > > drm_add_edid_modes accepts a struct edid

RE: [PATCH 3/4] drm/amdgpu: Add kernel parameter for ignoring bad page threshold

2021-10-19 Thread Russell, Kent
[AMD Official Use Only] > -Original Message- > From: Kuehling, Felix > Sent: Tuesday, October 19, 2021 2:13 PM > To: Russell, Kent ; amd-gfx@lists.freedesktop.org > Cc: Tuikov, Luben ; Joshi, Mukul > Subject: Re: [PATCH 3/4] drm/amdgpu: Add kernel parameter for ignoring bad > page >

RE: [PATCH 1/4] drm/amdgpu: Warn when bad pages approaches threshold

2021-10-19 Thread Russell, Kent
[AMD Official Use Only] > -Original Message- > From: Kuehling, Felix > Sent: Tuesday, October 19, 2021 2:09 PM > To: Russell, Kent ; amd-gfx@lists.freedesktop.org > Cc: Tuikov, Luben ; Joshi, Mukul > Subject: Re: [PATCH 1/4] drm/amdgpu: Warn when bad pages approaches threshold > > Am

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

2021-10-19 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. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +--

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

2021-10-19 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. Signed-off-by: Nirmoy Das ---

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

2021-10-19 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. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 3 +-

Re: [PATCH 3/4] drm/amdgpu: Add kernel parameter for ignoring bad page threshold

2021-10-19 Thread Felix Kuehling
Am 2021-10-19 um 1:50 p.m. schrieb Kent Russell: > When a GPU hits the bad_page_threshold, it will not be initialized by > the amdgpu driver. This means that the table cannot be cleared, nor can > information gathering be performed (getting serial number, BDF, etc). > Add an override called

Re: [PATCH 1/4] drm/amdgpu: Warn when bad pages approaches threshold

2021-10-19 Thread Felix Kuehling
Am 2021-10-19 um 1:50 p.m. schrieb Kent Russell: > Currently dmesg doesn't warn when the number of bad pages approaches the > threshold for page retirement. WARN when the number of bad pages > is at 90% or greater for easier checks and planning, instead of waiting > until the GPU is full of bad

[PATCH 4/4] drm/amdgpu: Implement ignore_bad_page_threshold parameter

2021-10-19 Thread Kent Russell
If the ignore_bad_page_threshold kernel parameter is set to true, continue to post the GPU. Print an warning to dmesg that this action has been done, and that page retirement will obviously not work for said GPU Cc: Luben Tuikov Cc: Mukul Joshi Signed-off-by: Kent Russell ---

[PATCH 2/4] drm/amdgpu: Clarify error when hitting bad page threshold

2021-10-19 Thread Kent Russell
Change the error message when the bad_page_threshold is reached, explicitly stating that the GPU will not be initialized. Cc: Luben Tuikov Cc: Mukul Joshi Signed-off-by: Kent Russell --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 3/4] drm/amdgpu: Add kernel parameter for ignoring bad page threshold

2021-10-19 Thread Kent Russell
When a GPU hits the bad_page_threshold, it will not be initialized by the amdgpu driver. This means that the table cannot be cleared, nor can information gathering be performed (getting serial number, BDF, etc). Add an override called ignore_bad_page_threshold that can be set to true to still

[PATCH 1/4] drm/amdgpu: Warn when bad pages approaches threshold

2021-10-19 Thread Kent Russell
Currently dmesg doesn't warn when the number of bad pages approaches the threshold for page retirement. WARN when the number of bad pages is at 90% or greater for easier checks and planning, instead of waiting until the GPU is full of bad pages Cc: Luben Tuikov Cc: Mukul Joshi Signed-off-by:

Re: [PATCH] drm/amdgpu: Consolidate VCN firmware setup code

2021-10-19 Thread James Zhu
With two nit-pick below. ThispatchisReviewed-by:JamesZhu On 2021-10-19 11:56 a.m., Alex Deucher wrote: Roughly the same code was present in all VCN versions. Consolidate it into a single function. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 25

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

2021-10-19 Thread Das, Nirmoy
On 10/19/2021 5:43 PM, Christian König wrote: Am 19.10.21 um 15:22 schrieb Nirmoy Das: Get rid off pin/unpin and evict and swap back gart page table which should make things less likely to break. Also remove 2nd call to amdgpu_device_evict_resources() as we don't need it. Signed-off-by:

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

2021-10-19 Thread Andrey Grodzovsky
On 2021-10-19 11:54 a.m., Christian König wrote: Am 19.10.21 um 17:41 schrieb Andrey Grodzovsky: On 2021-10-19 9:22 a.m., Nirmoy Das wrote: Get rid off pin/unpin and evict and swap back gart page table which should make things less likely to break. +Christian Could you guys also clarify

Re: [PATCH v1 2/2] mm: remove extra ZONE_DEVICE struct page refcount

2021-10-19 Thread Jason Gunthorpe
On Tue, Oct 19, 2021 at 04:13:34PM +0100, Joao Martins wrote: > On 10/19/21 00:06, Jason Gunthorpe wrote: > > On Mon, Oct 18, 2021 at 12:37:30PM -0700, Dan Williams wrote: > > > >>> device-dax uses PUD, along with TTM, they are the only places. I'm not > >>> sure TTM is a real place though. > >>

[PATCH] drm/amdgpu: Consolidate VCN firmware setup code

2021-10-19 Thread Alex Deucher
Roughly the same code was present in all VCN versions. Consolidate it into a single function. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 25 + drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 2 ++ drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 10

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

2021-10-19 Thread Christian König
Am 19.10.21 um 17:41 schrieb Andrey Grodzovsky: On 2021-10-19 9:22 a.m., Nirmoy Das wrote: Get rid off pin/unpin and evict and swap back gart page table which should make things less likely to break. +Christian Could you guys also clarify what exactly are the stability issues this fixes ?

Re: [PATCH] drm/amdgpu/vcn3.0: handle harvesting in firmware setup

2021-10-19 Thread James Zhu
On 2021-10-19 11:13 a.m., Alex Deucher wrote: Only enable firmware for the instance that is enabled. Fixes: 1b592d00b4ac83 ("drm/amdgpu/vcn: remove manual instance setting") Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 19 +++ 1 file changed, 11

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

2021-10-19 Thread Christian König
Am 19.10.21 um 15:22 schrieb Nirmoy Das: Get rid off pin/unpin and evict and swap back gart page table which should make things less likely to break. Also remove 2nd call to amdgpu_device_evict_resources() as we don't need it. Signed-off-by: Nirmoy Das ---

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

2021-10-19 Thread Andrey Grodzovsky
On 2021-10-19 9:22 a.m., Nirmoy Das wrote: Get rid off pin/unpin and evict and swap back gart page table which should make things less likely to break. +Christian Could you guys also clarify what exactly are the stability issues this fixes ? Andrey Also remove 2nd call to

[PATCH] drm/amdgpu/smu11.0: add missing IP version check

2021-10-19 Thread Alex Deucher
Add missing check in smu_v11_0_init_display_count(), Fixes: af3b89d3a639d5 ("drm/amdgpu/smu11.0: convert to IP version checking") Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH v1 2/2] mm: remove extra ZONE_DEVICE struct page refcount

2021-10-19 Thread Joao Martins
On 10/19/21 00:06, Jason Gunthorpe wrote: > On Mon, Oct 18, 2021 at 12:37:30PM -0700, Dan Williams wrote: > >>> device-dax uses PUD, along with TTM, they are the only places. I'm not >>> sure TTM is a real place though. >> >> I was setting device-dax aside because it can use Joao's changes to >>

[PATCH] drm/amdgpu/vcn3.0: handle harvesting in firmware setup

2021-10-19 Thread Alex Deucher
Only enable firmware for the instance that is enabled. Fixes: 1b592d00b4ac83 ("drm/amdgpu/vcn: remove manual instance setting") Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git

Re: [PATCH 0/5] 0 MHz is not a valid current frequency

2021-10-19 Thread Luben Tuikov
It again fails with the same message! But this time it is different! Here's why: openat(AT_FDCWD, "/sys/class/drm/card0/device/pp_dpm_fclk", O_RDONLY) = 3 read(3, "0: 571Mhz \n1: 1274Mhz *\n2: 1221M"..., 8191) = 36 read(3, "", 8191) 

RE: [PATCH 0/5] 0 MHz is not a valid current frequency

2021-10-19 Thread Russell, Kent
[AMD Official Use Only] It was the rocm-smi -c flag. Maybe some work was done to make it more robust, that would be nice. But the -c flag is supposed to show the current frequency for each clock type. -g would do the same, but just for SCLK. Kent From: Tuikov, Luben Sent: Tuesday, October

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

2021-10-19 Thread Nirmoy Das
Get rid off pin/unpin and evict and swap back gart page table which should make things less likely to break. Also remove 2nd call to amdgpu_device_evict_resources() as we don't need it. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 -

Re: [PATCH] drm/amdgpu: support B0 external revision id for yellow carp

2021-10-19 Thread Alex Deucher
On Mon, Oct 18, 2021 at 11:22 PM Aaron Liu wrote: > > B0 internal rev_id is 0x01, B1 internal rev_id is 0x02. > The external rev_id for B0 and B1 is 0x20. > The original expression is not suitable for B1. Are you sure about this? We'll be losing the difference between B0 and B1. I think 0x19

[PATCH] drm/amdgpu: remove grbm cam remmaping for gfx v10

2021-10-19 Thread Huang Rui
PSP firmware will be responsible for applying the GRBM CAM remapping in the production. And the GRBM_CAM_INDEX / GRBM_CAM_DATA registers will be protected by PSP under security policy. So remove it according to the new security policy. Signed-off-by: Huang Rui ---

回复: 回复: [PATCH Review 1/1] drm/ttm: fix debugfs node create failed

2021-10-19 Thread Yang, Stanley
[AMD Official Use Only] > -邮件原件- > 发件人: Christian König > 发送时间: Tuesday, October 19, 2021 4:46 PM > 收件人: Yang, Stanley ; Das, Nirmoy > ; amd-gfx@lists.freedesktop.org > 主题: Re: 回复: [PATCH Review 1/1] drm/ttm: fix debugfs node create failed > > Am 19.10.21 um 10:02 schrieb Yang,

Re: 回复: [PATCH Review 1/1] drm/ttm: fix debugfs node create failed

2021-10-19 Thread Christian König
Am 19.10.21 um 10:02 schrieb Yang, Stanley: [AMD Official Use Only] -邮件原件- 发件人: amd-gfx 代表 Das, Nirmoy 发送时间: Thursday, October 14, 2021 2:11 AM 收件人: Christian König ; amd- g...@lists.freedesktop.org 主题: Re: [PATCH Review 1/1] drm/ttm: fix debugfs node create failed On 10/13/2021

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

2021-10-19 Thread Paul Menzel
Dear Simon, Am 19.10.21 um 10:10 schrieb Simon Ser: On Tuesday, October 19th, 2021 at 01:21, Paul Menzel wrote: Am 19.10.21 um 01:06 schrieb Simon Ser: On Tuesday, October 19th, 2021 at 01:03, Paul Menzel wrote: Excuse my ignorance. Reading the commit message, there was a Linux kernel

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

2021-10-19 Thread Simon Ser
On Tuesday, October 19th, 2021 at 01:21, Paul Menzel wrote: > Am 19.10.21 um 01:06 schrieb Simon Ser: > > On Tuesday, October 19th, 2021 at 01:03, Paul Menzel wrote: > > > >> Excuse my ignorance. Reading the commit message, there was a Linux > >> kernel change, that broke Chrome OS userspace,

Re: Use of conditionals with omitted operands in amdgpu (x? : y) (was: [PATCH 4/5] dpm/amd/pm: Sienna: Remove 0 MHz as a current clock frequency (v3))

2021-10-19 Thread Luben Tuikov
+AlexD +ChrisianK +LKML On 2021-10-19 03:44, Paul Menzel wrote: > Dear Luben, > > > Am 19.10.21 um 06:50 schrieb Luben Tuikov: >> On 2021-10-19 00:38, Lazar, Lijo wrote: >>> On 10/19/2021 9:45 AM, Luben Tuikov wrote: On 2021-10-18 23:38, Lazar, Lijo wrote: > On 10/19/2021 5:19 AM, Luben

回复: [PATCH Review 1/1] drm/ttm: fix debugfs node create failed

2021-10-19 Thread Yang, Stanley
[AMD Official Use Only] > -邮件原件- > 发件人: amd-gfx 代表 Das, > Nirmoy > 发送时间: Thursday, October 14, 2021 2:11 AM > 收件人: Christian König ; amd- > g...@lists.freedesktop.org > 主题: Re: [PATCH Review 1/1] drm/ttm: fix debugfs node create failed > > > On 10/13/2021 2:29 PM, Christian König

Re: [PATCH 0/5] Remove 0 MHz as a valid current frequency (v4)

2021-10-19 Thread Paul Menzel
Dear Luben, Thank you for your quick reply. Am 19.10.21 um 09:43 schrieb Luben Tuikov: On 2021-10-19 03:23, Paul Menzel wrote: Sorry, two more style nits. 1. Could you please use 75 characters per line for the text width of the commit messages. Currently, especially 4/5, are hard to read

Use of conditionals with omitted operands in amdgpu (x? : y) (was: [PATCH 4/5] dpm/amd/pm: Sienna: Remove 0 MHz as a current clock frequency (v3))

2021-10-19 Thread Paul Menzel
Dear Luben, Am 19.10.21 um 06:50 schrieb Luben Tuikov: On 2021-10-19 00:38, Lazar, Lijo wrote: On 10/19/2021 9:45 AM, Luben Tuikov wrote: On 2021-10-18 23:38, Lazar, Lijo wrote: On 10/19/2021 5:19 AM, Luben Tuikov wrote: […] - if (ret) -

Re: [PATCH 0/5] Remove 0 MHz as a valid current frequency (v4)

2021-10-19 Thread Luben Tuikov
On 2021-10-19 03:23, Paul Menzel wrote: > Dear Luben, > > > Sorry, two more style nits. > > 1. Could you please use 75 characters per line for the text width of > the commit messages. Currently, especially 4/5, are hard to read being > so short. This is the default we use--I've not made any

Re: [PATCH 0/5] Remove 0 MHz as a valid current frequency (v4)

2021-10-19 Thread Paul Menzel
Dear Luben, Sorry, two more style nits. 1. Could you please use 75 characters per line for the text width of the commit messages. Currently, especially 4/5, are hard to read being so short. 2. No idea, what is done in amd-gfx, but for me it is more common to put the iteration number