[PATCH] drm/amd/display: introduce quirks for i2c adaptor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2018-04-17 02:57 AM, Shirish S wrote:
> The dp aux channel cannot read messages of size greater
> than 16 bytes, this patch adds quirks feild accordingly
> at the initialization of the adaptor.

Is this in response to a bug?

I don't see any other DRM driver using quirks like this, even though they also wouldn't be able to transfer more than 16 bytes when using i2c-over-aux. This makes me wonder why we need it.

Harry

> 
> Signed-off-by: Shirish S <shirish.s at amd.com>
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> 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 782491e..f7d6d9a 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
> @@ -464,10 +464,15 @@ static const struct drm_dp_mst_topology_cbs dm_mst_cbs = {
>  	.register_connector = dm_dp_mst_register_connector
>  };
>  
> +/* I2C adapter quirks, max read len is 16 bytes. */
> +static const struct i2c_adapter_quirks dm_dp_aux_quirks = {
> +	.max_read_len = 128,
> +};
>  void amdgpu_dm_initialize_dp_connector(struct amdgpu_display_manager *dm,
>  				       struct amdgpu_dm_connector *aconnector)
>  {
>  	aconnector->dm_dp_aux.aux.name = "dmdc";
> +	aconnector->dm_dp_aux.aux.ddc.quirks = &dm_dp_aux_quirks;
>  	aconnector->dm_dp_aux.aux.dev = dm->adev->dev;
>  	aconnector->dm_dp_aux.aux.transfer = dm_dp_aux_transfer;
>  	aconnector->dm_dp_aux.ddc_service = aconnector->dc_link->ddc;
> 


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux