.. | .. |
---|
163 | 163 | |
---|
164 | 164 | static int tcon_enable(struct ebc_tcon *tcon, struct ebc_panel *panel) |
---|
165 | 165 | { |
---|
166 | | - u32 width, height, vir_width, vir_height; |
---|
167 | | - |
---|
168 | 166 | clk_prepare_enable(tcon->hclk); |
---|
169 | 167 | clk_prepare_enable(tcon->dclk); |
---|
170 | 168 | pm_runtime_get_sync(tcon->dev); |
---|
171 | 169 | |
---|
172 | | - if (panel->rearrange) { |
---|
173 | | - width = panel->width * 2; |
---|
174 | | - height = panel->height / 2; |
---|
175 | | - vir_width = panel->vir_width * 2; |
---|
176 | | - vir_height = panel->vir_height / 2; |
---|
177 | | - } else { |
---|
178 | | - width = panel->width; |
---|
179 | | - height = panel->height; |
---|
180 | | - vir_width = panel->vir_width; |
---|
181 | | - vir_height = panel->vir_height; |
---|
182 | | - } |
---|
183 | | - |
---|
184 | 170 | /* panel timing and win info config */ |
---|
185 | 171 | tcon_write(tcon, EBC_DSP_HTIMING0, |
---|
186 | | - DSP_HTOTAL(panel->lsl + panel->lbl + panel->ldl + panel->lel) | DSP_HS_END(panel->lsl)); |
---|
| 172 | + DSP_HTOTAL(panel->lsl + panel->lbl + panel->ldl + panel->lel) | DSP_HS_END(panel->lsl + 2)); |
---|
187 | 173 | tcon_write(tcon, EBC_DSP_HTIMING1, |
---|
188 | 174 | DSP_HACT_END(panel->lsl + panel->lbl + panel->ldl) | DSP_HACT_ST(panel->lsl + panel->lbl - 1)); |
---|
189 | 175 | tcon_write(tcon, EBC_DSP_VTIMING0, |
---|
190 | 176 | DSP_VTOTAL(panel->fsl + panel->fbl + panel->fdl + panel->fel) | DSP_VS_END(panel->fsl)); |
---|
191 | 177 | tcon_write(tcon, EBC_DSP_VTIMING1, |
---|
192 | 178 | DSP_VACT_END(panel->fsl + panel->fbl + panel->fdl) | DSP_VACT_ST(panel->fsl + panel->fbl)); |
---|
193 | | - tcon_write(tcon, EBC_DSP_ACT_INFO, DSP_HEIGHT(height) | DSP_WIDTH(width)); |
---|
194 | | - tcon_write(tcon, EBC_WIN_VIR, WIN_VIR_HEIGHT(vir_height) | WIN_VIR_WIDTH(vir_width)); |
---|
195 | | - tcon_write(tcon, EBC_WIN_ACT, WIN_ACT_HEIGHT(height) | WIN_ACT_WIDTH(width)); |
---|
196 | | - tcon_write(tcon, EBC_WIN_DSP, WIN_DSP_HEIGHT(height) | WIN_DSP_WIDTH(width)); |
---|
| 179 | + tcon_write(tcon, EBC_DSP_ACT_INFO, DSP_HEIGHT(panel->height) | DSP_WIDTH(panel->width)); |
---|
| 180 | + tcon_write(tcon, EBC_WIN_VIR, WIN_VIR_HEIGHT(panel->vir_height) | WIN_VIR_WIDTH(panel->vir_width)); |
---|
| 181 | + tcon_write(tcon, EBC_WIN_ACT, WIN_ACT_HEIGHT(panel->height) | WIN_ACT_WIDTH(panel->width)); |
---|
| 182 | + tcon_write(tcon, EBC_WIN_DSP, WIN_DSP_HEIGHT(panel->height) | WIN_DSP_WIDTH(panel->width)); |
---|
197 | 183 | tcon_write(tcon, EBC_WIN_DSP_ST, WIN_DSP_YST(panel->fsl + panel->fbl) | WIN_DSP_XST(panel->lsl + panel->lbl)); |
---|
198 | 184 | |
---|
199 | 185 | /* win2 fifo is 512x128, win fifo is 256x128, we set fifo almost value (fifo_size - 16) |
---|
.. | .. |
---|
223 | 209 | | EPD_SDSHR(1)); |
---|
224 | 210 | tcon_write(tcon, EBC_DSP_START, DSP_SDCE_WIDTH(panel->ldl) | SW_BURST_CTRL); |
---|
225 | 211 | tcon_write(tcon, EBC_DSP_CTRL, |
---|
226 | | - DSP_SWAP_MODE(panel->panel_16bit ? 2 : 3) | DSP_VCOM_MODE(1) | DSP_SDCLK_DIV(0)); |
---|
| 212 | + DSP_SWAP_MODE(panel->panel_16bit ? 2 : 3) | DSP_VCOM_MODE(1) | DSP_SDCLK_DIV(panel->panel_16bit ? 7 : 3)); |
---|
227 | 213 | tcon_cfg_done(tcon); |
---|
228 | 214 | |
---|
229 | 215 | enable_irq(tcon->irq); |
---|
.. | .. |
---|
307 | 293 | intr_status = tcon_read(tcon, EBC_INT_STATUS); |
---|
308 | 294 | |
---|
309 | 295 | if (intr_status & DSP_END_INT) { |
---|
310 | | - tcon_update_bits(tcon, EBC_INT_STATUS, DSP_END_INT_CLR | LINE_FLAG_INT_CLR, DSP_END_INT_CLR | LINE_FLAG_INT_CLR); |
---|
| 296 | + tcon_update_bits(tcon, EBC_INT_STATUS, DSP_END_INT_CLR, DSP_END_INT_CLR); |
---|
311 | 297 | |
---|
312 | 298 | if (tcon->dsp_end_callback) |
---|
313 | 299 | tcon->dsp_end_callback(); |
---|