Commit graph

799124 commits

Author SHA1 Message Date
Taras Chornyi
80dd8146df net: ipv4: devinet: Fix crash when add/del multicast IP with autojoin
[ Upstream commit 690cc86321eb9bcee371710252742fb16fe96824 ]

When CONFIG_IP_MULTICAST is not set and multicast ip is added to the device
with autojoin flag or when multicast ip is deleted kernel will crash.

steps to reproduce:

ip addr add 224.0.0.0/32 dev eth0
ip addr del 224.0.0.0/32 dev eth0

or

ip addr add 224.0.0.0/32 dev eth0 autojoin

Unable to handle kernel NULL pointer dereference at virtual address 0000000000000088
 pc : _raw_write_lock_irqsave+0x1e0/0x2ac
 lr : lock_sock_nested+0x1c/0x60
 Call trace:
  _raw_write_lock_irqsave+0x1e0/0x2ac
  lock_sock_nested+0x1c/0x60
  ip_mc_config.isra.28+0x50/0xe0
  inet_rtm_deladdr+0x1a8/0x1f0
  rtnetlink_rcv_msg+0x120/0x350
  netlink_rcv_skb+0x58/0x120
  rtnetlink_rcv+0x14/0x20
  netlink_unicast+0x1b8/0x270
  netlink_sendmsg+0x1a0/0x3b0
  ____sys_sendmsg+0x248/0x290
  ___sys_sendmsg+0x80/0xc0
  __sys_sendmsg+0x68/0xc0
  __arm64_sys_sendmsg+0x20/0x30
  el0_svc_common.constprop.2+0x88/0x150
  do_el0_svc+0x20/0x80
 el0_sync_handler+0x118/0x190
  el0_sync+0x140/0x180

Fixes: 93a714d6b5 ("multicast: Extend ip address command to enable multicast group join/leave on")
Signed-off-by: Taras Chornyi <taras.chornyi@plvision.eu>
Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-21 09:03:03 +02:00
Taehee Yoo
32759da24e hsr: check protocol version in hsr_newlink()
[ Upstream commit 4faab8c446def7667adf1f722456c2f4c304069c ]

In the current hsr code, only 0 and 1 protocol versions are valid.
But current hsr code doesn't check the version, which is received by
userspace.

Test commands:
    ip link add dummy0 type dummy
    ip link add dummy1 type dummy
    ip link add hsr0 type hsr slave1 dummy0 slave2 dummy1 version 4

In the test commands, version 4 is invalid.
So, the command should be failed.

After this patch, following error will occur.
"Error: hsr: Only versions 0..1 are supported."

Fixes: ee1c279772 ("net/hsr: Added support for HSR v1")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-21 09:03:03 +02:00
Sebastian Andrzej Siewior
10cea886f0 amd-xgbe: Use __napi_schedule() in BH context
[ Upstream commit d518691cbd3be3dae218e05cca3f3fc9b2f1aa77 ]

The driver uses __napi_schedule_irqoff() which is fine as long as it is
invoked with disabled interrupts by everybody. Since the commit
mentioned below the driver may invoke xgbe_isr_task() in tasklet/softirq
context. This may lead to list corruption if another driver uses
__napi_schedule_irqoff() in IRQ context.

Use __napi_schedule() which safe to use from IRQ and softirq context.

Fixes: 85b85c8534 ("amd-xgbe: Re-issue interrupt if interrupt status not cleared")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-21 09:03:03 +02:00
Hridya Valsaraju
eaa42a5732 ANDROID: GKI: drivers: of-thermal: Relate thermal zones using same sensor
A sensor may need to be monitored by two or more thermal governors to
deploy different mitigation strategies to control the device temperature.
To achieve this the sensors driver has to register the same sensor as
multiple thermal zones and then let the different governors monitor and
mitigate. The sensor driver should handle the aggregation of thresholds,
trip notification and synchronization between thermal zones.

Add support in of-thermal to create and handle sibling thermal zones.
Thermal zones that share the same sensor are siblings. To establish a
relationship between then the sibling zones, a sensor meta data is shared
across multiple sibling thermal zones. This meta data will aid in
traversing through all the sibling thermal zones.

Test: build
Bug: 149945768
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Change-Id: I2e26d71ca30927dfa23b58e00a7de246bfebb274
(cherry picked commit from 8a12149c26)
Fixes: 3b10834869 ("ANDROID: GKI: Add devm_thermal_of_virtual_sensor_register API.")
[hridya: partial cherry-pick from snapshot]
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-04-20 23:52:49 +00:00
Hridya Valsaraju
ac3798c203 ANDROID: GKI: Bulk ABI update
Leaf changes summary: 5 artifacts changed
Changed leaf types summary: 4 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 1 Changed, 0 Added variable

Test: build
Bug: 149430094
Signed-off-by: Hridya Valsaraju <hridya@google.com>
Change-Id: I67543d495abfae8c0b972b572b7dc4fd83ada48b
2020-04-20 13:53:24 -07:00
FUJITA Tomonori
22d715642a ANDROID: GKI: dma: Add set_dma_mask hook to struct dma_map_ops
POWERPC needs this hook. SPARC could use it too.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Becky Bruce <beckyb@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
(cherry picked from commit f726f30e32)
Signed-off-by: Swathi Sridhar <swatsrid@codeaurora.org>
(cherry picked from commit 4008eb493a)
[surenb: original patch is cherry picked from 4.4 kernel]

Bug: 154347709
Test: build and verify no ABI diffs
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I1d08b56e2cbb1c6cb3478654b89abca3af83709a
2020-04-20 16:04:38 +00:00
Jaegeuk Kim
8c54aad926 Merge remote-tracking branch 'aosp/upstream-f2fs-stable-linux-4.19.y' into android-4.19
* aosp/upstream-f2fs-stable-linux-4.19.y:
  f2fs: fix quota_sync failure due to f2fs_lock_op
  f2fs: support read iostat
  f2fs: Fix the accounting of dcc->undiscard_blks
  f2fs: fix to handle error path of f2fs_ra_meta_pages()
  f2fs: report the discard cmd errors properly
  f2fs: fix long latency due to discard during umount
  f2fs: add tracepoint for f2fs iostat
  f2fs: introduce sysfs/data_io_flag to attach REQ_META/FUA
  ubifs: wire up FS_IOC_GET_ENCRYPTION_NONCE
  f2fs: wire up FS_IOC_GET_ENCRYPTION_NONCE
  ext4: wire up FS_IOC_GET_ENCRYPTION_NONCE
  fscrypt: add FS_IOC_GET_ENCRYPTION_NONCE ioctl

Change-Id: I976edb3288576caa0c56eff202690b1159fcf827
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2020-04-19 13:54:17 -07:00
Greg Kroah-Hartman
1fb5886e2c ANDROID: GKI: ABI update due to recent patches
Including the 4.19.116 update

Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 2 leaf types 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 dma_buf_ops at dma-buf.h:53:1' changed:
  type size changed from 1088 to 1152 (in bits)
  1 data member insertion:
    'void ()* dma_buf_ops::get_uuid', at offset 1024 (in bits) at dma-buf.h:371:1
  there are data member changes:
    'void ()* dma_buf_ops::get_flags' offset changed from 1024 to 1088 (in bits) (by +64 bits)
  46 impacted interfaces:

'struct drm_driver at drm_drv.h:70:1' changed:
  type size changed from 3776 to 3840 (in bits)
  1 data member insertion:
    'void ()* drm_driver::gem_prime_get_uuid', at offset 2432 (in bits) at drm_drv.h:506:1
  there are data member changes:
    'void ()* drm_driver::dumb_create' offset changed from 2432 to 2496 (in bits) (by +64 bits)
    'void ()* drm_driver::dumb_map_offset' offset changed from 2496 to 2560 (in bits) (by +64 bits)
    'void ()* drm_driver::dumb_destroy' offset changed from 2560 to 2624 (in bits) (by +64 bits)
    'const vm_operations_struct* drm_driver::gem_vm_ops' offset changed from 2624 to 2688 (in bits) (by +64 bits)
    'int drm_driver::major' offset changed from 2688 to 2752 (in bits) (by +64 bits)
    'int drm_driver::minor' offset changed from 2720 to 2784 (in bits) (by +64 bits)
    'int drm_driver::patchlevel' offset changed from 2752 to 2816 (in bits) (by +64 bits)
    'char* drm_driver::name' offset changed from 2816 to 2880 (in bits) (by +64 bits)
    'char* drm_driver::desc' offset changed from 2880 to 2944 (in bits) (by +64 bits)
    'char* drm_driver::date' offset changed from 2944 to 3008 (in bits) (by +64 bits)
    'u32 drm_driver::driver_features' offset changed from 3008 to 3072 (in bits) (by +64 bits)
    'const drm_ioctl_desc* drm_driver::ioctls' offset changed from 3072 to 3136 (in bits) (by +64 bits)
    'int drm_driver::num_ioctls' offset changed from 3136 to 3200 (in bits) (by +64 bits)
    'const file_operations* drm_driver::fops' offset changed from 3200 to 3264 (in bits) (by +64 bits)
    'list_head drm_driver::legacy_dev_list' offset changed from 3264 to 3328 (in bits) (by +64 bits)
    'void ()* drm_driver::firstopen' offset changed from 3392 to 3456 (in bits) (by +64 bits)
    'void ()* drm_driver::preclose' offset changed from 3456 to 3520 (in bits) (by +64 bits)
    'void ()* drm_driver::dma_ioctl' offset changed from 3520 to 3584 (in bits) (by +64 bits)
    'void ()* drm_driver::dma_quiescent' offset changed from 3584 to 3648 (in bits) (by +64 bits)
    'void ()* drm_driver::context_dtor' offset changed from 3648 to 3712 (in bits) (by +64 bits)
    'int drm_driver::dev_priv_size' offset changed from 3712 to 3776 (in bits) (by +64 bits)
  185 impacted interfaces:

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Id01915f1855a682195fc070fc894f4164f266066
2020-04-18 14:26:28 +02:00
Greg Kroah-Hartman
95bff4cdab This is the 4.19.116 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl6ZbYYACgkQONu9yGCS
 aT76ohAAn4lIjSuMRCILy/lq0DXVWDy7q6YdfyzNBITxc86tVfnfjMeQxUBviE/1
 OzShWgMRXeqrb0xJTJ5Rv6mt5Kf9a3DpPWt2jwo1iqWkl4AihDtDV7Z2Bh+QdnSX
 +lQ1xGPqDi4MMgoYlpMtlFc3wq/pJV0i8Q7amXC/KbsDkt5dlDrQYeEZHe2P7pR9
 ZljKLHEdGRE3uGqXmEM8qb6aLjQudnHmH/9uChP4UX6b+ZADDCc05DMhEkhEoCZT
 jdxiqVZvRdiiXTc1r6ckGv0xae77s0IAAZMQAd+24zFK94QByi6d9Cw0y6qyyDi7
 1rfHIWSjvetY3+4DCQDOu/k2/pLt/Vqh9zuvtaf8Tu8cKM9rxow0Hl9FlL3fZpBN
 btpqeCY6twFxApHoAp9ZDK6otaVEOtbg1MCsmpUbVxWIF9IR8cPqMGyYK3lR2Ao1
 HgdKEFkYOycAOu51ujuHsDLx/9k2ZqeSPyh0yrdVpFUVvMV/YqoYP9X3jzGRVllL
 hgYfFcywgrVgxK4c02/6cPiJNbFskTpLllDPVVXGIjO+9R4vTRUgJ74CNrqL25aT
 ioSFWJA00UvXObnbCDdA+otYYWAmYOJX7HVvEieb0oDqPYHZHa1UW6+1WlYSAQLm
 WAsHiejOv6PwzRmCDI6RyuZKQjjX6bppAWFq0/RLPO0uEqjXlxc=
 =Iq3k
 -----END PGP SIGNATURE-----

Merge 4.19.116 into android-4.19

Changes in 4.19.116
	ARM: dts: sun8i-a83t-tbs-a711: HM5065 doesn't like such a high voltage
	bus: sunxi-rsb: Return correct data when mixing 16-bit and 8-bit reads
	net: vxge: fix wrong __VA_ARGS__ usage
	hinic: fix a bug of waitting for IO stopped
	hinic: fix wrong para of wait_for_completion_timeout
	cxgb4/ptp: pass the sign of offset delta in FW CMD
	qlcnic: Fix bad kzalloc null test
	i2c: st: fix missing struct parameter description
	cpufreq: imx6q: Fixes unwanted cpu overclocking on i.MX6ULL
	media: venus: hfi_parser: Ignore HEVC encoding for V1
	firmware: arm_sdei: fix double-lock on hibernate with shared events
	null_blk: Fix the null_add_dev() error path
	null_blk: Handle null_add_dev() failures properly
	null_blk: fix spurious IO errors after failed past-wp access
	xhci: bail out early if driver can't accress host in resume
	x86: Don't let pgprot_modify() change the page encryption bit
	block: keep bdi->io_pages in sync with max_sectors_kb for stacked devices
	irqchip/versatile-fpga: Handle chained IRQs properly
	sched: Avoid scale real weight down to zero
	selftests/x86/ptrace_syscall_32: Fix no-vDSO segfault
	PCI/switchtec: Fix init_completion race condition with poll_wait()
	media: i2c: video-i2c: fix build errors due to 'imply hwmon'
	libata: Remove extra scsi_host_put() in ata_scsi_add_hosts()
	pstore/platform: fix potential mem leak if pstore_init_fs failed
	gfs2: Don't demote a glock until its revokes are written
	x86/boot: Use unsigned comparison for addresses
	efi/x86: Ignore the memory attributes table on i386
	genirq/irqdomain: Check pointer in irq_domain_alloc_irqs_hierarchy()
	block: Fix use-after-free issue accessing struct io_cq
	media: i2c: ov5695: Fix power on and off sequences
	usb: dwc3: core: add support for disabling SS instances in park mode
	irqchip/gic-v4: Provide irq_retrigger to avoid circular locking dependency
	md: check arrays is suspended in mddev_detach before call quiesce operations
	firmware: fix a double abort case with fw_load_sysfs_fallback
	locking/lockdep: Avoid recursion in lockdep_count_{for,back}ward_deps()
	block, bfq: fix use-after-free in bfq_idle_slice_timer_body
	btrfs: qgroup: ensure qgroup_rescan_running is only set when the worker is at least queued
	btrfs: remove a BUG_ON() from merge_reloc_roots()
	btrfs: track reloc roots based on their commit root bytenr
	IB/mlx5: Replace tunnel mpls capability bits for tunnel_offloads
	uapi: rename ext2_swab() to swab() and share globally in swab.h
	slub: improve bit diffusion for freelist ptr obfuscation
	ASoC: fix regwmask
	ASoC: dapm: connect virtual mux with default value
	ASoC: dpcm: allow start or stop during pause for backend
	ASoC: topology: use name_prefix for new kcontrol
	usb: gadget: f_fs: Fix use after free issue as part of queue failure
	usb: gadget: composite: Inform controller driver of self-powered
	ALSA: usb-audio: Add mixer workaround for TRX40 and co
	ALSA: hda: Add driver blacklist
	ALSA: hda: Fix potential access overflow in beep helper
	ALSA: ice1724: Fix invalid access for enumerated ctl items
	ALSA: pcm: oss: Fix regression by buffer overflow fix
	ALSA: doc: Document PC Beep Hidden Register on Realtek ALC256
	ALSA: hda/realtek - Set principled PC Beep configuration for ALC256
	ALSA: hda/realtek - Remove now-unnecessary XPS 13 headphone noise fixups
	ALSA: hda/realtek - Add quirk for MSI GL63
	media: ti-vpe: cal: fix disable_irqs to only the intended target
	acpi/x86: ignore unspecified bit positions in the ACPI global lock field
	thermal: devfreq_cooling: inline all stubs for CONFIG_DEVFREQ_THERMAL=n
	nvme-fc: Revert "add module to ops template to allow module references"
	nvme: Treat discovery subsystems as unique subsystems
	PCI: pciehp: Fix indefinite wait on sysfs requests
	PCI/ASPM: Clear the correct bits when enabling L1 substates
	PCI: Add boot interrupt quirk mechanism for Xeon chipsets
	PCI: endpoint: Fix for concurrent memory allocation in OB address region
	tpm: Don't make log failures fatal
	tpm: tpm1_bios_measurements_next should increase position index
	tpm: tpm2_bios_measurements_next should increase position index
	KEYS: reaching the keys quotas correctly
	irqchip/versatile-fpga: Apply clear-mask earlier
	pstore: pstore_ftrace_seq_next should increase position index
	MIPS/tlbex: Fix LDDIR usage in setup_pw() for Loongson-3
	MIPS: OCTEON: irq: Fix potential NULL pointer dereference
	ath9k: Handle txpower changes even when TPC is disabled
	signal: Extend exec_id to 64bits
	x86/entry/32: Add missing ASM_CLAC to general_protection entry
	KVM: nVMX: Properly handle userspace interrupt window request
	KVM: s390: vsie: Fix region 1 ASCE sanity shadow address checks
	KVM: s390: vsie: Fix delivery of addressing exceptions
	KVM: x86: Allocate new rmap and large page tracking when moving memslot
	KVM: VMX: Always VMCLEAR in-use VMCSes during crash with kexec support
	KVM: x86: Gracefully handle __vmalloc() failure during VM allocation
	KVM: VMX: fix crash cleanup when KVM wasn't used
	CIFS: Fix bug which the return value by asynchronous read is error
	mtd: spinand: Stop using spinand->oobbuf for buffering bad block markers
	mtd: spinand: Do not erase the block before writing a bad block marker
	Btrfs: fix crash during unmount due to race with delayed inode workers
	btrfs: set update the uuid generation as soon as possible
	btrfs: drop block from cache on error in relocation
	btrfs: fix missing file extent item for hole after ranged fsync
	btrfs: fix missing semaphore unlock in btrfs_sync_file
	crypto: mxs-dcp - fix scatterlist linearization for hash
	erofs: correct the remaining shrink objects
	powerpc/pseries: Drop pointless static qualifier in vpa_debugfs_init()
	x86/speculation: Remove redundant arch_smt_update() invocation
	tools: gpio: Fix out-of-tree build regression
	mm: Use fixed constant in page_frag_alloc instead of size + 1
	net: qualcomm: rmnet: Allow configuration updates to existing devices
	arm64: dts: allwinner: h6: Fix PMU compatible
	dm writecache: add cond_resched to avoid CPU hangs
	dm verity fec: fix memory leak in verity_fec_dtr
	scsi: zfcp: fix missing erp_lock in port recovery trigger for point-to-point
	arm64: armv8_deprecated: Fix undef_hook mask for thumb setend
	selftests: vm: drop dependencies on page flags from mlock2 tests
	rtc: omap: Use define directive for PIN_CONFIG_ACTIVE_HIGH
	drm/etnaviv: rework perfmon query infrastructure
	powerpc/pseries: Avoid NULL pointer dereference when drmem is unavailable
	NFS: Fix a page leak in nfs_destroy_unlinked_subrequests()
	ext4: fix a data race at inode->i_blocks
	fs/filesystems.c: downgrade user-reachable WARN_ONCE() to pr_warn_once()
	ocfs2: no need try to truncate file beyond i_size
	perf tools: Support Python 3.8+ in Makefile
	s390/diag: fix display of diagnose call statistics
	Input: i8042 - add Acer Aspire 5738z to nomux list
	clk: ingenic/jz4770: Exit with error if CGU init failed
	kmod: make request_module() return an error when autoloading is disabled
	cpufreq: powernv: Fix use-after-free
	hfsplus: fix crash and filesystem corruption when deleting files
	libata: Return correct status in sata_pmp_eh_recover_pm() when ATA_DFLAG_DETACH is set
	ipmi: fix hung processes in __get_guid()
	xen/blkfront: fix memory allocation flags in blkfront_setup_indirect()
	powerpc/powernv/idle: Restore AMR/UAMOR/AMOR after idle
	powerpc/64/tm: Don't let userspace set regs->trap via sigreturn
	powerpc/hash64/devmap: Use H_PAGE_THP_HUGE when setting up huge devmap PTE entries
	powerpc/xive: Use XIVE_BAD_IRQ instead of zero to catch non configured IPIs
	powerpc/kprobes: Ignore traps that happened in real mode
	scsi: mpt3sas: Fix kernel panic observed on soft HBA unplug
	powerpc: Add attributes for setjmp/longjmp
	powerpc: Make setjmp/longjmp signature standard
	btrfs: use nofs allocations for running delayed items
	dm zoned: remove duplicate nr_rnd_zones increase in dmz_init_zone()
	crypto: caam - update xts sector size for large input length
	crypto: ccree - improve error handling
	crypto: ccree - zero out internal struct before use
	crypto: ccree - don't mangle the request assoclen
	crypto: ccree - dec auth tag size from cryptlen map
	crypto: ccree - only try to map auth tag if needed
	Revert "drm/dp_mst: Remove VCPI while disabling topology mgr"
	drm/dp_mst: Fix clearing payload state on topology disable
	drm: Remove PageReserved manipulation from drm_pci_alloc
	ftrace/kprobe: Show the maxactive number on kprobe_events
	powerpc/fsl_booke: Avoid creating duplicate tlb1 entry
	misc: echo: Remove unnecessary parentheses and simplify check for zero
	etnaviv: perfmon: fix total and idle HI cyleces readout
	mfd: dln2: Fix sanity checking for endpoints
	efi/x86: Fix the deletion of variables in mixed mode
	Linux 4.19.116

Change-Id: If09fbb53fcb11ea01eaaa7fee7ed21ed6234f352
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-04-18 13:33:51 +02:00
David Stevens
5dd4be54bd FROMLIST: drm/prime: add support for virtio exported objects
This change exposes dma-buf's get_uuid callback to PRIME drivers.

Signed-off-by: David Stevens <stevensd@chromium.org>

BUG=b:136269340
TEST=boot ARCVM and launch play store

Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2090951
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: David Stevens <stevensd@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
Bug: 153580313
Link: https://lore.kernel.org/lkml/20200311112004.47138-3-stevensd@chromium.org/
Change-Id: I0599ce4cafee3dc705805c1ad97295bea264cfdf
Signed-off-by: Lingfeng Yang <lfy@google.com>
2020-04-18 08:26:28 +00:00
David Stevens
9b7d0c9aee FROMLIST: dma-buf: add support for virtio exported objects
This change adds a new dma-buf operation that allows dma-bufs to be used
by virtio drivers to share exported objects. The new operation allows
the importing driver to query the exporting driver for the UUID which
identifies the underlying exported object.

Signed-off-by: David Stevens <stevensd@chromium.org>

BUG=b:136269340
TEST=boot ARCVM and launch play store

Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2059086
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: David Stevens <stevensd@chromium.org>
Commit-Queue: David Stevens <stevensd@chromium.org>
Bug: 153580313
Link: https://lore.kernel.org/lkml/20200311112004.47138-2-stevensd@chromium.org/
Change-Id: Ifb429e36ebbba9feead6fd1792fbefa9ca097f0c
Signed-off-by: Lingfeng Yang <lfy@google.com>
2020-04-18 08:26:02 +00:00
Stephen Rothwell
a123dd43e5 UPSTREAM: drm/virtio: module_param_named() requires linux/moduleparam.h
commit b0138364da17617db052c4a738b58bf45e42f500 upstream.

Fixes: 3e93bc2a58aa ("drm/virtio: make resource id workaround runtime switchable.")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Link: http://patchwork.freedesktop.org/patch/msgid/20190828185516.22b03da8@canb.auug.org.au
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 564f7c2b5691740b881ff1cb457386de218c7181)
Bug: 153580313
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: If763753355efee31efa6f434b4e5f83a2bceee94
2020-04-18 08:25:29 +00:00
John Bates
2236a7f126 UPSTREAM: drm/virtio: fix resource id creation race
commit fbb30168c7395b9cfeb9e6f7b0c0bca854a6552d upstream.

The previous code was not thread safe and caused
undefined behavior from spurious duplicate resource IDs.
In this patch, an atomic_t is used instead. We no longer
see any duplicate IDs in tests with this change.

Fixes: 16065fcdd19d ("drm/virtio: do NOT reuse resource ids")
Signed-off-by: John Bates <jbates@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20200220225319.45621-1-jbates@chromium.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 9998ebb5e73c72ba11a025434be9c2ff1c33b1f0)
Bug: 153580313
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Iad0ca447e5be8b8098962b50e8d38356d1024126
2020-04-18 08:25:22 +00:00
Gerd Hoffmann
380c5c0d07 UPSTREAM: drm/virtio: make resource id workaround runtime switchable.
commit 3e93bc2a58aa241081e043ef9e6e86c42808499a upstream.

Also update the comment with a reference to the virglrenderer fix.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20190822102614.18164-1-kraxel@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit d41f6cfd9aa7c3f01b44fc1ee15bac5589fd1b60)
Bug: 153580313
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: If17d7c7303b9c4e9e03566a20386d46c3bf188b1
2020-04-18 08:25:15 +00:00
Ezequiel Garcia
5f6439cbf2 BACKPORT: drm/virtio: Drop deprecated load/unload initialization
Move the code around so the driver is probed the bus
.probe and removed from the bus .remove callbacks.
This commit is just a cleanup and shouldn't affect
functionality.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20190108145930.15080-1-ezequiel@collabora.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit d516e75c71c9853ef70a9c476d11a97b69380147)
Bug: 153580313
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I3ad8b26ab1a9c7dc6e0a5686845ccb9dc37c49da
2020-04-18 08:25:07 +00:00
Lingfeng Yang
bc48c50063 ANDROID: GKI: Add DRM_TTM config to GKI
When certain DRM drivers, such as virtio-gpu, are built out of tree,
they might depend on parts of DRM, such as DRM_TTM, that are not
included in all configs.

This CL adds the config to GKI_HACKS_TO_FIX, allowing DRM drivers that
use DRM_TTM to link successfully against GKI.

Test: Build and run virtio-gpu as an external module
Change-Id: I1ae869b7394a6059c0f3880bdc65a0b3ceb3e004
Bug: 153580313
Signed-off-by: Lingfeng Yang <lfy@google.com>
2020-04-18 08:24:36 +00:00
Will McVicker
2d358f3605 ANDROID: Bulk update the ABI xml representation
Leaf changes summary: 34 artifacts changed
Changed leaf types summary: 11 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 1 Changed, 19 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 3 Added variables

Change-Id: I12d617eb85f810dc584d4cb50e0a5368b3b2e749
Signed-off-by: Will McVicker <willmcvicker@google.com>
Signed-off-by: Saravana Kannan <saravanak@google.com>
Bug: 139107810
Bug: 139263611
Bug: 141888346
Bug: 144713689
Bug: 144961676
Bug: 150893404
Bug: 151372815
Bug: 152417756
2020-04-18 08:08:11 +00:00
Will McVicker
3f2debd7f2 ANDROID: GKI: spmi: pmic-arb: don't enable SPMI_MSM_PMIC_ARB by default
This is a qcom device driver that doesn't need to be enabled by default.

Signed-off-by: Will McVicker <willmcvicker@google.com>
Bug: 143712741
Test: compile
Change-Id: I40f0e8220350ad2aeccceb582c9c58c1d592feac
2020-04-18 07:57:37 +00:00
Minchan Kim
c27ea19ea4 ANDROID: GKI: attribute page lock and waitqueue functions as sched
trace_sched_blocked_trace in CFS is really useful for debugging via
trace because it tell where the process was stuck on callstack.

For example,
           <...>-6143  ( 6136) [005] d..2    50.278987: sched_blocked_reason: pid=6136 iowait=0 caller=SyS_mprotect+0x88/0x208
           <...>-6136  ( 6136) [005] d..2    50.278990: sched_blocked_reason: pid=6142 iowait=0 caller=do_page_fault+0x1f4/0x3b0
           <...>-6142  ( 6136) [006] d..2    50.278996: sched_blocked_reason: pid=6144 iowait=0 caller=SyS_prctl+0x52c/0xb58
           <...>-6144  ( 6136) [006] d..2    50.279007: sched_blocked_reason: pid=6136 iowait=0 caller=vm_mmap_pgoff+0x74/0x104

However, sometime it gives pointless information like this.
    RenderThread-2322  ( 1805) [006] d.s3    50.319046: sched_blocked_reason: pid=6136 iowait=1 caller=__lock_page_killable+0x17c/0x220
     logd.writer-594   (  587) [002] d.s3    50.334011: sched_blocked_reason: pid=6126 iowait=1 caller=wait_on_page_bit+0x194/0x208
  kworker/u16:13-333   (  333) [007] d.s4    50.343161: sched_blocked_reason: pid=6136 iowait=1 caller=__lock_page_killable+0x17c/0x220

Such wait_on_page_bit, __lock_page_killable are pointless because it doesn't
carry on higher information to identify the callstack.

The reason is page_lock and waitqueue are special synchronization method unlike
other normal locks(mutex, spinlock).
Let's mark them as "__sched" so get_wchan which used in trace_sched_blocked_trace
could detect it and skip them. It will produce more meaningful callstack
function like this.

           <...>-2867  ( 1068) [002] d.h4   124.209701: sched_blocked_reason: pid=329 iowait=0 caller=worker_thread+0x378/0x470
           <...>-2867  ( 1068) [002] d.s3   124.209763: sched_blocked_reason: pid=8454 iowait=1 caller=__filemap_fdatawait_range+0xa0/0x104
           <...>-2867  ( 1068) [002] d.s4   124.209803: sched_blocked_reason: pid=869 iowait=0 caller=worker_thread+0x378/0x470
 ScreenDecoratio-2364  ( 1867) [002] d.s3   124.209973: sched_blocked_reason: pid=8454 iowait=1 caller=f2fs_wait_on_page_writeback+0x84/0xcc
 ScreenDecoratio-2364  ( 1867) [002] d.s4   124.209986: sched_blocked_reason: pid=869 iowait=0 caller=worker_thread+0x378/0x470
           <...>-329   (  329) [000] d..3   124.210435: sched_blocked_reason: pid=538 iowait=0 caller=worker_thread+0x378/0x470
  kworker/u16:13-538   (  538) [007] d..3   124.210450: sched_blocked_reason: pid=6 iowait=0 caller=worker_thread+0x378/0x470

Bug: 144961676
Bug: 144713689
Change-Id: I30397400c5d056946bdfbc86c9ef5f4d7e6c98fe
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: Jimmy Shiu <jimmyshiu@google.com>
Bug: 152417756
(cherry picked from commit 8a780c0eb6800cecbfce21362c2d2a3bcab14e1c)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 22:51:44 -07:00
Mayank Rana
b1605321a5 ANDROID: GKI: extcon: Fix Add usage of blocking notifier chain
The previous partial cherry-pick commit ea6eb0f3e5 missed out some
code that's needed for functionality. So, pick that up too.

Change-Id: I0e8e3b29d169ca833f85e42d2df98dd8380cbf46
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Bug: 150893404
(cherry picked from commit 9dce266c7a)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 22:50:02 -07:00
Vijayavardhan Vennapusa
77379e5ac1 ANDROID: GKI: USB: pd: Extcon fix for C current
This is a partial cherrypick.

It is required to notify device as selfpowered and bmaxpower as zero
even for non PD capable devices based on Type C current. Hence notify
as selfpowerer in bmAttributes of configuration descriptor in case of
medium or high Type C current.

Change-Id: Ie552560d93a8195f4c69fdaf6086ef3a52b31d39
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Bug: 150893404
(cherry picked from commit 29ffacc34b)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 22:46:55 -07:00
Daniel Mentz
8a744ca663 ANDROID: drm/dsi: Fix byte order of DCS set/get brightness
The MIPI DCS specification demands that brightness values are sent in
big endian byte order. It also states that one parameter (i.e. one byte)
shall be sent/received for 8 bit wide values, and two parameters shall
be used for values that are between 9 and 16 bits wide.

Bug: 139263611
Bug: 139107810
Change-Id: I24306e21ec6a5ff48ea121d977419a81d5b44152
Signed-off-by: Daniel Mentz <danielmentz@google.com>
Signed-off-by: Wilson Sung <wilsonsung@google.com>
(cherry picked from commit 3c373bfd83fd686390ea60a032ff876242c71d49)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:55 -07:00
Hridya Valsaraju
7e7f454531 ANDROID: GKI: mm: Export symbols to modularize CONFIG_MSM_DRM
These symbols are required to modularize the display drivers.

Bug: 141888346
Change-Id: Iedff789423cabf1d207ffffaba7d7bc574fc83cd
Signed-off-by: Hridya Valsaraju <hridya@google.com>
(cherry picked from commit 3d473101c9fb3f734c1be30ff17b8ad46bb1b568)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:55 -07:00
Meng Wang
209a4825b3 ANDROID: GKI: ALSA: compress: Add support to send codec specific data
Codec specific  metadata is sent only for first stream in gapless
playback. This causes incorrect configuration to be set for second
stream and distortions are observed due to framedrops in adsp.
Add support to send codec specific format during start of
next stream in gapless using set_next_track_param.

Change-Id: Ieec6b2afedec156e47873efcad9b3571160b0a29
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit acff8e6a3c)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:55 -07:00
Eric Laurent
992ef3b1c8 ANDROID: GKI: ALSA: Compress - dont use lock for all ioctls
Some simple ioctls like timsetamp query, capabities query can be
done anytime and should not be under the stream lock. Move these to
snd_compress_simple_iotcls() which is invoked without lock held.

While at it, improve readblity a bit by sprinkling some empty lines.

Change-Id: Icc8ffdadd565c635f6a95e7e5bdda76257f24ea3
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Eric Laurent <elaurent@google.com>
Git-commit: 6a44374b8b92e9946dc1e5c15c2a11003aa859b1
Git-repo: https://android.googlesource.com/kernel/msm
[dhakumar@codeaurora.org: resolved merge conflicts]
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
[bgoswami@codeaurora.org: resolved merge conflicts]
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit 7e86bc28b7)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:55 -07:00
Asish Bhattacharya
2430e0237e ANDROID: GKI: ASoC: msm: qdsp6v2: add support for AMR_WB_PLUS offload
Add AMR_WB_PLUS to supported offload formats and send media
format block through compress driver.

Change-Id: I258dc05fd5b6442ef40a5d1d4538870c4ddcbe2e
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Bug: 151372815
(cherry picked from commit a909cafb69)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:55 -07:00
Nidhisha Dhananjayan
2596dca52d ANDROID: GKI: msm: dolby: MAT and THD audiocodec name modification
Modified names of SND_AUDIOCODEC for THD and MAT
as per the standards.
SND_AUDIOCODEC_DLB_THD to SND_AUDIOCODEC_THD
SND_AUDIOCODEC_DLB_MAT to SND_AUDIOCODEC_MAT.

Change-Id: If03662774cf0ae3573ed98ed6b6de42a7589e358
Acked-by: Janamaddi Sravan Kumar <c_jsrava@qti.qualcomm.com>
Signed-off-by: Nidhisha Dhananjayan <nidhis@codeaurora.org>
Bug: 151372815
(cherry picked from commit 5992d8fae1)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Deeraj Soman
e221163705 ANDROID: GKI: asoc: msm: Add support for compressed perf mode
Add support for compressed perf mode.
Compressed perf mode configures the DSP in low latency
mode. In low latency mode, DSP have reduced buffer
size for faster operations. Above layers may pass
this flag for configuring the DSP in low latency
mode.

Change-Id: Ib291d0fb9921edbaf2466d44c87aeed3367aec67
Signed-off-by: Deeraj Soman <sdeeraj@codeaurora.org>
Bug: 151372815
(cherry picked from commit aec78f41d3)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Nidhisha Dhananjayan
e04046b0a3 ANDROID: GKI: msm: audio: support for gapless_pcm
snd_codec_option structure for gapless_pcm_playback.
This is used for updating the channels in gapless pcm
cases.

Change-Id: Id0d950f0f431e5d9fe2a8ccd5e5124a235b66f27
Acked-by: Janamaddi Sravan Kumar <c_jsrava@qti.qualcomm.com>
Signed-off-by: Nidhisha Dhananjayan <nidhis@codeaurora.org>
Bug: 151372815
(cherry picked from commit 4fc12e7fd8)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Nidhisha Dhananjayan
81e1224283 ANDROID: GKI: uapi: msm: dolby: Support for TrueHD and MAT decoders
Audio codec addition of MAT and TrueHD decoders for
decoding in DSP.

Change-Id: I049c1210d3600da723850bae1dd61b6ad4b3a78a
Acked-by: Janamaddi Sravan Kumar <c_jsrava@qti.qualcomm.com>
Signed-off-by: Nidhisha Dhananjayan <nidhis@codeaurora.org>
Bug: 151372815
(cherry picked from commit 0563121f3e)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Meng Wang
9dfd801016 ANDROID: GKI: ASoC: msm: qdsp6v2: Add TrueHD HDMI compress pass-though
Add TrueHD audio format for compressed HDMI pass-through

Change-Id: Id8a0b8c3a01c881ae284f13c2c0a36959c2413ac
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit cd79e0f7bc)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Dhanalakshmi Siddani
dee954b28b ANDROID: GKI: ALSA: compress: Add APTX format support in ALSA
Extend ALSA (Advanced Linux Sound Architecture) compress
to support APTX format.

CRs-Fixed: 1106128
Change-Id: I301c3fac1f0e267ca82f20a42437bae86a22413c
Signed-off-by: Dhanalakshmi Siddani <dsiddani@codeaurora.org>
Bug: 151372815
(cherry picked from commit 3aeaf95e8d)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Banajit Goswami
418114d1ce ANDROID: GKI: msm: qdsp6v2: Add timestamp support for compress capture
Add timestamp support for compress driver.
Modify ASM driver to read the buffer from predefined offset.

CRs-fixed: 1072067
Change-Id: I1c46befc223285495b3c0650e6c3eaae81f58771
Signed-off-by: Satish Babu Patakokila <sbpata@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit a0c23f9915)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Banajit Goswami
473ad5915d ANDROID: GKI: SoC: msm: Add support for meta data in compressed TX
There is a usecase where compressed data is sent over HDMI IN to
ADSP. The format of compressed is detected in ADSP and sent through
the meta data to compressed driver. Add support for meta data in
compressed TX for this use case.

Change-Id: Idbb18fe4a0ad828e9c2e9d7beec048b3cedf002d
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit 3e34295e0d)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Banajit Goswami
9383e53071 ANDROID: GKI: ALSA: compress: Add DSD format support for ALSA
WCD934X audio codec supports playback of DSD (Direct
Stream Digital) format. Extend ALSA (Advanced Linux
Sound Architecture) compress to support DSD format.

CRs-Fixed: 1056422
Change-Id: Ifb06674c251335a1d8cec71931355dca4c0e012d
Signed-off-by: Preetam Singh Ranawat <apranawat@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit 9fb80c87a2)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Banajit Goswami
ed8ba29c69 ANDROID: GKI: ASoC: msm: qdsp6v2: add support for ALAC and APE offload
Add ALAC and APE to supported offload formats and send media
format block for both formats through compress driver.

Change-Id: I22b7cf38684250d2f8d6f9aefcd43452bb18e7f9
Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit 040ab02c60)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Sudheer Papothi
5397ecb300 ANDROID: GKI: SoC: msm: Add compressed TX and passthrough support
There is use case that the HDMI input goes through MI2S
TX interface to ADSP. Add compressed TX support for
this use case.
Add support for compressed bitstream passthrough over HDMI
for DD/DDP contents.
Use compressed driver to support passthrough.

Change-Id: I92d0f301d44cc71c89de07cd60a4d20ce6f7913e
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit ebb7ffe46b)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Banajit Goswami
03333fc86c ANDROID: GKI: ASoC: msm: qdsp6v2: Add FLAC in compress offload path
Add FLAC format in compress offload driver, and asm
module.

Change-Id: I818ace8397e761b1acff7f9b2eab6e0103ed78c8
Signed-off-by: Apurupa Pattapu <apurupa@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit 02c08155fd)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:54 -07:00
Banajit Goswami
4e39276ff3 ANDROID: GKI: ASoC: msm: add support for different compressed formats
Add support for below compressed formats and features
 * DTS playback
 * PCM capture in Compressed driver
 * MP2 decoder
 * DTS_LBR Passthrough Support
 * Transcode from MP3, WMA to DTS compressed
 * Update compress audio params

Change-Id: I595e638da78cced02142f4ee430afb7357eb336c
Signed-off-by: Srikanth Uyyala <suyyala@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit ee29f1dd0f)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:53 -07:00
Banajit Goswami
07ac574f15 ANDROID: GKI: ASoC: msm: Update the encode option and sample rate
Populate the sample rate, encode option in wma config params.
WMA V9 and WMA Pro tunnel-mode supports are added to compressed
driver. It allows user-space application to decode WMA V9 and
WMA Pro audio stream through QDSP6.
Codec specific metadata is sent only for first stream in gapless
playback. This causes incorrect configuration to be set for second
stream and distortions are observed due to framedrops in adsp.
Add support to send codec specific format during start of
next stream in gapless.
Add bit rate to wma codec data structure as it can vary between
streams in gapless.

Change-Id: Ieeb9d302454d3935faa51cac77021e7c1d77012c
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Bug: 151372815
(cherry picked from commit 2315eec8b2)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:53 -07:00
Saravana Kannan
4d4eb9da60 ANDROID: GKI: Enable CONFIG_SND_VERBOSE_PROCFS in gki_defconfig
This is needed to reduce ABI diff for ALSA/soc modules.

Bug: 151372815
Change-Id: I1d8257946fa2f20d531ce0bc3595be023839b192
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:53 -07:00
Saravana Kannan
4907b9fe1e ANDROID: GKI: Add hidden CONFIG_SND_SOC_COMPRESS to gki_defconfig
This is needed to reduce ABI diff for ALSA/soc modules.

Bug: 151372815
Change-Id: Ia0a73bd28f94bdc4e8de31efc3b8e97b1156ab01
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:53 -07:00
Karthikeyan Mani
8c62976a01 ANDROID: GKI: ALSA: pcm: add locks for accessing runtime resource
Add spin lock to resolve race conditions while
accessing substream runtime resource.

Change-Id: I8db743303ceb50205d62adfc02caf6ecab635d47
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Bug: 151372815
(cherry picked from commit f5879f2128)
Signed-off-by: Saravana Kannan <saravanak@google.com>
2020-04-17 20:04:53 -07:00
Alistair Delva
8898725bba ANDROID: GKI: Update ABI for DRM changes
Leaf changes summary: 7 artifacts changed
Changed leaf types summary: 6 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 1 Changed, 0 Added variable

1 Changed variable:

  [C] 'const char linux_banner[361]' was changed to 'const char* linux_banner' at version.c:45:1:
    type of variable changed:
      entity changed from 'const char[361]' to 'const char*'
      type size changed from 2888 to 64 (in bits)

'struct drm_connector at drm_connector.h:824:1' changed:
  type size changed from 14464 to 14144 (in bits)
  2 data member deletions:
    'hdr_output_metadata drm_connector::hdr_output_metadata', at offset 14016 (in bits) at drm_connector.h:1177:1
    'hdr_sink_metadata drm_connector::hdr_sink_metadata', at offset 14272 (in bits) at drm_connector.h:1178:1
  1 data member insertion:
    'u8 drm_connector::checksum', at offset 14080 (in bits) at drm_connector.h:1187:1
  there are data member changes:
    'drm_panel* drm_connector::panel' offset changed from 14400 to 14016 (in bits) (by -384 bits)
  187 impacted interfaces

'struct drm_connector_state at drm_connector.h:411:1' changed:
  type size changed from 1088 to 1024 (in bits)
  1 data member deletion:
    'drm_property_blob* drm_connector_state::hdr_output_metadata', at offset 1024 (in bits) at drm_connector.h:505:1
  187 impacted interfaces

'struct drm_device at drm_device.h:31:1' changed:
  type size changed from 13376 to 13312 (in bits)
  there are data member changes:
    type 'struct drm_mode_config' of 'drm_device::mode_config' changed:
      type size changed from 8256 to 8192 (in bits)
      1 data member deletion:
        'drm_property* drm_mode_config::hdr_output_metadata_property', at offset 7808 (in bits) at drm_mode_config.h:815:1
      there are data member changes:
        'uint32_t drm_mode_config::preferred_depth' offset changed from 7872 to 7808 (in bits) (by -64 bits)
        'uint32_t drm_mode_config::prefer_shadow' offset changed from 7904 to 7840 (in bits) (by -64 bits)
        'bool drm_mode_config::async_page_flip' offset changed from 7936 to 7872 (in bits) (by -64 bits)
        'bool drm_mode_config::allow_fb_modifiers' offset changed from 7944 to 7880 (in bits) (by -64 bits)
        'bool drm_mode_config::normalize_zpos' offset changed from 7952 to 7888 (in bits) (by -64 bits)
        'drm_property* drm_mode_config::modifiers_property' offset changed from 8000 to 7936 (in bits) (by -64 bits)
        'uint32_t drm_mode_config::cursor_width' offset changed from 8064 to 8000 (in bits) (by -64 bits)
        'uint32_t drm_mode_config::cursor_height' offset changed from 8096 to 8032 (in bits) (by -64 bits)
        'drm_atomic_state* drm_mode_config::suspend_state' offset changed from 8128 to 8064 (in bits) (by -64 bits)
        'const drm_mode_config_helper_funcs* drm_mode_config::helper_private' offset changed from 8192 to 8128 (in bits) (by -64 bits)
      187 impacted interfaces
    and size changed from 8256 to 8192 (in bits) (by -64 bits)
    'mutex drm_device::object_name_lock' offset changed from 12736 to 12672 (in bits) (by -64 bits)
    'idr drm_device::object_name_idr' offset changed from 12992 to 12928 (in bits) (by -64 bits)
    'drm_vma_offset_manager* drm_device::vma_offset_manager' offset changed from 13184 to 13120 (in bits) (by -64 bits)
    'int drm_device::switch_power_state' offset changed from 13248 to 13184 (in bits) (by -64 bits)
    'drm_fb_helper* drm_device::fb_helper' offset changed from 13312 to 13248 (in bits) (by -64 bits)
  187 impacted interfaces

'struct drm_dp_aux at drm_dp_helper.h:1148:1' changed:
  type size changed from 10496 to 10752 (in bits)
  1 data member insertion:
    'mutex drm_dp_aux::i2c_mutex', at offset 8896 (in bits) at drm_dp_helper.h:1154:1
  there are data member changes:
    'work_struct drm_dp_aux::crc_work' offset changed from 8896 to 9152 (in bits) (by +256 bits)
    'u8 drm_dp_aux::crc_count' offset changed from 9152 to 9408 (in bits) (by +256 bits)
    'void ()* drm_dp_aux::transfer' offset changed from 9216 to 9472 (in bits) (by +256 bits)
    'unsigned int drm_dp_aux::i2c_nack_count' offset changed from 9280 to 9536 (in bits) (by +256 bits)
    'unsigned int drm_dp_aux::i2c_defer_count' offset changed from 9312 to 9568 (in bits) (by +256 bits)
    'drm_dp_aux_cec drm_dp_aux::cec' offset changed from 9344 to 9600 (in bits) (by +256 bits)
  25 impacted interfaces

'struct drm_dp_mst_port at drm_dp_mst_helper.h:69:1' changed:
  type size changed from 11264 to 11840 (in bits)
  1 data member insertion:
    'drm_dp_mst_dsc_info drm_dp_mst_port::dsc_info', at offset 11520 (in bits) at drm_dp_mst_helper.h:117:1
  there are data member changes:
    type 'struct drm_dp_aux' of 'drm_dp_mst_port::aux' changed as reported earlier
    and size changed from 10496 to 10752 (in bits) (by +256 bits)
    'drm_dp_mst_branch* drm_dp_mst_port::parent' offset changed from 10816 to 11072 (in bits) (by +256 bits)
    'drm_dp_vcpi drm_dp_mst_port::vcpi' offset changed from 10880 to 11136 (in bits) (by +256 bits)
    'drm_connector* drm_dp_mst_port::connector' offset changed from 11008 to 11264 (in bits) (by +256 bits)
    'drm_dp_mst_topology_mgr* drm_dp_mst_port::mgr' offset changed from 11072 to 11328 (in bits) (by +256 bits)
    'edid* drm_dp_mst_port::cached_edid' offset changed from 11136 to 11392 (in bits) (by +256 bits)
    'bool drm_dp_mst_port::has_audio' offset changed from 11200 to 11456 (in bits) (by +256 bits)
    'bool drm_dp_mst_port::fec_capable' offset changed from 11208 to 11464 (in bits) (by +256 bits)
  16 impacted interfaces

'struct drm_mode_config at drm_mode_config.h:352:1' changed:
  details were reported earlier

Bug: 152417756
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I431c5860ebf5fede23f30587e6262e7269756722
2020-04-18 01:37:02 +00:00
Alistair Delva
dec3fa208e ANDROID: GKI: Add drm_dp_send_dpcd_{read,write} accessor functions
Resolves an abi diff.

Bug: 152417756
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I36e093ddcc1e2645e05a2a683ac52bd2f629dc35
2020-04-18 01:36:52 +00:00
Alistair Delva
35acc5c9dd ANDROID: GKI: drm: Add drm_dp_mst_get_max_sdp_streams_supported accessor function
Resolves an abi diff.

Bug: 152417756
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Ic6f57de89c7632c50db95b2f5ce85db92e3d6935
2020-04-18 01:36:44 +00:00
Alistair Delva
0c5afac321 ANDROID: GKI: drm: Add drm_dp_mst_has_fec accessor function
Resolves an abi diff.

Bug: 152417756
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Ifcd858c35cb52cd2a3024dcb456e79f6214ab25a
2020-04-18 01:36:27 +00:00
Alistair Delva
b572376bed ANDROID: GKI: Add 'dsc_info' to struct drm_dp_mst_port
Resolves an abi diff. Also adds setter/getter functions which are also
exported.

Bug: 152417756
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Ieb567ae1915446720ed2e77651a9a49f1e295360
2020-04-18 01:36:13 +00:00
Hemant Kumar
27ac6136bc ANDROID: GKI: usb: Add support to handle USB SMMU S1 address
Update helper APIs to return physical address as well as
USB SMMU stage 1 address. Physical address is used to map
it to iova for remote processor. S1 address is used by xHC.
Get sg table containing one or mode page sized physical
address corresponding to S1 address for event ring, xfer
ring and xfer buffers using dma_get_sgtable(). Accordingly
update QMI response buffer for XHCI event ring, xfer ring
memory info and xfer buffer.

Change-Id: I6c9ea39d8a87a5bdc5a760d2a1ca85ab3024d985
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
(cherry picked from commit 3e3d0ab182)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154042109
2020-04-18 00:27:45 +00:00
Hemant Kumar
52b86b23cc ANDROID: GKI: usb: Add helper APIs to return xhci phys addresses
This is a merge of two cherry picks for simplicity and reduction of
churn.

Cherry picked from commit 787b74a487
("usb: xhci: Add helper APIs to return xhci dma addresses")
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>

Cherry picked from commit b8360b2a98
("usb: core: Remove helper APIs returning dcba dma address")
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>

dma address of secondary event ring and transfer ring are required
to pass to remote entity. Remote entity uses these addresses to
program xhci controller registers.

Change to EXPORT_SYMBOL_GPL usage instead.

(cherry picked from commit 787b74a487)
(cherry picked from commit b8360b2a98)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 154042109
Change-Id: I9fd1e95b00f2185b01374a46d7dff3182c3b3d78
2020-04-18 00:27:36 +00:00