#if defined(CONFIG_EXYNOS_ITMON)
#include <soc/samsung/exynos-itmon.h>
#endif
+#if defined(CONFIG_EXYNOS_PD)
+#include <soc/samsung/exynos-pd.h>
+#endif
#if defined(CONFIG_SUPPORT_LEGACY_ION)
#include <linux/exynos_ion.h>
#include <linux/ion.h>
int max_win;
int dft_win;
int dft_idma;
+ const char *pd_name;
};
struct decon_win {
#if defined(CONFIG_EXYNOS_ITMON)
struct notifier_block itmon_nb;
bool notified;
+#endif
+#if defined(CONFIG_EXYNOS_PD)
+ struct exynos_pm_domain *pm_domain;
#endif
unsigned long prev_hdr_bits;
struct exynos_hdr_static_info prev_hdr_info;
int dpu_sysmmu_fault_handler(struct iommu_domain *domain,
struct device *dev, unsigned long iova, int flags, void *token);
-
+#if defined(CONFIG_EXYNOS_PD)
+int dpu_pm_domain_check_status(struct exynos_pm_domain *pm_domain);
+#endif
int decon_set_out_sd_state(struct decon_device *decon, enum decon_state state);
/* IOCTL commands */
}
decon->state = state;
+
+#if defined(CONFIG_EXYNOS_PD)
+ if (decon->pm_domain) {
+ if (dpu_pm_domain_check_status(decon->pm_domain)) {
+ decon_info("decon%d %s still on\n", decon->id,
+ decon->dt.pd_name);
+ /* TODO : saimple dma/decon logging in cal code */
+ } else
+ decon_info("decon%d %s off\n", decon->id,
+ decon->dt.pd_name);
+ }
+#endif
+
err:
return ret;
}
decon_info("Failed to get CAM0-STAT Reg\n");
}
}
+#if defined(CONFIG_EXYNOS_PD)
+ if (of_property_read_string(dev->of_node, "pd_name", &decon->dt.pd_name)) {
+ decon_info("no power domain\n");
+ decon->pm_domain = NULL;
+ } else {
+ decon_info("power domain: %s\n", decon->dt.pd_name);
+ decon->pm_domain = exynos_pd_lookup_name(decon->dt.pd_name);
+ }
+#endif
}
static int decon_init_resources(struct decon_device *decon,
return 0;
}
+
+#if defined(CONFIG_EXYNOS_PD)
+int dpu_pm_domain_check_status(struct exynos_pm_domain *pm_domain)
+{
+ if (!pm_domain || !pm_domain->check_status)
+ return 0;
+
+ if (pm_domain->check_status(pm_domain))
+ return 1;
+ else
+ return 0;
+}
+#endif