disp: msm: sde: adds ipcc client dpu phys id for hwfence config
This change adds a device-tree configurable property to define the ipcc client id of the dpu used for registers access and configuration. Starting pineapple, this is the ipcc client physical id, distinct from the ipcc client virtual id. Change-Id: Icb59111c85c7132c0efd7b207eaa5417cca013eb Signed-off-by: Grace An <quic_gracan@quicinc.com>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
b3b8331cdb
commit
340a1c3099
@@ -225,6 +225,7 @@ enum sde_prop {
|
|||||||
TVM_INCLUDE_REG,
|
TVM_INCLUDE_REG,
|
||||||
IPCC_PROTOCOL_ID,
|
IPCC_PROTOCOL_ID,
|
||||||
SDE_EMULATED_ENV,
|
SDE_EMULATED_ENV,
|
||||||
|
IPCC_CLIENT_DPU_PHYS_ID,
|
||||||
SDE_PROP_MAX,
|
SDE_PROP_MAX,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -636,6 +637,7 @@ static struct sde_prop_type sde_prop[] = {
|
|||||||
{TVM_INCLUDE_REG, "qcom,tvm-include-reg", false, PROP_TYPE_U32_ARRAY},
|
{TVM_INCLUDE_REG, "qcom,tvm-include-reg", false, PROP_TYPE_U32_ARRAY},
|
||||||
{IPCC_PROTOCOL_ID, "qcom,sde-ipcc-protocol-id", false, PROP_TYPE_U32},
|
{IPCC_PROTOCOL_ID, "qcom,sde-ipcc-protocol-id", false, PROP_TYPE_U32},
|
||||||
{SDE_EMULATED_ENV, "qcom,sde-emulated-env", false, PROP_TYPE_BOOL},
|
{SDE_EMULATED_ENV, "qcom,sde-emulated-env", false, PROP_TYPE_BOOL},
|
||||||
|
{IPCC_CLIENT_DPU_PHYS_ID, "qcom,sde-ipcc-client-dpu-phys-id", false, PROP_TYPE_U32}
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct sde_prop_type sde_perf_prop[] = {
|
static struct sde_prop_type sde_perf_prop[] = {
|
||||||
@@ -4143,6 +4145,9 @@ static void _sde_top_parse_dt_helper(struct sde_mdss_cfg *cfg,
|
|||||||
PROP_VALUE_ACCESS(props->values, SMART_PANEL_ALIGN_MODE, 0);
|
PROP_VALUE_ACCESS(props->values, SMART_PANEL_ALIGN_MODE, 0);
|
||||||
|
|
||||||
cfg->ipcc_protocol_id = PROP_VALUE_ACCESS(props->values, IPCC_PROTOCOL_ID, 0);
|
cfg->ipcc_protocol_id = PROP_VALUE_ACCESS(props->values, IPCC_PROTOCOL_ID, 0);
|
||||||
|
cfg->ipcc_client_phys_id = PROP_VALUE_ACCESS(props->values, IPCC_CLIENT_DPU_PHYS_ID, 0);
|
||||||
|
if (!cfg->ipcc_protocol_id || !cfg->ipcc_client_phys_id)
|
||||||
|
cfg->hw_fence_rev = 0; /* disable hw fences*/
|
||||||
|
|
||||||
if (props->exists[SEC_SID_MASK]) {
|
if (props->exists[SEC_SID_MASK]) {
|
||||||
cfg->sec_sid_mask_count = props->counts[SEC_SID_MASK];
|
cfg->sec_sid_mask_count = props->counts[SEC_SID_MASK];
|
||||||
|
@@ -1930,6 +1930,7 @@ struct sde_perf_cfg {
|
|||||||
* @dnsc_blur_filters supported filters for downscale blur
|
* @dnsc_blur_filters supported filters for downscale blur
|
||||||
* @dnsc_blur_filter_count supported filter count for downscale blur
|
* @dnsc_blur_filter_count supported filter count for downscale blur
|
||||||
* @ipcc_protocol_id ipcc protocol id for the hw
|
* @ipcc_protocol_id ipcc protocol id for the hw
|
||||||
|
* @ipcc_client_phys_id dpu ipcc client id for the hw, physical client id if supported
|
||||||
*/
|
*/
|
||||||
struct sde_mdss_cfg {
|
struct sde_mdss_cfg {
|
||||||
/* Block Revisions */
|
/* Block Revisions */
|
||||||
@@ -2050,6 +2051,7 @@ struct sde_mdss_cfg {
|
|||||||
u32 dnsc_blur_filter_count;
|
u32 dnsc_blur_filter_count;
|
||||||
|
|
||||||
u32 ipcc_protocol_id;
|
u32 ipcc_protocol_id;
|
||||||
|
u32 ipcc_client_phys_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct sde_mdss_hw_cfg_handler {
|
struct sde_mdss_hw_cfg_handler {
|
||||||
|
@@ -648,7 +648,7 @@ static void sde_hw_input_hw_fence_status(struct sde_hw_mdp *mdp, u64 *s_val, u64
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void sde_hw_setup_hw_fences_config(struct sde_hw_mdp *mdp, u32 protocol_id,
|
static void sde_hw_setup_hw_fences_config(struct sde_hw_mdp *mdp, u32 protocol_id,
|
||||||
unsigned long ipcc_base_addr)
|
u32 client_phys_id, unsigned long ipcc_base_addr)
|
||||||
{
|
{
|
||||||
u32 val, offset;
|
u32 val, offset;
|
||||||
struct sde_hw_blk_reg_map c;
|
struct sde_hw_blk_reg_map c;
|
||||||
@@ -674,7 +674,7 @@ static void sde_hw_setup_hw_fences_config(struct sde_hw_mdp *mdp, u32 protocol_i
|
|||||||
/* configure the attribs for the isr read_reg op */
|
/* configure the attribs for the isr read_reg op */
|
||||||
offset = MDP_CTL_HW_FENCE_ID_OFFSET_m(MDP_CTL_HW_FENCE_IDm_ADDR, 0);
|
offset = MDP_CTL_HW_FENCE_ID_OFFSET_m(MDP_CTL_HW_FENCE_IDm_ADDR, 0);
|
||||||
val = HW_FENCE_IPCC_PROTOCOLp_CLIENTc_RECV_ID(ipcc_base_addr,
|
val = HW_FENCE_IPCC_PROTOCOLp_CLIENTc_RECV_ID(ipcc_base_addr,
|
||||||
protocol_id, HW_FENCE_IPCC_CLIENT_DPU);
|
protocol_id, client_phys_id);
|
||||||
SDE_REG_WRITE(&c, offset, val);
|
SDE_REG_WRITE(&c, offset, val);
|
||||||
|
|
||||||
offset = MDP_CTL_HW_FENCE_ID_OFFSET_m(MDP_CTL_HW_FENCE_IDm_ATTR, 0);
|
offset = MDP_CTL_HW_FENCE_ID_OFFSET_m(MDP_CTL_HW_FENCE_IDm_ATTR, 0);
|
||||||
@@ -713,7 +713,7 @@ static void sde_hw_setup_hw_fences_config(struct sde_hw_mdp *mdp, u32 protocol_i
|
|||||||
/* configure the attribs for the isr load_data op */
|
/* configure the attribs for the isr load_data op */
|
||||||
offset = MDP_CTL_HW_FENCE_ID_OFFSET_m(MDP_CTL_HW_FENCE_IDm_ADDR, 4);
|
offset = MDP_CTL_HW_FENCE_ID_OFFSET_m(MDP_CTL_HW_FENCE_IDm_ADDR, 4);
|
||||||
val = HW_FENCE_IPCC_PROTOCOLp_CLIENTc_SEND(ipcc_base_addr,
|
val = HW_FENCE_IPCC_PROTOCOLp_CLIENTc_SEND(ipcc_base_addr,
|
||||||
protocol_id, HW_FENCE_IPCC_CLIENT_DPU);
|
protocol_id, client_phys_id);
|
||||||
SDE_REG_WRITE(&c, offset, val);
|
SDE_REG_WRITE(&c, offset, val);
|
||||||
|
|
||||||
offset = MDP_CTL_HW_FENCE_ID_OFFSET_m(MDP_CTL_HW_FENCE_IDm_ATTR, 4);
|
offset = MDP_CTL_HW_FENCE_ID_OFFSET_m(MDP_CTL_HW_FENCE_IDm_ATTR, 4);
|
||||||
|
@@ -11,7 +11,6 @@
|
|||||||
#include "sde_hw_mdss.h"
|
#include "sde_hw_mdss.h"
|
||||||
#include "sde_hw_util.h"
|
#include "sde_hw_util.h"
|
||||||
|
|
||||||
#define HW_FENCE_IPCC_CLIENT_DPU 25
|
|
||||||
#define HW_FENCE_IPCC_PROTOCOLp_CLIENTc(ba, p, c) (ba + (0x40000*p) + (0x1000*c))
|
#define HW_FENCE_IPCC_PROTOCOLp_CLIENTc(ba, p, c) (ba + (0x40000*p) + (0x1000*c))
|
||||||
|
|
||||||
struct sde_hw_mdp;
|
struct sde_hw_mdp;
|
||||||
@@ -210,9 +209,10 @@ struct sde_hw_mdp_ops {
|
|||||||
* setup_hw_fences - configure hw fences top registers
|
* setup_hw_fences - configure hw fences top registers
|
||||||
* @mdp: mdp top context driver
|
* @mdp: mdp top context driver
|
||||||
* @protocol_id: ipcc protocol id
|
* @protocol_id: ipcc protocol id
|
||||||
|
* @client_phys_id: ipcc client id (physical id if supported)
|
||||||
* @ipcc_base_addr: base address for ipcc reg block
|
* @ipcc_base_addr: base address for ipcc reg block
|
||||||
*/
|
*/
|
||||||
void (*setup_hw_fences)(struct sde_hw_mdp *mdp, u32 protocol_id,
|
void (*setup_hw_fences)(struct sde_hw_mdp *mdp, u32 protocol_id, u32 client_phys_id,
|
||||||
unsigned long ipcc_base_addr);
|
unsigned long ipcc_base_addr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -4365,7 +4365,7 @@ static int _sde_kms_mmu_init(struct sde_kms *sde_kms)
|
|||||||
ret = _sde_kms_one2one_mem_map_ipcc_reg(sde_kms, resource_size(res),
|
ret = _sde_kms_one2one_mem_map_ipcc_reg(sde_kms, resource_size(res),
|
||||||
HW_FENCE_IPCC_PROTOCOLp_CLIENTc(res->start,
|
HW_FENCE_IPCC_PROTOCOLp_CLIENTc(res->start,
|
||||||
sde_kms->catalog->ipcc_protocol_id,
|
sde_kms->catalog->ipcc_protocol_id,
|
||||||
HW_FENCE_IPCC_CLIENT_DPU));
|
sde_kms->catalog->ipcc_client_phys_id));
|
||||||
/* if mapping fails disable hw-fences */
|
/* if mapping fails disable hw-fences */
|
||||||
if (ret)
|
if (ret)
|
||||||
sde_kms->catalog->hw_fence_rev = 0;
|
sde_kms->catalog->hw_fence_rev = 0;
|
||||||
@@ -4421,7 +4421,8 @@ static void sde_kms_init_hw_fences(struct sde_kms *sde_kms)
|
|||||||
|
|
||||||
if (sde_kms->hw_mdp->ops.setup_hw_fences)
|
if (sde_kms->hw_mdp->ops.setup_hw_fences)
|
||||||
sde_kms->hw_mdp->ops.setup_hw_fences(sde_kms->hw_mdp,
|
sde_kms->hw_mdp->ops.setup_hw_fences(sde_kms->hw_mdp,
|
||||||
sde_kms->catalog->ipcc_protocol_id, sde_kms->ipcc_base_addr);
|
sde_kms->catalog->ipcc_protocol_id, sde_kms->catalog->ipcc_client_phys_id,
|
||||||
|
sde_kms->ipcc_base_addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sde_kms_init_shared_hw(struct sde_kms *sde_kms)
|
static void sde_kms_init_shared_hw(struct sde_kms *sde_kms)
|
||||||
|
Reference in New Issue
Block a user