From: Ivan Lipski <[email protected]>

[ Upstream commit d18ecfee5187e3b2dbff7e67dda8b2f54ff5231c ]

[Why&How]
If we don't do that we make DSC decisions based on random
inputs, which might result in disallowing DSC when the
monitor and HW support it.

Reviewed-by: Harry Wentland <[email protected]>
Signed-off-by: Ivan Lipski <[email protected]>
Signed-off-by: Harry Wentland <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---

LLM Generated explanations, may be completely bogus:

The background searches finished and matched the earlier analysis:

- **Fix not in this tree:** `git log` for `Initialize dsc_caps` /
  `dsc_caps = {0}` returned nothing — the patch isn’t in v6.18.44 yet,
  but the bug is still there (`struct dsc_dec_dpcd_caps dsc_caps;` at
  line 7168).
- **b4 dig:** No result, since the commit isn’t present locally to look
  up.

**Verdict stands: YES** for backport to this 6.18.y tree — one-line
zero-init fix for uninitialized DSC caps used during mode setup on
AMDGPU.

 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 4f53297786623..8445b13549c17 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -7165,7 +7165,7 @@ create_stream_for_sink(struct drm_connector *connector,
        int preferred_refresh = 0;
        enum color_transfer_func tf = TRANSFER_FUNC_UNKNOWN;
 #if defined(CONFIG_DRM_AMD_DC_FP)
-       struct dsc_dec_dpcd_caps dsc_caps;
+       struct dsc_dec_dpcd_caps dsc_caps = {0};
 #endif
        struct dc_link *link = NULL;
        struct dc_sink *sink = NULL;
-- 
2.53.0

Reply via email to