Yang Li
53bd83dfff
drm/amd/display: remove unneeded semicolon
...
Eliminate the following coccicheck warning:
./drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c:2344:67-68: Unneeded semicolon
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com >
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:16 -04:00
Vijendar Mukunda
b2065fb21d
drm/amdgpu: fix i2s_pdata out of bound array access
...
Fixed following Smatch static checker warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:393 acp_hw_init()
error: buffer overflow 'i2s_pdata' 3 <= 3
drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c:396 acp_hw_init()
error: buffer overflow 'i2s_pdata' 3 <= 3
Fixes: 4c33e5179f ("drm/amdgpu: create I2S platform devices for Jadeite platform")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:16 -04:00
Lang Yu
0dc204bc3f
drm/amdkfd: fix kgd_mem memory leak when importing dmabuf
...
The kgd_mem memory allocated in amdgpu_amdkfd_gpuvm_import_dmabuf()
is not freed properly.
Explicitly free it in amdgpu_amdkfd_gpuvm_free_memory_of_gpu()
under condition "mem->bo->kfd_bo != mem".
Suggested-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Lang Yu <Lang.Yu@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:16 -04:00
Alex Sierra
3d2af401cf
drm/amdgpu: add debugfs for kfd system and ttm mem used
...
This keeps track of kfd system mem used and kfd ttm mem used.
Signed-off-by: Alex Sierra <alex.sierra@amd.com >
Reviewed-by: Philip Yang <Philip.Yang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:16 -04:00
Alex Sierra
f9af3c16bf
drm/amdkfd: track unified memory reservation with xnack off
...
[WHY]
Unified memory with xnack off should be tracked, as userptr mappings
and legacy allocations do. To avoid oversuscribe system memory when
xnack off.
[How]
Exposing functions reserve_mem_limit and unreserve_mem_limit to SVM
API and call them on every prange creation and free.
Signed-off-by: Alex Sierra <alex.sierra@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:16 -04:00
Dan Carpenter
06ac561fb0
drm/amd/display: fix signedness bug in execute_synaptics_rc_command()
...
The "ret" variable needs to be signed for the error handling to work.
Fixes: 2ca97adccd ("drm/amd/display: Add Synaptics Fifo Reset Workaround")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:16 -04:00
Jiapeng Chong
e3b0079be8
drm/amd/display: Clean up some inconsistent indenting
...
No functional modification involved.
smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1372 dp_dsc_clock_en_read() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1478 dp_dsc_clock_en_write() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1563 dp_dsc_slice_width_read() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1667 dp_dsc_slice_width_write() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1752 dp_dsc_slice_height_read() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1856 dp_dsc_slice_height_write() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1937 dp_dsc_bits_per_pixel_read() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:2038 dp_dsc_bits_per_pixel_write() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:2117 dp_dsc_pic_width_read() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:2178 dp_dsc_pic_height_read() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:2254 dp_dsc_chunk_size_read() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:2330 dp_dsc_slice_bpg_offset_read() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:16 -04:00
Jiapeng Chong
66bd94debe
drm/amd/display: Clean up some inconsistent indenting
...
Clean up some inconsistent indenting, replace sizeof(x) / sizeof((x)[0]))
with ARRAY_SIZE(x).
smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/dcn30_fpu.c:185 optc3_fpu_set_vrr_m_const() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/dcn30_fpu.c:355 dcn30_fpu_set_mcif_arb_params() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/dcn30_fpu.c:384 dcn30_fpu_calculate_wm_and_dlg() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/dcn30_fpu.c:390 dcn30_fpu_calculate_wm_and_dlg() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:16 -04:00
Jiapeng Chong
1be3188a6d
drm/amd/display: Clean up some inconsistent indenting
...
No functional modification involved.
smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn303/dcn303_fpu.c:205 dcn303_fpu_update_bw_bounding_box() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn303/dcn303_fpu.c:355 dcn303_fpu_init_soc_bounding_box() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:16 -04:00
Jiapeng Chong
1422ca01be
drm/amd/display: Clean up some inconsistent indenting
...
No functional modification involved.
smatch warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_util_32.c:713 dml32_CalculateSwathWidth() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:16 -04:00
Jiapeng Chong
4557489e03
drm/amd/display: Clean up some inconsistent indenting
...
No functional modification involved.
smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_rq_dlg_calc_32.c:51 dml32_rq_dlg_get_rq_reg() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_rq_dlg_calc_32.c:68 dml32_rq_dlg_get_rq_reg() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_rq_dlg_calc_32.c:220 dml32_rq_dlg_get_dlg_reg() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_rq_dlg_calc_32.c:224 dml32_rq_dlg_get_dlg_reg() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_rq_dlg_calc_32.c:235 dml32_rq_dlg_get_dlg_reg() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_rq_dlg_calc_32.c:240 dml32_rq_dlg_get_dlg_reg() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:15 -04:00
Jiapeng Chong
931fa55b2f
drm/amd/display: Clean up some inconsistent indenting
...
No functional modification involved.
smatch warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_hwseq.c:1728 dcn20_program_front_end_for_ctx() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:15 -04:00
Jiapeng Chong
64f857b547
drm/amd/display: Clean up some inconsistent indenting
...
No functional modification involved.
smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp_cm.c:450 dpp20_get_blndgam_current() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dpp_cm.c:543 dpp20_get_shaper_current() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:15 -04:00
Jiapeng Chong
292956cfd9
drm/amd/display: Clean up some inconsistent indenting
...
No functional modification involved.
smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_mpc.c:305 mpc20_get_ogam_current() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:15 -04:00
Jiapeng Chong
fbad6c418e
drm/amd/display: Clean up some inconsistent indenting
...
No functional modification involved.
smatch warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dwb.c:104 dwb2_enable() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:15 -04:00
Jiapeng Chong
9ced2e492b
drm/amd/display: Clean up some inconsistent indenting
...
No functional modification involved.
smatch warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_optc.c:186 optc3_set_dsc_config() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:15 -04:00
Jiapeng Chong
e3b2bbb33e
drm/amd/display: Clean up some inconsistent indenting
...
No functional modification involved.
smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_mpc.c:116 mpc3_get_ogam_current() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_mpc.c:445 mpc3_get_shaper_current() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:15 -04:00
Jiapeng Chong
afb185008d
drm/amd/display: Clean up some inconsistent indenting
...
No functional modification involved.
smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dpp.c:724 dpp3_get_blndgam_current() warn: inconsistent indenting.
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dpp.c:823 dpp3_get_shaper_current() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:15 -04:00
Jiapeng Chong
980e09e8b7
drm/amd/display: Clean up some inconsistent indenting
...
No functional modification involved.
smatch warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dpp_cm.c:67 dpp30_get_gamcor_current() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:15 -04:00
Jiapeng Chong
05381583a1
drm/amd/display: Clean up some inconsistent indenting
...
No functional modification involved.
smatch warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c:726 dcn31_clk_mgr_construct() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:15 -04:00
Jiapeng Chong
203dc77786
drm/amd/display: Clean up some inconsistent indenting
...
No functional modification involved.
smatch warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c:655 dcn315_clk_mgr_construct() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:15 -04:00
Jiapeng Chong
84e2fd6494
drm/amd/display: Clean up some inconsistent indenting
...
No functional modification involved.
smatch warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c:683 dcn316_clk_mgr_construct() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:15 -04:00
Jiapeng Chong
ed63b7cf2d
drm/amd/display: Clean up some inconsistent indenting
...
No functional modification involved.
smatch warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c:107 dcn201_update_clocks() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:15 -04:00
Jiapeng Chong
fcac1ac7f1
drm/amd/display: Clean up some inconsistent indenting
...
No functional modification involved.
smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c:716 dcn314_clk_mgr_construct() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:15 -04:00
Jiapeng Chong
3f5a3881f1
drm/amd/display: Clean up some inconsistent indenting
...
No functional modification involved.
smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_mpc.c:306 mpc32_get_shaper_current() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:15 -04:00
Jiapeng Chong
8b3120dfc1
drm/amd/display: Clean up some inconsistent indenting
...
No functional modification involved.
smatch warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_hwseq.c:910 dcn32_init_hw() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:15 -04:00
Philip Yang
5640cb8921
drm/amdkfd: Split giant svm range
...
Giant svm range split to smaller ranges, align the range start address
to max svm range pages to improve MMU TLB usage.
Signed-off-by: Philip Yang <Philip.Yang@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:14 -04:00
Philip Yang
4959e609de
drm/amdkfd: Set svm range max pages
...
This will be used to split giant svm range into smaller ranges, to
support VRAM overcommitment by giant range and improve GPU retry fault
recover on giant range.
Signed-off-by: Philip Yang <Philip.Yang@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:14 -04:00
Philip Yang
79b2c54f19
drm/amdgpu: Allow TTM to evict svm bo from same process
...
To support SVM range VRAM overcommitment, TTM should be able to evict
svm bo of same process to system memory, to get space to alloc new svm
bo.
Signed-off-by: Philip Yang <Philip.Yang@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:14 -04:00
Roy Sun
1f83db6be3
drm/amdgpu: Fix the incomplete product number
...
The comments say that the product number is a 16-digit HEX string so the
buffer needs to be at least 17 characters to hold the NUL terminator. Expand
the buffer size to 20 to avoid the alignment issues.
The comment:Product number should only be 16 characters. Any
more,and something could be wrong. Cap it at 16 to be safe
Signed-off-by: Roy Sun <Roy.Sun@amd.com >
Reviewed-by: André Almeida <andrealmeid@igalia.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:14 -04:00
Guchun Chen
8585732baa
drm/amdgpu: use adev_to_drm for consistency
...
Keep code consistency when accessing drm_device from amdgpu driver.
Signed-off-by: Guchun Chen <guchun.chen@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:14 -04:00
wangjianli
aa316247c7
drm/amdgpu/dc/dce: fix repeated words in comments
...
Delete the redundant word 'in'.
Signed-off-by: wangjianli <wangjianli@cdjrlc.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2022-07-28 16:05:14 -04:00
Dave Airlie
2bc7ea71a7
Merge tag 'topic/nouveau-misc-2022-07-27' of git://anongit.freedesktop.org/drm/drm into drm-next
...
drm/nouveau-misc: display patches.
These are just some precursor and cleanup display patches from Ben,
tested by Lyude.
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Dave Airlie <airlied@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/CAPM=9ty0R37q0mohBr_CegpYLXK2=fAH54QfAsMhHfPygTsdQA@mail.gmail.com
2022-07-27 11:34:07 +10:00
Dave Airlie
ee8b1ef9a6
Merge tag 'amd-drm-next-5.20-2022-07-26' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
...
amdgpu:
- VCN4 fixes
- RAS support for UMC 8.10
- ACP support for jadeite platforms
- NBIO HDP flush fixes
- Misc spelling and grammar fixes
- Runtime PM fixes
- Non-DC HPD fix
- Clean up amdgpu DM code
- DSC fixes
- Expose some additional GFXOFF data via debugfs
- More FP clean up for new DCN blocks
- PPC DC FP fixes
- DCN 3.1.4 fixes
- DC DML stack usage fixes
- GMC fixes
- SPM fixes for RDNA2
amdkfd:
- MMU notifier fix
- Mutex fix
UAPI:
- Add a comment about VCN4 unified queues
- IP version information for UMDs
Proposed mesa change: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411/diffs?commit_id=c8a63590dfd0d64e6e6a634dcfed993f135dd075
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20220726181536.5759-1-alexander.deucher@amd.com
2022-07-27 09:33:45 +10:00
Ben Skeggs
dfc4005f8c
drm/nouveau/disp: move DAC load detection method
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2022-07-27 09:05:49 +10:00
Ben Skeggs
1b255f1ccc
drm/nouveau/disp: add output class
...
Will be used to more cleanly implement existing method interfaces that
take some confusing (IEDTkey, inherited from VBIOS, which RM no longer
uses on Ampere) match values to determine which display path to operate
on.
Methods will be protected from racing with supervisor, and from being
called where they shouldn't be (ie. without an OR assigned).
v2:
- use ?: (lyude)
v3:
- fix return code if noacquire() method fails
Signed-off-by: Ben Skeggs <bskeggs@redhat.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2022-07-27 09:05:49 +10:00
Ben Skeggs
a6fd8f9364
drm/nouveau/disp: add supervisor mutex
...
Will be used to protect NVIF_CLASS_OUTP method calls from racing with
in-progress supervisor handling.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2022-07-27 09:05:48 +10:00
Ben Skeggs
32dd923669
drm/nouveau/disp: add conn method to query HPD pin status
...
And use it to bail early in DP detection and avoid futile AUX transactions.
This could be used on other connector types too in theory, but it's not
something we've ever done before and I'd rather not risk breaking working
systems without looking into it more closely.
It's safe for DP though. We already do this by checking an AUX register
that contains HPD status and aborting the transaction. However, this is
much deeper in the stack - after taking various mutexes, poking HW for no
good reason, and making a mess in debug logs.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2022-07-27 09:05:48 +10:00
Ben Skeggs
95983aea80
drm/nouveau/disp: add connector class
...
Will be used to provide more solid driver interfaces in general, but
the immediate motivation is work towards fixing issues with handling
hotplug/DP IRQ events.
Its use is currently limited to where we support non-polled hotplug
already (ie. any GPU since NV40ish era, where our DCB handling works
well enough), until that gets cleaned up someday.
v2:
- use ?: (lyude)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2022-07-27 09:05:48 +10:00
Ben Skeggs
889fcbe949
drm/nouveau/disp: add common channel class handling
...
Replaces a bunch of unnecessarily duplicated boilerplate in per-chipset
code with a simpler, common, implementation.
Channel "awaken" notify code is completely gone for now. KMS has never
made use of it so far, and event notify handling is about to be changed
in general anyway.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2022-07-27 09:05:48 +10:00
Ben Skeggs
7bcf89eed4
drm/nouveau/disp: split sor hda funcs out to their own struct
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2022-07-27 09:05:48 +10:00
Ben Skeggs
9a4514fbff
drm/nouveau/disp: split sor dp funcs out to their own struct
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2022-07-27 09:05:47 +10:00
Ben Skeggs
79c453af55
drm/nouveau/disp: replace hda func pointer check with flag
...
Simpler, and less error-prone than a separate set of function pointers.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2022-07-27 09:05:47 +10:00
Ben Skeggs
1c6aab75ec
drm/nouveau/disp: merge nv50_disp_new_() and nvkm_disp_new()
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2022-07-27 09:05:47 +10:00
Ben Skeggs
3517e6b6fe
drm/nouveau/disp: group supervisor-related struct members
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2022-07-27 09:05:47 +10:00
Ben Skeggs
acbe9ecfb7
drm/nouveau/disp: merge head/outp/ior code into chipset files
...
No changes to code at all here, just shuffling it around and removing
a bunch of (now unnecessary) forward-declarations from headers.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2022-07-27 09:05:47 +10:00
Ben Skeggs
168c029943
drm/nouveau/disp: add common class handling between <nv50 and >=nv50
...
About to expose head/output path/connector objects everywhere, so we will
need support for child classes prior to nv50 now.
Somewhat cleaner than the code >=nv50 used previously.
v2:
- use ?: (lyude)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2022-07-27 09:05:46 +10:00
Ben Skeggs
92fba5d3c8
drm/nouveau/disp: collapse nv50_disp into nvkm_disp
...
Dump of one struct's members into another, with a couple of list
renames because of collisions.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2022-07-27 09:05:45 +10:00
Ben Skeggs
0407b33fad
drm/nouveau/disp: collapse nv50_disp_func into nvkm_disp_func
...
Aside from a chicken-and-egg problem with a duplicate 'root' member,
this is a straight dump of function pointers from one struct into
another.
The left-over wrapping mess in >=nv50 structs will be fixed later.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2022-07-27 09:05:45 +10:00
Ben Skeggs
412dfcf34e
drm/nouveau/disp: clean up nvkm_outp constructors
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com >
Reviewed-by: Lyude Paul <lyude@redhat.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
2022-07-27 09:05:45 +10:00