@@ -89,6 +89,18 @@ static __maybe_unused int sharp_panel_read(struct sharp_panel *sharp,
return err;
}
+static int sharp_panel_idle(struct drm_panel *panel)
+{
+ struct sharp_panel *sharp = to_sharp_panel(panel);
+ int err = 0;
+
+ err = mipi_dsi_dcs_enter_idle_mode(sharp->link1);
+ if (err < 0)
+ dev_err(panel->dev, "failed to enter idle: %d\n", err);
+
+ return err;
+}
+
static int sharp_panel_disable(struct drm_panel *panel)
{
struct sharp_panel *sharp = to_sharp_panel(panel);
@@ -167,6 +179,18 @@ static int sharp_setup_symmetrical_split(struct mipi_dsi_device *left,
return 0;
}
+static int sharp_panel_busy(struct drm_panel *panel)
+{
+ struct sharp_panel *sharp = to_sharp_panel(panel);
+ int err = 0;
+
+ err = mipi_dsi_dcs_exit_idle_mode(sharp->link1);
+ if (err < 0)
+ dev_err(panel->dev, "failed to exit idle: %d\n", err);
+
+ return err;
+}
+
static int sharp_panel_prepare(struct drm_panel *panel)
{
struct sharp_panel *sharp = to_sharp_panel(panel);
@@ -318,6 +342,8 @@ static int sharp_panel_get_modes(struct drm_panel *panel)
}
static const struct drm_panel_funcs sharp_panel_funcs = {
+ .idle = sharp_panel_idle,
+ .busy = sharp_panel_busy,
.disable = sharp_panel_disable,
.unprepare = sharp_panel_unprepare,
.prepare = sharp_panel_prepare,
Signed-off-by: Mark Zhang <markz@nvidia.com> --- drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+)