<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/gpu/drm/amd/display/dc/link, branch linux-6.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-05-30T07:48:54Z</updated>
<entry>
<title>drm/amd/display: Allocate zero bw after bw alloc enable</title>
<updated>2024-05-30T07:48:54Z</updated>
<author>
<name>Meenakshikumar Somasundaram</name>
</author>
<published>2024-04-10T14:46:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d3f4d42eb8b47d4d09ea7f0e4b782cc40f41c4b1'/>
<id>urn:sha1:d3f4d42eb8b47d4d09ea7f0e4b782cc40f41c4b1</id>
<content type='text'>
[ Upstream commit 46fe9cb1a9e62f4e6229f48ae303ef8e6c1fdc64 ]

[Why]
During DP tunnel creation, CM preallocates BW and reduces
estimated BW of other DPIA. CM release preallocation only
when allocation is complete. Display mode validation logic
validates timings based on bw available per host router.
In multi display setup, this causes bw allocation failure
when allocation greater than estimated bw.

[How]
Do zero alloc to make the CM to release preallocation and
update estimated BW correctly for all DPIAs per host router.

Reviewed-by: PeiChen Huang &lt;peichen.huang@amd.com&gt;
Acked-by: Aurabindo Pillai &lt;aurabindo.pillai@amd.com&gt;
Signed-off-by: Meenakshikumar Somasundaram &lt;meenakshikumar.somasundaram@amd.com&gt;
Tested-by: Daniel Wheeler &lt;daniel.wheeler@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/amd/display: Amend coasting vtotal for replay low hz</title>
<updated>2024-04-03T13:32:27Z</updated>
<author>
<name>ChunTao Tso</name>
</author>
<published>2024-02-20T09:08:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=42c4d4dd6e75ff587351a4dd21e1e0f9f57b557d'/>
<id>urn:sha1:42c4d4dd6e75ff587351a4dd21e1e0f9f57b557d</id>
<content type='text'>
[ Upstream commit 8e054b0f1e71531762b8ded7f66c1b4af734671b ]

[WHY]
The original coasting vtotal is 2 bytes, and it need to
be amended to 4 bytes because low hz case.

[HOW]
Amend coasting vtotal from 2 bytes to 4 bytes.

Cc: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: stable@vger.kernel.org
Reviewed-by: Alvin Lee &lt;alvin.lee2@amd.com&gt;
Acked-by: Alex Hung &lt;alex.hung@amd.com&gt;
Signed-off-by: ChunTao Tso &lt;chuntao.tso@amd.com&gt;
Tested-by: Daniel Wheeler &lt;daniel.wheeler@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/amd/display: Add 'replay' NULL check in 'edp_set_replay_allow_active()'</title>
<updated>2024-03-26T22:17:08Z</updated>
<author>
<name>Srinivasan Shanmugam</name>
</author>
<published>2024-02-15T13:08:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d0e94f4807ff0df66cf447d6b4bbb8ac830e99c3'/>
<id>urn:sha1:d0e94f4807ff0df66cf447d6b4bbb8ac830e99c3</id>
<content type='text'>
[ Upstream commit f6aed043ee5d75b3d1bfc452b1a9584b63c8f76b ]

In the first if statement, we're checking if 'replay' is NULL. But in
the second if statement, we're not checking if 'replay' is NULL again
before calling replay-&gt;funcs-&gt;replay_set_power_opt().

if (replay == NULL &amp;&amp; force_static)
    return false;

...

if (link-&gt;replay_settings.replay_feature_enabled &amp;&amp;
    replay-&gt;funcs-&gt;replay_set_power_opt) {
	replay-&gt;funcs-&gt;replay_set_power_opt(replay, *power_opts, panel_inst);
	link-&gt;replay_settings.replay_power_opt_active = *power_opts;
}

If 'replay' is NULL, this will cause a null pointer dereference.

Fixes the below found by smatch:
drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_edp_panel_control.c:895 edp_set_replay_allow_active() error: we previously assumed 'replay' could be null (see line 887)

Fixes: c7ddc0a800bc ("drm/amd/display: Add Functions to enable Freesync Panel Replay")
Cc: Bhawanpreet Lakha &lt;Bhawanpreet.Lakha@amd.com&gt;
Cc: Roman Li &lt;roman.li@amd.com&gt;
Cc: Rodrigo Siqueira &lt;Rodrigo.Siqueira@amd.com&gt;
Cc: Aurabindo Pillai &lt;aurabindo.pillai@amd.com&gt;
Cc: Tom Chung &lt;chiahsuan.chung@amd.com&gt;
Suggested-by: Tom Chung &lt;chiahsuan.chung@amd.com&gt;
Signed-off-by: Srinivasan Shanmugam &lt;srinivasan.shanmugam@amd.com&gt;
Reviewed-by: Tom Chung &lt;chiahsuan.chung@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/amd/display: Only allow dig mapping to pwrseq in new asic</title>
<updated>2024-02-22T17:23:01Z</updated>
<author>
<name>Lewis Huang</name>
</author>
<published>2024-01-31T09:20:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4e73826089ce899357580bbf6e0afe4e6f9900b7'/>
<id>urn:sha1:4e73826089ce899357580bbf6e0afe4e6f9900b7</id>
<content type='text'>
[Why]
The old asic only have 1 pwrseq hw.
We don't need to map the diginst to pwrseq inst in old asic.

[How]
1. Only mapping dig to pwrseq for new asic.
2. Move mapping function into dcn specific panel control component

Cc: Stable &lt;stable@vger.kernel.org&gt; # v6.6+
Cc: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3122
Reviewed-by: Anthony Koo &lt;anthony.koo@amd.com&gt;
Acked-by: Rodrigo Siqueira &lt;rodrigo.siqueira@amd.com&gt;
Tested-by: Daniel Wheeler &lt;daniel.wheeler@amd.com&gt;
Signed-off-by: Lewis Huang &lt;lewis.huang@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amd/display: fixed integer types and null check locations</title>
<updated>2024-02-15T19:18:43Z</updated>
<author>
<name>Sohaib Nadeem</name>
</author>
<published>2024-01-31T21:40:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0484e05d048b66d01d1f3c1d2306010bb57d8738'/>
<id>urn:sha1:0484e05d048b66d01d1f3c1d2306010bb57d8738</id>
<content type='text'>
[why]:
issues fixed:
- comparison with wider integer type in loop condition which can cause
infinite loops
- pointer dereference before null check

Cc: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: stable@vger.kernel.org
Reviewed-by: Josip Pavic &lt;josip.pavic@amd.com&gt;
Acked-by: Aurabindo Pillai &lt;aurabindo.pillai@amd.com&gt;
Signed-off-by: Sohaib Nadeem &lt;sohaib.nadeem@amd.com&gt;
Tested-by: Daniel Wheeler &lt;daniel.wheeler@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amd/display: Add align done check</title>
<updated>2024-02-15T19:18:43Z</updated>
<author>
<name>Zhikai Zhai</name>
</author>
<published>2024-01-29T09:02:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=94b38b895dec8c0ef093140a141e191b60ff614c'/>
<id>urn:sha1:94b38b895dec8c0ef093140a141e191b60ff614c</id>
<content type='text'>
[WHY]
We Double-check link status if training successful,
but miss the lane align status.

[HOW]
Add the lane align status check

Cc: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: stable@vger.kernel.org
Reviewed-by: Wenjing Liu &lt;wenjing.liu@amd.com&gt;
Acked-by: Aurabindo Pillai &lt;aurabindo.pillai@amd.com&gt;
Signed-off-by: Zhikai Zhai &lt;zhikai.zhai@amd.com&gt;
Tested-by: Daniel Wheeler &lt;daniel.wheeler@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amd/display: Initialize 'wait_time_microsec' variable in link_dp_training_dpia.c</title>
<updated>2024-02-15T19:18:42Z</updated>
<author>
<name>Srinivasan Shanmugam</name>
</author>
<published>2024-02-05T10:37:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7edb5830ecb0033184ee2fa01ae8af17d56450ec'/>
<id>urn:sha1:7edb5830ecb0033184ee2fa01ae8af17d56450ec</id>
<content type='text'>
wait_time_microsec = max(wait_time_microsec, (uint32_t)
DPIA_CLK_SYNC_DELAY);

Above line is trying to assign the maximum value between
'wait_time_microsec' and 'DPIA_CLK_SYNC_DELAY' to wait_time_microsec.
However, 'wait_time_microsec' has not been assigned a value before this
line, initialize 'wait_time_microsec' at the point of declaration.

Fixes the below:
drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_training_dpia.c:697 dpia_training_eq_non_transparent() error: uninitialized symbol 'wait_time_microsec'.

Fixes: 630168a97314 ("drm/amd/display: move dp link training logic to link_dp_training")
Cc: Wenjing Liu &lt;wenjing.liu@amd.com&gt;
Cc: Rodrigo Siqueira &lt;Rodrigo.Siqueira@amd.com&gt;
Cc: Aurabindo Pillai &lt;aurabindo.pillai@amd.com&gt;
Signed-off-by: Srinivasan Shanmugam &lt;srinivasan.shanmugam@amd.com&gt;
Reviewed-by: Roman Li &lt;roman.li@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amd/display: Fix buffer overflow in 'get_host_router_total_dp_tunnel_bw()'</title>
<updated>2024-01-31T22:35:59Z</updated>
<author>
<name>Srinivasan Shanmugam</name>
</author>
<published>2024-01-29T15:47:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=97cba232549b9fe7e491fb60a69cf93075015f29'/>
<id>urn:sha1:97cba232549b9fe7e491fb60a69cf93075015f29</id>
<content type='text'>
The error message buffer overflow 'dc-&gt;links' 12 &lt;= 12 suggests that the
code is trying to access an element of the dc-&gt;links array that is
beyond its bounds. In C, arrays are zero-indexed, so an array with 12
elements has valid indices from 0 to 11. Trying to access dc-&gt;links[12]
would be an attempt to access the 13th element of a 12-element array,
which is a buffer overflow.

To fix this, ensure that the loop does not go beyond the last valid
index when accessing dc-&gt;links[i + 1] by subtracting 1 from the loop
condition.

This would ensure that i + 1 is always a valid index in the array.

Fixes the below:
drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_dpia_bw.c:208 get_host_router_total_dp_tunnel_bw() error: buffer overflow 'dc-&gt;links' 12 &lt;= 12

Fixes: 59f1622a5f05 ("drm/amd/display: Add dpia display mode validation logic")
Cc: PeiChen Huang &lt;peichen.huang@amd.com&gt;
Cc: Aric Cyr &lt;aric.cyr@amd.com&gt;
Cc: Rodrigo Siqueira &lt;rodrigo.siqueira@amd.com&gt;
Cc: Aurabindo Pillai &lt;aurabindo.pillai@amd.com&gt;
Cc: Meenakshikumar Somasundaram &lt;meenakshikumar.somasundaram@amd.com&gt;
Signed-off-by: Srinivasan Shanmugam &lt;srinivasan.shanmugam@amd.com&gt;
Reviewed-by: Tom Chung &lt;chiahsuan.chung@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amd/display: Fix uninitialized variable usage in core_link_ 'read_dpcd() &amp; write_dpcd()' functions</title>
<updated>2024-01-25T20:34:37Z</updated>
<author>
<name>Srinivasan Shanmugam</name>
</author>
<published>2024-01-17T03:11:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a58371d632ebab9ea63f10893a6b6731196b6f8d'/>
<id>urn:sha1:a58371d632ebab9ea63f10893a6b6731196b6f8d</id>
<content type='text'>
The 'status' variable in 'core_link_read_dpcd()' &amp;
'core_link_write_dpcd()' was uninitialized.

Thus, initializing 'status' variable to 'DC_ERROR_UNEXPECTED' by default.

Fixes the below:
drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dpcd.c:226 core_link_read_dpcd() error: uninitialized symbol 'status'.
drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dpcd.c:248 core_link_write_dpcd() error: uninitialized symbol 'status'.

Cc: stable@vger.kernel.org
Cc: Jerry Zuo &lt;jerry.zuo@amd.com&gt;
Cc: Jun Lei &lt;Jun.Lei@amd.com&gt;
Cc: Wayne Lin &lt;Wayne.Lin@amd.com&gt;
Cc: Aurabindo Pillai &lt;aurabindo.pillai@amd.com&gt;
Cc: Rodrigo Siqueira &lt;Rodrigo.Siqueira@amd.com&gt;
Cc: Hamza Mahfooz &lt;hamza.mahfooz@amd.com&gt;
Signed-off-by: Srinivasan Shanmugam &lt;srinivasan.shanmugam@amd.com&gt;
Reviewed-by: Rodrigo Siqueira &lt;Rodrigo.Siqueira@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amd/display: Fix late derefrence 'dsc' check in 'link_set_dsc_pps_packet()'</title>
<updated>2024-01-18T21:29:32Z</updated>
<author>
<name>Srinivasan Shanmugam</name>
</author>
<published>2024-01-10T15:28:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3bb9b1f958c3d986ed90a3ff009f1e77e9553207'/>
<id>urn:sha1:3bb9b1f958c3d986ed90a3ff009f1e77e9553207</id>
<content type='text'>
In link_set_dsc_pps_packet(), 'struct display_stream_compressor *dsc'
was dereferenced in a DC_LOGGER_INIT(dsc-&gt;ctx-&gt;logger); before the 'dsc'
NULL pointer check.

Fixes the below:
drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dpms.c:905 link_set_dsc_pps_packet() warn: variable dereferenced before check 'dsc' (see line 903)

Cc: stable@vger.kernel.org
Cc: Aurabindo Pillai &lt;aurabindo.pillai@amd.com&gt;
Cc: Rodrigo Siqueira &lt;Rodrigo.Siqueira@amd.com&gt;
Cc: Hamza Mahfooz &lt;hamza.mahfooz@amd.com&gt;
Cc: Wenjing Liu &lt;wenjing.liu@amd.com&gt;
Cc: Qingqing Zhuo &lt;qingqing.zhuo@amd.com&gt;
Signed-off-by: Srinivasan Shanmugam &lt;srinivasan.shanmugam@amd.com&gt;
Reviewed-by: Aurabindo Pillai &lt;aurabindo.pillai@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
</feed>
