Commit Graph

51703 Commits

Author SHA1 Message Date
Algea Cao
67be194d10 drm: rockchip: dw-hdmi: Fix display err between kernel logo and bootanimation
If the hdmi color format is set to DRM_HDMI_OUTPUT_YCBCR_HQ or
DRM_HDMI_OUTPUT_YCBCR_LQ when the system boot, The actual color
formats is YUV444/YUV422/YUV420. This leads to misjudgment that
the color format has changed, hdmi will be reset. That cause
display err between kernel logo and bootanimation.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I5d4784ecb64df82ab40723fddb6aef94cb493c5e
2021-01-05 17:34:56 +08:00
Liang Chen
88169e6e3b MALI: bifrost: Fix wrong voltage for devfreq
(kbdev->current_freqs[i] > freqs[i]) will be always false becasue kbdev->current_freqs[i]
has been updated to freqs[i], so we need save current_freqs[i] to old_freqs[i].

Change-Id: I3f8a06d474a359cf292460878c53592c4ce1472b
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-01-05 14:52:16 +08:00
Sandy Huang
f33ddff87a drm/rockchip: vop2: move write_back close time point
Change-Id: Ia9cd0f2c479bb25488a43835a721c32f7a314f36
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-01-04 19:08:33 +08:00
Andy Yan
09c9eeed00 drm/rockchip: vop2: Add writeback support
VOP2 has a writeback with max 1920 x 1080 output.
Writeback work as a connector in drm system.

Change-Id: I670ca8de5155f1102454c618c62dd0c51fa45202
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-01-04 16:41:27 +08:00
Sandy Huang
37b5bec67d drm/rockchip: vop2: afbc_tile_num should align up to 16 pixel and divide 16
Change-Id: Ied67749759268e9ff4acb0322a6517f8ed099c9d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-12-31 17:59:35 +08:00
Sandy Huang
06656c4794 drm/rockchip: vop2: act_w should align as 4 pixel when enable afbc
Change-Id: I2a9f2ac21ac2187879452af439ec0fefd20702c8
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-12-31 17:59:35 +08:00
Andy Yan
de88d200e7 drm/rockchip: vop2: Reset plane hdr state for every commit
When play a SDR video after HDR video, there is a switch process,
look from 70.769811 seconds to 71.006901 seconds:

The HDMI was set to SDR(vcstate->eoftf = 0), the Plane is still HDR
(vpstate->eotf = 2), this will set the window to HDR2SDR state, but
actually we want play a sdr video in sdr state, and this cause the
wrong csc. So we clear vpstate->hdr2sdr_en & hdr_in at the beginning
of every commit.

[   70.657468] Cluster0-win0 vpstate->eotf 2 vcstate->eotf 2
[   70.657501] Cluster0-win0 hdr2sdr_en 0 hdr_in 1 sdr2hdr_en 1 is_input_yuv 1 is_output_yuv 0
[   70.707209] Cluster0-win0 EOTF val: 2
[   70.708056] Cluster0-win0 vpstate->eotf 2 vcstate->eotf 2
[   70.708086] Cluster0-win0 hdr2sdr_en 0 hdr_in 1 sdr2hdr_en 1 is_input_yuv 1 is_output_yuv 0
[   70.769811] rockchip-vop2 fe040000.vop: [drm:vop2_crtc_atomic_enable] Update mode to 3840x2160p60, type: 11 for vp0
[   71.006517] dwhdmi-rockchip fe0a0000.hdmi: Rate 371250000 missing; compute N dynamically
[   71.006901] Cluster0-win0 vpstate->eotf 2 vcstate->eotf 0
[   71.006964] Cluster0-win0 hdr2sdr_en 1 hdr_in 1 sdr2hdr_en 0 is_input_yuv 1 is_output_yuv 0
[   71.007034] Cluster1-win0 hdr2sdr_en 0 hdr_in 0 sdr2hdr_en 0 is_input_yuv 0 is_output_yuv 0
[   71.022511] Esmart0-win0 vpstate->eotf 0 vcstate->eotf 0
[   71.022555] Esmart0-win0 hdr2sdr_en 0 hdr_in 0 sdr2hdr_en 0 is_input_yuv 1 is_output_yuv 1
[   71.022582] Cluster0-win0 hdr2sdr_en 1 hdr_in 1 sdr2hdr_en 0 is_input_yuv 0 is_output_yuv 1
[   71.052015] Esmart0-win0 vpstate->eotf 0 vcstate->eotf 0
[   71.052057] Esmart0-win0 hdr2sdr_en 0 hdr_in 0 sdr2hdr_en 0 is_input_yuv 1 is_output_yuv 1
[   71.052101] Cluster0-win0 hdr2sdr_en 1 hdr_in 1 sdr2hdr_en 0 is_input_yuv 0 is_output_yuv 1
[   71.067202] Esmart0-win0 vpstate->eotf 0 vcstate->eotf 0
[   71.067225] Esmart0-win0 hdr2sdr_en 0 hdr_in 0 sdr2hdr_en 0 is_input_yuv 1 is_output_yuv 1
[   71.067253] Cluster0-win0 hdr2sdr_en 1 hdr_in 1 sdr2hdr_en 0 is_input_yuv 0 is_output_yuv 1

Change-Id: I032f03cfe2bce6ccce874fc04bd3b67cc589a11e
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-12-31 11:14:19 +08:00
Andy Yan
411a740bf9 drm/rockchip: vop2: Add delay number for windows
Change-Id: Id38812958615fb59b7eb60504368383a519592b4
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-12-31 11:12:55 +08:00
Andy Yan
363b2d2f7b drm/rockchip: vop2: Fix HDR2SDR
1. Add hdr2sdr_bypass_en and hdr2sdr_auto_gating_en bits, which
unmentationed in TRM.
2. HDR2SDR and SDR2HDR should overlay in RGB color space.
3. Window csc should be disabled when HDR2SDR or SDR2HDR enabled.

Change-Id: Ic3e15c3f0ddb5adf23a4962366749228f5117a9f
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-12-31 11:04:27 +08:00
Zorro Liu
d7e6aa9821 drm/rockchip: add ebook driver ebc-dev
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I9e79ffd4938b90d47f68ac1c4ab0ff9fb093bd1e
2020-12-31 09:09:17 +08:00
Tao Huang
e91ecc8650 drm/rockchip: vop2: Replace include rk_system_status.h with rockchip-system-status.h
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I8506cf89715e6275e2372484f695e64c24301fd2
2020-12-30 20:29:19 +08:00
Tao Huang
281f00e16b drm/rockchip: vop: Replace include rk_system_status.h with rockchip-system-status.h
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I374203d61c96481c226bc57ac2fe1db2da687f49
2020-12-30 20:29:19 +08:00
Andy Yan
ec4bffd288 drm/rockchip: vop2: Fix the max_input/output width of cluster sub window
According to TRM, the max_intput/output width of a cluster window
should reduce by half when work in two win mode.

Change-Id: I5cbe10605e8895eb307df9591b222c9293bee21a
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-12-30 16:37:56 +08:00
Shunqing Chen
8589814a88 drm/bridge: sii902x: add YUV422 input support
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I0b6cc2a12206eb1cdc9f6c292856196c94b85d90
2020-12-29 20:20:51 +08:00
Fabrizio Castro
51e827acd9 UPSTREAM: drm/bridge/sii902x: Add missing dependency on I2C_MUX
kbuild test robot reports:

>> ERROR: "i2c_mux_add_adapter" [drivers/gpu/drm/bridge/sii902x.ko] undefined!
>> ERROR: "i2c_mux_alloc" [drivers/gpu/drm/bridge/sii902x.ko] undefined!
>> ERROR: "i2c_mux_del_adapters" [drivers/gpu/drm/bridge/sii902x.ko] undefined!

Quite obviously the driver depends on I2C_MUX, but adding a "depends on"
introduces a recursive dependency, therefore this patch selects I2C_MUX
instead.

Change-Id: I55a6197cf8f0d782a8efb7816f1bfef7c2713587
Fixes: 21d808405f ("drm/bridge/sii902x: Fix EDID readback")
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Link: https://lists.01.org/pipermail/kbuild-all/2018-November/054924.html
Acked-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1542633978-22064-1-git-send-email-fabrizio.castro@bp.renesas.com
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit ea6b13e9fe)
2020-12-29 20:08:32 +08: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
Nickey Yang
881ef729dd drm/bridge: synopsys: dw-hdmi: check hdmi status in resume
HDMI status maybe incorrect in the following condition:
HDMI plug in -> system sleep ->  HDMI plug out -> system wake up.
At this time, cat /sys/class/drm/card 0-HDMI-A-1/status is connected.
There is no hpd interrupt, because HDMI is powerdown during suspend.
So we need check the current HDMI status in this case.
Test on rk3288 & rk3399.

Change-Id: I2fbafd1d80b59628bca65e9e45760a24d1668241
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2020-12-28 09:28:33 +00:00
Andy Yan
0bc7b9d548 drm/rockchip: vop2: Enable dclk_div2 for YUV420 output mode
dclk_div2 and dclk_div2_phase are undocumented in TRM, but
these two bit should be set at YUV420 output mode.

Change-Id: I711336798a7d352c8f7a85f1fedfa5933d8261ec
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-12-28 16:37:12 +08:00
Andy Yan
ae112b461e drm/rockchip: vop2: Update hdr10 register
Change-Id: Iffcd3d07ab29ddac6c48ff250880daf4db39a9ab
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-12-23 15:47:22 +08:00
Algea Cao
8fa1516479 drm/bridge: synopsys: dw-hdmi: Support dw-hdmi does not serve as a connector
If dw-hdmi is not used as the final output port, it is
only used as a bridge but not a connector.

Change-Id: Ie730f47d6075db74c0c54374849fd938c13f5ba8
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2020-12-23 11:28:11 +08:00
Algea Cao
6d1fbe5b3d drm: rockchip: rk628: post_process: Enable y2r when input mode clk is 594Mhz
Because hdmirx phy only support yuv420 when input mode is 4K-60Hz,
y2r should be enabled.

Change-Id: I1eca2c6783c63e07cb13b617bb32ff81f2229c7d
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2020-12-23 11:28:11 +08:00
Algea Cao
c0a543e874 drm: rockchip: rk628: Add rk628 hdmirx driver
Change-Id: If4d9fefeada220430f9b6a5b3a35a20239461d3e
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2020-12-23 11:28:11 +08:00
Algea Cao
92ae0beb2b drm: rockchip: rk628: Add rk628 combrx-phy driver
Change-Id: I0fbcca09e05c9876ae7e87000d1fa5b72a061077
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2020-12-23 11:28:11 +08:00
Shunqing Chen
b76b1f8f53 drm/bridge: synopsys: dw-hdmi: fix no display between kernel logo and android logo
def_mode picture_aspect_ratio is no HDMI_PICTURE_ASPECT_NONE,
but Android set mode, the picture_aspect_ratio is HDMI_PICTURE_ASPECT_NONE,
When comparing the new mode with the old mode, the two are inconsistent,
so the mode will be changed.

Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: Ide07f9f7251a4ad22d4c27136005be77f1dfd4e2
2020-12-21 15:53:41 +08:00
Andy Yan
972ff062a4 drm/rockchip: vop2: No scale if gt2/gt4 enabled
Change-Id: I9766b44d87b4b20ec12eac0422bc07ec8b66fdda
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-12-15 17:23:54 +08:00
Sandy Huang
25120743e0 drm/rockchip: vop2: fix esmart display black screen
This is workaround solution for IC design:
esmart can't support scale down when actual_w % 16 == 1.

Change-Id: I0fa090c5e28b79e644ef31ea1184b724b9d32ffa
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-12-15 15:31:23 +08:00
Sandy Huang
ee81411850 drm/rockchip: vop2: update vop scale factor
Change-Id: I2bb22e56de8f2daafb510d8f3eec49928d1fa213
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-12-14 17:10:47 +08:00
Shunqing Chen
d5d2966907 drm/rockchip: rk618: rgb: fix find bridge fail
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I0ac8b1b2b3db90e5608a3bc8e5372cdb4863182a
2020-12-14 17:00:50 +08:00
Sandy Huang
8877840a6f drm/rockchip: vop2: add support gamma function
Change-Id: I8e86cfa4e7229d26cfcf729890445d6180a1c0c5
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-12-14 16:04:00 +08:00
Sandy Huang
c35604c21e drm/rockchip: vop2: add win dsp size check
Change-Id: I1a548ee5f8887c30100d9a0364acef7c991c4d2c
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-12-11 17:47:00 +08:00
Andy Yan
14b10bcb2c drm/rockchip: vop2: Change > to >= for gt2/gt4 check
According to test: Cluster can work with >, But
Esmart must enable gt2 when src_h = 2 * dst_h;

Change-Id: I3347eb4e340df093f7ab29afcb3a80ae5e03b0cc
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-12-11 11:17:20 +08:00
Wyon Bi
93ec807dae drm/bridge: analogix_dp: Remove fast training detection from loader protect
Fixes: 5beeda4a26 ("drm/bridge: analogix_dp: Add loader protect for psr function")
Change-Id: If49e3b88bfc08dcb5dfe610a63ad0f4f340ef872
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2020-12-10 18:45:36 +08:00
Sandy Huang
fe736116ba drm/rockchip/rk628: Add GVI driver
Change-Id: Ie511a993867a2a2dd974862253eb6f56ee6c0d84
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-12-10 14:18:09 +08:00
Sandy Huang
4267ed97e7 drm/rockchip/rk628: combtxphy: update for GVI mode
Change-Id: Iea5a38e5c8ee1f1e3af44f7765f34e37147ffedf
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-12-10 14:18:09 +08:00
Sandy Huang
1b7d995fb2 drm/rockchip: vop2: add support post scale
Change-Id: I564235c41a59b767f433cfc2eb85cf8f71eea74c
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-12-09 14:18:37 +08:00
Sandy Huang
f218d7cbe6 drm/bridge: rk630: move bt656 decoder enable to last config
Change-Id: I7e3e153f71931c448a2f7ecd01395b73369e934a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-12-07 16:22:42 +08:00
Sandy Huang
2ffcd9119d drm/rockchip: vop2: update output mode for bt656
Change-Id: Ic6526fe070f05579b013b77a8ea6dd921440cbd8
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-12-07 16:22:35 +08:00
Andy Yan
278370effb drm/rockchip: vop2: Add afbc offset transformat support
This is a transformat of non-16 pixel align.

Change-Id: If132f4f049cb4514c9684e0f1d5103da64abe03a
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-12-07 14:19:08 +08:00
Sandy Huang
b1c0c4e368 drm/rockchip: vop2: init yuv overlay mode
post bcsh csc module need to know win overlay at yuv or rgb domain.

Change-Id: I246c22ddf0d02f48f515947a48ef058dca36c7a5
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-12-04 15:58:05 +08:00
Andy Yan
63346cd759 drm/rockchip: vop2: Change dst alpha blend mode to per pixel mode
This is changed by rihui.bao@rock-chips.com

Change-Id: I7d9ac1ebef93fbeff338baf0d92daf838223ac5f
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-12-04 11:58:53 +08:00
Andy Yan
008ab5b494 drm/rockchip: vop2: Add configure for pre overlay alpha
Change-Id: Ic304ff7424445f49fef22e6bed45c81c72488ec9
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-12-04 11:56:49 +08:00
Andy Yan
133eccd42b drm/rockchip: vop2: Add alpha support for cluster sub window
Change-Id: If4c3e467bb53b3aacdc46f7387eab764abb4f794
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-12-04 11:51:28 +08:00
Andy Yan
c398b4a772 drm/rockchip: vop2: Gather cluster ctrl register
Two sub windows in a cluster share same ctrl register bit.

Change-Id: I0a123fd3a1f63bbf0d6abea557e6024a99adb4cb
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-12-04 11:39:37 +08:00
Andy Yan
75cc68bce9 drm/rockchip: vop2: Fix yuv 10 bit on cluster
YUV 10 bit config value on Cluster is different
with Esmart/Smart.

Change-Id: If334f347b6d1759650113b36327a49a850f03e0e
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-12-04 09:44:45 +08:00
Greg Kroah-Hartman
1309a09163 Revert "drm/atomic_helper: Stop modesets on unregistered connectors harder"
This reverts commit 72289dc23c which is
commit de9f8eea5a upstream.

It breaks the current drm abi and for Android devices, should not be an
issue as modesetting isn't a big deal for them.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I74a8e98a755dcd68a79a9fe6c50d92806cb7a1f2
2020-12-03 14:58:52 +01:00
Greg Kroah-Hartman
08bed51f55 Merge 4.19.161 into android-4.19-stable
Changes in 4.19.161
	perf event: Check ref_reloc_sym before using it
	netfilter: clear skb->next in NF_HOOK_LIST()
	btrfs: don't access possibly stale fs_info data for printing duplicate device
	btrfs: fix lockdep splat when reading qgroup config on mount
	wireless: Use linux/stddef.h instead of stddef.h
	KVM: arm64: vgic-v3: Drop the reporting of GICR_TYPER.Last for userspace
	KVM: x86: handle !lapic_in_kernel case in kvm_cpu_*_extint
	KVM: x86: Fix split-irqchip vs interrupt injection window request
	arm64: pgtable: Fix pte_accessible()
	arm64: pgtable: Ensure dirty bit is preserved across pte_wrprotect()
	drm/atomic_helper: Stop modesets on unregistered connectors harder
	ALSA: hda/hdmi: fix incorrect locking in hdmi_pcm_close
	HID: cypress: Support Varmilo Keyboards' media hotkeys
	HID: add support for Sega Saturn
	Input: i8042 - allow insmod to succeed on devices without an i8042 controller
	HID: hid-sensor-hub: Fix issue with devices with no report ID
	HID: add HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE for Gamevice devices
	dmaengine: xilinx_dma: use readl_poll_timeout_atomic variant
	x86/xen: don't unbind uninitialized lock_kicker_irq
	HID: Add Logitech Dinovo Edge battery quirk
	proc: don't allow async path resolution of /proc/self components
	nvme: free sq/cq dbbuf pointers when dbbuf set fails
	dmaengine: pl330: _prep_dma_memcpy: Fix wrong burst size
	scsi: libiscsi: Fix NOP race condition
	scsi: target: iscsi: Fix cmd abort fabric stop race
	perf/x86: fix sysfs type mismatches
	xtensa: uaccess: Add missing __user to strncpy_from_user() prototype
	phy: tegra: xusb: Fix dangling pointer on probe failure
	batman-adv: set .owner to THIS_MODULE
	ARM: dts: dra76x: m_can: fix order of clocks
	scsi: ufs: Fix race between shutdown and runtime resume flow
	bnxt_en: fix error return code in bnxt_init_one()
	bnxt_en: fix error return code in bnxt_init_board()
	video: hyperv_fb: Fix the cache type when mapping the VRAM
	bnxt_en: Release PCI regions when DMA mask setup fails during probe.
	cxgb4: fix the panic caused by non smac rewrite
	s390/qeth: fix tear down of async TX buffers
	IB/mthca: fix return value of error branch in mthca_init_cq()
	nfc: s3fwrn5: use signed integer for parsing GPIO numbers
	net: ena: set initial DMA width to avoid intel iommu issue
	ibmvnic: fix NULL pointer dereference in reset_sub_crq_queues
	ibmvnic: fix NULL pointer dereference in ibmvic_reset_crq
	optee: add writeback to valid memory type
	efivarfs: revert "fix memory leak in efivarfs_create()"
	can: gs_usb: fix endianess problem with candleLight firmware
	platform/x86: thinkpad_acpi: Send tablet mode switch at wakeup time
	platform/x86: toshiba_acpi: Fix the wrong variable assignment
	can: m_can: fix nominal bitiming tseg2 min for version >= 3.1
	perf probe: Fix to die_entrypc() returns error correctly
	USB: core: Change %pK for __user pointers to %px
	usb: gadget: f_midi: Fix memleak in f_midi_alloc
	USB: quirks: Add USB_QUIRK_DISCONNECT_SUSPEND quirk for Lenovo A630Z TIO built-in usb-audio card
	usb: gadget: Fix memleak in gadgetfs_fill_super
	x86/speculation: Fix prctl() when spectre_v2_user={seccomp,prctl},ibpb
	x86/resctrl: Remove superfluous kernfs_get() calls to prevent refcount leak
	x86/resctrl: Add necessary kernfs_put() calls to prevent refcount leak
	USB: core: Fix regression in Hercules audio card
	Linux 4.19.161

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib704b9ff60755978b272aa358d25ddb217cc37bc
2020-12-03 10:10:00 +01:00
Lyude Paul
72289dc23c drm/atomic_helper: Stop modesets on unregistered connectors harder
commit de9f8eea5a upstream.

Unfortunately, it appears our fix in:
commit b5d29843d8 ("drm/atomic_helper: Allow DPMS On<->Off changes
for unregistered connectors")

Which attempted to work around the problems introduced by:
commit 4d80273976 ("drm/atomic_helper: Disallow new modesets on
unregistered connectors")

Is still not the right solution, as modesets can still be triggered
outside of drm_atomic_set_crtc_for_connector().

So in order to fix this, while still being careful that we don't break
modesets that a driver may perform before being registered with
userspace, we replace connector->registered with a tristate member,
connector->registration_state. This allows us to keep track of whether
or not a connector is still initializing and hasn't been exposed to
userspace, is currently registered and exposed to userspace, or has been
legitimately removed from the system after having once been present.

Using this info, we can prevent userspace from performing new modesets
on unregistered connectors while still allowing the driver to perform
modesets on unregistered connectors before the driver has finished being
registered.

Changes since v1:
- Fix WARN_ON() in drm_connector_cleanup() that CI caught with this
  patchset in igt@drv_module_reload@basic-reload-inject and
  igt@drv_module_reload@basic-reload by checking if the connector is
  registered instead of unregistered, as calling drm_connector_cleanup()
  on a connector that hasn't been registered with userspace yet should
  stay valid.
- Remove unregistered_connector_check(), and just go back to what we
  were doing before in commit 4d80273976 ("drm/atomic_helper: Disallow
  new modesets on unregistered connectors") except replacing
  READ_ONCE(connector->registered) with drm_connector_is_unregistered().
  This gets rid of the behavior of allowing DPMS On<->Off, but that should
  be fine as it's more consistent with the UAPI we had before - danvet
- s/drm_connector_unregistered/drm_connector_is_unregistered/ - danvet
- Update documentation, fix some typos.

Fixes: b5d29843d8 ("drm/atomic_helper: Allow DPMS On<->Off changes for unregistered connectors")
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: stable@vger.kernel.org
Cc: David Airlie <airlied@linux.ie>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20181016203946.9601-1-lyude@redhat.com
(cherry picked from commit 39b50c6038)
Fixes: e96550956f ("drm/atomic_helper: Disallow new modesets on unregistered connectors")
Fixes: 34ca26a98a ("drm/atomic_helper: Allow DPMS On<->Off changes for unregistered connectors")
Cc: stable@vger.kernel.org
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-02 08:48:08 +01:00
Sandy Huang
572ab8ceb5 drm/rockchip: vop2: add support bcsh
Change-Id: Ibf87fe909bf7dfd0365000ca31c3bb9b84a3dbc8
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-11-30 19:11:30 +08:00
Andy Yan
bff67105e4 drm/rockchip: vop2: Fix a setting of port mux value
When there is no layer attach to a port, the por_mux
should set to zero.

Change-Id: I880c3ff4ce8cac8ee41bdc7e6666d13796357cc6
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-11-30 18:40:07 +08:00
Andy Yan
1b1a5b5a62 drm/rockchip: vop2: layer_sel and port_mux config done by port
If layer_sel or port_mux config done immediately, the layer
map and port mux may change when one frame is still in display
process.

Change-Id: I5611e75c56c89fd4fa02a069acc971c9266b05b6
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2020-11-30 18:40:07 +08:00