[PATCH] drm/amd/display: Remove duplicate header.
From: "Souptick Joarder (HPE)" kernel test robot throws below warning -> includecheck warnings: (new ones prefixed by >>) >> drivers/gpu/drm/amd/display/dc/os_types.h: drm/drm_print.h is included more than once. Remove duplicate header. Reported-by: kernel test robot Signed-off-by: Souptick Joarder (HPE) --- drivers/gpu/drm/amd/display/dc/os_types.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/os_types.h b/drivers/gpu/drm/amd/display/dc/os_types.h index 795dd486b6d6..6b88ae14f1f9 100644 --- a/drivers/gpu/drm/amd/display/dc/os_types.h +++ b/drivers/gpu/drm/amd/display/dc/os_types.h @@ -39,8 +39,6 @@ #include #include -#include - #include "cgs_common.h" #if defined(__BIG_ENDIAN) && !defined(BIGENDIAN_CPU) -- 2.25.1
[PATCH] drm/amd/display: Removed unused variable ret
From: "Souptick Joarder (HPE)" Kernel test robot throws below warning -> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c: In function 'dc_link_reduce_mst_payload': drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:3782:32: warning: variable 'ret' set but not used [-Wunused-but-set-variable] 3782 | enum act_return_status ret; Removed the unused ret variable. Reported-by: kernel test robot Signed-off-by: Souptick Joarder (HPE) --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c index 55a8f58ee239..445357623d8b 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c @@ -3706,7 +3706,6 @@ enum dc_status dc_link_reduce_mst_payload(struct pipe_ctx *pipe_ctx, uint32_t bw struct fixed31_32 pbn_per_slot; struct dp_mst_stream_allocation_table proposed_table = {0}; uint8_t i; - enum act_return_status ret; const struct link_hwss *link_hwss = get_link_hwss(link, _ctx->link_res); DC_LOGGER_INIT(link->ctx->logger); @@ -3777,7 +3776,7 @@ enum dc_status dc_link_reduce_mst_payload(struct pipe_ctx *pipe_ctx, uint32_t bw >mst_stream_alloc_table); /* poll for immediate branch device ACT handled */ - ret = dm_helpers_dp_mst_poll_for_allocation_change_trigger( + dm_helpers_dp_mst_poll_for_allocation_change_trigger( stream->ctx, stream); -- 2.25.1
[PATCH] drm/amd/display: Remove unused variable 'abo'
From: "Souptick Joarder (HPE)" Kernel test robot throws below warning -> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9143:27: warning: variable 'abo' set but not used [-Wunused-but-set-variable] Remove the unused variable. Reported-by: Kernel test robot Signed-off-by: Souptick Joarder (HPE) --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index c9004f7e700d..0103b34aabdd 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -9136,7 +9136,6 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, to_dm_crtc_state(drm_atomic_get_old_crtc_state(state, pcrtc)); int planes_count = 0, vpos, hpos; unsigned long flags; - struct amdgpu_bo *abo; uint32_t target_vblank, last_flip_vblank; bool vrr_active = amdgpu_dm_vrr_active(acrtc_state); bool pflip_present = false; @@ -9208,7 +9207,6 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, continue; } - abo = gem_to_amdgpu_bo(fb->obj[0]); fill_dc_plane_info_and_addr( dm->adev, new_plane_state, afb->tiling_flags, -- 2.25.1
Re: [linux-next:master] BUILD REGRESSION 6d0c806803170f120f8cb97b321de7bd89d3a791
On Sat, Jun 11, 2022 at 2:16 AM kernel test robot wrote: > > tree/branch: > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > branch HEAD: 6d0c806803170f120f8cb97b321de7bd89d3a791 Add linux-next > specific files for 20220610 > > Error/Warning reports: > > https://lore.kernel.org/llvm/202205220805.wrw5woek-...@intel.com > > Error/Warning: (recently discovered and may have been fixed) > > arch/riscv/include/asm/pgtable-64.h:215:2: error: invalid input constraint > '0' in asm > arch/riscv/include/asm/pgtable.h:257:2: error: invalid input constraint '0' > in asm > drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:130:17: > warning: 'DP_SINK_BRANCH_DEV_NAME_7580' defined but not used > [-Wunused-const-variable=] This is a False warning. 0 ddc_service_types.h 130 static const u8 DP_SINK_BRANCH_DEV_NAME_7580[] = "7580\x80u"; 1 dc_link.c detect_link_and_local_sink 1106 memcmp(>dpcd_caps.branch_dev_name, DP_SINK_BRANCH_DEV_NAME_7580, > drivers/misc/cardreader/rts5261.c:406:13: warning: variable 'setting_reg2' is > used uninitialized whenever 'if' condition is false > [-Wsometimes-uninitialized] I think, code wise this looks correct and can be excluded. > drivers/staging/rtl8723bs/hal/hal_btcoex.c:1182:30: warning: variable > 'pHalData' set but not used [-Wunused-but-set-variable] > > Error/Warning ids grouped by kconfigs: > > gcc_recent_errors > |-- alpha-allyesconfig > | `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > |-- arc-allyesconfig > | `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > |-- arm-allmodconfig > | `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > |-- arm-allyesconfig > | `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > |-- arm64-allyesconfig > | `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > |-- i386-allyesconfig > | |-- > drivers-gpu-drm-amd-amdgpu-..-display-include-ddc_service_types.h:warning:DP_SINK_BRANCH_DEV_NAME_7580-defined-but-not-used > | `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > |-- ia64-allmodconfig > | `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > |-- m68k-allmodconfig > | `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > |-- m68k-allyesconfig > | `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > |-- mips-allmodconfig > | `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > |-- mips-allyesconfig > | `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > |-- nios2-allyesconfig > | `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > |-- parisc-allyesconfig > | `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > |-- powerpc-allmodconfig > | `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > |-- powerpc-allyesconfig > | `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > |-- riscv-allmodconfig > | `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > |-- riscv-allyesconfig > | `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > |-- sh-allmodconfig > | `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > |-- sparc-allyesconfig > | `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > |-- x86_64-allyesconfig > | |-- > drivers-gpu-drm-amd-amdgpu-..-display-include-ddc_service_types.h:warning:DP_SINK_BRANCH_DEV_NAME_7580-defined-but-not-used > | `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > `-- xtensa-allyesconfig > `-- > drivers-staging-rtl8723bs-hal-hal_btcoex.c:warning:variable-pHalData-set-but-not-used > > clang_recent_errors > |-- i386-randconfig-a013 > | `-- > drivers-misc-cardreader-rts5261.c:warning:variable-setting_reg2-is-used-uninitialized-whenever-if-condition-is-false > `-- riscv-randconfig-r013-20220610 > |-- > arch-riscv-include-asm-pgtable-.h:error:invalid-input-constraint-in-asm > `-- arch-riscv-include-asm-pgtable.h:error:invalid-input-constraint-in-asm > > elapsed time: 873m > > configs tested: 61 > configs skipped: 3 > > gcc tested configs: > arm defconfig > arm allmodconfig > arm allyesconfig > arm64 defconfig > arm64
[PATCH] drm/amdgpu: Initialize value of r in amdgpu_fill_buffer()
From: "Souptick Joarder (HPE)" Kernel test robot reported warning -> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:2129:2: warning: Undefined or garbage value returned to caller [clang-analyzer-core. uninitialized.UndefReturn] Initialize r inside amdgpu_fill_buffer(). Reported-by: kernel test robot Signed-off-by: Souptick Joarder (HPE) --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 414a22dddc78..5fafb223177f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -2089,7 +2089,7 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo, struct amdgpu_ring *ring = adev->mman.buffer_funcs_ring; struct dma_fence *fence = NULL; struct amdgpu_res_cursor dst; - int r; + int r = 0; if (!adev->mman.buffer_funcs_enabled) { DRM_ERROR("Trying to clear memory with ring turned off.\n"); -- 2.25.1
Re: [PATCH] drm/amdgpu: Added missing prototype
On Sat, Apr 24, 2021 at 5:03 AM Felix Kuehling wrote: > > Am 2021-04-23 um 5:39 p.m. schrieb Souptick Joarder: > > Kernel test robot throws below warning -> > > > >>> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c:125:5: warning: > >>> no previous prototype for 'kgd_arcturus_hqd_sdma_load' > >>> [-Wmissing-prototypes] > > 125 | int kgd_arcturus_hqd_sdma_load(struct kgd_dev *kgd, void > > *mqd, > > > >>> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c:227:6: warning: > >>> no previous prototype for 'kgd_arcturus_hqd_sdma_is_occupied' > >>> [-Wmissing-prototypes] > > 227 | bool kgd_arcturus_hqd_sdma_is_occupied(struct kgd_dev *kgd, > > void *mqd) > > | ^ > >>> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c:246:5: warning: > >>> no previous prototype for 'kgd_arcturus_hqd_sdma_destroy' > >>> [-Wmissing-prototypes] > > 246 | int kgd_arcturus_hqd_sdma_destroy(struct kgd_dev *kgd, void > > *mqd, > > | ^ > > > > Added prototype for these functions. > The prototypes are already defined in amdgpu_amdkfd_arcturus.h. I think > we just need to add a #include in amdgpu_amdkfd_arcturus.c. > Right. I missed that file. Will send v2. > Regards, > Felix > > > > > > Reported-by: kernel test robot > > Signed-off-by: Souptick Joarder > > --- > > drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 + > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h > > b/drivers/gpu/drm/amd/amdgpu/amdgpu.h > > index dc3a692..8fff0e7 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h > > @@ -316,6 +316,11 @@ int amdgpu_device_ip_wait_for_idle(struct > > amdgpu_device *adev, > > enum amd_ip_block_type block_type); > > bool amdgpu_device_ip_is_idle(struct amdgpu_device *adev, > > enum amd_ip_block_type block_type); > > +int kgd_arcturus_hqd_sdma_load(struct kgd_dev *kgd, void *mqd, > > + uint32_t __user *wptr, struct mm_struct *mm); > > +bool kgd_arcturus_hqd_sdma_is_occupied(struct kgd_dev *kgd, void *mqd); > > +int kgd_arcturus_hqd_sdma_destroy(struct kgd_dev *kgd, void *mqd, > > + unsigned int utimeout); > > > > #define AMDGPU_MAX_IP_NUM 16 > > ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH v2] drm/amdgpu: Added missing prototype
Kernel test robot throws below warning -> >> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c:125:5: warning: >> no previous prototype for 'kgd_arcturus_hqd_sdma_load' >> [-Wmissing-prototypes] 125 | int kgd_arcturus_hqd_sdma_load(struct kgd_dev *kgd, void *mqd, >> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c:195:5: warning: >> no previous prototype for 'kgd_arcturus_hqd_sdma_dump' >> [-Wmissing-prototypes] 195 | int kgd_arcturus_hqd_sdma_dump(struct kgd_dev *kgd, >> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c:227:6: warning: >> no previous prototype for 'kgd_arcturus_hqd_sdma_is_occupied' >> [-Wmissing-prototypes] 227 | bool kgd_arcturus_hqd_sdma_is_occupied(struct kgd_dev *kgd, void *mqd) | ^ >> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c:246:5: warning: >> no previous prototype for 'kgd_arcturus_hqd_sdma_destroy' >> [-Wmissing-prototypes] 246 | int kgd_arcturus_hqd_sdma_destroy(struct kgd_dev *kgd, void *mqd, | ^ Added prototype for these functions. Reported-by: kernel test robot Signed-off-by: Souptick Joarder --- v2: Added header which has the function declarations. drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c index 9ef9f3d..6409d6b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c @@ -25,6 +25,7 @@ #include #include "amdgpu.h" #include "amdgpu_amdkfd.h" +#include "amdgpu_amdkfd_arcturus.h" #include "sdma0/sdma0_4_2_2_offset.h" #include "sdma0/sdma0_4_2_2_sh_mask.h" #include "sdma1/sdma1_4_2_2_offset.h" -- 1.9.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH] drm/amdgpu: Added missing prototype
Kernel test robot throws below warning -> >> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c:125:5: warning: >> no previous prototype for 'kgd_arcturus_hqd_sdma_load' >> [-Wmissing-prototypes] 125 | int kgd_arcturus_hqd_sdma_load(struct kgd_dev *kgd, void *mqd, >> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c:227:6: warning: >> no previous prototype for 'kgd_arcturus_hqd_sdma_is_occupied' >> [-Wmissing-prototypes] 227 | bool kgd_arcturus_hqd_sdma_is_occupied(struct kgd_dev *kgd, void *mqd) | ^ >> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c:246:5: warning: >> no previous prototype for 'kgd_arcturus_hqd_sdma_destroy' >> [-Wmissing-prototypes] 246 | int kgd_arcturus_hqd_sdma_destroy(struct kgd_dev *kgd, void *mqd, | ^ Added prototype for these functions. Reported-by: kernel test robot Signed-off-by: Souptick Joarder --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index dc3a692..8fff0e7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -316,6 +316,11 @@ int amdgpu_device_ip_wait_for_idle(struct amdgpu_device *adev, enum amd_ip_block_type block_type); bool amdgpu_device_ip_is_idle(struct amdgpu_device *adev, enum amd_ip_block_type block_type); +int kgd_arcturus_hqd_sdma_load(struct kgd_dev *kgd, void *mqd, + uint32_t __user *wptr, struct mm_struct *mm); +bool kgd_arcturus_hqd_sdma_is_occupied(struct kgd_dev *kgd, void *mqd); +int kgd_arcturus_hqd_sdma_destroy(struct kgd_dev *kgd, void *mqd, + unsigned int utimeout); #define AMDGPU_MAX_IP_NUM 16 -- 1.9.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH] drm/amd/display: Remove condition which is always set to True
Kernel test robot throws below warning -> >> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:3015:53: >> warning: address of 'aconnector->mst_port->mst_mgr' will always >> evaluate to 'true' [-Wpointer-bool-conversion] if (!(aconnector->port && >mst_port->mst_mgr)) ~~ ~~^~~ Remove the condition which is always set to True. Reported-by: kernel test robot Signed-off-by: Souptick Joarder --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c index 9a13f47..8f7df11 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c @@ -3012,7 +3012,7 @@ static int trigger_hpd_mst_set(void *data, u64 val) if (!aconnector->dc_link) continue; - if (!(aconnector->port && >mst_port->mst_mgr)) + if (!aconnector->port) continue; link = aconnector->dc_link; -- 1.9.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH] drm/amdgpu: Mark mmhub_v1_7_setup_vm_pt_regs() as static
Kernel test robot throws below warning -> drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c:56:6: warning: no previous prototype for 'mmhub_v1_7_setup_vm_pt_regs' [-Wmissing-prototypes] Mark mmhub_v1_7_setup_vm_pt_regs() as static. Reported-by: kernel test robot Signed-off-by: Souptick Joarder --- drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c index 4df0b73..ae7d8a1 100644 --- a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c +++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c @@ -53,7 +53,7 @@ static u64 mmhub_v1_7_get_fb_location(struct amdgpu_device *adev) return base; } -void mmhub_v1_7_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid, +static void mmhub_v1_7_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid, uint64_t page_table_base) { struct amdgpu_vmhub *hub = >vmhub[AMDGPU_MMHUB_0]; -- 1.9.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH] drm/amdgpu/display: initialize the variable 'i'
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9804:38: >> warning: variable 'i' is uninitialized when used here >> [-Wuninitialized] timing = >detailed_timings[i]; ^ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9714:7: note: initialize the variable 'i' to silence this warning int i; ^ = 0 1 warning generated. Initialize the variable 'i'. Reported-by: kernel test robot Signed-off-by: Souptick Joarder --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index a22a53d..e96d3d9 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -9717,7 +9717,7 @@ static bool parse_hdmi_amd_vsdb(struct amdgpu_dm_connector *aconnector, void amdgpu_dm_update_freesync_caps(struct drm_connector *connector, struct edid *edid) { - int i; + int i = 0; struct detailed_timing *timing; struct detailed_non_pixel *data; struct detailed_data_monitor_range *range; -- 1.9.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH] drm: amdgpu: pm: Mark vangogh_clk_dpm_is_enabled() as static
kernel test robot throws below warnings -> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:594:6: warning: no previous prototype for 'vangogh_clk_dpm_is_enabled' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:594:6: warning: no previous prototype for function 'vangogh_clk_dpm_is_enabled' [-Wmissing-prototypes] Mark vangogh_clk_dpm_is_enabled() as static. Reported-by: kernel test robot Signed-off-by: Souptick Joarder --- drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c index 75ddcad..3ffe56e 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c @@ -610,7 +610,7 @@ static int vangogh_get_profiling_clk_mask(struct smu_context *smu, return 0; } -bool vangogh_clk_dpm_is_enabled(struct smu_context *smu, +static bool vangogh_clk_dpm_is_enabled(struct smu_context *smu, enum smu_clk_type clk_type) { enum smu_feature_mask feature_id = 0; -- 1.9.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH linux-next] drm/amd/display: Adding prototype for dccg21_update_dpp_dto()
Kernel test robot throws below warning -> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_dccg.c:46:6: warning: no previous prototype for 'dccg21_update_dpp_dto' [-Wmissing-prototypes] Adding prototype for dccg21_update_dpp_dto(). Reported-by: kernel test robot Signed-off-by: Souptick Joarder --- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_dccg.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_dccg.h b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_dccg.h index b7efa77..e44a374 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_dccg.h +++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_dccg.h @@ -32,5 +32,6 @@ struct dccg *dccg21_create( const struct dccg_shift *dccg_shift, const struct dccg_mask *dccg_mask); +void dccg21_update_dpp_dto(struct dccg *dccg, int dpp_inst, int req_dppclk); #endif /* __DCN21_DCCG_H__ */ -- 1.9.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH] drm/amd/display: Fixed kernel test robot warning
Kernel test robot throws below warning -> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5349:5: warning: no previous prototype for 'amdgpu_dm_crtc_atomic_set_property' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5349:5: warning: no previous prototype for function 'amdgpu_dm_crtc_atomic_set_property' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5373:5: warning: no previous prototype for 'amdgpu_dm_crtc_atomic_get_property' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5373:5: warning: no previous prototype for function 'amdgpu_dm_crtc_atomic_get_property' [-Wmissing-prototypes] As these functions are only used inside amdgpu_dm.c, these can be made static. Reported-by: kernel test robot Signed-off-by: Souptick Joarder --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 313501c..e6d069d 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -5328,7 +5328,7 @@ static void dm_crtc_reset_state(struct drm_crtc *crtc) } #ifdef CONFIG_DEBUG_FS -int amdgpu_dm_crtc_atomic_set_property(struct drm_crtc *crtc, +static int amdgpu_dm_crtc_atomic_set_property(struct drm_crtc *crtc, struct drm_crtc_state *crtc_state, struct drm_property *property, uint64_t val) @@ -5352,7 +5352,7 @@ int amdgpu_dm_crtc_atomic_set_property(struct drm_crtc *crtc, return 0; } -int amdgpu_dm_crtc_atomic_get_property(struct drm_crtc *crtc, +static int amdgpu_dm_crtc_atomic_get_property(struct drm_crtc *crtc, const struct drm_crtc_state *state, struct drm_property *property, uint64_t *val) -- 1.9.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH] drm/radeon: Convert get_user_pages() --> pin_user_pages()
On Fri, May 29, 2020 at 12:58 PM John Hubbard wrote: > > On 2020-05-28 23:49, Souptick Joarder wrote: > ... > >> This is what case 3 was *intended* to cover, but it looks like case 3 > >> needs to > >> be written a little better. I'll attempt that, and Cc you on the actual > >> patch > >> to -mm. (I think we also need a case 5 for an unrelated scenario, too, so > >> it's time.) > > > > There were no *case 5* in the other patch posted in -mm. Do we need to add > > it ? > > > > Working on figuring that out [1], but it's not directly relevant to this > thread. > Maybe I shouldn't have brought it up here. :) > > > [1] https://lore.kernel.org/r/20200529070343.gl14...@quack2.suse.cz > > thanks, > John Hubbard > NVIDIA > > > As this conversion is not relevant ( mentioned above), I have dropped this patch. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH] drm/radeon: Convert get_user_pages() --> pin_user_pages()
On Thu, May 28, 2020 at 12:37 AM John Hubbard wrote: > > On 2020-05-27 01:51, Daniel Vetter wrote: > > On Wed, May 27, 2020 at 10:48:52AM +0200, Daniel Vetter wrote: > >> On Tue, May 26, 2020 at 03:57:45PM -0700, John Hubbard wrote: > >>> On 2020-05-26 14:00, Souptick Joarder wrote: > >>>> This code was using get_user_pages(), in a "Case 2" scenario > >>>> (DMA/RDMA), using the categorization from [1]. That means that it's > >>>> time to convert the get_user_pages() + release_pages() calls to > >>>> pin_user_pages() + unpin_user_pages() calls. > >>>> > >>>> There is some helpful background in [2]: basically, this is a small > >>>> part of fixing a long-standing disconnect between pinning pages, and > >>>> file systems' use of those pages. > >>>> > >>>> [1] Documentation/core-api/pin_user_pages.rst > >>>> > >>>> [2] "Explicit pinning of user-space pages": > >>>> https://lwn.net/Articles/807108/ > >> > >> I don't think this is a case 2 here, nor is it any of the others. Feels > >> like not covered at all by the doc. > >> > >> radeon has a mmu notifier (might be a bit broken, but hey whatever there's > >> other drivers which have the same concept, but less broken). So when you > >> do an munmap, radeon will release the page refcount. > > > > Aha, thanks Daniel. I withdraw my misinformed ACK, then. > > > I forgot to add: It's also not case 3, since there's no hw page fault > > support. It's all faked in software, and explicitly synchronizes against > > pending io (or preempts it, that depends a bit upon the jobs running). > > > > This is what case 3 was *intended* to cover, but it looks like case 3 needs to > be written a little better. I'll attempt that, and Cc you on the actual patch > to -mm. (I think we also need a case 5 for an unrelated scenario, too, so > it's time.) There were no *case 5* in the other patch posted in -mm. Do we need to add it ? > > > thanks, > -- > John Hubbard > NVIDIA > > > >> Which case it that? > >> > >> Note that currently only amdgpu doesn't work like that for gpu dma > >> directly to userspace ranges, it uses hmm and afaiui doens't hold a full > >> page pin refcount. > >> > >> Cheers, Daniel > >> > >> > >>>> > >>>> Signed-off-by: Souptick Joarder > >>>> Cc: John Hubbard > >>>> > >>>> Hi, > >>>> > >>>> I'm compile tested this, but unable to run-time test, so any testing > >>>> help is much appriciated. > >>>> --- > >>>>drivers/gpu/drm/radeon/radeon_ttm.c | 6 +++--- > >>>>1 file changed, 3 insertions(+), 3 deletions(-) > >>>> > >>>> diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c > >>>> b/drivers/gpu/drm/radeon/radeon_ttm.c > >>>> index 5d50c9e..e927de2 100644 > >>>> --- a/drivers/gpu/drm/radeon/radeon_ttm.c > >>>> +++ b/drivers/gpu/drm/radeon/radeon_ttm.c > >>>> @@ -506,7 +506,7 @@ static int radeon_ttm_tt_pin_userptr(struct ttm_tt > >>>> *ttm) > >>>>uint64_t userptr = gtt->userptr + pinned * PAGE_SIZE; > >>>>struct page **pages = ttm->pages + pinned; > >>>> - r = get_user_pages(userptr, num_pages, write ? FOLL_WRITE : 0, > >>>> + r = pin_user_pages(userptr, num_pages, write ? FOLL_WRITE : 0, > >>>> pages, NULL); > >>>>if (r < 0) > >>>>goto release_pages; > >>>> @@ -535,7 +535,7 @@ static int radeon_ttm_tt_pin_userptr(struct ttm_tt > >>>> *ttm) > >>>>kfree(ttm->sg); > >>>>release_pages: > >>>> - release_pages(ttm->pages, pinned); > >>>> + unpin_user_pages(ttm->pages, pinned); > >>>>return r; > >>>>} > >>>> @@ -562,7 +562,7 @@ static void radeon_ttm_tt_unpin_userptr(struct > >>>> ttm_tt *ttm) > >>>>set_page_dirty(page); > >>> > >>> > >>> Maybe we also need a preceding patch, to fix the above? It should be > >>> set_page_dirty_lock(), rather than set_page_dirty(), unless I'm > >>> overlooking > >>> something (which is very possible!). > >>> > >>> Either way, from a tunnel vision perspective of changing gup to pup, this > >>> looks good to me, so > >>> > >>> Acked-by: John Hubbard > >>> > >>> > >>> thanks, > >>> -- > >>> John Hubbard > >>> NVIDIA > >>> > >>>>mark_page_accessed(page); > >>>> - put_page(page); > >>>> + unpin_user_page(page); > >>>>} > >>>>sg_free_table(ttm->sg); > >>>> > >>> > >> > >> -- > >> Daniel Vetter > >> Software Engineer, Intel Corporation > >> http://blog.ffwll.ch > > > ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH] drm/radeon: Convert get_user_pages() --> pin_user_pages()
This code was using get_user_pages(), in a "Case 2" scenario (DMA/RDMA), using the categorization from [1]. That means that it's time to convert the get_user_pages() + release_pages() calls to pin_user_pages() + unpin_user_pages() calls. There is some helpful background in [2]: basically, this is a small part of fixing a long-standing disconnect between pinning pages, and file systems' use of those pages. [1] Documentation/core-api/pin_user_pages.rst [2] "Explicit pinning of user-space pages": https://lwn.net/Articles/807108/ Signed-off-by: Souptick Joarder Cc: John Hubbard Hi, I'm compile tested this, but unable to run-time test, so any testing help is much appriciated. --- drivers/gpu/drm/radeon/radeon_ttm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index 5d50c9e..e927de2 100644 --- a/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/drivers/gpu/drm/radeon/radeon_ttm.c @@ -506,7 +506,7 @@ static int radeon_ttm_tt_pin_userptr(struct ttm_tt *ttm) uint64_t userptr = gtt->userptr + pinned * PAGE_SIZE; struct page **pages = ttm->pages + pinned; - r = get_user_pages(userptr, num_pages, write ? FOLL_WRITE : 0, + r = pin_user_pages(userptr, num_pages, write ? FOLL_WRITE : 0, pages, NULL); if (r < 0) goto release_pages; @@ -535,7 +535,7 @@ static int radeon_ttm_tt_pin_userptr(struct ttm_tt *ttm) kfree(ttm->sg); release_pages: - release_pages(ttm->pages, pinned); + unpin_user_pages(ttm->pages, pinned); return r; } @@ -562,7 +562,7 @@ static void radeon_ttm_tt_unpin_userptr(struct ttm_tt *ttm) set_page_dirty(page); mark_page_accessed(page); - put_page(page); + unpin_user_page(page); } sg_free_table(ttm->sg); -- 1.9.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH v2 hmm 10/11] mm/hmm: Do not use list*_rcu() for hmm->ranges
On Fri, Jun 7, 2019 at 12:15 AM Jason Gunthorpe wrote: > > From: Jason Gunthorpe > > This list is always read and written while holding hmm->lock so there is > no need for the confusing _rcu annotations. > > Signed-off-by: Jason Gunthorpe > Reviewed-by: Jérôme Glisse Acked-by: Souptick Joarder > --- > mm/hmm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/mm/hmm.c b/mm/hmm.c > index c2fecb3ecb11e1..709d138dd49027 100644 > --- a/mm/hmm.c > +++ b/mm/hmm.c > @@ -911,7 +911,7 @@ int hmm_range_register(struct hmm_range *range, > mutex_lock(>lock); > > range->hmm = hmm; > - list_add_rcu(>list, >ranges); > + list_add(>list, >ranges); > > /* > * If there are any concurrent notifiers we have to wait for them for > @@ -941,7 +941,7 @@ void hmm_range_unregister(struct hmm_range *range) > return; > > mutex_lock(>lock); > - list_del_rcu(>list); > + list_del(>list); > mutex_unlock(>lock); > > /* Drop reference taken by hmm_range_register() */ > -- > 2.21.0 > ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH v2 hmm 07/11] mm/hmm: Use lockdep instead of comments
On Fri, Jun 7, 2019 at 12:15 AM Jason Gunthorpe wrote: > > From: Jason Gunthorpe > > So we can check locking at runtime. Little more descriptive change log would be helpful. Acked-by: Souptick Joarder > > Signed-off-by: Jason Gunthorpe > Reviewed-by: Jérôme Glisse > --- > v2 > - Fix missing & in lockdeps (Jason) > --- > mm/hmm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/mm/hmm.c b/mm/hmm.c > index f67ba32983d9f1..c702cd72651b53 100644 > --- a/mm/hmm.c > +++ b/mm/hmm.c > @@ -254,11 +254,11 @@ static const struct mmu_notifier_ops > hmm_mmu_notifier_ops = { > * > * To start mirroring a process address space, the device driver must > register > * an HMM mirror struct. > - * > - * THE mm->mmap_sem MUST BE HELD IN WRITE MODE ! > */ > int hmm_mirror_register(struct hmm_mirror *mirror, struct mm_struct *mm) > { > + lockdep_assert_held_exclusive(>mmap_sem); > + > /* Sanity check */ > if (!mm || !mirror || !mirror->ops) > return -EINVAL; > -- > 2.21.0 > ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH] drm/amd/powerplay: Remove duplicate header
On Fri, Dec 21, 2018 at 2:49 PM Brajeswar Ghosh wrote: > > Remove hwmgr_ppt.h which is included more than once > > Signed-off-by: Brajeswar Ghosh > --- Acked-by: Souptick Joarder > drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h > b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h > index e5a60aa44b5d..07d180ce4d18 100644 > --- a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h > +++ b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h > @@ -28,7 +28,6 @@ > #include "hardwaremanager.h" > #include "hwmgr_ppt.h" > #include "ppatomctrl.h" > -#include "hwmgr_ppt.h" > #include "power_state.h" > #include "smu_helper.h" > > -- > 2.17.1 > ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH] drm/amd/display: Remove duplicate header
On Wed, Dec 19, 2018 at 1:27 PM Brajeswar Ghosh wrote: > > Remove custom_float.h which is included more than once > > Signed-off-by: Brajeswar Ghosh > --- Acked-by: Souptick Joarder > drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c > b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c > index 193184affefb..3e21c2d26998 100644 > --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c > +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c > @@ -40,7 +40,6 @@ > #include "ipp.h" > #include "mpc.h" > #include "reg_helper.h" > -#include "custom_float.h" > #include "dcn10_hubp.h" > #include "dcn10_hubbub.h" > #include "dcn10_cm_common.h" > -- > 2.17.1 > ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx