OSDN Git Service

msm: mdss: enable VBIF write_gather for WB2
authorVeera Sundaram Sankaran <veeras@codeaurora.org>
Tue, 30 Aug 2016 22:29:35 +0000 (15:29 -0700)
committerVeera Sundaram Sankaran <veeras@codeaurora.org>
Wed, 31 Aug 2016 19:37:16 +0000 (12:37 -0700)
LM provides data stream with some write gaps that are propagated
through VBIF to AXI. If write gap is big enough it hangs AXI/BMIC.
In order to ensure there are no gaps in the outgoing data transfer
to AXI interface, all write data must available before initiating
an access. Starting with SDE3xx, the outgoing burst data collection
function is implemented in VBIF module, and it is HW recommendation
to enable this for WB2.

Change-Id: I6f0495068dd6344f8cd161175947391e5998b8d4
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
drivers/video/fbdev/msm/mdss.h
drivers/video/fbdev/msm/mdss_mdp.c
drivers/video/fbdev/msm/mdss_mdp_hwio.h
drivers/video/fbdev/msm/mdss_mdp_intf_writeback.c

index 4724f43..609a7ae 100644 (file)
@@ -191,6 +191,7 @@ enum mdss_qos_settings {
        MDSS_QOS_TS_PREFILL,
        MDSS_QOS_REMAPPER,
        MDSS_QOS_IB_NOCR,
+       MDSS_QOS_WB2_WRITE_GATHER_EN,
        MDSS_QOS_MAX,
 };
 
index e1aa004..ca58b13 100644 (file)
@@ -1981,6 +1981,7 @@ static void mdss_mdp_hw_rev_caps_init(struct mdss_data_type *mdata)
                set_bit(MDSS_QOS_SIMPLIFIED_PREFILL, mdata->mdss_qos_map);
                set_bit(MDSS_QOS_TS_PREFILL, mdata->mdss_qos_map);
                set_bit(MDSS_QOS_IB_NOCR, mdata->mdss_qos_map);
+               set_bit(MDSS_QOS_WB2_WRITE_GATHER_EN, mdata->mdss_qos_map);
                set_bit(MDSS_CAPS_YUV_CONFIG, mdata->mdss_caps_map);
                set_bit(MDSS_CAPS_SCM_RESTORE_NOT_REQUIRED,
                        mdata->mdss_caps_map);
index f54cbb5..5d8c831 100644 (file)
@@ -829,6 +829,7 @@ enum mdss_mdp_pingpong_index {
 #define MMSS_VBIF_CLKON                        0x4
 #define MMSS_VBIF_RD_LIM_CONF                  0x0B0
 #define MMSS_VBIF_WR_LIM_CONF                  0x0C0
+#define MDSS_VBIF_WRITE_GATHER_EN              0x0AC
 
 #define MMSS_VBIF_XIN_HALT_CTRL0       0x200
 #define MMSS_VBIF_XIN_HALT_CTRL1       0x204
index 9026b99..40b10e3 100644 (file)
@@ -488,6 +488,10 @@ int mdss_mdp_writeback_prepare_cwb(struct mdss_mdp_ctl *ctl,
                                mdss_mdp_writeback_cwb_overflow, sctl);
        }
 
+       if (test_bit(MDSS_QOS_WB2_WRITE_GATHER_EN, ctl->mdata->mdss_qos_map))
+               MDSS_VBIF_WRITE(ctl->mdata, MDSS_VBIF_WRITE_GATHER_EN,
+                       BIT(6), false);
+
        if (ctl->mdata->default_ot_wr_limit || ctl->mdata->default_ot_rd_limit)
                mdss_mdp_set_ot_limit_wb(ctx, false);
 
@@ -907,6 +911,10 @@ static int mdss_mdp_writeback_display(struct mdss_mdp_ctl *ctl, void *arg)
                return ret;
        }
 
+       if (test_bit(MDSS_QOS_WB2_WRITE_GATHER_EN, ctl->mdata->mdss_qos_map))
+               MDSS_VBIF_WRITE(ctl->mdata, MDSS_VBIF_WRITE_GATHER_EN,
+                       BIT(6), false);
+
        mdss_mdp_set_intr_callback(ctx->intr_type, ctx->intf_num,
                   mdss_mdp_writeback_intr_done, ctl);