@@ -845,7 +845,6 @@ static void dsi_update_dsc_timing(struct msm_dsi_host *msm_host, bool is_cmd_mod
845
845
u32 reg , reg_ctrl , reg_ctrl2 ;
846
846
u32 slice_per_intf , total_bytes_per_intf ;
847
847
u32 pkt_per_line ;
848
- u32 bytes_in_slice ;
849
848
u32 eol_byte_num ;
850
849
851
850
/* first calculate dsc parameters and then program
@@ -860,11 +859,7 @@ static void dsi_update_dsc_timing(struct msm_dsi_host *msm_host, bool is_cmd_mod
860
859
if (slice_per_intf > dsc -> slice_count )
861
860
dsc -> slice_count = 1 ;
862
861
863
- bytes_in_slice = DIV_ROUND_UP (dsc -> slice_width * dsc -> bits_per_pixel , 8 );
864
-
865
- dsc -> slice_chunk_size = bytes_in_slice ;
866
-
867
- total_bytes_per_intf = bytes_in_slice * slice_per_intf ;
862
+ total_bytes_per_intf = dsc -> slice_chunk_size * slice_per_intf ;
868
863
869
864
eol_byte_num = total_bytes_per_intf % 3 ;
870
865
pkt_per_line = slice_per_intf / dsc -> slice_count ;
@@ -890,7 +885,7 @@ static void dsi_update_dsc_timing(struct msm_dsi_host *msm_host, bool is_cmd_mod
890
885
reg_ctrl |= reg ;
891
886
892
887
reg_ctrl2 &= ~DSI_COMMAND_COMPRESSION_MODE_CTRL2_STREAM0_SLICE_WIDTH__MASK ;
893
- reg_ctrl2 |= DSI_COMMAND_COMPRESSION_MODE_CTRL2_STREAM0_SLICE_WIDTH (bytes_in_slice );
888
+ reg_ctrl2 |= DSI_COMMAND_COMPRESSION_MODE_CTRL2_STREAM0_SLICE_WIDTH (dsc -> slice_chunk_size );
894
889
895
890
dsi_write (msm_host , REG_DSI_COMMAND_COMPRESSION_MODE_CTRL , reg_ctrl );
896
891
dsi_write (msm_host , REG_DSI_COMMAND_COMPRESSION_MODE_CTRL2 , reg_ctrl2 );
0 commit comments