This patch removes an unreachable code found by the SVACE static
analysis:
UNREACHABLE_CODE: This statement in the source code might be unreachable
during program execution.
[unreachable] unreachable at drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:787
retval != 0 is always false because at this program point the variable retval
is always equal to 0 at drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:786
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20171212112037.13107-1-s.nawrocki@samsung.com
Change-Id: Ia96459ce8bdd5062f7c51921837462c84586d0cf
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit c4712f27be)
get_modes() callback might be called asynchronously from the DRM core and
it is not synchronized with bridge_enable(), which sets proper runtime PM
state of the main DP device. Fix this by calling pm_runtime_get_sync()
before calling drm_get_edid(), which in turn calls drm_dp_i2c_xfer() and
analogix_dp_transfer() to ensure that main DP device is runtime active
when doing any access to its registers.
This fixes the following kernel issue on Samsung Exynos5250 Snow board:
Unhandled fault: imprecise external abort (0x406) at 0x00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: : 406 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 62 Comm: kworker/0:2 Not tainted 4.13.0-rc2-00364-g4a97a3da420b #3357
Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
Workqueue: events output_poll_execute
task: edc14800 task.stack: edcb2000
PC is at analogix_dp_transfer+0x15c/0x2fc
LR is at analogix_dp_transfer+0x134/0x2fc
pc : [<c0468538>] lr : [<c0468510>] psr: 60000013
sp : edcb3be8 ip : 0000002a fp : 00000001
r10: 00000000 r9 : edcb3cd8 r8 : edcb3c40
r7 : 00000000 r6 : edd3b380 r5 : edd3b010 r4 : 00000064
r3 : 00000000 r2 : f0ad3000 r1 : edcb3c40 r0 : edd3b010
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
Control: 10c5387d Table: 4000406a DAC: 00000051
Process kworker/0:2 (pid: 62, stack limit = 0xedcb2210)
Stack: (0xedcb3be8 to 0xedcb4000)
[<c0468538>] (analogix_dp_transfer) from [<c0424ba4>] (drm_dp_i2c_do_msg+0x8c/0x2b4)
[<c0424ba4>] (drm_dp_i2c_do_msg) from [<c0424e64>] (drm_dp_i2c_xfer+0x98/0x214)
[<c0424e64>] (drm_dp_i2c_xfer) from [<c057b2d8>] (__i2c_transfer+0x140/0x29c)
[<c057b2d8>] (__i2c_transfer) from [<c057b4a4>] (i2c_transfer+0x70/0xe4)
[<c057b4a4>] (i2c_transfer) from [<c0441de4>] (drm_do_probe_ddc_edid+0xb4/0x114)
[<c0441de4>] (drm_do_probe_ddc_edid) from [<c0441e5c>] (drm_probe_ddc+0x18/0x28)
[<c0441e5c>] (drm_probe_ddc) from [<c0445728>] (drm_get_edid+0x124/0x2d4)
[<c0445728>] (drm_get_edid) from [<c0465ea0>] (analogix_dp_get_modes+0x90/0x114)
[<c0465ea0>] (analogix_dp_get_modes) from [<c0425e8c>] (drm_helper_probe_single_connector_modes+0x198/0x68c)
[<c0425e8c>] (drm_helper_probe_single_connector_modes) from [<c04325d4>] (drm_setup_crtcs+0x1b4/0xd18)
[<c04325d4>] (drm_setup_crtcs) from [<c04344a8>] (drm_fb_helper_hotplug_event+0x94/0xd0)
[<c04344a8>] (drm_fb_helper_hotplug_event) from [<c0425a50>] (drm_kms_helper_hotplug_event+0x24/0x28)
[<c0425a50>] (drm_kms_helper_hotplug_event) from [<c04263ec>] (output_poll_execute+0x6c/0x174)
[<c04263ec>] (output_poll_execute) from [<c0136f18>] (process_one_work+0x188/0x3fc)
[<c0136f18>] (process_one_work) from [<c01371f4>] (worker_thread+0x30/0x4b8)
[<c01371f4>] (worker_thread) from [<c013daf8>] (kthread+0x128/0x164)
[<c013daf8>] (kthread) from [<c0108510>] (ret_from_fork+0x14/0x24)
Code: 0a000002 ea000009 e2544001 0a00004a (e59537c8)
---[ end trace cddc7919c79f7878 ]---
Reported-by: Misha Komarovskiy <zombah@gmail.com>
CC: stable@vger.kernel.org # v4.10+
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20171121074936.22520-1-m.szyprowski@samsung.com
Change-Id: I9f2ba9175dd0b733ddd47f601d6bd4207e831eb9
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 510353a637)
We get 2 warnings when building kernel with W=1:
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:1053:5: warning: no previous prototype for 'analogix_dp_get_modes' [-Wmissing-prototypes]
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:1097:1: warning: no previous prototype for 'analogix_dp_detect' [-Wmissing-prototypes]
In fact, both functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
So this patch marks both functions with 'static'.
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1474788764-6069-1-git-send-email-baoyou.xie@linaro.org
Change-Id: Idea810a90652d2f75416bcd0dd590444e1b269a8
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 089cfdd9b0)
If there's a panel connected to the analogix_dp bridge, rely on
the panel driver for modes, rather than reading EDID *and* calling
get_modes() on the panel.
This allows panels with a valid EDID to read it in the panel driver
(e.g. simple_panel), and panels with invalid EDID to homebrew modes
in their get_modes implementation.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: Ic144db2fedfcc10bc5b740cd6aa4f8f4e8452427
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 8c77e2c2a4)
This patch adds Hardware spinlock node support for rk1808 SoC.
Change-Id: I53b3413bfca6a7310a192d029c9fe922fe48964a
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
The Hardware spinlock device on Rockchip platform provides hardware
assistance for synchronization between the multiple processors in the
system.
Change-Id: Ib118dfe38c2ceb665556d5ec3aaf7be13552d2d9
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Add binding documentation for the Rockchip Hardware spinlock.
Change-Id: Iec1bf55196f910323a2158ecd04f31223135242d
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
set gpll 1188M is better for cif 27M\37.125M\74.25M
Change-Id: I05003333980da535b9f20f021c38a2dbcedf74f6
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
vb with done state is can't added to stream.buf_queue
when another stream is started, because this vb is
in queue.done_list.
Change-Id: I7b60d6941953509e5962efae723d36b516b4185c
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
* linux-linaro-lsk-v4.4-android: (1212 commits)
ANDROID: sdcardfs: Change current->fs under lock
ANDROID: sdcardfs: Don't use OVERRIDE_CRED macro
ANDROID: restrict store of prefer_idle as boolean
BACKPORT: arm/syscalls: Optimize address limit check
UPSTREAM: syscalls: Use CHECK_DATA_CORRUPTION for addr_limit_user_check
BACKPORT: arm64/syscalls: Check address limit on user-mode return
BACKPORT: x86/syscalls: Check address limit on user-mode return
BACKPORT: lkdtm: add bad USER_DS test
UPSTREAM: bug: switch data corruption check to __must_check
BACKPORT: lkdtm: Add tests for struct list corruption
UPSTREAM: bug: Provide toggle for BUG on data corruption
UPSTREAM: list: Split list_del() debug checking into separate function
UPSTREAM: rculist: Consolidate DEBUG_LIST for list_add_rcu()
BACKPORT: list: Split list_add() debug checking into separate function
FROMLIST: ANDROID: binder: Add BINDER_GET_NODE_INFO_FOR_REF ioctl.
BACKPORT: arm64/vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW
ANDROID: arm64: mm: fix 4.4.154 merge
BACKPORT: zsmalloc: introduce zs_huge_class_size()
BACKPORT: zram: drop max_zpage_size and use zs_huge_class_size()
ANDROID: tracing: fix race condition reading saved tgids
...
Change-Id: I9f23db35eb926b6fa0d7af7dbbb55c9a37d536fc
Recent ION do not support ion_handle_get_by_id. So ION_IOC_GET_PHYS
is broken. Remove custom ioctl support entirely.
Change-Id: I591d4b8521a96d17cd2171c7b364e44d1b97cf24
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
On some platform, it needs aclk/hclk/sclk for using iommu.
Change-Id: Iaf60124e225d418af8bbf1e0b4a31e907358fcfd
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Android Go device require this config for performance test,
enable it by default.
Test: ./performance_test/system/checkout_f2fs.sh
Change-Id: Id5a9b33da24eec768d60e158af72dd9af216f653
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
Set vsel gpio low to disable vdd_npu.
Set vsel gpio high to enable vdd_npu.
The vsel pin is pull up by hw default.
Change-Id: I86ef1f2d6d2a0dd26a128cba1e52a140e6844291
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Android Go device require this config for performance test,
enable it by default.
Test: ./performance_test/system/checkout_f2fs.sh
Change-Id: If6d07a82546759f672df8519d113a702c3bcfbe3
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
Make sure messages are not affected by locale environment variables.
Change-Id: Id5606c1a8e1f7a8f09d4e14c4531daebaceef2bf
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Allow enables the acknowledge request after each packet transmission.
Change-Id: Ie8b2e49da0f2cae8bf99b4b555d42fbb640f8e37
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Most of TLP is contributed by the counter programming:
TLP = ((counter_threshold + 1) x TXBYTECLKHS) + constant_time
where:
constant_time corresponds to internal D-PHY FSM state and
Analog Front End (AFE) timing variation
Change-Id: Icee77dee0772afbcecc5e883572061162ed0fc4f
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
The pinctrl-rockchip driver get the clock resource by of_clk_get
within the index 0 which requires the index of pclk_gpio should
be fixed to 0.
Change-Id: I619f12cb53002996d96f142c8889852be75c61e7
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
/dev/vpu is the old device name. New driver always use vpu_service
as default vcodec driver name.
Change-Id: I19896d92336291d0035fa4ed7b466cb64fd96d78
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>