[PATCH v6 2/2] drm: Prevent release fb after cleanup mode config

2017-04-10 Thread Jeffy Chen
After unbinding drm, the user space may still owns the drm dev fd, and may trigger fb release after cleanup mode config. Add a sanity check to prevent that. Signed-off-by: Jeffy Chen --- Changes in v6: None Changes in v5: None Changes in v2: None drivers/gpu/drm/drm_framebuffer.c | 5

[PATCH v6 1/2] drm: Unplug drm device when unregistering it

2017-04-10 Thread Jeffy Chen
After unbinding drm, the user space may still owns the drm dev fd, and may still be able to call drm ioctl. We're using an unplugged state to prevent something like that, so let's reuse it here. Signed-off-by: Jeffy Chen --- Changes in v6: Address Daniel Vetter 's comments. Cha

[PATCH v6 0/2] drm: rockchip: Fix rockchip drm unbind crash error

2017-04-10 Thread Jeffy Chen
Verified on rk3399 chromebook kevin, no more crashes during unbind/bind drm. Changes in v6: Address Daniel Vetter 's comments. Changes in v5: Fix wrong git account. Changes in v2: Fix some commit messages. Jeffy Chen (2): drm: Unplug drm device when unregistering it drm: Prevent re

[PATCH v5 05/12] drm/rockchip: cdn-dp: Don't try to release firmware when not loaded

2017-04-06 Thread Jeffy Chen
Signed-off-by: Jeffy Chen --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/gpu/drm/rockchip/cdn-dp-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp

[PATCH v5 12/12] drm/drm_ioctl.c: Break ioctl when drm device not registered

2017-04-06 Thread Jeffy Chen
After unbinding drm, the user space may still owns the drm dev fd, and may still be able to call drm ioctl. Add a sanity check here to prevent that from happening. Signed-off-by: Jeffy Chen --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/gpu/drm

[PATCH v5 09/12] drm/rockchip: analogix_dp: Disable clock when unbinding

2017-04-06 Thread Jeffy Chen
The clock is enabled when binding cdn dp. Signed-off-by: Jeffy Chen --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH v5 11/12] drm/rockchip: Shutdown all crtcs when unbinding drm

2017-04-06 Thread Jeffy Chen
Signed-off-by: Jeffy Chen --- Changes in v5: None Changes in v4: None Changes in v3: Address Daniel Vetter 's comments. Update commit message. Changes in v2: None drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/roc

[PATCH v5 08/12] drm/rockchip: vop: Unprepare clocks when unbinding

2017-04-06 Thread Jeffy Chen
The clocks are prepared when binding vop. Signed-off-by: Jeffy Chen --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/rockchip

[PATCH v5 10/12] drm/rockchip: Reoder drm bind/unbind sequence

2017-04-06 Thread Jeffy Chen
Current drm bind/unbind sequence would cause some memory issues. For example we should not cleanup iommu before cleanup mode config. Reorder bind/unbind sequence, follow exynos drm. Signed-off-by: Jeffy Chen --- Changes in v5: None Changes in v4: None Changes in v3: Address Sean Paul &#

[PATCH v5 07/12] drm/rockchip: vop: Enable pm domain before vop_initial

2017-04-06 Thread Jeffy Chen
ial to the end of vop_bind for eaiser error handling. 2/ correct the err_put_pm_runtime of vop_enable. Signed-off-by: Jeffy Chen --- Changes in v5: None Changes in v4: None Changes in v3: Address Sean Paul 's comments. Update commit message. Changes in v2: None drivers/g

[PATCH v5 06/12] drm/rockchip: cdn-dp: Don't unregister audio dev when unbinding

2017-04-06 Thread Jeffy Chen
After snd_soc_unregister_codec, the dai link would remain bound to the invalid codec. That would cause crashes after unbind dp driver. Let's unregister audio codec when removing dp driver to prevent that. Signed-off-by: Jeffy Chen --- Changes in v5: None Changes in v4: None Changes

[PATCH v5 04/12] drm: bridge: analogix: Destroy connector & encoder when unbinding

2017-04-06 Thread Jeffy Chen
nbind. Signed-off-by: Jeffy Chen --- Changes in v5: None Changes in v4: Address Andrzej Hajda 's comments. Changes in v3: None Changes in v2: None drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/bridg

[PATCH v5 02/12] drm: bridge: analogix: Unregister dp aux when unbinding

2017-04-06 Thread Jeffy Chen
The dp aux is registered when binding analogix dp. Signed-off-by: Jeffy Chen Reviewed-by: Andrzej Hajda --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH v5 03/12] drm: bridge: analogix: Disable clock when unbinding

2017-04-06 Thread Jeffy Chen
The clock is enabled when binding analogix dp. Signed-off-by: Jeffy Chen --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/bridge/analogix

[PATCH v5 01/12] drm: bridge: analogix: Detach panel when unbinding analogix dp

2017-04-06 Thread Jeffy Chen
The panel is attached when binding analogix dp. Signed-off-by: Jeffy Chen Reviewed-by: Andrzej Hajda --- Changes in v5: Fix wrong git account. Changes in v4: None Changes in v3: None Changes in v2: Fix some commit messages. drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 ++ 1 file

[PATCH v5 00/12] drm: rockchip: Fix rockchip drm unbind crash error

2017-04-06 Thread Jeffy Chen
dress Sean Paul 's comments. Update commit message. Address Daniel Vetter 's comments. Update commit message. Changes in v2: Fix some commit messages. Jeffy Chen (12): drm: bridge: analogix: Detach panel when unbinding analogix dp drm: bridge: analogix: Unregister dp aux when unbinding dr

[PATCH] mailmap: update Yakir Yang email address

2017-04-05 Thread Jeffy Chen
Set current email address to replace previous employers email addresses. Signed-off-by: Jeffy Chen --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index e775f79..de0fc5b 100644 --- a/.mailmap +++ b/.mailmap @@ -172,6 +172,7 @@ Vlad Dogaru Vladimir

[PATCH] get_maintainer: Add Yakir Yang to .get_maintainer.ignore

2017-04-05 Thread Jeffy Chen
The mail account "Yakir Yang " is no longer valid. Some mail server(for example 263) would refuse to send mails when the address list contains this account. Update .get_maintainer.ignore to prevent that. Signed-off-by: Jeffy Chen --- .get_maintainer.ignore | 1 + 1 file changed, 1

[PATCH] get_maintainer: apply all .get_maintainer.ignore files

2017-04-05 Thread Jeffy Chen
Currently we are searching "./:$ENV{HOME}/:.scripts/" for ignore file, but would always get "./.get_maintainer.ignore" only. This patch applies all .get_maintainer.ignore, so it would be easier to add ignore list locally. Signed-off-by: Jeffy Chen --- scripts/ge

[PATCH v3 3/9] drm: bridge: analogix: Destroy connector when unbinding

2017-04-05 Thread Jeffy Chen
Normally we do this in drm_mode_config_cleanup. But analogix dp's connector is allocated in bind, and freed after unbind. So we need to destroy it in unbind to avoid further access. Signed-off-by: Jeffy Chen --- Changes in v3: None Changes in v2: None drivers/gpu/drm/bridge/ana

[PATCH v3 4/9] drm/rockchip: cdn-dp: Don't try to release firmware when not loaded

2017-04-05 Thread Jeffy Chen
Signed-off-by: Jeffy Chen --- Changes in v3: None Changes in v2: None drivers/gpu/drm/rockchip/cdn-dp-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c index 4e55d63..ee4195d 100644

[PATCH v3 2/9] drm: bridge: analogix: Unregister dp aux when unbinding

2017-04-05 Thread Jeffy Chen
The dp aux is registered when binding analogix dp. Signed-off-by: Jeffy Chen --- Changes in v3: None Changes in v2: None drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm

[PATCH v3 9/9] drm/rockchip: cdn-dp: Don't unregister audio dev when unbinding

2017-04-05 Thread Jeffy Chen
After snd_soc_unregister_codec, the dai link would remain bound to the invalid codec. That would cause crashes after unbind dp driver. Let's unregister audio codec when removing dp driver to prevent that. Signed-off-by: Jeffy Chen --- Changes in v3: Update commit message. Changes in v2:

[PATCH v3 8/9] drm/rockchip: gem: Don't alloc/free gem buf when dev_private is invalid

2017-04-05 Thread Jeffy Chen
After unbinding drm, the userspace may still has a chance to access gem buf. Add a sanity check for a NULL dev_private to prevent that from happening. Signed-off-by: Jeffy Chen --- Changes in v3: Address Daniel Vetter 's comments. Update commit message. Changes in v2: None drivers/gp

[PATCH v3 5/9] drm/rockchip: vop: Enable pm domain before vop_initial

2017-04-05 Thread Jeffy Chen
ial to the end of vop_bind for eaiser error handling. 2/ correct the err_put_pm_runtime of vop_enable. Signed-off-by: Jeffy Chen --- Changes in v3: Address Sean Paul 's comments. Update commit message. Changes in v2: None drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 29 +

[PATCH v3 0/9] drm: rockchip: Fix rockchip drm unbind crash error

2017-04-05 Thread Jeffy Chen
ddress Daniel Vetter 's comments. Update commit message. Update commit message. Changes in v2: Fix some commit messages. Jeffy Chen (9): drm: bridge: analogix: Detach panel when unbinding analogix dp drm: bridge: analogix: Unregister dp aux when unbinding drm: bridge: analogix: Destroy co

[PATCH v3 6/9] drm/rockchip: Reoder drm bind/unbind sequence

2017-04-05 Thread Jeffy Chen
Current drm bind/unbind sequence would cause some memory issues. For example we should not cleanup iommu before cleanup mode config. Reorder bind/unbind sequence, follow exynos drm. Signed-off-by: Jeffy Chen --- Changes in v3: Address Sean Paul 's comments. Update commit message. Chang

[PATCH v3 7/9] drm/rockchip: Shutdown all crtcs when unbinding drm

2017-04-05 Thread Jeffy Chen
Signed-off-by: Jeffy Chen --- Changes in v3: Address Daniel Vetter 's comments. Update commit message. Changes in v2: None drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/roc

[PATCH v3 1/9] drm: bridge: analogix: Detach panel when unbinding analogix dp

2017-04-05 Thread Jeffy Chen
The panel is attached when binding analogix dp. Signed-off-by: Jeffy Chen --- Changes in v3: None Changes in v2: Fix some commit messages. drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/bridge/analogix

[PATCH v5 0/1] Fix memory leak in of_pci_get_host_bridge_resources

2017-04-04 Thread Jeffy Chen
some comments. Changes in v2: Don't change the resource_list_create_entry's behavior. Jeffy Chen (1): of/pci: Fix memory leak in of_pci_get_host_bridge_resources drivers/of/of_pci.c | 51 ++- drivers/pci/bus.c | 7 ++- 2 files c

[PATCH v5] of/pci: Fix memory leak in of_pci_get_host_bridge_resources

2017-04-04 Thread Jeffy Chen
Currently we only free the allocated resource struct when error. This would cause memory leak after pci_free_resource_list. Signed-off-by: Jeffy Chen --- Changes in v5: Fix some careless compile errors. Changes in v4: Use IORESOURCE_AUTO to mark struct resources which could be copied. Changes

[PATCH v4 0/1] Fix memory leak in of_pci_get_host_bridge_resources

2017-04-04 Thread Jeffy Chen
e the resource_list_create_entry's behavior. Jeffy Chen (1): of/pci: Fix memory leak in of_pci_get_host_bridge_resources drivers/of/of_pci.c | 51 ++- drivers/pci/bus.c | 7 ++- 2 files changed, 24 insertions(+), 34 deletions(-) -- 2.1.4

[PATCH v4] of/pci: Fix memory leak in of_pci_get_host_bridge_resources

2017-04-04 Thread Jeffy Chen
Currently we only free the allocated resource struct when error. This would cause memory leak after pci_free_resource_list. Signed-off-by: Jeffy Chen --- Changes in v4: Use IORESOURCE_AUTO to mark struct resources which could be copied. Changes in v3: Add some comments. Changes in v2: Don&#

[PATCH v2] input: cros_ec_keyb: Report wakeup events

2017-04-01 Thread Jeffy Chen
Report wakeup events when process events. Signed-off-by: Jeffy Chen --- Changes in v2: Remove unneeded dts changes. drivers/input/keyboard/cros_ec_keyb.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c

[PATCH v2 0/1] Set cros_ec_keyb as a wakeup source

2017-04-01 Thread Jeffy Chen
This patches set cros_ec_keyb as a wakeup source, so the chromeos's powerd can control the keyboard's wakeup ability along with other ec event sources. Changes in v2: Remove unneeded dts changes. Jeffy Chen (1): input: cros_ec_keyb: Report wakeup events drivers/input/keyboard/cros

[PATCH v2 9/9] drm/rockchip: cdn-dp: Don't unregister audio dev when unbinding

2017-04-01 Thread Jeffy Chen
In current sound framework, there's no way to unbind dai link after unregister codec. So move unregister codec to driver remove for now. Signed-off-by: Jeffy Chen --- Changes in v2: None drivers/gpu/drm/rockchip/cdn-dp-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH v2 5/9] drm/rockchip: vop: Enable pm domain when resetting vop

2017-04-01 Thread Jeffy Chen
Signed-off-by: Jeffy Chen --- Changes in v2: None drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 31 +++-- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index

[PATCH v2 8/9] drm/rockchip: gem: Don't alloc/free gem buf before drm dev registered

2017-04-01 Thread Jeffy Chen
Signed-off-by: Jeffy Chen --- Changes in v2: None drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c index df9e570..2bf8024 100644 --- a/drivers/gpu

[PATCH v2 7/9] drm/rockchip: Force disable all crtc when unload

2017-04-01 Thread Jeffy Chen
Signed-off-by: Jeffy Chen --- Changes in v2: None drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index a5d83cb..5dbf011 100644 --- a/drivers/gpu/drm

[PATCH v2 4/9] drm/rockchip: cdn-dp: Don't try to release firmware when not loaded

2017-04-01 Thread Jeffy Chen
Signed-off-by: Jeffy Chen --- Changes in v2: None drivers/gpu/drm/rockchip/cdn-dp-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c index fd79a70..a97f3f4 100644 --- a/drivers/gpu/drm

[PATCH v2 2/9] drm: bridge: analogix: Unregister dp aux when unbinding

2017-04-01 Thread Jeffy Chen
The dp aux is registered when binding analogix dp. Signed-off-by: Jeffy Chen --- Changes in v2: None drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix

[PATCH v2 0/9] drm: rockchip: Fix rockchip drm unbind crash error

2017-04-01 Thread Jeffy Chen
Verified on rk3399 chromebook kevin: 1/ stop ui && pkill -9 frecon 2/ unbind/bind drm Changes in v2: Fix some commit messages. Jeffy Chen (9): drm: bridge: analogix: Detach panel when unbinding analogix dp drm: bridge: analogix: Unregister dp aux when unbinding drm: bridge:

[PATCH v2 3/9] drm: bridge: analogix: Destroy connector when unbinding

2017-04-01 Thread Jeffy Chen
Normally we do this in drm_mode_config_cleanup. But analogix dp's connector is allocated in bind, and freed after unbind. So we need to destroy it in unbind to avoid further access. Signed-off-by: Jeffy Chen --- Changes in v2: None drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1

[PATCH v2 1/9] drm: bridge: analogix: Detach panel when unbinding analogix dp

2017-04-01 Thread Jeffy Chen
The panel is attached when binding analogix dp. Signed-off-by: Jeffy Chen --- Changes in v2: Fix some commit messages. drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm

[PATCH v2 6/9] drm/rockchip: Reoder unload sequence

2017-04-01 Thread Jeffy Chen
We should not cleanup iommu before cleanup other resources. Reorder unload sequence, follow exynos drm. Signed-off-by: Jeffy Chen --- Changes in v2: None drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm

[PATCH 8/9] drm/rockchip: gem: Don't alloc/free gem buf before drm dev registered

2017-04-01 Thread Jeffy Chen
Signed-off-by: Jeffy Chen --- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c index df9e570..19679b2 100644 --- a/drivers/gpu/drm/rockchip

[PATCH 9/9] drm/rockchip: cdn-dp: Don't unregister audio dev when unbinding

2017-04-01 Thread Jeffy Chen
In current sound framework, there's no way to unbind dai link after unregister codec. So don't unregister the codec when unbinding for now. Signed-off-by: Jeffy Chen --- drivers/gpu/drm/rockchip/cdn-dp-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 7/9] drm/rockchip: Force disable all crtc when unload

2017-04-01 Thread Jeffy Chen
Signed-off-by: Jeffy Chen --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index a5d83cb..5dbf011 100644 --- a/drivers/gpu/drm/rockchip

[PATCH 6/9] drm/rockchip: Reoder unload sequence

2017-04-01 Thread Jeffy Chen
We should don't cleanup iommu before cleanup other resources. Reorder unload sequence, follow exynos drm. Signed-off-by: Jeffy Chen --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/roc

[PATCH 2/9] drm: bridge: analogix: Unregister dp aux when unbinding

2017-04-01 Thread Jeffy Chen
The dp aux is registered when binding analogix dp. Signed-off-by: Jeffy Chen --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index

[PATCH 4/9] drm/rockchip: cdn-dp: Don't try to release firmware when not loaded

2017-04-01 Thread Jeffy Chen
Signed-off-by: Jeffy Chen --- drivers/gpu/drm/rockchip/cdn-dp-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c index fd79a70..a97f3f4 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c

[PATCH 5/9] drm/rockchip: vop: Enable pm domain when resetting vop

2017-04-01 Thread Jeffy Chen
Signed-off-by: Jeffy Chen --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 31 +++-- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 76c79ac..1d85319 100644

[PATCH 1/9] drm: bridge: analogix: Detach panel when unbinding analogix dp

2017-04-01 Thread Jeffy Chen
The panel is attached when binding analogix dp. Signed-off-by: Jeffy Chen --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index

[PATCH 3/9] drm: bridge: analogix: Destroy connector when unbinding

2017-04-01 Thread Jeffy Chen
Normally we do this in drm_mode_config_cleanup. But analogix dp's connector is allocated when binding, and would be freed after unbind. So we need to destroy it when unbinding, to avoid further access. Signed-off-by: Jeffy Chen --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1

[PATCH 0/9] drm: rockchip: Fix rockchip drm unbind crash error

2017-04-01 Thread Jeffy Chen
Verified on rk3399 chromebook kevin: 1/ stop ui && pkill -9 frecon 2/ unbind/bind drm Jeffy Chen (9): drm: bridge: analogix: Detach panel when unbinding analogix dp drm: bridge: analogix: Unregister dp aux when unbinding drm: bridge: analogix: Destroy connector when unbindi

[PATCH 2/2] ARM: dts: cros-ec-keyboard: Enable as wakeup source

2017-03-30 Thread Jeffy Chen
Enable cros-ec-keyboard as a wakeup source. Signed-off-by: Jeffy Chen --- arch/arm/boot/dts/cros-ec-keyboard.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/cros-ec-keyboard.dtsi b/arch/arm/boot/dts/cros-ec-keyboard.dtsi index c0451051..3168a5e 100644 --- a/arch/arm

[PATCH 1/2] input: cros_ec_keyb: Report wakeup events

2017-03-30 Thread Jeffy Chen
Report wakeup events when process events. Signed-off-by: Jeffy Chen --- drivers/input/keyboard/cros_ec_keyb.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c index 6a250d6..a93d55f 100644 --- a/drivers

[PATCH 0/2] This patches set cros_ec_keyb as a wakeup source, so the chromeos's powerd

2017-03-30 Thread Jeffy Chen
can control the keyboard's wakeup ability along with other ec event sources. Jeffy Chen (2): input: cros_ec_keyb: Report wakeup events ARM: dts: cros-ec-keyboard: Enable as wakeup source arch/arm/boot/dts/cros-ec-keyboard.dtsi | 1 + drivers/input/keyboard/cros_ec_keyb.c | 9 +++

[PATCH v3 1/2] PCI: return resource_entry in pci_add_resource helpers

2017-03-23 Thread Jeffy Chen
Signed-off-by: Jeffy Chen --- Changes in v3: None Changes in v2: None drivers/pci/bus.c | 13 - include/linux/pci.h | 8 +--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index bc56cf1..36a1861 100644 --- a/drivers/pci

[PATCH v3 0/2] Fix memory leak in of_pci_get_host_bridge_resources

2017-03-23 Thread Jeffy Chen
In of_pci_get_host_bridge_resources, we alloced some struct resource variables, and they would cause memory leak since no where to free them. Changes in v3: Add some comments. Changes in v2: Don't change the resource_list_create_entry's behavior. Jeffy Chen (2): PCI: return resourc

[PATCH v3 2/2] of/pci: Fix memory leak in of_pci_get_host_bridge_resources

2017-03-23 Thread Jeffy Chen
Currently we only free the allocated resource struct when error. This would cause memory leak after pci_free_resource_list. Signed-off-by: Jeffy Chen --- Changes in v3: Add some comments. Changes in v2: Don't change the resource_list_create_entry's behavior. drivers/of/of_

[PATCH v2 1/2] PCI: return resource_entry in pci_add_resource helpers

2017-03-23 Thread Jeffy Chen
Signed-off-by: Jeffy Chen --- Changes in v2: None drivers/pci/bus.c | 13 - include/linux/pci.h | 8 +--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index bc56cf1..36a1861 100644 --- a/drivers/pci/bus.c +++ b/drivers

[PATCH v2 2/2] of/pci: Fix memory leak in of_pci_get_host_bridge_resources

2017-03-23 Thread Jeffy Chen
Currently we only free the allocated resource struct when error. This would cause memory leak after pci_free_resource_list. Signed-off-by: Jeffy Chen --- Changes in v2: Don't change the resource_list_create_entry's behavior. drivers/of/of_

[PATCH v2 0/2] Fix memory leak in of_pci_get_host_bridge_resources

2017-03-23 Thread Jeffy Chen
In of_pci_get_host_bridge_resources, we alloced some struct resource variables, and they would cause memory leak since no where to free them. Changes in v2: Don't change the resource_list_create_entry's behavior. Jeffy Chen (2): PCI: return resource_entry in pci_add_resource helper

[PATCH v8] drm/rockchip: Refactor the component match logic.

2017-03-21 Thread Jeffy Chen
Currently we are adding all components from the dts, if one of their drivers been disabled, we would not be able to bring up others. Refactor component match logic, follow exynos drm. Signed-off-by: Jeffy Chen Reviewed-by: Andrzej Hajda Acked-by: Mark Yao Tested-by: Heiko Stuebner

[PATCH 2/2] of/pci: Fix memory leak in of_pci_get_host_bridge_resources

2017-03-21 Thread Jeffy Chen
Currently we only free the allocated resource struct when error. This would cause memory leak after pci_free_resource_list. Signed-off-by: Jeffy Chen --- drivers/of/of_pci.c | 48 +++- 1 file changed, 15 insertions(+), 33 deletions(-) diff --git a

[PATCH 1/2] resource: Copy the whole res in resource_list_create_entry

2017-03-21 Thread Jeffy Chen
We do this so the callers may not need worry about when to free the allocated resource struct. Signed-off-by: Jeffy Chen --- kernel/resource.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/resource.c b/kernel/resource.c index 9b5f044..f3594f8 100644 --- a/kernel

[PATCH v6] drm/rockchip: Refactor the component match logic.

2017-03-19 Thread Jeffy Chen
Currently we are adding all components from the dts, if one of their drivers been disabled, we would not be able to bring up others. Refactor component match logic, follow exynos drm. Signed-off-by: Jeffy Chen Reviewed-by: Andrzej Hajda Acked-by: Mark Yao --- Changes in v6: Add Mark Yao &#

[PATCH v4] drm/rockchip: Refactor the component match logic.

2017-03-15 Thread Jeffy Chen
Currently we are adding all components from the dts, if one of their drivers been disabled, we would not be able to bring up others. Refactor component match logic, follow exynos drm. Signed-off-by: Jeffy Chen Reviewed-by: Andrzej Hajda --- Changes in v4: Use platform_driver helpers to

[PATCH v3] drm/rockchip: Refactor the component match logic.

2017-03-15 Thread Jeffy Chen
Currently we are adding all components from the dts, if one of their drivers been disabled, we would not be able to bring up others. Refactor component match logic, follow exynos drm. Signed-off-by: Jeffy Chen Reviewed-by: Andrzej Hajda --- Changes in v3: Address Andrzej Hajda 's com

[PATCH v2] drm/rockchip: Refactor the component match logic.

2017-03-14 Thread Jeffy Chen
Currently we are adding all components from the dts, if one of their drivers been disabled, we would not be able to bring up others. Refactor component match logic, follow exynos drm. Signed-off-by: Jeffy Chen --- drivers/gpu/drm/rockchip/Kconfig| 10 +- drivers/gpu/drm

[PATCH] drm/rockchip: Refactor the component match logic.

2017-03-07 Thread Jeffy Chen
Currently we are adding all components from the dts, if one of their drivers been disabled, we would not be able to bring up others. Refactor component match logic, follow exynos drm. Signed-off-by: Jeffy Chen --- drivers/gpu/drm/rockchip/Kconfig| 10 +- drivers/gpu/drm

[PATCH] pinctrl: rockchip: add irq_enable & irq_disable ops

2017-03-01 Thread Jeffy Chen
k irq_disable-> noop irq_enable-> enable clk again irq_disable-> noop Signed-off-by: Jeffy Chen --- drivers/pinctrl/pinctrl-rockchip.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pin

[PATCH 1/3] btusb: wake system up when receives a wake irq

2017-02-23 Thread Jeffy Chen
Currrently we are disabling this wake irq after receiving it. If this happens before we finish suspend and the pm event check is disabled, the system will continue suspending, and this irq would not work again. We may need to abort system suspend to avoid that. Signed-off-by: Jeffy Chen

[PATCH 2/3] btmrvl: wake system up when receives a wake irq

2017-02-23 Thread Jeffy Chen
Currrently we are disabling this wake irq after receiving it. If this happens before we finish suspend and the pm event check is disabled, the system will continue suspending, and this irq would not work again. We may need to abort system suspend to avoid that. Signed-off-by: Jeffy Chen

[PATCH 3/3] mwifiex: wake system up when receives a wake irq

2017-02-23 Thread Jeffy Chen
Currrently we are disabling this wake irq after receiving it. If this happens before we finish suspend and the pm event check is disabled, the system will continue suspending, and this irq would not work again. We may need to abort system suspend to avoid that. Signed-off-by: Jeffy Chen

[PATCH v4 3/3] Bluetooth: hidp: fix possible might sleep error in hidp_session_thread

2017-02-13 Thread Jeffy Chen
(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen 1/ Fix could not wake up by wake attempts on original

[PATCH v4 2/3] Bluetooth: cmtp: fix possible might sleep error in cmtp_session

2017-02-13 Thread Jeffy Chen
(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen Reviewed-by: Brian Norris Remove unnecessary memory ba

[PATCH v4 1/3] Bluetooth: bnep: fix possible might sleep error in bnep_session

2017-02-13 Thread Jeffy Chen
(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen Reviewed-by: Brian Norris --- Changes in v3: Add br

[PATCH v3 1/3] Bluetooth: bnep: fix possible might sleep error in bnep_session

2017-02-12 Thread Jeffy Chen
(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen Reviewed-by: Brian Norris --- Changes in v3: Add br

[PATCH v3 3/3] Bluetooth: hidp: fix possible might sleep error in hidp_session_thread

2017-02-12 Thread Jeffy Chen
(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen 1/ Fix could not wake up by wake attempts on original

[PATCH v3 2/3] Bluetooth: cmtp: fix possible might sleep error in cmtp_session

2017-02-12 Thread Jeffy Chen
(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen Reviewed-by: Brian Norris Remove unnecessary memory ba

[PATCH v2 3/3] Bluetooth: hidp: fix possible might sleep error in hidp_session_thread

2017-02-12 Thread Jeffy Chen
(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen 1/ Fix could not wake up by wake attempts on original

[PATCH v2 2/3] Bluetooth: cmtp: fix possible might sleep error in cmtp_session

2017-02-12 Thread Jeffy Chen
(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen Remove unnecessary memory barrier before wake_up_* func

[PATCH v2 1/3] Bluetooth: bnep: fix possible might sleep error in bnep_session

2017-02-12 Thread Jeffy Chen
(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen --- Changes in v2: Remove unnecessary memory barrier b

[PATCH 1/3] Bluetooth: bnep: fix possible might sleep error in bnep_session

2017-01-23 Thread Jeffy Chen
(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen --- net/bluetooth/bnep/core.c | 15 +-- 1

[PATCH 2/3] Bluetooth: cmtp: fix possible might sleep error in cmtp_session

2017-01-23 Thread Jeffy Chen
(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen --- net/bluetooth/cmtp/core.c | 21 ++-

[PATCH 3/3] Bluetooth: hidp: fix possible might sleep error in hidp_session_thread

2017-01-23 Thread Jeffy Chen
(); } __set_current_state(TASK_RUNNING); Which fixed at: dfb2fae Bluetooth: Fix nested sleeps So let's fix it at the same way, also follow the suggestion of: https://lwn.net/Articles/628628/ Signed-off-by: Jeffy Chen --- net/bluetooth/hidp/core.c

[PATCH v2 3/3] btmrvl: use dt's irqflags for wakeup pin

2017-01-22 Thread Jeffy Chen
Use irqflags parsed from dt. Signed-off-by: Jeffy Chen Reviewed-by: Brian Norris --- Changes in v2: None drivers/bluetooth/btmrvl_sdio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c index 796f719

[PATCH v2 2/3] btmrvl: set irq_bt to -1 when failed to parse it

2017-01-22 Thread Jeffy Chen
The irq_of_parse_and_map will return 0 as a invalid irq. Set irq_bt to -1 in this case, so that the btmrvl resume/suspend code would not try to enable/disable it. Signed-off-by: Jeffy Chen Reviewed-by: Brian Norris --- Changes in v2: Update commit message. drivers/bluetooth/btmrvl_sdio.c

[PATCH v2 1/3] btmrvl: avoid double-disable_irq() race

2017-01-22 Thread Jeffy Chen
IRQ and enable it in case if we have double-disabled it." Signed-off-by: Jeffy Chen Reviewed-by: Brian Norris --- Changes in v2: Update commit message. drivers/bluetooth/btmrvl_sdio.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/bluetooth/btmrvl_s

[PATCH] Bluetooth: hidp: might sleep error in hidp_session_thread

2017-01-20 Thread Jeffy Chen
-off-by: Jeffy Chen --- net/bluetooth/hidp/core.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 0bec458..bfd3fb8 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c @@ -1180,7

[PATCH 1/3] btmrvl: avoid double-disable_irq() race

2017-01-20 Thread Jeffy Chen
It's much the same as what we did for mwifiex in: b9da4d2 mwifiex: avoid double-disable_irq() race Signed-off-by: Jeffy Chen --- drivers/bluetooth/btmrvl_sdio.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/blue

[PATCH 2/3] btmrvl: set irq_bt to -1 when failed to parse it

2017-01-20 Thread Jeffy Chen
The irq_of_parse_and_map will return 0 as a invalid irq. Set irq_bt to -1 in this case, so that the btmrvl resume/suspend code would not get confused. Signed-off-by: Jeffy Chen --- drivers/bluetooth/btmrvl_sdio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/bluetooth

[PATCH 3/3] btmrvl: use dt's irqflags for wakeup pin

2017-01-20 Thread Jeffy Chen
Use irqflags parsed from dt. Signed-off-by: Jeffy Chen --- drivers/bluetooth/btmrvl_sdio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c index 796f719..23711fe 100644 --- a/drivers/bluetooth/btmrvl_sdio.c

Re: [v11,3/3] Bluetooth: hci_uart: Support firmware download for Marvell

2016-06-23 Thread Jeffy Chen
+} diff --git a/drivers/bluetooth/hci_uart.h b/drivers/bluetooth/hci_uart.h index 17ba3b4..8c53b50 100644 --- a/drivers/bluetooth/hci_uart.h +++ b/drivers/bluetooth/hci_uart.h @@ -35,7 +35,7 @@ #define HCIUARTGETFLAGS _IOR('U', 204, int) /* UART protocols */ -#define HCI_UART_MAX_PROTO 10 +#define HCI_UART_MAX_PROTO 11 #define HCI_UART_H4 0 #define HCI_UART_BCSP 1 @@ -47,6 +47,7 @@ #define HCI_UART_BCM 7 #define HCI_UART_QCA 8 #define HCI_UART_AG6XX9 +#define HCI_UART_MRVL 10 #define HCI_UART_RAW_DEVICE 0 #define HCI_UART_RESET_ON_INIT1 @@ -192,3 +193,8 @@ int qca_deinit(void); int ag6xx_init(void); int ag6xx_deinit(void); #endif + +#ifdef CONFIG_BT_HCIUART_MRVL +int mrvl_init(void); +int mrvl_deinit(void); +#endif This serial of patches work well on my device... Tested-by: Jeffy Chen

Re: [v11, 2/3] Bluetooth: hci_uart: check if hdev is present before using it

2016-06-23 Thread Jeffy Chen
", hu->hdev ? hu->hdev->name : "", tty->termios.c_ispeed, tty->termios.c_ospeed); } This serial of patches work well on my device... Tested-by: Jeffy Chen

Re: [v11, 1/3] Bluetooth: hci_uart: add prepare callbacks to hci_uart_proto structure.

2016-06-23 Thread Jeffy Chen
hci_uart *hu); }; This serial of patches work well on my device... Tested-by: Jeffy Chen

[PATCH v2] serial: core: remove baud_rates when serial console setup

2016-01-03 Thread Jeffy Chen
Currently, when tring to set up a serial console with a higher baud rate, it would fallback to 921600. Tested-by: Jianqun Xu Signed-off-by: Jeffy Chen --- Changes in v2: remove baud_rates as Alan's suggestion. drivers/tty/serial/serial_core.c | 33 ++--- 1

Re: [PATCH v1 7/8] ARM: dts: rockchip: add core rk3228 dtsi

2015-12-11 Thread Jeffy Chen
Hi Heiko, On 2015-12-11 18:12, Heiko Stübner wrote: Hi Jeffy, Am Freitag, 11. Dezember 2015, 09:53:59 schrieb Jeffy Chen: On 2015-12-10 8:32, Heiko Stuebner wrote: Am Mittwoch, 9. Dezember 2015, 17:04:12 schrieb Jeffy Chen: Initial release for rk3228 shared dtsi. Signed-off-by: Jeffy Chen

<    1   2   3   4   5   6   7   >