static void dsim_underrun_info(struct dsim_device *dsim)
{
#if defined(CONFIG_EXYNOS_BTS)
- struct decon_device *decon;
int i, decon_cnt;
+ struct decon_device *decon = get_decon_drvdata(0);
dsim_info("\tMIF(%lu), INT(%lu), DISP(%lu)\n",
cal_dfs_get_rate(ACPM_DVFS_MIF),
cal_dfs_get_rate(ACPM_DVFS_INT),
cal_dfs_get_rate(ACPM_DVFS_DISP));
- decon_cnt = get_decon_drvdata(0)->dt.decon_cnt;
+ if (decon == NULL)
+ return;
+
+ decon_cnt = decon->dt.decon_cnt;
for (i = 0; i < decon_cnt; ++i) {
decon = get_decon_drvdata(i);
void decon_signal_fence(struct dma_fence *fence)
{
- if (dma_fence_signal(fence))
- decon_warn("%s: fence[%p] #%d signal failed\n", __func__,
- fence, fence->seqno);
+ if (dma_fence_signal(fence)) {
+ if (fence)
+ decon_warn("%s: fence[%p] #%d signal failed\n", __func__,
+ fence, fence->seqno);
+ else
+ decon_warn("%s: fence is null\n", __func__);
+ }
}
#endif
void dsim_to_regs_param(struct dsim_device *dsim, struct dsim_regs *regs)
{
- regs->regs = dsim->res.regs;
- regs->ss_regs = dsim->res.ss_regs;
- regs->phy_regs = dsim->res.phy_regs;
- regs->phy_regs_ex = dsim->res.phy_regs_ex;
+ if (dsim->res.regs)
+ regs->regs = dsim->res.regs;
+ else
+ regs->regs = NULL;
+
+ if (dsim->res.phy_regs)
+ regs->phy_regs = dsim->res.phy_regs;
+ else
+ regs->phy_regs = NULL;
+
+ if (dsim->res.phy_regs_ex)
+ regs->phy_regs_ex = dsim->res.phy_regs_ex;
+ else
+ regs->phy_regs_ex = NULL;
}