|
@@ -41,9 +41,9 @@ static bool dsi_compression_enabled(struct dsi_mode_info *mode)
|
|
|
|
|
|
/* Unsupported formats default to RGB888 */
|
|
|
static const u8 cmd_mode_format_map[DSI_PIXEL_FORMAT_MAX] = {
|
|
|
- 0x6, 0x7, 0x8, 0x8, 0x0, 0x3, 0x4 };
|
|
|
+ 0x6, 0x7, 0x8, 0x8, 0x0, 0x3, 0x4, 0x9 };
|
|
|
static const u8 video_mode_format_map[DSI_PIXEL_FORMAT_MAX] = {
|
|
|
- 0x0, 0x1, 0x2, 0x3, 0x3, 0x3, 0x3 };
|
|
|
+ 0x0, 0x1, 0x2, 0x3, 0x3, 0x3, 0x3, 0x4 };
|
|
|
|
|
|
/**
|
|
|
* dsi_split_link_setup() - setup dsi split link configurations
|
|
@@ -543,10 +543,13 @@ void dsi_ctrl_hw_cmn_setup_cmd_stream(struct dsi_ctrl_hw *ctrl,
|
|
|
u32 reg = 0, offset = 0;
|
|
|
int pic_width = 0, this_frame_slices = 0, intf_ip_w = 0;
|
|
|
u32 pkt_per_line = 0, eol_byte_num = 0, bytes_in_slice = 0;
|
|
|
+ u32 bpp;
|
|
|
|
|
|
if (roi && (!roi->w || !roi->h))
|
|
|
return;
|
|
|
|
|
|
+ bpp = dsi_pixel_format_to_bpp(cfg->dst_format);
|
|
|
+
|
|
|
if (dsi_dsc_compression_enabled(mode)) {
|
|
|
struct msm_display_dsc_info dsc;
|
|
|
|
|
@@ -580,11 +583,11 @@ void dsi_ctrl_hw_cmn_setup_cmd_stream(struct dsi_ctrl_hw *ctrl,
|
|
|
bytes_in_slice = vdc.bytes_in_slice;
|
|
|
} else if (roi) {
|
|
|
width_final = roi->w;
|
|
|
- stride_final = roi->w * 3;
|
|
|
+ stride_final = DIV_ROUND_UP(roi->w * bpp, 8);
|
|
|
height_final = roi->h;
|
|
|
} else {
|
|
|
width_final = mode->h_active;
|
|
|
- stride_final = mode->h_active * 3;
|
|
|
+ stride_final = DIV_ROUND_UP(mode->h_active * bpp, 8);
|
|
|
height_final = mode->v_active;
|
|
|
}
|
|
|
|
|
@@ -701,7 +704,7 @@ void dsi_ctrl_hw_cmn_video_engine_setup(struct dsi_ctrl_hw *ctrl,
|
|
|
reg |= (cfg->bllp_lp11_en ? BIT(12) : 0);
|
|
|
reg |= (cfg->traffic_mode & 0x3) << 8;
|
|
|
reg |= (cfg->vc_id & 0x3);
|
|
|
- reg |= (video_mode_format_map[common_cfg->dst_format] & 0x3) << 4;
|
|
|
+ reg |= (video_mode_format_map[common_cfg->dst_format] & 0x7) << 4;
|
|
|
DSI_W32(ctrl, DSI_VIDEO_MODE_CTRL, reg);
|
|
|
|
|
|
reg = (common_cfg->swap_mode & 0x7) << 12;
|