[PATCH 01/20] drm/amd/display: Determine DRM connector type more accurately

Harry Wentland harry.wentland at amd.com
Wed Aug 6 18:13:59 UTC 2025



On 2025-08-06 13:45, Timur Kristóf wrote:
> 
> Harry Wentland <harry.wentland at amd.com <mailto:harry.wentland at amd.com>> ezt írta (időpont: 2025. aug. 6., Sze 16:56):
> 
>     On 2025-07-23 11:57, Timur Kristóf wrote:
>     > Previously, DC determined the DRM connector type based on the
>     > signal type, which becomes problematic when a connector may
>     > support different signal types, such as DVI-I.
>     >
>     > With this patch, it is now determined according to the actual
>     > connector type in DC, meaning it can now distinguish between
>     > DVI-D and DVI-I connectors.
>     >
>     > A subsequent commit will enable polling for these connectors.
>     >
> 
>     Hi Timur,
> 
>     this patch regresses the kms_bw IGT test with Navi 31 and 48
>     with a single 4k60 DP display connected. These subtests fail
>     when they should pass:
> 
>     linear-tiling-2-displays-1920x1080p
>     linear-tiling-2-displays-2160x1440p
>     linear-tiling-2-displays-2560x1440p
>     linear-tiling-2-displays-3840x2160p
>     linear-tiling-3-displays-1920x1080p
>     linear-tiling-3-displays-2160x1440p
>     linear-tiling-3-displays-2560x1440p
>     linear-tiling-3-displays-3840x2160p
>     linear-tiling-4-displays-1920x1080p
>     linear-tiling-4-displays-2160x1440p
>     linear-tiling-4-displays-2560x1440p
>     linear-tiling-4-displays-3840x2160p
> 
>     We confirmed with a revert of this patch.
> 
>     Harry
> 
> 
> Hi Harry,
> 
> Also, can you please help me figure out how do I reproduce this on my own?
> 

- Build IGT using the guide at https://gitlab.freedesktop.org/drm/igt-gpu-tools
  (it's really just meson and ninja)
- Switch to a free VT (e.g., Ctrl+Alt+F3)
- log in as root
- run the test tests/kms_bw
  (optionally use --list-subtests to list subtests, and
   --run-subtest <subtestname> to run a subtest)

> At the moment I don't see what is there that would make a difference to Navi 31 or 48.
> 

Not sure either. But that's why we have these tests because
they often catch things that aren't obvious.

Harry

> Thanks,
> Timur
> 
> 
> 
>     > Signed-off-by: Timur Kristóf <timur.kristof at gmail.com <mailto:timur.kristof at gmail.com>>
>     > ---
>     >  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 28 +++++++++++--------
>     >  1 file changed, 16 insertions(+), 12 deletions(-)
>     >
>     > 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 096b23ad4845..c347b232ae06 100644
>     > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>     > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>     > @@ -8038,24 +8038,26 @@ static int dm_update_mst_vcpi_slots_for_dsc(struct drm_atomic_state *state,
>     >       return 0;
>     >  }
>>     > -static int to_drm_connector_type(enum signal_type st)
>     > +static int to_drm_connector_type(uint32_t connector_id)
>     >  {
>     > -     switch (st) {
>     > -     case SIGNAL_TYPE_HDMI_TYPE_A:
>     > +     switch (connector_id) {
>     > +     case CONNECTOR_ID_HDMI_TYPE_A:
>     >               return DRM_MODE_CONNECTOR_HDMIA;
>     > -     case SIGNAL_TYPE_EDP:
>     > +     case CONNECTOR_ID_EDP:
>     >               return DRM_MODE_CONNECTOR_eDP;
>     > -     case SIGNAL_TYPE_LVDS:
>     > +     case CONNECTOR_ID_LVDS:
>     >               return DRM_MODE_CONNECTOR_LVDS;
>     > -     case SIGNAL_TYPE_RGB:
>     > +     case CONNECTOR_ID_VGA:
>     >               return DRM_MODE_CONNECTOR_VGA;
>     > -     case SIGNAL_TYPE_DISPLAY_PORT:
>     > -     case SIGNAL_TYPE_DISPLAY_PORT_MST:
>     > +     case CONNECTOR_ID_DISPLAY_PORT:
>     >               return DRM_MODE_CONNECTOR_DisplayPort;
>     > -     case SIGNAL_TYPE_DVI_DUAL_LINK:
>     > -     case SIGNAL_TYPE_DVI_SINGLE_LINK:
>     > +     case CONNECTOR_ID_SINGLE_LINK_DVID:
>     > +     case CONNECTOR_ID_DUAL_LINK_DVID:
>     >               return DRM_MODE_CONNECTOR_DVID;
>     > -     case SIGNAL_TYPE_VIRTUAL:
>     > +     case CONNECTOR_ID_SINGLE_LINK_DVII:
>     > +     case CONNECTOR_ID_DUAL_LINK_DVII:
>     > +             return DRM_MODE_CONNECTOR_DVII;
>     > +     case CONNECTOR_ID_VIRTUAL:
>     >               return DRM_MODE_CONNECTOR_VIRTUAL;
>>     >       default:
>     > @@ -8440,6 +8442,8 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
>     >                       link->link_enc->features.dp_ycbcr420_supported ? true : false;
>     >               break;
>     >       case DRM_MODE_CONNECTOR_DVID:
>     > +     case DRM_MODE_CONNECTOR_DVII:
>     > +     case DRM_MODE_CONNECTOR_VGA:
>     >               aconnector->base.polled = DRM_CONNECTOR_POLL_HPD;
>     >               break;
>     >       default:
>     > @@ -8631,7 +8635,7 @@ static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm,
>     >               goto out_free;
>     >       }
>>     > -     connector_type = to_drm_connector_type(link->connector_signal);
>     > +     connector_type = to_drm_connector_type(link->link_id.id <http://link_id.id>);
>>     >       res = drm_connector_init_with_ddc(
>     >                       dm->ddev,
> 



More information about the amd-gfx mailing list