diff --git a/framework/model/display/driver/hdf_drm_panel.c b/framework/model/display/driver/hdf_drm_panel.c index 4e2f5b211f57c7a23eb476a093fbdd907beb8558..de9a25ab17ec01b81e4cbf37429b3734b8f05a88 100644 --- a/framework/model/display/driver/hdf_drm_panel.c +++ b/framework/model/display/driver/hdf_drm_panel.c @@ -33,7 +33,7 @@ static int HdfDrmPanelUnprepare(struct drm_panel *panel) struct HdfDrmPanel *hdfDrmPanel = ToHdfDrmPanel(panel); struct PanelData *panelData; - HDF_LOGD("HdfDrmPanelUnprepare"); + HDF_LOGE("yktest HdfDrmPanelUnprepare"); if (hdfDrmPanel->index >= PANEL_MAX) { HDF_LOGE("panel num out of PANEL_MAX"); return HDF_FAILURE; @@ -42,6 +42,7 @@ static int HdfDrmPanelUnprepare(struct drm_panel *panel) panelData = hdfDrmPanel->manager->panelManager->panel[hdfDrmPanel->index]; panelData->unprepare(panelData); OsalMutexUnlock(&hdfDrmPanel->manager->dispMutex); + HDF_LOGE("yktest HdfDrmPanelUnprepare end"); return HDF_SUCCESS; } @@ -50,7 +51,7 @@ static int HdfDrmPanelPrepare(struct drm_panel *panel) struct HdfDrmPanel *hdfDrmPanel = ToHdfDrmPanel(panel); struct PanelData *panelData; - HDF_LOGD("HdfDrmPanelPrepare"); + HDF_LOGE("yktest HdfDrmPanelPrepare"); if (hdfDrmPanel->index >= PANEL_MAX) { HDF_LOGE("panel num out of PANEL_MAX"); return HDF_FAILURE; @@ -59,6 +60,7 @@ static int HdfDrmPanelPrepare(struct drm_panel *panel) panelData = hdfDrmPanel->manager->panelManager->panel[hdfDrmPanel->index]; panelData->prepare(panelData); OsalMutexUnlock(&hdfDrmPanel->manager->dispMutex); + HDF_LOGE("yktest HdfDrmPanelPrepare end"); return HDF_SUCCESS; } @@ -67,7 +69,7 @@ static int HdfDrmPanelDisable(struct drm_panel *panel) struct HdfDrmPanel *hdfDrmPanel = ToHdfDrmPanel(panel); struct PanelData *panelData; - HDF_LOGD("HdfDrmPanelDisable"); + HDF_LOGE("yktest HdfDrmPanelDisable"); if (hdfDrmPanel->index >= PANEL_MAX) { HDF_LOGE("panel num out of PANEL_MAX"); return HDF_FAILURE; @@ -76,6 +78,7 @@ static int HdfDrmPanelDisable(struct drm_panel *panel) panelData = hdfDrmPanel->manager->panelManager->panel[hdfDrmPanel->index]; panelData->off(panelData); OsalMutexUnlock(&hdfDrmPanel->manager->dispMutex); + HDF_LOGE("yktest HdfDrmPanelDisable end"); return HDF_SUCCESS; } @@ -84,7 +87,7 @@ static int HdfDrmPanelEnable(struct drm_panel *panel) struct HdfDrmPanel *hdfDrmPanel = ToHdfDrmPanel(panel); struct PanelData *panelData; - HDF_LOGD("HdfDrmPanelEnable"); + HDF_LOGE("yktest HdfDrmPanelEnable"); if (hdfDrmPanel->index >= PANEL_MAX) { HDF_LOGE("panel num out of PANEL_MAX"); return HDF_FAILURE; @@ -93,6 +96,7 @@ static int HdfDrmPanelEnable(struct drm_panel *panel) OsalMutexLock(&hdfDrmPanel->manager->dispMutex); panelData->on(panelData); OsalMutexUnlock(&hdfDrmPanel->manager->dispMutex); + HDF_LOGE("yktest HdfDrmPanelEnable end"); return HDF_SUCCESS; } @@ -110,7 +114,7 @@ static int HdfDrmPanelGetModes(struct drm_panel *panel, struct drm_connector *co HDF_LOGE("connector is NULL"); return 0; } - HDF_LOGD("HdfDrmPanelGetModes"); + HDF_LOGE("yktest HdfDrmPanelGetModes"); hdfDrmPanel = ToHdfDrmPanel(panel); panelInfo = hdfDrmPanel->manager->panelManager->panel[hdfDrmPanel->index]->info; mode = drm_mode_duplicate(connector->dev, &hdfDrmPanel->mode); @@ -125,6 +129,7 @@ static int HdfDrmPanelGetModes(struct drm_panel *panel, struct drm_connector *co connector->display_info.width_mm = panelInfo->pWidth; connector->display_info.height_mm = panelInfo->pHeight; drm_mode_probed_add(connector, mode); + HDF_LOGE("yktest HdfDrmPanelGetModes end"); return 1; } @@ -142,6 +147,7 @@ static ssize_t SuspendStore(struct device *dev, int32_t ret; struct HdfDrmPanel *hdfDrmPanel = dev_get_drvdata(dev); + HDF_LOGE("yktest SuspendStore"); ret = HdfDrmPanelDisable(&hdfDrmPanel->panel); if (ret != HDF_SUCCESS) { HDF_LOGE("%s HdfDrmPanelDisable fail", __func__); @@ -152,6 +158,7 @@ static ssize_t SuspendStore(struct device *dev, HDF_LOGE("%s HdfDrmPanelUnprepare fail", __func__); return count; } + HDF_LOGE("yktest SuspendStore end"); return count; } static DEVICE_ATTR(suspend, S_IWUSR, NULL, SuspendStore); @@ -162,6 +169,7 @@ static ssize_t ResumeStore(struct device *dev, int32_t ret; struct HdfDrmPanel *hdfDrmPanel = dev_get_drvdata(dev); + HDF_LOGE("yktest ResumeStore"); ret = HdfDrmPanelPrepare(&hdfDrmPanel->panel); if (ret != HDF_SUCCESS) { HDF_LOGE("%s HdfDrmPanelPrepare fail", __func__); @@ -172,6 +180,7 @@ static ssize_t ResumeStore(struct device *dev, HDF_LOGE("%s HdfDrmPanelEnable fail", __func__); return count; } + HDF_LOGE("yktest ResumeStore end"); return count; } static DEVICE_ATTR(resume, S_IWUSR, NULL, ResumeStore); @@ -179,6 +188,7 @@ static DEVICE_ATTR(resume, S_IWUSR, NULL, ResumeStore); static ssize_t BacklightStore(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { + HDF_LOGE("yktest BacklightStore"); int32_t ret; unsigned long level; struct PanelData *panel = NULL; @@ -196,7 +206,7 @@ static ssize_t BacklightStore(struct device *dev, if (ret != HDF_SUCCESS) { HDF_LOGE("%s UpdateBrightness fail", __func__); } - + HDF_LOGE("yktest BacklightStore end"); return count; } static DEVICE_ATTR(backlight, S_IWUSR, NULL, BacklightStore); @@ -211,6 +221,7 @@ static struct device_attribute *g_panelAttrs[] = { static void CreateDrmMode(struct HdfDrmPanel *hdfDrmPanel) { + HDF_LOGE("yktest CreateDrmMode"); uint32_t panelIndex; struct PanelInfo *panelInfo = NULL; @@ -226,6 +237,7 @@ static void CreateDrmMode(struct HdfDrmPanel *hdfDrmPanel) hdfDrmPanel->mode.vsync_end = panelInfo->height + panelInfo->vfp + panelInfo->vsw; hdfDrmPanel->mode.vtotal = panelInfo->height + panelInfo->vfp + panelInfo->vsw + panelInfo->vbp; hdfDrmPanel->mode.flags = 10; /* 10: Sync and timing flags, detial at include/drm/drm_modes.h */ + HDF_LOGE("yktest CreateDrmMode end"); } static struct HdfDrmPanel *InstanceHdfDrmPanel(struct DispManager *manager, int32_t index) @@ -245,6 +257,7 @@ static struct HdfDrmPanel *InstanceHdfDrmPanel(struct DispManager *manager, int3 static int32_t HdfDrmPanelEntryInit(struct HdfDeviceObject *object) { + HDF_LOGE("yktest HdfDrmPanelEntryInit"); (void)object; uint32_t ret; uint32_t i; @@ -285,7 +298,7 @@ static int32_t HdfDrmPanelEntryInit(struct HdfDeviceObject *object) } HDF_LOGI("%s panel[%d] registered success", __func__, i); } - HDF_LOGI("%s success", __func__); + HDF_LOGE("yktest %s success", __func__); return HDF_SUCCESS; } diff --git a/framework/model/display/driver/panel/ili9881_st_5p5.c b/framework/model/display/driver/panel/ili9881_st_5p5.c index 6ca69a7faec9e5d53da8a492b2cc9681d1200a44..b046fcd595171ad5286f4bfb76c551639a4c8dfa 100755 --- a/framework/model/display/driver/panel/ili9881_st_5p5.c +++ b/framework/model/display/driver/panel/ili9881_st_5p5.c @@ -415,6 +415,7 @@ static struct panel_ili9881_dev *ToPanelSimpleDev(const struct PanelData *panel) static int32_t panel_simple_regulator_enable(void) { + HDF_LOGE("yktest panel_simple_regulator_enable"); int32_t err; if (g_panel_dev == NULL) { return -1; @@ -424,19 +425,23 @@ static int32_t panel_simple_regulator_enable(void) HDF_LOGE("regulator_enable failed"); return err; } + HDF_LOGE("yktest panel_simple_regulator_enable end"); return 0; } static int32_t panel_simple_regulator_disable(void) { + HDF_LOGE("yktest panel_simple_regulator_disable"); if (g_panel_dev == NULL) { return -1; } regulator_disable(g_panel_dev->supply); + HDF_LOGE("yktest panel_simple_regulator_disable end"); return 0; } int panel_simple_loader_protect(struct drm_panel *panel) { + HDF_LOGE("yktest panel_simple_loader_protect"); int err; (void)panel; err = panel_simple_regulator_enable(); @@ -444,6 +449,7 @@ int panel_simple_loader_protect(struct drm_panel *panel) HDF_LOGE("failed to enable supply: %d\n", err); return err; } + HDF_LOGE("yktest panel_simple_loader_protect end"); return 0; } EXPORT_SYMBOL(panel_simple_loader_protect); @@ -453,7 +459,7 @@ static int32_t PanelSendCmds(struct mipi_dsi_device *dsi, { int32_t i = 0; - HDF_LOGI("%s enter", __func__); + HDF_LOGE("yktest %s enter", __func__); if (dsi == NULL) { HDF_LOGE("dsi is NULL"); return -EINVAL; @@ -464,28 +470,31 @@ static int32_t PanelSendCmds(struct mipi_dsi_device *dsi, OsalMSleep(cmds[i].delay); } } + HDF_LOGE("yktest PanelSendCmds end"); return HDF_SUCCESS; } static int32_t PanelOn(struct PanelData *panel) { struct panel_ili9881_dev *panel_dev = NULL; - + HDF_LOGE("yktest PanelOn"); panel_dev = ToPanelSimpleDev(panel); if (panel_dev->hw_delay.enable_delay) { OsalMSleep(panel_dev->hw_delay.enable_delay); } + HDF_LOGE("yktest PanelOn end"); return HDF_SUCCESS; } static int32_t PanelOff(struct PanelData *panel) { struct panel_ili9881_dev *panel_dev = NULL; - + HDF_LOGE("yktest PanelOff"); panel_dev = ToPanelSimpleDev(panel); if (panel_dev->hw_delay.disable_delay) { OsalMSleep(panel_dev->hw_delay.disable_delay); } + HDF_LOGE("yktest PanelOff end"); return HDF_SUCCESS; } @@ -493,7 +502,7 @@ static int32_t PanelPrepare(struct PanelData *panel) { int32_t ret; struct panel_ili9881_dev *panel_dev = NULL; - + HDF_LOGE("yktest PanelPrepare"); panel_dev = ToPanelSimpleDev(panel); ret = regulator_enable(panel_dev->supply); if (ret < 0) { @@ -527,7 +536,7 @@ static int32_t PanelPrepare(struct PanelData *panel) if (panel_dev->hw_delay.init_delay > 0) { OsalMSleep(panel_dev->hw_delay.init_delay); } - + HDF_LOGE("yktest PanelPrepare end"); return HDF_SUCCESS; } @@ -535,7 +544,7 @@ static int32_t PanelUnprepare(struct PanelData *panel) { int32_t ret; struct panel_ili9881_dev *panel_dev = NULL; - + HDF_LOGE("yktest PanelUnprepare"); panel_dev = ToPanelSimpleDev(panel); ret = PanelSendCmds(panel_dev->dsiDev, g_panelOffCode, \ @@ -551,12 +560,13 @@ static int32_t PanelUnprepare(struct PanelData *panel) if (panel_dev->hw_delay.unprepare_delay) { OsalMSleep(panel_dev->hw_delay.unprepare_delay); } - + HDF_LOGE("yktest PanelUnprepare end"); return HDF_SUCCESS; } static int32_t PanelInit(struct PanelData *panel) { + HDF_LOGE("yktest PanelInit"); return 0; } @@ -602,10 +612,12 @@ static void PanelResInit(struct panel_ili9881_dev *panel_dev) panel_dev->hw_delay.prepare_delay = 2; /* 2:prepare_delay */ panel_dev->hw_delay.reset_delay = 100; /* 100:reset_delay */ panel_dev->hw_delay.unprepare_delay = 20; /* 20:unprepare_delay */ + HDF_LOGE("yktest PanelResInit end"); } static int32_t PanelRequestGpio(struct panel_ili9881_dev *panel_dev) { + HDF_LOGE("yktest PanelRequestGpio"); struct panel_ili9881_dev *pdev = panel_dev; pdev->enable_gpio = devm_gpiod_get_optional(&pdev->dsiDev->dev, "enable", GPIOD_ASIS); if (IS_ERR(pdev->enable_gpio)) { @@ -622,6 +634,7 @@ static int32_t PanelRequestGpio(struct panel_ili9881_dev *panel_dev) HDF_LOGE("get reset_gpio fail"); return HDF_FAILURE; } + HDF_LOGE("yktest PanelRequestGpio end"); return HDF_SUCCESS; } @@ -629,7 +642,7 @@ static int32_t PanelEntryInit(struct HdfDeviceObject *object) { struct device_node *panelNode = NULL; struct panel_ili9881_dev *panel_dev = NULL; - + HDF_LOGE("yktest PanelEntryInit"); panel_dev = (struct panel_ili9881_dev *)OsalMemCalloc(sizeof(struct panel_ili9881_dev)); if (panel_dev == NULL) { HDF_LOGE("%s panel_dev malloc fail", __func__); @@ -665,6 +678,7 @@ static int32_t PanelEntryInit(struct HdfDeviceObject *object) goto FAIL; } HDF_LOGI("%s success", __func__); + HDF_LOGE("yktest PanelEntryInit end"); return HDF_SUCCESS; FAIL: OsalMemFree(panel_dev);