Because the ebc is under pd vpu, and it may be enabled in uboot.
Change-Id: Iee8afa8f802a5f02c7c50f2223479349614371ff
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Currently when suspending driver and stopping workqueue it is checked whether
workqueue is not NULL and if so, it is destroyed.
Function destroy_workqueue() does drain queue and does clear variable, but
it does not set workqueue variable to NULL. This can cause kernel/module
panic if code attempts to clear workqueue that was not initialized.
This scenario is possible when resuming suspended driver in stmmac_resume(),
because there is no handling for failed stmmac_hw_setup(),
which can fail and return if DMA engine has failed to initialize,
and workqueue is initialized after DMA engine.
Should DMA engine fail to initialize, resume will proceed normally,
but interface won't work and TX queue will eventually timeout,
causing 'Reset adapter' error.
This then does destroy workqueue during reset process.
And since workqueue is initialized after DMA engine and can be skipped,
it will cause kernel/module panic.
To secure against this possible crash, set workqueue variable to NULL when
destroying workqueue.
Log/backtrace from crash goes as follows:
[88.031977]------------[ cut here ]------------
[88.031985]NETDEV WATCHDOG: eth0 (sxgmac): transmit queue 1 timed out
[88.032017]WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:477 dev_watchdog+0x390/0x398
<Skipping backtrace for watchdog timeout>
[88.032251]---[ end trace e70de432e4d5c2c0 ]---
[88.032282]sxgmac 16d88000.ethernet eth0: Reset adapter.
[88.036359]------------[ cut here ]------------
[88.036519]Call trace:
[88.036523] flush_workqueue+0x3e4/0x430
[88.036528] drain_workqueue+0xc4/0x160
[88.036533] destroy_workqueue+0x40/0x270
[88.036537] stmmac_fpe_stop_wq+0x4c/0x70
[88.036541] stmmac_release+0x278/0x280
[88.036546] __dev_close_many+0xcc/0x158
[88.036551] dev_close_many+0xbc/0x190
[88.036555] dev_close.part.0+0x70/0xc0
[88.036560] dev_close+0x24/0x30
[88.036564] stmmac_service_task+0x110/0x140
[88.036569] process_one_work+0x1d8/0x4a0
[88.036573] worker_thread+0x54/0x408
[88.036578] kthread+0x164/0x170
[88.036583] ret_from_fork+0x10/0x20
[88.036588]---[ end trace e70de432e4d5c2c1 ]---
[88.036597]Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004
Fixes: 5a5586112b ("net: stmmac: support FPE link partner hand-shaking procedure")
Change-Id: Id0284c08a103ec9d539a0665374f71ca0ae06fab
Signed-off-by: Jakub Raczynski <j.raczynski@samsung.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: David Wu <david.wu@rock-chips.com>
The CONFIG_ROCKCHIP_ANALOGIX_DP may be enabled for VOP or VOP2,
so make its dependency consistent with the configs of other
interfaces.
Fixes: b382406a2c ("drm/rockchip: Make VOP driver optional")
Change-Id: I272926898bf520d5e023e0bbb873f680362b68ee
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Currently, the husb311 driver enable irq wakeup by default,
it can wakeup system if the vbus or the CC state changes.
However, if the Type-C port data role is DFP and the vbus
is power on, after enter deep sleep, the vbus maybe power
off for low power management, this cause system resume
immediately by husb311 irq.
Actually, the husb311 vbus irq wakeup is no need if the vbus
state changes for DFP mode. This patch only enable irq wakeup
if the vbus is power off, it can support husb311 irq wakeup
system if the Type-C connect with Type-C charger or Type-C DFP.
And disable husb311 irq if the vbus is power on, it can avoid
the tcpm_state_machine_work run before the husb311_pm_resume
during system resume.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I62d35b10b6b2375125b32101426ea141f709ed91
dec->fix is used in rk3568 and rk3576, while CONFIG_CPU_RK3568 and
CONFIG_CPU_RK3576 are all defined, it will hack error.
Thus, the compatible need matching, then hack.
Change-Id: Icd1368c9f414422c0403d425ba732f20579b550d
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Since the BMCIO_OSC_EN bit is enabled automatically when the interrupt
occur whether the power is off or on, replace to TCPC_FILTER reg that
amended by software in husb311_init.
Fixes: f414167ae0 ("usb: typec: husb311: pm process support")
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I5bd0ffa395aae1e007705a791ff03a77ec85034a
At vop2_wait_for_irq_handler() we need to synchronize frame start irq,
This is to avoid the ongoing commit very close to fs, and might be racing with a
requested vblank interrupt, which would increment the software vblank counter
before the changes being committed actually happen.
besides, from rk3576 vop can support independent irq for each vp, we
confirm vop2->merge_irq state at vop2_bind, and simplification other
function logic.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: If93d8de7840590645c53bd3720eaca2f818a3cbe
NV20 and NV30 is supported by drm core, so no need to depend on
CONFIG_NO_GKI.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I74dbd8e69367dd1d705624e07e6a6ea2bb9a21f8
DRM_FORMAT_NV20 and DRM_FORMAT_NV30 formats is the 2x1 and non-subsampled
variant of NV15, a 10-bit 2-plane YUV format that has no padding between
components. Instead, luminance and chrominance samples are grouped into 4s
so that each group is packed into an integer number of bytes:
YYYY = UVUV = 4 * 10 bits = 40 bits = 5 bytes
The '20' and '30' suffix refers to the optimum effective bits per pixel
which is achieved when the total number of luminance samples is a multiple
of 4.
V2: Added NV30 format
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Sandy Huang <hjc@rock-chips.com>
Reviewed-by: Christopher Obbard <chris.obbard@collabora.com>
Tested-by: Christopher Obbard <chris.obbard@collabora.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20231023173718.188102-2-jonas@kwiboo.se
Bug: 300024866
(cherry picked from commit 728c15b4b5f3369cbde73d5e0f14701ab370f985)
Change-Id: Ia8fbb5b785c6fc2b4d188bbcef62e232c2ba8ce8
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This patch adds USB_QUIRK_RESET for Alcor Micro
Flash Drive (idVendor=058f, idProduct=6387) to
fix read/write issue after system resume from
deep sleep.
Change-Id: I35e0d511a80255a18eb842412ff9905c039df9bf
Signed-off-by: William Wu <william.wu@rock-chips.com>
1.fix lsc error of first frame
2.fix scl update hold when isp working
3.fix resolution config for unite mode
4.resume to restore dhaz iir data
Change-Id: I070b0dbef0eef404d040dedf4555cc7fe335de6f
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
net/rfkill/rfkill-wlan.c:697:22: error: redefinition of 'wlan_early_suspend' as different kind of symbol
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Id439523b64fa9fc99b5208c0c2a811e157fd5a9c
Vdpu383 doesn't reset the register when it is enabled.
In order to avoid exceptions, it is necessary to
configure the initial value when it is enabled.
In addition, ip_en involves cru mode, which is related
to the IP work frequency. It is necessary to ensure
that it is configured correctly.
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I7047faababe1747547d18cb51e1e3b527e2c8d35
Before:
default y if CPU_XXXX
After:
depends on CPU_XXX
default y
When a CPU_XXXX config is not selected, the config will be
automatically deselected.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I95bbc481b6747d82637167b0f2b057732eb7112e
Before:
default y if CPU_XXXX
After:
depends on CPU_XXX
default y
When a CPU_XXXX config is not selected, the config will be
automatically deselected.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iff7361f6515e1fda72a4993a514ad948876e8850
Before:
default y if CPU_XXXX
After:
depends on CPU_XXX
default y
When a CPU_XXXX config is not selected, the config will be
automatically deselected.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I380b2158def41949086ceb49133e5f905c4e17e6
Before:
default y if CPU_XXXX
After:
depends on CPU_XXX
default y
When a CPU_XXXX config is not selected, the config will be
automatically deselected.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: If10a37e81221ddd69a32e528c2642d8b0065b309
Before:
default y if CPU_XXXX
After:
depends on CPU_XXX
default y
When a CPU_XXXX config is not selected, the config will be
automatically deselected.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I113d92a4ccaed1e93e79b8c69d8595f4354be496