- Oct 30, 2018
-
-
Nickey Yang authored
Allow to also drive a slave dw-mipi-dsi controller in a dual-dsi setup. This will require additional implementation-specific code to look up the slave instance and do specific setup. Also will probably need code in the specific crtcs as dual-dsi does not equal two separate dsi outputs. To activate, the implementation-specific code should set the slave using dw_mipi_dsi_set_slave() before calling __dw_mipi_dsi_bind(). v2: - expect real interface number of lanes - keep links to both master and slave v3: - remove unneeded separate variables - remove unneeded second slave settings - disable slave before master - lane-sum calculation comments Signed-off-by:
Nickey Yang <nickey.yang@rock-chips.com> Signed-off-by:
Heiko Stuebner <heiko@sntech.de> Tested-by:
Philippe Cornu <philippe.cornu@st.com> Reviewed-by:
Andrzej Hajda <a.hajda@samsung.com> Signed-off-by:
Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181001123845.11818-7-heiko@sntech.de
-
Heiko Stuebner authored
With the regular means of adding the dsi-component in probe it creates a race condition with the panel probing, as the panel device only gets created after the dsi-bus got created. When the panel-driver is build as a module it currently fails hard as the panel cannot be probed directly: dw_mipi_dsi_bind() __dw_mipi_dsi_probe() creates dsi bus creates panel device triggers panel module load panel not probed (module not loaded or panel probe slow) drm_bridge_attach fails with -EINVAL due to empty panel_bridge Additionally the panel probing can run concurrently with dsi bringup making it possible that the panel can already be found but dsi-attach hasn't finished running. To solve that cleanly we may want to only create the component after the panel has finished probing, by calling component_add from the host-attach dsi callback. As that is specific to glue drivers, add a new struct for host_ops so that glue drivers can tell the bridge to call specific functions after the common host-attach and before the common host-detach run. Suggested-by:
Andrzej Hajda <a.hajda@samsung.com> Reviewed-by:
Andrzej Hajda <a.hajda@samsung.com> Signed-off-by:
Heiko Stuebner <heiko@sntech.de> Signed-off-by:
Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181001123845.11818-4-heiko@sntech.de
-
Heiko Stuebner authored
__dw_mipi_dsi_probe() does all the grabbing of resources and does it using devm-helpers. So this is happening on each try of master bringup possibly slowing down things a lot. Drivers using the component framework may instead want to call dw_mipi_dsi_probe separately in their probe function to setup resources early. That way the dsi bus also gets created earlier and also not recreated on each bind-try, so that attached panels can load their modules and be probed way before the bridge-attach in the bind call. So drop the call to __dw_mipi_dsi_probe and modify the function to take a struct dw_mipi_dsi instead of the platform-device. Signed-off-by:
Heiko Stuebner <heiko@sntech.de> Reviewed-by:
Andrzej Hajda <a.hajda@samsung.com> Signed-off-by:
Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181001123845.11818-3-heiko@sntech.de
-
Heiko Stuebner authored
Right now the host is only unregistered when the driver is used via the bridge api and not via the component api, leading to the host staying registered in cases like probe deferral. So move the host unregister to the general remove function, so that it gets cleaned up in all cases. Signed-off-by:
Heiko Stuebner <heiko@sntech.de> Reviewed-by:
Andrzej Hajda <a.hajda@samsung.com> Reviewed-by:
Philippe Cornu <philippe.cornu@st.com> Tested-by:
Philippe Cornu <philippe.cornu@st.com> Signed-off-by:
Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181001123845.11818-2-heiko@sntech.de
-
- Apr 26, 2018
-
-
Philippe CORNU authored
The "adjusted_mode" clock value (ie the real pixel clock) is more accurate than "mode" clock value (ie the panel/bridge requested clock value). It offers a better preciseness for timing computations and allows to reduce the extra dsi bandwidth in burst mode (from ~20% to ~10-12%, hw platform dependent). Signed-off-by:
Philippe Cornu <philippe.cornu@st.com> Tested-by:
Brian Norris <briannorris@chromium.org> Reviewed-by:
Yannick Fertré <yannick.fertre@st.com> Tested-by:
Yannick Fertré <yannick.fertre@st.com> Signed-off-by:
Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180125155504.8611-1-philippe.cornu@st.com
-
- Apr 19, 2018
-
-
Philippe CORNU authored
Add SPDX identifiers to the Synopsys DesignWare MIPI DSI host controller driver. Signed-off-by:
Philippe Cornu <philippe.cornu@st.com> Acked-by:
Philippe Ombredanne <pombredanne@nexB.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180208145805.24762-1-philippe.cornu@st.com
-
- Mar 05, 2018
-
-
Philippe CORNU authored
The readl_poll_timeout() return value is 0 in case of success so it is better to detect errors without taking care of the return value sign. Signed-off-by:
Philippe Cornu <philippe.cornu@st.com> Reviewed-by:
Andrzej Hajda <a.hajda@samsung.com> Signed-off-by:
Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180204213624.18288-1-philippe.cornu@st.com
-
- Feb 08, 2018
-
-
Philippe Cornu authored
Add support for the Synopsys DesignWare MIPI DSI version 1.31 Two registers need to be updated/added for supporting 1.31: * PHY_TMR_CFG 0x9c (updated) 1.30 [31:24] phy_hs2lp_time [23:16] phy_lp2hs_time [14: 0] max_rd_time 1.31 [25:16] phy_hs2lp_time [ 9: 0] phy_lp2hs_time * PHY_TMR_RD_CFG 0xf4 (new) 1.31 [14: 0] max_rd_time Signed-off-by:
Philippe Cornu <philippe.cornu@st.com> Reviewed-by:
Andrzej Hajda <a.hajda@samsung.com> Signed-off-by:
Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180206084251.303-1-philippe.cornu@st.com
-
Philippe Cornu authored
This patch adds the DCS/GENERIC DSI read feature. Signed-off-by:
Philippe Cornu <philippe.cornu@st.com> Reviewed-by:
Andrzej Hajda <a.hajda@samsung.com> Reviewed-by:
Brian Norris <briannorris@chromium.org> Signed-off-by:
Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180204213104.17834-1-philippe.cornu@st.com
-
- Jan 30, 2018
-
-
Philippe Cornu authored
The dw_mipi_dsi_host_transfer() must return the number of bytes transmitted/received on success instead of 0. Note: As the read feature is not implemented, only the transmitted number of bytes is returned for the moment. Reviewed-by:
Brian Norris <briannorris@chromium.org> Signed-off-by:
Philippe Cornu <philippe.cornu@st.com> Signed-off-by:
Archit Taneja <architt@codeaurora.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180125103800.1999-3-philippe.cornu@st.com
-
Philippe Cornu authored
The dcs/generic dsi read feature is not yet implemented so it is important to warn the host_transfer() caller in case of read operation requests. Reviewed-by:
Brian Norris <briannorris@chromium.org> Signed-off-by:
Philippe Cornu <philippe.cornu@st.com> Signed-off-by:
Archit Taneja <architt@codeaurora.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180125103800.1999-2-philippe.cornu@st.com
-
- Jan 16, 2018
-
-
Brian Norris authored
We're filling the "remainder" word with little-endian data, then writing it out to IO registers with endian-correcting writel(). That probably won't work on big-endian systems. Let's mark the "remainder" variable as LE32 (since we fill it with memcpy()) and do the swapping explicitly. Some of this function could be done more easily without memcpy(), but the unaligned "remainder" case is a little hard to do without potentially overrunning 'tx_buf', so I just applied the same solution in all cases (memcpy() + le32_to_cpu()). Tested only on a little-endian system. Signed-off-by:
Brian Norris <briannorris@chromium.org> Reviewed-by:
Andrzej Hajda <a.hajda@samsung.com> Signed-off-by:
Archit Taneja <architt@codeaurora.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180109203248.139249-2-briannorris@chromium.org
-
Brian Norris authored
This takes care of 2 TODOs in this driver, by using the common DSI packet-marshalling code instead of our custom short/long write code. This both saves us some duplicated code and gets us free support for command types that weren't already part of our switch block (e.g., MIPI_DSI_GENERIC_LONG_WRITE). The code logic stays mostly intact, except that it becomes unnecessary to split the short/long write functions, and we have to copy data a bit more. Along the way, I noticed that loop bounds were a little odd: while (DIV_ROUND_UP(len, pld_data_bytes)) This really was just supposed to be 'len != 0', so I made that more clear. Tested on RK3399 with some pending refactoring patches by Nickey Yang, to make the Rockchip DSI driver wrap this common driver. Signed-off-by:
Brian Norris <briannorris@chromium.org> Reviewed-by:
Philippe Cornu <philippe.cornu@st.com> Tested-by:
Philippe Cornu <philippe.cornu@st.com> Signed-off-by:
Archit Taneja <architt@codeaurora.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180109203248.139249-1-briannorris@chromium.org
-
Brian Norris authored
sparse complains: drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c:703:6: warning: symbol 'dw_mipi_dsi_bridge_mode_set' was not declared. Should it be static? Reviewed-by:
Philippe Cornu <philippe.cornu@st.com> Signed-off-by:
Brian Norris <briannorris@chromium.org> Signed-off-by:
Archit Taneja <architt@codeaurora.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180109203319.139520-1-briannorris@chromium.org
-
- Jan 09, 2018
-
-
Brian Norris authored
Bridge drivers/helpers shouldn't be clobbering the drvdata, since a parent driver might need to own this. Instead, let's return our 'dw_mipi_dsi' object and have callers pass that back to us for removal. Signed-off-by:
Brian Norris <briannorris@chromium.org> Reviewed-by:
Matthias Kaehlcke <mka@chromium.org> Reviewed-by:
Archit Taneja <architt@codeaurora.org> Acked-by:
Philippe Cornu <philippe.cornu@st.com> Signed-off-by:
Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171128010538.119114-1-briannorris@chromium.org
-
- Oct 10, 2017
-
-
benjamin.gaignard@linaro.org authored
When using drm_of_panel_bridge_remove() we can simplify the code and remove is_panel_bridge from dw_mipi_dsi structure. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@linaro.org> Reviewed-by:
Philippe Cornu <philippe.cornu@st.com> Tested-by:
Philippe Cornu <philippe.cornu@st.com> Link: https://patchwork.freedesktop.org/patch/msgid/1506936888-23844-6-git-send-email-benjamin.gaignard@linaro.org
-
- Sep 04, 2017
-
-
Philippe CORNU authored
Based on patch "Convert drivers to explicit reset API" from Philipp Zabel Commit a53e35db ("reset: Ensure drivers are explicit when requesting reset lines") started to transition the reset control request API calls to explicitly state whether the driver needs exclusive or shared reset control behavior. Convert all drivers requesting exclusive resets to the explicit API call so the temporary transition helpers can be removed. No functional changes. Cc: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by:
Philippe CORNU <philippe.cornu@st.com> Acked-by:
Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by:
Andrzej Hajda <a.hajda@samsung.com> Signed-off-by:
Archit Taneja <architt@codeaurora.org> Link: https://patchwork.freedesktop.org/patch/msgid/1501593788-21036-4-git-send-email-philippe.cornu@st.com
-
Philippe CORNU authored
This patch cleans up the Synopsys mipi dsi register list: - rename registers according to the Synopsys documentation (1.30 & 1.31) - fix typos - re-order registers for a better coherency Signed-off-by:
Philippe CORNU <philippe.cornu@st.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Andrzej Hajda <a.hajda@samsung.com> Signed-off-by:
Archit Taneja <architt@codeaurora.org> Link: https://patchwork.freedesktop.org/patch/msgid/1501593788-21036-3-git-send-email-philippe.cornu@st.com
-
- Aug 09, 2017
-
-
Bhumika Goyal authored
Make these structures const as they are only stored in the funcs field of drm_bridge structure, which is of type const. Done using Coccinelle. Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Bhumika Goyal <bhumirks@gmail.com> Signed-off-by:
Archit Taneja <architt@codeaurora.org> Link: https://patchwork.freedesktop.org/patch/msgid/1502207650-20029-1-git-send-email-bhumirks@gmail.com
-
- Jul 18, 2017
-
-
Philippe CORNU authored
Add a Synopsys Designware MIPI DSI host DRM bridge driver, based on the Rockchip version from rockchip/dw-mipi-dsi.c with phy & bridge APIs. Signed-off-by:
Philippe CORNU <philippe.cornu@st.com> Signed-off-by:
Archit Taneja <architt@codeaurora.org> Link: https://patchwork.freedesktop.org/patch/msgid/1500277223-29553-5-git-send-email-philippe.cornu@st.com
-