- Dec 16, 2019
-
-
Heiko Stuebner authored
If implementation-specific phy_ops need to be defined they probably should be enabled before trying to talk to the panel and disabled only after the panel was disabled. Right now they are enabled last and disabled first, so might make it impossible to talk to some panels - example for this being the px30 with an external Innosilicon dphy that needs the phy to be enabled to transfer commands to the panel. So move the calls appropriately. changed in v5: - rebased on top of 5.5-rc1 - merged with dsi timing change to prevent ordering conflicts Signed-off-by:
Heiko Stuebner <heiko.stuebner@theobroma-systems.com> Reviewed-by:
Neil Armstrong <narmstrong@baylibre.com> Tested-by:
Yannick Fertre <yannick.fertre@st.com> Reviewed-by:
Philippe Cornu <philippe.cornu@st.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191209143130.4553-3-heiko@sntech.de
-
Heiko Stuebner authored
The timing values for dw-dsi are often dependent on the used display and according to Philippe Cornu will most likely also depend on the used phy technology in the soc-specific implementation. To solve this and allow specific implementations to define them as needed add a new get_timing callback to phy_ops and call this from the dphy_timing function to retrieve the necessary values for the specific mode. Right now this handles the hs2lp + lp2hs where Rockchip SoCs need handling according to the phy speed, while STM seems to be ok with static values. changes in v5: - rebase on 5.5-rc1 - merge into px30 dsi series to prevent ordering conflicts changes in v4: - rebase to make it directly fit on top of drm-misc-next after all changes in v3: - check existence of phy_ops->get_timing in __dw_mipi_dsi_probe() - emit actual error when get_timing() call fails - add tags from Philippe and Yannick changes in v2: - add driver-specific handling, don't force all bridge users to use the same timings, as suggested by Philippe Suggested-by:
Philippe Cornu <philippe.cornu@st.com> Signed-off-by:
Heiko Stuebner <heiko.stuebner@theobroma-systems.com> Reviewed-by:
Philippe Cornu <philippe.cornu@st.com> Tested-by:
Yannick Fertre <yannick.fertre@st.com> Reviewed-by:
Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191209143130.4553-2-heiko@sntech.de
-
- Sep 25, 2019
-
-
Markus Elfring authored
Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by:
Markus Elfring <elfring@users.sourceforge.net> 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/e0d7b7d7-3e89-8b3f-04ed-0b14806e66f7@web.de
-
- Sep 08, 2019
-
-
Laurent Pinchart authored
The drm panel bridge creates a connector using a connector type explicitly passed by the display controller or bridge driver that instantiates the panel bridge. Now that drm_panel reports its connector type, we can use it to avoid passing an explicit (and often incorrect) connector type to drm_panel_bridge_add() and devm_drm_panel_bridge_add(). Several drivers report incorrect or unknown connector types to userspace. Reporting a different type may result in a breakage. For that reason, rename (devm_)drm_panel_bridge_add() to (devm_)drm_panel_bridge_add_typed(), and add new (devm_)drm_panel_bridge_add() functions that use the panel connector type. Update all callers of (devm_)drm_panel_bridge_add() to the _typed function, they will be converted one by one after testing. The panel drivers have been updated with the following Coccinelle semantic patch, with manual inspection and fixes to indentation. @@ expression bridge; expression dev; expression panel; identifier type; @@ ( -bridge = drm_panel_bridge_add(panel, type); +bridge = drm_panel_bridge_add_typed(panel, type); | -bridge = devm_drm_panel_bridge_add(dev, panel, type); +bridge = devm_drm_panel_bridge_add_typed(dev, panel, type); ) Signed-off-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by:
Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by:
Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190904132804.29680-3-laurent.pinchart@ideasonboard.com
-
- Jun 24, 2019
-
-
Matt Redfearn authored
The Synopsys MIPI DSI IP contains a video test pattern generator which is helpful in debugging video timing with connected displays. Add a debugfs directory containing files which allow the VPG to be enabled and disabled, and its orientation to be changed. Signed-off-by:
Matt Redfearn <matt.redfearn@thinci.com> Tested-by:
Yannick Fertré <yannick.fertre@st.com> Reviewed-by:
Philippe Cornu <philippe.cornu@st.com> Signed-off-by:
Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190430081646.23845-1-matt.redfearn@thinci.com
-
- Jun 12, 2019
-
-
Yannick Fertré authored
Add power on & off optional physical operation functions, helpful to program specific registers of the DSI physical part. Signed-off-by:
Yannick Fertré <yannick.fertre@st.com> Reviewed-by:
Philippe Cornu <philippe.cornu@st.com> 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/1558952499-15418-2-git-send-email-yannick.fertre@st.com
-
- May 26, 2019
-
-
Sam Ravnborg authored
Drop use of the deprecated drmP.h header file. While touching the list of include files: - Divide include files in blocks of linux/* drm/* etc. - Sort individual blocks of include files - Remove duplicated header file v2: - Be consistent in the order of the include blocks (Laurent) Signed-off-by:
Sam Ravnborg <sam@ravnborg.org> Reviewed-by:
Laurent Pinchart <Laurent.pinchart@ideasonboard.com> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Peter Senna Tschudin <peter.senna@gmail.com> Cc: Martin Donnelly <martin.donnelly@ge.com> Cc: Martyn Welch <martyn.welch@collabora.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20190519183636.19588-1-sam@ravnborg.org
-
- Jan 24, 2019
-
-
Simona Vetter authored
Having the probe helper stuff (which pretty much everyone needs) in the drm_crtc_helper.h file (which atomic drivers should never need) is confusing. Split them out. To make sure I actually achieved the goal here I went through all drivers. And indeed, all atomic drivers are now free of drm_crtc_helper.h includes. v2: Make it compile. There was so much compile fail on arm drivers that I figured I'll better not include any of the acks on v1. v3: Massive rebase because i915 has lost a lot of drmP.h includes, but not all: Through drm_crtc_helper.h > drm_modeset_helper.h -> drmP.h there was still one, which this patch largely removes. Which means rolling out lots more includes all over. This will also conflict with ongoing drmP.h cleanup by others I expect. v3: Rebase on top of atomic bochs. v4: Review from Laurent for bridge/rcar/omap/shmob/core bits: - (re)move some of the added includes, use the better include files in other places (all suggested from Laurent adopted unchanged). - sort alphabetically v5: Actually try to sort them, and while at it, sort all the ones I touch. v6: Rebase onto i915 changes. v7: Rebase once more. Acked-by:
Harry Wentland <harry.wentland@amd.com> Acked-by:
Sam Ravnborg <sam@ravnborg.org> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by:
Rodrigo Vivi <rodrigo.vivi@intel.com> Acked-by:
Benjamin Gaignard <benjamin.gaignard@linaro.org> Acked-by:
Jani Nikula <jani.nikula@intel.com> Acked-by:
Neil Armstrong <narmstrong@baylibre.com> Acked-by:
Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Acked-by:
CK Hu <ck.hu@mediatek.com> Acked-by:
Alex Deucher <alexander.deucher@amd.com> Acked-by:
Sam Ravnborg <sam@ravnborg.org> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by:
Liviu Dudau <liviu.dudau@arm.com> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Cc: linux-arm-kernel@lists.infradead.org Cc: virtualization@lists.linux-foundation.org Cc: etnaviv@lists.freedesktop.org Cc: linux-samsung-soc@vger.kernel.org Cc: intel-gfx@lists.freedesktop.org Cc: linux-mediatek@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org Cc: spice-devel@lists.freedesktop.org Cc: amd-gfx@lists.freedesktop.org Cc: linux-renesas-soc@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-tegra@vger.kernel.org Cc: xen-devel@lists.xen.org Link: https://patchwork.freedesktop.org/patch/msgid/20190117210334.13234-1-daniel.vetter@ffwll.ch
-
- Jan 14, 2019
-
-
Laurent Pinchart authored
The mode and ajusted_mode passed to the bridge .mode_set() operation should never be modified by the bridge (and are not in any of the existing bridge drivers). Make them const to make this clear. Signed-off-by:
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by:
Daniel Vetter <daniel.vetter@ffwll.ch>
-
- 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
-