<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/amd/display, branch v5.14.8</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.14.8</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.14.8'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-09-26T12:10:23+00:00</updated>
<entry>
<title>drm/amd/display: Fix memory leak reported by coverity</title>
<updated>2021-09-26T12:10:23+00:00</updated>
<author>
<name>Anson Jacob</name>
<email>Anson.Jacob@amd.com</email>
</author>
<published>2021-08-13T21:11:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=25b4e51e2333761389f905c213fe48f44c581b5d'/>
<id>urn:sha1:25b4e51e2333761389f905c213fe48f44c581b5d</id>
<content type='text'>
[ Upstream commit 03388a347fe7cf7c3bdf68b0823ba316d177d470 ]

Free memory allocated if any of the previous allocations failed.

&gt;&gt;&gt;     CID 1487129:  Resource leaks  (RESOURCE_LEAK)
&gt;&gt;&gt;     Variable "vpg" going out of scope leaks the storage it points to.

Addresses-Coverity-ID: 1487129: ("Resource leaks")

Reviewed-by: Aric Cyr &lt;aric.cyr@amd.com&gt;
Acked-by: Mikita Lipski &lt;mikita.lipski@amd.com&gt;
Signed-off-by: Anson Jacob &lt;Anson.Jacob@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: Fix white screen page fault for gpuvm</title>
<updated>2021-09-22T10:39:15+00:00</updated>
<author>
<name>Nicholas Kazlauskas</name>
<email>nicholas.kazlauskas@amd.com</email>
</author>
<published>2021-09-13T18:56:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=05a19da7efcd5940305308d0ddd288503c8a1434'/>
<id>urn:sha1:05a19da7efcd5940305308d0ddd288503c8a1434</id>
<content type='text'>
commit a70939851f9ced298dc7d523374b8c4d05239caf upstream.

[Why]
The "base_addr_is_mc_addr" field was added for dcn3.1 support but
pa_config was never updated to set it to false.

Uninitialized memory causes it to be set to true which results in
address mistranslation and white screen.

[How]
Use memset to ensure all fields are initialized to 0 by default.

Fixes: 64b1d0e8d500 ("drm/amd/display: Add DCN3.1 HWSEQ")
Signed-off-by: Nicholas Kazlauskas &lt;nicholas.kazlauskas@amd.com&gt;
Acked-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Acked-by: Aaron Liu &lt;aaron.liu@amd.com&gt;
Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/amd/display: dsc mst 2 4K displays go dark with 2 lane HBR3</title>
<updated>2021-09-22T10:39:15+00:00</updated>
<author>
<name>Hersen Wu</name>
<email>hersenwu@amd.com</email>
</author>
<published>2021-08-25T20:27:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c6d921d1e88c55d3f941732f3321004ceb9a0196'/>
<id>urn:sha1:c6d921d1e88c55d3f941732f3321004ceb9a0196</id>
<content type='text'>
commit 90517c9838602846daa0feec7b37382fed61b001 upstream.

[Why]
call stack of amdgpu dsc mst pbn, slot num calculation is as below:
-compute_bpp_x16_from_target_bandwidth
-decide_dsc_target_bpp_x16
-setup_dsc_config
-dc_dsc_compute_bandwidth_range
-compute_mst_dsc_configs_for_link
-compute_mst_dsc_configs_for_state

from pbn -&gt; dsc target bpp_x16

bpp_x16 is calulated by compute_bpp_x16_from_target_bandwidth.
Beside pixel clock and bpp, num_slices_h and bpp_increment_div
will also affect bpp_x16.

from dsc target bpp_x16 -&gt; pbn

within dm_update_mst_vcpi_slots_for_dsc,
pbn = drm_dp_calc_pbn_mode(clock, bpp_x16, true);

drm_dp_calc_pbn_mode(int clock, int bpp, bool dsc)
{
  return DIV_ROUND_UP_ULL(mul_u32_u32(clock * (bpp / 16), 64 * 1006),
            8 * 54 * 1000 * 1000);
}

bpp / 16 trunc digits after decimal point. This will cause calculation
delta. drm_dp_calc_pbn_mode does not have other informations,
like num_slices_h, bpp_increment_div. therefore, it does not do revese
calcuation properly from bpp_x16 to pbn.

pbn from drm_dp_calc_pbn_mode is less than pbn from
compute_mst_dsc_configs_for_state. This cause not enough mst slot
allocated to display. display could not visually light up.

[How]
pass pbn from compute_mst_dsc_configs_for_state to
dm_update_mst_vcpi_slots_for_dsc

Cc: stable@vger.kernel.org

Reviewed-by: Scott Foster &lt;Scott.Foster@amd.com&gt;
Acked-by: Mikita Lipski &lt;mikita.lipski@amd.com&gt;
Signed-off-by: Hersen Wu &lt;hersenwu@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: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/amd/display: Get backlight from PWM if DMCU is not initialized</title>
<updated>2021-09-22T10:39:15+00:00</updated>
<author>
<name>Harry Wentland</name>
<email>harry.wentland@amd.com</email>
</author>
<published>2021-08-16T19:57:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c5548625a7583a76c64a0d55e99481d9a2c8634f'/>
<id>urn:sha1:c5548625a7583a76c64a0d55e99481d9a2c8634f</id>
<content type='text'>
commit 9987fbb368038d41bfdcda2a3f7f4945d7daa9a5 upstream.

On Carrizo/Stoney systems we set backlight through panel_cntl, i.e.
directly via the PWM registers, if DMCU is not initialized. We
always read it back through ABM registers which leads to a
mismatch and forces atomic_commit to program the backlight
each time.

Instead make sure we use the same logic for backlight readback,
i.e. read it from panel_cntl if DMCU is not initialized.

We also need to remove some extraneous and incorrect calculations
at the end of dce_get_16_bit_backlight_from_pwm.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1666
Cc: stable@vger.kernel.org

Reviewed-by: Josip Pavic &lt;josip.pavic@amd.com&gt;
Acked-by: Mikita Lipski &lt;mikita.lipski@amd.com&gt;
Signed-off-by: Harry Wentland &lt;harry.wentland@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: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/amd/display: setup system context for APUs</title>
<updated>2021-09-18T11:44:04+00:00</updated>
<author>
<name>Aaron Liu</name>
<email>aaron.liu@amd.com</email>
</author>
<published>2021-08-23T04:26:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=abf7b74d2e87b7dd91ac2c407ebd475b6c4a75e6'/>
<id>urn:sha1:abf7b74d2e87b7dd91ac2c407ebd475b6c4a75e6</id>
<content type='text'>
commit 3ca001aff0878546494d7f403334c8d987924977 upstream.

Scatter/gather is APU feature starting from carrizo.
adev-&gt;apu_flags is not used for all APUs.
adev-&gt;flags &amp; AMD_IS_APU can be used for all APUs.

Signed-off-by: Aaron Liu &lt;aaron.liu@amd.com&gt;
Reviewed-by: Huang Rui &lt;ray.huang@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/amd/display: Update bounding box states (v2)</title>
<updated>2021-09-18T11:44:04+00:00</updated>
<author>
<name>Jerry (Fangzhi) Zuo</name>
<email>Jerry.Zuo@amd.com</email>
</author>
<published>2020-06-18T00:34:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9bf93c44e645cb549399aa45f97d6fee7c4a36fc'/>
<id>urn:sha1:9bf93c44e645cb549399aa45f97d6fee7c4a36fc</id>
<content type='text'>
commit a7a9d11e12fcc32160d55e8612e72e5ab51b15dc upstream.

[Why]
Drop hardcoded dispclk, dppclk, phyclk

[How]
Read the corresponding values from clock table entries already populated.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1403
Cc: stable@vger.kernel.org
Signed-off-by: Jerry (Fangzhi) Zuo &lt;Jerry.Zuo@amd.com&gt;
Signed-off-by: Aurabindo Pillai &lt;aurabindo.pillai@amd.com&gt;
Acked-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/amd/display: Update number of DCN3 clock states</title>
<updated>2021-09-18T11:44:04+00:00</updated>
<author>
<name>Aurabindo Pillai</name>
<email>aurabindo.pillai@amd.com</email>
</author>
<published>2021-08-24T19:10:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a90b503fa8fcda84878a7e1600d3f07c951ad4a7'/>
<id>urn:sha1:a90b503fa8fcda84878a7e1600d3f07c951ad4a7</id>
<content type='text'>
commit 0bbf06d888734041e813b916d7821acd4f72005a upstream.

[Why &amp; How]
The DCN3 SoC parameter num_states was calculated but not saved into the
object.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1403
Cc: stable@vger.kernel.org
Signed-off-by: Aurabindo Pillai &lt;aurabindo.pillai@amd.com&gt;
Acked-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/display: fix possible null-pointer dereference in dcn10_set_clock()</title>
<updated>2021-09-18T11:43:50+00:00</updated>
<author>
<name>Tuo Li</name>
<email>islituo@gmail.com</email>
</author>
<published>2021-08-11T04:07:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ffbbadf0b86ee5e23ec92aa203c101da3155b25b'/>
<id>urn:sha1:ffbbadf0b86ee5e23ec92aa203c101da3155b25b</id>
<content type='text'>
[ Upstream commit 554594567b1fa3da74f88ec7b2dc83d000c58e98 ]

The variable dc-&gt;clk_mgr is checked in:
  if (dc-&gt;clk_mgr &amp;&amp; dc-&gt;clk_mgr-&gt;funcs-&gt;get_clock)

This indicates dc-&gt;clk_mgr can be NULL.
However, it is dereferenced in:
    if (!dc-&gt;clk_mgr-&gt;funcs-&gt;get_clock)

To fix this null-pointer dereference, check dc-&gt;clk_mgr and the function
pointer dc-&gt;clk_mgr-&gt;funcs-&gt;get_clock earlier, and return if one of them
is NULL.

Reported-by: TOTE Robot &lt;oslab@tsinghua.edu.cn&gt;
Signed-off-by: Tuo Li &lt;islituo@gmail.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: fix incorrect CM/TF programming sequence in dwb</title>
<updated>2021-09-18T11:43:49+00:00</updated>
<author>
<name>Roy Chan</name>
<email>roy.chan@amd.com</email>
</author>
<published>2021-07-19T23:00:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d5e688b6be272d6b3999d2463e39a77dc52bc411'/>
<id>urn:sha1:d5e688b6be272d6b3999d2463e39a77dc52bc411</id>
<content type='text'>
[ Upstream commit 781e1e23131cce56fb557e6ec2260480a6bd08cc ]

[How]
the programming sequeune was for old asic.
the correct programming sequeunce should be similar to the one
used in mpc. the fix is copied from the mpc programming sequeunce.

Reviewed-by: Anthony Koo &lt;Anthony.Koo@amd.com&gt;
Acked-by: Anson Jacob &lt;Anson.Jacob@amd.com&gt;
Signed-off-by: Roy Chan &lt;roy.chan@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: fix missing writeback disablement if plane is removed</title>
<updated>2021-09-18T11:43:48+00:00</updated>
<author>
<name>Roy Chan</name>
<email>roy.chan@amd.com</email>
</author>
<published>2021-07-21T23:33:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=240de7d5c6aaa06a95c521e15420af549d3e1fb1'/>
<id>urn:sha1:240de7d5c6aaa06a95c521e15420af549d3e1fb1</id>
<content type='text'>
[ Upstream commit 82367e7f22d085092728f45fd5fbb15e3fb997c0 ]

[Why]
If the plane has been removed, the writeback disablement logic
doesn't run

[How]
fix the logic order

Acked-by: Anson Jacob &lt;Anson.Jacob@amd.com&gt;
Signed-off-by: Roy Chan &lt;roy.chan@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>
</feed>
