Commit d5ffd30b authored by Abhinav Kumar's avatar Abhinav Kumar Committed by Dmitry Baryshkov

drm/msm/dpu: re-introduce dpu core revision to the catalog

Introduce the dpu core revision back as an entry to the catalog so that
we can just use dpu revision checks and enable those bits which
should be enabled unconditionally and not controlled by a catalog
and also simplify the changes to do something like:

if (dpu_core_revision > xxxxx && dpu_core_revision < xxxxx)
   enable the bit;

changes in v5:
	- fix the commit text to remove instances of DPU_HW_VER
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: default avatarAbhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/546801/
Link: https://lore.kernel.org/r/20230712012003.2212-2-quic_abhinavk@quicinc.comSigned-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
parent b173a7dc
......@@ -315,7 +315,13 @@ static const struct dpu_perf_cfg msm8998_perf_data = {
.bw_inefficiency_factor = 120,
};
static const struct dpu_mdss_version msm8998_mdss_ver = {
.core_major_ver = 3,
.core_minor_ver = 0,
};
const struct dpu_mdss_cfg dpu_msm8998_cfg = {
.mdss_ver = &msm8998_mdss_ver,
.caps = &msm8998_dpu_caps,
.ubwc = &msm8998_ubwc_cfg,
.mdp = &msm8998_mdp,
......
......@@ -332,7 +332,13 @@ static const struct dpu_perf_cfg sdm845_perf_data = {
.bw_inefficiency_factor = 120,
};
static const struct dpu_mdss_version sdm845_mdss_ver = {
.core_major_ver = 4,
.core_minor_ver = 0,
};
const struct dpu_mdss_cfg dpu_sdm845_cfg = {
.mdss_ver = &sdm845_mdss_ver,
.caps = &sdm845_dpu_caps,
.ubwc = &sdm845_ubwc_cfg,
.mdp = &sdm845_mdp,
......
......@@ -375,7 +375,13 @@ static const struct dpu_perf_cfg sm8150_perf_data = {
.bw_inefficiency_factor = 120,
};
static const struct dpu_mdss_version sm8150_mdss_ver = {
.core_major_ver = 5,
.core_minor_ver = 0,
};
const struct dpu_mdss_cfg dpu_sm8150_cfg = {
.mdss_ver = &sm8150_mdss_ver,
.caps = &sm8150_dpu_caps,
.ubwc = &sm8150_ubwc_cfg,
.mdp = &sm8150_mdp,
......
......@@ -402,7 +402,13 @@ static const struct dpu_perf_cfg sc8180x_perf_data = {
.bw_inefficiency_factor = 120,
};
static const struct dpu_mdss_version sc8180x_mdss_ver = {
.core_major_ver = 5,
.core_minor_ver = 1,
};
const struct dpu_mdss_cfg dpu_sc8180x_cfg = {
.mdss_ver = &sc8180x_mdss_ver,
.caps = &sc8180x_dpu_caps,
.ubwc = &sc8180x_ubwc_cfg,
.mdp = &sc8180x_mdp,
......
......@@ -390,7 +390,13 @@ static const struct dpu_perf_cfg sm8250_perf_data = {
.bw_inefficiency_factor = 120,
};
static const struct dpu_mdss_version sm8250_mdss_ver = {
.core_major_ver = 6,
.core_minor_ver = 0,
};
const struct dpu_mdss_cfg dpu_sm8250_cfg = {
.mdss_ver = &sm8250_mdss_ver,
.caps = &sm8250_dpu_caps,
.ubwc = &sm8250_ubwc_cfg,
.mdp = &sm8250_mdp,
......
......@@ -204,7 +204,13 @@ static const struct dpu_perf_cfg sc7180_perf_data = {
.bw_inefficiency_factor = 120,
};
static const struct dpu_mdss_version sc7180_mdss_ver = {
.core_major_ver = 6,
.core_minor_ver = 2,
};
const struct dpu_mdss_cfg dpu_sc7180_cfg = {
.mdss_ver = &sc7180_mdss_ver,
.caps = &sc7180_dpu_caps,
.ubwc = &sc7180_ubwc_cfg,
.mdp = &sc7180_mdp,
......
......@@ -136,7 +136,13 @@ static const struct dpu_perf_cfg sm6115_perf_data = {
.bw_inefficiency_factor = 120,
};
static const struct dpu_mdss_version sm6115_mdss_ver = {
.core_major_ver = 6,
.core_minor_ver = 3,
};
const struct dpu_mdss_cfg dpu_sm6115_cfg = {
.mdss_ver = &sm6115_mdss_ver,
.caps = &sm6115_dpu_caps,
.ubwc = &sm6115_ubwc_cfg,
.mdp = &sm6115_mdp,
......
......@@ -207,7 +207,13 @@ static const struct dpu_perf_cfg sm6350_perf_data = {
.bw_inefficiency_factor = 120,
};
static const struct dpu_mdss_version sm6350_mdss_ver = {
.core_major_ver = 6,
.core_minor_ver = 4,
};
const struct dpu_mdss_cfg dpu_sm6350_cfg = {
.mdss_ver = &sm6350_mdss_ver,
.caps = &sm6350_dpu_caps,
.ubwc = &sm6350_ubwc_cfg,
.mdp = &sm6350_mdp,
......
......@@ -126,7 +126,13 @@ static const struct dpu_perf_cfg qcm2290_perf_data = {
.bw_inefficiency_factor = 120,
};
static const struct dpu_mdss_version qcm2290_mdss_ver = {
.core_major_ver = 6,
.core_minor_ver = 5,
};
const struct dpu_mdss_cfg dpu_qcm2290_cfg = {
.mdss_ver = &qcm2290_mdss_ver,
.caps = &qcm2290_dpu_caps,
.ubwc = &qcm2290_ubwc_cfg,
.mdp = &qcm2290_mdp,
......
......@@ -146,7 +146,13 @@ static const struct dpu_perf_cfg sm6375_perf_data = {
.bw_inefficiency_factor = 120,
};
static const struct dpu_mdss_version sm6375_mdss_ver = {
.core_major_ver = 6,
.core_minor_ver = 9,
};
const struct dpu_mdss_cfg dpu_sm6375_cfg = {
.mdss_ver = &sm6375_mdss_ver,
.caps = &sm6375_dpu_caps,
.ubwc = &sm6375_ubwc_cfg,
.mdp = &sm6375_mdp,
......
......@@ -383,7 +383,13 @@ static const struct dpu_perf_cfg sm8350_perf_data = {
.bw_inefficiency_factor = 120,
};
static const struct dpu_mdss_version sm8350_mdss_ver = {
.core_major_ver = 7,
.core_minor_ver = 0,
};
const struct dpu_mdss_cfg dpu_sm8350_cfg = {
.mdss_ver = &sm8350_mdss_ver,
.caps = &sm8350_dpu_caps,
.ubwc = &sm8350_ubwc_cfg,
.mdp = &sm8350_mdp,
......
......@@ -252,7 +252,13 @@ static const struct dpu_perf_cfg sc7280_perf_data = {
.bw_inefficiency_factor = 120,
};
static const struct dpu_mdss_version sc7280_mdss_ver = {
.core_major_ver = 7,
.core_minor_ver = 2,
};
const struct dpu_mdss_cfg dpu_sc7280_cfg = {
.mdss_ver = &sc7280_mdss_ver,
.caps = &sc7280_dpu_caps,
.ubwc = &sc7280_ubwc_cfg,
.mdp = &sc7280_mdp,
......
......@@ -445,7 +445,13 @@ static const struct dpu_perf_cfg sc8280xp_perf_data = {
.bw_inefficiency_factor = 120,
};
static const struct dpu_mdss_version sc8280xp_mdss_ver = {
.core_major_ver = 8,
.core_minor_ver = 0,
};
const struct dpu_mdss_cfg dpu_sc8280xp_cfg = {
.mdss_ver = &sc8280xp_mdss_ver,
.caps = &sc8280xp_dpu_caps,
.ubwc = &sc8280xp_ubwc_cfg,
.mdp = &sc8280xp_mdp,
......
......@@ -406,7 +406,13 @@ static const struct dpu_perf_cfg sm8450_perf_data = {
.bw_inefficiency_factor = 120,
};
static const struct dpu_mdss_version sm8450_mdss_ver = {
.core_major_ver = 8,
.core_minor_ver = 1,
};
const struct dpu_mdss_cfg dpu_sm8450_cfg = {
.mdss_ver = &sm8450_mdss_ver,
.caps = &sm8450_dpu_caps,
.ubwc = &sm8450_ubwc_cfg,
.mdp = &sm8450_mdp,
......
......@@ -420,7 +420,13 @@ static const struct dpu_perf_cfg sm8550_perf_data = {
.bw_inefficiency_factor = 120,
};
static const struct dpu_mdss_version sm8550_mdss_ver = {
.core_major_ver = 9,
.core_minor_ver = 0,
};
const struct dpu_mdss_cfg dpu_sm8550_cfg = {
.mdss_ver = &sm8550_mdss_ver,
.caps = &sm8550_dpu_caps,
.ubwc = &sm8550_ubwc_cfg,
.mdp = &sm8550_mdp,
......
......@@ -746,6 +746,16 @@ struct dpu_perf_cdp_cfg {
bool wr_enable;
};
/**
* struct dpu_mdss_version - DPU's major and minor versions
* @core_major_ver: DPU core's major version
* @core_minor_ver: DPU core's minor version
*/
struct dpu_mdss_version {
u8 core_major_ver;
u8 core_minor_ver;
};
/**
* struct dpu_perf_cfg - performance control settings
* @max_bw_low low threshold of maximum bandwidth (kbps)
......@@ -796,8 +806,9 @@ struct dpu_perf_cfg {
/**
* struct dpu_mdss_cfg - information of MDSS HW
* This is the main catalog data structure representing
* this HW version. Contains number of instances,
* register offsets, capabilities of the all MDSS HW sub-blocks.
* this HW version. Contains dpu's major and minor versions,
* number of instances, register offsets, capabilities of the
* all MDSS HW sub-blocks.
*
* @dma_formats Supported formats for dma pipe
* @cursor_formats Supported formats for cursor pipe
......@@ -805,6 +816,8 @@ struct dpu_perf_cfg {
* @mdss_irqs: Bitmap with the irqs supported by the target
*/
struct dpu_mdss_cfg {
const struct dpu_mdss_version *mdss_ver;
const struct dpu_caps *caps;
const struct dpu_ubwc_cfg *ubwc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment