Maybe appear the following case:
-> set gamma
-> config done
-> atomic commit
--> update win format
--> update win address
---> here maybe meet vop hardware frame start, and triggle some config take affect.
---> as only some config take affect, this maybe lead to iommu pagefault.
--> update win size
--> update win other parameters
-> config done
so we add readx_poll_timeout() to make sure the first config done take
effect and then to do next frame config.
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I6ec67b374b3afd2bed4a57aa1e7b729964df1736
When the display interface is BT656. the register of
core_dclk_div_sel should always be set 1. Not only 'i'
modes like 480i and 576i, but also 'p' modes like 720p,
both need this setting.
As for BT1120 and other interfaces, this bit should be
1 when display mode belongs to 'i', and 0 when display
mode belongs to 'p'.
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: If67614bc5068024d602c6acbbe9676d6245fdf1a
The gem drivers use shmemfs to allocate backing storage for gem objects.
On Samsung Chromebook Plus, the drm/rockchip driver may call
rockchip_gem_get_pages -> drm_gem_get_pages -> shmem_read_mapping_page
to pin a lot of pages, breaking the page reclaim mechanism and causing
oom-killer invocation.
E.g. when the size of a zone is 3.9 GiB, the inactive_ratio is 5. If
active_anon / inactive_anon < 5 and all pages in the inactive_anon lru
are pinned, page reclaim would keep scanning inactive_anon lru without
reclaiming memory. It breaks page reclaim when the rockchip driver only
pins about 1/6 of the anon lru pages.
Mark these pinned pages as unevictable to avoid the premature oom-killer
invocation. See also similar patch on i915 driver [1].
[1]: https://patchwork.freedesktop.org/patch/msgid/20181106132324.17390-1-chris@chris-wilson.co.uk
Change-Id: I67c513481285d3a40cea3bdadbf1f348f00509d6
Signed-off-by: Kuo-Hsin Yang <vovoy@chromium.org>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190108074517.209860-1-vovoy@chromium.org
(cherry picked from commit fb4b49278f)
Once RISC-V snapshot wanna queue raw buffer to DDR until FastAE is
matched, the kernel space should not allow rpm_s/r. Make sure that isp
things won't be changed.
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I16335e62ee702b93a1daf526325c3d312ebb0d4b
As we don't do it in resume routine, so in order to be better
compatibale with devices, set it to low.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I0613e05f6d35ba7def7eedd902cfaff73d716952
Fix pin-assignment as per specification.
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
Change-Id: Iad7e211e43ebc01607ae534b56666ec56da2f54b
(cherry picked from commit b3e060dc22)
Augmented Power Delivery Objects (A)PDO_s are used by USB-C
PD power adapters to advertize the voltages and currents
they support. There can be up to 7 PDO_s but before PPS
(programmable power supply) there were seldom more than 4
or 5. Recently Samsung released an optional PPS 45 Watt power
adapter (EP-TA485) that has 7 PDO_s. It is for the Galaxy 10+
tablet and charges it quicker than the adapter supplied at
purchase. The EP-TA485 causes an overzealous WARN_ON to soil
the log plus it miscalculates the number of bytes to read.
So this bug has been there for some time but goes
undetected for the majority of USB-C PD power adapters on
the market today that have 6 or less PDO_s. That may soon
change as more USB-C PD adapters with PPS come to market.
Tested on a EP-TA485 and an older Lenovo PN: SA10M13950
USB-C 65 Watt adapter (without PPS and has 4 PDO_s) plus
several other PD power adapters.
Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191230033544.1809-1-dgilbert@interlog.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
(cherry picked from commit c215e48e97)
Change-Id: I51f7e53e6540cdc0ad543f7cbc80416204a1c816
Since the ARGB format was added without processing the address offset
during rotation, the address offset of mmu was calculated incorrectly.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I6bddd21b50bf60cadf493e73cff10c18210c375c
Should use REG_19H instead of REG_DH.
Fixes: 2f06afaaa8 ("phy: rockchip: naneng-combphy: Force detect Rx for RK356X SoCs")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ifc9484e850955e6a36c30755a7ba1aee65070d0f
The interrupt status bit of the previous error data transmition will
affect the next operation and cause continuous SPI transmission failure.
Change-Id: Ib215d63d8572e3fc8d843652687e1ebfb7ff531e
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
the wakeup interrupt handler which is guaranteed not to run while
@resume noirq() is being executed. the patch can help to avoid the
wakeup source try to access spi when the spi is in suspend mode.
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I3e6bc6e05dddeedea4c82de45a9e06b40e870876
Previously zero length transfers submitted to the Rokchip SPI driver would
time out in the SPI layer. This happens because the SPI peripheral does
not trigger a transfer completion interrupt for zero length transfers.
Fix that by completing zero length transfers immediately at start of
transfer.
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 5457773ef9)
Change-Id: I0c14eee10fbf0ffd2938d52b6d0c88910d8fd9d7
Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
This reverts commit ba0401694b.
Replaced by commit d4fe42d646 ("arch: pgtable: define MAX_POSSIBLE_PHYSMEM_BITS where needed").
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I9b0f39823bd2202bd58837262a54694c096aab84
https://source.android.com/security/bulletin/2021-12-01
CVE-2021-33909
CVE-2021-38204
CVE-2021-0961
* tag 'ASB-2021-12-05_4.19-stable': (1065 commits)
BACKPORT: arm64: vdso32: suppress error message for 'make mrproper'
Linux 4.19.219
tty: hvc: replace BUG_ON() with negative return value
xen/netfront: don't trust the backend response data blindly
xen/netfront: disentangle tx_skb_freelist
xen/netfront: don't read data from request on the ring page
xen/netfront: read response from backend only once
xen/blkfront: don't trust the backend response data blindly
xen/blkfront: don't take local copy of a request from the ring page
xen/blkfront: read response from backend only once
xen: sync include/xen/interface/io/ring.h with Xen's newest version
fuse: release pipe buf after last use
NFC: add NCI_UNREG flag to eliminate the race
hugetlbfs: flush TLBs correctly after huge_pmd_unshare
s390/mm: validate VMA in PGSTE manipulation functions
tracing: Check pid filtering when creating events
vhost/vsock: fix incorrect used length reported to the guest
net: hns3: fix VF RSS failed problem after PF enable multi-TCs
net/smc: Don't call clcsock shutdown twice when smc shutdown
MIPS: use 3-level pgtable for 64KB page size on MIPS_VA_BITS_48
...
Change-Id: Iaa72ffe6492c1a9a32cbd8769ae00c3f47ed198b
Conflicts:
arch/arm64/boot/dts/rockchip/rk3328.dtsi
drivers/media/i2c/imx258.c
drivers/soc/rockchip/Kconfig
drivers/usb/host/ehci.h
This patch try to reset DTOP_DIGEN_CLKE during hook power up
after finish configure digital registers, avoid to the incorrect
work status.
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: Iaa7eb3ebf41d0a55ddf8005bcaeccae2c60656eb
use tid_name to singed buf user, so we can check buf usage, and recyle
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: Iccf48bc30fbbf1ab44ac33babc9f00500b647623
ebc power on in advance
fix resume check not drop buf
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I1f34d4c5bd49a730967c997225f40dbed165bc92