summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/mediatek/mtk_dsi.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/mediatek: fix a timeout loopDan Carpenter2017-05-221-9/+6
| | | | | | | | | | | | This code causes a static checker warning because it treats "i == 0" as a timeout but, because it's a post-op, the loop actually ends with "i" set to -1. Philipp Zabel points out that it would be cleaner to use readl_poll_timeout() instead. Fixes: 21898816831f ("drm/mediatek: add dsi transfer function") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: CK Hu <ck.hu@mediatek.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
* Merge tag 'drm-misc-next-2017-04-07' of ↵Dave Airlie2017-04-111-18/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/git/drm-misc into drm-next Last drm-misc-next pull req for 4.12 Core changes: - fb_helper checkpatch cleanup and simplified _add_one_connector() (Thierry) - drm_ioctl and drm_sysfs improved/gained documentation (Daniel) - [ABI] Repurpose reserved field in drm_event_vblank for crtc_id (Ander) - Plumb acquire ctx through legacy paths to avoid lock_all and legacy_backoff (Daniel) - Add connector_atomic_check to check conn constraints on modeset (Maarten) - Add drm_of_find_panel_or_bridge to remove boilerplate in drivers (Rob) Driver changes: - meson moved to drm-misc (Neil) - Added support for Amlogic GX SoCs in dw-hdmi (Neil) - Rockchip unbind actually cleans up the things bind initializes (Jeffy) - A couple misc fixes in virtio, dw-hdmi NOTE: this also includes a backmerge of drm-next as well rc5 (we needed vmwgfx as well as the new synopsys media formats) * tag 'drm-misc-next-2017-04-07' of git://anongit.freedesktop.org/git/drm-misc: (77 commits) Revert "drm: Don't allow interruptions when opening debugfs/crc" drm: Only take cursor locks when the cursor plane exists drm/vmwgfx: Fix fbdev emulation using legacy functions drm/rockchip: Shutdown all crtcs when unbinding drm drm/rockchip: Reorder drm bind/unbind sequence drm/rockchip: analogix_dp: Disable clock when unbinding drm/rockchip: vop: Unprepare clocks when unbinding drm/rockchip: vop: Enable pm domain before vop_initial drm/rockchip: cdn-dp: Don't unregister audio dev when unbinding drm/rockchip: cdn-dp: Don't try to release firmware when not loaded drm: bridge: analogix: Destroy connector & encoder when unbinding drm: bridge: analogix: Disable clock when unbinding drm: bridge: analogix: Unregister dp aux when unbinding drm: bridge: analogix: Detach panel when unbinding analogix dp drm: Don't allow interruptions when opening debugfs/crc drm/virtio: don't leak bo on drm_gem_object_init failure drm: bridge: dw-hdmi: fix input format/encoding from plat_data drm: omap: use common OF graph helpers drm: convert drivers to use drm_of_find_panel_or_bridge drm: convert drivers to use of_graph_get_remote_node ...
| * drm: convert drivers to use drm_of_find_panel_or_bridgeRob Herring2017-04-061-18/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the previous commit, convert drivers open coding OF graph parsing to use drm_of_find_panel_or_bridge instead. This changes some error messages to debug messages (in the graph core). Graph connections are often "no connects" depending on the particular board, so we want to avoid spurious messages. Plus the kernel is not a DT validator. Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Archit Taneja <architt@codeaurora.org> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> [seanpaul dropped rockchip changes since they're now obsolete] Signed-off-by: Sean Paul <seanpaul@chromium.org>
* | drm/mediatek: add support for Mediatek SoC MT2701yt.shen@mediatek.com2017-04-081-0/+1
| | | | | | | | | | | | | | | | This patch add support for the Mediatek MT2701 DISP subsystem. There is only one OVL engine in MT2701. Signed-off-by: YT Shen <yt.shen@mediatek.com> Acked-by: CK Hu <ck.hu@mediatek.com>
* | drm/mediatek: update DSI sub driver flow for sending commands to panelyt.shen@mediatek.com2017-04-081-101/+158
| | | | | | | | | | | | | | | | | | | | | | This patch update enable/disable flow of DSI module. Original flow works on there is a bridge chip: DSI -> bridge -> panel. In this case: DSI -> panel, the DSI sub driver flow should be updated. We need to initialize DSI first so that we can send commands to panel. Signed-off-by: shaoming chen <shaoming.chen@mediatek.com> Signed-off-by: YT Shen <yt.shen@mediatek.com> Acked-by: CK Hu <ck.hu@mediatek.com>
* | drm/mediatek: add non-continuous clock mode and EOT packet controlyt.shen@mediatek.com2017-04-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | This patch will update dsi clock control method. 1. dsi non-continue clock mode will enhance antistatic effect for panel 2. EOT packet control will judge whether dsi send end of packet or not by customize Signed-off-by: shaoming chen <shaoming.chen@mediatek.com> Signed-off-by: YT Shen <yt.shen@mediatek.com> Acked-by: CK Hu <ck.hu@mediatek.com>
* | drm/mediatek: add dsi transfer functionshaoming chen2017-04-081-2/+166
| | | | | | | | | | | | | | add dsi read/write commands for transfer function Signed-off-by: shaoming chen <shaoming.chen@mediatek.com> Acked-by: CK Hu <ck.hu@mediatek.com>
* | drm/mediatek: add dsi interrupt controlshaoming chen2017-04-081-0/+92
| | | | | | | | | | | | | | add dsi interrupt control Signed-off-by: shaoming chen <shaoming.chen@mediatek.com> Acked-by: CK Hu <ck.hu@mediatek.com>
* | drm/mediatek: cleaning up and refineyt.shen@mediatek.com2017-04-081-38/+35
|/ | | | | | | | cleaning up unused define and refine function name and variable Signed-off-by: shaoming chen <shaoming.chen@mediatek.com> Signed-off-by: YT Shen <yt.shen@mediatek.com> Acked-by: CK Hu <ck.hu@mediatek.com>
* drm: bridge: Link encoder and bridge in core codeLaurent Pinchart2016-12-181-21/+3
| | | | | | | | | | | | | | | | | | | Instead of linking encoders and bridges in every driver (and getting it wrong half of the time, as many drivers forget to set the drm_bridge encoder pointer), do so in core code. The drm_bridge_attach() function needs the encoder and optional previous bridge to perform that task, update all the callers. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Stefan Agner <stefan@agner.ch> # For DCU Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> # For atmel-hlcdc Acked-by: Vincent Abriou <vincent.abriou@st.com> # For STI Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> # For sun4i Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com> # For hisilicon Acked-by: Jyri Sarha <jsarha@ti.com> # For tilcdc Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Archit Taneja <architt@codeaurora.org> Link: http://patchwork.freedesktop.org/patch/msgid/1481709550-29226-4-git-send-email-laurent.pinchart+renesas@ideasonboard.com
* Merge remote-tracking branch 'airlied/drm-next' into drm-misc-nextDaniel Vetter2016-12-061-16/+48
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Backmerge v4.9-rc8 to get at commit e94bd1736f1f60e916a85a80c0b0ebeaae36cce5 Author: Michel Dänzer <michel.daenzer@amd.com> Date: Wed Nov 30 17:30:01 2016 +0900 drm: Don't call drm_for_each_crtc with a non-KMS driver so I can apply Michel's follow-up patch. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
| * drm/mediatek: fixed the calc method of data rate per laneJitao Shi2016-11-241-16/+48
| | | | | | | | | | | | | | | | | | | | | | | | Tune dsi frame rate by pixel clock, dsi add some extra signal (i.e. Tlpx, Ths-prepare, Ths-zero, Ths-trail,Ths-exit) when enter and exit LP mode, those signals will cause h-time larger than normal and reduce FPS. So need to multiply a coefficient to offset the extra signal's effect. coefficient = ((htotal*bpp/lane_number)+Tlpx+Ths_prep+Ths_zero+ Ths_trail+Ths_exit)/(htotal*bpp/lane_number) Signed-off-by: Jitao Shi <jitao.shi@mediatek.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
* | drm: Make the connector .detect() callback optionalLaurent Pinchart2016-12-011-7/+0
|/ | | | | | | | | | | | | | | | | | Many drivers (21 to be exact) create connectors that are always connected (for instance to an LVDS or DSI panel). Instead of forcing them to implement a dummy .detect() handler, make the callback optional and consider the connector as always connected in that case. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Jyri Sarha <jsarha@ti.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Vincent Abriou <vincent.abriou@st.com> Acked-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> [seanpaul fixed small conflict in rcar-du/rcar_du_lvdscon.c] Signed-off-by: Sean Paul <seanpaul@chromium.org>
* drm: mediatek: Rely on the default ->best_encoder() behaviorBoris Brezillon2016-06-091-9/+0
| | | | | | | | | | | | We have a 1:1 relationship between connectors and encoders and the driver is relying on the atomic helpers: we can drop the custom ->best_encoder() implementation and let the core call drm_atomic_helper_best_encoder() for us. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1465300095-16971-8-git-send-email-boris.brezillon@free-electrons.com
* drm/mediatek: mtk_dsi: Remove spurious drm_connector_unregisterPhilipp Zabel2016-06-011-3/+1
| | | | | | Connectors are unregistered by mtk_drm_drv via drm_connector_unregister_all(). Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* drm/mediatek: Add DSI sub driverCK Hu2016-05-061-0/+913
This patch add a drm encoder/connector driver for the MIPI DSI function block of the Mediatek display subsystem and a phy driver for the MIPI TX D-PHY control module. Signed-off-by: Jitao Shi <jitao.shi@mediatek.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
OpenPOWER on IntegriCloud