[PATCH 2/2] drm/bridge: lvds-codec: Add support for LVDS data mapping select

Marek Vasut marex at denx.de
Tue May 25 10:38:47 UTC 2021


On 5/18/21 1:03 AM, Laurent Pinchart wrote:

Hi,

[...]

>> @@ -69,10 +70,33 @@ static void lvds_codec_disable(struct drm_bridge *bridge)
>>   			"Failed to disable regulator \"vcc\": %d\n", ret);
>>   }
>>   
>> +static bool lvds_codec_mode_fixup(struct drm_bridge *bridge,
>> +				const struct drm_display_mode *mode,
>> +				struct drm_display_mode *adj)
>> +{
>> +	struct lvds_codec *lvds_codec = to_lvds_codec(bridge);
>> +	struct drm_encoder *encoder = bridge->encoder;
>> +	struct drm_device *ddev = encoder->dev;
>> +	struct drm_connector *connector;
>> +
>> +	/* If 'data-mapping' was not specified, do nothing. */
>> +	if (!lvds_codec->bus_format)
>> +		return true;
>> +
>> +	/* Patch in the LVDS format */
>> +	list_for_each_entry(connector, &ddev->mode_config.connector_list, head) {
>> +		drm_display_info_set_bus_formats(&connector->display_info,
>> +						 &lvds_codec->bus_format, 1);
>> +	}
> 
> This part bothers me, as the format at the input of the LVDS decoder
> doesn't match the format on the connector. Shouldn't you implement
> .atomic_get_output_bus_fmts() instead ?

No, I tried that option before this solution and that didn't work. The 
atomic stuff seems to be separate from what I need to pass here, i.e. 
without this, e.g. the mxsfb scanout engine still receives the wrong format.

[...]


More information about the dri-devel mailing list