1. Because of hw problems before, there will be problems with
high-frequency reset. So the frequency must be reduced before reset.
But this operation is unnecessary for now.
2. Iep share clk with rga on rk356x, so frequency reduction may affect rga.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I469d2d6ba2671560acd9eaf6b86d57411c7e3de5
Part of spinand sram maybe change after read status register
Fixes: cf69491c97 ("drivers: rkflash: Add spinand program cache recheck")
Change-Id: Ia8f902fe51562d71a5b8e78a80e63eb26257df38
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Rootcause:
When hw detect there are more than eight rolling subtitles, it will
trigger a osd max irq but it still running, and that interruption make
the software takes for frame done and disable the clock gate, finally hw
hang when it access the bus.
Solution:
Ignore OSD MAX irq, clean and wait for frame done.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I660cefa013fe1419f7566b984556ea3450fe28e5
Odd dsp_w pixel of Esmart/Smart will trigger scale down error.
Change-Id: Ie0fc620043270a387eed69aba8adf200a0d67f24
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
After power lost, spinand may work in a unkonw state and result in
bit flip, including:
1.Write to cache invalid and dirty cache data write to page's array
which result in node CRC error for some pages.
2.One page write fail but the next page write success result in
empty space corruption.
Change-Id: I212c237202b32de0217efc8dd5a4e84174953a3f
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Add spinand power lost situation protection to avoid
abnormal data written to flash array(recheck 1) or
just reduce error behavior(recheck 2)
Change-Id: Ic445fd09fd407c225b47310d666b39f095fcfb17
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Set SYS_STATUS_DUALVIEW when there are more than one
active video ports.
Change-Id: I7d04f74427f710eef8cd7087b09ebd528587e002
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
The DDR freq should be fixed in dual display mode.
Change-Id: I2383d415f93a52366f762e9480b54451a75f1ad5
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Register gpd_dev_ops.active_wakeup function to support keep power
during suspend state. And add flag to each power domain to
decide whether keep power during suspend or not.
Change-Id: I0ba0985ed2ee976885005c87fcba4c7b910cbb05
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Register gpd_dev_ops.active_wakeup function to support keep power
during suspend state. And add flag to each power domain to
decide whether keep power during suspend or not.
Change-Id: Ib9f609b851f2eaf1ccca8eb687e232727e989d5c
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
The APLL_CFG3/DDAC_SR_LMT0/DTOP_DIGEN_CLKE should be
correct with different sample rates and clock.
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I766879750e640ef8ab31c2ab6776fe96ac65e063
If the OTG work in Host mode, delay power off phy in OTG_STATE_B_IDLE
state when unplug OTG cable, this can fix the xHCI deregistered error
with the following log on RK356x platforms:
[ 16.856295] xhci-hcd xhci-hcd.5.auto: remove, state 4
[ 16.856340] usb usb8: USB disconnect, device number 1
[ 16.857778] xhci-hcd xhci-hcd.5.auto: USB bus 8 deregistered
[ 16.858108] xhci-hcd xhci-hcd.5.auto: remove, state 4
[ 16.858146] usb usb7: USB disconnect, device number 1
[ 16.878109] xhci-hcd xhci-hcd.5.auto: Host halt failed, -110
[ 16.878151] xhci-hcd xhci-hcd.5.auto: Host controller not halted, aborting reset.
[ 16.878853] xhci-hcd xhci-hcd.5.auto: USB bus 7 deregistered
Change-Id: I4467afdd3fe20839a9ec967624868ce3773e048c
Signed-off-by: William Wu <william.wu@rock-chips.com>
This patch sets the bvalid and id filter time to 10ms for rk356x
USB 2.0 PHY0 which is used for OTG. The filter count is base on
the USB 2.0 PHY GRF pclk 100MHz.
With this patch, it can avoid trigger the bvalid rising edge irq
when unplug the OTG cable.
Change-Id: I95794510921e6c065f4ec1102ab6c1f35994bf42
Signed-off-by: William Wu <william.wu@rock-chips.com>
Afbc format data must align as 64 pixel when enable xmirror, rotate_90 or
rotate_270, otherwise will display black screen and trigger post buffer empty.
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
Change-Id: Ide5c6f667028d188eebf1ae86dcb31c57eb9ebca
To make it possible that the both built-in midgard and bifrost device driver
could be both loaded.
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: I8271a6d817dda3781d70fc69aaaccf3860354b48
rename.h could rename the symbols that have same name in midgard/ and bifrost/,
to make it possible to build in both midgard/ and bifrost/.
Change-Id: Ibca4e2beca8a4d8ea28f712a3e219cb2a403c7e2
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
The futex changes in 4.19.172 required some additions to struct
task_struct, which of course, is a structure used by just about
everyone.
To preserve the abi, do some gyrations with the reserved fields in order
to handle the growth of the structure. Given that we are adding a
larger structure than a pointer, carve out a chunk of reserved fields
from the block we were reserving.
These changes fix the genksyms issues, but libabigail is smarter than
that, so we also need to update the .xml file to make it happy with this
change.
The results of libabigail is:
Leaf changes summary: 1 artifact changed
Changed leaf types summary: 1 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable
'struct task_struct at sched.h:647:1' changed:
type size hasn't changed
3 data member deletions:
'u64 task_struct::android_kabi_reserved4', at offset 22592 (in bits) at sched.h:1300:1
'u64 task_struct::android_kabi_reserved5', at offset 22656 (in bits) at sched.h:1301:1
'u64 task_struct::android_kabi_reserved6', at offset 22720 (in bits) at sched.h:1302:1
there are data member changes:
data member u64 task_struct::android_kabi_reserved2 at offset 22464 (in bits) became anonymous data member 'union {unsigned int futex_state; struct {u64 android_kabi_reserved2;} __UNIQUE_ID_android_kabi_hide48; union {};}'
type 'typedef u64' of 'task_struct::android_kabi_reserved3' changed:
entity changed from 'typedef u64' to 'struct mutex' at mutex.h:53:1
type size changed from 64 to 256 (in bits)
and name of 'task_struct::android_kabi_reserved3' changed to 'task_struct::futex_exit_mutex' at sched.h:1313:1
1955 impacted interfaces
Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iab623aa5441c1d11e2dc4eb77c7153e4e9517429
Changes in 4.19.172
gpio: mvebu: fix pwm .get_state period calculation
Revert "mm/slub: fix a memory leak in sysfs_slab_add()"
futex: Move futex exit handling into futex code
futex: Replace PF_EXITPIDONE with a state
exit/exec: Seperate mm_release()
futex: Split futex_mm_release() for exit/exec
futex: Set task::futex_state to DEAD right after handling futex exit
futex: Mark the begin of futex exit explicitly
futex: Sanitize exit state handling
futex: Provide state handling for exec() as well
futex: Add mutex around futex exit
futex: Provide distinct return value when owner is exiting
futex: Prevent exit livelock
futex: Ensure the correct return value from futex_lock_pi()
futex: Replace pointless printk in fixup_owner()
futex: Provide and use pi_state_update_owner()
rtmutex: Remove unused argument from rt_mutex_proxy_unlock()
futex: Use pi_state_update_owner() in put_pi_state()
futex: Simplify fixup_pi_state_owner()
futex: Handle faults correctly for PI futexes
HID: wacom: Correct NULL dereference on AES pen proximity
tracing: Fix race in trace_open and buffer resize call
tools: Factor HOSTCC, HOSTLD, HOSTAR definitions
dm integrity: conditionally disable "recalculate" feature
writeback: Drop I_DIRTY_TIME_EXPIRE
fs: fix lazytime expiration handling in __writeback_single_inode()
Linux 4.19.172
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9b5391e9e955a105ab9c144fa6258dcbea234211
When ddc-i2c-bus property is used, a NULL pointer dereference is reported:
[ 31.041669] Unable to handle kernel NULL pointer dereference at virtual address 00000008
[ 31.041671] pgd = 4d3c16f6
[ 31.041673] [00000008] *pgd=00000000
[ 31.041678] Internal error: Oops: 5 [#1] SMP ARM
[ 31.041711] Hardware name: Rockchip (Device Tree)
[ 31.041718] PC is at i2c_transfer+0x8/0xe4
[ 31.041721] LR is at drm_scdc_read+0x54/0x84
[ 31.041723] pc : [<c073273c>] lr : [<c05926c4>] psr: 280f0013
[ 31.041725] sp : edffdad0 ip : 5ccb5511 fp : 00000058
[ 31.041727] r10: 00000780 r9 : edf91608 r8 : c11b0f48
[ 31.041728] r7 : 00000438 r6 : 00000000 r5 : 00000000 r4 : 00000000
[ 31.041730] r3 : edffdae7 r2 : 00000002 r1 : edffdaec r0 : 00000000
[ 31.041908] [<c073273c>] (i2c_transfer) from [<c05926c4>] (drm_scdc_read+0x54/0x84)
[ 31.041913] [<c05926c4>] (drm_scdc_read) from [<c0592858>] (drm_scdc_set_scrambling+0x30/0xbc)
[ 31.041919] [<c0592858>] (drm_scdc_set_scrambling) from [<c05cc0f4>] (dw_hdmi_update_power+0x1440/0x1610)
[ 31.041926] [<c05cc0f4>] (dw_hdmi_update_power) from [<c05cc574>] (dw_hdmi_bridge_enable+0x2c/0x70)
[ 31.041932] [<c05cc574>] (dw_hdmi_bridge_enable) from [<c05aed48>] (drm_bridge_enable+0x24/0x34)
[ 31.041938] [<c05aed48>] (drm_bridge_enable) from [<c0591060>] (drm_atomic_helper_commit_modeset_enables+0x114/0x220)
[ 31.041943] [<c0591060>] (drm_atomic_helper_commit_modeset_enables) from [<c05c3fe0>] (rockchip_atomic_helper_commit_tail_rpm+0x28/0x64)
hdmi->i2c may not be set when ddc-i2c-bus property is used in device tree.
Fix this by using hdmi->ddc as the i2c adapter when calling drm_scdc_*().
Also report that SCDC is not supported when there is no DDC bus.
Fixes: 264fce6cc2 ("drm/bridge: dw-hdmi: Add SCDC and TMDS Scrambling support")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/VE1PR03MB59031814B5BCAB2152923BDAAC210@VE1PR03MB5903.eurprd03.prod.outlook.com
Change-Id: I5b2cbb57848e51bcba5266a40f4bd509e0cba3bb
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
commit 1e249cb5b7 upstream.
When lazytime is enabled and an inode is being written due to its
in-memory updated timestamps having expired, either due to a sync() or
syncfs() system call or due to dirtytime_expire_interval having elapsed,
the VFS needs to inform the filesystem so that the filesystem can copy
the inode's timestamps out to the on-disk data structures.
This is done by __writeback_single_inode() calling
mark_inode_dirty_sync(), which then calls ->dirty_inode(I_DIRTY_SYNC).
However, this occurs after __writeback_single_inode() has already
cleared the dirty flags from ->i_state. This causes two bugs:
- mark_inode_dirty_sync() redirties the inode, causing it to remain
dirty. This wastefully causes the inode to be written twice. But
more importantly, it breaks cases where sync_filesystem() is expected
to clean dirty inodes. This includes the FS_IOC_REMOVE_ENCRYPTION_KEY
ioctl (as reported at
https://lore.kernel.org/r/20200306004555.GB225345@gmail.com), as well
as possibly filesystem freezing (freeze_super()).
- Since ->i_state doesn't contain I_DIRTY_TIME when ->dirty_inode() is
called from __writeback_single_inode() for lazytime expiration,
xfs_fs_dirty_inode() ignores the notification. (XFS only cares about
lazytime expirations, and it assumes that i_state will contain
I_DIRTY_TIME during those.) Therefore, lazy timestamps aren't
persisted by sync(), syncfs(), or dirtytime_expire_interval on XFS.
Fix this by moving the call to mark_inode_dirty_sync() to earlier in
__writeback_single_inode(), before the dirty flags are cleared from
i_state. This makes filesystems be properly notified of the timestamp
expiration, and it avoids incorrectly redirtying the inode.
This fixes xfstest generic/580 (which tests
FS_IOC_REMOVE_ENCRYPTION_KEY) when run on ext4 or f2fs with lazytime
enabled. It also fixes the new lazytime xfstest I've proposed, which
reproduces the above-mentioned XFS bug
(https://lore.kernel.org/r/20210105005818.92978-1-ebiggers@kernel.org).
Alternatively, we could call ->dirty_inode(I_DIRTY_SYNC) directly. But
due to the introduction of I_SYNC_QUEUED, mark_inode_dirty_sync() is the
right thing to do because mark_inode_dirty_sync() now knows not to move
the inode to a writeback list if it is currently queued for sync.
Fixes: 0ae45f63d4 ("vfs: add support for a lazytime mount option")
Cc: stable@vger.kernel.org
Depends-on: 5afced3bf2 ("writeback: Avoid skipping inode writeback")
Link: https://lore.kernel.org/r/20210112190253.64307-2-ebiggers@kernel.org
Suggested-by: Jan Kara <jack@suse.cz>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>