Commit Graph

1053345 Commits

Author SHA1 Message Date
Tao Huang
784f0cee89 ANDROID: Incremental fs: Fix printk format warnings in format.c
fs/incfs/format.c: In function 'incfs_read_next_metadata_record':
./include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t {aka unsigned int}' [-Wformat=]
fs/incfs/format.c:619:3: note: in expansion of macro 'pr_warn'
   pr_warn("incfs: The record is too large. Size: %ld",
   ^~~~~~~

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I1a0b1e32761dd4358ff3ca210041893373f0a1a5
2021-03-18 18:49:03 +08:00
Tao Huang
85c88d7580 rk: .gitignore: ignore top img files and out directory
Change-Id: Icfd5518a10fef49c76164f4943f6451877c32f99
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-03-17 21:12:51 +08:00
Tao Huang
659587fbd5 rk: add "WITH Linux-syscall-note" to SPDX tag of uapi headers
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I4c5994349586905abf7ec44c9c01f22f8e3bfa37
2021-03-17 21:12:44 +08:00
Tao Huang
bc69b758ef Merge remote branch 'android12-5.10' of https://android.googlesource.com/kernel/common
* android12-5.10: (176331 commits)
  ANDROID: GKI: Enable bounds sanitizer
  ANDROID: Allow HAS_LTO_CLANG with KASAN_HW_TAGS
  ANDROID: abi_gki_aarch64_qcom: Add cpufreq related symbols
  ANDROID: cpufreq: Add a restricted vendor hook for freq transition
  ANDROID: scsi: ufs: add hooks to track ufs commands
  ANDROID: Fix compilation error when CPU_FREQ is disabled
  BACKPORT: kasan, arm64: allow using KUnit tests with HW_TAGS mode
  Revert "FROMGIT: kasan, arm64: allow using KUnit tests with HW_TAGS mode"
  Revert "BACKPORT: kasan: remove redundant config option"
  UPSTREAM: arm/kasan: fix the array size of kasan_early_shadow_pte[]
  FROMGIT: KVM: arm64: Workaround firmware wrongly advertising GICv2-on-v3 compatibility
  FROMGIT: KVM: arm64: Rename __vgic_v3_get_ich_vtr_el2() to __vgic_v3_get_gic_config()
  FROMGIT: KVM: arm64: Don't access PMSELR_EL0/PMUSERENR_EL0 when no PMU is available
  FROMGIT: KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key
  FROMGIT: KVM: arm64: Fix nVHE hyp panic host context restore
  FROMGIT: KVM: arm64: Avoid corrupting vCPU context register in guest exit
  FROMLIST: arm64: cpufeatures: Fix handling of CONFIG_CMDLINE for idreg overrides
  ANDROID: sched: Add vendor hook for uclamp_eff_value
  ANDROID: abi_gki_aarch64_qcom: Add CFS scheduler symbols
  ANDROID: GKI: Add mempool APIs to the symbol list
  ...

Change-Id: I4ed13984b97bc531d1dae61920457f31b84190e9

Conflicts:
	Documentation/devicetree/bindings/nvmem/rockchip-otp.txt
	arch/arm64/boot/dts/rockchip/px30.dtsi
	arch/arm64/boot/dts/rockchip/rk3308.dtsi
	arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
	drivers/clk/rockchip/Kconfig
	drivers/clk/rockchip/clk-rk3308.c
	drivers/gpu/drm/rockchip/rk3066_hdmi.c
	drivers/gpu/drm/rockchip/rockchip_rgb.c
	drivers/media/i2c/imx219.c
	drivers/nvmem/rockchip-otp.c
	drivers/power/supply/cw2015_battery.c
	sound/soc/codecs/cx2072x.c
	sound/soc/codecs/cx2072x.h
	sound/soc/codecs/rk3328_codec.c
2021-03-17 18:07:51 +08:00
Tao Huang
251c226c35 rk: revert to v4.19
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I502dce68b639df4ebf5a1688e0dc2e5c5763ebc2
2021-03-17 18:05:39 +08:00
Andy Yan
8e964a33a1 drm/rockchip: vop2: print module name when dump register
Change-Id: Ifaee56deff46ac0156831a37cbf7b77586beab84
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-03-17 17:34:21 +08:00
Ren Jianing
5bdeec86b6 arm64: dts: rockchip: rk3566-box: fix combphy1 ref-clk to 100MHz
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: I2808f908d087843aba7c4c0fd769b7c80518c022
2021-03-17 17:33:28 +08:00
Ren Jianing
365de1ccfa phy: rockchip: inno-usb2: add pre-emphasis at RK356x tuning
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: Ie6375b363d4ca641b971b331971ce7985d985075
2021-03-17 17:33:19 +08:00
Sandy Huang
f07e966dbd drm/rockchip: vop2: turn down scale fac cali log level
Change-Id: I13395bfb054c170dd58de4af4bccb35a52565dfa
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-03-17 15:18:49 +08:00
Zefa Chen
1cb6be0adb media: i2c: sensor driver add g_mbus_config for isp2
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I14dfc95c06ab93843a7c9956e7da5b04cdb820bb
2021-03-17 15:18:37 +08:00
William Wu
a140608dec usb: dwc3: gadget: fix request already in flight
Test on RV1126 board with UVC function. When do UVC streaming on/off
@H265 3840 * 2160 stress test, it fails to streaming on UVC with the
following log:

[ 1589.834573] WARNING: CPU: 3 PID: 3075 at drivers/usb/dwc3/gadget.c:1611 dwc3_gadget_ep_queue+0x148/0x178
[ 1589.834593] ep3in: request 638c13d3 already in flight
[ 1589.834603] Modules linked in: galcore(O)
[ 1589.834622] CPU: 3 PID: 3075 Comm: kworker/3:2 Tainted: G        W  O      4.19.111 #2
[ 1589.834631] Hardware name: Generic DT based system
[ 1589.834648] Workqueue: events uvcg_video_pump
[ 1589.834673] [<b010f408>] (unwind_backtrace) from [<b010b96c>] (show_stack+0x10/0x14)
[ 1589.834741] [<b010b96c>] (show_stack) from [<b0645104>] (dump_stack+0x90/0xa4)
[ 1589.834766] [<b0645104>] (dump_stack) from [<b0126204>] (__warn+0xfc/0x114)
[ 1589.834787] [<b0126204>] (__warn) from [<b0126260>] (warn_slowpath_fmt+0x44/0x68)
[ 1589.834806] [<b0126260>] (warn_slowpath_fmt) from [<b04571d8>] (dwc3_gadget_ep_queue+0x148/0x178)
[ 1589.834826] [<b04571d8>] (dwc3_gadget_ep_queue) from [<b0472074>] (uvcg_video_pump+0x94/0x164)
[ 1589.834849] [<b0472074>] (uvcg_video_pump) from [<b013cce0>] (process_one_work+0x1f0/0x408)
[ 1589.834869] [<b013cce0>] (process_one_work) from [<b013d9b8>] (worker_thread+0x30/0x564)
[ 1589.834891] [<b013d9b8>] (worker_thread) from [<b0142910>] (kthread+0x140/0x170)
[ 1589.834907] [<b0142910>] (kthread) from [<b01010d8>] (ret_from_fork+0x14/0x3c)
[ 1589.834922] Exception stack(0xbbdfffb0 to 0xbbdffff8)
[ 1589.834938] ffa0:                                     00000000 00000000 00000000 00000000
[ 1589.834953] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1589.834966] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 1589.834979] ---[ end trace b30d445a1f050523 ]---
[ 1589.834979] ---[ end trace b30d445a1f050523 ]---
[ 1589.834992] Failed to queue request (-22).

It's because that the __dwc3_gadget_start_isoc is called very late after
XferNotReady, so the frame number is outdated and start transfer fail
with the cmd_status "DEPEVT_TRANSFER_BUS_EXPIRY". In this case, the dwc3
driver return -EINVAL to the UVC function driver without delete and unmap
the failed request, this cause the request requeue fail next time.

Change-Id: I4cc919bcd4e1e0abbb6a929483e6fc2fe7dc9750
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-03-17 15:14:39 +08:00
Michael Olbrich
582ea1370a UPSTREAM: usb: dwc3: gadget: make starting isoc transfers more robust
Currently __dwc3_gadget_start_isoc must be called very shortly after
XferNotReady. Otherwise the frame number is outdated and start transfer
will fail, even with several retries.

DSTS provides the lower 14 bit of the frame number. Use it in combination
with the frame number provided by XferNotReady to guess the current frame
number. This will succeed unless more than one 14 rollover has happened
since XferNotReady.

Start transfer might still fail if the frame number is increased
immediately after DSTS is read. So retries are still needed.
Don't drop the current request if this happens. This way it is not lost and
can be used immediately to try again with the next frame number.

With this change, __dwc3_gadget_start_isoc is still not successfully in all
cases bit it increases the acceptable delay after XferNotReady
significantly.

Change-Id: I656b487b9a265921ae612a071ebcd496ffe5f510
Reviewed-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit c5a7092f40)
2021-03-17 15:14:39 +08:00
Xing Zheng
81b3c14f77 ASoC: rockchip: pdm: fix the missing register sound with 'rockchip,path-map' property
The return value equal 0 should be correct.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: Id0ac8012f4e2eeb95a4dbf590f02843cbc3c863f
2021-03-17 14:01:36 +08:00
Shawn Lin
c84a4aa411 PCI: rockchip: dw: Move deassert #PERST after enabling LTSSM
It was recommended by ECN document, so following it will make
less risk in probing devices in case the refclk is coming from
SoC.

Change-Id: Ic4514f373b6014c406d5436738419c64df6d32b2
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2021-03-17 11:19:17 +08:00
Andy Yan
9a75da1582 drm/rockchip: vop2: Fix wait fs_by_vcnt in interlace mode
Change-Id: I940c690b8b4246b38ec94847fd2d2b0f8d481888
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-03-17 10:13:55 +08:00
Andy Yan
09d4b2c521 drm/rockchip: vop2: wait for fs by intr raw status
Change-Id: Idda6f973e70aa1ea0146e023173829555ccaa551
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-03-17 10:13:55 +08:00
Algea Cao
e616f98e1c drm: rockchip: dw-hdmi: Clean output_if when hdmi disable
To support multi-display output_if must be clean when
hdmi disable.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ic4205a59ce1adab7f4ac6f673c740a14556fdeae
2021-03-17 09:03:00 +08:00
Finley Xiao
c472f79a09 PM / devfreq: rockchip_dmc: Add SYS_STATUS_CIF0/1 system status support
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ie683ed0cc49b21ec95765396a73e2e7a3f7cbb04
2021-03-16 17:16:12 +08:00
Huang zhibao
241b780cac arm64: dts: rockchip: rk3568-nvr: set rockchip,default-max-load to 100
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I31859f56b753635999414342d934d18fa68298ad
2021-03-16 14:47:14 +08:00
Jianqun Xu
e169bc2262 irqchip/gic-v3: get free page instead of kmalloc for itt
Since kmalloc may not care about GFP_DMA32, change to use get free pages
for itt on its device.

Change-Id: I2e91c97bd4d61d2542cf437363fc3dd1d9fa669c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-03-16 14:43:13 +08:00
Shawn Lin
58a17c4f09 PCI: rockchip: dw: Fix possible wrong power supply
regulator_disable/enable() accessories may not be supported by
all regulator drivers such as gpio regulator. In order to compliant
to all, it would be better to call a .set_voltage() before enabling
or disabling regulators as this hook fits for all, no metter if enable
or disable hooks were implemented.

Change-Id: Id6c67728ed29ae76986908908361dec966724a3e
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2021-03-16 14:41:01 +08:00
Shunqing Chen
ba901481e0 arm64: dts: rockchip: rk356x: evb: add hdmi phy-table
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I7314c505028f2e69698b693a036da8162c4842d8
2021-03-16 10:03:01 +08:00
Yifeng Zhao
f1be951d1b drivers: rk_nand: fix some NAND FLASH initialization failed issue
There are two sets of NAND flash drivers. The NAND flash state needs
to be restored to the default value after detection.

bug:
[    2.722218] No.1 FLASH ID:45 3a 94 93 76 51
[    2.726295] toshiba RR 18 row=400,count 18,status=-1
[    2.726353] flash_read_page_en 0 400 error_ecc -1 1

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I80c95a68ad900e0653684ba3978e59102d27bf70
2021-03-16 10:02:44 +08:00
Herman Chen
6e04278ece video: rockchip: mpp: rkvdec2: Rename functions
Rename rkvdec2 functions which have the same name to the rkvdec
functions.

Change-Id: I188ce1afa8e9fab0a63813a4071e42b51fe92ccf
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-16 09:17:50 +08:00
Ding Wei
d15513be2c video: rockchip: mpp: Modify mpp_dma interface
Change-Id: Ia7b45daaa120a1f3bbb3adf9c2decda4f71d8c60
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-15 20:00:24 +08:00
Herman Chen
444d1b0a64 video: rockchip: mpp: Add task index for debug
Change-Id: I2d8399f626d60afcb2149c21af0f39c9043c7200
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-15 18:33:03 +08:00
Shawn Lin
3677e0f619 arm64: dts: rockchip: rk356x: correct gpio regulator usage
Should not be zero ahead, otherwise the min voltage is interpreted
as a wrong value by regulator code.

Change-Id: Ia141583f411a54bf26cb88b3992687539f29fec8
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2021-03-15 17:10:59 +08:00
Huang zhibao
495f9016d9 arm64: dts: rockchip: rk3566-box-demo-v10: enable sata2
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: If63af728d36d98698e4811666834729fd8868a0e
2021-03-15 17:09:20 +08:00
Shunqing Chen
c5ed611fe1 ARM: dts: rk3288-evb-android-rk808-edp: add test power
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: Ie9427d07e6ff40cdec7849a9897c8cbddb7ff720
2021-03-15 17:09:05 +08:00
Ville Syrjälä
b631bcf22d UPSTREAM: drm/dsc: Fix bogus cpu_to_be16() usage
__be16 = cpu_to_be16(__be16) is nonsense. Do it right.

../drivers/gpu/drm/drm_dsc.c:218:53: warning: incorrect type in assignment (different base types)
../drivers/gpu/drm/drm_dsc.c:218:53:    expected restricted __be16
../drivers/gpu/drm/drm_dsc.c:218:53:    got int
../drivers/gpu/drm/drm_dsc.c:225:25: warning: cast from restricted __be16
../drivers/gpu/drm/drm_dsc.c:225:25: warning: incorrect type in argument 1 (different base types)
../drivers/gpu/drm/drm_dsc.c:225:25:    expected unsigned short [usertype] val
../drivers/gpu/drm/drm_dsc.c:225:25:    got restricted __be16
../drivers/gpu/drm/drm_dsc.c:225:25: warning: cast from restricted __be16
../drivers/gpu/drm/drm_dsc.c:225:25: warning: cast from restricted __be16

Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: David Francis <David.Francis@amd.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190710125143.9965-2-ville.syrjala@linux.intel.com
Reviewed-by: Sean Paul <sean@poorly.run>
(cherry picked from commit 40d51c05d0)
Change-Id: Ia0bebf00c978b2a2bd8750de1210f9ee30e62cdb
2021-03-15 11:24:02 +08:00
David Francis
e139e81fd1 UPSTREAM: drm/dsc: Split DSC PPS and SDP header initialisations
The DP 1.4 spec defines the SDP header and SDP contents for
a Picture Parameter Set (PPS) that must be sent in advance
of DSC transmission to define the encoding characteristics.

This was done in one struct, drm_dsc_pps_infoframe, which
conatined the SDP header and PPS.  Because the PPS is
a property of DSC over any connector, not just DP, and because
drm drivers may have their own SDP structs they wish to use,
make the functions that initialise SDP and PPS headers take
the components they operate on, not drm_dsc_pps_infoframe,

Signed-off-by: David Francis <David.Francis@amd.com>
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190221202001.28430-4-David.Francis@amd.com
(cherry picked from commit dbfbe717cc)
Change-Id: I691b513d778f8763e9e48e6b073a26fc1f6adb5b
2021-03-15 11:24:02 +08:00
David Francis
6da39e1110 UPSTREAM: drm/dsc: Add native 420 and 422 support to compute_rc_params
Native 420 and 422 transfer modes are new in DSC1.2

In these modes, each two pixels of a slice are treated as one
pixel, so the slice width is half as large (round down) for
the purposes of calucating the groups per line and chunk size
in bytes

In native 422 mode, each pixel has four components, so the
mux component of a group is larger by one additional mux word
and one additional component

Now that there is native 422 support, the configuration option
previously called enable422 is renamed to simple_422 to avoid
confusion

Acked-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: David Francis <David.Francis@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190221202001.28430-3-David.Francis@amd.com
(cherry picked from commit 06d7cecdb6)
Change-Id: I5496e7bb6f3548fe9f59b6152ff0d72bb7d8fa7f
2021-03-15 11:24:02 +08:00
David Francis
58ac87aef0 UPSTREAM: drm/i915: Move dsc rate params compute into drm
The function intel_compute_rc_parameters is part of the dsc spec
and is not driver-specific. Other drm drivers might like to use
it.  The function is not changed; just moved and renamed.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: David Francis <David.Francis@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190221202001.28430-2-David.Francis@amd.com
(cherry picked from commit dc43332b7a)
Change-Id: I306b87e9f29ef54f7011a12336d5ad277a65b6a2
2021-03-15 11:24:02 +08:00
Manasi Navare
b9630468f5 UPSTREAM: drm/dsc: Add kernel documentation for DRM DP DSC helpers
This patch adds appropriate kernel documentation for DRM DP helpers
used for enabling Display Stream compression functionality in
drm_dp_helper.h and drm_dp_helper.c as well as for the DSC spec
related structure definitions and helpers in drm_dsc.c and drm_dsc.h
Also add links between the functions and structures in the documentation.

v3:
* Fix the checkpatch warnings (Sean Paul)
v2:
* Add inline comments for longer structs (Daniel Vetter)
* Split the summary and description (Daniel Vetter)

Suggested-by: Daniel Vetter <daniel.vetter@intel.com>
Suggested-by: Sean Paul <sean@poorly.run>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Sean Paul <sean@poorly.run>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Acked-by: Sean Paul <sean@poorly.run>
Reviewed-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190206213148.21390-1-manasi.d.navare@intel.com
(cherry picked from commit 05bad2357a)
Change-Id: I241d62c90db77f542690a244908ff8e1836633c4
2021-03-15 11:24:02 +08:00
Manasi Navare
d3f201f534 UPSTREAM: drm/dsc: Modify DRM helper to return complete DSC color depth capabilities
DSC DPCD color depth register advertises its color depth capabilities
by setting each of the bits that corresponding to a specific color
depth. This patch defines those specific color depths and adds
a helper to return an array of color depth capabilities.

v2:
* Simplify the logic (Ville)

Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Acked-by: Sean Paul <seanpaul@chromium.org> (For merging through
drm-intel)
Reviewed-by: Ville Syrjala <ville.syrjala@linux.intel.com>
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181127214125.17658-1-manasi.d.navare@intel.com
(cherry picked from commit 4d4101c8b3)
Change-Id: I3f8e33773f965c7b347df17be6227c253eb5a075
2021-03-15 11:24:02 +08:00
Manasi Navare
d9e8d88cb0 UPSTREAM: drm/dsc: Define the DSC 1.1 and 1.2 Line Buffer depth constants
DSC specification defines linebuf_depth which contains the
line buffer bit depth used to generate the bitstream.
These values are defined as per Table 4.1 in DSC 1.2 spec

v2 (From Manasi):
* Rename as MAX_LINEBUF_DEPTH for DSC 1.1 and DSC 1.2

Cc: dri-devel@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Gaurav K Singh <gaurav.k.singh@intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Acked-by: Sean Paul <seanpaul@chromium.org> (For merging through
drm-intel)
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181127214125.17658-6-manasi.d.navare@intel.com
(cherry picked from commit f25310c736)
Change-Id: I1582b2b49463810f356bf7fdaf35b0730a81308c
2021-03-15 11:24:02 +08:00
Manasi Navare
24674c188c UPSTREAM: drm/dsc: Add helpers for DSC picture parameter set infoframes
According to Display Stream compression spec 1.2, the picture
parameter set metadata is sent from source to sink device
using the DP Secondary data packet. An infoframe is formed
for the PPS SDP header and PPS SDP payload bytes.
This patch adds helpers to fill the PPS SDP header
and PPS SDP payload according to the DSC 1.2 specification.

v7:
* Use BUILD_BUG_ON() to protect changing struct size (Ville)
* Remove typecaseting (Ville)
* Include byteorder.h in drm_dsc.c (Ville)
* Correct kernel doc spacing (Anusha)
v6:
* Use proper sequence points for breaking down the
assignments (Chris Wilson)
* Use SPDX identifier
v5:
Do not use bitfields for DRM structs (Jani N)
v4:
* Use DSC constants for params that dont change across
configurations
v3:
* Add reference to added kernel-docs in
Documentation/gpu/drm-kms-helpers.rst (Daniel Vetter)

v2:
* Add EXPORT_SYMBOL for the drm functions (Manasi)

Cc: dri-devel@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Acked-by: Sean Paul <seanpaul@chromium.org> (For merging through
drm-intel)
Link: https://patchwork.freedesktop.org/patch/msgid/20181127214125.17658-5-manasi.d.navare@intel.com
(cherry picked from commit a408c857a9)
Change-Id: I3f46f13570f95488f4f1ba0dff6801457109e1a3
2021-03-15 11:24:02 +08:00
Srivatsa, Anusha
7d5903e328 UPSTREAM: drm/dsc: Define Rate Control values that do not change over configurations
DSC has some Rate Control values that remain constant
across all configurations. These are as per the DSC
standard.

v3:
* Define them in drm_dsc.h as they are
DSC constants (Manasi)
v2:
* Add DP_DSC_ prefix (Jani Nikula)

Cc: dri-devel@lists.freedesktop.org
Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Gaurav K Singh <gaurav.k.singh@intel.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Srivatsa, Anusha <anusha.srivatsa@intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Acked-by: Sean Paul <seanpaul@chromium.org> (For merging through
drm-intel)
Link: https://patchwork.freedesktop.org/patch/msgid/20181127214125.17658-4-manasi.d.navare@intel.com
(cherry picked from commit 082a7b8601)
Change-Id: Ifefe0bc5dfae70bbe9228bde8b50fe7c2cc37816
2021-03-15 11:24:02 +08:00
Manasi Navare
360884e66e UPSTREAM: drm/dsc: Define VESA Display Stream Compression Capabilities
This defines all the DSC parameters as per the VESA DSC spec
that will be required for DSC encoder/decoder

v6: (From Manasi)
* Add a bit mask for RANGE_BPG_OFFSET for 6 bits(Manasi)
v5 (From Manasi)
* Add the RC constants as per the spec
v4 (From Manasi)
* Add the DSC_MUX_WORD_SIZE constants (Manasi)

v3 (From Manasi)
* Remove the duplicate define (Suggested By:Harry Wentland)

v2: Define this struct in DRM (From Manasi)
* Changed the data types to u8/u16 instead of unsigned longs (Manasi)
* Remove driver specific fields (Manasi)
* Move this struct definition to DRM (Manasi)
* Define DSC 1.2 parameters (Manasi)
* Use DSC_NUM_BUF_RANGES (Manasi)
* Call it drm_dsc_config (Manasi)

Cc: dri-devel@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Gaurav K Singh <gaurav.k.singh@intel.com>
Co-developed-by: Gaurav K Singh <gaurav.k.singh@intel.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Sean Paul <seanpaul@chromium.org> (For merging through
drm-intel)
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181127214125.17658-3-manasi.d.navare@intel.com
(cherry picked from commit 19fd5adbb5)
Change-Id: I95115779a7efaef93309cabb16691be632be1d54
2021-03-15 11:24:02 +08:00
Manasi Navare
1455f21ce0 UPSTREAM: drm/dsc: Define Display Stream Compression PPS infoframe
This patch defines a new header file for all the DSC 1.2 structures
and creates a structure for PPS infoframe which will be used to send
picture parameter set secondary data packet for display stream compression.
All the PPS infoframe syntax elements are taken from DSC 1.2 specification
from VESA.

v4:
* Remove redundant blankline in doc (Ville)
* use drm_dsc namespace for all structs (Ville)
* Use packed struct (Ville)
v3:
* Add the SPDX shorthand (Chris Wilson)
v2:
* Do not use bitfields in the struct (Jani Nikula)

Cc: Gaurav K Singh <gaurav.k.singh@intel.com>
Cc: dri-devel@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Acked-by: Sean Paul <seanpaul@chromium.org> (For merging through
drm-intel)
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181127214125.17658-2-manasi.d.navare@intel.com
(cherry picked from commit 7c247c0675)
Change-Id: I3f21cf671e629e10092a35675316bd6c772cc9f9
2021-03-15 11:24:02 +08:00
Manasi Navare
b67617785a UPSTREAM: drm/dp: DRM DP helper/macros to get DP sink DSC parameters
This patch adds inline functions and helpers for obtaining
DP sink's supported DSC parameters like DSC sink support,
eDP compressed BPP supported, maximum slice count supported
by the sink devices, DSC line buffer bit depth supported on DP sink,
DSC sink maximum color depth by parsing corresponding DPCD registers.

v4:
* Add helper to give line buf bit depth (Manasi)
* Correct the bit masking in color depth helper (manasi)
v3:
* Use SLICE_CAP_2 for DP (Anusha)
v2:
* Add DSC sink support macro (Jani N)

Cc: Gaurav K Singh <gaurav.k.singh@intel.com>
Cc: dri-devel@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Reviewed-by: Gaurav K Singh <gaurav.k.singh@intel.com>
Acked-by: Sean Paul <seanpaul@chromium.org> (For merging through
drm-intel)
Link: https://patchwork.freedesktop.org/patch/msgid/20181031001923.31442-4-manasi.d.navare@intel.com
(cherry picked from commit 0575650077)
Change-Id: I0d4952118e1b9e9a613d71abe1e0ecfaab1af6cc
2021-03-15 11:24:02 +08:00
Manasi Navare
47edb50671 UPSTREAM: drm/dp: Add DP DSC DPCD receiver capability size define and missing SHIFT
This patch defines the DP DSC receiver capability size that gives
total number of DP DSC DPCD registers.
This also adds a missing #defines for DP DSC support missed in the
commit id (ab6a46ea68 "Add DPCD definitions for DP 1.4 DSC feature")

v3:
* MIN_SLICE_WIDTH = 2560 (Anusha)
* Define DP_DSC_SLICE_WIDTH_MULTIPLIER = 320
v2:
* Add SHIFT define and DECOMPRESSION_EN define missed in prev patch

Cc: dri-devel@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Cc: Gaurav K Singh <gaurav.k.singh@intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Acked-by: Sean Paul <seanpaul@chromium.org> (For merging through
drm-intel)
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181031001923.31442-2-manasi.d.navare@intel.com
(cherry picked from commit ffddc4363c)
Change-Id: Ie6fea02981e53658d1d94cc0be9029fbf5a5e1f2
2021-03-15 11:24:02 +08:00
Manasi Navare
004e29eb3a UPSTREAM: drm/dp: Define payload size for DP SDP PPS packet
DP 1.4 spec defines DP secondary data packet for DSC
picture parameter set. This patch defines its payload size
according to the DP 1.4 specification.

Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Cc: dri-devel@lists.freedesktop.org
Cc: Gaurav K Singh <gaurav.k.singh@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Acked-by: Sean Paul <seanpaul@chromium.org> (For merging through
drm-intel)
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181031001923.31442-7-manasi.d.navare@intel.com
(cherry picked from commit 6e97272a9a)
Change-Id: I2d3bc1d31286da528b38fc79230c3d3b2935edb2
2021-03-15 11:24:02 +08:00
Ankit Nautiyal
e8095dc82a UPSTREAM: drm/edid: Parse DSC1.2 cap fields from HFVSDB block
This patch parses HFVSDB fields for DSC1.2 capabilities of an
HDMI2.1 sink. These fields are required by a source to understand the
DSC capability of the sink, to set appropriate PPS parameters,
before transmitting compressed data stream.

v2: Addressed following issues as suggested by Uma Shankar:
-Added a new struct for hdmi dsc cap
-Fixed bugs in macros usage.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
[Jani: Fixed checkpatch PARENTHESIS_ALIGNMENT.]
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201218103723.30844-4-ankit.k.nautiyal@intel.com
(cherry picked from commit 76ee7b9056)
Change-Id: I02d96954736a9dae33cc31e06f411f2ffffddc35
2021-03-15 11:24:02 +08:00
Swati Sharma
67020697e3 UPSTREAM: drm/edid: Parse MAX_FRL field from HFVSDB block
This patch parses MAX_FRL field to get the MAX rate in Gbps that
the HDMI 2.1 panel can support in FRL mode. Source need this
field to determine the optimal rate between the source and sink
during FRL training.

v2: Fixed minor bugs, and removed extra wrapper function (Uma Shankar)

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
[Jani: Fixed checkpatch FROM_SIGN_OFF_MISMATCH, PARENTHESIS_ALIGNMENT.]
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201218103723.30844-3-ankit.k.nautiyal@intel.com
(cherry picked from commit 4499d488f6)
Change-Id: I34cec87592960398eb04e9c2437b9352c14cdf3e
2021-03-15 11:24:02 +08:00
Swati Sharma
e95a840b8e UPSTREAM: drm/edid: Add additional HFVSDB fields for HDMI2.1
The HDMI2.1 extends HFVSDB (HDMI Forum Vendor Specific
Data block) to have fields related to newly defined methods of FRL
(Fixed Rate Link) levels, number of lanes supported, DSC Color bit
depth, VRR min/max, FVA (Fast Vactive), ALLM etc.

This patch adds the new HFVSDB fields that are required for
HDMI2.1.

v2: Minor fixes + consistent naming for DPCD register masks
(Uma Shankar)

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
[Jani: Fixed checkpatch FROM_SIGN_OFF_MISMATCH.]
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201218103723.30844-2-ankit.k.nautiyal@intel.com
(cherry picked from commit 9bb85a6e29)
Change-Id: Ibbdea12806897cab0f95d13847b7e3d8bea1931d
2021-03-15 11:24:02 +08:00
Andy Yan
cc27baeeb7 drm/rockchip: dw-hdmi: Support multi connector attach one crtc
VOP support one VP output to multi connectors with
the same scan out timing.

Change-Id: I4f31140135b0ebca89caa6a94be2f1a558e34a31
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-03-15 09:14:49 +08:00
Andy Yan
53744719be drm/rockchip: vop2: use dev_dbg instead of DRM_WARN to warn odd dst_w
There are many display scene with odd dst_w, so
DRM_WARN will bring too much warning log, which
may frighten somebody.
Use dev_dbg hide it.

Change-Id: I2b132eb49a90792468fbea4e133c9e63aa50bf04
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-03-13 18:21:55 +08:00
Zefa Chen
dbc572151b media: i2c: imx307 support lvds 2 lane
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I2828b5db68064e15597f37ceac80f1307bb90c71
2021-03-12 19:09:49 +08:00
Ren Jianing
0b82f4909b usb: gadget: u_audio: disable eps when usb disconnect
UAC gadget disable eps only when receiving set_alt_0. If USB is
unplugged before the packet of set_alt_0, the corresponding eps
will not be released and leading to UAC dysfunction when the next
time the usb is plugged.

Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: I476ef8ce64a5b04cc3fec32a28126e2eb9d5ad78
2021-03-12 18:45:50 +08:00