Commit Graph

90416 Commits

Author SHA1 Message Date
Bruce Ashfield
a8889f753c This is the 6.1.141 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmhAPsAACgkQONu9yGCS
 aT5bsA/9GAXiE7V78xym1UyF8Rib0vcQ2vQuilw+kzGr8UJyg9bBO5+H3j3W8stu
 TrFMYk3mFDdfJ/ozKSQkFlVPI7XFfz8x7T1/3+ytqf90TLe9hBfx4WsDMA+OCz7K
 GJqPMCmfb6yZi/Jp0Cotqd7cRmLisNvvPl2k+8QO2PbNnsZOJPYNy7XsS5WCNY81
 r27Lu/eyPYdb4CRuxWDLBjeFkC+npVsUxbVUaUgODwlJwmg3z5G+vhMhsw5roZlN
 IXxnDnVorIK/q9Cfw5AK89kIQzL5PQE9EAUBS+mKaGYvU8I4uvttA2ebkosQV+xW
 ahMX4TZldSWYC5fsfL57MnHdWGQ4c/+RTKUBhEqwKALu4bv8bavC1XQ3vv5GiD0A
 f83Km2dq4+bOIyLCXhx2m1b983eGVC9t4s1OacqlKfupmt0H6NhtRlBPTLCRMajG
 njHPoaHdPXTq1EjCpu7m4d7tyFSK/oGiWeWSCEdQciAzT6ET9FEGErr9UG5auVz4
 NSHZq1I7WtZbRGz6RmcwdgGpPLD+Q5+wWkqaaezCzrfsqgtmxwXp7LmM5yVkvEYq
 0HitEOcaHCT1Cl+VFsClFbsrad98KAcDV6wIfTgSbL9GjBG7kW8vgZaFbir+XG4j
 5yqdj8lo+DiXtK+JXibfcAVQufciOZzuWhiDnV/nD+qVKOdqcvI=
 =O5on
 -----END PGP SIGNATURE-----

Merge tag 'v6.1.141' into v6.1/standard/base

This is the 6.1.141 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmhAPsAACgkQONu9yGCS
# aT5bsA/9GAXiE7V78xym1UyF8Rib0vcQ2vQuilw+kzGr8UJyg9bBO5+H3j3W8stu
# TrFMYk3mFDdfJ/ozKSQkFlVPI7XFfz8x7T1/3+ytqf90TLe9hBfx4WsDMA+OCz7K
# GJqPMCmfb6yZi/Jp0Cotqd7cRmLisNvvPl2k+8QO2PbNnsZOJPYNy7XsS5WCNY81
# r27Lu/eyPYdb4CRuxWDLBjeFkC+npVsUxbVUaUgODwlJwmg3z5G+vhMhsw5roZlN
# IXxnDnVorIK/q9Cfw5AK89kIQzL5PQE9EAUBS+mKaGYvU8I4uvttA2ebkosQV+xW
# ahMX4TZldSWYC5fsfL57MnHdWGQ4c/+RTKUBhEqwKALu4bv8bavC1XQ3vv5GiD0A
# f83Km2dq4+bOIyLCXhx2m1b983eGVC9t4s1OacqlKfupmt0H6NhtRlBPTLCRMajG
# njHPoaHdPXTq1EjCpu7m4d7tyFSK/oGiWeWSCEdQciAzT6ET9FEGErr9UG5auVz4
# NSHZq1I7WtZbRGz6RmcwdgGpPLD+Q5+wWkqaaezCzrfsqgtmxwXp7LmM5yVkvEYq
# 0HitEOcaHCT1Cl+VFsClFbsrad98KAcDV6wIfTgSbL9GjBG7kW8vgZaFbir+XG4j
# 5yqdj8lo+DiXtK+JXibfcAVQufciOZzuWhiDnV/nD+qVKOdqcvI=
# =O5on
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 04 Jun 2025 08:40:32 AM EDT
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
2025-06-06 11:04:27 -04:00
Mario Limonciello
9c40d1f7b7 Revert "drm/amd: Keep display off while going into S4"
commit 7e7cb7a13c81073d38a10fa7b450d23712281ec4 upstream.

commit 68bfdc8dc0a1a ("drm/amd: Keep display off while going into S4")
attempted to keep displays off during the S4 sequence by not resuming
display IP.  This however leads to hangs because DRM clients such as the
console can try to access registers and cause a hang.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4155
Fixes: 68bfdc8dc0a1a ("drm/amd: Keep display off while going into S4")
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://lore.kernel.org/r/20250522141328.115095-1-mario.limonciello@amd.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit e485502c37b097b0bd773baa7e2741bf7bd2909a)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-06-04 14:40:21 +02:00
feijuan.li
34e2f19e0e drm/edid: fixed the bug that hdr metadata was not reset
commit 6692dbc15e5ed40a3aa037aced65d7b8826c58cd upstream.

When DP connected to a device with HDR capability,
the hdr structure was filled.Then connected to another
sink device without hdr capability, but the hdr info
still exist.

Fixes: e85959d6cb ("drm: Parse HDR metadata info from EDID")
Cc: <stable@vger.kernel.org> # v5.3+
Signed-off-by: "feijuan.li" <feijuan.li@samsung.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://lore.kernel.org/r/20250514063511.4151780-1-feijuan.li@samsung.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-06-04 14:40:21 +02:00
Jessica Zhang
ffb55ddf26 drm: Add valid clones check
[ Upstream commit 41b4b11da02157c7474caf41d56baae0e941d01a ]

Check that all encoders attached to a given CRTC are valid
possible_clones of each other.

Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20241216-concurrent-wb-v4-3-fe220297a7f0@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:40:18 +02:00
Douglas Anderson
d822a8e3fb drm/panel-edp: Add Starry 116KHD024006
[ Upstream commit 749b5b279e5636cdcef51e15d67b77162cca6caa ]

We have a few reports of sc7180-trogdor-pompom devices that have a
panel in them that IDs as STA 0x0004 and has the following raw EDID:

  00 ff ff ff ff ff ff 00  4e 81 04 00 00 00 00 00
  10 20 01 04 a5 1a 0e 78  0a dc dd 96 5b 5b 91 28
  1f 52 54 00 00 00 01 01  01 01 01 01 01 01 01 01
  01 01 01 01 01 01 8e 1c  56 a0 50 00 1e 30 28 20
  55 00 00 90 10 00 00 18  00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 fe
  00 31 31 36 4b 48 44 30  32 34 30 30 36 0a 00 e6

We've been unable to locate a datasheet for this panel and our partner
has not been responsive, but all Starry eDP datasheets that we can
find agree on the same timing (delay_100_500_e200) so it should be
safe to use that here instead of the super conservative timings. We'll
still go a little extra conservative and allow `hpd_absent` of 200
instead of 100 because that won't add any real-world delay in most
cases.

We'll associate the string from the EDID ("116KHD024006") with this
panel. Given that the ID is the suspicious value of 0x0004 it seems
likely that Starry doesn't always update their IDs but the string will
still work to differentiate if we ever need to in the future.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250109142853.1.Ibcc3009933fd19507cc9c713ad0c99c7a9e4fe17@changeid
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:40:18 +02:00
Thomas Zimmermann
658a933038 drm/ast: Find VBIOS mode from regular display size
[ Upstream commit c81202906b5cd56db403e95db3d29c9dfc8c74c1 ]

The ast driver looks up supplied display modes from an internal list of
display modes supported by the VBIOS.

Do not use the crtc_-prefixed display values from struct drm_display_mode
for looking up the VBIOS mode. The fields contain raw values that the
driver programs to hardware. They are affected by display settings like
double-scan or interlace.

Instead use the regular vdisplay and hdisplay fields for lookup. As the
programmed values can now differ from the values used for lookup, set
struct drm_display_mode.crtc_vdisplay and .crtc_hdisplay from the VBIOS
mode.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250131092257.115596-9-tzimmermann@suse.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:40:17 +02:00
Alex Deucher
e4f6a56f45 drm/amd/display/dm: drop hw_support check in amdgpu_dm_i2c_xfer()
[ Upstream commit 33da70bd1e115d7d73f45fb1c09f5ecc448f3f13 ]

DC supports SW i2c as well.  Drop the check.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:40:15 +02:00
Shiwu Zhang
9131a4be79 drm/amdgpu: enlarge the VBIOS binary size limit
[ Upstream commit 667b96134c9e206aebe40985650bf478935cbe04 ]

Some chips have a larger VBIOS file so raise the size limit to support
the flashing tool.

Signed-off-by: Shiwu Zhang <shiwu.zhang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:40:15 +02:00
Tom Chung
bc40b6248a drm/amd/display: Initial psr_version with correct setting
[ Upstream commit d8c782cac5007e68e7484d420168f12d3490def6 ]

[Why & How]
The initial setting for psr_version is not correct while
create a virtual link.

The default psr_version should be DC_PSR_VERSION_UNSUPPORTED.

Reviewed-by: Roman Li <roman.li@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:40:14 +02:00
Jiang Liu
81f4b82cf3 drm/amdgpu: reset psp->cmd to NULL after releasing the buffer
[ Upstream commit e92f3f94cad24154fd3baae30c6dfb918492278d ]

Reset psp->cmd to NULL after releasing the buffer in function psp_sw_fini().

Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Jiang Liu <gerry@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:40:14 +02:00
Yihan Zhu
42733703c4 drm/amd/display: handle max_downscale_src_width fail check
[ Upstream commit 02a940da2ccc0cc0299811379580852b405a0ea2 ]

[WHY]
If max_downscale_src_width check fails, we exit early from TAP calculation and left a NULL
value to the scaling data structure to cause the zero divide in the DML validation.

[HOW]
Call set default TAP calculation before early exit in get_optimal_number_of_taps due to
max downscale limit exceed.

Reviewed-by: Samson Tam <samson.tam@amd.com>
Signed-off-by: Yihan Zhu <Yihan.Zhu@amd.com>
Signed-off-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:40:11 +02:00
Philip Yang
c8cc14eeb2 drm/amdkfd: KFD release_work possible circular locking
[ Upstream commit 1b9366c601039d60546794c63fbb83ce8e53b978 ]

If waiting for gpu reset done in KFD release_work, thers is WARNING:
possible circular locking dependency detected

  #2  kfd_create_process
        kfd_process_mutex
          flush kfd release work

  #1  kfd release work
        wait for amdgpu reset work

  #0  amdgpu_device_gpu_reset
        kgd2kfd_pre_reset
          kfd_process_mutex

  Possible unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock((work_completion)(&p->release_work));
                  lock((wq_completion)kfd_process_wq);
                  lock((work_completion)(&p->release_work));
   lock((wq_completion)amdgpu-reset-dev);

To fix this, KFD create process move flush release work outside
kfd_process_mutex.

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:40:10 +02:00
AngeloGioacchino Del Regno
31b96c1543 drm/mediatek: mtk_dpi: Add checks for reg_h_fre_con existence
[ Upstream commit 8c9da7cd0bbcc90ab444454fecf535320456a312 ]

In preparation for adding support for newer DPI instances which
do support direct-pin but do not have any H_FRE_CON register,
like the one found in MT8195 and MT8188, add a branch to check
if the reg_h_fre_con variable was declared in the mtk_dpi_conf
structure for the probed SoC DPI version.

As a note, this is useful specifically only for cases in which
the support_direct_pin variable is true, so mt8195-dpintf is
not affected by any issue.

Reviewed-by: CK Hu <ck.hu@mediatek.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20250217154836.108895-6-angelogioacchino.delregno@collabora.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:40:10 +02:00
Andy Yan
7d49558be0 drm/rockchip: vop2: Add uv swap for cluster window
[ Upstream commit e7aae9f6d762139f8d2b86db03793ae0ab3dd802 ]

The Cluster windows of upcoming VOP on rk3576 also support
linear YUV support, we need to set uv swap bit for it.

As the VOP2_WIN_UV_SWA register defined on rk3568/rk3588 is
0xffffffff, so this register will not be touched on these
two platforms.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Tested-by: Michael Riesch <michael.riesch@wolfvision.net> # on RK3568
Tested-by: Detlev Casanova <detlev.casanova@collabora.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20250303034436.192400-4-andyshrk@163.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:40:09 +02:00
Victor Lu
41f654291b drm/amdgpu: Do not program AGP BAR regs under SRIOV in gfxhub_v1_0.c
[ Upstream commit 057fef20b8401110a7bc1c2fe9d804a8a0bf0d24 ]

SRIOV VF does not have write access to AGP BAR regs.
Skip the writes to avoid a dmesg warning.

Signed-off-by: Victor Lu <victorchengchi.lu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:40:09 +02:00
Zhikai Zhai
0b60d03644 drm/amd/display: calculate the remain segments for all pipes
[ Upstream commit d3069feecdb5542604d29b59acfd1fd213bad95b ]

[WHY]
In some cases the remain de-tile buffer segments will be greater
than zero if we don't add the non-top pipe to calculate, at
this time the override de-tile buffer size will be valid and used.
But it makes the de-tile buffer segments used finally for all of pipes
exceed the maximum.

[HOW]
Add the non-top pipe to calculate the remain de-tile buffer segments.
Don't set override size to use the average according to pipe count
if the value exceed the maximum.

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Signed-off-by: Zhikai Zhai <zhikai.zhai@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:40:07 +02:00
Jing Zhou
227c253c9e drm/amd/display: Guard against setting dispclk low for dcn31x
[ Upstream commit 9c2f4ae64bb6f6d83a54d88b9ee0f369cdbb9fa8 ]

[WHY]
We should never apply a minimum dispclk value while in
prepare_bandwidth or while displays are active. This is
always an optimizaiton for when all displays are disabled.

[HOW]
Defer dispclk optimization until safe_to_lower = true
and display_count reaches 0.

Since 0 has a special value in this logic (ie. no dispclk
required) we also need adjust the logic that clamps it for
the actual request to PMFW.

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Reviewed-by: Chris Park <chris.park@amd.com>
Reviewed-by: Eric Yang <eric.yang@amd.com>
Signed-off-by: Jing Zhou <Jing.Zhou@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:40:05 +02:00
Felix Kuehling
f238c9c15d drm/amdgpu: Allow P2P access through XGMI
[ Upstream commit a92741e72f91b904c1d8c3d409ed8dbe9c1f2b26 ]

If peer memory is accessible through XGMI, allow leaving it in VRAM
rather than forcing its migration to GTT on DMABuf attachment.

Signed-off-by: Felix Kuehling <felix.kuehling@amd.com>
Tested-by: Hao (Claire) Zhou <hao.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 372c8d72c3680fdea3fbb2d6b089f76b4a6d596a)
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:40:01 +02:00
Bruce Ashfield
2c1b513331 This is the 6.1.140 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmgvFEIACgkQONu9yGCS
 aT7LPRAAxgs5BKEZroYzUn6ve72yi8QPiTn+GERb7/qkjGfsS2AGWwGra3CJu5eo
 DQjKguGZY8DW8niwFGDGOfpUnoa8KJQvxakPBw79jM2LFL/XOVBJtbkUZ1NMiRdI
 QAs85JYgFcDmBSVi8t+E32LmoUTSf9mB5Vr6Ic8l23ylBkElmh5ABcsBwAAfFpgf
 g5yYHMy3QTEnddGDa8xAUzy+eHCPOeVyTH8Ha8HvUlj3tHjopTo8AzlveIOj+iOw
 luoSxUzUkY6+UgJAo6Gkgn3h734plLNoGlnSjtMVj5dFN78/r/ss13YJxdG0WAHY
 pEFiQBB8cXzzpbKw6hDZ9pjrx4+S4Yw5gL2E8iCnzkpkQ/0ydD8nnI3c4qnxA24N
 UGZJkRLJAvjd8GdB+WOEsOHidbhMMuj7fTRgLim5bo1A0MjgfA7PPHDW9rXiRDgG
 g9Kn1lyVsc4I5MnwY2ro3B6kQYEm52vKCKYavAaUohj39oA9aJ967p5X6I+kvrlq
 HnnJaF/MbmjN8Bfv1b5Y7TqfhI4nkKDdnCvVcFNRsmktdJLRRDoq4bfpZaZa1uCY
 XeQzFlThM4/IqFeCudJv2Dmf8GqS1tAiMe2pdrHf2YpGeNI0Ldea1uxBstv2EpSd
 ml+Skla6E0tdnvT5YUhZarLTCpGvQ97VpJ9eImLvh0XQalImL44=
 =0mSP
 -----END PGP SIGNATURE-----

Merge tag 'v6.1.140' into v6.1/standard/base

This is the 6.1.140 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmgvFEIACgkQONu9yGCS
# aT7LPRAAxgs5BKEZroYzUn6ve72yi8QPiTn+GERb7/qkjGfsS2AGWwGra3CJu5eo
# DQjKguGZY8DW8niwFGDGOfpUnoa8KJQvxakPBw79jM2LFL/XOVBJtbkUZ1NMiRdI
# QAs85JYgFcDmBSVi8t+E32LmoUTSf9mB5Vr6Ic8l23ylBkElmh5ABcsBwAAfFpgf
# g5yYHMy3QTEnddGDa8xAUzy+eHCPOeVyTH8Ha8HvUlj3tHjopTo8AzlveIOj+iOw
# luoSxUzUkY6+UgJAo6Gkgn3h734plLNoGlnSjtMVj5dFN78/r/ss13YJxdG0WAHY
# pEFiQBB8cXzzpbKw6hDZ9pjrx4+S4Yw5gL2E8iCnzkpkQ/0ydD8nnI3c4qnxA24N
# UGZJkRLJAvjd8GdB+WOEsOHidbhMMuj7fTRgLim5bo1A0MjgfA7PPHDW9rXiRDgG
# g9Kn1lyVsc4I5MnwY2ro3B6kQYEm52vKCKYavAaUohj39oA9aJ967p5X6I+kvrlq
# HnnJaF/MbmjN8Bfv1b5Y7TqfhI4nkKDdnCvVcFNRsmktdJLRRDoq4bfpZaZa1uCY
# XeQzFlThM4/IqFeCudJv2Dmf8GqS1tAiMe2pdrHf2YpGeNI0Ldea1uxBstv2EpSd
# ml+Skla6E0tdnvT5YUhZarLTCpGvQ97VpJ9eImLvh0XQalImL44=
# =0mSP
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 22 May 2025 08:10:42 AM EDT
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
2025-05-28 13:38:18 -04:00
Alex Deucher
4e6310e8d4 drm/amdgpu: fix pm notifier handling
commit 4aaffc85751da5722e858e4333e8cf0aa4b6c78f upstream.

Set the s3/s0ix and s4 flags in the pm notifier so that we can skip
the resource evictions properly in pm prepare based on whether
we are suspending or hibernating.  Drop the eviction as processes
are not frozen at this time, we we can end up getting stuck trying
to evict VRAM while applications continue to submit work which
causes the buffers to get pulled back into VRAM.

v2: Move suspend flags out of pm notifier (Mario)

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4178
Fixes: 2965e6355dcd ("drm/amd: Add Suspend/Hibernate notification callback support")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 06f2dcc241e7e5c681f81fbc46cacdf4bfd7d6d7)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-22 14:10:11 +02:00
Wayne Lin
0638bad18d drm/amd/display: Avoid flooding unnecessary info messages
commit d33724ffb743d3d2698bd969e29253ae0cff9739 upstream.

It's expected that we'll encounter temporary exceptions
during aux transactions. Adjust logging from drm_info to
drm_dbg_dp to prevent flooding with unnecessary log messages.

Fixes: 3637e457eb00 ("drm/amd/display: Fix wrong handling for AUX_DEFER case")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://lore.kernel.org/r/20250513032026.838036-1-Wayne.Lin@amd.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 9a9c3e1fe5256da14a0a307dff0478f90c55fc8c)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-22 14:10:04 +02:00
Wayne Lin
d9632f4aae drm/amd/display: Correct the reply value when AUX write incomplete
commit d433981385c62c72080e26f1c00a961d18b233be upstream.

[Why]
Now forcing aux->transfer to return 0 when incomplete AUX write is
inappropriate. It should return bytes have been transferred.

[How]
aux->transfer is asked not to change original msg except reply field of
drm_dp_aux_msg structure. Copy the msg->buffer when it's write request,
and overwrite the first byte when sink reply 1 byte indicating partially
written byte number. Then we can return the correct value without
changing the original msg.

Fixes: 3637e457eb00 ("drm/amd/display: Fix wrong handling for AUX_DEFER case")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Ray Wu <ray.wu@amd.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 7ac37f0dcd2e0b729fa7b5513908dc8ab802b540)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-22 14:10:04 +02:00
Alex Deucher
ced7c789e3 Revert "drm/amd: Stop evicting resources on APUs in suspend"
[ Upstream commit d0ce1aaa8531a4a4707711cab5721374751c51b0 ]

This reverts commit 3a9626c816.

This breaks S4 because we end up setting the s3/s0ix flags
even when we are entering s4 since prepare is used by both
flows.  The causes both the S3/s0ix and s4 flags to be set
which breaks several checks in the driver which assume they
are mutually exclusive.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3634
Cc: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit ce8f7d95899c2869b47ea6ce0b3e5bf304b2fff4)
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-22 14:10:00 +02:00
Mario Limonciello
a2419fa7fe drm/amd: Add Suspend/Hibernate notification callback support
[ Upstream commit 2965e6355dcdf157b5fafa25a2715f00064da8bf ]

As part of the suspend sequence VRAM needs to be evicted on dGPUs.
In order to make suspend/resume more reliable we moved this into
the pmops prepare() callback so that the suspend sequence would fail
but the system could remain operational under high memory usage suspend.

Another class of issues exist though where due to memory fragementation
there isn't a large enough contiguous space and swap isn't accessible.

Add support for a suspend/hibernate notification callback that could
evict VRAM before tasks are frozen. This should allow paging out to swap
if necessary.

Link: https://github.com/ROCm/ROCK-Kernel-Driver/issues/174
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3476
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2362
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3781
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Link: https://lore.kernel.org/r/20241128032656.2090059-2-superm1@kernel.org
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: d0ce1aaa8531 ("Revert "drm/amd: Stop evicting resources on APUs in suspend"")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-22 14:10:00 +02:00
Zhigang Luo
43b8b33b81 drm/amdgpu: trigger flr_work if reading pf2vf data failed
[ Upstream commit ab66c83284 ]

if reading pf2vf data failed 30 times continuously, it means something is
wrong. Need to trigger flr_work to recover the issue.

also use dev_err to print the error message to get which device has
issue and add warning message if waiting IDH_FLR_NOTIFICATION_CMPL
timeout.

Signed-off-by: Zhigang Luo <Zhigang.Luo@amd.com>
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: d0ce1aaa8531 ("Revert "drm/amd: Stop evicting resources on APUs in suspend"")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-22 14:10:00 +02:00
Ma Jun
c3408b49e3 drm/amdgpu: Fix the runtime resume failure issue
[ Upstream commit bbfaf2aea7 ]

Don't set power state flag when system enter runtime suspend,
or it may cause runtime resume failure issue.

Fixes: 3a9626c816 ("drm/amd: Stop evicting resources on APUs in suspend")
Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Stable-dep-of: d0ce1aaa8531 ("Revert "drm/amd: Stop evicting resources on APUs in suspend"")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-22 14:10:00 +02:00
Mario Limonciello
6b9418c825 drm/amd: Stop evicting resources on APUs in suspend
[ Upstream commit 226db36032 ]

commit 5095d54181 ("drm/amd: Evict resources during PM ops prepare()
callback") intentionally moved the eviction of resources to earlier in
the suspend process, but this introduced a subtle change that it occurs
before adev->in_s0ix or adev->in_s3 are set. This meant that APUs
actually started to evict resources at suspend time as well.

Explicitly set s0ix or s3 in the prepare() stage, and unset them if the
prepare() stage failed.

v2: squash in warning fix from Stephen Rothwell

Reported-by: Jürg Billeter <j@bitron.ch>
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3132#note_2271038
Fixes: 5095d54181 ("drm/amd: Evict resources during PM ops prepare() callback")
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: d0ce1aaa8531 ("Revert "drm/amd: Stop evicting resources on APUs in suspend"")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-22 14:10:00 +02:00
Bruce Ashfield
289c3a681f This is the 6.1.139 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmgpfIMACgkQONu9yGCS
 aT6vWA/9GzqIJ9C16diuPmNIkftswKaEEtbrphLvHgYstEplIUhzc6CTgTcyUguG
 tvAMeDXZAyjB6OsjpvRfLhiVUrgT39WQcznbikLKjmOxIvmKw3nUqTWXN9e66JKG
 JkNzhbBUNiDAy7RBps7jmHu38apt09B3ygQouz31x3LmdZNAOziAzxXrLLQyoiQJ
 cYNkcV5Etj2c/DE/6lLZmNohzQzD2szI8UZBJNIT+e5HT0YsZ6dVdTOeTj4mj8qb
 5GMHnWQsoYKA4YDaPPWtzKh+LtFPsRo+dq6r40Efc5M0AWK+yrIcN7LGgwbMxgre
 xdejLZMk40tQDkEbCFBKgV3gpiyEszQ7SDa8DR9J7K7m12T9/4HgyHfNMp2lk1oM
 +/sQf+RDBdaSlQQYEBRbhlvSPhdrECzjs/rfVsv6R3mKvvgBQe5MeixIBeOPXIXC
 oG3U1kbsNssXoZau392j3S0muySIzQTwWtybWYyFI+HW24UViybTHzM1IX+A8My9
 zrPVmOSzPAQa0FDS+llsQcchK4G7UFE+jn5fH8CbJB6y6hsMIlBNBsgeMEknLTJN
 Wv9kd4ZPaxTc6Zx+0WmXACPjY12Wl8GmGu8nhw0GHY8YlbHhV1W8P/CzIn1mlSfl
 hVsbdJ2RX5YEPq+2Hx40Gpzb6lFrWI6qlNO1lVwQ8A/2MNy+RqA=
 =ig8D
 -----END PGP SIGNATURE-----

Merge tag 'v6.1.139' into v6.1/standard/base

This is the 6.1.139 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmgpfIMACgkQONu9yGCS
# aT6vWA/9GzqIJ9C16diuPmNIkftswKaEEtbrphLvHgYstEplIUhzc6CTgTcyUguG
# tvAMeDXZAyjB6OsjpvRfLhiVUrgT39WQcznbikLKjmOxIvmKw3nUqTWXN9e66JKG
# JkNzhbBUNiDAy7RBps7jmHu38apt09B3ygQouz31x3LmdZNAOziAzxXrLLQyoiQJ
# cYNkcV5Etj2c/DE/6lLZmNohzQzD2szI8UZBJNIT+e5HT0YsZ6dVdTOeTj4mj8qb
# 5GMHnWQsoYKA4YDaPPWtzKh+LtFPsRo+dq6r40Efc5M0AWK+yrIcN7LGgwbMxgre
# xdejLZMk40tQDkEbCFBKgV3gpiyEszQ7SDa8DR9J7K7m12T9/4HgyHfNMp2lk1oM
# +/sQf+RDBdaSlQQYEBRbhlvSPhdrECzjs/rfVsv6R3mKvvgBQe5MeixIBeOPXIXC
# oG3U1kbsNssXoZau392j3S0muySIzQTwWtybWYyFI+HW24UViybTHzM1IX+A8My9
# zrPVmOSzPAQa0FDS+llsQcchK4G7UFE+jn5fH8CbJB6y6hsMIlBNBsgeMEknLTJN
# Wv9kd4ZPaxTc6Zx+0WmXACPjY12Wl8GmGu8nhw0GHY8YlbHhV1W8P/CzIn1mlSfl
# hVsbdJ2RX5YEPq+2Hx40Gpzb6lFrWI6qlNO1lVwQ8A/2MNy+RqA=
# =ig8D
# -----END PGP SIGNATURE-----
# gpg: Signature made Sun 18 May 2025 02:21:55 AM EDT
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
2025-05-19 23:15:48 -04:00
Kevin Baker
bd68de433f drm/panel: simple: Update timings for AUO G101EVN010
[ Upstream commit 7c6fa1797a725732981f2d77711c867166737719 ]

Switch to panel timings based on datasheet for the AUO G101EVN01.0
LVDS panel. Default timings were tested on the panel.

Previous mode-based timings resulted in horizontal display shift.

Signed-off-by: Kevin Baker <kevinb@ventureresearch.com>
Fixes: 4fb86404a9 ("drm/panel: simple: Add AUO G101EVN010 panel support")
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250505170256.1385113-1-kevinb@ventureresearch.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250505170256.1385113-1-kevinb@ventureresearch.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-18 08:21:24 +02:00
Alex Deucher
b04cfc229a drm/amdgpu/hdp5.2: use memcfg register to post the write for HDP flush
commit dbc988c689333faeeed44d5561f372ff20395304 upstream.

Reading back the remapped HDP flush register seems to cause
problems on some platforms. All we need is a read, so read back
the memcfg register.

Fixes: f756dbac1ce1 ("drm/amdgpu/hdp5.2: do a posting read when flushing HDP")
Reported-by: Alexey Klimov <alexey.klimov@linaro.org>
Link: https://lists.freedesktop.org/archives/amd-gfx/2025-April/123150.html
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4119
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3908
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 4a89b7698e771914b4d5b571600c76e2fdcbe2a9)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-18 08:21:23 +02:00
Wayne Lin
470f56fc35 drm/amd/display: Copy AUX read reply data whenever length > 0
commit 3924f45d4de7250a603fd7b50379237a6a0e5adf upstream.

[Why]
amdgpu_dm_process_dmub_aux_transfer_sync() should return all exact data
reply from the sink side. Don't do the analysis job in it.

[How]
Remove unnecessary check condition AUX_TRANSACTION_REPLY_AUX_ACK.

Fixes: ead08b95fa ("drm/amd/display: Fix race condition in DPIA AUX transfer")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Ray Wu <ray.wu@amd.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 9b540e3fe6796fec4fb1344f3be8952fc2f084d4)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-18 08:21:23 +02:00
Wayne Lin
9e83c84de3 drm/amd/display: Fix wrong handling for AUX_DEFER case
commit 65924ec69b29296845c7f628112353438e63ea56 upstream.

[Why]
We incorrectly ack all bytes get written when the reply actually is defer.
When it's defer, means sink is not ready for the request. We should
retry the request.

[How]
Only reply all data get written when receive I2C_ACK|AUX_ACK. Otherwise,
reply the number of actual written bytes received from the sink.
Add some messages to facilitate debugging as well.

Fixes: ad6756b4d7 ("drm/amd/display: Shift dc link aux to aux_payload")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Ray Wu <ray.wu@amd.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 3637e457eb0000bc37d8bbbec95964aad2fb29fd)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-18 08:21:23 +02:00
Wayne Lin
2cca631283 drm/amd/display: Remove incorrect checking in dmub aux handler
commit 396dc51b3b7ea524bf8061f478332d0039e96d5d upstream.

[Why & How]
"Request length != reply length" is expected behavior defined in spec.
It's not an invalid reply. Besides, replied data handling logic is not
designed to be written in amdgpu_dm_process_dmub_aux_transfer_sync().
Remove the incorrectly handling section.

Fixes: ead08b95fa ("drm/amd/display: Fix race condition in DPIA AUX transfer")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Ray Wu <ray.wu@amd.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 81b5c6fa62af62fe89ae9576f41aae37830b94cb)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-18 08:21:23 +02:00
Wayne Lin
f3385a056a drm/amd/display: Fix the checking condition in dmub aux handling
commit bc70e11b550d37fbd9eaed0f113ba560894f1609 upstream.

[Why & How]
Fix the checking condition for detecting AUX_RET_ERROR_PROTOCOL_ERROR.
It was wrongly checking by "not equals to"

Reviewed-by: Ray Wu <ray.wu@amd.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 1db6c9e9b62e1a8912f0a281c941099fca678da3)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-18 08:21:23 +02:00
Maíra Canal
5235b56b7e drm/v3d: Add job to pending list if the reset was skipped
commit 35e4079bf1a2570abffce6ababa631afcf8ea0e5 upstream.

When a CL/CSD job times out, we check if the GPU has made any progress
since the last timeout. If so, instead of resetting the hardware, we skip
the reset and let the timer get rearmed. This gives long-running jobs a
chance to complete.

However, when `timedout_job()` is called, the job in question is removed
from the pending list, which means it won't be automatically freed through
`free_job()`. Consequently, when we skip the reset and keep the job
running, the job won't be freed when it finally completes.

This situation leads to a memory leak, as exposed in [1] and [2].

Similarly to commit 704d3d60fe ("drm/etnaviv: don't block scheduler when
GPU is still active"), this patch ensures the job is put back on the
pending list when extending the timeout.

Cc: stable@vger.kernel.org # 6.0
Reported-by: Daivik Bhatia <dtgs1208@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12227 [1]
Closes: https://github.com/raspberrypi/linux/issues/6817 [2]
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Acked-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Link: https://lore.kernel.org/r/20250430210643.57924-1-mcanal@igalia.com
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-18 08:21:23 +02:00
Wayne Lin
30a4efc067 drm/amd/display: Shift DMUB AUX reply command if necessary
commit 5a3846648c0523fd850b7f0aec78c0139453ab8b upstream.

[Why]
Defined value of dmub AUX reply command field get updated but didn't
adjust dm receiving side accordingly.

[How]
Check the received reply command value to see if it's updated version
or not. Adjust it if necessary.

Fixes: ead08b95fa ("drm/amd/display: Fix race condition in DPIA AUX transfer")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Ray Wu <ray.wu@amd.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit d5c9ade755a9afa210840708a12a8f44c0d532f4)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-18 08:21:22 +02:00
Bruce Ashfield
6859883bdc This is the 6.1.138 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmgdse0ACgkQONu9yGCS
 aT5oUxAA0pyBMcYRzOUXp9VjtssDlEGv8V1FHJfUt6faamhMbUPPOjdDcS76Xm3Z
 FtXnXhaMOd7IGEc6HBWK36RNOKemgbSFsSX9V+kCCdlGWjTMGOEoBwHW+YGqN07y
 9q6K9HVUB/g0o8qbr9J8s27o1tCkDuCm9ks+XE2k7a71wMFP/menGtI0jwXbYMRv
 1BWcTaVAI6stCN4IukWwtkP/cGpT4fA1I68ds3s3r8HAreFyBJaAboXSJdthfEGr
 0HzgOm6JWQrrvUCzcOduI5DltZqmOWavRofvGjC+URp2Tpjbi+vgKLlHYxkaEwGd
 Mr2Bx1Fr5rgf9lHn7Sy9fE91OZXc8IOpwrF85zBclXABFLSkZ2lkXDAA3TmgZSrp
 erAZhR6dHfKrjTbJbxAdnhK14Jrfb/aZ4KdlzhQeCzJudtsraFx5px5y42C1s+TT
 rqr8q4xKRoQaGtvG6iaRUXaQuubAAi9b0lPvxyY3s8jFj8Aq4MbHb8xlnADAMQSc
 WWLKVrlWp1AM+nmEVtFQAil+zLd5pGY+rExFkcCYHkxUSJD/UbCD+b4wU4eQtPOz
 nUpzuYuhqXxICAPC7scyHQjn/WBwama+4x4QrJGefQ7onS9UZLxMqFooe5OxlUTW
 zTPHZh8QGVyRoEsiINJWHq52Y9rr4/8Y5eiZF3LEDjjfiLUWqSk=
 =I3EE
 -----END PGP SIGNATURE-----

Merge tag 'v6.1.138' into v6.1/standard/base

This is the 6.1.138 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmgdse0ACgkQONu9yGCS
# aT5oUxAA0pyBMcYRzOUXp9VjtssDlEGv8V1FHJfUt6faamhMbUPPOjdDcS76Xm3Z
# FtXnXhaMOd7IGEc6HBWK36RNOKemgbSFsSX9V+kCCdlGWjTMGOEoBwHW+YGqN07y
# 9q6K9HVUB/g0o8qbr9J8s27o1tCkDuCm9ks+XE2k7a71wMFP/menGtI0jwXbYMRv
# 1BWcTaVAI6stCN4IukWwtkP/cGpT4fA1I68ds3s3r8HAreFyBJaAboXSJdthfEGr
# 0HzgOm6JWQrrvUCzcOduI5DltZqmOWavRofvGjC+URp2Tpjbi+vgKLlHYxkaEwGd
# Mr2Bx1Fr5rgf9lHn7Sy9fE91OZXc8IOpwrF85zBclXABFLSkZ2lkXDAA3TmgZSrp
# erAZhR6dHfKrjTbJbxAdnhK14Jrfb/aZ4KdlzhQeCzJudtsraFx5px5y42C1s+TT
# rqr8q4xKRoQaGtvG6iaRUXaQuubAAi9b0lPvxyY3s8jFj8Aq4MbHb8xlnADAMQSc
# WWLKVrlWp1AM+nmEVtFQAil+zLd5pGY+rExFkcCYHkxUSJD/UbCD+b4wU4eQtPOz
# nUpzuYuhqXxICAPC7scyHQjn/WBwama+4x4QrJGefQ7onS9UZLxMqFooe5OxlUTW
# zTPHZh8QGVyRoEsiINJWHq52Y9rr4/8Y5eiZF3LEDjjfiLUWqSk=
# =I3EE
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 09 May 2025 03:42:37 AM EDT
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
2025-05-12 16:57:10 -04:00
Chris Bainbridge
e25139c4aa drm/amd/display: Fix slab-use-after-free in hdcp
[ Upstream commit be593d9d91c5a3a363d456b9aceb71029aeb3f1d ]

The HDCP code in amdgpu_dm_hdcp.c copies pointers to amdgpu_dm_connector
objects without incrementing the kref reference counts. When using a
USB-C dock, and the dock is unplugged, the corresponding
amdgpu_dm_connector objects are freed, creating dangling pointers in the
HDCP code. When the dock is plugged back, the dangling pointers are
dereferenced, resulting in a slab-use-after-free:

[   66.775837] BUG: KASAN: slab-use-after-free in event_property_validate+0x42f/0x6c0 [amdgpu]
[   66.776171] Read of size 4 at addr ffff888127804120 by task kworker/0:1/10

[   66.776179] CPU: 0 UID: 0 PID: 10 Comm: kworker/0:1 Not tainted 6.14.0-rc7-00180-g54505f727a38-dirty #233
[   66.776183] Hardware name: HP HP Pavilion Aero Laptop 13-be0xxx/8916, BIOS F.17 12/18/2024
[   66.776186] Workqueue: events event_property_validate [amdgpu]
[   66.776494] Call Trace:
[   66.776496]  <TASK>
[   66.776497]  dump_stack_lvl+0x70/0xa0
[   66.776504]  print_report+0x175/0x555
[   66.776507]  ? __virt_addr_valid+0x243/0x450
[   66.776510]  ? kasan_complete_mode_report_info+0x66/0x1c0
[   66.776515]  kasan_report+0xeb/0x1c0
[   66.776518]  ? event_property_validate+0x42f/0x6c0 [amdgpu]
[   66.776819]  ? event_property_validate+0x42f/0x6c0 [amdgpu]
[   66.777121]  __asan_report_load4_noabort+0x14/0x20
[   66.777124]  event_property_validate+0x42f/0x6c0 [amdgpu]
[   66.777342]  ? __lock_acquire+0x6b40/0x6b40
[   66.777347]  ? enable_assr+0x250/0x250 [amdgpu]
[   66.777571]  process_one_work+0x86b/0x1510
[   66.777575]  ? pwq_dec_nr_in_flight+0xcf0/0xcf0
[   66.777578]  ? assign_work+0x16b/0x280
[   66.777580]  ? lock_is_held_type+0xa3/0x130
[   66.777583]  worker_thread+0x5c0/0xfa0
[   66.777587]  ? process_one_work+0x1510/0x1510
[   66.777588]  kthread+0x3a2/0x840
[   66.777591]  ? kthread_is_per_cpu+0xd0/0xd0
[   66.777594]  ? trace_hardirqs_on+0x4f/0x60
[   66.777597]  ? _raw_spin_unlock_irq+0x27/0x60
[   66.777599]  ? calculate_sigpending+0x77/0xa0
[   66.777602]  ? kthread_is_per_cpu+0xd0/0xd0
[   66.777605]  ret_from_fork+0x40/0x90
[   66.777607]  ? kthread_is_per_cpu+0xd0/0xd0
[   66.777609]  ret_from_fork_asm+0x11/0x20
[   66.777614]  </TASK>

[   66.777643] Allocated by task 10:
[   66.777646]  kasan_save_stack+0x39/0x60
[   66.777649]  kasan_save_track+0x14/0x40
[   66.777652]  kasan_save_alloc_info+0x37/0x50
[   66.777655]  __kasan_kmalloc+0xbb/0xc0
[   66.777658]  __kmalloc_cache_noprof+0x1c8/0x4b0
[   66.777661]  dm_dp_add_mst_connector+0xdd/0x5c0 [amdgpu]
[   66.777880]  drm_dp_mst_port_add_connector+0x47e/0x770 [drm_display_helper]
[   66.777892]  drm_dp_send_link_address+0x1554/0x2bf0 [drm_display_helper]
[   66.777901]  drm_dp_check_and_send_link_address+0x187/0x1f0 [drm_display_helper]
[   66.777909]  drm_dp_mst_link_probe_work+0x2b8/0x410 [drm_display_helper]
[   66.777917]  process_one_work+0x86b/0x1510
[   66.777919]  worker_thread+0x5c0/0xfa0
[   66.777922]  kthread+0x3a2/0x840
[   66.777925]  ret_from_fork+0x40/0x90
[   66.777927]  ret_from_fork_asm+0x11/0x20

[   66.777932] Freed by task 1713:
[   66.777935]  kasan_save_stack+0x39/0x60
[   66.777938]  kasan_save_track+0x14/0x40
[   66.777940]  kasan_save_free_info+0x3b/0x60
[   66.777944]  __kasan_slab_free+0x52/0x70
[   66.777946]  kfree+0x13f/0x4b0
[   66.777949]  dm_dp_mst_connector_destroy+0xfa/0x150 [amdgpu]
[   66.778179]  drm_connector_free+0x7d/0xb0
[   66.778184]  drm_mode_object_put.part.0+0xee/0x160
[   66.778188]  drm_mode_object_put+0x37/0x50
[   66.778191]  drm_atomic_state_default_clear+0x220/0xd60
[   66.778194]  __drm_atomic_state_free+0x16e/0x2a0
[   66.778197]  drm_mode_atomic_ioctl+0x15ed/0x2ba0
[   66.778200]  drm_ioctl_kernel+0x17a/0x310
[   66.778203]  drm_ioctl+0x584/0xd10
[   66.778206]  amdgpu_drm_ioctl+0xd2/0x1c0 [amdgpu]
[   66.778375]  __x64_sys_ioctl+0x139/0x1a0
[   66.778378]  x64_sys_call+0xee7/0xfb0
[   66.778381]  do_syscall_64+0x87/0x140
[   66.778385]  entry_SYSCALL_64_after_hwframe+0x4b/0x53

Fix this by properly incrementing and decrementing the reference counts
when making and deleting copies of the amdgpu_dm_connector pointers.

(Mario: rebase on current code and update fixes tag)

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4006
Signed-off-by: Chris Bainbridge <chris.bainbridge@gmail.com>
Fixes: da3fd7ac0b ("drm/amd/display: Update CP property based on HW query")
Reviewed-by: Alex Hung <alex.hung@amd.com>
Link: https://lore.kernel.org/r/20250417215005.37964-1-mario.limonciello@amd.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit d4673f3c3b3dcb74e36e53cdfc880baa7a87b330)
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-09 09:41:46 +02:00
Mario Limonciello
942ecb9e8f drm/amd/display: Add scoped mutexes for amdgpu_dm_dhcp
[ Upstream commit 6b675ab8efbf2bcee25be29e865455c56e246401 ]

[Why]
Guards automatically release mutex when it goes out of scope making
code easier to follow.

[How]
Replace all use of mutex_lock()/mutex_unlock() with guard(mutex).

Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: be593d9d91c5 ("drm/amd/display: Fix slab-use-after-free in hdcp")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-09 09:41:46 +02:00
Bhawanpreet Lakha
e07ed98515 drm/amd/display: Change HDCP update sequence for DM
[ Upstream commit 393e834848 ]

Refactor the sequence in hdcp_update_display() to use
mod_hdcp_update_display().

Previous sequence:
	- remove()->add()

This Sequence was used to update the display, (mod_hdcp_update_display
didn't exist at the time). This meant for any hdcp updates (type changes,
enable/disable) we would remove, reconstruct, and add. This leads to
unnecessary calls to psp eventually

New Sequence using mod_hdcp_update_display():
	- add() once when stream is enabled
	- use update() for all updates

The update function checks for prev == new states and will not
unnecessarily end up calling psp via add/remove.

Reviewed-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: be593d9d91c5 ("drm/amd/display: Fix slab-use-after-free in hdcp")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-09 09:41:46 +02:00
Srinivasan Shanmugam
e56b7400e9 drm/amd/display: Clean up style problems in amdgpu_dm_hdcp.c
[ Upstream commit a19de9dbb4 ]

Conform to Linux kernel coding style.

And promote sysfs entry for set/get srm to kdoc.

Suggested-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: be593d9d91c5 ("drm/amd/display: Fix slab-use-after-free in hdcp")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-09 09:41:45 +02:00
hersen wu
8a86bb891b drm/amd/display: phase2 enable mst hdcp multiple displays
[ Upstream commit aa9fdd5d5a ]

[why]
For MST topology with 1 physical link and multiple connectors (>=2),
e.g. daisy cahined MST + SST, or 1-to-multi MST hub, if userspace
set to enable the HDCP simultaneously on all connected outputs, the
commit tail iteratively call the hdcp_update_display() for each
display (connector). However, the hdcp workqueue data structure for
each link has only one DM connector and encryption status members,
which means the work queue of property_validate/update() would only
be triggered for the last connector within this physical link, and
therefore the HDCP property value of other connectors would stay on
DESIRED instead of switching to ENABLED, which is NOT as expected.

[how]
Use array of AMDGPU_DM_MAX_DISPLAY_INDEX for both aconnector and
encryption status in hdcp workqueue data structure for each physical
link. For property validate/update work queue, we iterates over the
array and do similar operation/check for each connected display.

Tested-by: Daniel Wheeler <Daniel.Wheeler@amd.com>
Signed-off-by: hersen wu <hersenxs.wu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: be593d9d91c5 ("drm/amd/display: Fix slab-use-after-free in hdcp")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-09 09:41:45 +02:00
Christian Hewitt
36d4ce271b Revert "drm/meson: vclk: fix calculation of 59.94 fractional rates"
[ Upstream commit f37bb5486ea536c1d61df89feeaeff3f84f0b560 ]

This reverts commit bfbc68e.

The patch does permit the offending YUV420 @ 59.94 phy_freq and
vclk_freq mode to match in calculations. It also results in all
fractional rates being unavailable for use. This was unintended
and requires the patch to be reverted.

Fixes: bfbc68e4d8 ("drm/meson: vclk: fix calculation of 59.94 fractional rates")
Cc: stable@vger.kernel.org
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250421201300.778955-2-martin.blumenstingl@googlemail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250421201300.778955-2-martin.blumenstingl@googlemail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-09 09:41:45 +02:00
Philipp Stanner
47ca11836c drm/nouveau: Fix WARN_ON in nouveau_fence_context_kill()
commit bbe5679f30d7690a9b6838a583b9690ea73fe0e9 upstream.

Nouveau is mostly designed in a way that it's expected that fences only
ever get signaled through nouveau_fence_signal(). However, in at least
one other place, nouveau_fence_done(), can signal fences, too. If that
happens (race) a signaled fence remains in the pending list for a while,
until it gets removed by nouveau_fence_update().

Should nouveau_fence_context_kill() run in the meantime, this would be
a bug because the function would attempt to set an error code on an
already signaled fence.

Have nouveau_fence_context_kill() check for a fence being signaled.

Cc: stable@vger.kernel.org # v5.10+
Fixes: ea13e5abf8 ("drm/nouveau: signal pending fences when channel has been killed")
Suggested-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250415121900.55719-3-phasta@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-09 09:41:34 +02:00
Bruce Ashfield
ad0735b373 This is the 6.1.136 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmgUXOIACgkQONu9yGCS
 aT4S5Q/+PSzuOyoNc1BNUJq+KbcyEY69xhYEMoq+iKE0oWLpHULcDG6u5ZZ0wzIe
 B9cwvl7HBxji3qwdyVmrE/f6mOtl0NkEAyZCKF7dPFNLcbWfiTliN0OxE2f3muwV
 0PvsdfdRF49XjyfHyoHrc7yctfQkYUAATlMQNoruyywgKwE5lqIxcTwvhkyL8Rt2
 wu4ZSR0il/GG7iYxnusGBP8hX3ovmviTgpxEcIsL5pnG6+PCuOdVP9tYYxXCvQHk
 SS6QhV3XKmldDS9uVQh1US6JZI9XWx28Ejww4+58RiMWZSBKsVtvEGUro2oCuSzF
 w+KYRI44aFBpjovASER5XkSEwGGgunT9dITRcLVvXT7YUMJ65C+LWRdh5R3hn+pj
 +ktKVgNjQ0oa9eyfH+2v5i+QBpTER/R658sdyUdrQh0lykculbFBKnpVS9r4k7KT
 9TRcBleXM4mJY2mNFPaRO1vESb/WXnArimWRg/hni4geQbkPWRjl2XOQ59DRgNgQ
 RXuglff/d3mXbez6dlKyOz3SY6GOeEMA3FvXkjmGBfldVyTrPw/HlgXYbRxHxejJ
 586gC7WoQrDAioTn9YHho8YMgZFL7Cf++oz6rEk22vOaJONDz4DY30FI5J9lMmrL
 F3HwZ/gVm84GkyCTX0lOYPalWNlYvBBoQ+goTdH5Wy8k0z2kU5M=
 =Hq+U
 -----END PGP SIGNATURE-----

Merge tag 'v6.1.136' into v6.1/standard/base

This is the 6.1.136 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmgUXOIACgkQONu9yGCS
# aT4S5Q/+PSzuOyoNc1BNUJq+KbcyEY69xhYEMoq+iKE0oWLpHULcDG6u5ZZ0wzIe
# B9cwvl7HBxji3qwdyVmrE/f6mOtl0NkEAyZCKF7dPFNLcbWfiTliN0OxE2f3muwV
# 0PvsdfdRF49XjyfHyoHrc7yctfQkYUAATlMQNoruyywgKwE5lqIxcTwvhkyL8Rt2
# wu4ZSR0il/GG7iYxnusGBP8hX3ovmviTgpxEcIsL5pnG6+PCuOdVP9tYYxXCvQHk
# SS6QhV3XKmldDS9uVQh1US6JZI9XWx28Ejww4+58RiMWZSBKsVtvEGUro2oCuSzF
# w+KYRI44aFBpjovASER5XkSEwGGgunT9dITRcLVvXT7YUMJ65C+LWRdh5R3hn+pj
# +ktKVgNjQ0oa9eyfH+2v5i+QBpTER/R658sdyUdrQh0lykculbFBKnpVS9r4k7KT
# 9TRcBleXM4mJY2mNFPaRO1vESb/WXnArimWRg/hni4geQbkPWRjl2XOQ59DRgNgQ
# RXuglff/d3mXbez6dlKyOz3SY6GOeEMA3FvXkjmGBfldVyTrPw/HlgXYbRxHxejJ
# 586gC7WoQrDAioTn9YHho8YMgZFL7Cf++oz6rEk22vOaJONDz4DY30FI5J9lMmrL
# F3HwZ/gVm84GkyCTX0lOYPalWNlYvBBoQ+goTdH5Wy8k0z2kU5M=
# =Hq+U
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 02 May 2025 01:49:22 AM EDT
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
2025-05-06 11:14:05 -04:00
Roman Li
128d261c72 drm/amd/display: Force full update in gpu reset
commit 67fe574651c73fe5cc176e35f28f2ec1ba498d14 upstream.

[Why]
While system undergoing gpu reset always do full update
to sync the dc state before and after reset.

[How]
Return true in should_reset_plane() if gpu reset detected

Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Roman Li <Roman.Li@amd.com>
Signed-off-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Tested-by: Mark Broadworth <mark.broadworth@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 2ba8619b9a378ad218ad6c2e2ccaee8f531e08de)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-02 07:46:56 +02:00
Roman Li
a4be735fe0 drm/amd/display: Fix gpu reset in multidisplay config
commit 7eb287beeb60be1e4437be2b4e4e9f0da89aab97 upstream.

[Why]
The indexing of stream_status in dm_gpureset_commit_state() is incorrect.
That leads to asserts in multi-display configuration after gpu reset.

[How]
Adjust the indexing logic to align stream_status with surface_updates.

Fixes: cdaae8371a ("drm/amd/display: Handle GPU reset for DC block")
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3808
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Roman Li <Roman.Li@amd.com>
Signed-off-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Tested-by: Mark Broadworth <mark.broadworth@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit d91bc901398741d317d9b55c59ca949d4bc7394b)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-02 07:46:56 +02:00
Bruce Ashfield
ee3c71357c This is the 6.1.135 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmgLS1sACgkQONu9yGCS
 aT64dRAAuNws/uf11y3lncjb9gzPE0MZOuTnCrcuqxiSFYatngH3lqFhtqW6o3n/
 4izvRlH245yQsRitFZBiu06I1XiluTc7vPxCLQJuI3pa4W2DpGLv7FilFhmRVrrS
 7ehjlLD5JcHudmscV2LK7Gru1ClQwRH2eBOndNA2bVijWCXPM9ohE88ovPeogmVh
 oOnwkPWcsrsVRocTdu4SrjCGL9UZTv7QDPurEC81LHLtoIB8vK11QYsW4zf9rhDa
 TpSOGtkSSFSpuT/ZXhYesBdDwYibeC+drb2WszSPaSpFAXDuWddnOFVbSCe/im2e
 f/MhPDBfZ+c871sHWGUGCJA3otNOapO7STGD3G0dsKbS2stxmFU+HBnmY5v3WKEC
 lRwnE2OVZ6FrQ3q/aziYfyv1W6MdY2hZSUaHb77YiYUwEDDJjGYviHNtJCFP4VbD
 +wnTjI9WTH6LMM44h/XpAYDnMMPC5uou77GLir3l5hSYpjj5LrkphX+VYsobs6rB
 ShXUAux4go/+SQKETerw7M7mhnso7ghKZ7Clr87aginYYuZLTnAzwRi+1ZUbHqSd
 AjLIcXCR52qM9qE7PO4r1RkCqrgsPX1pgxZOyvfRoe/aA3iyvF1LaZS7nGKMu9g5
 5T/nnDY+BDdVmK9peXunL/2Qtafl9kwKVJ1AT+NAwTwLYR0L4AM=
 =kLlg
 -----END PGP SIGNATURE-----

Merge tag 'v6.1.135' into v6.1/standard/base

This is the 6.1.135 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmgLS1sACgkQONu9yGCS
# aT64dRAAuNws/uf11y3lncjb9gzPE0MZOuTnCrcuqxiSFYatngH3lqFhtqW6o3n/
# 4izvRlH245yQsRitFZBiu06I1XiluTc7vPxCLQJuI3pa4W2DpGLv7FilFhmRVrrS
# 7ehjlLD5JcHudmscV2LK7Gru1ClQwRH2eBOndNA2bVijWCXPM9ohE88ovPeogmVh
# oOnwkPWcsrsVRocTdu4SrjCGL9UZTv7QDPurEC81LHLtoIB8vK11QYsW4zf9rhDa
# TpSOGtkSSFSpuT/ZXhYesBdDwYibeC+drb2WszSPaSpFAXDuWddnOFVbSCe/im2e
# f/MhPDBfZ+c871sHWGUGCJA3otNOapO7STGD3G0dsKbS2stxmFU+HBnmY5v3WKEC
# lRwnE2OVZ6FrQ3q/aziYfyv1W6MdY2hZSUaHb77YiYUwEDDJjGYviHNtJCFP4VbD
# +wnTjI9WTH6LMM44h/XpAYDnMMPC5uou77GLir3l5hSYpjj5LrkphX+VYsobs6rB
# ShXUAux4go/+SQKETerw7M7mhnso7ghKZ7Clr87aginYYuZLTnAzwRi+1ZUbHqSd
# AjLIcXCR52qM9qE7PO4r1RkCqrgsPX1pgxZOyvfRoe/aA3iyvF1LaZS7nGKMu9g5
# 5T/nnDY+BDdVmK9peXunL/2Qtafl9kwKVJ1AT+NAwTwLYR0L4AM=
# =kLlg
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 25 Apr 2025 04:44:11 AM EDT
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
2025-05-01 22:49:06 -04:00
Hersen Wu
13080d052c drm/amd/display: Stop amdgpu_dm initialize when link nums greater than max_links
commit cf8b16857d upstream.

[Why]
Coverity report OVERRUN warning. There are
only max_links elements within dc->links. link
count could up to AMDGPU_DM_MAX_DISPLAY_INDEX 31.

[How]
Make sure link count less than max_links.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Hersen Wu <hersenxs.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
[Minor conflict resolved due to code context change. And the macro MAX_LINKS
 is introduced by Commit 60df562814 ("drm/amd/display: handle invalid
 connector indices") after 6.10. So here we still use the original array
 length MAX_PIPES * 2]
Signed-off-by: Jianqi Ren <jianqi.ren.cn@windriver.com>
Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-04-25 10:44:02 +02:00
Jani Nikula
b8acdc413f drm/i915/gvt: fix unterminated-string-initialization warning
commit 2e43ae7dd71cd9bb0d1bce1d3306bf77523feb81 upstream.

Initializing const char opregion_signature[16] = OPREGION_SIGNATURE
(which is "IntelGraphicsMem") drops the NUL termination of the
string. This is intentional, but the compiler doesn't know this.

Switch to initializing header->signature directly from the string
litaral, with sizeof destination rather than source. We don't treat the
signature as a string other than for initialization; it's really just a
blob of binary data.

Add a static assert for good measure to cross-check the sizes.

Reported-by: Kees Cook <kees@kernel.org>
Closes: https://lore.kernel.org/r/20250310222355.work.417-kees@kernel.org
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13934
Tested-by: Nicolas Chauvet <kwizart@gmail.com>
Tested-by: Damian Tometzki <damian@riscv-rocks.de>
Cc: stable@vger.kernel.org
Reviewed-by: Zhenyu Wang <zhenyuw.linux@gmail.com>
Link: https://lore.kernel.org/r/20250327124739.2609656-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
(cherry picked from commit 4f8207469094bd04aad952258ceb9ff4c77b6bfa)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-04-25 10:43:58 +02:00