Loading Documentation/devicetree/bindings/fb/mdss-mdp.txt +9 −0 Original line number Diff line number Diff line Loading @@ -176,6 +176,11 @@ Optional properties: - qcom,mdss-highest-bank-bit: Property to indicate tile format as opposed to usual linear format. The value tells the GPU highest memory bank bit used. - qcom,mdss-pipe-rgb-fixed-mmb: Array of indexes describing fixed Memory Macro Blocks (MMBs) for rgb pipes. First value denotes total numbers of MMBs per pipe while values, if any, following first one denotes indexes of MMBs to that RGB pipe. Optional subnodes: Child nodes representing the frame buffer virtual devices. Loading Loading @@ -233,6 +238,10 @@ Example: qcom,mdss-pipe-vig-fetch-id = <1 4 7>; qcom,mdss-pipe-rgb-fetch-id = <16 17 18>; qcom,mdss-pipe-dma-fetch-id = <10 13>; qcom,mdss-pipe-rgb-fixed-mmb = <2 0 1>, <2 2 3>, <2 4 5>, <2 6 7>; qcom,mdss-smp-data = <22 4096>; qcom,mdss-rot-block-size = <64>; qcom,mdss-smp-mb-per-pipe = <2>; Loading drivers/video/msm/mdss/mdss.h +5 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,8 @@ #define MDSS_REG_WRITE(addr, val) writel_relaxed(val, mdss_res->mdp_base + addr) #define MDSS_REG_READ(addr) readl_relaxed(mdss_res->mdp_base + addr) #define MAX_DRV_SUP_MMB_BLKS 44 enum mdss_mdp_clk_type { MDSS_CLK_AHB, MDSS_CLK_AXI, Loading Loading @@ -116,6 +118,9 @@ struct mdss_data_type { u32 nvig_pipes; u32 nrgb_pipes; u32 ndma_pipes; DECLARE_BITMAP(mmb_alloc_map, MAX_DRV_SUP_MMB_BLKS); struct mdss_mdp_mixer *mixer_intf; struct mdss_mdp_mixer *mixer_wb; u32 nmixers_intf; Loading drivers/video/msm/mdss/mdss_mdp.c +45 −2 Original line number Diff line number Diff line Loading @@ -1868,7 +1868,8 @@ static int mdss_mdp_parse_dt_smp(struct platform_device *pdev) struct mdss_data_type *mdata = platform_get_drvdata(pdev); u32 num; u32 data[2]; int rc; int rc, len; const u32 *arr; num = mdss_mdp_parse_dt_prop_len(pdev, "qcom,mdss-smp-data"); Loading @@ -1890,7 +1891,49 @@ static int mdss_mdp_parse_dt_smp(struct platform_device *pdev) "qcom,mdss-smp-mb-per-pipe", data); mdata->smp_mb_per_pipe = (!rc ? data[0] : 0); return 0; rc = 0; arr = of_get_property(pdev->dev.of_node, "qcom,mdss-pipe-rgb-fixed-mmb", &len); if (arr) { int i, j, k; u32 cnt, mmb; len /= sizeof(u32); for (i = 0, k = 0; i < len; k++) { struct mdss_mdp_pipe *pipe = NULL; if (k >= mdata->nrgb_pipes) { pr_err("invalid fixed mmbs for rgb pipes\n"); return -EINVAL; } pipe = &mdata->rgb_pipes[k]; cnt = be32_to_cpu(arr[i++]); if (cnt == 0) continue; for (j = 0; j < cnt; j++) { mmb = be32_to_cpu(arr[i++]); if (mmb > mdata->smp_mb_cnt) { pr_err("overflow mmb%d: rgb%d: max%d\n", mmb, k, mdata->smp_mb_cnt); return -EINVAL; } /* rgb pipes fetches only single plane */ set_bit(mmb, pipe->smp_map[0].fixed); } if (bitmap_intersects(pipe->smp_map[0].fixed, mdata->mmb_alloc_map, mdata->smp_mb_cnt)) { pr_err("overlapping fixed mmb map\n"); return -EINVAL; } bitmap_or(mdata->mmb_alloc_map, pipe->smp_map[0].fixed, mdata->mmb_alloc_map, mdata->smp_mb_cnt); } } return rc; } static int mdss_mdp_parse_dt_misc(struct platform_device *pdev) Loading drivers/video/msm/mdss/mdss_mdp.h +3 −2 Original line number Diff line number Diff line Loading @@ -316,8 +316,9 @@ struct mdss_pipe_pp_res { }; struct mdss_mdp_pipe_smp_map { DECLARE_BITMAP(reserved, MDSS_MDP_SMP_MMB_BLOCKS); DECLARE_BITMAP(allocated, MDSS_MDP_SMP_MMB_BLOCKS); DECLARE_BITMAP(reserved, MAX_DRV_SUP_MMB_BLKS); DECLARE_BITMAP(allocated, MAX_DRV_SUP_MMB_BLKS); DECLARE_BITMAP(fixed, MAX_DRV_SUP_MMB_BLKS); }; struct mdss_mdp_pipe { Loading drivers/video/msm/mdss/mdss_mdp_hwio.h +0 −2 Original line number Diff line number Diff line Loading @@ -500,8 +500,6 @@ enum mdss_mdp_pingpong_index { #define MDSS_MDP_REG_SMP_ALLOC_W0 0x00180 #define MDSS_MDP_REG_SMP_ALLOC_R0 0x00230 #define MDSS_MDP_SMP_MMB_BLOCKS 44 #define MDSS_MDP_LP_MISR_SEL 0x450 #define MDSS_MDP_LP_MISR_CTRL_MDP 0x454 #define MDSS_MDP_LP_MISR_CTRL_HDMI 0x458 Loading Loading
Documentation/devicetree/bindings/fb/mdss-mdp.txt +9 −0 Original line number Diff line number Diff line Loading @@ -176,6 +176,11 @@ Optional properties: - qcom,mdss-highest-bank-bit: Property to indicate tile format as opposed to usual linear format. The value tells the GPU highest memory bank bit used. - qcom,mdss-pipe-rgb-fixed-mmb: Array of indexes describing fixed Memory Macro Blocks (MMBs) for rgb pipes. First value denotes total numbers of MMBs per pipe while values, if any, following first one denotes indexes of MMBs to that RGB pipe. Optional subnodes: Child nodes representing the frame buffer virtual devices. Loading Loading @@ -233,6 +238,10 @@ Example: qcom,mdss-pipe-vig-fetch-id = <1 4 7>; qcom,mdss-pipe-rgb-fetch-id = <16 17 18>; qcom,mdss-pipe-dma-fetch-id = <10 13>; qcom,mdss-pipe-rgb-fixed-mmb = <2 0 1>, <2 2 3>, <2 4 5>, <2 6 7>; qcom,mdss-smp-data = <22 4096>; qcom,mdss-rot-block-size = <64>; qcom,mdss-smp-mb-per-pipe = <2>; Loading
drivers/video/msm/mdss/mdss.h +5 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,8 @@ #define MDSS_REG_WRITE(addr, val) writel_relaxed(val, mdss_res->mdp_base + addr) #define MDSS_REG_READ(addr) readl_relaxed(mdss_res->mdp_base + addr) #define MAX_DRV_SUP_MMB_BLKS 44 enum mdss_mdp_clk_type { MDSS_CLK_AHB, MDSS_CLK_AXI, Loading Loading @@ -116,6 +118,9 @@ struct mdss_data_type { u32 nvig_pipes; u32 nrgb_pipes; u32 ndma_pipes; DECLARE_BITMAP(mmb_alloc_map, MAX_DRV_SUP_MMB_BLKS); struct mdss_mdp_mixer *mixer_intf; struct mdss_mdp_mixer *mixer_wb; u32 nmixers_intf; Loading
drivers/video/msm/mdss/mdss_mdp.c +45 −2 Original line number Diff line number Diff line Loading @@ -1868,7 +1868,8 @@ static int mdss_mdp_parse_dt_smp(struct platform_device *pdev) struct mdss_data_type *mdata = platform_get_drvdata(pdev); u32 num; u32 data[2]; int rc; int rc, len; const u32 *arr; num = mdss_mdp_parse_dt_prop_len(pdev, "qcom,mdss-smp-data"); Loading @@ -1890,7 +1891,49 @@ static int mdss_mdp_parse_dt_smp(struct platform_device *pdev) "qcom,mdss-smp-mb-per-pipe", data); mdata->smp_mb_per_pipe = (!rc ? data[0] : 0); return 0; rc = 0; arr = of_get_property(pdev->dev.of_node, "qcom,mdss-pipe-rgb-fixed-mmb", &len); if (arr) { int i, j, k; u32 cnt, mmb; len /= sizeof(u32); for (i = 0, k = 0; i < len; k++) { struct mdss_mdp_pipe *pipe = NULL; if (k >= mdata->nrgb_pipes) { pr_err("invalid fixed mmbs for rgb pipes\n"); return -EINVAL; } pipe = &mdata->rgb_pipes[k]; cnt = be32_to_cpu(arr[i++]); if (cnt == 0) continue; for (j = 0; j < cnt; j++) { mmb = be32_to_cpu(arr[i++]); if (mmb > mdata->smp_mb_cnt) { pr_err("overflow mmb%d: rgb%d: max%d\n", mmb, k, mdata->smp_mb_cnt); return -EINVAL; } /* rgb pipes fetches only single plane */ set_bit(mmb, pipe->smp_map[0].fixed); } if (bitmap_intersects(pipe->smp_map[0].fixed, mdata->mmb_alloc_map, mdata->smp_mb_cnt)) { pr_err("overlapping fixed mmb map\n"); return -EINVAL; } bitmap_or(mdata->mmb_alloc_map, pipe->smp_map[0].fixed, mdata->mmb_alloc_map, mdata->smp_mb_cnt); } } return rc; } static int mdss_mdp_parse_dt_misc(struct platform_device *pdev) Loading
drivers/video/msm/mdss/mdss_mdp.h +3 −2 Original line number Diff line number Diff line Loading @@ -316,8 +316,9 @@ struct mdss_pipe_pp_res { }; struct mdss_mdp_pipe_smp_map { DECLARE_BITMAP(reserved, MDSS_MDP_SMP_MMB_BLOCKS); DECLARE_BITMAP(allocated, MDSS_MDP_SMP_MMB_BLOCKS); DECLARE_BITMAP(reserved, MAX_DRV_SUP_MMB_BLKS); DECLARE_BITMAP(allocated, MAX_DRV_SUP_MMB_BLKS); DECLARE_BITMAP(fixed, MAX_DRV_SUP_MMB_BLKS); }; struct mdss_mdp_pipe { Loading
drivers/video/msm/mdss/mdss_mdp_hwio.h +0 −2 Original line number Diff line number Diff line Loading @@ -500,8 +500,6 @@ enum mdss_mdp_pingpong_index { #define MDSS_MDP_REG_SMP_ALLOC_W0 0x00180 #define MDSS_MDP_REG_SMP_ALLOC_R0 0x00230 #define MDSS_MDP_SMP_MMB_BLOCKS 44 #define MDSS_MDP_LP_MISR_SEL 0x450 #define MDSS_MDP_LP_MISR_CTRL_MDP 0x454 #define MDSS_MDP_LP_MISR_CTRL_HDMI 0x458 Loading