From: Mirela Rabulea Date: Tue, 20 Mar 2018 11:01:25 +0000 (+0200) Subject: MLK-17684: drm/bridge: nwl-dsi: Propagate DSI format to the attached panel/bridge X-Git-Tag: C0P2-H0.0--20200415~177 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=ec182da23c8e424f89ad99a6b1d1e166e9d38eca;p=linux.git MLK-17684: drm/bridge: nwl-dsi: Propagate DSI format to the attached panel/bridge Signed-off-by: Mirela Rabulea --- diff --git a/drivers/gpu/drm/bridge/nwl-dsi.c b/drivers/gpu/drm/bridge/nwl-dsi.c index b33c7d2f70db..0d7b6b2412ae 100644 --- a/drivers/gpu/drm/bridge/nwl-dsi.c +++ b/drivers/gpu/drm/bridge/nwl-dsi.c @@ -188,6 +188,7 @@ struct nwl_mipi_dsi { struct drm_bridge bridge; struct drm_connector connector; struct mipi_dsi_host host; + struct mipi_dsi_device *dsi_device; struct phy *phy; @@ -345,6 +346,8 @@ unsigned long nwl_dsi_get_bit_clock(struct drm_bridge *bridge, if (crtc && crtc->mode.private_flags & 0x1) { bus_format = (crtc->mode.private_flags & 0x1FFFE) >> 1; dsi->format = mipi_dsi_format_from_bus_format(bus_format); + /* propagate the format to the attached panel/bridge */ + dsi->dsi_device->format = dsi->format; /* clear bus format change indication*/ crtc->mode.private_flags &= ~0x1; } @@ -540,6 +543,8 @@ static int nwl_dsi_host_attach(struct mipi_dsi_host *host, if (device->lanes < 1 || device->lanes > 4) return -EINVAL; + dsi->dsi_device = device; + /* * Someone has attached to us; it could be a panel or another bridge. * Check to is if this is a panel or not.