|
发表于 2022-2-16 18:11:53
只看该作者
5#
我做过实验在显示过程中将mipi接口模式改变然后发送命令再将模式还原是可行的,但是发送命令的数据大小不能大于10字节;我现在的问题是怎么才能在这个过程中发送一个大于10字节的数据包(比如img数据包)(因为我们自己做的屏有些特殊需要这样操作)
这是我自己写的代码
static int panel_send_cmd(struct drm_panel *panel, u8 *data)
{
struct panel_simple *p = to_panel_simple(panel);
struct device *dev = p->base.dev;
struct mipi_dsi_device *dsi = p->dsi;
int err;
int ret;
printk("panel_send_cmd \n");
dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
err = mipi_dsi_dcs_set_display_off(dsi);
err = mipi_dsi_dcs_enter_sleep_mode(dsi);
dsi->mode_flags |= MIPI_DSI_MODE_LPM;
err = mipi_dsi_dcs_exit_sleep_mode(dsi);
msleep(125);
ret = mipi_dsi_generic_write(dsi, data, strlen(data));
if (ret < 0) {
printk("failed to send data: %d\n", ret);
return ret;
}
mdelay(100);
err = mipi_dsi_dcs_set_display_on(dsi);
msleep(20);
printk("panel_send_cmd : mipi_dsi_generic_write ret = %d \n", ret);
p->prepared = true;
return 0;
}
依据:RKDocs\common\display\Rockchip_Developer_Guide_DRM_Panel_Porting_CN&EN.pdf 修改
求教有没有什么办法可以解决这个问题。
|
|