[PATCH 2/2] drm/amdgpu/display: give aux i2c buses more meaningful names
Harry Wentland
hwentlan at amd.com
Thu Apr 16 20:33:53 UTC 2020
On 2020-04-16 3:43 p.m., Alex Deucher wrote:
> Mirror what we do for i2c display buses.
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
Series is
Reviewed-by: Harry Wentland <harry.wentland at amd.com>
Harry
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++-
> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 7 +++++--
> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.h | 3 ++-
> 3 files changed, 9 insertions(+), 4 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 fc81788f24b4..4a85076c36ab 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -4679,6 +4679,7 @@ static void amdgpu_dm_connector_destroy(struct drm_connector *connector)
> i2c_del_adapter(&aconnector->i2c->base);
> kfree(aconnector->i2c);
> }
> + kfree(aconnector->dm_dp_aux.aux.name);
>
> kfree(connector);
> }
> @@ -6119,7 +6120,7 @@ static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm,
>
> if (connector_type == DRM_MODE_CONNECTOR_DisplayPort
> || connector_type == DRM_MODE_CONNECTOR_eDP)
> - amdgpu_dm_initialize_dp_connector(dm, aconnector);
> + amdgpu_dm_initialize_dp_connector(dm, aconnector, link->link_index);
>
> out_free:
> if (res) {
> 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 7d28b0482127..69056660672d 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
> @@ -429,9 +429,12 @@ static const struct drm_dp_mst_topology_cbs dm_mst_cbs = {
> };
>
> void amdgpu_dm_initialize_dp_connector(struct amdgpu_display_manager *dm,
> - struct amdgpu_dm_connector *aconnector)
> + struct amdgpu_dm_connector *aconnector,
> + int link_index)
> {
> - aconnector->dm_dp_aux.aux.name = "dmdc";
> + aconnector->dm_dp_aux.aux.name =
> + kasprintf(GFP_KERNEL, "AMDGPU DM aux hw bus %d",
> + link_index);
> aconnector->dm_dp_aux.aux.transfer = dm_dp_aux_transfer;
> aconnector->dm_dp_aux.ddc_service = aconnector->dc_link->ddc;
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.h
> index d6813ce67bbd..d2c56579a2cc 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.h
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.h
> @@ -32,7 +32,8 @@ struct amdgpu_dm_connector;
> int dm_mst_get_pbn_divider(struct dc_link *link);
>
> void amdgpu_dm_initialize_dp_connector(struct amdgpu_display_manager *dm,
> - struct amdgpu_dm_connector *aconnector);
> + struct amdgpu_dm_connector *aconnector,
> + int link_index);
>
> #if defined(CONFIG_DRM_AMD_DC_DCN)
> bool compute_mst_dsc_configs_for_state(struct drm_atomic_state *state,
>
More information about the amd-gfx
mailing list