Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ed594b7 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge 54b6925e on remote branch

Change-Id: I04179790416b464673f00c5488be0636d1422ecf
parents 0371bba7 54b6925e
Loading
Loading
Loading
Loading

Android.bp

0 → 100644
+36 −0
Original line number Diff line number Diff line
headers_src = [
    "include/uapi/*/**/*.h",
]

display_headers_out = [
    "display/drm/msm_drm_pp.h",
    "display/drm/sde_drm.h",
    "display/hdcp/msm_hdmi_hdcp_mgr.h",
    "display/media/mmm_color_fmt.h",
    "display/media/msm_sde_rotator.h",
]

display_kernel_headers_verbose = "--verbose "
genrule {
    name: "qti_generate_display_kernel_headers",
    tools: ["headers_install.sh"],
    tool_files: [
        "display_kernel_headers.py",
    ],
    srcs: headers_src,
    cmd: "python3 $(location display_kernel_headers.py) " +
          display_kernel_headers_verbose +
         "--header_arch arm64 " +
         "--gen_dir $(genDir) " +
         "--display_include_uapi $(locations include/uapi/*/**/*.h) " +
         "--headers_install $(location headers_install.sh)",
    out: display_headers_out,
}

cc_library_headers {
    name: "qti_display_kernel_headers",
    generated_headers: ["qti_generate_display_kernel_headers"],
    export_generated_headers: ["qti_generate_display_kernel_headers"],
    vendor: true,
    recovery_available: true
}
+85 −0
Original line number Diff line number Diff line
 # Copyright (c) 2020, The Linux Foundation. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License version 2 as published by
 # the Free Software Foundation.
 #
 # This program is distributed in the hope that it will be useful, but WITHOUT
 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 # more details.
 #
 # You should have received a copy of the GNU General Public License along with
 # this program.  If not, see <http://www.gnu.org/licenses/>.
import argparse
import filecmp
import os
import re
import subprocess
import sys

def run_headers_install(verbose, gen_dir, headers_install, prefix, h):
    if not h.startswith(prefix):
        print('error: expected prefix [%s] on header [%s]' % (prefix, h))
        return False

    out_h = os.path.join(gen_dir, h[len(prefix):])
    (out_h_dirname, out_h_basename) = os.path.split(out_h)
    cmd = [headers_install, h, out_h]

    if verbose:
        print('run_headers_install: cmd is %s' % cmd)

    result = subprocess.call(cmd)

    if result != 0:
        print('error: run_headers_install: cmd %s failed %d' % (cmd, result))
        return False
    return True

def gen_display_headers(verbose, gen_dir, headers_install, display_include_uapi):
    error_count = 0
    for h in display_include_uapi:
        display_uapi_include_prefix = os.path.join(h.split('/include/uapi')[0], 'include', 'uapi') + os.sep
        if not run_headers_install(
                verbose, gen_dir, headers_install,
                display_uapi_include_prefix, h): error_count += 1
    return error_count

def main():
    """Parse command line arguments and perform top level control."""
    parser = argparse.ArgumentParser(
            description=__doc__,
            formatter_class=argparse.RawDescriptionHelpFormatter)

    # Arguments that apply to every invocation of this script.
    parser.add_argument(
            '--verbose', action='store_true',
            help='Print output that describes the workings of this script.')
    parser.add_argument(
            '--header_arch', required=True,
            help='The arch for which to generate headers.')
    parser.add_argument(
            '--gen_dir', required=True,
            help='Where to place the generated files.')
    parser.add_argument(
            '--display_include_uapi', required=True, nargs='*',
            help='The list of techpack/*/include/uapi header files.')
    parser.add_argument(
            '--headers_install', required=True,
            help='The headers_install tool to process input headers.')

    args = parser.parse_args()

    if args.verbose:
        print('header_arch [%s]' % args.header_arch)
        print('gen_dir [%s]' % args.gen_dir)
        print('display_include_uapi [%s]' % args.display_include_uapi)
        print('headers_install [%s]' % args.headers_install)

    return gen_display_headers(args.verbose, args.gen_dir,
            args.headers_install, args.display_include_uapi)

if __name__ == '__main__':
    sys.exit(main())
+2 −1
Original line number Diff line number Diff line
@@ -1345,6 +1345,7 @@ static void sde_encoder_phys_cmd_disable(struct sde_encoder_phys *phys_enc)
		else if (phys_enc->hw_pp->ops.enable_tearcheck)
			phys_enc->hw_pp->ops.enable_tearcheck(phys_enc->hw_pp,
					false);
		if (sde_encoder_phys_cmd_is_master(phys_enc))
			sde_encoder_helper_phys_disable(phys_enc, NULL);
	}

+20 −0
Original line number Diff line number Diff line
@@ -4804,6 +4804,26 @@ static int _sde_hardware_pre_caps(struct sde_mdss_cfg *sde_cfg, uint32_t hw_rev)
		sde_cfg->mdss_hw_block_size = 0x158;
		sde_cfg->has_trusted_vm_support = true;
		sde_cfg->syscache_supported = true;
	} else if (IS_YUPIK_TARGET(hw_rev)) {
		sde_cfg->has_cwb_support = true;
		sde_cfg->has_qsync = true;
		sde_cfg->perf.min_prefill_lines = 40;
		sde_cfg->vbif_qos_nlvl = 8;
		sde_cfg->ts_prefill_rev = 2;
		sde_cfg->ctl_rev = SDE_CTL_CFG_VERSION_1_0_0;
		sde_cfg->delay_prg_fetch_start = true;
		sde_cfg->sui_ns_allowed = true;
		sde_cfg->sui_misr_supported = true;
		sde_cfg->sui_block_xin_mask = 0x261;
		sde_cfg->has_sui_blendstage = true;
		sde_cfg->has_3d_merge_reset = true;
		sde_cfg->has_vig_p010 = true;
		sde_cfg->true_inline_rot_rev = SDE_INLINE_ROT_VERSION_2_0_0;
		sde_cfg->uidle_cfg.uidle_rev = SDE_UIDLE_VERSION_1_0_1;
		sde_cfg->vbif_disable_inner_outer_shareable = true;
		sde_cfg->dither_luma_mode_support = true;
		sde_cfg->mdss_hw_block_size = 0x158;
		sde_cfg->has_trusted_vm_support = true;
	} else {
		SDE_ERROR("unsupported chipset id:%X\n", hw_rev);
		sde_cfg->perf.min_prefill_lines = 0xffff;
+2 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@
#define SDE_HW_VER_660	SDE_HW_VER(6, 6, 0) /* holi */
#define SDE_HW_VER_670	SDE_HW_VER(6, 7, 0) /* shima */
#define SDE_HW_VER_700	SDE_HW_VER(7, 0, 0) /* lahaina */
#define SDE_HW_VER_720	SDE_HW_VER(7, 2, 0) /* yupik */

/* Avoid using below IS_XXX macros outside catalog, use feature bit instead */
#define IS_SDE_MAJOR_SAME(rev1, rev2)   \
@@ -71,6 +72,7 @@
#define IS_HOLI_TARGET(rev) IS_SDE_MAJOR_MINOR_SAME((rev), SDE_HW_VER_660)
#define IS_SHIMA_TARGET(rev) IS_SDE_MAJOR_MINOR_SAME((rev), SDE_HW_VER_670)
#define IS_LAHAINA_TARGET(rev) IS_SDE_MAJOR_MINOR_SAME((rev), SDE_HW_VER_700)
#define IS_YUPIK_TARGET(rev) IS_SDE_MAJOR_MINOR_SAME((rev), SDE_HW_VER_720)

#define SDE_HW_BLK_NAME_LEN	16