aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-02-23drm/amd/display: revert populating dcn315 clk table based on dcfclkDmytro Laktyushkin1-21/+31
[Why & How] Due to how pmfw fills out the table when dcfclk states are disabled, using dcfclk based clk table would cause a no read situation. Revert the change to prevent underflow until a better solution is coded. Reviewed-by: Charlene Liu <[email protected]> Acked-by: Qingqing Zhuo <[email protected]> Signed-off-by: Dmytro Laktyushkin <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: limit unbounded requesting to 5kDmytro Laktyushkin1-1/+2
[WHy & How] Unbounded requesting is unsupported on pipe split modes and this change prevents us running into such a situation with wide modes. Reviewed-by: Charlene Liu <[email protected]> Acked-by: Qingqing Zhuo <[email protected]> Signed-off-by: Dmytro Laktyushkin <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: add reset register dump trace on GPUSomalapuram Amaranath2-0/+33
Dump the list of register values to trace event on GPU reset. Signed-off-by: Somalapuram Amaranath <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Andrey Grodzovsky <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: add debugfs for reset registers listSomalapuram Amaranath2-0/+86
List of register populated for dump collection during the GPU reset. Signed-off-by: Somalapuram Amaranath <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: check vm ready by amdgpu_vm->evicting flagQiang Yu1-2/+7
Workstation application ANSA/META v21.1.4 get this error dmesg when running CI test suite provided by ANSA/META: [drm:amdgpu_gem_va_ioctl [amdgpu]] *ERROR* Couldn't update BO_VA (-16) This is caused by: 1. create a 256MB buffer in invisible VRAM 2. CPU map the buffer and access it causes vm_fault and try to move it to visible VRAM 3. force visible VRAM space and traverse all VRAM bos to check if evicting this bo is valuable 4. when checking a VM bo (in invisible VRAM), amdgpu_vm_evictable() will set amdgpu_vm->evicting, but latter due to not in visible VRAM, won't really evict it so not add it to amdgpu_vm->evicted 5. before next CS to clear the amdgpu_vm->evicting, user VM ops ioctl will pass amdgpu_vm_ready() (check amdgpu_vm->evicted) but fail in amdgpu_vm_bo_update_mapping() (check amdgpu_vm->evicting) and get this error log This error won't affect functionality as next CS will finish the waiting VM ops. But we'd better clear the error log by checking the amdgpu_vm->evicting flag in amdgpu_vm_ready() to stop calling amdgpu_vm_bo_update_mapping() later. Another reason is amdgpu_vm->evicted list holds all BOs (both user buffer and page table), but only page table BOs' eviction prevent VM ops. amdgpu_vm->evicting flag is set only for page table BOs, so we should use evicting flag instead of evicted list in amdgpu_vm_ready(). The side effect of this change is: previously blocked VM op (user buffer in "evicted" list but no page table in it) gets done immediately. v2: update commit comments. Acked-by: Paul Menzel <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu/nv: set mode2 reset for MP1 13.0.8Prike Liang1-0/+1
Set mode2 reset support for MP1 13.0.8. Signed-off-by: Prike Liang <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu/nv: enable gfx10.3.7 clock gating supportPrike Liang1-1/+9
This will enable the following gfx clock gating. - Fine clock gating - Medium Grain clock gating - 3D Coarse clock gating - Coarse Grain clock gating - RLC/CP light sleep clock gating Signed-off-by: Prike Liang <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/pm: Fix missing prototype warningLijo Lazar1-1/+1
Fix below warning warning: no previous prototype for '__smu_get_enabled_features' [-Wmissing-prototypes] Fixes: f141e251474d67 ("drm/amd/pm: validate SMU feature enable message for getting feature enabled mask") Reported-by: kernel test robot <[email protected]> Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Guchun Chen <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: add mode2 reset support for smu 13.0.5Yifan Zhang1-0/+1
This patch adds mode2 reset support for smu 13.0.5. Signed-off-by: Yifan Zhang <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: Fixed warning reported by kernel test robotyipechai1-1/+1
Fixed warning reported by kernel test robot: 1.warning: variable 'ras_obj' is used uninitialized whenever '||' condition is true. Signed-off-by: yipechai <[email protected]> Reviewed-by: Tao Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdkfd: Print bdf in peer map failure messageHarish Kasiviswanathan1-2/+9
Print alloc node, peer node and memory domain when peer map fails. This is more useful v2: use dev_err instead of pr_err use bdf for identify peer gpu Reviewed-by: Felix Kuehling <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Harish Kasiviswanathan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: 3.2.174Aric Cyr1-1/+1
This version brings along following fixes: - add debug option to bypass ssinfo from bios. - Refactor fixed VS logic for non-transparent mode - add cable ID support for usb c connector - clear remote dc_sink when stop mst - Ignore Transitional Invalid Link Rate Error Message - Fix wrong resolution with DP/VGA adapter - Refactor PSR DPCD caps detection - Set compbuf size to min at prep prevent overbook crb - lock/un-lock cursor if odm pipe split used Acked-by: Solomon Chiu <[email protected]> Signed-off-by: Aric Cyr <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: add debug option to bypass ssinfo from bios.Charlene Liu3-0/+5
[Why&How] add debug option to bypass ssinfo from bios. Reviewed-by: Chris Park <[email protected]> Acked-by: Solomon Chiu <[email protected]> Signed-off-by: Charlene Liu <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Refactor fixed VS logic for non-transparent modeGeorge Shen1-5/+97
[Why] All fixed VS/PE link training sequence should be refactored into a separate function outside of the standard link training sequence. This includes the sequence for non-transparent mode. [How] Isolate link training sequence for fixed VS/PE non-transparent mode into a separate function. Reviewed-by: Wenjing Liu <[email protected]> Acked-by: Solomon Chiu <[email protected]> Signed-off-by: George Shen <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: add cable ID support for usb c connectorWenjing Liu7-41/+117
[how] Call to DMUB to retrieve usb c cable ID data from PD firmware. If cable id is retrieved from DMUB, skip reading cable ID from RX. Reviewed-by: George Shen <[email protected]> Acked-by: Solomon Chiu <[email protected]> Signed-off-by: Wenjing Liu <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: clear remote dc_sink when stop mstWayne Lin1-1/+19
[Why] Currently, we don't have code path to release remote dc_sink when unplug MST hub from the system. After few times hotplug, we hit the limition of maximum number of remote dc_sink and can't light up new connected monitor anymore. [How] Releasing all remote dc_sink at dm_helpers_dp_mst_stop_top_mgr() was removed by previous patch. Restore it. Reviewed-by: Jerry Zuo <[email protected]> Acked-by: Solomon Chiu <[email protected]> Signed-off-by: Wayne Lin <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Ignore Transitional Invalid Link Rate Error MessageFangzhi Zuo1-1/+1
[Why] When hotplug or unplug happens, each stream disabled one by one, and then enable any alived streams. Link phy and payload table is cleared when 1st stream is disabled. That causes the error message pops up when disable 2nd stream. There is no active stream after link_rate is cleared. After all streams are disabled, link will be trained again and link rate is assigned to any alived streams. Therefore there is no harm for the error message that represents invalid link rate value in the atomic reset transitional time period. [How] Downgrade the log level from ERROR to DEBUG. Reviewed-by: Wayne Lin <[email protected]> Acked-by: Solomon Chiu <[email protected]> Signed-off-by: Fangzhi Zuo <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Fix wrong resolution with DP/VGA adapterIlya2-0/+19
[Why] Hotplugging the VGA side of some DP/VGA adapters caused the display to light up with the wrong (non-native) resolution. This is caused by the adapter misbehaving by reporting the wrong number of downstream ports when the VGA side is unplugged (reports 1 instead of 0), but only if the SINK_COUNT DPCD register is read more than once. [How] To work around the adapter behavior, remove the sink if link is detected, but EDID cannot be read. Reviewed-by: Wenjing Liu <[email protected]> Acked-by: Solomon Chiu <[email protected]> Signed-off-by: Ilya <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Refactor PSR DPCD caps detectionPo Ting Chen6-57/+69
[Why] To move the PSR DPCD caps detection into detect_edp_sink_caps() Reviewed-by: Anthony Koo <[email protected]> Acked-by: Solomon Chiu <[email protected]> Signed-off-by: Po Ting Chen <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Set compbuf size to min at prep prevent overbook crbDuncan Ma2-2/+11
[Why] Detbuffer size is dynamically set for dcn31x. At certain moment, compbuf+(def size * num pipes) > config return buffer size causing flickering. This is easily reproducible when MPO is enabled with two displays. [How] At prepare BW, use the min comp buffer size. When it is to optimize BW, set compbuf size back to maximum possible size. Reviewed-by: Charlene Liu <[email protected]> Acked-by: Solomon Chiu <[email protected]> Signed-off-by: Duncan Ma <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: lock/un-lock cursor if odm pipe split usedPaul Hsieh1-1/+6
[Why] When system resume from sleep, the cursor lock will be reset to default(lock status). And the cursor programming sequence doesn't consider about odm pipe split cause cursor can't be enabled. [How] If odm pipe split has been used, lock/un-lock on each pipes. Reviewed-by: Dmytro Laktyushkin <[email protected]> Acked-by: Solomon Chiu <[email protected]> Signed-off-by: Paul Hsieh <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Turn global functions into static functionsMaíra Canal7-8/+9
Turn previously global functions into static functions to avoid -Wmissing-prototype warnings, such as: drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn30/irq_service_dcn30.c:50:20: warning: no previous prototype for function 'to_dal_irq_source_dcn30' [-Wmissing-prototypes] enum dc_irq_source to_dal_irq_source_dcn30( ^ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn30/irq_service_dcn30.c:50:1: note: declare 'static' if the function is not intended to be used outside of this translation unit enum dc_irq_source to_dal_irq_source_dcn30( ^ static 1 warning generated. drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c:488:6: warning: no previous prototype for function 'dcn316_clk_mgr_helper_populate_bw_params' [-Wmissing-prototypes] void dcn316_clk_mgr_helper_populate_bw_params( ^ drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c:488:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void dcn316_clk_mgr_helper_populate_bw_params( ^ static 1 warning generated. v2: drop is_timing_changed hunk (Alex) Signed-off-by: Maíra Canal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Add missing prototypes to dcn201_initMaíra Canal1-0/+1
Include the header with the prototype to silence the following clang warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn201/dcn201_init.c:127:6: warning: no previous prototype for function 'dcn201_hw_sequencer_construct' [-Wmissing-prototypes] void dcn201_hw_sequencer_construct(struct dc *dc) ^ Signed-off-by: Maíra Canal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Remove unused variableMaíra Canal1-3/+0
Remove the variable clamshell_closed from the function dcn10_align_pixel_clocks. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2063:7: warning: variable 'clamshell_closed' set but not used [-Wunused-but-set-variable] bool clamshell_closed = false; ^ Signed-off-by: Maíra Canal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Remove unused dmub_outbox_irq_info_funcs variableMaíra Canal1-5/+0
Remove the unused struct irq_source_info_funcs dmub_outbox_irq_info_funcs from the file, which was declared but never hooked up. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn201/irq_service_dcn201.c:141:43: warning: unused variable 'dmub_outbox_irq_info_funcs' [-Wunused-const-variable] static const struct irq_source_info_funcs dmub_outbox_irq_info_funcs = { ^ Signed-off-by: Maíra Canal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Remove vupdate_int_entry definitionMaíra Canal1-14/+0
Remove the vupdate_int_entry definition and utilization to avoid the following warning by Clang: drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:410:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] vupdate_no_lock_int_entry(0), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39: note: expanded from macro 'vupdate_no_lock_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:404:2: note: previous initialization is here vupdate_int_entry(0), ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39: note: expanded from macro 'vupdate_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:411:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] vupdate_no_lock_int_entry(1), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39: note: expanded from macro 'vupdate_no_lock_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:405:2: note: previous initialization is here vupdate_int_entry(1), ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39: note: expanded from macro 'vupdate_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:412:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] vupdate_no_lock_int_entry(2), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39: note: expanded from macro 'vupdate_no_lock_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:406:2: note: previous initialization is here vupdate_int_entry(2), ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39: note: expanded from macro 'vupdate_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:413:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] vupdate_no_lock_int_entry(3), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39: note: expanded from macro 'vupdate_no_lock_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:407:2: note: previous initialization is here vupdate_int_entry(3), ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39: note: expanded from macro 'vupdate_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:414:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] vupdate_no_lock_int_entry(4), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39: note: expanded from macro 'vupdate_no_lock_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:408:2: note: previous initialization is here vupdate_int_entry(4), ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39: note: expanded from macro 'vupdate_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:415:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] vupdate_no_lock_int_entry(5), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:280:39: note: expanded from macro 'vupdate_no_lock_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:409:2: note: previous initialization is here vupdate_int_entry(5), ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:269:39: note: expanded from macro 'vupdate_int_entry' [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ ^~ 6 warnings generated. Fixes: 688f97ed3f5e ("drm/amd/display: Add vupdate_no_lock interrupts for DCN2.1") Signed-off-by: Maíra Canal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Remove unused dcn316_smu_set_voltage_via_phyclk functionMaíra Canal1-16/+0
Remove dcn316_smu_set_voltage_via_phyclk function, which is not used in the codebase. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn316/dcn316_smu.c:171:5: warning: no previous prototype for function 'dcn316_smu_set_voltage_via_phyclk' [-Wmissing-prototypes] int dcn316_smu_set_voltage_via_phyclk(struct clk_mgr_internal *clk_mgr, int requested_phyclk_khz) ^ Signed-off-by: Maíra Canal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amd/display: Remove unused temp variableMaíra Canal1-0/+4
Remove unused temp variable from the dmub_rb_flush_pending function by using arithmetic to remove the loop. The -Wunused-but-set-variable warning was pointed out by Clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h:2921:12: warning: variable 'temp' set but not used [-Wunused-but-set-variable] uint64_t temp; ^ v2: squash in revert and comment update (Alex) Signed-off-by: Maíra Canal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: Remove unused get_umc_v8_7_channel_index functionMaíra Canal1-7/+0
Remove get_umc_v8_7_channel_index function, which is not used in the codebase. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/umc_v8_7.c:50:24: warning: unused function 'get_umc_v8_7_channel_index' [-Wunused-function] static inline uint32_t get_umc_v8_7_channel_index(struct amdgpu_device *adev, ^ Signed-off-by: Maíra Canal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: Change amdgpu_ras_block_late_init_default function scopeMaíra Canal1-1/+1
Turn previously global function into a static function to avoid the following Clang warning: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2459:5: warning: no previous prototype for function 'amdgpu_ras_block_late_init_default' [-Wmissing-prototypes] int amdgpu_ras_block_late_init_default(struct amdgpu_device *adev, ^ drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2459:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int amdgpu_ras_block_late_init_default(struct amdgpu_device *adev, ^ static Signed-off-by: Maíra Canal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: use ktime rather than jiffies for benchmark resultsAlex Deucher1-14/+17
To protect against wraparounds. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: use kernel BO API for benchmark buffer managementAlex Deucher1-61/+17
Simplifies the code quite a bit. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: derive GTT display support from DMAlex Deucher3-27/+12
Rather than duplicating the logic in two places, consolidate the logic in the display manager. Acked-by: Yifan Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu/display: split dmcu and gpuvm handling logicAlex Deucher1-15/+20
Separate the logic for each of these features to make the code easier to understand and update in the future. Acked-by: Yifan Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: drop testing module parameterAlex Deucher5-273/+1
This test is not particularly useful now that GTT and GART are decoupled in the driver. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: drop benchmark module parameterAlex Deucher3-15/+0
Now that we expose the benchmarks via debugfs, there is no longer a need for the module parameter. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: expose benchmarks via debugfsAlex Deucher1-0/+23
They provide a nice smoke test of transfer performance using SDMA. Allow the user to run these at runtime rather than only at init time. v2: fix permissions (Alex) Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdkfd: Use real device for messagesFelix Kuehling3-10/+4
kfd_chardev() doesn't provide much useful information in dev_... messages on multi-GPU systems because there is only one KFD device, which doesn't correspond to any particular GPU. Use the actual GPU device to indicate the GPU that caused a message. Signed-off-by: Felix Kuehling <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdkfd: Fix for possible integer overflowDavid Yat Sin1-1/+1
Fix for possible integer overflow when doing addition. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: David Yat Sin <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: add a benchmark mutexAlex Deucher3-9/+17
To avoid multiple runs in parallel to avoid mixing results. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: print the selected benchmark test in the logAlex Deucher1-1/+25
So you can tell which benchmark was run. v2: print the test description as well Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-23drm/amdgpu: plumb error handling though amdgpu_benchmark()Alex Deucher2-40/+66
So we can tell when this function fails. v2: squash in error handling fix (Alex) Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-22drm/amdgpu/benchmark: use dev_info rather than DRM macros for loggingAlex Deucher1-5/+7
So we can tell which output goes to which device when multiple GPUs are present. Also while we are here, convert DRM_ERROR to dev_info. The error cases are not critical. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-22drm/amdkfd: make CRAT table missing message informational onlyAlex Deucher1-1/+1
The driver has a fallback so make the message informational rather than a warning. The driver has a fallback if the Component Resource Association Table (CRAT) is missing, so make this informational now. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1906 Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-22drm/amdgpu: Fix typo in *whether* in commentPaul Menzel1-1/+1
Signed-off-by: Paul Menzel <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-22drm/amdgpu: read harvest bit per IP data on legacy GPUsGuchun Chen1-25/+100
Based on firmware team's input, harvest table in VBIOS does not apply well to legacy products like Navi1x, so seperate harvest mask configuration retrieve from different places. On legacy GPUs, scan harvest bit per IP data stuctures, while for newer ones, still read IP harvest info from harvest table. v2: squash in fix to limit it to specific skus (Guchun) Signed-off-by: Guchun Chen <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-22drm/amd/pm: validate SMU feature enable message for getting feature enabled maskPrike Liang3-29/+43
There's always miss the SMU feature enabled checked in the NPI phase, so let validate the SMU feature enable message directly rather than add more and more MP1 version check. Signed-off-by: Prike Liang <[email protected]> Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-22drm/amdgpu: enable TMZ option for onwards asicPrike Liang1-0/+1
The TMZ is disabled by default and enable TMZ option for the IP discovery based asic will help on the TMZ function verification. Signed-off-by: Prike Liang <[email protected]> Reviewed-by: Aaron Liu <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-22drm/amdgpu: bypass tiling flag check in virtual display case (v2)Guchun Chen1-1/+1
vkms leverages common amdgpu framebuffer creation, and also as it does not support FB modifier, there is no need to check tiling flags when initing framebuffer when virtual display is enabled. This can fix below calltrace: amdgpu 0000:00:08.0: GFX9+ requires FB check based on format modifier WARNING: CPU: 0 PID: 1023 at drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:1150 amdgpu_display_framebuffer_init+0x8e7/0xb40 [amdgpu] v2: check adev->enable_virtual_display instead as vkms can be enabled in bare metal as well. Signed-off-by: Leslie Shi <[email protected]> Signed-off-by: Guchun Chen <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2022-02-22Revert "drm/amdgpu: add modifiers in amdgpu_vkms_plane_init()"Guchun Chen1-2/+1
This reverts commit 4046afcebfc3c8c0dd5666c2671b2c192b344f78. No need to support modifier in virtual kms, otherwise, in SRIOV mode, when lanuching X server, set crtc will fail due to mismatch between primary plane modifier and framebuffer modifier. Signed-off-by: Guchun Chen <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>