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

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

 



Hi Marek,

On Tue, May 25, 2021 at 12:38:47PM +0200, Marek Vasut wrote:
> 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.

I fear this needs to be investigated then, as the connected format isn't
the same as the LVDS decoder input format, so the above isn't right.

-- 
Regards,

Laurent Pinchart



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux