summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSafayat Ullah <safayat@google.com>2023-11-03 08:35:43 +0000
committerSafayat Ullah <safayat@google.com>2023-11-16 06:00:37 +0000
commit541de1c3ab6f983c16ffbb04d5aea150dceb9128 (patch)
tree7752b3c05d7b8b470f9d83240f689bd77e1116f0
parentb222c32640070263b4f58091694285bd54130b6f (diff)
downloaddisplay-541de1c3ab6f983c16ffbb04d5aea150dceb9128.tar.gz
drm: samsung: add callback to panel when cmds are queued
Bug: 290186193 Test: build success Change-Id: I2880af374f4cfe28451b48202cf239c73e3c5ca1 Signed-off-by: Safayat Ullah <safayat@google.com>
-rw-r--r--samsung/exynos_drm_dsim.c8
-rw-r--r--samsung/panel/panel-samsung-drv.h8
2 files changed, 16 insertions, 0 deletions
diff --git a/samsung/exynos_drm_dsim.c b/samsung/exynos_drm_dsim.c
index ea46764..219c37a 100644
--- a/samsung/exynos_drm_dsim.c
+++ b/samsung/exynos_drm_dsim.c
@@ -63,6 +63,7 @@
#include "exynos_drm_crtc.h"
#include "exynos_drm_decon.h"
#include "exynos_drm_dsim.h"
+#include "panel/panel-samsung-drv.h"
struct dsim_device *dsim_drvdata[MAX_DSI_CNT];
@@ -2085,6 +2086,11 @@ static int dsim_write_data_locked(struct dsim_device *dsim, const struct mipi_ds
const u16 flags = msg->flags;
bool is_last;
struct mipi_dsi_packet packet = { .size = 0 };
+ const struct drm_bridge *bridge = dsim->panel_bridge;
+ struct exynos_panel *panel = bridge ?
+ container_of((bridge), struct exynos_panel, bridge) : NULL;
+ const struct exynos_panel_funcs *funcs = (panel && panel->desc) ?
+ panel->desc->exynos_panel_func : NULL;
WARN_ON(!mutex_is_locked(&dsim->cmd_lock));
@@ -2161,6 +2167,8 @@ static int dsim_write_data_locked(struct dsim_device *dsim, const struct mipi_ds
trace_dsi_cmd:
trace_dsi_tx(msg->type, msg->tx_buf, msg->tx_len, is_last);
dsim_debug(dsim, "%s last command\n", is_last ? "" : "Not");
+ if (funcs && funcs->on_queue_ddic_cmd)
+ funcs->on_queue_ddic_cmd(panel, msg, is_last);
err:
trace_dsi_cmd_fifo_status(dsim->total_pend_ph, dsim->total_pend_pl);
DPU_ATRACE_END(__func__);
diff --git a/samsung/panel/panel-samsung-drv.h b/samsung/panel/panel-samsung-drv.h
index 6fbf5b6..93f3bbc 100644
--- a/samsung/panel/panel-samsung-drv.h
+++ b/samsung/panel/panel-samsung-drv.h
@@ -440,6 +440,14 @@ struct exynos_panel_funcs {
*/
unsigned int (*get_te_usec)(struct exynos_panel *exynos_panel,
const struct exynos_panel_mode *pmode);
+
+ /**
+ * @on_queue_ddic_cmd
+ *
+ * This callback is to nofity the panel driver when a ddic command is queued.
+ */
+ void (*on_queue_ddic_cmd)(struct exynos_panel *exynos_panel,
+ const struct mipi_dsi_msg *msg, const bool is_last);
};
/**