39438 Commits

Author SHA1 Message Date
Linux Build Service Account
6519456617 Merge "msm/sde: Unregister input handler during encoder disable" into dev/msm-4.14-display 2018-06-29 14:08:17 -07:00
Linux Build Service Account
9a11837d63 Merge "drm/msm/sde: correct VIG GAMUT/IGC opmode address for read" into dev/msm-4.14-display 2018-06-29 14:08:14 -07:00
Camus Wong
4a5f724a81 drm/bridge: add anx7625 DSI to DP bridge driver
Add anx7625 bridge driver to support DSI to DP output.
Configure anx7625 chip via I2C for audio/video setup.

CRs-Fixed: 2246610
Change-Id: I25c5a54fc4f6a2f2fc58c8607d81904ac82f46e3
Signed-off-by: Camus Wong <camusw@codeaurora.org>
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
2018-06-29 14:07:39 -04:00
Narendra Muppalla
bad01c2c07 drm/msm: suppress display platform drivers bind/unbind feature
Display platform drivers does not support the manual bind/unbind
feature through sysfs. Suppress the bind/unbind calls using driver
attribute.

Change-Id: If583694c6bfe659e17e76a736f2fcfb52e6d1a01
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2018-06-28 18:32:56 -07:00
Narendra Muppalla
e701a79b49 drm/msm/sde: Prevent multiple unblank event trigger
In cases such as dynamic fps, resolution switch, currently
unblank event is triggered every time when new modeset is
required. Trigger the event only when active changed.

Change-Id: I6387f576a804999f1e916a1852a4c21719de9e91
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2018-06-28 18:32:46 -07:00
Steve Cohen
b4ab8764c8 drm/msm: retry disabling modes on -ERESTARTSYS during lastclose
Retry the msm_disable_all_modes_commit if it fails with -ERESTARTSYS.
This error would normally propagate up causing the upper layers to
re-trigger the call with the same arguments, but since lastclose
returns a void type the error is getting lost.  Therefore detect
-ERESTARTSYS and retry the commit ourselves.

Change-Id: Id6d1933965f5fdca0ac823ae1873a206fef82228
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2018-06-28 16:57:14 -04:00
Isaac J. Manjarres
bbea3fef30 Merge android-4.14.51 (a51b40c) into msm-4.14
* remotes/origin/tmp-a51b40c:
  Linux 4.14.51
  tcp: do not overshoot window_clamp in tcp_rcv_space_adjust()
  Btrfs: make raid6 rebuild retry more
  Btrfs: fix scrub to repair raid6 corruption
  Revert "Btrfs: fix scrub to repair raid6 corruption"
  ARM: kexec: fix kdump register saving on panic()
  ARM: 8758/1: decompressor: restore r1 and r2 just before jumping to the kernel
  ARM: 8753/1: decompressor: add a missing parameter to the addruart macro
  efi/libstub/arm64: Handle randomized TEXT_OFFSET
  parisc: Move setup_profiling_timer() out of init section
  sched/deadline: Make the grub_reclaim() function static
  sched/debug: Move the print_rt_rq() and print_dl_rq() declarations to kernel/sched/sched.h
  drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()
  locking/percpu-rwsem: Annotate rwsem ownership transfer by setting RWSEM_OWNER_UNKNOWN
  locking/rwsem: Add a new RWSEM_ANONYMOUSLY_OWNED flag
  clk: imx6ull: use OSC clock during AXI rate change
  ARM: davinci: board-dm646x-evm: set VPIF capture card name
  ARM: davinci: board-dm646x-evm: pass correct I2C adapter id for VPIF
  ARM: davinci: dm646x: fix timer interrupt generation
  i2c: viperboard: return message count on master_xfer success
  i2c: pmcmsp: fix error return from master_xfer
  i2c: pmcmsp: return message count on master_xfer success
  ARM: keystone: fix platform_domain_notifier array overrun
  usb: musb: fix remote wakeup racing with suspend
  afs: Fix the non-encryption of calls
  mtd: Fix comparison in map_word_andequal()
  x86/pkeys/selftests: Add a test for pkey 0
  x86/pkeys/selftests: Save off 'prot' for allocations
  x86/pkeys/selftests: Fix pointer math
  x86/pkeys/selftests: Fix pkey exhaustion test off-by-one
  x86/pkeys/selftests: Add PROT_EXEC test
  x86/pkeys/selftests: Factor out "instruction page"
  x86/pkeys/selftests: Allow faults on unknown keys
  x86/pkeys/selftests: Remove dead debugging code, fix dprint_in_signal
  x86/pkeys/selftests: Stop using assert()
  x86/pkeys/selftests: Give better unexpected fault error messages
  x86/selftests: Add mov_to_ss test
  x86/mpx/selftests: Adjust the self-test to fresh distros that export the MPX ABI
  x86/pkeys/selftests: Adjust the self-test to fresh distros that export the pkeys ABI
  objtool, kprobes/x86: Sync the latest <asm/insn.h> header with tools/objtool/arch/x86/include/asm/insn.h
  uprobes/x86: Prohibit probing on MOV SS instruction
  kprobes/x86: Prohibit probing on exception masking instructions
  ocfs2: take inode cluster lock before moving reflinked inode from orphan dir
  proc/kcore: don't bounds check against address 0
  init: fix false positives in W+X checking
  net sched actions: fix invalid pointer dereferencing if skbedit flags missing
  ixgbe: return error on unsupported SFP module when resetting
  x86: Delay skip of emulated hypercall instruction
  KVM: Extend MAX_IRQ_ROUTES to 4096 for all archs
  rxrpc: Fix the min security level for kernel calls
  rxrpc: Fix error reception on AF_INET6 sockets
  qede: Fix gfp flags sent to rdma event node allocation
  qed: Fix l2 initializations over iWARP personality
  tipc: eliminate KMSAN uninit-value in strcmp complaint
  agp: uninorth: make two functions static
  cifs: smb2ops: Fix listxattr() when there are no EAs
  arm64: Add MIDR encoding for NVIDIA CPUs
  can: dev: increase bus-off message severity
  net: aquantia: driver should correctly declare vlan_features bits
  x86/xen: Reset VCPU0 info pointer after shared_info remap
  mac80211: use timeout from the AddBA response instead of the request
  ARM: dts: cygnus: fix irq type for arm global timer
  driver core: add __printf verification to __ata_ehi_pushv_desc
  drm/omap: handle alloc failures in omap_connector
  drm/omap: check return value from soc_device_match
  drm/omap: fix possible NULL ref issue in tiler_reserve_2d
  drm/omap: fix uninitialized ret variable
  drm/omap: silence unititialized variable warning
  mac80211: Adjust SAE authentication timeout
  tee: check shm references are consistent in offset/size
  sh: fix build failure for J2 cpu with SMP disabled
  sched/core: Introduce set_special_state()
  spi: bcm2835aux: ensure interrupts are enabled for shared handler
  RDMA/cma: Do not query GID during QP state transition to RTR
  IB/hfi1: Fix memory leak in exception path in get_irq_affinity()
  IB/hfi1 Use correct type for num_user_context
  smc: fix sendpage() call
  ARM: OMAP1: ams-delta: fix deferred_fiq handler
  nvme: Set integrity flag for user passthrough commands
  nvme: fix potential memory leak in option parsing
  iommu/vt-d: fix shift-out-of-bounds in bug checking
  arm64: tegra: Make BCM89610 PHY interrupt as active low
  kthread, sched/wait: Fix kthread_parkme() wait-loop
  stop_machine, sched: Fix migrate_swap() vs. active_balance() deadlock
  parisc: drivers.c: Fix section mismatches
  bpf, x64: fix memleak when not converging after image
  scsi: vmw-pvscsi: return DID_BUS_BUSY for adapter-initated aborts
  hexagon: export csum_partial_copy_nocheck
  hexagon: add memset_io() helper
  Input: atmel_mxt_ts - fix the firmware update
  ARM: dts: logicpd-som-lv: Fix Audio Mute
  ARM: dts: logicpd-som-lv: Fix WL127x Startup Issues
  ARM: OMAP2+: powerdomain: use raw_smp_processor_id() for trace
  dt-bindings: panel: lvds: Fix path to display timing bindings
  ARM: davinci: board-dm355-evm: fix broken networking
  ARM: davinci: board-omapl138-hawk: fix GPIO numbers for MMC/SD lookup
  ARM: davinci: board-da850-evm: fix GPIO lookup for MMC/SD
  ARM: davinci: board-da830-evm: fix GPIO lookup for MMC/SD
  IB/core: Make ib_mad_client_id atomic
  <linux/stringhash.h>: fix end_name_hash() for 64bit long
  IB/rxe: avoid double kfree_skb
  IB/rxe: add RXE_START_MASK for rxe_opcode IB_OPCODE_RC_SEND_ONLY_INV
  RDMA/iwpm: fix memory leak on map_info
  RDMA/cma: Fix use after destroy access to net namespace for IPoIB
  IB/uverbs: Fix validating mandatory attributes
  IB: make INFINIBAND_ADDR_TRANS configurable
  ib_srp: depend on INFINIBAND_ADDR_TRANS
  ib_srpt: depend on INFINIBAND_ADDR_TRANS
  nvmet-rdma: depend on INFINIBAND_ADDR_TRANS
  nvme: depend on INFINIBAND_ADDR_TRANS
  tipc: fix bug in function tipc_nl_node_dump_monitor
  i2c: sprd: Fix the i2c count issue
  i2c: sprd: Prevent i2c accesses after suspend is called
  bpf: fix uninitialized variable in bpf tools
  x86/cpu/intel: Add missing TLB cpuid values
  ata: ahci: mvebu: override ahci_stop_engine for mvebu AHCI
  libahci: Allow drivers to override stop_engine
  KVM: arm/arm64: vgic: fix possible spectre-v1 in vgic_mmio_read_apr()
  arm64: fix possible spectre-v1 in ptrace_hbp_get_event()
  blk-mq: fix sysfs inflight counter
  HID: intel-ish-hid: use put_device() instead of kfree()
  rpmsg: added MODULE_ALIAS for rpmsg_char
  remoteproc: qcom: Fix potential device node leaks
  perf/x86/intel: Don't enable freeze-on-smi for PerfMon V1
  rds: ib: Fix missing call to rds_ib_dev_put in rds_ib_setup_qp
  selftests: ftrace: Add a testcase for multiple actions on trigger
  HID: wacom: Release device resource data obtained by devres_alloc()
  HID: lenovo: Add support for IBM/Lenovo Scrollpoint mice
  arm64: ptrace: remove addr_limit manipulation
  net: ethtool: Add missing kernel doc for FEC parameters
  thermal: int3403_thermal: Fix NULL pointer deref on module load / probe
  drm/amdkfd: fix clock counter retrieval for node without GPU
  ACPI / watchdog: Prefer iTCO_wdt on Lenovo Z50-70
  ARM: dts: da850: fix W=1 warnings with pinmux node
  net: phy: marvell: clear wol event before setting it
  powerpc/powernv/memtrace: Let the arch hotunplug code flush cache
  dt-bindings: meson-uart: DT fix s/clocks-names/clock-names/
  ACPI / PM: Blacklist Low Power S0 Idle _DSM for ThinkPad X1 Tablet(2016)
  usb: typec: ucsi: fix tracepoint related build error
  mm: memcg: add __GFP_NOWARN in __memcg_schedule_kmem_cache_create()
  kexec_file: do not add extra alignment to efi memmap
  proc: revalidate kernel thread inodes to root:root
  mm, pagemap: fix swap offset value for PMD migration entry
  scsi: isci: Fix infinite loop in while loop
  scsi: storvsc: Set up correct queue depth values for IDE devices
  parisc: time: Convert read_persistent_clock() to read_persistent_clock64()
  vfs: Undo an overly zealous MS_RDONLY -> SB_RDONLY conversion
  net: hns: Avoid action name truncation
  blkcg: init root blkcg_gq under lock
  drm/msm: don't deref error pointer in the msm_fbdev_create error path
  drm/msm/dsi: use correct enum in dsi_get_cmd_fmt
  drm/msm: Fix possible null dereference on failure of get_pages()
  ASoC: msm8916-wcd-analog: use threaded context for mbhc events
  netfilter: nf_tables: fix out-of-bounds in nft_chain_commit_update
  netfilter: nf_tables: NAT chain and extensions require NF_TABLES
  scsi: target: fix crash with iscsi target and dvd
  scsi: megaraid_sas: Do not log an error if FW successfully initializes.
  scsi: iscsi: respond to netlink with unicast when appropriate
  tipc: fix infinite loop when dumping link monitor summary
  blkcg: don't hold blkcg lock when deactivating policy
  spi: cadence: Add usleep_range() for cdns_spi_fill_tx_fifo()
  ASoC: topology: Check widget kcontrols before deref.
  xen: xenbus_dev_frontend: Really return response string
  ASoC: topology: Fix bugs of freeing soc topology
  PCI: kirin: Fix reset gpio name
  soc: bcm2835: Make !RASPBERRYPI_FIRMWARE dummies return failure
  soc: bcm: raspberrypi-power: Fix use of __packed
  eCryptfs: don't pass up plaintext names when using filename encryption
  ASoC: rt5514: Add the missing register in the readable table
  clk: honor CLK_MUX_ROUND_CLOSEST in generic clk mux
  dt-bindings: dmaengine: rcar-dmac: document R8A77965 support
  dt-bindings: serial: sh-sci: Add support for r8a77965 (H)SCIF
  dt-bindings: pinctrl: sunxi: Fix reference to driver
  doc: Add vendor prefix for Kieback & Peter GmbH
  spi: sh-msiof: Fix bit field overflow writes to TSCR/RSCR
  MIPS: dts: Boston: Fix PCI bus dtc warnings:
  isofs: fix potential memory leak in mount option parsing
  s390/smsgiucv: disable SMSG on module unload
  MIPS: io: Add barrier after register read in readX()
  fsnotify: fix ignore mask logic in send_to_group()
  perf report: Fix switching to another perf.data file
  nfp: ignore signals when communicating with management FW
  MIPS: io: Prevent compiler reordering writeX()
  x86: Add check for APIC access address for vmentry of L2 guests
  KVM: X86: fix incorrect reference of trace_kvm_pi_irte_update
  Input: synaptics-rmi4 - fix an unchecked out of memory error path
  clocksource/drivers/imx-tpm: Correct some registers operation flow

  stop_machine: Disable preemption when waking two stopper threads

  When cpu_stop_queue_two_works() begins to wake the stopper
  threads, it does so without preemption disabled, which leads
  to the following race condition:

  The source CPU calls cpu_stop_queue_two_works(), with cpu1
  as the source CPU, and cpu2 as the destination CPU. When
  adding the stopper threads to the wake queue used in this
  function, the source CPU stopper thread is added first,
  and the destination CPU stopper thread is added last.

  When wake_up_q() is invoked to wake the stopper threads, the
  threads are woken up in the order that they are queued in,
  so the source CPU's stopper thread is woken up first, and
  it preempts the thread running on the source CPU.

  The stopper thread will then execute on the source CPU,
  disable preemption, and begin executing multi_cpu_stop()
  and wait for an ack from the destination CPU's stopper thread,
  with preemption still disabled. Since the worker thread that
  woke up the stopper thread on the source CPU is affine to the
  source CPU, and preemption is disabled on the source CPU, that
  thread will never run to dequeue the destination CPU's stopper
  thread from the wake queue, and thus, the destination CPU's
  stopper thread will never run, causing the source CPU's stopper
  thread to wait forever, and stall.

  Disable preemption when waking the stopper threads in
  cpu_stop_queue_two_works() to ensure that the worker thread
  that is waking up the stopper threads isn't preempted
  by the source CPU's stopper thread, and permanently
  scheduled out, leaving the remaining stopper thread asleep
  in the wake queue.

Conflicts:
	drivers/gpu/drm/msm/msm_gem.c
	include/linux/sched.h
	kernel/kthread.c

Change-Id: I177cb8516cdfe50d61cb948ed342d330e61376a1
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2018-06-28 09:30:40 -07:00
Govinda Rajulu Chenna
5e8037d91a drm/msm/dp: add mst bandwidth alloc/dealloc implementation
This change implements the bandwidth/rate-governing
allocation logic for stream on and deallocates the
bandwidth from both source and receiver devices during
stream shutdown.

CRs-Fixed: 2265294
Change-Id: Iea02d8c0227cca159f07a9fc88499ed6ce501d21
Signed-off-by: Govinda Rajulu Chenna <gchenna@codeaurora.org>
2018-06-28 08:22:48 -07:00
Xiaowen Wu
798fed8b1a drm/msm/sde: re-init delayed work in sde encoder enable
When multidisplay is enabled, delayed_off_work can be submitted to
different crtc worker thread and violate kernel's rule for delayed
task that work must not be used with >1 worker.

This change will re-initialize the delayed work to allow it submitted
to different worker.

CRs-Fixed: 2267120
Change-Id: I65ff4bc67eed31bdfc86e308a9d8968f46c76b62
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
2018-06-28 10:18:58 -04:00
Veera Sundaram Sankaran
5ac92ffb8a drm: msm: sde: fix decimation validation in plane atomic_check
Fix the invalid decimation check which skips the validations
below when decimation is enabled. This fails to validate
few parameters and also miss updating few state variables
leading to various issues. Part of the change add an event
log to track when the driver qseed/PE settings are used.

Change-Id: I829d54d6b77b1ff39827b08a28f7edbb98ed8e24
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2018-06-27 15:52:49 -07:00
Linux Build Service Account
4126e402d4 Merge "drm/msm/sde: don't setup AVR for displays not supporting qsync" into dev/msm-4.14-display 2018-06-27 14:41:58 -07:00
Fuad Hossain
85d3620de8 drm/msm: free atomic state during lastclose
Ensure that the refcount of the atomic state is decremented
during lastclose. This will make sure that when the atomic
state is freed, all objects being held by it are released.

Change-Id: I547cf997b9eb80560c9646f688071fb6a41648b2
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
2018-06-27 14:37:15 -04:00
Narendra Muppalla
ff16ce0e1e drm/msm/sde: Fix uninitialized variables and pointers
Return values in some cases can be wrongs as its not
initialized properly. Perform proper NULL check for
pointers as well.

Change-Id: Ieac1a8f50dabd2918edaba1bd93599a62b8c9bf0
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2018-06-26 10:51:20 -07:00
Prabhanjan Kandula
8468632e51 drm/msm/sde: add cwb support for single ctl path
MDSS hardware supports single CTL path starting SM8150 chipset.
It needs mux configuration update starting for this hardware due
to single CTL path. Change also includes ping-pong overflow irq
handling for the additional ping-pong blocks in SM8150.

Change-Id: I3f2ba272562b7f0967621b3b6aa029ef501b02db
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2018-06-25 14:11:03 -07:00
Linux Build Service Account
8dd0536ea5 Merge "drm/msm/sde: set correct bit width in qseed op mode" into dev/msm-4.14-display 2018-06-25 12:43:34 -07:00
Linux Build Service Account
b560120108 Merge "drm/msm/sde: fix feature enable check for CWB support" into dev/msm-4.14-display 2018-06-25 12:28:31 -07:00
Linux Build Service Account
4f40fe53b1 Merge "drm/msm/sde: validate de-interlace and scalar concurrency" into dev/msm-4.14-display 2018-06-25 12:28:23 -07:00
Steve Cohen
e0f3d49f0d drm/msm: avoid segmentation of dma_buf mappings
Ensure dma_buf mappings aren't broken in to multiple segments
by setting the devices segment size and boundary.  This will
improve performance and the sg_dma_len() API will now give
the correct buffer size.

Change-Id: Ic3a3c520ea488d367c8df0f1ce7aca5000e9f3e7
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2018-06-22 20:00:35 -04:00
Steve Cohen
54f42893db drm/msm/sde: add hw log mask for REGDMA
Setup log_mask for the REGDMA hardware block.  This is used to
enable register write logs via the "hw_log_mask" debugfs node.

Change-Id: Ifff9512c4354677bc924279031609712469d5f96
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2018-06-22 18:13:41 -04:00
Narendra Muppalla
5b9b484681 drm/msm/sde: add support to scale data bus
Current driver has support to vote for only one
rate in the data bus. Add support to scale the
vote for the data bus.

Change-Id: I7fbef0437c7e6f0581275c4bb2c302b41f7918ef
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2018-06-22 15:12:43 -07:00
Camus Wong
8cedeac3cc drm/msm/dsi-staging: Add external DSI bridge support
Add external DSI to DP/HDMI bridge support to allow upstream driver
in drm/bridge work with dsi-staging driver without any change.

CRs-Fixed: 2242018
Change-Id: I92302314da7a1c964a46b52c3315a9d436814dc8
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
2018-06-22 13:51:52 -07:00
Narendra Muppalla
ef5f24f548 drm/msm/sde: Use panel front porch for ROT and MDP fetch start
Keep the ROT and MDP fetch start to a fixed value such that they
are not affected when dynamic refresh rate changes the front porch.

Change-Id: Ic29a2d29e736801b1840538aeedadbf51ba5bb9f
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2018-06-22 13:18:56 -07:00
Prabhanjan Kandula
1dc0d85d7b drm/msm/sde: fix feature enable check for CWB support
Fix the Concurrent Writeback feature enabled validation
to check if CWB feature bit set in the Writeback feature flag.

Change-Id: Iffd3167b500edaa3c3338094eadcdc08606ff5c1
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2018-06-22 13:13:27 -07:00
Xiaowen Wu
ca9b6f1b40 drm/msm/dsi-staging: add force_clk_lane_hs support
Some panel / bridge require clock lane always in high speed mode,
this change added options in DT file to force DSI controller and
PHY output clock lane in high speed mode.

CRs-Fixed: 2242680
Change-Id: I5e69b942ef9bc77dd7a6542f37f4f41a45ffefea
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
2018-06-22 14:41:55 -04:00
Linux Build Service Account
f6ea99ce7a Merge "drm/msm/sde: signal pageflip event after frame kickoff" into dev/msm-4.14-display 2018-06-22 11:16:27 -07:00
Linux Build Service Account
74a583d50d Merge changes Ia9eebd02,Ia8ab0ef2,Ia6cf3b3f,I6272d756,I66e7ea18,I2e82ae22,I9b10f4ff into dev/msm-4.14-display
* changes:
  drm/msm/sde: concurrent writeback support
  drm/msm: atomic seamless connector change
  drm/msm/sde: add CWB custom property support
  drm/msm/sde: relax crtc for driving multiple connectors
  drm/msm/sde: avoid partial update when DS is enabled
  drm/msm/sde: extend frame retire event handling
  drm/msm/sde: propagate frame error through fence
2018-06-22 11:01:44 -07:00
Linux Build Service Account
9056c9c0c5 Merge "drm/msm/sde: signal release and retire fence during timeout" into dev/msm-4.14-display 2018-06-22 11:01:40 -07:00
Linux Build Service Account
53f4185279 Merge "drm/msm/sde: add null checks in drm module" into dev/msm-4.14-display 2018-06-22 11:01:33 -07:00
Linux Build Service Account
17a37e3a8e Merge "drm/msm/sde: Correct vblank ref count in case of failures" into dev/msm-4.14-display 2018-06-22 10:54:38 -07:00
Linux Build Service Account
0b779a3419 Merge "drm/msm/sde: fix deadlock between IRQ lock and node state lock" into dev/msm-4.14-display 2018-06-22 10:54:34 -07:00
Linux Build Service Account
d6556e75bd Merge "drm/msm/sde: fix race condition between enable/disable events" into dev/msm-4.14-display 2018-06-22 10:54:27 -07:00
Linux Build Service Account
a508b4c737 Merge "drm/msm/sde: move AD4 to idle state when device suspend" into dev/msm-4.14-display 2018-06-22 10:54:23 -07:00
Ping Li
3299df99e0 drm/msm/sde: correct VIG GAMUT/IGC opmode address for read
When programing VIG feature blocks, LUT DMA path and AHB path use
different base address of VIG.

LUT DMA is used for writing the VIG features, and AHB is used for
reading the opmode. This change corrects the VIG Gamut/IGC opmode
address for reading.

Change-Id: Ia2dbe66f731383ff988e99814911aa05e6143971
Signed-off-by: Ping Li <pingli@codeaurora.org>
2018-06-21 11:34:44 -07:00
Raviteja Tamatam
490abb2321 drm/msm/sde: validate de-interlace and scalar concurrency
In de-interlace video plus scalar concurrency case-
pipe fetch, unpack output and scalar block input number of lines
should match. Otherwise, it will lead to hang. Added check to
validate this condition.

Change-Id: I00453dda36b5291948b99d0f0a89105b6875c039
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2018-06-21 10:07:44 -07:00
Ping Li
6fd99b3e63 drm/msm/sde: Add check before applying color-prop properties
After device goes into suspend state for a while, we notice that
atomic commit calls are made, and they will cause all the dirty
color-processing properties to be applied during suspend state.
When device actually resumes, all the dirty color-processing
won't be applied again and cause color-processing features not
persist over suspend/resume.
This change adds a check to make sure sde_crtc is enabled before
applying color-processing properties to avoid the issue.

Signed-off-by: Ping Li <pingli@codeaurora.org>
Signed-off-by: Xu Yang <yangxu@codeaurora.org>
Change-Id: Ia001b5d4074da05d0ad266cb0876e5283b9bdda1
CRs-Fixed: 2234358
2018-06-21 17:17:19 +08:00
Dan Carpenter
96ef5c4414 drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()
[ Upstream commit 2b6207291b7b277a5df9d1aab44b56815a292dba ]

There is a comment here which says that DIV_ROUND_UP() and that's where
the problem comes from.  Say you pick:

	args->bpp = UINT_MAX - 7;
	args->width = 4;
	args->height = 1;

The integer overflow in DIV_ROUND_UP() means "cpp" is UINT_MAX / 8 and
because of how we picked args->width that means cpp < UINT_MAX / 4.

I've fixed it by preventing the integer overflow in DIV_ROUND_UP().  I
removed the check for !cpp because it's not possible after this change.
I also changed all the 0xffffffffU references to U32_MAX.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180516140026.GA19340@mwanda
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-21 04:03:00 +09:00
Tomi Valkeinen
bc707b2d95 drm/omap: handle alloc failures in omap_connector
[ Upstream commit 47aaaec818dfd1009d1358974a2931f05dd57203 ]

Handle memory allocation failures in omap_connector to avoid NULL
derefs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180502091159.7071-5-tomi.valkeinen@ti.com
Reviewed-by: Benoit Parrot <bparrot@ti.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-21 04:02:55 +09:00
Tomi Valkeinen
771f573cc1 drm/omap: check return value from soc_device_match
[ Upstream commit 4d6cb5e2fee52af17001e92950f0894304706ee4 ]

soc_device_match() can return NULL, so add a check and fail if
soc_device_match() fails.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180502091159.7071-2-tomi.valkeinen@ti.com
Reviewed-by: Benoit Parrot <bparrot@ti.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-21 04:02:55 +09:00
Tomi Valkeinen
a490d0570d drm/omap: fix possible NULL ref issue in tiler_reserve_2d
[ Upstream commit 6a0f0c55619f0b82a677cab72e77c3444a5eee58 ]

tiler_reserve_2d allocates memory but does not check if it got the
memory. Add the check and return ENOMEM on failure.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180329104038.29154-2-tomi.valkeinen@ti.com
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-21 04:02:55 +09:00
Tomi Valkeinen
9631f32b61 drm/omap: fix uninitialized ret variable
[ Upstream commit 77eeac24b10fc84d3ffd5b11a897dff88dde244d ]

audio_config function for both HDMI4 and HDMI5 return uninitialized
value as the error code if the display is not currently enabled. For
some reason this has not caused any issues.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180329104038.29154-1-tomi.valkeinen@ti.com
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-21 04:02:55 +09:00
Dan Carpenter
ca3c09a749 drm/omap: silence unititialized variable warning
[ Upstream commit 4a9fbfcab19d3f71ad2bf0bcb653c4ee84e69c7f ]

Smatch complains that "area_free" could be used without being
initialized.  This code is several years old and premusably works fine
so this can't be a very serious bug.  But it's easy enough to silence
the warning.  If "area_free" is false at the end of the function then
we return -ENOMEM.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180418142937.GA13828@mwanda
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-21 04:02:54 +09:00
Andres Rodriguez
56dfe52e04 drm/amdkfd: fix clock counter retrieval for node without GPU
[ Upstream commit 1cf6cc74bbeb85bb87c3ca3f3df97a283c3aa737 ]

Currently if a user requests clock counters for a node without a GPU
resource we will always return EINVAL.

Instead if no GPU resource is attached, fill the gpu_clock_counter
argument with zeroes so that we may proceed and return valid CPU
counters.

Signed-off-by: Andres Rodriguez <andres.rodriguez@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-21 04:02:47 +09:00
Emil Velikov
b6126afd64 drm/msm: don't deref error pointer in the msm_fbdev_create error path
[ Upstream commit 789d4c300e10eb2096ee83c3497118e67ccc951e ]

Currently the error pointer returned by msm_alloc_stolen_fb gets passed
to drm_framebuffer_remove. The latter handles only NULL pointers, thus
a nasty crash will occur.

Drop the unnecessary fail label and the associated checks - both err and
fb will be set at this stage.

Cc: Rob Clark <robdclark@gmail.com>
Cc: linux-arm-msm@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: freedreno@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-21 04:02:44 +09:00
Stefan Agner
5151a0c8d7 drm/msm/dsi: use correct enum in dsi_get_cmd_fmt
[ Upstream commit a4af89286f8fc382459308764ea05935dc477cdc ]

The function dsi_get_cmd_fmt returns enum dsi_cmd_dst_format,
use the correct enum value also for MIPI_DSI_FMT_RGB666/_PACKED.

This has been discovered using clang:
  drivers/gpu/drm/msm/dsi/dsi_host.c:743:35: warning: implicit conversion
        from enumeration type 'enum dsi_vid_dst_format' to different
        enumeration type 'enum dsi_cmd_dst_format' [-Wenum-conversion]
          case MIPI_DSI_FMT_RGB666:       return VID_DST_FORMAT_RGB666;
                                          ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-21 04:02:44 +09:00
Ben Hutchings
be04f7301d drm/msm: Fix possible null dereference on failure of get_pages()
[ Upstream commit 3976626ea3d2011f8fd3f3a47070a8b792018253 ]

Commit 62e3a3e342af changed get_pages() to initialise
msm_gem_object::pages before trying to initialise msm_gem_object::sgt,
so that put_pages() would properly clean up pages in the failure
case.

However, this means that put_pages() now needs to check that
msm_gem_object::sgt is not null before trying to clean it up, and
this check was only applied to part of the cleanup code.  Move
it all into the conditional block.  (Strictly speaking we don't
need to make the kfree() conditional, but since we can't avoid
checking for null ourselves we may as well do so.)

Fixes: 62e3a3e342af ("drm/msm: fix leak in failed get_pages")
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-21 04:02:44 +09:00
Kalyan Thota
18305c75b6 drm/msm/sde: signal release and retire fence during timeout
Signal release and retire fences in the case of wait timeout
for video mode interface.

Change-Id: I4c228257b761e264a13fff29da81baffe37496a8
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
2018-06-19 17:35:53 -07:00
Prabhanjan Kandula
b396452017 drm/msm/sde: concurrent writeback support
Add support for capturing frame on primary through WB using
concurrent writeback HW feature if supported. Changes include
detecting CWB usecase by finding if WB is in clone mode, reserve
same set of hw resources as in plain WB case and program CWB
specific registers like ctrl_top and flush on primary. This change
support dynamic capture enable or disable per frame. Signal only
retire fence for CWB case as primary crtc handles release fence.
WB irq handling is improved using helper functions in virtual encoder.
Change also supports notifying frame error by registering for ping-pong
overflow & signal retire fence with frame error if overflows.

Change-Id: Ia9eebd0224282e87a758e848eb4e1d4ca7871059
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2018-06-19 17:14:15 -07:00
Prabhanjan Kandula
3186afefb1 drm/msm: atomic seamless connector change
Handle dynamic connector attach or detach of additional
connector on crtc. Avoid full modeset disable and enable
if multiple connectors connected to single CRTC. It allows
seamless handling of usecase like concurrent writeback.
Attempt to keep existing seamless mode checks intact.

Change-Id: Ia8ab0ef27400f2ba08a7d2dc6984820f3c956231
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2018-06-19 17:14:07 -07:00
Prabhanjan Kandula
daea63bac3 drm/msm/sde: add CWB custom property support
If concurrent writeback feature is supported by HW, add a
new property on each CRTC through which client can request
the data point of capture (LM or DSSP output). Availability
of this property on crtc itself is indication for client about
the availability of CWB feature.

Change-Id: Ia6cf3b3f544d8d2f71fc2bcd376081f629e9d8ba
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2018-06-19 17:14:02 -07:00
Prabhanjan Kandula
65d13472a7 drm/msm/sde: relax crtc for driving multiple connectors
Extend crtc implemtation for supporting a copy connector
by limiting roi checks and mixer info population for only
primary connector and remove existing bail out checks to
restrict crtc to single connector.

Change-Id: I6272d75625770e19b0fbb0427d262d349827390d
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2018-06-19 17:13:53 -07:00