Commit Graph

11084 Commits

Author SHA1 Message Date
Tao Huang
b50aca0c9a Merge tag 'ASB-2021-02-05_4.19-stable' of https://android.googlesource.com/kernel/common
https://source.android.com/security/bulletin/2021-02-01
CVE-2017-18509
CVE-2020-10767

* tag 'ASB-2021-02-05_4.19-stable': (809 commits)
  ANDROID: GKI: fix up abi issues with 4.19.172
  Linux 4.19.172
  fs: fix lazytime expiration handling in __writeback_single_inode()
  writeback: Drop I_DIRTY_TIME_EXPIRE
  dm integrity: conditionally disable "recalculate" feature
  tools: Factor HOSTCC, HOSTLD, HOSTAR definitions
  tracing: Fix race in trace_open and buffer resize call
  HID: wacom: Correct NULL dereference on AES pen proximity
  futex: Handle faults correctly for PI futexes
  futex: Simplify fixup_pi_state_owner()
  futex: Use pi_state_update_owner() in put_pi_state()
  rtmutex: Remove unused argument from rt_mutex_proxy_unlock()
  futex: Provide and use pi_state_update_owner()
  futex: Replace pointless printk in fixup_owner()
  futex: Ensure the correct return value from futex_lock_pi()
  futex: Prevent exit livelock
  futex: Provide distinct return value when owner is exiting
  futex: Add mutex around futex exit
  futex: Provide state handling for exec() as well
  futex: Sanitize exit state handling
  ...

Change-Id: Ieba6ee3a91a05d504e1f829a84e7d364e7d983f2

Conflicts:
	arch/arm64/boot/dts/rockchip/rk3328.dtsi
	drivers/md/Kconfig
	drivers/usb/gadget/function/f_uac2.c
2021-02-26 15:30:04 +08:00
Ding Wei
b1b96334c4 video: rockchip: mpp: rkvdec: add clock strategy according to resolution
if pixels large than default which set in dtsi, use advanced-rates.
otherwise, use normal-rages.

Change-Id: I488c2815dbe1e3decd1d305a78bf523d944d1e96
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-02-25 18:08:06 +08:00
Ding Wei
c22b38d86a video: rockchip: mpp: add strategy to adjust clocks
method: when meets large resolution, higher clocks will be set.
if pixels less default_max_load, clocks use normal-rates setting.
otherwise, use advanced-rates instead.

Change-Id: I7e3c21903f02e3dbc7f84ea8084610ac76738c27
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-02-23 16:37:18 +08:00
Ding Wei
aedde11d4e video: rockchip: mpp: rkvdec2: add codec_info
the codec_info is similar to rkvenc && vepu.

Change-Id: I2dfb1ceaaf582e16a8525ed2286768bf1296542a
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-02-23 16:37:08 +08:00
Ding Wei
e26a5d3bf2 video: rockchip: mpp: overflow issue when copy_from_user
when cnt is more than codec_info size, then it may be overflow risk.

Change-Id: I7352118f425ccf263df0083c21ef0433f2322a43
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-02-23 16:32:26 +08:00
Ding Wei
c8e635088d video: rockchip: mpp: issue for power off
when have task in running_list, it should be power off later.

Change-Id: I6df2d8ed11a05eba5753d78800c2175fc99ad0f1
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-02-22 14:10:50 +08:00
Yandong Lin
fdc069542d video: rockchip: mpp: iep2: remove reduce_req function
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
2021-02-08 11:40:02 +08:00
Yandong Lin
34760af996 video: rockchip: mpp: iep2: fix hw hang caused by OSD_MAX irq
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
2021-02-08 11:40:01 +08:00
Ding Wei
32e2880ed5 video: rockchip: mpp: issue when rcb size is invalid
when rcb size is 0, return error directly.

Change-Id: I232e210cc88d0ee382970e6c5548eee5c9b975c4
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-02-02 14:35:49 +08:00
Ding Wei
3ee975a1cf video: rockchip: mpp: control the log, when task is null
tips:
    in rk3328, avsd and vdpu share the same interrupt number,
    so, when each one hardware done, avsd and vdpu irq will response.
    this is a normal log when meet the case.

Change-Id: I9fea220a64d7310805194d9f71c24db0cef1491e
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-01-30 15:09:24 +08:00
Yandong Lin
d4795f4b66 video: rockchip: mpp: Fix rk3368 page fault
Workaround patch for rk3368:
Need to reset iommu for rk3368, when grf changed.

[   64.542569] rk_iommu ff9a0440.iommu: Page fault at 0x00000000fcbdd800
of type write
[   64.542586] rk_iommu ff9a0440.iommu: iova = 0x00000000fcbdd800:
dte_index: 0x3f2 pte_index: 0x3dd page_offset: 0x800
[   64.542599] rk_iommu ff9a0440.iommu: mmu_dte_addr: 0x000000007ad53000
dte@0x000000007ad53fc8: 0x367c9001 valid: 1 pte@0x00000000367c9f74:
0x2a93c007 valid: 1 page@0x000000002a93c800 flags: 0x6
[   64.542627] mpp_rkvdec ff9a0000.hevc_service: fault addr 0xfcbdd800
status 6b

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I52f3cff4f8a55c2fac3d33f6468024b46eabde41
2021-01-28 19:12:01 +08:00
Yu Qiaowei
955dba8428 video/rockchip: rga2: Fix the memory leak in rga2 driver.
1. Fix that when fd is used in A+B->C mode, the fd of
   pat is not release.
2. Modify that the pat import from the application is
   only copy to pat or src1.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I360459ba85fdaad5536a3317b5f415298be87d6b
2021-01-28 14:23:20 +08:00
Yandong Lin
29f57122a3 video: rockchip: mpp: Fix irq state err.
Set handled state, only when a valid irq

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I0db013066c795dc2d5ae896e84dc23c42026aabf
2021-01-25 15:18:50 +08:00
Yu Qiaowei
2d6a3e38e1 video/rockchip: rga2: Modify the judgment of first req.
Fixed the error that color fill would cause "req argument is inval".

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I94ebfc2061f16916813a0d85630f8a9862728b0e
2021-01-25 10:57:41 +08:00
Yu Qiaowei
93e6da0968 video/rockchip: rga2: Fix a crash cause by rga timeout.
Because update_patten_buff_mode is not currently used,
it is removed.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I48c97e75d27d475eee528ed6c838c67fdaa430f8
2021-01-25 10:57:31 +08:00
Ding Wei
ae86413dbf video: rockchip: mpp: Fixes issue for px30 probe
When get dte_addr for iommu, it must enable reference clock.

Change-Id: Iaec423345463e001b2a7099067ab1e4a2d971f7f
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-01-22 20:13:01 +08:00
Finley Xiao
b82f26220d video: rockchip: mpp: rkvenc: Implement get_soc_info() for rv1126 SoCs
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I3f35e0d44be68a84c5f16cf72181ea3f0ee11e1c
2021-01-22 20:13:00 +08:00
Ding Wei
0a07b5aaba video: rockchip: mpp: vepu1: add codec_info for debug
Change-Id: I665cd4848becdbacc8c1393d82c3faa71898ceb4
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-01-22 20:13:00 +08:00
Yu Qiaowei
aa49aaa78e video/rockchip: rga2: Modify the format of YUYV and RGB565.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Id1c1e77bddfc909c643f07b0ff0a9fa07059688b
2021-01-22 20:12:59 +08:00
Ding Wei
fde78f2de6 video: rockchip: mpp: issue for rcbbuf setting
tips:
1. rcb_size == 0, skip it.
2. if current rcb_size is larger then the remaining buffer size,
  skip it instead of break.

Change-Id: Ide37ccbf0af9ceb3f4a6f6fe5e7045bfbd8ddc74
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-01-22 20:12:58 +08:00
Dexuan Cui
9540ea23f6 video: hyperv_fb: Fix the mmap() regression for v5.4.y and older
db49200b1dad is backported from the mainline commit
5f1251a48c ("video: hyperv_fb: Fix the cache type when mapping the VRAM"),
to v5.4.y and older stable branches, but unluckily db49200b1dad causes
mmap() to fail for /dev/fb0 due to EINVAL:

[ 5797.049560] x86/PAT: a.out:1910 map pfn expected mapping type
  uncached-minus for [mem 0xf8200000-0xf85cbfff], got write-back

This means the v5.4.y kernel detects an incompatibility issue about the
mapping type of the VRAM: db49200b1dad changes to use Write-Back when
mapping the VRAM, while the mmap() syscall tries to use Uncached-minus.
That’s to say, the kernel thinks Uncached-minus is incompatible with
Write-Back: see drivers/video/fbdev/core/fbmem.c: fb_mmap() ->
vm_iomap_memory() -> io_remap_pfn_range() -> ... -> track_pfn_remap() ->
reserve_pfn_range().

Note: any v5.5 and newer kernel doesn't have the issue, because they
have commit
d21987d709 ("video: hyperv: hyperv_fb: Support deferred IO for Hyper-V frame buffer driver")
, and when the hyperv_fb driver has the deferred_io support,
fb_deferred_io_init() overrides info->fbops->fb_mmap with
fb_deferred_io_mmap(), which doesn’t check the mapping type
incompatibility. Note: since it's VRAM here, the checking is not really
necessary.

Fix the regression by ioremap_wc(), which uses Write-combining. The kernel
thinks it's compatible with Uncached-minus. The VRAM mappped by
ioremap_wc() is slightly slower than mapped by ioremap_cache(), but is
still significantly faster than by ioremap().

Change the comment accordingly. Linux VM on ARM64 Hyper-V is still not
working in the latest mainline yet, and when it works in future, the ARM64
support is unlikely to be backported to v5.4 and older, so using
ioremap_wc() in v5.4 and older should be ok.

Note: this fix is only targeted at the stable branches:
v5.4.y, v4.19.y, v4.14.y, v4.9.y and v4.4.y.

Fixes: db49200b1dad ("video: hyperv_fb: Fix the cache type when mapping the VRAM")
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-01-12 20:10:20 +01:00
Ding Wei
3972dc1b35 video: rockchip: mpp: optimize power for video codec
if have no task then put the power domain.

Change-Id: Ib03484b3f1254feeb32f826f840817efc29b4dd9
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-01-12 17:02:22 +08:00
Ding Wei
008cf6f695 video: rockchip: mpp: rkvdec2: support sram for rcb buffer
rcb buffer consists of sram and dma, sram is in the front.
rcb buffer: sram + dma
rcb_size = sram_size + dma_size

Change-Id: I4b0f1e7fb5f541b3fb1a84d7eeba5c473f7c07c5
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-01-08 12:52:37 +08:00
Yang Yingliang
44ce61c8bd video: fbdev: atmel_lcdfb: fix return error code in atmel_lcdfb_of_init()
[ Upstream commit ba236455ee ]

If devm_kzalloc() failed after the first time, atmel_lcdfb_of_init()
can't return -ENOMEM, fix this by putting the error code in loop.

Fixes: b985172b32 ("video: atmel_lcdfb: add device tree suport")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20201117061350.3453742-1-yangyingliang@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:25:54 +01:00
Tao Huang
5647c1d492 Merge tag 'ASB-2020-12-05_4.19-stable' of https://android.googlesource.com/kernel/common
https://source.android.com/security/bulletin/2020-12-01
CVE-2020-0444
CVE-2020-0465
CVE-2020-0466

* tag 'ASB-2020-12-05_4.19-stable': (636 commits)
  ANDROID: kbuild: use grep -F instead of fgrep
  ANDROID: GKI: usb: gadget: support claiming indexed endpoints by name
  UPSTREAM: arm64: sysreg: Clean up instructions for modifying PSTATE fields
  Revert "Revert "ANDROID: clang: update to 11.0.5""
  ANDROID: kbuild: speed up ksym_dep_filter
  Revert "drm/atomic_helper: Stop modesets on unregistered connectors harder"
  Linux 4.19.161
  USB: core: Fix regression in Hercules audio card
  x86/resctrl: Add necessary kernfs_put() calls to prevent refcount leak
  x86/resctrl: Remove superfluous kernfs_get() calls to prevent refcount leak
  x86/speculation: Fix prctl() when spectre_v2_user={seccomp,prctl},ibpb
  usb: gadget: Fix memleak in gadgetfs_fill_super
  USB: quirks: Add USB_QUIRK_DISCONNECT_SUSPEND quirk for Lenovo A630Z TIO built-in usb-audio card
  usb: gadget: f_midi: Fix memleak in f_midi_alloc
  USB: core: Change %pK for __user pointers to %px
  perf probe: Fix to die_entrypc() returns error correctly
  can: m_can: fix nominal bitiming tseg2 min for version >= 3.1
  platform/x86: toshiba_acpi: Fix the wrong variable assignment
  platform/x86: thinkpad_acpi: Send tablet mode switch at wakeup time
  can: gs_usb: fix endianess problem with candleLight firmware
  ...

Change-Id: I82ccfc3d6561d3ef3b1b06ac98d48fac997c8fb6

Conflicts:
	drivers/pinctrl/pinctrl-rockchip.c
	drivers/usb/dwc3/gadget.c
	drivers/usb/host/xhci.c
	drivers/usb/host/xhci.h
2020-12-29 16:10:48 +08:00
Ding Wei
909b0f0559 video: rockchip: mpp: rkvdec2: add perf sel val
Tips: The sel val read via VAL0_BASE VAL1_BASE VAL2_BASE.

Change-Id: Ida4eee44f4e4cd6a51ca81eeb28e39091433edf2
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-12-24 11:43:16 +08:00
Ding Wei
37b4b14779 video: rockchip: mpp: fix error for clear cache
1. rkvdec2 use 3 cache.
2. cache offset is 0x500 not 0x700.

Change-Id: Ib5715750c363a9a7ffda938466eb32a0ea43b729
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-12-22 10:30:48 +08:00
Yandong Lin
29f5d6e2cd video: rockchip: mpp: adjust trans_tbl_vp9d for rkvdec2
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ic5a7f007173156c7a16e25da6f56d8adc6be50d1
2020-12-16 09:22:59 +08:00
Yu Qiaowei
2af29f5de3 video/rockchip: rga2: Modify the initial value of ktime_t.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ibb7226351956951ac9f805c6e79fa6ac720e209d
2020-12-09 14:19:51 +08:00
Yu Qiaowei
3265071d3b video/rockchip: rga2: Some new features of Alpha mode.
1. Support colorkey.
2. Support blend mode to restore real color.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I8eb6e60d4b9d3c5b6cc280e33edb9f0f3f08f2e2
2020-12-08 20:40:46 +08:00
Dexuan Cui
57062bed8e video: hyperv_fb: Fix the cache type when mapping the VRAM
[ Upstream commit 5f1251a48c ]

x86 Hyper-V used to essentially always overwrite the effective cache type
of guest memory accesses to WB. This was problematic in cases where there
is a physical device assigned to the VM, since that often requires that
the VM should have control over cache types. Thus, on newer Hyper-V since
2018, Hyper-V always honors the VM's cache type, but unexpectedly Linux VM
users start to complain that Linux VM's VRAM becomes very slow, and it
turns out that Linux VM should not map the VRAM uncacheable by ioremap().
Fix this slowness issue by using ioremap_cache().

On ARM64, ioremap_cache() is also required as the host also maps the VRAM
cacheable, otherwise VM Connect can't display properly with ioremap() or
ioremap_wc().

With this change, the VRAM on new Hyper-V is as fast as regular RAM, so
it's no longer necessary to use the hacks we added to mitigate the
slowness, i.e. we no longer need to allocate physical memory and use
it to back up the VRAM in Generation-1 VM, and we also no longer need to
allocate physical memory to back up the framebuffer in a Generation-2 VM
and copy the framebuffer to the real VRAM. A further big change will
address these for v5.11.

Fixes: 68a2d20b79 ("drivers/video: add Hyper-V Synthetic Video Frame Buffer Driver")
Tested-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Link: https://lore.kernel.org/r/20201118000305.24797-1-decui@microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-02 08:48:11 +01:00
Yu Qiaowei
522d802667 video/rockchip: rga2: Ion can be used below kernel4.4.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ie9da1dfcd8682875763d401bc0c5d874ad98b870
2020-11-30 16:22:04 +08:00
Yu Qiaowei
17b7a48bf0 video/rockchip: rga2: Add support for BGRX8888
The userspace librga(im2d) is using 0x16 for BGRX8888.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I6cac09898039aefa87f5633d60bf590e3f130e56
2020-11-30 14:35:17 +08:00
Putin Lee
78531169b1 video/rockchip: rga2: fixup black slash when use rgb888 output with odd width
Change-Id: I8045880559628904d320da04c8df89a34055ce99
Signed-off-by: Putin Lee <putin.li@rock-chips.com>
2020-11-30 14:27:34 +08:00
Herman Chen
6776ca9f87 video: rockchip: mpp: common: Add hardware register dump
1. Add hardware register dump function.
2. Dump irq_status on error when debug flag is set.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Iad4f4af98756e02438d82b231b53b4eefb0bd632
2020-11-19 10:16:42 +08:00
Yu Qiaowei
d1ce375ca1 video/rockchip: rga2: Fix errors in Y4/Y400 format.
1. Modify the calculation of Y400/Y4 buffer size.
2. Add print of result and pageCount.
3. Add Y4/Y400 string name.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Ibe26b7b900c317d28e0c4326f0c89a244a0017b0
2020-11-18 19:45:21 +08:00
Ding Wei
d9f357e5bc video: rockchip: mpp: rkvenc: fix writing error
Fixes: 932a0e8311 ("video: rockchip: mpp: add register for rkvenc translate table")
Change-Id: I3a1e9eac96d201d0c16243e0bff6280b2c07e422
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-11-16 19:56:22 +08:00
Ding Wei
e034f07630 video: rockchip: mpp: add compatible for iep2
Change-Id: Ida405f81c24c3bb175564fa3afaeb4dc15716106
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-11-16 10:33:08 +08:00
Ding Wei
7fe621b4bb video: rockchip: mpp: rkvenc: reg_l2 register debug info
Change-Id: Ic73571eecd8a1737769fb0c98138c31cacacaf51
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-11-13 11:33:43 +08:00
Ding Wei
932a0e8311 video: rockchip: mpp: add register for rkvenc translate table
Change-Id: Ic56d42c7d610dbd746419acd1e39af47b7f3fe09
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-11-13 11:33:32 +08:00
Ding Wei
4212aa4087 video: rockchip: mpp: rkvenc issue for devfreq is null
CONFIG_PM_DEVFREQ enable, while devfreq is not set in dtsi.
then freq is not actually set.

Change-Id: Ie615d38393155c0c0debdc4522f1d47869ea15a2
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-11-13 11:33:09 +08:00
Ding Wei
66b21e6052 video: rockchip: mpp: colmv issue for 3328 iommu pagefault
Change-Id: Ia5ba4a5a1ebb17464ab0836b05ee2241efa682fd
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-11-09 11:05:38 +08:00
Yu Qiaowei
95280b2287 video/rockchip: rga2: Update to support rotation mode.
1. Add x mirror + y mirror mode.
2. Support rotation and mirror configuration at the
   same time.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: If958e620633e17101495631acf3751a67953b19f
2020-11-06 18:03:12 +08:00
Ding Wei
538613c26c video: rockchip: mpp: add missing element in translate table for vp8e
Change-Id: I5160dd95fb1fb4d0a6e630d44ee1a82828bdfc0a
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-11-05 18:45:43 +08:00
Tom Rix
8c755f49ac video: fbdev: pvr2fb: initialize variables
[ Upstream commit 8e1ba47c60 ]

clang static analysis reports this repesentative error

pvr2fb.c:1049:2: warning: 1st function call argument
  is an uninitialized value [core.CallAndMessage]
        if (*cable_arg)
        ^~~~~~~~~~~~~~~

Problem is that cable_arg depends on the input loop to
set the cable_arg[0].  If it does not, then some random
value from the stack is used.

A similar problem exists for output_arg.

So initialize cable_arg and output_arg.

Signed-off-by: Tom Rix <trix@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200720191845.20115-1-trix@redhat.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-11-05 11:08:39 +01:00
Tao Huang
439d4e9999 Merge tag 'ASB-2020-11-05_4.19-stable' of https://android.googlesource.com/kernel/common
https://source.android.com/security/bulletin/2020-11-01
CVE-2020-0423

* tag 'ASB-2020-11-05_4.19-stable': (529 commits)
  ANDROID: GKI: Enable DEBUG_INFO_DWARF4
  UPSTREAM: mm/sl[uo]b: export __kmalloc_track(_node)_caller
  BACKPORT: xfrm/compat: Translate 32-bit user_policy from sockptr
  BACKPORT: xfrm/compat: Add 32=>64-bit messages translator
  UPSTREAM: xfrm/compat: Attach xfrm dumps to 64=>32 bit translator
  UPSTREAM: xfrm/compat: Add 64=>32-bit messages translator
  BACKPORT: xfrm: Provide API to register translator module
  ANDROID: Publish uncompressed Image on aarch64
  FROMLIST: crypto: arm64/poly1305-neon - reorder PAC authentication with SP update
  UPSTREAM: crypto: arm64/chacha - fix chacha_4block_xor_neon() for big endian
  UPSTREAM: crypto: arm64/chacha - fix hchacha_block_neon() for big endian
  Linux 4.19.154
  usb: gadget: f_ncm: allow using NCM in SuperSpeed Plus gadgets.
  eeprom: at25: set minimum read/write access stride to 1
  USB: cdc-wdm: Make wdm_flush() interruptible and add wdm_fsync().
  usb: cdc-acm: add quirk to blacklist ETAS ES58X devices
  tty: serial: fsl_lpuart: fix lpuart32_poll_get_char
  net: korina: cast KSEG0 address to pointer in kfree
  ath10k: check idx validity in __ath10k_htt_rx_ring_fill_n()
  scsi: ufs: ufs-qcom: Fix race conditions caused by ufs_qcom_testbus_config()
  ...

Change-Id: I797efa1149f557c1dfab7856813cc40d1a4d60b2

Conflicts:
	drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
	mm/page_alloc.c
2020-11-03 18:36:42 +08:00
Ding Wei
d53bd4a922 video: rockchip: mpp: rkvenc issue for iommu irq repeat
when iommu pagefault, mark_irq to disable iommu interrupt,
then handle the fault, and unmark_irq to enable hardware.

Change-Id: Id40868bfab67ac27e12c181d83a8e70a09a1e498
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-11-03 10:03:44 +08:00
Dinghao Liu
27fd3a2e53 video: fbdev: radeon: Fix memleak in radeonfb_pci_register
[ Upstream commit fe6c6a4af2 ]

When radeon_kick_out_firmware_fb() fails, info should be
freed just like the subsequent error paths.

Fixes: 069ee21a82 ("fbdev: Fix loading of module radeonfb on PowerMac")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: Mathieu Malaterre <malat@debian.org>
Cc: Kangjie Lu <kjlu@umn.edu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200825062900.11210-1-dinghao.liu@zju.edu.cn
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29 09:55:09 +01:00
Tom Rix
2422fb525b video: fbdev: sis: fix null ptr dereference
[ Upstream commit ad6f93e9cd ]

Clang static analysis reports this representative error

init.c:2501:18: warning: Array access (from variable 'queuedata') results
  in a null pointer dereference
      templ |= ((queuedata[i] & 0xc0) << 3);

This is the problem block of code

   if(ModeNo > 0x13) {
      ...
      if(SiS_Pr->ChipType == SIS_730) {
	 queuedata = &FQBQData730[0];
      } else {
	 queuedata = &FQBQData[0];
      }
   } else {

   }

queuedata is not set in the else block

Reviewing the old code, the arrays FQBQData730 and FQBQData were
used directly.

So hoist the setting of queuedata out of the if-else block.

Fixes: 544393fe58 ("[PATCH] sisfb update")
Signed-off-by: Tom Rix <trix@redhat.com>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200805145208.17727-1-trix@redhat.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29 09:55:09 +01:00
Colin Ian King
32bc70b7ed video: fbdev: vga16fb: fix setting of pixclock because a pass-by-value error
[ Upstream commit c72fab81ce ]

The pixclock is being set locally because it is being passed as a
pass-by-value argument rather than pass-by-reference, so the computed
pixclock is never being set in var->pixclock. Fix this by passing
by reference.

[This dates back to 2002, I found the offending commit from the git
history git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git ]

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jani Nikula <jani.nikula@intel.com>
[b.zolnierkie: minor patch summary fixup]
[b.zolnierkie: removed "Fixes:" tag (not in upstream tree)]
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200723170227.996229-1-colin.king@canonical.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29 09:55:09 +01:00