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

Commit e5820830 authored by Shubhashree Dhar's avatar Shubhashree Dhar
Browse files

drm/msm/sde: Add rev checks for trinket target



Add required revision checks for trinket target
in drm driver.

Change-Id: Ibd4f1dcfd358f8d711812a75d40758bf889701b8
Signed-off-by: default avatarShubhashree Dhar <dhar@codeaurora.org>
parent bb8d2ec5
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2019, 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 and
@@ -3523,7 +3523,8 @@ static int sde_hardware_format_caps(struct sde_mdss_cfg *sde_cfg,
		sde_cfg->has_hdr = true;

	/* Disable HDR for SM6150 target only */
	if (IS_SDE_MAJOR_MINOR_SAME((hw_rev), SDE_HW_VER_530))
	if (IS_SDE_MAJOR_MINOR_SAME((hw_rev), SDE_HW_VER_530)
			|| IS_SDE_MAJOR_MINOR_SAME((hw_rev), SDE_HW_VER_540))
		sde_cfg->has_hdr = false;

	index = sde_copy_formats(sde_cfg->dma_formats, dma_list_size,
@@ -3641,6 +3642,17 @@ static int _sde_hardware_pre_caps(struct sde_mdss_cfg *sde_cfg, uint32_t hw_rev)
		sde_cfg->sui_misr_supported = true;
		sde_cfg->sui_block_xin_mask = 0xE71;
		sde_cfg->has_3d_merge_reset = true;
	} else if (IS_SDMTRINKET_TARGET(hw_rev)) {
		sde_cfg->has_cwb_support = true;
		sde_cfg->has_qsync = true;
		sde_cfg->perf.min_prefill_lines = 24;
		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 = 0xC61;
	} else {
		SDE_ERROR("unsupported chipset id:%X\n", hw_rev);
		sde_cfg->perf.min_prefill_lines = 0xffff;
@@ -3660,7 +3672,7 @@ static int _sde_hardware_post_caps(struct sde_mdss_cfg *sde_cfg,
		return -EINVAL;

	if (IS_SM8150_TARGET(hw_rev) || IS_SM6150_TARGET(hw_rev) ||
			IS_SDMMAGPIE_TARGET(hw_rev)) {
		IS_SDMMAGPIE_TARGET(hw_rev) || IS_SDMTRINKET_TARGET(hw_rev)) {
		sde_cfg->sui_supported_blendstage =
			sde_cfg->max_mixer_blendstages - SDE_STAGE_0;

+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2019, 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 and
@@ -55,6 +55,7 @@
#define SDE_HW_VER_510	SDE_HW_VER(5, 1, 0) /* sdmshrike v1.0 */
#define SDE_HW_VER_520	SDE_HW_VER(5, 2, 0) /* sdmmagpie v1.0 */
#define SDE_HW_VER_530	SDE_HW_VER(5, 3, 0) /* sm6150 v1.0 */
#define SDE_HW_VER_540	SDE_HW_VER(5, 4, 0) /* sdmtrinket v1.0 */

#define IS_MSM8996_TARGET(rev) IS_SDE_MAJOR_MINOR_SAME((rev), SDE_HW_VER_170)
#define IS_MSM8998_TARGET(rev) IS_SDE_MAJOR_MINOR_SAME((rev), SDE_HW_VER_300)
@@ -64,6 +65,7 @@
#define IS_SDMSHRIKE_TARGET(rev) IS_SDE_MAJOR_MINOR_SAME((rev), SDE_HW_VER_510)
#define IS_SDMMAGPIE_TARGET(rev) IS_SDE_MAJOR_MINOR_SAME((rev), SDE_HW_VER_520)
#define IS_SM6150_TARGET(rev) IS_SDE_MAJOR_MINOR_SAME((rev), SDE_HW_VER_530)
#define IS_SDMTRINKET_TARGET(rev) IS_SDE_MAJOR_MINOR_SAME((rev), SDE_HW_VER_540)

#define SDE_HW_BLK_NAME_LEN	16

+3 −2
Original line number Diff line number Diff line
/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2019, 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 and
@@ -266,7 +266,8 @@ static void _setup_mixer_ops(struct sde_mdss_cfg *m,
			IS_SM8150_TARGET(m->hwversion) ||
			IS_SDMSHRIKE_TARGET(m->hwversion) ||
			IS_SM6150_TARGET(m->hwversion) ||
			IS_SDMMAGPIE_TARGET(m->hwversion))
			IS_SDMMAGPIE_TARGET(m->hwversion) ||
			IS_SDMTRINKET_TARGET(m->hwversion))
		ops->setup_blend_config = sde_hw_lm_setup_blend_config_sdm845;
	else
		ops->setup_blend_config = sde_hw_lm_setup_blend_config;
+3 −2
Original line number Diff line number Diff line
/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2019, 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 and
@@ -242,7 +242,8 @@ static void _setup_vbif_ops(const struct sde_mdss_cfg *m,
	if (test_bit(SDE_VBIF_QOS_REMAP, &cap))
		ops->set_qos_remap = sde_hw_set_qos_remap;
	if (IS_SM8150_TARGET(m->hwversion) || IS_SM6150_TARGET(m->hwversion) ||
			IS_SDMMAGPIE_TARGET(m->hwversion))
			IS_SDMMAGPIE_TARGET(m->hwversion) ||
			IS_SDMTRINKET_TARGET(m->hwversion))
		ops->set_mem_type = sde_hw_set_mem_type_v1;
	else
		ops->set_mem_type = sde_hw_set_mem_type;