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>
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>
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>
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>
* 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
[ 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>
[ 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>
[ 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>
[ 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>
[ 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>
[ 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>
[ 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>
[ 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>
[ 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>
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>
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>
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>
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>
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>