public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kevin@holm.dev
To: "Linux regressions mailing list" <regressions@lists.linux.dev>,
	"Christian Heusel" <christian@heusel.eu>
Cc: "Greg KH" <gregkh@linuxfoundation.org>,
	"Lin, Wayne" <Wayne.Lin@amd.com>,
	stable@vger.kernel.org, "LKML" <linux-kernel@vger.kernel.org>,
	"ML dri-devel" <dri-devel@lists.freedesktop.org>,
	amd-gfx@lists.freedesktop.org, "Wu, Hersen" <hersenxs.wu@amd.com>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>
Subject: Re: [REGRESSION] No image on 4k display port displays connected through usb-c dock in kernel 6.10
Date: Mon, 29 Jul 2024 13:21:40 +0000	[thread overview]
Message-ID: <7bf26283474fbb6ea915f93f4db0bc614a627617@holm.dev> (raw)
In-Reply-To: <ca007d54-c204-4f7f-9eca-5a282324b941@leemhuis.info>

July 29, 2024 at 11:15 AM, "Linux regression tracking (Thorsten Leemhuis)" <regressions@leemhuis.info> wrote:



> 
> On 29.07.24 10:47, Christian Heusel wrote:
> 
> > 
> > On 24/07/29 10:35AM, Linux regression tracking (Thorsten Leemhuis) wrote:
> > 
> > > 
> > > [+Greg +stable]
> > > 
> > >  On 29.07.24 10:16, Lin, Wayne wrote:
> > > 
> > 
> >  Thanks for the report.
> > 
> >  Patch fa57924c76d995 ("drm/amd/display: Refactor function dm_dp_mst_is_port_support_mode()")
> > 
> >  is kind of correcting problems causing by commit:
> > 
> >  4df96ba6676034 ("drm/amd/display: Add timing pixel encoding for mst mode validation")
> > 
> >  Sorry if it misses fixes tag and would suggest to backport to fix it. Thanks!
> > 
> > > 
> > > Greg, seem it would be wise to pick up fa57924c76d995 for 6.10.y as
> > > 
> > >  well, despite a lack of Fixes or stable tags.
> > > 
> > >  Ciao, Thorsten
> > > 
> > 
> >  
> > 
> >  The issue is that the fixing commit does not apply to the 6.10 series
> > 
> >  without conflict and the offending commit does not revert cleanly
> > 
> >  aswell.
> > 
> 
> Hah, many thx, I should have checked that.
> 
> Lin, Wayne: could you maybe help out here and provide something for 6.10.y?
> 
> Ciao, Thorsten
>

I reverted 4df96ba6676034 from v6.10.2 from the stable/linux git, resolving the conflict by removing everything that git marked as from the current branch and kept everything marked as from before the branch to merge. That resulted in a patch that is fixing the problem on my machine. Since I don't understand what the code is actually doing it might break things on other machines.

From cd1674a469cede83f6b0907f320b6af08c3c8950 Mon Sep 17 00:00:00 2001
From: Kevin Holm <kevin@holm.dev>
Date: Mon, 29 Jul 2024 13:24:38 +0200
Subject: [PATCH] Test patch

---
 .../display/amdgpu_dm/amdgpu_dm_mst_types.c   | 33 +++----------------
 1 file changed, 5 insertions(+), 28 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
index a5e1a93ddaea..5c555a37e367 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -1599,7 +1599,7 @@ enum dc_status dm_dp_mst_is_port_support_mode(
     struct amdgpu_dm_connector *aconnector,
     struct dc_stream_state *stream)
 {
-    int pbn, branch_max_throughput_mps = 0;
+    int bpp, pbn, branch_max_throughput_mps = 0;
     struct dc_link_settings cur_link_settings;
     unsigned int end_to_end_bw_in_kbps = 0;
     unsigned int upper_link_bw_in_kbps = 0, down_link_bw_in_kbps = 0;
@@ -1649,34 +1649,11 @@ enum dc_status dm_dp_mst_is_port_support_mode(
             }
         }
     } else {
-        /* Check if mode could be supported within max slot
-         * number of current mst link and full_pbn of mst links.
-         */
-        int pbn_div, slot_num, max_slot_num;
-        enum dc_link_encoding_format link_encoding;
-        uint32_t stream_kbps =
-            dc_bandwidth_in_kbps_from_timing(&stream->timing,
-                dc_link_get_highest_encoding_format(stream->link));
-
-        pbn = kbps_to_peak_pbn(stream_kbps);
-        pbn_div = dm_mst_get_pbn_divider(stream->link);
-        slot_num = DIV_ROUND_UP(pbn, pbn_div);
-
-        link_encoding = dc_link_get_highest_encoding_format(stream->link);
-        if (link_encoding == DC_LINK_ENCODING_DP_8b_10b)
-            max_slot_num = 63;
-        else if (link_encoding == DC_LINK_ENCODING_DP_128b_132b)
-            max_slot_num = 64;
-        else {
-            DRM_DEBUG_DRIVER("Invalid link encoding format\n");
+        /* check if mode could be supported within full_pbn */
+        bpp = convert_dc_color_depth_into_bpc(stream->timing.display_color_depth) * 3;
+        pbn = drm_dp_calc_pbn_mode(stream->timing.pix_clk_100hz / 10, bpp << 4);
+        if (pbn > aconnector->mst_output_port->full_pbn)
             return DC_FAIL_BANDWIDTH_VALIDATE;
-        }
-
-        if (slot_num > max_slot_num ||
-            pbn > aconnector->mst_output_port->full_pbn) {
-            DRM_DEBUG_DRIVER("Mode can not be supported within mst links!");
-            return DC_FAIL_BANDWIDTH_VALIDATE;
-        }
     }
 
     /* check is mst dsc output bandwidth branch_overall_throughput_0_mps */
-- 
2.45.2


Regards,
Kevin

  reply	other threads:[~2024-07-29 13:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <d74a7768e957e6ce88c27a5bece0c64dff132e24@holm.dev>
2024-07-27 16:28 ` [REGRESSION] No image on 4k display port displays connected through usb-c dock in kernel 6.10 Linux regression tracking (Thorsten Leemhuis)
2024-07-27 16:42   ` kevin
2024-07-29  8:16     ` Lin, Wayne
2024-07-29  8:35       ` Linux regression tracking (Thorsten Leemhuis)
2024-07-29  8:47         ` Christian Heusel
2024-07-29  9:15           ` Linux regression tracking (Thorsten Leemhuis)
2024-07-29 13:21             ` kevin [this message]
2024-07-30  6:05               ` Lin, Wayne
2024-07-30  5:56     ` Lin, Wayne
2024-07-30  6:20       ` Greg KH
2024-07-30  9:09         ` Lin, Wayne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7bf26283474fbb6ea915f93f4db0bc614a627617@holm.dev \
    --to=kevin@holm.dev \
    --cc=Alexander.Deucher@amd.com \
    --cc=Wayne.Lin@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian@heusel.eu \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hersenxs.wu@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=regressions@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox