diff --git a/model/display/driver/backlight/hdf_bl.c b/model/display/driver/backlight/hdf_bl.c index 1f0743961a1944d4fac2476ebf1fbcdc75aca80d..8caa4f59bc8cdce5a3f251591ae1a483c3090383 100644 --- a/model/display/driver/backlight/hdf_bl.c +++ b/model/display/driver/backlight/hdf_bl.c @@ -9,7 +9,6 @@ #include "hdf_bl.h" #include #include "hdf_base.h" -#include "hdf_disp.h" #include "hdf_log.h" #include "osal.h" diff --git a/model/display/driver/hdf_disp.c b/model/display/driver/hdf_disp.c index 4cf12379cbbd98aa2fa977f5fdb4ae1bdda6fe2a..902b3b269c90e28423947f8fdc0ca9ae0cc70fc8 100644 --- a/model/display/driver/hdf_disp.c +++ b/model/display/driver/hdf_disp.c @@ -9,6 +9,7 @@ #include "hdf_disp.h" #include #include "hdf_base.h" +#include "hdf_bl.h" #include "hdf_log.h" #include "osal.h" @@ -172,7 +173,7 @@ static int32_t SetDispPower(uint32_t devId, uint32_t powerStatus) OsalMutexLock(&disp->dispMutex); if (panel->powerStatus == powerStatus) { OsalMutexUnlock(&disp->dispMutex); - HDF_LOGE("%s:devId[%d] already in mode = %d", __func__, devId, powerStatus); + HDF_LOGE("%s: panel already in mode = %d", __func__, powerStatus); return HDF_SUCCESS; } switch (powerStatus) { @@ -394,6 +395,10 @@ static void EsdTimerHandler(uintptr_t arg) struct DispManager *disp = NULL; disp = GetDispManager(); + if ((disp == NULL) || (disp->esd == NULL)) { + HDF_LOGE("%s: disp or esd is null", __func__); + return; + } if (devId >= disp->esd->panelNum) { HDF_LOGE("%s: esd is null", __func__); return; @@ -410,14 +415,20 @@ static void EsdWorkHandler(void *arg) struct DispManager *disp = NULL; disp = GetDispManager(); + if ((disp == NULL) || (disp->panelManager == NULL)) { + HDF_LOGE("%s: disp or panelManager is null", __func__); + return; + } if (devId >= disp->panelManager->panelNum) { HDF_LOGE("%s: dispCtrl is null or panel is null", __func__); return; } panel = disp->panelManager->panel[devId]; - if ((panel->esd != NULL) && (panel->esd->checkFunc != NULL)) { - ret = panel->esd->checkFunc(panel); + if ((panel->esd == NULL) || (panel->esd->checkFunc == NULL)) { + HDF_LOGE("%s: esd or checkFunc is null", __func__); + return; } + ret = panel->esd->checkFunc(panel); if (ret != HDF_SUCCESS) { OsalMutexLock(&disp->dispMutex); if (panel->esd->state == ESD_RUNNING) { @@ -460,7 +471,7 @@ static void EsdCheckStartUp(struct DispEsd *esd, uint32_t devId) EsdTimerHandler, (uintptr_t)devId); OsalTimerStartLoop(esd->timer[devId]); esd->panelEsd[devId]->state = ESD_RUNNING; - HDF_LOGI("%s devId[%d] enable esd check", __func__, devId); + HDF_LOGI("%s panel enable esd check", __func__); } } } @@ -477,7 +488,7 @@ static void EsdCheckEnd(struct DispEsd *esd, uint32_t devId) if (esd->panelEsd[devId]->state == ESD_RUNNING) { OsalTimerDelete(esd->timer[devId]); esd->panelEsd[devId]->state = ESD_READY; - HDF_LOGI("%s devId[%d], disable esd check", __func__, devId); + HDF_LOGI("%s panel disable esd check", __func__); } } } diff --git a/model/display/driver/hdf_disp.h b/model/display/driver/hdf_disp.h index d9c6d9de18f0cb962a5fb8aa5cb76df80d37ba86..8f497d59634da7e43f19c63ba2b49476cab7e47a 100644 --- a/model/display/driver/hdf_disp.h +++ b/model/display/driver/hdf_disp.h @@ -10,7 +10,6 @@ #define HDF_DISP_H #include "hdf_base.h" -#include "hdf_bl.h" #include "hdf_device_desc.h" #include "hdf_log.h" #include "hdf_sbuf.h" diff --git a/model/display/driver/panel/ili9881c_boe.c b/model/display/driver/panel/ili9881c_boe.c index 96945d70ffa0fbf94c2f1b561cd370e59ae8d298..00a8e47885b0faee21d5edf52c93e4e1e86c7bcc 100644 --- a/model/display/driver/panel/ili9881c_boe.c +++ b/model/display/driver/panel/ili9881c_boe.c @@ -8,6 +8,7 @@ #include "ili9881c_boe.h" #include "gpio_if.h" +#include "hdf_bl.h" #include "hdf_disp.h" #include "osal.h" diff --git a/model/display/driver/panel/mipi_icn9700.c b/model/display/driver/panel/mipi_icn9700.c index f26994b8f7d5f0286d8e5042fbd5d28420e3c5d5..99c1d49d5758bd026713505c3ee40a8170a3a68f 100644 --- a/model/display/driver/panel/mipi_icn9700.c +++ b/model/display/driver/panel/mipi_icn9700.c @@ -7,6 +7,7 @@ */ #include "gpio_if.h" +#include "hdf_bl.h" #include "hdf_disp.h" #include "hdf_log.h" #include "mipi_dsi_if.h"