platform/kernel/linux-rpi.git
18 months agodrm/jpeg: Clean up errors in jpeg_v2_0.c
Ran Sun [Wed, 2 Aug 2023 06:59:58 +0000 (06:59 +0000)]
drm/jpeg: Clean up errors in jpeg_v2_0.c

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amdgpu: Clean up errors in uvd_v7_0.c
Ran Sun [Wed, 2 Aug 2023 06:58:04 +0000 (06:58 +0000)]
drm/amdgpu: Clean up errors in uvd_v7_0.c

Fix the following errors reported by checkpatch:

ERROR: spaces required around that ':' (ctx:VxE)
that open brace { should be on the previous line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amdgpu/atomfirmware: Clean up errors in amdgpu_atomfirmware.c
Ran Sun [Wed, 2 Aug 2023 06:51:27 +0000 (06:51 +0000)]
drm/amdgpu/atomfirmware: Clean up errors in amdgpu_atomfirmware.c

Fix the following errors reported by checkpatch:

ERROR: spaces required around that '>=' (ctx:WxV)
ERROR: spaces required around that '!=' (ctx:WxV)
ERROR: code indent should use tabs where possible

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amdgpu: Clean up errors in mmhub_v9_4.c
Ran Sun [Wed, 2 Aug 2023 06:48:22 +0000 (06:48 +0000)]
drm/amdgpu: Clean up errors in mmhub_v9_4.c

Fix the following errors reported by checkpatch:

ERROR: code indent should use tabs where possible
ERROR: space required before the open parenthesis '('

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amdgpu: Clean up errors in vega20_ih.c
Ran Sun [Wed, 2 Aug 2023 06:46:06 +0000 (06:46 +0000)]
drm/amdgpu: Clean up errors in vega20_ih.c

Fix the following errors reported by checkpatch:

ERROR: trailing statements should be on next line
ERROR: that open brace { should be on the previous line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amdgpu: Clean up errors in ih_v6_0.c
Ran Sun [Wed, 2 Aug 2023 06:43:33 +0000 (06:43 +0000)]
drm/amdgpu: Clean up errors in ih_v6_0.c

Fix the following errors reported by checkpatch:

ERROR: trailing statements should be on next line
ERROR: that open brace { should be on the previous line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amdgpu: Clean up errors in amdgpu_psp.h
Ran Sun [Wed, 2 Aug 2023 06:40:24 +0000 (06:40 +0000)]
drm/amdgpu: Clean up errors in amdgpu_psp.h

Fix the following errors reported by checkpatch:

ERROR: open brace '{' following struct go on the same line
ERROR: open brace '{' following enum go on the same line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amdgpu: Clean up errors in vce_v3_0.c
Ran Sun [Wed, 2 Aug 2023 06:37:42 +0000 (06:37 +0000)]
drm/amdgpu: Clean up errors in vce_v3_0.c

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amdgpu: Clean up errors in cik_ih.c
Ran Sun [Wed, 2 Aug 2023 06:35:29 +0000 (06:35 +0000)]
drm/amdgpu: Clean up errors in cik_ih.c

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/display: Clean up errors in dce_clk_mgr.c
Ran Sun [Wed, 2 Aug 2023 06:25:59 +0000 (06:25 +0000)]
drm/amd/display: Clean up errors in dce_clk_mgr.c

Fix the following errors reported by checkpatch:

ERROR: spaces required around that '?' (ctx:VxE)

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/display: Clean up errors in display_mode_vba_30.c
Ran Sun [Wed, 2 Aug 2023 06:20:25 +0000 (06:20 +0000)]
drm/amd/display: Clean up errors in display_mode_vba_30.c

Fix the following errors reported by checkpatch:

ERROR: else should follow close brace '}'

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/display: Clean up errors in dcn10_dpp_dscl.c
Ran Sun [Wed, 2 Aug 2023 06:16:35 +0000 (06:16 +0000)]
drm/amd/display: Clean up errors in dcn10_dpp_dscl.c

Fix the following errors reported by checkpatch:

ERROR: else should follow close brace '}'

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/display: Clean up errors in dc_stream.c
Ran Sun [Wed, 2 Aug 2023 06:14:23 +0000 (06:14 +0000)]
drm/amd/display: Clean up errors in dc_stream.c

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/display: Clean up errors in bios_parser2.c
Ran Sun [Wed, 2 Aug 2023 03:22:56 +0000 (03:22 +0000)]
drm/amd/display: Clean up errors in bios_parser2.c

Fix the following errors reported by checkpatch:

ERROR: switch and case should be at the same indent
ERROR: code indent should use tabs where possible

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/display: Clean up errors in dcn316_smu.c
Ran Sun [Wed, 2 Aug 2023 03:03:11 +0000 (03:03 +0000)]
drm/amd/display: Clean up errors in dcn316_smu.c

Fix the following errors reported by checkpatch:

ERROR: open brace '{' following struct go on the same line
ERROR: code indent should use tabs where possible

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/display: Clean up errors in dcn316_clk_mgr.c
Ran Sun [Wed, 2 Aug 2023 03:01:11 +0000 (03:01 +0000)]
drm/amd/display: Clean up errors in dcn316_clk_mgr.c

Fix the following errors reported by checkpatch:

ERROR: open brace '{' following struct go on the same line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/display: Clean up errors in dcn315_smu.c
Ran Sun [Wed, 2 Aug 2023 02:58:14 +0000 (02:58 +0000)]
drm/amd/display: Clean up errors in dcn315_smu.c

Fix the following errors reported by checkpatch:

ERROR: open brace '{' following struct go on the same line
ERROR: code indent should use tabs where possible

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/display: Clean up errors in dce112_hw_sequencer.c
Ran Sun [Wed, 2 Aug 2023 02:54:43 +0000 (02:54 +0000)]
drm/amd/display: Clean up errors in dce112_hw_sequencer.c

Fix the following errors reported by checkpatch:

ERROR: space required before the open brace '{'

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/display: Clean up errors in dce110_hw_sequencer.c
Ran Sun [Wed, 2 Aug 2023 02:53:27 +0000 (02:53 +0000)]
drm/amd/display: Clean up errors in dce110_hw_sequencer.c

Fix the following errors reported by checkpatch:

ERROR: space required before the open brace '{'

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/display: Clean up errors in dce110_timing_generator.c
Ran Sun [Wed, 2 Aug 2023 02:52:02 +0000 (02:52 +0000)]
drm/amd/display: Clean up errors in dce110_timing_generator.c

Fix the following errors reported by checkpatch:

ERROR: spaces required around that '=' (ctx:WxV)

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/dc: Clean up errors in hpd_regs.h
Ran Sun [Wed, 2 Aug 2023 02:47:25 +0000 (02:47 +0000)]
drm/amd/dc: Clean up errors in hpd_regs.h

Fix the following errors reported by checkpatch:

ERROR: space required after that ',' (ctx:VxV)

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/display: Clean up errors in ddc_regs.h
Ran Sun [Wed, 2 Aug 2023 02:43:46 +0000 (02:43 +0000)]
drm/amd/display: Clean up errors in ddc_regs.h

Fix the following errors reported by checkpatch:

ERROR: space required after that ',' (ctx:VxV)

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/display: Clean up errors in color_gamma.c
Ran Sun [Wed, 2 Aug 2023 02:39:55 +0000 (02:39 +0000)]
drm/amd/display: Clean up errors in color_gamma.c

Fix the following errors reported by checkpatch:

ERROR: trailing whitespace
ERROR: else should follow close brace '}'

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in amdgpu_pm.c
Ran Sun [Wed, 2 Aug 2023 02:31:09 +0000 (02:31 +0000)]
drm/amd/pm: Clean up errors in amdgpu_pm.c

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line
ERROR: space required before the open parenthesis '('

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in sislands_smc.h
Ran Sun [Wed, 2 Aug 2023 02:25:25 +0000 (02:25 +0000)]
drm/amd/pm: Clean up errors in sislands_smc.h

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in r600_dpm.h
Ran Sun [Wed, 2 Aug 2023 02:15:04 +0000 (02:15 +0000)]
drm/amd/pm: Clean up errors in r600_dpm.h

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrivers/amd/pm: Clean up errors in smu8_smumgr.h
Ran Sun [Wed, 2 Aug 2023 02:09:43 +0000 (02:09 +0000)]
drivers/amd/pm: Clean up errors in smu8_smumgr.h

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line
ERROR: space prohibited before that ',' (ctx:WxW)

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in smu75.h
Ran Sun [Wed, 2 Aug 2023 01:59:41 +0000 (01:59 +0000)]
drm/amd/pm: Clean up errors in smu75.h

Fix the following errors reported by checkpatch:

ERROR: space prohibited before open square bracket '['
ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in smu73.h
Ran Sun [Wed, 2 Aug 2023 01:55:57 +0000 (01:55 +0000)]
drm/amd/pm: Clean up errors in smu73.h

Fix the following errors reported by checkpatch:

ERROR: open brace '{' following struct go on the same line
ERROR: space prohibited before open square bracket '['
ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in hwmgr.h
Ran Sun [Wed, 2 Aug 2023 01:48:00 +0000 (01:48 +0000)]
drm/amd/pm: Clean up errors in hwmgr.h

Fix the following errors reported by checkpatch:

ERROR: open brace '{' following struct go on the same line
ERROR: Use C99 flexible arrays

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in hardwaremanager.h
Ran Sun [Wed, 2 Aug 2023 01:39:39 +0000 (01:39 +0000)]
drm/amd/pm: Clean up errors in hardwaremanager.h

Fix the following errors reported by checkpatch:

ERROR: open brace '{' following struct go on the same line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in pp_thermal.h
Ran Sun [Wed, 2 Aug 2023 01:38:18 +0000 (01:38 +0000)]
drm/amd/pm: Clean up errors in pp_thermal.h

Fix the following errors reported by checkpatch:

ERROR: open brace '{' following struct go on the same line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in smu7.h
Ran Sun [Wed, 2 Aug 2023 01:31:18 +0000 (01:31 +0000)]
drm/amd/pm: Clean up errors in smu7.h

Fix the following errors reported by checkpatch:

ERROR: open brace '{' following struct go on the same line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in smu7_fusion.h
Ran Sun [Wed, 2 Aug 2023 01:29:03 +0000 (01:29 +0000)]
drm/amd/pm: Clean up errors in smu7_fusion.h

Fix the following errors reported by checkpatch:

ERROR: open brace '{' following struct go on the same line
ERROR: space prohibited before open square bracket '['

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in smu71.h
Ran Sun [Wed, 2 Aug 2023 01:23:02 +0000 (01:23 +0000)]
drm/amd/pm: Clean up errors in smu71.h

Fix the following errors reported by checkpatch:

ERROR: open brace '{' following struct go on the same line
ERROR: space prohibited before open square bracket '['

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Remove many unnecessary NULL values
Ruan Jinjie [Tue, 1 Aug 2023 12:55:14 +0000 (20:55 +0800)]
drm/amd/pm: Remove many unnecessary NULL values

Ther are many pointers assigned first, which need not to be initialized, so
remove the NULL assignment.

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/display: Fix a regression on Polaris cards
Mario Limonciello [Fri, 28 Jul 2023 22:04:01 +0000 (17:04 -0500)]
drm/amd/display: Fix a regression on Polaris cards

DCE products don't define a `remove_stream_from_ctx` like DCN ones
do. This means that when compute_mst_dsc_configs_for_state() is called
it always returns -EINVAL which causes MST to fail to setup.

Cc: stable@vger.kernel.org # 6.4.y
Cc: Harry Wentland <Harry.Wentland@amd.com>
Reported-by: Klaus.Kusche@computerix.info
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2671
Fixes: efa4c4df864e ("drm/amd/display: call remove_stream_from_ctx from res_pool funcs")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in smu9_driver_if.h
Ran Sun [Tue, 1 Aug 2023 09:50:56 +0000 (09:50 +0000)]
drm/amd/pm: Clean up errors in smu9_driver_if.h

Fix the following errors reported by checkpatch:

ERROR: space prohibited before open square bracket '['

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in polaris_baco.c
Ran Sun [Tue, 1 Aug 2023 09:47:42 +0000 (09:47 +0000)]
drm/amd/pm: Clean up errors in polaris_baco.c

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in vega20_pptable.h
Ran Sun [Tue, 1 Aug 2023 09:44:43 +0000 (09:44 +0000)]
drm/amd/pm: Clean up errors in vega20_pptable.h

Fix the following errors reported by checkpatch:

ERROR: open brace '{' following struct go on the same line
ERROR: space prohibited before open square bracket '['

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in vega12_hwmgr.h
Ran Sun [Tue, 1 Aug 2023 09:38:32 +0000 (09:38 +0000)]
drm/amd/pm: Clean up errors in vega12_hwmgr.h

Fix the following errors reported by checkpatch:

ERROR: open brace '{' following enum go on the same line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm/powerplay/hwmgr/hwmgr: Clean up errors in hwmgr.c
Ran Sun [Tue, 1 Aug 2023 09:36:56 +0000 (09:36 +0000)]
drm/amd/pm/powerplay/hwmgr/hwmgr: Clean up errors in hwmgr.c

Fix the following errors reported by checkpatch:

ERROR: space prohibited after that '~' (ctx:WxW)
ERROR: spaces required around that '||' (ctx:VxW)

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in tonga_baco.c
Ran Sun [Tue, 1 Aug 2023 09:34:14 +0000 (09:34 +0000)]
drm/amd/pm: Clean up errors in tonga_baco.c

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agogpu: amd: Clean up errors in ppatomfwctrl.h
Ran Sun [Tue, 1 Aug 2023 09:30:23 +0000 (09:30 +0000)]
gpu: amd: Clean up errors in ppatomfwctrl.h

Fix the following errors reported by checkpatch:

ERROR: open brace '{' following struct go on the same line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amdgpu/powerplay: Clean up errors in vega20_hwmgr.c
Ran Sun [Tue, 1 Aug 2023 09:28:21 +0000 (09:28 +0000)]
drm/amdgpu/powerplay: Clean up errors in vega20_hwmgr.c

Fix the following errors reported by checkpatch:

ERROR: code indent should use tabs where possible
ERROR: space required before the open parenthesis '('
ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amdgpu: Clean up errors in vega20_baco.c
Ran Sun [Tue, 1 Aug 2023 08:02:46 +0000 (08:02 +0000)]
drm/amdgpu: Clean up errors in vega20_baco.c

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line
ERROR: space required before the open parenthesis '('

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in vega20_hwmgr.h
Ran Sun [Tue, 1 Aug 2023 02:39:15 +0000 (02:39 +0000)]
drm/amd/pm: Clean up errors in vega20_hwmgr.h

Fix the following errors reported by checkpatch:

ERROR: open brace '{' following enum go on the same line

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amdgpu/powerplay: Clean up errors in smu_helper.h
Ran Sun [Tue, 1 Aug 2023 09:22:13 +0000 (09:22 +0000)]
drm/amdgpu/powerplay: Clean up errors in smu_helper.h

Fix the following errors reported by checkpatch:

ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd: Clean up errors in vega10_processpptables.c
Ran Sun [Tue, 1 Aug 2023 09:19:06 +0000 (09:19 +0000)]
drm/amd: Clean up errors in vega10_processpptables.c

Fix the following errors reported by checkpatch:

ERROR: "foo* bar" should be "foo *bar"
ERROR: space required before the open brace '{'
ERROR: space required before the open parenthesis '('

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd: Clean up errors in pptable_v1_0.h
Ran Sun [Tue, 1 Aug 2023 09:02:37 +0000 (09:02 +0000)]
drm/amd: Clean up errors in pptable_v1_0.h

Fix the following errors reported by checkpatch:

ERROR: open brace '{' following struct go on the same line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd: Clean up errors in smu7_hwmgr.c
Ran Sun [Tue, 1 Aug 2023 09:00:22 +0000 (09:00 +0000)]
drm/amd: Clean up errors in smu7_hwmgr.c

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: spaces required around that '<' (ctx:VxV)

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in vega10_pptable.h
Ran Sun [Tue, 1 Aug 2023 08:40:24 +0000 (08:40 +0000)]
drm/amd/pm: Clean up errors in vega10_pptable.h

Fix the following errors reported by checkpatch:

ERROR: open brace '{' following struct go on the same line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amdgpu: Clean up errors in ppatomctrl.h
Ran Sun [Tue, 1 Aug 2023 08:37:10 +0000 (08:37 +0000)]
drm/amdgpu: Clean up errors in ppatomctrl.h

Fix the following errors reported by checkpatch:

ERROR: open brace '{' following struct go on the same line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amdgpu: Clean up errors in ci_baco.c
Ran Sun [Tue, 1 Aug 2023 08:05:50 +0000 (08:05 +0000)]
drm/amdgpu: Clean up errors in ci_baco.c

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amdgpu: Clean up errors in smu_helper.c
Ran Sun [Tue, 1 Aug 2023 07:59:51 +0000 (07:59 +0000)]
drm/amdgpu: Clean up errors in smu_helper.c

Fix the following errors reported by checkpatch:

ERROR: spaces required around that '=' (ctx:VxV)
ERROR: spaces required around that '<' (ctx:VxV)

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amdgpu: Clean up errors in common_baco.c
Ran Sun [Tue, 1 Aug 2023 07:55:07 +0000 (07:55 +0000)]
drm/amdgpu: Clean up errors in common_baco.c

Fix the following errors reported by checkpatch:

ERROR: code indent should use tabs where possible

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amdgpu: Clean up errors in smu7_powertune.c
Ran Sun [Tue, 1 Aug 2023 06:15:29 +0000 (06:15 +0000)]
drm/amdgpu: Clean up errors in smu7_powertune.c

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line
ERROR: space required after that ',' (ctx:VxV)

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in vega12_baco.c
Ran Sun [Tue, 1 Aug 2023 06:09:37 +0000 (06:09 +0000)]
drm/amd/pm: Clean up errors in vega12_baco.c

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in vega12_pptable.h
Ran Sun [Tue, 1 Aug 2023 06:04:43 +0000 (06:04 +0000)]
drm/amd/pm: Clean up errors in vega12_pptable.h

Fix the following errors reported by checkpatch:

ERROR: open brace '{' following struct go on the same line
ERROR: space prohibited before open square bracket '['

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in vega10_powertune.c
Ran Sun [Tue, 1 Aug 2023 03:37:41 +0000 (03:37 +0000)]
drm/amd/pm: Clean up errors in vega10_powertune.c

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line
ERROR: space prohibited after that open parenthesis '('

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in fiji_baco.c
Ran Sun [Tue, 1 Aug 2023 03:16:03 +0000 (03:16 +0000)]
drm/amd/pm: Clean up errors in fiji_baco.c

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in smu10_hwmgr.c
Ran Sun [Tue, 1 Aug 2023 03:08:51 +0000 (03:08 +0000)]
drm/amd/pm: Clean up errors in smu10_hwmgr.c

Fix the following errors reported by checkpatch:

ERROR: spaces required around that '=' (ctx:VxW)
ERROR: space required after that ',' (ctx:VxV)

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm/powerplay/hwmgr/ppevvmath: Clean up errors in ppevvmath.h
Ran Sun [Tue, 1 Aug 2023 03:03:34 +0000 (03:03 +0000)]
drm/amd/pm/powerplay/hwmgr/ppevvmath: Clean up errors in ppevvmath.h

Fix the following errors reported by checkpatch:

ERROR: return is not a function, parentheses are not required
ERROR: space required after that ',' (ctx:VxV)
ERROR: space required before the open parenthesis '('
ERROR: need consistent spacing around '-' (ctx:WxV)

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in vega12_hwmgr.c
Ran Sun [Tue, 1 Aug 2023 02:57:03 +0000 (02:57 +0000)]
drm/amd/pm: Clean up errors in vega12_hwmgr.c

Fix the following errors reported by checkpatch:

ERROR: need consistent spacing around '/' (ctx:WxV)
ERROR: code indent should use tabs where possible

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in vega10_baco.c
Ran Sun [Tue, 1 Aug 2023 02:44:48 +0000 (02:44 +0000)]
drm/amd/pm: Clean up errors in vega10_baco.c

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line
ERROR: space required after that ',' (ctx:VxV)
ERROR: space prohibited before that ',' (ctx:WxV)

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in amd_powerplay.c
Ran Sun [Tue, 1 Aug 2023 02:36:58 +0000 (02:36 +0000)]
drm/amd/pm: Clean up errors in amd_powerplay.c

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line
ERROR: spaces required around that '||' (ctx:WxO)

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in amdgpu_smu.c
Ran Sun [Tue, 1 Aug 2023 02:28:14 +0000 (02:28 +0000)]
drm/amd/pm: Clean up errors in amdgpu_smu.c

Fix the following errors reported by checkpatch:

ERROR: spaces required around that '=' (ctx:WxV)
ERROR: spaces required around that '&&' (ctx:VxW)
ERROR: that open brace { should be on the previous line
ERROR: space required before the open parenthesis '('
ERROR: space required before the open brace '{'
ERROR: spaces required around that ':' (ctx:VxW)

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd: Clean up errors in smu_v13_0_5_ppt.c
Ran Sun [Tue, 1 Aug 2023 02:11:29 +0000 (02:11 +0000)]
drm/amd: Clean up errors in smu_v13_0_5_ppt.c

Fix the following errors reported by checkpatch:

ERROR: space prohibited before that ',' (ctx:WxW)

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in smu_v13_0_5_ppt.c
Ran Sun [Tue, 1 Aug 2023 02:08:39 +0000 (02:08 +0000)]
drm/amd/pm: Clean up errors in smu_v13_0_5_ppt.c

Fix the following errors reported by checkpatch:

ERROR: space prohibited before that ',' (ctx:WxW)

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in smu_v13_0_6_ppt.c
Ran Sun [Tue, 1 Aug 2023 02:06:25 +0000 (02:06 +0000)]
drm/amd/pm: Clean up errors in smu_v13_0_6_ppt.c

Fix the following errors reported by checkpatch:

ERROR: code indent should use tabs where possible
ERROR: that open brace { should be on the previous line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in aldebaran_ppt.c
Ran Sun [Tue, 1 Aug 2023 02:00:52 +0000 (02:00 +0000)]
drm/amd/pm: Clean up errors in aldebaran_ppt.c

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line
ERROR: space required after that ',' (ctx:VxV)
ERROR: spaces required around that '=' (ctx:VxW)
ERROR: else should follow close brace '}'

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in smu_v13_0.c
Ran Sun [Tue, 1 Aug 2023 01:43:18 +0000 (01:43 +0000)]
drm/amd/pm: Clean up errors in smu_v13_0.c

Fix the following errors reported by checkpatch:

ERROR: space required before the open parenthesis '('
ERROR: that open brace { should be on the previous line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in smu_v13_0_7_ppt.c
Ran Sun [Tue, 1 Aug 2023 01:26:08 +0000 (01:26 +0000)]
drm/amd/pm: Clean up errors in smu_v13_0_7_ppt.c

Fix the following errors reported by checkpatch:

ERROR: open brace '{' following struct go on the same line
ERROR: spaces required around that '=' (ctx:VxW)
ERROR: that open brace { should be on the previous line

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/pm: Clean up errors in smu_v11_0.h
Ran Sun [Tue, 1 Aug 2023 01:12:37 +0000 (01:12 +0000)]
drm/amd/pm: Clean up errors in smu_v11_0.h

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line
ERROR: code indent should use tabs where possible

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amdgpu: Remove a lot of unnecessary ternary operators
Ruan Jinjie [Fri, 4 Aug 2023 02:46:48 +0000 (10:46 +0800)]
drm/amdgpu: Remove a lot of unnecessary ternary operators

There are many ternary operators, the true or false judgement
of which is unnecessary in C language semantics.

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amd/display: Return value of function
Denis Arefev [Thu, 3 Aug 2023 14:11:16 +0000 (17:11 +0300)]
drm/amd/display: Return value of function

Added return value check hpd_enable

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Denis Arefev <arefev@swemel.ru>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agodrm/amdgpu: fix possible UAF in amdgpu_cs_pass1()
Alex Deucher [Fri, 28 Jul 2023 15:14:05 +0000 (11:14 -0400)]
drm/amdgpu: fix possible UAF in amdgpu_cs_pass1()

Since the gang_size check is outside of chunk parsing
loop, we need to reset i before we free the chunk data.

Suggested by Ye Zhang (@VAR10CK) of Baidu Security.

Reviewed-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
18 months agoaccel/ivpu: Add initial support for VPU 4
Stanislaw Gruszka [Mon, 31 Jul 2023 16:12:58 +0000 (18:12 +0200)]
accel/ivpu: Add initial support for VPU 4

Add support VPU 4 - new generation of VPU IP with various
hardware design improvements. From driver point of view, it differs
in register set, initialization process and MMU memory ranges.

Co-developed-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>
Signed-off-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>
Co-developed-by: Krystian Pradzynski <krystian.pradzynski@linux.intel.com>
Signed-off-by: Krystian Pradzynski <krystian.pradzynski@linux.intel.com>
Co-developed-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731161258.2987564-7-stanislaw.gruszka@linux.intel.com
18 months agoaccel/ivpu: Refactor memory ranges logic
Karol Wachowski [Mon, 31 Jul 2023 16:12:57 +0000 (18:12 +0200)]
accel/ivpu: Refactor memory ranges logic

Add new dma range and change naming convention for virtual address
memory ranges managed by KMD.

New available ranges are named as follows:
 * global range - global context accessible by FW
 * aliased range - user context accessible by FW
 * dma range - user context accessible by DMA
 * shave range - user context accessible by shaves
 * global shave range - global context accessible by shave nn

Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731161258.2987564-6-stanislaw.gruszka@linux.intel.com
18 months agoaccel/ivpu: Extend get_param ioctl to identify capabilities
Stanislaw Gruszka [Mon, 31 Jul 2023 16:12:56 +0000 (18:12 +0200)]
accel/ivpu: Extend get_param ioctl to identify capabilities

Add DRM_IVPU_PARAM_CAPABILITIES parameters to get_param ioctl to query
driver capabilities. For now use it for identify metric streamer and
new dma memory range features. Currently upstream version of intel_vpu
does not have those, they will be added it the future.

Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731161258.2987564-5-stanislaw.gruszka@linux.intel.com
18 months agoaccel/ivpu: Switch to generation based FW names
Jacek Lawrynowicz [Mon, 31 Jul 2023 16:12:55 +0000 (18:12 +0200)]
accel/ivpu: Switch to generation based FW names

Use VPU IP generation for naming FW instead of the platform name.

Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731161258.2987564-4-stanislaw.gruszka@linux.intel.com
18 months agoaccel/ivpu: Use generation based function and registers names
Jacek Lawrynowicz [Mon, 31 Jul 2023 16:12:54 +0000 (18:12 +0200)]
accel/ivpu: Use generation based function and registers names

Given that VPU generation can be used by multiple platforms, driver should
use VPU IP generation names instead of a platform.

Change naming for functions and registries.

Use 37XX format, where:
  3 - major VPU IP generation version
  7 - minor VPU IP generation version
  XX - postfix indicating this is an architecture and not marketing name

Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731161258.2987564-3-stanislaw.gruszka@linux.intel.com
18 months agoaccel/ivpu: Rename sources to use generation based names
Jacek Lawrynowicz [Mon, 31 Jul 2023 16:12:53 +0000 (18:12 +0200)]
accel/ivpu: Rename sources to use generation based names

Given that VPU generation can be used by multiple platforms, driver should
use VPU IP generation in names instead of a platform.

Change naming for sources files.

Use 37XX format, where:
  3 - major VPU IP generation version
  7 - minor VPU IP generation version
  XX - postfix indicating this is an architecture and not marketing name

Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731161258.2987564-2-stanislaw.gruszka@linux.intel.com
18 months agodrm/i915/display: pre-initialize some values in probe_gmdid_display()
Luca Coelho [Thu, 1 Jun 2023 09:03:38 +0000 (12:03 +0300)]
drm/i915/display: pre-initialize some values in probe_gmdid_display()

When intel_display_device_probe() (and, subsequently,
probe_gmdid_display()) returns, the caller expects ver, rel and step
to be initialized.  Since there's no way to check that there was a
failure and no_display was returned without some further refactoring,
pre-initiliaze all these values to zero to keep it simple and safe.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230601090338.80284-1-luciano.coelho@intel.com
18 months agodrm/nouveau/sched: Don't pass user flags to drm_syncobj_find_fence()
Faith Ekstrand [Mon, 7 Aug 2023 23:41:44 +0000 (18:41 -0500)]
drm/nouveau/sched: Don't pass user flags to drm_syncobj_find_fence()

The flags field in drm_syncobj_find_fence() takes SYNCOBJ_WAIT flags
from the syncobj UAPI whereas sync->flags is from the nouveau UAPI. What
we actually want is 0 flags which tells it to just try to find the
fence and then return without waiting.

Fixes: b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI")
Cc: Danilo Krummrich <dakr@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Reviewed-by: Danilo Krummrich <dakr@redhat.com>
Signed-off-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230807234210.175968-1-faith.ekstrand@collabora.com
18 months agodrm/nouveau: uvmm: remove dedicated VM pointer from VMAs
Danilo Krummrich [Mon, 7 Aug 2023 16:32:26 +0000 (18:32 +0200)]
drm/nouveau: uvmm: remove dedicated VM pointer from VMAs

VMAs can find their corresponding VM through their embedded struct
drm_gpuva which already carries a pointer to a struct drm_gpuva_manager
which the VM is based on. Hence, remove the struct nouveau_uvmm pointer
from struct nouveau_uvma to save a couple of bytes per mapping.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230807163238.2091-6-dakr@redhat.com
18 months agodrm/nouveau: uvmm: remove incorrect calls to mas_unlock()
Danilo Krummrich [Mon, 7 Aug 2023 16:32:25 +0000 (18:32 +0200)]
drm/nouveau: uvmm: remove incorrect calls to mas_unlock()

Remove incorrect calls to mas_unlock() in the unwind path of
__nouveau_uvma_region_insert(). The region maple tree uses an external
lock instead, namely the global uvmm lock.

Fixes: b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230807163238.2091-5-dakr@redhat.com
18 months agodrm/nouveau: remove incorrect __user annotations
Danilo Krummrich [Mon, 7 Aug 2023 16:32:24 +0000 (18:32 +0200)]
drm/nouveau: remove incorrect __user annotations

Fix copy-paste error causing EXEC and VM_BIND syscalls data pointers
to carry incorrect __user annotations.

Fixes: b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230807163238.2091-4-dakr@redhat.com
18 months agodrm/nouveau: nvkm: vmm: silence warning from cast
Danilo Krummrich [Mon, 7 Aug 2023 16:32:23 +0000 (18:32 +0200)]
drm/nouveau: nvkm: vmm: silence warning from cast

Cast the integer to a pointer-sized type first to keep the compiler
happy.

Fixes: 6b252cf42281 ("drm/nouveau: nvkm/vmm: implement raw ops to manage uvmm")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230807163238.2091-3-dakr@redhat.com
18 months agonouveau/dmem: fix copy-paste error in nouveau_dmem_migrate_chunk()
Danilo Krummrich [Mon, 7 Aug 2023 16:32:22 +0000 (18:32 +0200)]
nouveau/dmem: fix copy-paste error in nouveau_dmem_migrate_chunk()

Fix call to nouveau_fence_emit() with wrong channel parameter.

Fixes: 7f2a0b50b2b2 ("drm/nouveau: fence: separate fence alloc and emit")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230807163238.2091-2-dakr@redhat.com
18 months agodrm/exynos: remove redundant of_match_ptr
Zhu Wang [Mon, 31 Jul 2023 12:33:36 +0000 (20:33 +0800)]
drm/exynos: remove redundant of_match_ptr

The driver depends on CONFIG_OF, so it is not necessary to use
of_match_ptr here.

Even for drivers that do not depend on CONFIG_OF, it's almost always
better to leave out the of_match_ptr(), since the only thing it can
possibly do is to save a few bytes of .text if a driver can be used both
with and without it. Hence we remove of_match_ptr.

Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
18 months agodrm/exynos: fix a possible null-pointer dereference due to data race in exynos_drm_cr...
Tuo Li [Fri, 30 Jun 2023 02:19:06 +0000 (10:19 +0800)]
drm/exynos: fix a possible null-pointer dereference due to data race in exynos_drm_crtc_atomic_disable()

The variable crtc->state->event is often protected by the lock
crtc->dev->event_lock when is accessed. However, it is accessed as a
condition of an if statement in exynos_drm_crtc_atomic_disable() without
holding the lock:

  if (crtc->state->event && !crtc->state->active)

However, if crtc->state->event is changed to NULL by another thread right
after the conditions of the if statement is checked to be true, a
null-pointer dereference can occur in drm_crtc_send_vblank_event():

  e->pipe = pipe;

To fix this possible null-pointer dereference caused by data race, the
spin lock coverage is extended to protect the if statement as well as the
function call to drm_crtc_send_vblank_event().

Reported-by: BassCheck <bass@buaa.edu.cn>
Link: https://sites.google.com/view/basscheck/home
Signed-off-by: Tuo Li <islituo@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Added relevant link.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
18 months agodrm/mediatek: Fix uninitialized symbol
Nancy.Lin [Thu, 3 Aug 2023 09:48:43 +0000 (17:48 +0800)]
drm/mediatek: Fix uninitialized symbol

Fix Smatch static checker warning
  -Fix uninitialized symbol comp_pdev in mtk_ddp_comp_init.

Fixes: 0d9eee9118b7 ("drm/mediatek: Add drm ovl_adaptor sub driver for MT8195")
Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20230803094843.4439-1-nancy.lin@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
18 months agodrm/i915/adls: s/ADLS_RPLS/RAPTORLAKE_S in platform and subplatform defines
Dnyaneshwar Bhadane [Tue, 1 Aug 2023 13:53:44 +0000 (19:23 +0530)]
drm/i915/adls: s/ADLS_RPLS/RAPTORLAKE_S in platform and subplatform defines

Driver refers to the platform Alderlake S as ADLS_RPLS in places
and RAPTORLAKE_S in some.

v2:
- Unrolled wrapper IS_ADLS_GRAPHICS_STEP

v3:
- Replace IS_RAPTORLAKE_S instead of IS_ADLS_RPLS. (Tvrtko/Lucas).
- Remove unused macro IS_ADLS_GRAPHICS/DISPLAY_STEP
- Change the subject

Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230801135344.3797924-15-dnyaneshwar.bhadane@intel.com
18 months agodrm/i915/adln: s/ADLP/ALDERLAKE_P in ADLN defines
Anusha Srivatsa [Tue, 1 Aug 2023 13:53:43 +0000 (19:23 +0530)]
drm/i915/adln: s/ADLP/ALDERLAKE_P in ADLN defines

Follow consistent naming convention. Replace ADLP with
ALDERLAKE_P

Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230801135344.3797924-14-dnyaneshwar.bhadane@intel.com
18 months agodrm/i915/rplu: s/ADLP_RPLU/RAPTORLAKE_U in RPLU defines
Dnyaneshwar Bhadane [Tue, 1 Aug 2023 13:53:42 +0000 (19:23 +0530)]
drm/i915/rplu: s/ADLP_RPLU/RAPTORLAKE_U in RPLU defines

Follow consistent naming convention. Replace ADLP with
ALDERLAKE_P

v2:
- Replace IS_ADLP_RPLU with IS_RAPTORLAKE_U (Tvrtko/Lucas)
- Change the subject

Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230801135344.3797924-13-dnyaneshwar.bhadane@intel.com
18 months agodrm/i915/rplp: s/ADLP_RPLP/RAPTORLAKE_P for RPLP defines
Dnyaneshwar Bhadane [Tue, 1 Aug 2023 13:53:41 +0000 (19:23 +0530)]
drm/i915/rplp: s/ADLP_RPLP/RAPTORLAKE_P for RPLP defines

Follow consistent naming convention. Replace ADLP with
ALDERLAKE_P.

v2:
- Replace IS_ADLP_RPLP with IS_RAPTORLAKE_P. (Tvrtko/Lucas)
- Change the subject

Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230801135344.3797924-12-dnyaneshwar.bhadane@intel.com
18 months agodrm/i915/adlp: s/ADLP/ALDERLAKE_P for display and graphics step
Dnyaneshwar Bhadane [Tue, 1 Aug 2023 13:53:40 +0000 (19:23 +0530)]
drm/i915/adlp: s/ADLP/ALDERLAKE_P for display and graphics step

Driver refers to the platform Alderlake P as ADLP in places
and ALDERLAKE_P in some. Making the consistent change
to avoid confusion of the right naming convention for
the platform.

v2:
- Unrolled wrapper IS_ADLP_GRAPHICS_STEP and Replace
- Added IS_ALDERLAKE_P() && IS_GRAPHICS_STEP() (Jani/Tvrtko).

v3:
- Removed unused macros of display steps.

Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230801135344.3797924-11-dnyaneshwar.bhadane@intel.com
18 months agodrm/i915/tgl: s/TGL/TIGERLAKE for platform/subplatform defines
Dnyaneshwar Bhadane [Tue, 1 Aug 2023 13:53:39 +0000 (19:23 +0530)]
drm/i915/tgl: s/TGL/TIGERLAKE for platform/subplatform defines

Follow consistent naming convention. Replace TGL with
TIGERLAKE.Replace IS_TGL_DISPLAY_STEP with
IS_TIGERLAKE() && IS_DISPLAY_STEP().

v2:
- s/TGL/tgl in the subject prefix(Anusha)

v3:
- Unrolled wrapper IS_TGL_DISPLAY_STEP and Replace
- Replace IS_PLATFORM && DISPLAY_STEP (Jani/Tvrtko).

v4:
- Removed unused macros

Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230801135344.3797924-10-dnyaneshwar.bhadane@intel.com
18 months agodrm/i915/jsl: s/JSL/JASPERLAKE for platform/subplatform defines
Dnyaneshwar Bhadane [Tue, 1 Aug 2023 13:53:38 +0000 (19:23 +0530)]
drm/i915/jsl: s/JSL/JASPERLAKE for platform/subplatform defines

Follow consistent naming convention. Replace JSL with
JASPERLAKE. Unroll IS_JSL_EHL() define  with IS_JASPERLAKE() ||
IS_ELKHARTLAKE() condition. Change in the display step define for
Jasperlake.

v2:
- Change subject prefix skl instead of SKL(Anusha)

v3:
- Remove the use of define IS_JSL_EHL.
- Replace with IS_JASPERLAKE() || IS_ELKHARTLAKE()
- Unrolled wrapper IS_JSL_ELK_DISPLAY_STEP (Jani/Tvrtko)

v4:
- Removed unused macro

v5:
- Resolved valid checkpatch warning(Jani)

Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230801135344.3797924-9-dnyaneshwar.bhadane@intel.com