summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/imx
AgeCommit message (Collapse)Author
2017-03-15drm/imx: imx-tve: Do not set the regulator voltageFabio Estevam
commit fc12bccda8b6f5c38139eceec9e369ed78091b2b upstream. Commit deb65870b5d9d ("drm/imx: imx-tve: check the value returned by regulator_set_voltage()") exposes the following probe issue: 63ff0000.tve supply dac not found, using dummy regulator imx-drm display-subsystem: failed to bind 63ff0000.tve (ops imx_tve_ops): -22 When the 'dac-supply' is not passed in the device tree a dummy regulator is used and setting its voltage is not allowed. To fix this issue, do not set the dac-supply voltage inside the driver and let its voltage be specified in the device tree. Print a warning if the the 'dac-supply' voltage has a value different from 2.75V. Fixes: deb65870b5d9d ("drm/imx: imx-tve: check the value returned by regulator_set_voltage()") Suggested-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-09drm/imx: disable planes before DCLucas Stach
If the DC clock is disabled before the attached IDMACs are properly stopped the IDMACs may hang the IPU or even the whole system. Make sure the IDMACs are in safe state by disabling the planes before removal of the DC clock. Also set the atomic parameter to false to stop calling the atomic_begin hook, which does nothing useful as we immediately afterwards turn off vblank interrupts and possibly send the pending vblank event. Fixes: 33f14235302f (drm/imx: atomic phase 1: Use transitional atomic CRTC and plane helpers) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-10-20drm/imx: ipuv3-plane: disable local alpha for planes without alpha channelPhilipp Zabel
Without this patch, after enabling the overlay plane with an RGBA framebuffer, switching to a framebuffer without alpha channel would cause the plane to vanish, since the pixel local alpha is constant zero in that case. Disable local alpha again when setting an opaque framebuffer. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-10-20drm/imx: ipuv3-plane: make sure x/y offsets are even in case of chroma ↵Philipp Zabel
subsampling Odd x/y offsets are not allowed for horizontally/vertically chroma subsampled planar YUV formats. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Liu Ying <gnuiyl@gmail.com>
2016-10-18drm/imx: ipuv3-plane: Access old u/vbo properly in ->atomic_check for YU12/YV12Liu Ying
Before accessing the u/v offset(aka, u/vbo for IPUv3) of the old plane state's relevant fb, we should make sure the fb is in YU12 or YV12 pixel format(which are the two YUV pixel formats we support only), otherwise, we are likely to trigger BUG_ON() in drm_plane_state_to_u/vbo() since the fb's pixel format is probably not YU12 or YV12. Link: https://bugs.freedesktop.org/show_bug.cgi?id=98150 Fixes: c6c1f9bc798b ("drm/imx: Add active plane reconfiguration support") Cc: stable@vger.kernel.org # 4.8 Signed-off-by: Liu Ying <gnuiyl@gmail.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-10-18drm/imx: drm_dev_alloc() returns error pointersDan Carpenter
We are checking for NULL here, when we should be checking for error pointers. Fixes: 54db5decce17 ("drm/imx: drop deprecated load/unload drm_driver ops") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-10-18drm/imx: ipuv3-plane: Skip setting u/vbo only when we don't need modesetLiu Ying
We added active plane reconfiguration support by forcing a full modeset operation. So, looking at old_plane_state->fb to determine whether we need to set u/v offset(aka, u/vbo for IPUv3) in ipu_plane_atomic_set_base() or not is no more correct. Instead, we should do that only when we don't need modeset. Fixes: c6c1f9bc798b ("drm/imx: Add active plane reconfiguration support") Cc: stable@vger.kernel.org # 4.8 Signed-off-by: Liu Ying <gnuiyl@gmail.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-10-18drm/imx: ipuv3-plane: Switch EBA buffer only when we don't need modesetLiu Ying
We added active plane reconfiguration support by forcing a full modeset operation. So, looking at old_plane_state->fb to determine whether we need to switch EBA buffer(for hardware double buffering) in ipu_plane_atomic_set_base() or not is no more correct. Instead, we should do that only when we don't need modeset, otherwise, we initialize the two EBA buffers with the buffer address. Fixes: c6c1f9bc798b ("drm/imx: Add active plane reconfiguration support") Cc: stable@vger.kernel.org # 4.8 Signed-off-by: Liu Ying <gnuiyl@gmail.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-10-17drm/imx: hide an unused labelArnd Bergmann
The imx_drm_bind function causes a warning in linux-next when CONFIG_DRM_FBDEV_EMULATION is not set: drivers/gpu/drm/imx/imx-drm-core.c: In function 'imx_drm_bind': drivers/gpu/drm/imx/imx-drm-core.c:441:1: error: label 'err_unbind' defined but not used [-Werror=unused-label] I don't understand why the warning only showed up now, as the code has not been modified recently, but there is an obvious fix in adding another #if for the symbol. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: c1ff5a7aa3c3 ("drm/imx: Remove local fbdev emulation Kconfig option") Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-09-28Merge tag 'v4.8-rc8' into drm-nextDave Airlie
Linux 4.8-rc8 There was a lot of fallout in the imx/amdgpu/i915 drivers, so backmerge it now to avoid troubles. * tag 'v4.8-rc8': (1442 commits) Linux 4.8-rc8 fault_in_multipages_readable() throws set-but-unused error mm: check VMA flags to avoid invalid PROT_NONE NUMA balancing radix tree: fix sibling entry handling in radix_tree_descend() radix tree test suite: Test radix_tree_replace_slot() for multiorder entries fix memory leaks in tracing_buffers_splice_read() tracing: Move mutex to protect against resetting of seq data MIPS: Fix delay slot emulation count in debugfs MIPS: SMP: Fix possibility of deadlock when bringing CPUs online mm: delete unnecessary and unsafe init_tlb_ubc() huge tmpfs: fix Committed_AS leak shmem: fix tmpfs to handle the huge= option properly blk-mq: skip unmapped queues in blk_mq_alloc_request_hctx MIPS: Fix pre-r6 emulation FPU initialisation arm64: kgdb: handle read-only text / modules arm64: Call numa_store_cpu_info() earlier. locking/hung_task: Fix typo in CONFIG_DETECT_HUNG_TASK help text nvme-rdma: only clear queue flags after successful connect i2c: qup: skip qup_i2c_suspend if the device is already runtime suspended perf/core: Limit matching exclusive events to one PMU ...
2016-08-30drm/imx: fix crtc vblank state regressionLucas Stach
The atomic conversion lost the notification to let the DRM core know about the current state of the CRTC vblank interrupts. This regressed the ability of the core to reject page flip attempts on currently disabled CRTCs. Add back the notifications. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-08-29drm/imx: parallel-display: detach bridge or panel on unbindPhilipp Zabel
Don't leave any bridge or panel attached to a stale driver instance when unbinding, to allow reattachment on a rebind. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-08-29drm/imx: imx-ldb: detach bridge on unbindPhilipp Zabel
Don't leave the bridge attached to a stale driver instance when unbinding, to allow reattachment on a rebind. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-08-29drm/imx: imx-ldb: detach panel on unbindLucas Stach
Make sure to leave a clean panel state behind and allow to properly attach to the panel again on a rebind. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-08-29drm/imx: Add active plane reconfiguration supportLiu Ying
We don't support configuring active plane on-the-fly for imx-drm. The relevant CRTC should be disabled before the plane configuration. Of course, the plane itself should be disabled as well. This patch adds active plane reconfiguration support by forcing CRTC mode change and disabling-enabling plane in plane's ->atomic_update callback. Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: David Airlie <airlied@linux.ie> Cc: Russell King <linux@armlinux.org.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Liu Ying <gnuiyl@gmail.com> Tested-by: Peter Senna Tschudin <peter.senna@gmail.com> Tested-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-08-29drm/imx: add exclusive fence to plane stateLucas Stach
This allows the atomic helper to wait on them, instead of open-coding the same in the imx-drm driver. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-08-29drm/imx: fold ipu_plane_disable into ipu_disable_planeLucas Stach
ipu_disable_plane is the only left caller of ipu_plane_disable. Having those 2 similar named functions is confusing and superfluous, so fold them into 1. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-08-29drm/imx: don't destroy mode objects manually on driver unbindLucas Stach
Instead let drm_mode_config_cleanup() do the work when taking down the master device. This requires all cleanup functions to be properly hooked up to the mode object .destroy callback. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-08-29drm/imx: drop deprecated load/unload drm_driver opsLucas Stach
Drop the load/unload driver ops, as they are deprecated because of their inherent races, with devices being visible to userspace before they are fully initialized. Move this code into the driver bind/unbind routines bracketed by the proper drm_dev_alloc/register and drm_dev_unregister/unref calls. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-08-29drm/imx: don't call disable_plane in plane destroy pathLucas Stach
When the destroy path is called the plane should already be disabled. If not, this is a core bug and should not be worked around in the driver. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-08-29drm/imx: Add active plane reconfiguration supportLiu Ying
We don't support configuring active plane on-the-fly for imx-drm. The relevant CRTC should be disabled before the plane configuration. Of course, the plane itself should be disabled as well. This patch adds active plane reconfiguration support by forcing CRTC mode change in plane's ->atomic_check callback so that the CRTC will be disabled before the plane configuration. Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: David Airlie <airlied@linux.ie> Cc: Russell King <linux@armlinux.org.uk> Cc: Peter Senna Tschudin <peter.senna@gmail.com> Cc: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Liu Ying <gnuiyl@gmail.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-08-29drm/imx: Use DRM_PLANE_COMMIT_NO_DISABLE_AFTER_MODESET flagLiu Ying
The IPUv3 display controller behind imx-drm needs all planes of a CRTC be disabled when the CRTC is disabled. The DRM_PLANE_COMMIT_NO_DISABLE_AFTER_MODESET flag reflects this hardware requirement. Let's use the flag for imx-drm. Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: David Airlie <airlied@linux.ie> Cc: Russell King <linux@armlinux.org.uk> Cc: Peter Senna Tschudin <peter.senna@gmail.com> Cc: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Liu Ying <gnuiyl@gmail.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-08-29drm/imx: ipuv3-crtc: Use the callback ->atomic_disable instead of ->disableLiu Ying
Now that the drm atomic core supports the callback ->atomic_disable, we may replace the legacy one ->disable with it. Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: David Airlie <airlied@linux.ie> Cc: Russell King <linux@armlinux.org.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Peter Senna Tschudin <peter.senna@gmail.com> Cc: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Liu Ying <gnuiyl@gmail.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-08-29drm/atomic-helper: Add NO_DISABLE_AFTER_MODESET flag support for plane commitLiu Ying
Drivers may set the NO_DISABLE_AFTER_MODESET flag in the 'flags' parameter of the helper drm_atomic_helper_commit_planes() if the relevant display controllers(e.g., IPUv3 for imx-drm) require to disable a CRTC's planes when the CRTC is disabled. The helper would skip the ->atomic_disable call for a plane if the CRTC of the old plane state needs a modesetting operation. Of course, the drivers need to disable the planes in their CRTC disable callbacks since no one else would do that. Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: David Airlie <airlied@linux.ie> Cc: Russell King <linux@armlinux.org.uk> Cc: Peter Senna Tschudin <peter.senna@gmail.com> Cc: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Liu Ying <gnuiyl@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1472461923-14364-1-git-send-email-gnuiyl@gmail.com
2016-08-15Merge tag 'topic/drm-misc-2016-08-12' of ↵Dave Airlie
git://anongit.freedesktop.org/drm-intel into drm-next - more fence destaging and cleanup (Gustavo&Sumit) - DRIVER_LEGACY to untangle from DRIVER_MODESET - drm_mm refactor (Chris) - fbdev-less compile fies - clipped plane src/dst rects (Ville) - + a few mediatek patches that build on top of that (Bibby+Daniel) - small stuff all over really * tag 'topic/drm-misc-2016-08-12' of git://anongit.freedesktop.org/drm-intel: (43 commits) dma-buf/fence: kerneldoc: remove spurious section header dma-buf/fence: kerneldoc: remove unused struct members Revert "gpu: drm: omapdrm: dss-of: add missing of_node_put after calling of_parse_phandle" drm: Protect fb_defio in drivers with CONFIG_KMS_FBDEV_EMULATION drm/radeon|amgpu: Make fbdev emulation optional drm/vmwgfx: select CONFIG_FB drm: Remove superflous linux/fb.h includes drm/fb-helper: Add a dummy remove_conflicting_framebuffers dma-buf/sync_file: only enable fence signalling on poll() Documentation: add doc for sync_file_get_fence() dma-buf/sync_file: add sync_file_get_fence() dma-buf/sync_file: refactor fence storage in struct sync_file dma-buf/fence-array: add fence_is_array() drm/dp_helper: Rate limit timeout errors from drm_dp_i2c_do_msg() drm/dp_helper: Print first error received on failure in drm_dp_dpcd_access() drm: Add ratelimited versions of the DRM_DEBUG* macros drm: Make sure drm_vblank_no_hw_counter isn't abused drm/mediatek: Fix mtk_atomic_complete for runtime_pm drm/mediatek: plane: Use FB's format's cpp to compute x offset drm/mediatek: plane: Merge mtk_plane_enable into mtk_plane_atomic_update ...
2016-08-12drm: Remove superflous linux/fb.h includesDaniel Vetter
Everyone who uses the fbdev emulation helpers doesn't need to include fb.h directly. Remove it. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1470847958-28465-3-git-send-email-daniel.vetter@ffwll.ch
2016-08-11drm/imx-ldb: Add support to drm-bridgePeter Senna Tschudin
Add support to attach a drm_bridge to imx-ldb in addition to existing support to attach a LVDS panel. This patch does a simple code refactoring by moving code from for_each_child_of_node iterator to a new function named imx_ldb_panel_ddc(). This was necessary to allow the panel ddc code to run only when the imx_ldb is not attached to a bridge. Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Rob Herring <robh@kernel.org> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: David Airlie <airlied@linux.ie> Cc: Thierry Reding <treding@nvidia.com> Cc: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Peter Senna Tschudin <peter.senna@collabora.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-08-08drm/imx: imx-ldb: use encoder atomic_mode_set callbackPhilipp Zabel
Using atomic_mode_set instead of mode_set allows to access crtc and connector states in addition to the modes. This allows to remove the connector list walk. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-08-08drm/imx: Remove imx_drm_handle_vblank()Liu Ying
imx_drm_handle_vblank() is just a simple wrapper of drm_crtc_handle_vblank() without doing any thing fancy - drm_crtc_handle_vblank() can be called directly. So, let's remove the wrapper. Signed-off-by: Liu Ying <gnuiyl@gmail.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-08-08drm/imx: Remove imx_drm_crtc_id()Liu Ying
There is no one calling imx_drm_crtc_id() and it is just a simple wrapper of drm_crtc_index() without doing any thing fancy - the drivers may call drm_crtc_index() directly. So, let's remove the wrapper. Signed-off-by: Liu Ying <gnuiyl@gmail.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-08-08drm/imx: Remove imx_drm_crtc_vblank_get/_put()Liu Ying
There is no one calling imx_drm_crtc_vblank_get/_put() and they are just two simple wrappers of drm_crtc_vblank_get/_put() without doing any thing fancy - the drivers may call drm_crtc_vblank_get/_put() directly. So, let's remove the two wrappers. Signed-off-by: Liu Ying <gnuiyl@gmail.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-08-08drm/imx: convey the pixelclk-active and de-active flags from DT to the ↵Lothar Waßmann
ipu-di driver The 'de-active' and 'pixelclk-active' DT properties are evaluated by of_parse_display_timing() called from of_get_drm_display_mode(), but later lost in the conversion from videomode.flags to drm_display_mode.flags. Enhance of_get_drm_display_mode() to also return the bus flags in a separate variable, so that they can be passed on to the ipu-di driver. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-07-29Merge tag 'imx-drm-fixes-2016-07-27' of ↵Dave Airlie
git://git.pengutronix.de/git/pza/linux into drm-next imx-drm ldb mode set fix - fix imx-ldb mode setting, which was broken by commit 49f98bc4d44a4 ("drm/imx: store internal bus configuration in crtc state") * tag 'imx-drm-fixes-2016-07-27' of git://git.pengutronix.de/git/pza/linux: drm/imx: imx-ldb: do not try to dereference crtc->state->state in encoder mode_set
2016-07-27drm/imx: imx-ldb: do not try to dereference crtc->state->state in encoder ↵Philipp Zabel
mode_set The code in imx_ldb_encoder_mode_set crashes with a NULL pointer dereference trying to access crtc->state->state, which was previously cleared by drm_atomic_helper_swap_state: Unable to handle kernel NULL pointer dereference at virtual address 00000010 pgd = ae08c000 [00000010] *pgd=3e00e831, *pte=00000000, *ppte=00000000 Internal error: Oops: 17 [#1] PREEMPT SMP ARM Modules linked in: CPU: 1 PID: 102 Comm: kmsfb-manage Not tainted 4.7.0-rc5+ #232 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) task: ae058c40 ti: ae04e000 task.ti: ae04e000 PC is at imx_ldb_encoder_mode_set+0x138/0x2f8 LR is at 0xae881818 pc : [<8051a8c8>] lr : [<ae881818>] psr: 600f0013 sp : ae04fc70 ip : ae04fbb0 fp : ae04fcbc r10: ae8ea018 r9 : 00000000 r8 : ae246418 r7 : ae8ea010 r6 : ae8ea308 r5 : 00000000 r4 : 00000000 r3 : 00000000 r2 : 00000000 r1 : 00000110 r0 : 00000000 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: 3e08c04a DAC: 00000051 Process kmsfb-manage (pid: 102, stack limit = 0xae04e210) Stack: (0xae04fc70 to 0xae050000) fc60: 043ce660 00000001 0000009e 043ce660 fc80: 00000002 00000000 00000000 af75cf50 00001009 ae23f440 00000001 ae246418 fca0: 8155a210 ae8ea308 8093c364 ae2464e0 ae04fcec ae04fcc0 804ef350 8051a79c fcc0: 00000004 00000004 ae23f440 af3f9000 ae881818 8155a210 af1af200 ae8ea020 fce0: ae04fd1c ae04fcf0 80519124 804ef060 ae04fd34 00000000 00000000 00000000 fd00: ae881818 ae23f440 80d4ec8c 00000000 ae04fd34 ae04fd20 804f00b4 80518fac fd20: ae23f440 00000000 ae04fd54 ae04fd38 804f2190 804f0074 ae23f440 af3f9000 fd40: ae04fdd4 ae881818 ae04fd6c ae04fd58 80516390 804f20f4 ae23f440 00000000 fd60: ae04fd8c ae04fd70 804f26f4 80516348 ae23a000 ae881818 00000001 af3f9000 fd80: ae04fdac ae04fd90 80502c58 804f2678 ae04fe50 ae23f400 00000001 af3f9000 fda0: ae04fe1c ae04fdb0 80507a1c 80502bf8 ae23a000 ae058c40 af1af200 ae23f400 fdc0: ae23a000 af3f9000 ae881818 ae23a00c 80176c7c ae23a000 ae881818 af1af200 fde0: 00000000 00000000 ae23f400 00000001 ae04fe1c 00000051 ae04fe50 8155a210 fe00: 80932060 c06864a2 af3f9000 ae246200 ae04fefc ae04fe20 804f9718 805074e8 fe20: ae04feac ae04fe30 80177360 8017631c 805074dc 00000068 00000068 00000062 fe40: 00000068 000000a2 ae04fe50 7ef29688 7ef29c40 00000000 00000001 00000018 fe60: 00000026 00000000 00000000 00000000 00000001 000115bc 05010500 05a0059f fe80: 03200000 03360321 00000337 0000003c 00000000 00000040 30383231 30303878 fea0: 00000000 00000000 00000000 00000000 00000000 00000000 00004000 aea6a140 fec0: 00000000 80d77b71 00000000 80283110 600f0013 7ef29688 af342bb0 ae250b40 fee0: 80275440 00000003 ae04e000 00000000 ae04ff7c ae04ff00 80274ac8 804f957c ff00: 80283128 80179030 00000000 00000000 80282fd8 ae1e0000 0000003d aea6a1d0 ff20: 00000002 00000003 00004000 007f8c60 c06864a2 7ef29688 ae04e000 00000000 ff40: ae04ff6c ae04ff50 80283260 80282fe4 00017050 ae250b41 00000003 ae250b40 ff60: c06864a2 7ef29688 ae04e000 00000000 ae04ffa4 ae04ff80 80275440 80274a20 ff80: 00017050 00000001 007f8c60 00000036 801088a4 ae04e000 00000000 ae04ffa8 ffa0: 80108700 80275408 00017050 00000001 00000003 c06864a2 7ef29688 000115bc ffc0: 00017050 00000001 007f8c60 00000036 00000003 00000000 00000026 00000018 ffe0: 00016f28 7ef29684 0000b7d9 76e4a1e6 400f0030 00000003 3ff7e861 3ff7ec61 Backtrace: [<8051a790>] (imx_ldb_encoder_mode_set) from [<804ef350>] (drm_atomic_helper_commit_modeset_disables+0x2fc/0x3f0) r10:ae2464e0 r9:8093c364 r8:ae8ea308 r7:8155a210 r6:ae246418 r5:00000001 r4:ae23f440 [<804ef054>] (drm_atomic_helper_commit_modeset_disables) from [<80519124>] (imx_drm_atomic_commit_tail+0x184/0x1e0) r10:ae8ea020 r9:af1af200 r8:8155a210 r7:ae881818 r6:af3f9000 r5:ae23f440 r4:00000004 r3:00000004 [<80518fa0>] (imx_drm_atomic_commit_tail) from [<804f00b4>] (commit_tail+0x4c/0x68) r6:00000000 r5:80d4ec8c r4:ae23f440 [<804f0068>] (commit_tail) from [<804f2190>] (drm_atomic_helper_commit+0xa8/0xd4) r5:00000000 r4:ae23f440 [<804f20e8>] (drm_atomic_helper_commit) from [<80516390>] (drm_atomic_commit+0x54/0x74) r7:ae881818 r6:ae04fdd4 r5:af3f9000 r4:ae23f440 [<8051633c>] (drm_atomic_commit) from [<804f26f4>] (drm_atomic_helper_set_config+0x88/0xac) r5:00000000 r4:ae23f440 [<804f266c>] (drm_atomic_helper_set_config) from [<80502c58>] (drm_mode_set_config_internal+0x6c/0xf4) r7:af3f9000 r6:00000001 r5:ae881818 r4:ae23a000 [<80502bec>] (drm_mode_set_config_internal) from [<80507a1c>] (drm_mode_setcrtc+0x540/0x5b8) r7:af3f9000 r6:00000001 r5:ae23f400 r4:ae04fe50 [<805074dc>] (drm_mode_setcrtc) from [<804f9718>] (drm_ioctl+0x1a8/0x46c) r10:ae246200 r9:af3f9000 r8:c06864a2 r7:80932060 r6:8155a210 r5:ae04fe50 r4:00000051 [<804f9570>] (drm_ioctl) from [<80274ac8>] (do_vfs_ioctl+0xb4/0x9e8) r10:00000000 r9:ae04e000 r8:00000003 r7:80275440 r6:ae250b40 r5:af342bb0 r4:7ef29688 [<80274a14>] (do_vfs_ioctl) from [<80275440>] (SyS_ioctl+0x44/0x6c) r10:00000000 r9:ae04e000 r8:7ef29688 r7:c06864a2 r6:ae250b40 r5:00000003 r4:ae250b41 [<802753fc>] (SyS_ioctl) from [<80108700>] (ret_fast_syscall+0x0/0x1c) r9:ae04e000 r8:801088a4 r7:00000036 r6:007f8c60 r5:00000001 r4:00017050 Code: 1a000018 e596e034 e59e3368 e59331bc (e5930010) ---[ end trace 464e7d3c7f4b9706 ]--- Instead of trying to walk only the connectors in atomic state to which we don't have access, just walk all connectors to find one connected to the current encoder and containing a bus_format description. Fixes: 49f98bc4d44a4 ("drm/imx: store internal bus configuration in crtc state") Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Liu Ying <gnuiyl@gmail.com>
2016-07-19Merge remote-tracking branch 'airlied/drm-next' into topic/drm-miscDaniel Vetter
Backmerge drm-next to be able to apply Chris' connector_unregister_all cleanup (need latest i915 and sun4i state for that). Also there's a trivial conflict in ttm_bo.c that git rerere fails to remember. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-07-18drm/imx: make fbdev support really optionalTobias Jakobi
Currently enabling Freescale i.MX DRM support automatically pulls in fbdev dependency. However this dep is unnecessary since DRM core already handles this for us (DRM_FBDEV_EMULATION). Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1468586897-32298-8-git-send-email-tjakobi@math.uni-bielefeld.de
2016-07-14drm/imx: parallel-display: add bridge supportPhilipp Zabel
Add support for bridge chips connected externally to the i.MX DISP0/DISP1 DPI interfaces. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-07-12drm/imx: parallel-display: check return code from of_get_drm_display_mode()Lothar Waßmann
of_get_drm_display_mode() may fail. Check its return code and bail out on error. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-07-12drm/imx: imx-tve: fix the error messageFabio Estevam
The error message should say "hsync" instead of "vsync" as we have just checked the "fsl,hsync-pin" property. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-07-12drm/imx: imx-tve: remove unneeded 'or' operationFabio Estevam
There is no need for doing an extra 'or' operation when reading the return value from of_property_read_u32(). Just do a simple read instead. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-07-12drm/imx: imx-tve: check the value returned by regulator_set_voltage()Fabio Estevam
regulator_set_voltage() may fail, so we better check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-07-12drm/imx: imx-ldb: check return code on panel attachLucas Stach
Check the return code on panel attach. Avoids a kernel crash later on if the attach failed. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-07-12drm/imx: turn remaining container_of macros into inline functionsPhilipp Zabel
This allows the compiler to do type checking. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-07-12drm/imx: store internal bus configuration in crtc statePhilipp Zabel
The internal bus configuration is imx-drm specific crtc state. Store it in imx_crtc_state and let the encoder atomic_check callbacks determine bus_flags, bus_format and the sync pins, possibly taking into account the mode and the connector display info. The custom imx_drm_encoder structure can be replaced again with drm_encoder. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-07-12drm/imx: remove empty mode_set encoder callbacksPhilipp Zabel
With atomic modeset support, these callbacks are optional. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-07-12drm/imx: atomic phase 3 step 3: Advertise DRIVER_ATOMICLiu Ying
With all the beforehand phases and steps done, we can adverstise DRIVER_ATOMIC. Signed-off-by: Liu Ying <gnuiyl@gmail.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-07-12drm/imx: atomic phase 3 step 2: Legacy callback fixupsLiu Ying
Now that we can use atomic configurations, all the legacy callbacks of CRTCs, encoders and connectors can be switched to the atomic version. For the imx-ldb driver, there is a clock parent setting mismatch bewteen ->enable and ->disable after the switch, so a fixup is added. For the imx-tve driver, since the encoder's callback ->dpms is replaced by ->disable, we need to move the setting for the IPU_CLK_EN bit(in register TVE_COM_CONF_REG) from ->enable/->disable to ->mode_set, otherwise, the relevant CRTC cannot be disabled correctly with a warning on DC stop timeout. Signed-off-by: Liu Ying <gnuiyl@gmail.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-07-12drm/imx: atomic phase 3 step 1: Use atomic configurationLiu Ying
Replacing drm_crtc_helper_set_config() by drm_atomic_helper_set_config() and converting the suspend/resume operations to atomic make us be able to use atomic configurations. All of these allow us to remove the crtc_funcs->mode_set callback as it is no longer used. Also, change the plane_funcs->update/disable_plane callbacks from the transitional version to the atomic version. Furthermore, switching to the pure atomic version of set_config callback means that we may implement CRTC/plane atomic checks by using the new CRTC/plane states instead of the legacy ones and we may remove the private ipu_crtc->enabled state which was left there for the transitional atomic helpers in phase 1. Page flip is also switched to the atomic version. Last, the legacy function drm_helper_disable_unused_functions() is removed from ->load in order not to confuse the atomic driver. Signed-off-by: Liu Ying <gnuiyl@gmail.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-07-12drm/imx: Remove encoders' ->prepare callbacksLiu Ying
The main task of imx encoders' ->prepare callbacks is to set bus_format, bus_flags, di_vsync_pin and di_hsync_pin. We may create a structure named imx_encoder to cache them. The atomic encoder callback ->disable may replace ->prepare later, so let's remove ->prepare. Signed-off-by: Liu Ying <gnuiyl@gmail.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-07-12drm/imx: atomic phase 2 step 2: Track plane_state->fb correctly in ->page_flipLiu Ying
Use drm_atomic_set_fb_for_plane() in the legacy ->page_flip path to track the pointer plane_state->fb correctly. Signed-off-by: Liu Ying <gnuiyl@gmail.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>