[PATCH 5/5] drm/bridge: mhdp8564: Support format negotiation

Tomi Valkeinen tomi.valkeinen at ti.com
Mon Nov 2 07:25:19 UTC 2020


On 30/10/2020 00:39, Laurent Pinchart wrote:
> Hi Nikhil,
> 
> Thank you for the patch.
> 
> On Fri, Oct 16, 2020 at 04:09:17PM +0530, Nikhil Devshatwar wrote:
>> With new connector model, mhdp bridge will not create the connector and
>> SoC driver will rely on format negotiation to setup the encoder format.
>>
>> Support format negotiations hooks in the drm_bridge_funcs.
>> Support a single format for input.
>>
>> Signed-off-by: Nikhil Devshatwar <nikhil.nd at ti.com>
>> ---
>>  .../drm/bridge/cadence/cdns-mhdp8546-core.c   | 29 +++++++++++++++++++
>>  1 file changed, 29 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
>> index d0c65610ebb5..230f6e28f82f 100644
>> --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
>> +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
>> @@ -2078,6 +2078,34 @@ cdns_mhdp_bridge_atomic_reset(struct drm_bridge *bridge)
>>  	return &cdns_mhdp_state->base;
>>  }
>>  
>> +static u32 *cdns_mhdp_get_input_bus_fmts(struct drm_bridge *bridge,
>> +				      struct drm_bridge_state *bridge_state,
>> +				      struct drm_crtc_state *crtc_state,
>> +				      struct drm_connector_state *conn_state,
>> +				      u32 output_fmt,
>> +				      unsigned int *num_input_fmts)
>> +{
>> +	u32 *input_fmts;
>> +	u32 default_bus_format = MEDIA_BUS_FMT_RGB121212_1X36;
> 
> Display port supports quite a few different formats. See my reply to
> 4/5, except it's worse in the DP case :-) Especially given that multiple
> displays need to be taken into account. I'm afraid we need to decide how
> to map media bus formats to different DP use cases, possibly adding new
> bus formats as part of this exercise, and then revisit this patch.

I agree with the points you make here and for the tfp410 patch, but the point of these patches are
just to keep drivers working with the new connector model.

With the old model both tfp410 and mhdp create their own connector, and set the input bus format to
connector's display_info. With the new model, that doesn't happen and there's no bus format, and so
the display controller fails.

I see these more as fixes than implementing new features.

Nikhil, I think the output_fmt at the moment should always be FMT_FIXED. Maybe we can just check for
that.

 Tomi

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


More information about the dri-devel mailing list