This change increases the max command logging capability.
It also adds cmd log print if pwr ctrl failure detected.
Finally, it changes function name ufshcd_cmd_log_print to
ufshchd_print_cmd_log to align with the naming of other
ufshcd debug print functions.
Change-Id: Ia407b239a0e231c353cccf7e6acf87a5f73d7bd8
Signed-off-by: Can Guo <cang@codeaurora.org>
Hflip is not supported on cursor pipes as there
is no flip buffer in the hardware. Invalidate
any commit request for cursor hflip.
Change-Id: I4b0ad28caffb75a4bd5a928a90daa6aa59f51848
Signed-off-by: Animesh Kishore <animeshk@codeaurora.org>
In newer kernel (msm-4.4 or later), for AEAD ciphering, crypto api has
been re-worked and the assoclen defines the length of association data
and iv together. But for rfc4309(ccm(aes)), iv is not part of AAD.
Therefore, change qcrypto driver to remove the iv, by subtract 8 from
assoclen for rfc4309(ccm(aes)).
Change-Id: I37eb1934d7817b5b5c33440122b68e5d37854960
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Add support in the sde plane component to select the secure context
bank based on the fb_mode plane property. This changes also sets the
correct hw settings for the secure plane src address.
CRs-Fixed: 2053654
Change-Id: Iacdfbb366b3ff56fcd5036fb9157547542095cde
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Pointer cmd_type is uninitialized in ufshcd_cond_add_cmd_trace()
function. Fix this by initializing the pointer with NULL.
Change-Id: I1fde5fc330e21e175c487b9d5f008ab3189a51ef
Signed-off-by: Siba Prasad <sibap@codeaurora.org>
During call of request_firmware_into_buf, if FW_OPT_NOCACHE is
set then release_firmware skip freeing of fw_id. So explicitly
freeing the same to avoid memory leak.
Change-Id: I7e1d6f8f06c4532b2bcbf256267fd1e90f5ced70
Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
Currently submit ioctl getting blocked till the commands
gets added to ringbuffer incase inflight count is less
than context burst count. If the submit command happens
in GPU slumber state, it will add the GPU wakeup time to
submit IOCTL. This will add latency in preparing next frame
in CPU side. Defer commands submission to dispatcher worker,
if the GPU is in slumber state.
CRs-Fixed: 2055107
Change-Id: I099ba721e02bbcd8ccadb1bc518c7c1ef4fb7e21
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
SMMU sid is set to 0 in q6asm_set_shared_circ_buff and
q6asm_set_shared_pos_buff in 32 bit arch. Fix it to
send proper SID to ADSP when sharing buffer.
Change-Id: I00cc0f881acd7a4a52292e65360ea7b03f2f0212
Signed-off-by: Rohit Kumar <rohitkr@codeaurora.org>
Pass tune2_efuse_addr register and bit field to be read from the register
from the device tree, which will be used to read HS_TRIM value and update
the value to QUSB2_PHY_TUNE2_REGISTER for eye-diagram test passing.
Change-Id: I64b4febf41f2e2c027c1d220e7037d8eeec27d46
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Do asynchronous driver probing of drm msm driver
to improve the device boot-up time.
Change-Id: I19e12a8330b35efb3d89abf9ba825637b08e71f3
Signed-off-by: Yunyun Cao <yunyunc@codeaurora.org>
Currently the priority and other behavior of a command stream
is provided by the user application during submission and
the application is expected to internally maintain the settings
for each 'context' or 'rendering queue' and specify the correct
ones.
This works okay for simple cases but as applications become more
complex we will want to set context specific flags and do various
permisson checks to allow certain contexts to enable additional
privileges.
Add kernel-side submit queues to be analogous to 'contexts' or
'rendering queues' on the application side. Each file descriptor
instance will maintain its own list of queues. Queues cannot be
shared between file descriptors.
For backwards compatibility context id '0' is defined as a default
context specifying middle priority and no special flags. This is
intended to be the usual configuration for 99% of applications so
that a garden variety application can function correctly without
creating a queue. Only those applications requiring the specific
benefit of different queues need create one.
In addition to the basic infrastructure, allow the user to specify
the queue priority - this will be used in lieu of the legacy
flags to set priority during the submission. Only the master DRM
instance can set the highest priority, but all the others are open
to all processes.
Change-Id: Ic0dedbad02fa27c0ba20c1157a05ddb143e46357
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
To make it easier to determine what submit(s) are currently active
on any given ring, store the active submits in per-ring lists instead
of a master list.
Change-Id: Ic0dedbadb331cd8e4e85dfcfa51cb1ceabe6efa9
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Change-Id: Ic0dedbadf485dd63ef727402b653a9d996a13632
Signed-off-by: Rob Clark <robdclark@gmail.com>
Git-commit: 40e6815bba6e34e5560e8855b43cd3eb17b24b09
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[jcrouse@codeaurora.org: fix merge conflicts and initialize node at create]
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Always print the iova and size for every buffer in a commit when
rd_full is enabled but only dump the contents for input buffers.
Also make imported buffers work with vmap so that they can be
safely dumped.
Change-Id: Ic0dedbad6ed5c426dc85a9c089b6c86c95c727cc
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
By default, if using $debugfs/.../rd to log cmdstream, only the
cmdstream buffers themselves are logged. But in some cases we want
to capture other buffers in the submit (to see VBO's or shaders).
So add a mod-param knob to control this.
Change-Id: Ic0dedbadf993d9ab2c7a44f14e7720e7567a6da1
Signed-off-by: Rob Clark <robdclark@gmail.com>
Git-commit: 79c21187ca370f37302f0d5c16c387985d7b8ba1
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[jcrouse@codeaurora.org: fix minor merge conflicts]
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
(reduce the noise in next patch)
Change-Id: Ic0dedbadd4b1100ff7b203f120f4acd0c4bf8d09
Signed-off-by: Rob Clark <robdclark@gmail.com>
Git-commit: 6507e799f432d9fa86ba398b095ef1139a70deac
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[jcrouse@codeaurora.org: fixed minor merge conflicts]
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
The header table is managed by IPA driver and header cannot be
moved. Instead a "free list" is maintained for deleted headers.
This change fixes a bug on header addition where the table is considered
full only if it is full and the free list is empty.
Change-Id: Ief8a384ea105c6f0179faaf95a98b9731fe6a01e
CRs-Fixed: 2048799
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
When verifying that the submit_cmd offset and size do not exceed the
bounds of the GEM object make sure to cast the math operation
into a suitably large buffer to account for overflow.
Change-Id: Ic0dedbad97513ee538d539e771038b3cf0405e91
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Currently, capacity learning algorithm is aborted when the
charging status goes to not charging. This can happen with qnovo
enabled charging where stopping the pulsing can lead to charging
status change. Qualify aborting capacity learning based on the
qnovo enable status and input presence.
While at it, abort the capacity learning when the charging status
goes to discharging and charger is removed.
Change-Id: I4546e8880be0658748157cb13f048610eee932a3
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Currently, rerun_election() is called on delta_bsoc_irq_en
votable to disable delta_bsoc interrupt during probe. However, it
doesn't set the internal variable for votable to not allow a
similar vote again. When a vote is made later to disable the
interrupt again, it can end up in invoking the callback again.
This leads to an unbalanced interrupt disable warning. Fix it.
CRs-Fixed: 2058754
Change-Id: I30c35be5275b5b310cf9b17ea4660a3e2e89c59a
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Use put_user API to write the data from kernel space to
userspace to avoid accessing userspace memory directly
in kernel space.
Change-Id: I649fe2597e80ccad50cf16b355e220734810e94c
Signed-off-by: Brahmaji K <bkomma@codeaurora.org>
If minidump is not enabled, minidump add region api returns
error number, clients can log the error to log buffer, which
flood the log buffer unnecessarily.
So return quietly if minidump support is not enabled.
Change-Id: I9c6428015ca40c5233f80471896bacecd0872bf7
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
Add support for hardware that can switch both parent clocks and divider
at the same time. This avoids generating intermediate frequencies from
either the old parent clock and new divider or new parent clock and
old divider combinations.
Change-Id: I1b3f7e9422f5c27eeb391d309374167dc139e8ca
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Git-commit: 549f1a4028350851f73837ad8cce3ac5fd2abd11
Git-repo: https://git.quicinc.com/?p=kernel/msm-4.4.git
[anischal@codeaurora.org: Fix compilation issue with
mux_div_get_safe_parent]
Signed-off-by: Amit Nischal <anischal@codeaurora.org>
The patch defines the per peripheral packet length
inside the per peripheral structure replacing
corresponding global variables.
CRs-Fixed: 2050301
Change-Id: I0bb732d93cd98aa46c69c81eeae9872a801a9e18
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
With the recent 'commit d07d314e7d ("fs/mbcache: fix use after
free issue in mb_cache_shrink_scan()")', the ce entry is deleted
from mbcache list after ce->e_refcnt incremented under global
spinlock mb_cache_spinlock. If __mb_cache_entry_release(), is waiting
for mb_cache_spinlock at the same time, to add the same ce to
mb_cache_lru_list and if it gets the lock after mb_cache_entry_get()
deleted it, then it corrupts the list, as that element will be freed
immediately after mb_cache_entry_get(). When this list is accessed next
time for deleting/adding another ce, we see list corruption issue.
Fix this by synchronizing these two contexts with mb_cache_spinlock and
evaluating the conditions(ce->e_refcnt) in __mb_cache_entry_release()
under the global lock before adding ce to mb_cache_lru_list.
Change-Id: I3e20fb4fa163755126e30be7aeca747d74215ed2
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Move error logs from interrupt context to process context to
avoid blocking other interrupts and reduce latencies in
ISR handling.
Also keep error check for BAM rx completion.
Change-Id: Ibf355561495b35702118eaf9a0f38c0fdc9310b3
Signed-off-by: Shrey Vijay <shreyv@codeaurora.org>
During cases where device coming out of pm suspend and disconnecting
the DP cable happens around the same time, it is possible that the
DP ON sequence is triggered from userspace before the disconnect event
is notified to the userspace. Add a check to make sure DP ON sequence
is executed only when the sink is connected.
Change-Id: I61d06e007358df75c5cedc26552422c7a8c8aa0b
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>