Commit graph

35 commits

Author SHA1 Message Date
TheKit
f13e1f4e3e Import F(x)tec Pro1-X BSP kernel changes as of 2022-06-01 2022-06-13 23:51:22 +03:00
TheKit
dcc5a3eab7 techpack: audio: import Pro1-X changes 2022-03-20 20:45:59 +02:00
TheKit
1d86f7ae7b Import Pro1-X kernel source code 2022-03-20 00:13:44 +01:00
Danny Lin
24fc95ac23
drm/msm/sde: Cache register values when performing clock control.
Remote register I/O amounts to a measurably significant portion of CPU
time due to how frequently this function is used. Cache the value of
each register on-demand and use this value in future invocations to
mitigate the expensive I/O.

Co-authored-by: Sultan Alsawaf <sultan@kerneltoast.com>
[@0ctobot: Adapted for msm-4.19]

Change-Id: I6846ee58c476a125076d0c3ad351f9e15eba180a
2021-09-15 09:27:36 +02:00
Gagan Malvi
5264660de5
msm: vidc: Disable debugfs not created logspam.
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-08-26 15:09:06 +02:00
Danny Lin
5209588e2f
techpack: audio: Remove build timestamps
These are causing parts of techpack/audio to get rebuilt on every build
for no reason.

Signed-off-by: Danny Lin <danny@kdrag0n.dev>
2021-08-23 17:41:46 +02:00
Danny Lin
0c187c0649
disp: msm: Disable unused and debug config options
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
2021-08-23 17:41:46 +02:00
Gagan Malvi
cea51b0605
techpack: audio: fix printing APIs.
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-08-23 17:41:45 +02:00
Carlos Ayrton Lopez Arroyo
a6812bc397
techpack: display: silence logging and debug
Signed-off-by: Carlos Ayrton Lopez Arroyo <15030201@itcelaya.edu.mx>
2021-08-23 17:41:31 +02:00
spakkkk
6ea03ed65e
techpack: video: remove log spam
Signed-off-by: Carlos Ayrton Lopez Arroyo <15030201@itcelaya.edu.mx>
2021-08-23 17:41:31 +02:00
Sultan Alsawaf
4b2b333bbb
msm: camera: Stub out the camera_debug_util API and compile it out
A measurably significant amount of CPU time is spent in these routines
while the camera is open. These are also responsible for a grotesque
amount of dmesg spam, so let's nuke them.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Change-Id: I1711e1e815e7c5abebdf888b752823bded926ebd
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
2021-08-21 17:15:45 +02:00
starlight5234
1486a406cb
techpack: display: Import xiaomi changes
The Patch based on QualComm release TAG:LA.UM.8.15.r1-06600-KAMORTA.0

Change-Id: I1f98410528de75bb7c87b12ae7666769945e9ad9
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
2021-08-21 16:10:47 +02:00
Adam W. Willis
148498b964
treewide: Fix pointer-to-(int|enum)-cast warnings detected by Clang.
This silences the following compilation warnings:

../techpack/video/msm/vidc/hfi_iris2.c:170:3: warning: cast to smaller integer type 'u32' (aka 'unsigned int') from 'u8 *' (aka 'unsigned char *') [-Wpointer-to-int-cast]
                (u32)device->iface_q_table.align_virtual_addr, sid);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../drivers/misc/qseecom.c:3723:28: warning: cast to smaller integer type 'uint32_t' (aka 'unsigned int') from 'void *' [-Wvoid-pointer-to-int-cast]
                        send_data_req.req_ptr = (uint32_t)req->cmd_req_buf;
                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/misc/qseecom.c:3724:28: warning: cast to smaller integer type 'uint32_t' (aka 'unsigned int') from 'void *' [-Wvoid-pointer-to-int-cast]
                        send_data_req.rsp_ptr = (uint32_t)req->resp_buf;
                                                ^~~~~~~~~~~~~~~~~~~~~~~

../drivers/perf/qcom_llcc_pmu.c:258:17: warning: cast to smaller integer type 'enum llcc_pmu_version' from 'const void *' [-Wvoid-pointer-to-enum-cast]
        llccpmu->ver = (enum llcc_pmu_version)
                       ^~~~~~~~~~~~~~~~~~~~~~~

../drivers/power/supply/qcom/qpnp-qg.c:5110:21: warning: cast to smaller integer type 'u8' (aka 'unsigned char') from 'const void *' [-Wvoid-pointer-to-int-cast]
        chip->qg_version = (u8)of_device_get_match_data(&pdev->dev);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../drivers/platform/msm/ipa/ipa_v3/ipa_debugfs.c:821:24: warning: cast to smaller integer type 'enum ipa_ip_type' from 'void *' [-Wvoid-pointer-to-enum-cast]
        enum ipa_ip_type ip = (enum ipa_ip_type)file->private_data;
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../drivers/platform/msm/ipa/ipa_v3/ipa_debugfs.c:918:24: warning: cast to smaller integer type 'enum ipa_ip_type' from 'void *' [-Wvoid-pointer-to-enum-cast]
        enum ipa_ip_type ip = (enum ipa_ip_type)file->private_data;
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../drivers/platform/msm/ipa/ipa_v3/ipa_debugfs.c:1086:24: warning: cast to smaller integer type 'enum ipa_ip_type' from 'void *' [-Wvoid-pointer-to-enum-cast]
        enum ipa_ip_type ip = (enum ipa_ip_type)file->private_data;
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../drivers/platform/msm/ipa/ipa_v3/ipa_debugfs.c:1157:24: warning: cast to smaller integer type 'enum ipa_ip_type' from 'void *' [-Wvoid-pointer-to-enum-cast]
        enum ipa_ip_type ip = (enum ipa_ip_type)file->private_data;
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_hw_stats.c:228:12: warning: cast to smaller integer type 'int' from 'void *' [-Wvoid-pointer-to-int-cast]
        int num = (int)(params);
                  ^~~~~~~~~~~~~

../drivers/staging/qcacld-3.0/core/sap/src/sap_fsm.c:1552:26: warning: cast to smaller integer type 'eSapStatus' from 'void *' [-Wvoid-pointer-to-enum-cast]
                bss_complete->status = (eSapStatus) context;
                                       ^~~~~~~~~~~~~~~~~~~~

../drivers/staging/qcacld-3.0/core/sap/src/sap_fsm.c:1571:4: warning: cast to smaller integer type 'eSapStatus' from 'void *' [-Wvoid-pointer-to-enum-cast]
                        (eSapStatus) context;
                        ^~~~~~~~~~~~~~~~~~~~

../drivers/staging/qcacld-3.0/core/sap/src/sap_fsm.c:1575:4: warning: cast to smaller integer type 'eSapStatus' from 'void *' [-Wvoid-pointer-to-enum-cast]
                        (eSapStatus)context);
                        ^~~~~~~~~~~~~~~~~~~

../drivers/staging/qcacld-3.0/core/sap/src/sap_fsm.c:1580:30: warning: cast to smaller integer type 'eSapStatus' from 'void *' [-Wvoid-pointer-to-enum-cast]
                if (eSAP_STATUS_SUCCESS == (eSapStatus)context) {
                                           ^~~~~~~~~~~~~~~~~~~

../drivers/staging/qcacld-3.0/core/sap/src/sap_fsm.c:1588:37: warning: cast to smaller integer type 'eSapStatus' from 'void *' [-Wvoid-pointer-to-enum-cast]
                } else if (eSAP_STATUS_FAILURE == (eSapStatus)context) {
                                                  ^~~~~~~~~~~~~~~~~~~

../drivers/staging/qcacld-3.0/core/sap/src/sap_fsm.c:1596:4: warning: cast to smaller integer type 'eSapStatus' from 'void *' [-Wvoid-pointer-to-enum-cast]
                        (eSapStatus) context;
                        ^~~~~~~~~~~~~~~~~~~~

../drivers/staging/qcacld-3.0/core/sap/src/sap_fsm.c:1671:30: warning: cast to smaller integer type 'eSapStatus' from 'void *' [-Wvoid-pointer-to-enum-cast]
                reassoc_complete->status = (eSapStatus) context;
                                           ^~~~~~~~~~~~~~~~~~~~

../drivers/staging/qcacld-3.0/core/sap/src/sap_fsm.c:1715:27: warning: cast to smaller integer type 'eSapStatus' from 'void *' [-Wvoid-pointer-to-enum-cast]
                disassoc_comp->status = (eSapStatus) context;
                                        ^~~~~~~~~~~~~~~~~~~~

../drivers/staging/qcacld-3.0/core/sap/src/sap_fsm.c:1733:26: warning: cast to smaller integer type 'eSapStatus' from 'void *' [-Wvoid-pointer-to-enum-cast]
                key_complete->status = (eSapStatus) context;
                                       ^~~~~~~~~~~~~~~~~~~~

../drivers/staging/qcacld-3.0/core/sap/src/sap_fsm.c:1783:4: warning: cast to smaller integer type 'eSapStatus' from 'void *' [-Wvoid-pointer-to-enum-cast]
                        (eSapStatus) context;
                        ^~~~~~~~~~~~~~~~~~~~

../drivers/staging/qcacld-3.0/core/sap/src/sap_fsm.c:1789:4: warning: cast to smaller integer type 'eSapStatus' from 'void *' [-Wvoid-pointer-to-enum-cast]
                        (eSapStatus) context;
                        ^~~~~~~~~~~~~~~~~~~~

../drivers/staging/qcacld-3.0/../qca-wifi-host-cmn/hif/src/hif_napi.c:590:15: warning: cast to smaller integer type 'enum qca_napi_tput_state' from 'void *' [-Wvoid-pointer-to-enum-cast]
                tput_mode = (enum qca_napi_tput_state)data;
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../drivers/staging/qcacld-3.0/../qca-wifi-host-cmn/hif/src/hif_irq_affinity.c:148:15: warning: cast to smaller integer type 'enum qca_napi_tput_state' from 'void *' [-Wvoid-pointer-to-enum-cast]
                tput_mode = (enum qca_napi_tput_state)data;
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
Change-Id: Ia45d207fafee2c449aa4da2d941549c12b10a08d
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
2021-08-21 16:10:42 +02:00
Demon000
a0c345114f
techpack: camera: Fix memory leak.
* CAF never deattaches the DMA buffer, creating a memory leak
   every time this function is run. This issue becomes increasingly
   problematic as it's run a metric ton every time camera is open,
   which on Coral is pretty much every time you unlock the phone
   and often while you run it too. Fix it by unmaping and detaching
   the dma buffer.

Reported-by: celtare21 <celtare21@gmail.com>
Change-Id: Id21b7d8c77b24ad3c198f46a68f1408c5bd9f104
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
2021-08-21 16:09:13 +02:00
Carlos Jimenez (JavaShin-X)
23e50e4f8e
techpack: camera: Partial revert of CAF changes
Signed-off-by: Carlos Jimenez (JavaShin-X) <javashin1986@gmail.com>
Change-Id: Ieff764e5f3200b19276286941b27b2b0b9af4a6f
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
2021-08-21 16:09:12 +02:00
Carlos Jimenez (JavaShin-X)
08eb1f0286
techpack: camera : fix build after ALS merge
error return type defaults to 'int'

Signed-off-by: Carlos Jimenez(JavaShin-X)<javashin1986@gmail.com>
Change-Id: I134153e945af4d70ab679af062a35e2b6e0f75ea
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
2021-08-21 16:09:12 +02:00
wenchangliu
01d655f43a
techpack: video: msm: vidc: disable decode batching feature
This feature implemented for power optimization
with OMX but not well compliant with Codec 2.0.
Disable it to unblock VT frame drop issue.

Bug: 149071324
Test: VT frame rate test
Change-Id: I187958f4da10d5936c0f0fbd5060301e55ac7f29
Signed-off-by: Wen Chang Liu <wenchangliu@google.com>
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
2021-08-21 16:09:12 +02:00
Gagan Malvi
4c2ee87517
techpack/audio: bengal: Export everything
* Ref - kona config

Signed-off-by: Gagan Malvi <gagan.malvi2020@vitstudent.ac.in>
Change-Id: I5cfcc32907416f8a3eedb4e93f9692f3f385e67f
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
2021-08-21 16:07:45 +02:00
Thierry Strudel
51ec5ec34a
techpack: audio: makefile: do not export all the variables
This patch fixes an issue with all the functions defined in
scripts/Makefile.lib gets called everytime when this makefile is
included thus causing the build to slow down.

Bug: 118818737
Change-Id: I4929e64d53a0bc865b12a27cce37520be52c9744
Signed-off-by: Thierry Strudel <tstrudel@google.com>
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
2021-08-21 16:07:45 +02:00
Danny Lin
3fa5755893
techpack: audio: Remove redundant -Werror flags
We already have CONFIG_CC_WERROR to enable -Werror globally when we want
it.

Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: KenHV <yo@kenharris.xyz>
Change-Id: I00c42b42a750dd35181a718c248d2aab7dcab1aa
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
2021-08-21 16:07:45 +02:00
starlight5234
1b60b4e4cc
techpack: audio: Add support to load bengal configs
Change-Id: I1aab5aa94b0fe9a7f37c7b6203079f6dfdfd7e73
Co-authored-by: Gagan Malvi <malvi@aospa.co>
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
2021-08-21 16:07:45 +02:00
LuK1337
d779107fa3
techpack: audio: Make all bengal drivers built in
Change-Id: I6e63a2de8caae25f298aa868d2b8b4367603bb23
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
2021-08-21 16:07:45 +02:00
starlight5234
021c3e3d36
techpack: audio: Import xiaomi changes
Change-Id: If0cd345edad6ab64a1f17a066799dc16c9d62866
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
2021-08-21 16:07:45 +02:00
Peter Cai
ef4e46737e
techpack: audio: Correct symlinks
* These symlinks were meant for the out-of-tree module. Now that we
  build them in-tree, we need to correct them.

Change-Id: If2f506138c7e08123a90e0f897f0e899bb47ef0c
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
2021-08-21 16:06:51 +02:00
LuK1337
dfd881eea6
techpack: audio: Remove Android.{bp,mk}
Change-Id: I1be611880076565d17720c59ca019d5d1ab6d743
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
2021-08-21 16:06:50 +02:00
Gagan Malvi
99dc9c8989
techpack: Remove gitignore
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-08-21 16:06:17 +02:00
Gagan Malvi
5ffd0e9453
techpack/display: Initial merge from LA.UM.9.15.r1-02000-KAMORTA.0
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-08-21 15:53:53 +02:00
Gagan Malvi
e3efb96bee
techpack/video: Initial merge from LA.UM.9.15.r1-02000-KAMORTA.0
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-08-21 15:52:27 +02:00
Gagan Malvi
6808bddb1d
techpack/camera: Initial merge from LA.UM.9.15.r1-02000-KAMORTA.0
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-08-21 15:51:03 +02:00
Gagan Malvi
9534e31128
techpack/audio: Initial merge from LA.UM.9.15.r1-02000-KAMORTA.0
Signed-off-by: Gagan Malvi <malvigagan@gmail.com>
2021-08-21 15:49:40 +02:00
Adam Bickett
27009ef53b Revert "techpack: replace type with xtype while searching for sub-dirs"
Support build environments where find -xtype is not supported.

This reverts commit 5081f16b3d.

Change-Id: Ibb4a9f2429bad5e0bae690f60605887f01623a16
Signed-off-by: Adam Bickett <abickett@codeaurora.org>
2019-11-19 07:06:17 -08:00
Prakruthi Deepak Heragu
776ec744ee techpack: Kbuild: Fix to compile the techpack completely
Due to path being inaccurate, the techpack folder was not being
compiled completely. Using techpack fixes this issue.

Change-Id: Id06927e5b4bfad0d5c8208b199d9d217abbf6306
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
Signed-off-by: Adam Bickett <abickett@codeaurora.org>
2019-11-18 18:26:04 -08:00
Satya Durga Srinivasu Prabhala
5081f16b3d techpack: replace type with xtype while searching for sub-dirs
To make sure sym links (if any) gets detected during search,
switch to xtype.

Change-Id: Idc0584b134f2ca4b395e53696e079337ff377f82
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2019-07-09 17:43:13 -07:00
Bryan Huntsman
8082260ee5 techpack: set configuration default to yes
Tech packages default configuration should be on.

Change-Id: I3cdf9276103f08db7130535aab1206a95a03b5a7
Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2019-06-04 10:59:26 -07:00
Bryan Huntsman
917caa9433 techpack: add tech package support
Enable tech packages to have kernel drivers that are physically
located in the kernel source tree but not present in the kernel
repository. This is done via a manifest line item to fetch a
techpackage-module into $KERNEL/techpack/$techpackage-module.
$KERNEL/techpack/Kbuild will automatically detect any
subdirectories and link them to the kernel's kbuild system.

The resulting layout of techpack within kernel source would be as
follows :-

    kernel/
    ├── techpack/
        ├── Kbuild
        └── stub
        │    ├── Makefile
        │    ├── include
        │    │   └── uapi
        │    │       └── Kbuild
             └── stub.c
        ├── techpackage-module
            ├── Makefile
            ├── include
            │   └── uapi
            │       ├── Kbuild

$KERNEL/techpack only contains Kbuild (no Makefile) at the
toplevel and this Kbuild takes care of both compiling the
subdirectories and of exporting the needed header files therein.
The reason for having only Kbuild at the top is that Kbuild
and Makefile cannot exist together in same directory and Makefile
doesn't cater to uapi header installation.

stub is an empty techpackage-module which serves both as a sample
layout and satisfies the requirement of kernel build system, by
providing necessary buit-in.o, when no other techpackage-module has
been pulled under techpack/.

$KERNEL/techpack/techpackage-module should have a Makefile at the
top and Kbuild under $KERNEL/techpack/techpackage-module/include/uapi
directory. The uapi headers pertaining to a techpackage-module
should reside under $KERNEL/techpack/techpackage-module/include/uapi
and associated Kbuild should have necessary rules to export it.

Change-Id: I0d0ced38566907d2074831edde0934833f666eff
Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
Signed-off-by: Imran Khan <kimran@codeaurora.org>
[satyap@codeaurora.org: fix trivial merge conflict and add SPDX-License-Identifier]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2019-03-21 10:18:12 -07:00