Initial SM8150 and SM8250 DPU bringup
cover Initial SM8150 and SM8250 DPU bringup
These patches bring up SM8150 and SM8250 with basic functionality.
Tested with displayport output (single mixer, video mode case).
I will send patches later to add support for merge3d and dual DSI configurations, and possibly also patches to fix command mode on these SoCs (note it is also currently broken for SC7180).
Jonathan Marek (8):
drm/msm/dpu: use right setup_blend_config for sm8150 and sm8250 drm/msm/dpu: update UBWC config for sm8150 and sm8250 drm/msm/dpu: move some sspp caps to dpu_caps drm/msm/dpu: don't use INTF_INPUT_CTRL feature on sdm845 drm/msm/dpu: set missing flush bits for INTF_2 and INTF_3 drm/msm/dpu: intf timing path for displayport drm/msm/dpu: add SM8150 to hw catalog
drm/msm/dpu: add SM8250 to hw catalog
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 6 - .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 287 +++++++++++++++++- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 48 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 20 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 29 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c | 5 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 2 + drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 16 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c | 18 -- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h | 7 - drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 75 ++--- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 6 +- 12 files changed, 363 insertions(+), 156 deletions(-)
Signature · 1 line
2.26.1
PATCH 1/8 drm/msm/dpu: use right setup_blend_config for sm8150 and sm8250
All DPU versions starting from 4.0 use the sdm845 version, so check for that instead of checking each version individually. This chooses the right function for sm8150 and sm8250.
--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c +2 -3
@@ -152,14 +152,13 @@ static void _setup_mixer_ops(const struct dpu_mdss_cfg *m, unsigned long features) { ops->setup_mixer_out = dpu_hw_lm_setup_out; -if (IS_SDM845_TARGET (m->hwversion) ||IS_SDM670_TARGET (m->hwversion) - ||IS_SC7180_TARGET (m->hwversion)) +if (m->hwversion >=DPU_HW_VER_400 ) ops->setup_blend_config = dpu_hw_lm_setup_blend_config_sdm845;else ops->setup_blend_config = dpu_hw_lm_setup_blend_config; ops->setup_alpha_out = dpu_hw_lm_setup_color3; ops->setup_border_color = dpu_hw_lm_setup_border_color; -}; +}static struct dpu_hw_blk_ops dpu_hw_ops;
Signature · 1 line
2.26.1
PATCH 2/8 drm/msm/dpu: update UBWC config for sm8150 and sm8250
In reply to Jonathan MarekUpdate the UBWC registers to the right values for sm8150 and sm8250.
This removes broken dpu_hw_reset_ubwc, which doesn't work because the "force blk offset to zero to access beginning of register region" hack is copied from downstream, where mapped region starts 0x1000 below what is used in the upstream driver.
Also simplifies the overly complicated change that was introduced in e4f9bbe9f8beab9a1ce4 to work around dpu_hw_reset_ubwc being broken.
--- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 6 -- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 8 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 16 +++- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c | 18 ----- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h | 7 -- drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 75 ++++++------------- 6 files changed, 42 insertions(+), 88 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +0 -6
@@ -1090,12 +1090,6 @@ static void _dpu_encoder_virt_enable_helper(struct drm_encoder *drm_enc)return ; } -if (dpu_enc->cur_master->hw_mdptop && - dpu_enc->cur_master->hw_mdptop->ops.reset_ubwc) - dpu_enc->cur_master->hw_mdptop->ops.reset_ubwc ( - dpu_enc->cur_master->hw_mdptop, - dpu_kms->catalog); -_dpu_encoder_update_vsync_source (dpu_enc, &dpu_enc->disp_info); }
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +4 -4
@@ -37,7 +37,9 @@#define DPU_HW_VER_400 DPU_HW_VER(4, 0, 0)/* sdm845 v1.0 */ #define DPU_HW_VER_401 DPU_HW_VER(4, 0, 1)/* sdm845 v2.0 */ #define DPU_HW_VER_410 DPU_HW_VER(4, 1, 0)/* sdm670 v1.0 */ -#define DPU_HW_VER_500 DPU_HW_VER(5, 0, 0)/* sdm855 v1.0 */ +#define DPU_HW_VER_500 DPU_HW_VER(5, 0, 0)/* sm8150 v1.0 */ +#define DPU_HW_VER_501 DPU_HW_VER(5, 0, 1)/* sm8150 v2.0 */ +#define DPU_HW_VER_600 DPU_HW_VER(6, 0, 0)/* sm8250 */ #define DPU_HW_VER_620 DPU_HW_VER(6, 2, 0)/* sc7180 v1.0 */
@@ -65,10 +67,9 @@ enum {DPU_HW_UBWC_VER_10 =0x100 ,DPU_HW_UBWC_VER_20 =0x200 ,DPU_HW_UBWC_VER_30 =0x300 , + DPU_HW_UBWC_VER_40 = 0x400, }; -#define IS_UBWC_20_SUPPORTED (rev) ((rev) >= DPU_HW_UBWC_VER_20) -/** * MDP TOP BLOCK features * @DPU_MDP_PANIC_PER_PIPE Panic configuration needs to be be done per pipe
@@ -426,7 +427,6 @@ struct dpu_clk_ctrl_reg {struct dpu_mdp_cfg {DPU_HW_BLK_INFO ;u32 highest_bank_bit; -u32 ubwc_static;u32 ubwc_swizzle;struct dpu_clk_ctrl_reg clk_ctrls[DPU_CLK_CTRL_MAX ]; };
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +15 -1
@@ -303,11 +303,25 @@ static void dpu_hw_sspp_setup_format(struct dpu_hw_pipe *ctx,DPU_REG_WRITE (c,SSPP_FETCH_CONFIG ,DPU_FETCH_CONFIG_RESET_VALUE | ctx->mdp->highest_bank_bit <<18 ); -if (IS_UBWC_20_SUPPORTED (ctx->catalog->caps->ubwc_version)) { +switch (ctx->catalog->caps->ubwc_version) { +case DPU_HW_UBWC_VER_10 : +/* TODO: UBWC v1 case */ +break ; +case DPU_HW_UBWC_VER_20 : fast_clear = fmt->alpha_enable ?BIT (31 ) :0 ;DPU_REG_WRITE (c,SSPP_UBWC_STATIC_CTRL , fast_clear | (ctx->mdp->ubwc_swizzle) | (ctx->mdp->highest_bank_bit <<4 )); +break ; +case DPU_HW_UBWC_VER_30 : +DPU_REG_WRITE (c,SSPP_UBWC_STATIC_CTRL , +BIT (30 ) | (ctx->mdp->ubwc_swizzle) | + (ctx->mdp->highest_bank_bit <<4 )); +break ; +case DPU_HW_UBWC_VER_40 : +DPU_REG_WRITE (c,SSPP_UBWC_STATIC_CTRL , +DPU_FORMAT_IS_YUV (fmt) ?0 :BIT (30 )); +break ; } }
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c +0 -18
@@ -8,7 +8,6 @@#include "dpu_kms.h" #define SSPP_SPARE 0x28 -#define UBWC_STATIC 0x144#define FLD_SPLIT_DISPLAY_CMD BIT(1)#define FLD_SMART_PANEL_FREE_RUN BIT(2)
@@ -249,22 +248,6 @@ static void dpu_hw_get_safe_status(struct dpu_hw_mdp *mdp, status->sspp[SSPP_CURSOR1 ] = (value >>26 ) &0x1 ; } -static void dpu_hw_reset_ubwc (struct dpu_hw_mdp *mdp,struct dpu_mdss_cfg *m) -{ -struct dpu_hw_blk_reg_map c; - -if (!mdp || !m) -return ; - -if (!IS_UBWC_20_SUPPORTED (m->caps->ubwc_version)) -return ; - -/* force blk offset to zero to access beginning of register region */ - c = mdp->hw; - c.blk_off =0x0 ; -DPU_REG_WRITE (&c,UBWC_STATIC , m->mdp[0 ].ubwc_static); -} -static void dpu_hw_intf_audio_select (struct dpu_hw_mdp *mdp) {struct dpu_hw_blk_reg_map *c;
@@ -285,7 +268,6 @@ static void _setup_mdp_ops(struct dpu_hw_mdp_ops *ops, ops->get_danger_status = dpu_hw_get_danger_status; ops->setup_vsync_source = dpu_hw_setup_vsync_source; ops->get_safe_status = dpu_hw_get_safe_status; - ops->reset_ubwc = dpu_hw_reset_ubwc; ops->intf_audio_select = dpu_hw_intf_audio_select; }
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h +0 -7
@@ -126,13 +126,6 @@ struct dpu_hw_mdp_ops {void (*get_safe_status)(struct dpu_hw_mdp *mdp,struct dpu_danger_safe_status *status); -/** -* reset_ubwc - reset top level UBWC configuration -* @mdp: mdp top context driver -* @m: pointer to mdss catalog data -*/ -void (*reset_ubwc)(struct dpu_hw_mdp *mdp,struct dpu_mdss_cfg *m); -/** * intf_audio_select - select the external interface for audio * @mdp: mdp top context driver
drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c +23 -52
105 lines not on this page · raw message
Signature · 1 line
2.26.1
kbuild test robot
build botRe: [PATCH 2/8] drm/msm/dpu: update UBWC config for sm8150 and sm8250
Thank you for the patch! Perhaps something to improve:
Hi Jonathan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.7-rc7 next-20200528]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Jonathan-Marek/Initial-SM8150-and-SM8250-DPU-bringup/20200526-112725 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 9cb1fd0efd195590b828b9b865421ad345a4a145 config: arm-defconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
All warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c: In function 'dpu_encoder_virt_mode_set':drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:958:30: warning: variable 'topology' set but not used [-Wunused-but-set-variable] 958 | struct msm_display_topology topology;
| ^~~~~~~~drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c: In function '_dpu_encoder_virt_enable_helper':
>> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1074:18: warning: variable 'dpu_kms' set but not used [-Wunused-but-set-variable]
1074 | struct dpu_kms *dpu_kms;
| ^~~~~~~
vim +/dpu_kms +1074 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1069
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1070 static void _dpu_encoder_virt_enable_helper(struct drm_encoder *drm_enc)
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1071 {
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1072 struct dpu_encoder_virt *dpu_enc = NULL;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1073 struct msm_drm_private *priv;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 @1074 struct dpu_kms *dpu_kms;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1075
422ed75581176c Drew Davenport 2019-09-06 1076 if (!drm_enc || !drm_enc->dev) {
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1077 DPU_ERROR("invalid parameters\n");
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1078 return;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1079 }
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1080
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1081 priv = drm_enc->dev->dev_private;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1082 dpu_kms = to_dpu_kms(priv->kms);
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1083
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1084 dpu_enc = to_dpu_encoder_virt(drm_enc);
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1085 if (!dpu_enc || !dpu_enc->cur_master) {
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1086 DPU_ERROR("invalid dpu encoder/master\n");
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1087 return;
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1088 }
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1089
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1090 _dpu_encoder_update_vsync_source(dpu_enc, &dpu_enc->disp_info);
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1091 }
25fdd5933e4c0f Jeykumar Sankaran 2018-06-27 1092 :::::: The code at line 1074 was first introduced by commit
:::::: 25fdd5933e4c0f5fe2ea5cd59994f8ac5fbe90ef drm/msm: Add SDM845 DPU support
:::::: TO: Jeykumar Sankaran <[email protected]> :::::: CC: Sean Paul <[email protected]>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
PATCH 3/8 drm/msm/dpu: move some sspp caps to dpu_caps
In reply to Jonathan MarekThis isn't something that ever changes between planes, so move it to dpu_caps struct. Making this change will allow more re-use in the "SSPP sub blocks config" part of the catalog, in particular when adding support for SM8150 and SM8250 which have different max_linewidth.
This also sets max_hdeci_exp/max_vdeci_exp to 0 for sc7180, as decimation is not supported on the newest DPU versions. (note that decimation is not implemented, so this changes nothing)
--- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 14 +++++------ .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 24 +++++++------------ drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 6 ++--- 3 files changed, 17 insertions(+), 27 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +6 -8
@@ -68,6 +68,10 @@ static const struct dpu_caps sdm845_dpu_caps = { .has_dim_layer = true, .has_idle_pc = true, .has_3d_merge = true, + .max_linewidth = DEFAULT_DPU_OUTPUT_LINE_WIDTH, + .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, + .max_hdeci_exp = MAX_HORZ_DECIMATION, + .max_vdeci_exp = MAX_VERT_DECIMATION, };static const struct dpu_caps sc7180_dpu_caps = {
@@ -78,6 +82,8 @@ static const struct dpu_caps sc7180_dpu_caps = { .ubwc_version = DPU_HW_UBWC_VER_20, .has_dim_layer = true, .has_idle_pc = true, + .max_linewidth = DEFAULT_DPU_OUTPUT_LINE_WIDTH, + .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, };static const struct dpu_mdp_cfg sdm845_mdp[] = {
@@ -176,16 +182,9 @@ static const struct dpu_ctl_cfg sc7180_ctl[] = {*************************************************************/ /* SSPP common configuration */ -static const struct dpu_sspp_blks_common sdm845_sspp_common = { - .maxlinewidth =DEFAULT_DPU_OUTPUT_LINE_WIDTH , - .pixel_ram_size =DEFAULT_PIXEL_RAM_SIZE , - .maxhdeciexp =MAX_HORZ_DECIMATION , - .maxvdeciexp =MAX_VERT_DECIMATION , -};#define _VIG_SBLK (num, sdma_pri, qseed_ver) \ { \ - .common = &sdm845_sspp_common, \ .maxdwnscale = MAX_DOWNSCALE_RATIO, \ .maxupscale = MAX_UPSCALE_RATIO, \ .smart_dma_priority = sdma_pri, \
@@ -205,7 +204,6 @@ static const struct dpu_sspp_blks_common sdm845_sspp_common = {#define _DMA_SBLK (num, sdma_pri) \ { \ - .common = &sdm845_sspp_common, \ .maxdwnscale = SSPP_UNITY_SCALE, \ .maxupscale = SSPP_UNITY_SCALE, \ .smart_dma_priority = sdma_pri, \
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +8 -16
@@ -290,6 +290,10 @@ struct dpu_qos_lut_tbl {* @has_dim_layer dim layer feature status * @has_idle_pc indicate if idle power collapse feature is supported * @has_3d_merge indicate if 3D merge is supported +* @max_linewidth max linewidth for sspp +* @pixel_ram_size size of latency hiding and de-tiling buffer in bytes +* @max_hdeci_exp max horizontal decimation supported (max is 2^value) +* @max_vdeci_exp max vertical decimation supported (max is 2^value) */ struct dpu_caps {u32 max_mixer_width;
@@ -301,22 +305,11 @@ struct dpu_caps {bool has_dim_layer;bool has_idle_pc;bool has_3d_merge; -}; - -/** -* struct dpu_sspp_blks_common : SSPP sub-blocks common configuration -* @maxwidth: max pixelwidth supported by this pipe -* @pixel_ram_size: size of latency hiding and de-tiling buffer in bytes -* @maxhdeciexp: max horizontal decimation supported by this pipe -* (max is 2^value) -* @maxvdeciexp: max vertical decimation supported by this pipe -* (max is 2^value) -*/ -struct dpu_sspp_blks_common { -u32 maxlinewidth; +/* SSPP limits */ +u32 max_linewidth;u32 pixel_ram_size; -u32 maxhdeciexp; -u32 maxvdeciexp; +u32 max_hdeci_exp; +u32 max_vdeci_exp; };/**
@@ -342,7 +335,6 @@ struct dpu_sspp_blks_common {* @virt_num_formats: Number of supported formats for virtual planes */ struct dpu_sspp_sub_blks { -const struct dpu_sspp_blks_common *common;u32 creq_vblank;u32 danger_vblank;u32 maxdwnscale;
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +3 -3
@@ -153,7 +153,7 @@ static int _dpu_plane_calc_fill_level(struct drm_plane *plane, pdpu =to_dpu_plane (plane); pstate =to_dpu_plane_state (plane->state); - fixed_buff_size = pdpu->pipe_sblk->common->pixel_ram_size; + fixed_buff_size = pdpu->catalog->caps->pixel_ram_size;list_for_each_entry (tmp, &pdpu->mplane_list, mplane_list) {if (!tmp->base.state->visible)
@@ -709,7 +709,7 @@ int dpu_plane_validate_multirect_v2(struct dpu_multirect_plane_states *plane)* So we cannot support more than half of the supported SSPP * width for tiled formats. */ - width_threshold = dpu_plane[i]->pipe_sblk->common->maxlinewidth; + width_threshold = dpu_plane[i]->catalog->caps->max_linewidth;if (has_tiled_rect) width_threshold /=2 ;
@@ -887,7 +887,7 @@ static int dpu_plane_atomic_check(struct drm_plane *plane, fb_rect.x2 = state->fb->width; fb_rect.y2 = state->fb->height; - max_linewidth = pdpu->pipe_sblk->common->maxlinewidth; + max_linewidth = pdpu->catalog->caps->max_linewidth; fmt =to_dpu_format (msm_framebuffer_format (state->fb));
Signature · 1 line
2.26.1
PATCH 4/8 drm/msm/dpu: don't use INTF_INPUT_CTRL feature on sdm845
In reply to Jonathan MarekThe INTF_INPUT_CTRL feature is not available on sdm845, so don't set it.
This also adds separate feature bits for INTF (based on downstream) instead of using CTL feature bit for it, and removes the unnecessary NULL check in the added bind_pingpong_blk function.
--- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 20 +++++++++++-------- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 13 ++++++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 9 ++------- 3 files changed, 27 insertions(+), 15 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +12 -8
@@ -41,6 +41,10 @@#define PINGPONG_SDM845_SPLIT_MASK \ (PINGPONG_SDM845_MASK | BIT(DPU_PINGPONG_TE2)) +#define INTF_SDM845_MASK (0) + +#define INTF_SC7180_MASK BIT(DPU_INTF_INPUT_CTRL) | BIT(DPU_INTF_TE) +#define DEFAULT_PIXEL_RAM_SIZE (50 * 1024)#define DEFAULT_DPU_LINE_WIDTH 2048#define DEFAULT_DPU_OUTPUT_LINE_WIDTH 2560
@@ -376,26 +380,26 @@ static struct dpu_pingpong_cfg sc7180_pp[] = {/************************************************************* * INTF sub blocks config *************************************************************/ -#define INTF_BLK (_name, _id, _base, _type, _ctrl_id) \ +#define INTF_BLK (_name, _id, _base, _type, _ctrl_id, _features) \ {\ .name = _name, .id = _id, \ .base = _base, .len = 0x280, \ - .features = BIT(DPU_CTL_ACTIVE_CFG), \ + .features = _features, \ .type = _type, \ .controller_id = _ctrl_id, \ .prog_fetch_lines_worst_case = 24 \ }static const struct dpu_intf_cfg sdm845_intf[] = { -INTF_BLK ("intf_0" ,INTF_0 ,0x6A000 ,INTF_DP ,0 ), -INTF_BLK ("intf_1" ,INTF_1 ,0x6A800 ,INTF_DSI ,0 ), -INTF_BLK ("intf_2" ,INTF_2 ,0x6B000 ,INTF_DSI ,1 ), -INTF_BLK ("intf_3" ,INTF_3 ,0x6B800 ,INTF_DP ,1 ), +INTF_BLK ("intf_0" ,INTF_0 ,0x6A000 ,INTF_DP ,0 ,INTF_SDM845_MASK ), +INTF_BLK ("intf_1" ,INTF_1 ,0x6A800 ,INTF_DSI ,0 ,INTF_SDM845_MASK ), +INTF_BLK ("intf_2" ,INTF_2 ,0x6B000 ,INTF_DSI ,1 ,INTF_SDM845_MASK ), +INTF_BLK ("intf_3" ,INTF_3 ,0x6B800 ,INTF_DP ,1 ,INTF_SDM845_MASK ), };static const struct dpu_intf_cfg sc7180_intf[] = { -INTF_BLK ("intf_0" ,INTF_0 ,0x6A000 ,INTF_DP ,0 ), -INTF_BLK ("intf_1" ,INTF_1 ,0x6A800 ,INTF_DSI ,0 ), +INTF_BLK ("intf_0" ,INTF_0 ,0x6A000 ,INTF_DP ,0 ,INTF_SC7180_MASK ), +INTF_BLK ("intf_1" ,INTF_1 ,0x6A800 ,INTF_DSI ,0 ,INTF_SC7180_MASK ), };/*************************************************************
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +13 -0
@@ -175,6 +175,19 @@ enum { DPU_CTL_MAX }; +/** +* INTF sub-blocks +* @DPU_INTF_INPUT_CTRL Supports the setting of pp block from which +* pixel data arrives to this INTF +* @DPU_INTF_TE INTF block has TE configuration support +* @DPU_INTF_MAX +*/ +enum { +DPU_INTF_INPUT_CTRL =0x1 , +DPU_INTF_TE , +DPU_INTF_MAX +}; +/** * VBIF sub-blocks and features * @DPU_VBIF_QOS_OTLIM VBIF supports OT Limit
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c +2 -7
@@ -225,14 +225,9 @@ static void dpu_hw_intf_bind_pingpong_blk(bool enable, const enum dpu_pingpong pp) { - struct dpu_hw_blk_reg_map *c; + struct dpu_hw_blk_reg_map *c = &intf->hw;u32 mux_cfg; -if (!intf) -return ; - - c = &intf->hw; - mux_cfg =DPU_REG_READ (c,INTF_MUX ); mux_cfg &= ~0xf ;
@@ -280,7 +275,7 @@ static void _setup_intf_ops(struct dpu_hw_intf_ops *ops, ops->get_status = dpu_hw_intf_get_status; ops->enable_timing = dpu_hw_intf_enable_timing_engine; ops->get_line_count = dpu_hw_intf_get_line_count; -if (cap &BIT (DPU_CTL_ACTIVE_CFG )) +if (cap &BIT (DPU_INTF_INPUT_CTRL )) ops->bind_pingpong_blk = dpu_hw_intf_bind_pingpong_blk; }
Signature · 1 line
2.26.1
PATCH 5/8 drm/msm/dpu: set missing flush bits for INTF_2 and INTF_3
In reply to Jonathan MarekThis fixes flushing of INTF_2 and INTF_3 on SM8150 and SM8250 hardware.
--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c +2 -18
@@ -245,30 +245,14 @@ static int dpu_hw_ctl_get_bitmask_intf(struct dpu_hw_ctl *ctx,static int dpu_hw_ctl_get_bitmask_intf_v1 (struct dpu_hw_ctl *ctx,u32 *flushbits,enum dpu_intf intf) { -switch (intf) { -case INTF_0 : -case INTF_1 : - *flushbits |=BIT (31 ); -break ; -default : -return 0 ; - } + *flushbits |=BIT (31 );return 0 ; }static int dpu_hw_ctl_active_get_bitmask_intf (struct dpu_hw_ctl *ctx,u32 *flushbits,enum dpu_intf intf) { -switch (intf) { -case INTF_0 : - *flushbits |=BIT (0 ); -break ; -case INTF_1 : - *flushbits |=BIT (1 ); -break ; -default : -return 0 ; - } + *flushbits |=BIT (intf -INTF_0 );return 0 ; }
Signature · 1 line
2.26.1
PATCH 6/8 drm/msm/dpu: intf timing path for displayport
In reply to Jonathan MarekCalculate the correct timings for displayport, from downstream driver.
--- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c +15 -5
@@ -107,11 +107,6 @@ static void dpu_hw_intf_setup_timing_engine(struct dpu_hw_intf *ctx, display_v_end = ((vsync_period - p->v_front_porch) * hsync_period) + p->hsync_skew -1 ; -if (ctx->cap->type ==INTF_EDP || ctx->cap->type ==INTF_DP ) { - display_v_start += p->hsync_pulse_width + p->h_back_porch; - display_v_end -= p->h_front_porch; - } - hsync_start_x = p->h_back_porch + p->hsync_pulse_width; hsync_end_x = hsync_period - p->h_front_porch -1 ;
@@ -144,10 +139,25 @@ static void dpu_hw_intf_setup_timing_engine(struct dpu_hw_intf *ctx, hsync_ctl = (hsync_period <<16 ) | p->hsync_pulse_width; display_hctl = (hsync_end_x <<16 ) | hsync_start_x; +if (ctx->cap->type ==INTF_EDP || ctx->cap->type ==INTF_DP ) { + active_h_start = hsync_start_x; + active_h_end = active_h_start + p->xres -1 ; + active_v_start = display_v_start; + active_v_end = active_v_start + (p->yres * hsync_period) -1 ; + + display_v_start += p->hsync_pulse_width + p->h_back_porch; + + active_hctl = (active_h_end <<16 ) | active_h_start; + display_hctl = active_hctl; + } + den_polarity =0 ;if (ctx->cap->type ==INTF_HDMI ) { hsync_polarity = p->yres >=720 ?0 :1 ; vsync_polarity = p->yres >=720 ?0 :1 ; + }else if (ctx->cap->type ==INTF_DP ) { + hsync_polarity = p->hsync_polarity; + vsync_polarity = p->vsync_polarity; }else { hsync_polarity =0 ; vsync_polarity =0 ;
Signature · 1 line
2.26.1
PATCH 7/8 drm/msm/dpu: add SM8150 to hw catalog
In reply to Jonathan MarekThis brings up basic video mode functionality for SM8150 DPU. Command mode and dual mixer/intf configurations are not working, future patches will address this. Scaler functionality and multiple planes is also untested.
--- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 147 ++++++++++++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 2 + 2 files changed, 149 insertions(+)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +147 -0
@@ -90,6 +90,23 @@ static const struct dpu_caps sc7180_dpu_caps = { .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, }; +static const struct dpu_caps sm8150_dpu_caps = { + .max_mixer_width =DEFAULT_DPU_OUTPUT_LINE_WIDTH , + .max_mixer_blendstages =0xb , + .max_linewidth =4096 , + .qseed_type =DPU_SSPP_SCALER_QSEED3 , + .smart_dma_rev =DPU_SSPP_SMART_DMA_V2_5 , + .ubwc_version =DPU_HW_UBWC_VER_30 , + .has_src_split = true, + .has_dim_layer = true, + .has_idle_pc = true, + .has_3d_merge = true, + .max_linewidth =4096 , + .pixel_ram_size =DEFAULT_PIXEL_RAM_SIZE , + .max_hdeci_exp =MAX_HORZ_DECIMATION , + .max_vdeci_exp =MAX_VERT_DECIMATION , +}; +static const struct dpu_mdp_cfg sdm845_mdp[] = { { .name ="top_0" , .id =MDP_TOP ,
@@ -181,6 +198,39 @@ static const struct dpu_ctl_cfg sc7180_ctl[] = { }, }; +static const struct dpu_ctl_cfg sm8150_ctl[] = { + { + .name ="ctl_0" , .id =CTL_0 , + .base =0x1000 , .len =0x1e0 , + .features =BIT (DPU_CTL_ACTIVE_CFG ) |BIT (DPU_CTL_SPLIT_DISPLAY ) + }, + { + .name ="ctl_1" , .id =CTL_1 , + .base =0x1200 , .len =0x1e0 , + .features =BIT (DPU_CTL_ACTIVE_CFG ) |BIT (DPU_CTL_SPLIT_DISPLAY ) + }, + { + .name ="ctl_2" , .id =CTL_2 , + .base =0x1400 , .len =0x1e0 , + .features =BIT (DPU_CTL_ACTIVE_CFG ) + }, + { + .name ="ctl_3" , .id =CTL_3 , + .base =0x1600 , .len =0x1e0 , + .features =BIT (DPU_CTL_ACTIVE_CFG ) + }, + { + .name ="ctl_4" , .id =CTL_4 , + .base =0x1800 , .len =0x1e0 , + .features =BIT (DPU_CTL_ACTIVE_CFG ) + }, + { + .name ="ctl_5" , .id =CTL_5 , + .base =0x1a00 , .len =0x1e0 , + .features =BIT (DPU_CTL_ACTIVE_CFG ) + }, +}; +/************************************************************* * SSPP sub blocks config *************************************************************/
@@ -335,6 +385,23 @@ static const struct dpu_lm_cfg sc7180_lm[] = { &sc7180_lm_sblk, PINGPONG_1, LM_0), }; +/* SM8150 */ + +static const struct dpu_lm_cfg sm8150_lm[] = { +LM_BLK ("lm_0" ,LM_0 ,0x44000 ,MIXER_SDM845_MASK , + &sdm845_lm_sblk,PINGPONG_0 ,LM_1 ), +LM_BLK ("lm_1" ,LM_1 ,0x45000 ,MIXER_SDM845_MASK , + &sdm845_lm_sblk,PINGPONG_1 ,LM_0 ), +LM_BLK ("lm_2" ,LM_2 ,0x46000 ,MIXER_SDM845_MASK , + &sdm845_lm_sblk,PINGPONG_2 ,LM_3 ), +LM_BLK ("lm_3" ,LM_3 ,0x47000 ,MIXER_SDM845_MASK , + &sdm845_lm_sblk,PINGPONG_3 ,LM_2 ), +LM_BLK ("lm_4" ,LM_4 ,0x48000 ,MIXER_SDM845_MASK , + &sdm845_lm_sblk,PINGPONG_4 ,LM_5 ), +LM_BLK ("lm_5" ,LM_5 ,0x49000 ,MIXER_SDM845_MASK , + &sdm845_lm_sblk,PINGPONG_5 ,LM_4 ), +}; +/************************************************************* * PINGPONG sub blocks config *************************************************************/
@@ -377,6 +444,15 @@ static struct dpu_pingpong_cfg sc7180_pp[] = { PP_BLK_TE("pingpong_1", PINGPONG_1, 0x70800), }; +static const struct dpu_pingpong_cfg sm8150_pp[] = { +PP_BLK_TE ("pingpong_0" ,PINGPONG_0 ,0x70000 ), +PP_BLK_TE ("pingpong_1" ,PINGPONG_1 ,0x70800 ), +PP_BLK ("pingpong_2" ,PINGPONG_2 ,0x71000 ), +PP_BLK ("pingpong_3" ,PINGPONG_3 ,0x71800 ), +PP_BLK ("pingpong_4" ,PINGPONG_4 ,0x72000 ), +PP_BLK ("pingpong_5" ,PINGPONG_5 ,0x72800 ), +}; +/************************************************************* * INTF sub blocks config *************************************************************/
@@ -402,6 +478,13 @@ static const struct dpu_intf_cfg sc7180_intf[] = { INTF_BLK("intf_1", INTF_1, 0x6A800, INTF_DSI, 0, INTF_SC7180_MASK), }; +static const struct dpu_intf_cfg sm8150_intf[] = { +INTF_BLK ("intf_0" ,INTF_0 ,0x6A000 ,INTF_DP ,0 ,INTF_SC7180_MASK ), +INTF_BLK ("intf_1" ,INTF_1 ,0x6A800 ,INTF_DSI ,0 ,INTF_SC7180_MASK ), +INTF_BLK ("intf_2" ,INTF_2 ,0x6B000 ,INTF_DSI ,1 ,INTF_SC7180_MASK ), +INTF_BLK ("intf_3" ,INTF_3 ,0x6B800 ,INTF_DP ,1 ,INTF_SC7180_MASK ), +}; +/************************************************************* * VBIF sub blocks config *************************************************************/
@@ -432,6 +515,10 @@ static const struct dpu_reg_dma_cfg sdm845_regdma = { .base = 0x0, .version = 0x1, .trigger_sel_off = 0x119c }; +static const struct dpu_reg_dma_cfg sm8150_regdma = { + .base =0x0 , .version =0x00010001 , .trigger_sel_off =0x119c +}; +/************************************************************* * PERF data config *************************************************************/
@@ -456,6 +543,10 @@ static const struct dpu_qos_lut_entry sc7180_qos_linear[] = { {.fl = 0, .lut = 0x0011222222335777}, }; +static const struct dpu_qos_lut_entry sm8150_qos_linear[] = { + {.fl =0 , .lut =0x0011222222223357 }, +}; +static const struct dpu_qos_lut_entry sdm845_qos_macrotile[] = { {.fl =10 , .lut =0x344556677 }, {.fl = 11, .lut = 0x3344556677},
@@ -540,6 +631,31 @@ static const struct dpu_perf_cfg sc7180_perf_data = { }, }; +static const struct dpu_perf_cfg sm8150_perf_data = { + .max_bw_low =12800000 , + .max_bw_high =12800000 , + .min_core_ib =2400000 , + .min_llcc_ib =800000 , + .min_dram_ib =800000 , + .danger_lut_tbl = {0xf ,0xffff ,0x0 }, + .qos_lut_tbl = { + {.nentry =ARRAY_SIZE (sm8150_qos_linear), + .entries = sm8150_qos_linear + }, + {.nentry =ARRAY_SIZE (sc7180_qos_macrotile), + .entries = sc7180_qos_macrotile + }, + {.nentry =ARRAY_SIZE (sc7180_qos_nrt), + .entries = sc7180_qos_nrt + }, +/* TODO: macrotile-qseed is different from macrotile */ + }, + .cdp_cfg = { + {.rd_enable =1 , .wr_enable =1 }, + {.rd_enable =1 , .wr_enable =0 } + }, +}; +/************************************************************* * Hardware catalog init *************************************************************/
@@ -602,9 +718,40 @@ static void sc7180_cfg_init(struct dpu_mdss_cfg *dpu_cfg) }; } +/* +* sm8150_cfg_init(): populate sm8150 dpu sub-blocks reg offsets +* and instance counts. +*/ +static void sm8150_cfg_init (struct dpu_mdss_cfg *dpu_cfg) +{ + *dpu_cfg = (struct dpu_mdss_cfg ){ + .caps = &sm8150_dpu_caps, + .mdp_count =ARRAY_SIZE (sdm845_mdp), + .mdp = sdm845_mdp, + .ctl_count =ARRAY_SIZE (sm8150_ctl), + .ctl = sm8150_ctl, + .sspp_count =ARRAY_SIZE (sdm845_sspp), + .sspp = sdm845_sspp, + .mixer_count =ARRAY_SIZE (sm8150_lm), + .mixer = sm8150_lm, + .pingpong_count =ARRAY_SIZE (sm8150_pp), + .pingpong = sm8150_pp, + .intf_count =ARRAY_SIZE (sm8150_intf), + .intf = sm8150_intf, + .vbif_count =ARRAY_SIZE (sdm845_vbif), + .vbif = sdm845_vbif, + .reg_dma_count =1 , + .dma_cfg = sm8150_regdma, + .perf = sm8150_perf_data, + .mdss_irqs =0x3ff , + }; +} +static const struct dpu_mdss_hw_cfg_handler cfg_handler[] = { { .hw_rev =DPU_HW_VER_400 , .cfg_init = sdm845_cfg_init}, { .hw_rev =DPU_HW_VER_401 , .cfg_init = sdm845_cfg_init}, + { .hw_rev =DPU_HW_VER_500 , .cfg_init = sm8150_cfg_init}, + { .hw_rev =DPU_HW_VER_501 , .cfg_init = sm8150_cfg_init}, { .hw_rev =DPU_HW_VER_620 , .cfg_init = sc7180_cfg_init}, };
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h +2 -0
@@ -170,6 +170,7 @@ enum dpu_ctl {CTL_2 ,CTL_3 ,CTL_4 , +CTL_5 , CTL_MAX };
@@ -179,6 +180,7 @@ enum dpu_pingpong {PINGPONG_2 ,PINGPONG_3 ,PINGPONG_4 , +PINGPONG_5 ,PINGPONG_S0 , PINGPONG_MAX };
Signature · 1 line
2.26.1
Re: [PATCH 7/8] drm/msm/dpu: add SM8150 to hw catalog
Hi Jonathan,
Thank you for the patch! Perhaps something to improve:
url: https://github.com/0day-ci/linux/commits/Jonathan-Marek/Initial-SM8150-and-SM8250-DPU-bringup/20200526-112725 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 9cb1fd0efd195590b828b9b865421ad345a4a145
config: arm64-randconfig-s031-20200527 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-240-gf0fe1cd9-dirty
# save the attached .config to linux build tree
make W=1 C=1 ARCH=arm64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'If you fix the issue, kindly add following tag as appropriate
sparse warnings: (new ones prefixed by >>)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:98:26: sparse: sparse: undefined identifier 'DPU_SSPP_SMART_DMA_V2_5' drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:96:10: sparse: sparse: Initializer entry defined twice
Quoted 1 line
Quoted 1 line
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:104:10: sparse: also defined here
# https://github.com/0day-ci/linux/commit/6a90302321af832ea18679e1b29b0301caade709
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 6a90302321af832ea18679e1b29b0301caade709
vim +104 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
7bdc0c4b812602f Kalyan Thota 2019-11-25 92
6a90302321af832 Jonathan Marek 2020-05-25 93 static const struct dpu_caps sm8150_dpu_caps = {
6a90302321af832 Jonathan Marek 2020-05-25 94 .max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
6a90302321af832 Jonathan Marek 2020-05-25 95 .max_mixer_blendstages = 0xb,
6a90302321af832 Jonathan Marek 2020-05-25 96 .max_linewidth = 4096,
^^^^^^^^^^^^^^^^^^^^^^6a90302321af832 Jonathan Marek 2020-05-25 97 .qseed_type = DPU_SSPP_SCALER_QSEED3,
6a90302321af832 Jonathan Marek 2020-05-25 98 .smart_dma_rev = DPU_SSPP_SMART_DMA_V2_5,
6a90302321af832 Jonathan Marek 2020-05-25 99 .ubwc_version = DPU_HW_UBWC_VER_30,
6a90302321af832 Jonathan Marek 2020-05-25 100 .has_src_split = true,
6a90302321af832 Jonathan Marek 2020-05-25 101 .has_dim_layer = true,
6a90302321af832 Jonathan Marek 2020-05-25 102 .has_idle_pc = true,
6a90302321af832 Jonathan Marek 2020-05-25 103 .has_3d_merge = true,
6a90302321af832 Jonathan Marek 2020-05-25 @104 .max_linewidth = 4096,
^^^^^^^^^^^^^^^^^^^^^^Delete duplicate code.
6a90302321af832 Jonathan Marek 2020-05-25 105 .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, 6a90302321af832 Jonathan Marek 2020-05-25 106 .max_hdeci_exp = MAX_HORZ_DECIMATION, 6a90302321af832 Jonathan Marek 2020-05-25 107 .max_vdeci_exp = MAX_VERT_DECIMATION, 6a90302321af832 Jonathan Marek 2020-05-25 108 };
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
kbuild test robot
build botRe: [PATCH 7/8] drm/msm/dpu: add SM8150 to hw catalog
In reply to Jonathan MarekThank you for the patch! Yet something to improve:
Hi Jonathan,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.7-rc7]
[cannot apply to next-20200529]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Jonathan-Marek/Initial-SM8150-and-SM8250-DPU-bringup/20200526-112725 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 9cb1fd0efd195590b828b9b865421ad345a4a145 config: arm64-allyesconfig (attached as .config) compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
<< In file included from drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:11:
>> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:98:19: error: 'DPU_SSPP_SMART_DMA_V2_5' undeclared here (not in a function); did you mean 'DPU_SSPP_SMART_DMA_V2'? 98 | .smart_dma_rev = DPU_SSPP_SMART_DMA_V2_5, | ^~~~~~~~~~~~~~~~~~~~~~~ | DPU_SSPP_SMART_DMA_V2 << In file included from drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:11: >> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:104:19: warning: initialized field overwritten [-Woverride-init]
104 | .max_linewidth = 4096,
| ^~~~drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:104:19: note: (near initialization for 'sm8150_dpu_caps.max_linewidth')
In file included from drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:11:drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog_format.h:7:23: warning: 'qcom_compressed_supported_formats' defined but not used [-Wunused-const-variable=] 7 | static const uint32_t qcom_compressed_supported_formats[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +98 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
92
93 static const struct dpu_caps sm8150_dpu_caps = {
94 .max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
95 .max_mixer_blendstages = 0xb,
96 .max_linewidth = 4096,
97 .qseed_type = DPU_SSPP_SCALER_QSEED3,
> 98 .smart_dma_rev = DPU_SSPP_SMART_DMA_V2_5,
99 .ubwc_version = DPU_HW_UBWC_VER_30,
100 .has_src_split = true,
101 .has_dim_layer = true,
102 .has_idle_pc = true,
103 .has_3d_merge = true,
> 104 .max_linewidth = 4096, 105 .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
106 .max_hdeci_exp = MAX_HORZ_DECIMATION,
107 .max_vdeci_exp = MAX_VERT_DECIMATION,
108 };
109
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
Re: [PATCH 7/8] drm/msm/dpu: add SM8150 to hw catalog
In reply to Jonathan MarekQuoted 15 lines · Jonathan Marek
This brings up basic video mode functionality for SM8150 DPU. Command mode and dual mixer/intf configurations are not working, future patches will address this. Scaler functionality and multiple planes is also untested.
Signed-off-by Jonathan Marek <[email protected]>--- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 147 ++++++++++++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 2 + 2 files changed, 149 insertions(+)drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +0
-0
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c static const struct dpu_caps sc7180_dpu_caps = { · line 98
Quoted 9 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +6
-0@@ -90,6 +90,23 @@ static const struct dpu_caps sc7180_dpu_caps = { .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, }; +static const struct dpu_caps sm8150_dpu_caps = { + .max_mixer_width =DEFAULT_DPU_OUTPUT_LINE_WIDTH , + .max_mixer_blendstages =0xb , + .max_linewidth =4096 , + .qseed_type =DPU_SSPP_SCALER_QSEED3 , + .smart_dma_rev =DPU_SSPP_SMART_DMA_V2_5 ,
It seems you missed sending a patch adding support for DPU_SSPP_SMART_DMA_V2_5. Could you please point to it?
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH 7/8] drm/msm/dpu: add SM8150 to hw catalog
Quoted 11 lines · Dmitry Baryshkov
Quoted 10 lines · Jonathan Marek
This brings up basic video mode functionality for SM8150 DPU. Command mode and dual mixer/intf configurations are not working, future patches will address this. Scaler functionality and multiple planes is also untested.
Signed-off-by Jonathan Marek <[email protected]>---
.../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 147 ++++++++++++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h | 2 +2 files changed, 149 insertions(+)
Quoted 17 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c static const struct dpu_caps sc7180_dpu_caps = { · line 97
Quoted 13 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +6
-0@@ -90,6 +90,23 @@ static const struct dpu_caps sc7180_dpu_caps = { .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, }; +static const struct dpu_caps sm8150_dpu_caps = { + .max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH, + .max_mixer_blendstages = 0xb, + .max_linewidth = 4096, + .qseed_type = DPU_SSPP_SCALER_QSEED3, + .smart_dma_rev = DPU_SSPP_SMART_DMA_V2_5,It seems you missed sending a patch adding support for
DPU_SSPP_SMART_DMA_V2_5. Could you please point to it?
There are no other changes related to that, the driver never checks smart_dma_rev and the correct version number is only set for when the driver supports it (if ever).
PATCH 8/8 drm/msm/dpu: add SM8250 to hw catalog
In reply to Jonathan MarekThis brings up basic video mode functionality for SM8250 DPU. Command mode and dual mixer/intf configurations are not working, future patches will address this. Scaler functionality and multiple planes is also untested.
--- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 106 ++++++++++++++++++ .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 3 + 2 files changed, 109 insertions(+)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +106 -0
@@ -107,6 +107,21 @@ static const struct dpu_caps sm8150_dpu_caps = { .max_vdeci_exp = MAX_VERT_DECIMATION, }; +static const struct dpu_caps sm8250_dpu_caps = { + .max_mixer_width =DEFAULT_DPU_OUTPUT_LINE_WIDTH , + .max_mixer_blendstages =0xb , + .max_linewidth =4096 , + .qseed_type =DPU_SSPP_SCALER_QSEED3 ,/* TODO: qseed3 lite */ + .smart_dma_rev =DPU_SSPP_SMART_DMA_V2_5 , + .ubwc_version =DPU_HW_UBWC_VER_40 , + .has_src_split = true, + .has_dim_layer = true, + .has_idle_pc = true, + .has_3d_merge = true, + .max_linewidth =4096 , + .pixel_ram_size =DEFAULT_PIXEL_RAM_SIZE , +}; +static const struct dpu_mdp_cfg sdm845_mdp[] = { { .name ="top_0" , .id =MDP_TOP ,
@@ -149,6 +164,33 @@ static const struct dpu_mdp_cfg sc7180_mdp[] = { }, }; +static const struct dpu_mdp_cfg sm8250_mdp[] = { + { + .name ="top_0" , .id =MDP_TOP , + .base =0x0 , .len =0x45C , + .features =0 , + .highest_bank_bit =0x3 ,/* TODO: 2 for LP_DDR4 */ + .clk_ctrls[DPU_CLK_CTRL_VIG0 ] = { + .reg_off =0x2AC , .bit_off =0 }, + .clk_ctrls[DPU_CLK_CTRL_VIG1 ] = { + .reg_off =0x2B4 , .bit_off =0 }, + .clk_ctrls[DPU_CLK_CTRL_VIG2 ] = { + .reg_off =0x2BC , .bit_off =0 }, + .clk_ctrls[DPU_CLK_CTRL_VIG3 ] = { + .reg_off =0x2C4 , .bit_off =0 }, + .clk_ctrls[DPU_CLK_CTRL_DMA0 ] = { + .reg_off =0x2AC , .bit_off =8 }, + .clk_ctrls[DPU_CLK_CTRL_DMA1 ] = { + .reg_off =0x2B4 , .bit_off =8 }, + .clk_ctrls[DPU_CLK_CTRL_CURSOR0 ] = { + .reg_off =0x2BC , .bit_off =8 }, + .clk_ctrls[DPU_CLK_CTRL_CURSOR1 ] = { + .reg_off =0x2C4 , .bit_off =8 }, + .clk_ctrls[DPU_CLK_CTRL_REG_DMA ] = { + .reg_off =0x2BC , .bit_off =20 }, + }, +}; +/************************************************************* * CTL sub blocks config *************************************************************/
@@ -519,6 +561,14 @@ static const struct dpu_reg_dma_cfg sm8150_regdma = { .base = 0x0, .version = 0x00010001, .trigger_sel_off = 0x119c }; +static const struct dpu_reg_dma_cfg sm8250_regdma = { + .base =0x0 , + .version =0x00010002 , + .trigger_sel_off =0x119c , + .xin_id =7 , + .clk_ctrl =DPU_CLK_CTRL_REG_DMA , +}; +/************************************************************* * PERF data config *************************************************************/
@@ -656,6 +706,31 @@ static const struct dpu_perf_cfg sm8150_perf_data = { }, }; +static const struct dpu_perf_cfg sm8250_perf_data = { + .max_bw_low =13700000 , + .max_bw_high =16600000 , + .min_core_ib =4800000 , + .min_llcc_ib =0 , + .min_dram_ib =800000 , + .danger_lut_tbl = {0xf ,0xffff ,0x0 }, + .qos_lut_tbl = { + {.nentry =ARRAY_SIZE (sc7180_qos_linear), + .entries = sc7180_qos_linear + }, + {.nentry =ARRAY_SIZE (sc7180_qos_macrotile), + .entries = sc7180_qos_macrotile + }, + {.nentry =ARRAY_SIZE (sc7180_qos_nrt), + .entries = sc7180_qos_nrt + }, +/* TODO: macrotile-qseed is different from macrotile */ + }, + .cdp_cfg = { + {.rd_enable =1 , .wr_enable =1 }, + {.rd_enable =1 , .wr_enable =0 } + }, +}; +/************************************************************* * Hardware catalog init *************************************************************/
@@ -747,11 +822,42 @@ static void sm8150_cfg_init(struct dpu_mdss_cfg *dpu_cfg) }; } +/* +* sm8250_cfg_init(): populate sm8250 dpu sub-blocks reg offsets +* and instance counts. +*/ +static void sm8250_cfg_init (struct dpu_mdss_cfg *dpu_cfg) +{ + *dpu_cfg = (struct dpu_mdss_cfg ){ + .caps = &sm8250_dpu_caps, + .mdp_count =ARRAY_SIZE (sm8250_mdp), + .mdp = sm8250_mdp, + .ctl_count =ARRAY_SIZE (sm8150_ctl), + .ctl = sm8150_ctl, +/* TODO: sspp qseed version differs from 845 */ + .sspp_count =ARRAY_SIZE (sdm845_sspp), + .sspp = sdm845_sspp, + .mixer_count =ARRAY_SIZE (sm8150_lm), + .mixer = sm8150_lm, + .pingpong_count =ARRAY_SIZE (sm8150_pp), + .pingpong = sm8150_pp, + .intf_count =ARRAY_SIZE (sm8150_intf), + .intf = sm8150_intf, + .vbif_count =ARRAY_SIZE (sdm845_vbif), + .vbif = sdm845_vbif, + .reg_dma_count =1 , + .dma_cfg = sm8250_regdma, + .perf = sm8250_perf_data, + .mdss_irqs =0xff , + }; +} +static const struct dpu_mdss_hw_cfg_handler cfg_handler[] = { { .hw_rev =DPU_HW_VER_400 , .cfg_init = sdm845_cfg_init}, { .hw_rev =DPU_HW_VER_401 , .cfg_init = sdm845_cfg_init}, { .hw_rev =DPU_HW_VER_500 , .cfg_init = sm8150_cfg_init}, { .hw_rev =DPU_HW_VER_501 , .cfg_init = sm8150_cfg_init}, + { .hw_rev =DPU_HW_VER_600 , .cfg_init = sm8250_cfg_init}, { .hw_rev =DPU_HW_VER_620 , .cfg_init = sc7180_cfg_init}, };
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h +3 -0
@@ -408,6 +408,7 @@ enum dpu_clk_ctrl_type {DPU_CLK_CTRL_CURSOR0 ,DPU_CLK_CTRL_CURSOR1 ,DPU_CLK_CTRL_INLINE_ROT0_SSPP , +DPU_CLK_CTRL_REG_DMA , DPU_CLK_CTRL_MAX, };
@@ -577,6 +578,8 @@ struct dpu_reg_dma_cfg {DPU_HW_BLK_INFO ;u32 version;u32 trigger_sel_off; +u32 xin_id; +enum dpu_clk_ctrl_type clk_ctrl; };/**
Signature · 1 line
2.26.1