Loading drivers/soc/qcom/Kconfig +36 −0 Original line number Diff line number Diff line Loading @@ -896,6 +896,42 @@ config MSM_PERFORMANCE when requested by the userspace by changing the cpufreq policy fmin and fmax. config MSM_DRM_NOTIFY bool depends on !DRM_MSM help This driver can register and receive notification for MSM_DRM power event in external module. When display power state is updated, any modules registered to the block chain will get notified. config MSM_DRM_TECHPACK bool "Enable MSM DRM from techpack" depends on DRM depends on ARCH_QCOM || (ARM && COMPILE_TEST) depends on OF depends on MMU depends on !DRM_MSM select QCOM_MDT_LOADER if ARCH_QCOM select REGULATOR select DRM_KMS_HELPER select DRM_PANEL select SHMEM select TMPFS select QCOM_SCM select SND_SOC_HDMI_CODEC if SND_SOC select SYNC_FILE select MSM_EXT_DISPLAY select PM_GENERIC_DOMAINS select V4L2_MEM2MEM_DEV select DRM_MIPI_DSI select MSM_DRM_NOTIFY help The DRM MSM TECHPACK will select modules that are required by DRM MSM module. This option is only used when DRM MSM is loaded from external techpack, and is mutually exclusive with builtin DRM MSM module. config QMP_DEBUGFS_CLIENT bool "Debugfs Client to communicate with AOP using QMP protocol" depends on DEBUG_FS Loading drivers/soc/qcom/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ ifdef CONFIG_MSM_RPM_SMD endif obj-$(CONFIG_QMP_DEBUGFS_CLIENT) += qmp-debugfs-client.o obj-$(CONFIG_MSM_PERFORMANCE) += msm_performance.o obj-$(CONFIG_MSM_DRM_NOTIFY) += msm_drm_notify.o ifdef CONFIG_DEBUG_FS obj-$(CONFIG_MSM_RPM_SMD) += rpm-smd-debug.o endif Loading drivers/soc/qcom/msm_drm_notify.c 0 → 100644 +58 −0 Original line number Diff line number Diff line /* Copyright (c) 2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and * only version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include <linux/msm_drm_notify.h> static BLOCKING_NOTIFIER_HEAD(msm_drm_notifier_list); /** * msm_drm_register_client - register a client notifier * @nb: notifier block to callback on events * * This function registers a notifier callback function * to msm_drm_notifier_list, which would be called when * received unblank/power down event. */ int msm_drm_register_client(struct notifier_block *nb) { return blocking_notifier_chain_register(&msm_drm_notifier_list, nb); } EXPORT_SYMBOL(msm_drm_register_client); /** * msm_drm_unregister_client - unregister a client notifier * @nb: notifier block to callback on events * * This function unregisters the callback function from * msm_drm_notifier_list. */ int msm_drm_unregister_client(struct notifier_block *nb) { return blocking_notifier_chain_unregister(&msm_drm_notifier_list, nb); } EXPORT_SYMBOL(msm_drm_unregister_client); /** * msm_drm_notifier_call_chain - notify clients of drm_events * @val: event MSM_DRM_EARLY_EVENT_BLANK or MSM_DRM_EVENT_BLANK * @v: notifier data, inculde display id and display blank * event(unblank or power down). */ int msm_drm_notifier_call_chain(unsigned long val, void *v) { return blocking_notifier_call_chain(&msm_drm_notifier_list, val, v); } EXPORT_SYMBOL(msm_drm_notifier_call_chain); Loading
drivers/soc/qcom/Kconfig +36 −0 Original line number Diff line number Diff line Loading @@ -896,6 +896,42 @@ config MSM_PERFORMANCE when requested by the userspace by changing the cpufreq policy fmin and fmax. config MSM_DRM_NOTIFY bool depends on !DRM_MSM help This driver can register and receive notification for MSM_DRM power event in external module. When display power state is updated, any modules registered to the block chain will get notified. config MSM_DRM_TECHPACK bool "Enable MSM DRM from techpack" depends on DRM depends on ARCH_QCOM || (ARM && COMPILE_TEST) depends on OF depends on MMU depends on !DRM_MSM select QCOM_MDT_LOADER if ARCH_QCOM select REGULATOR select DRM_KMS_HELPER select DRM_PANEL select SHMEM select TMPFS select QCOM_SCM select SND_SOC_HDMI_CODEC if SND_SOC select SYNC_FILE select MSM_EXT_DISPLAY select PM_GENERIC_DOMAINS select V4L2_MEM2MEM_DEV select DRM_MIPI_DSI select MSM_DRM_NOTIFY help The DRM MSM TECHPACK will select modules that are required by DRM MSM module. This option is only used when DRM MSM is loaded from external techpack, and is mutually exclusive with builtin DRM MSM module. config QMP_DEBUGFS_CLIENT bool "Debugfs Client to communicate with AOP using QMP protocol" depends on DEBUG_FS Loading
drivers/soc/qcom/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ ifdef CONFIG_MSM_RPM_SMD endif obj-$(CONFIG_QMP_DEBUGFS_CLIENT) += qmp-debugfs-client.o obj-$(CONFIG_MSM_PERFORMANCE) += msm_performance.o obj-$(CONFIG_MSM_DRM_NOTIFY) += msm_drm_notify.o ifdef CONFIG_DEBUG_FS obj-$(CONFIG_MSM_RPM_SMD) += rpm-smd-debug.o endif Loading
drivers/soc/qcom/msm_drm_notify.c 0 → 100644 +58 −0 Original line number Diff line number Diff line /* Copyright (c) 2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and * only version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include <linux/msm_drm_notify.h> static BLOCKING_NOTIFIER_HEAD(msm_drm_notifier_list); /** * msm_drm_register_client - register a client notifier * @nb: notifier block to callback on events * * This function registers a notifier callback function * to msm_drm_notifier_list, which would be called when * received unblank/power down event. */ int msm_drm_register_client(struct notifier_block *nb) { return blocking_notifier_chain_register(&msm_drm_notifier_list, nb); } EXPORT_SYMBOL(msm_drm_register_client); /** * msm_drm_unregister_client - unregister a client notifier * @nb: notifier block to callback on events * * This function unregisters the callback function from * msm_drm_notifier_list. */ int msm_drm_unregister_client(struct notifier_block *nb) { return blocking_notifier_chain_unregister(&msm_drm_notifier_list, nb); } EXPORT_SYMBOL(msm_drm_unregister_client); /** * msm_drm_notifier_call_chain - notify clients of drm_events * @val: event MSM_DRM_EARLY_EVENT_BLANK or MSM_DRM_EVENT_BLANK * @v: notifier data, inculde display id and display blank * event(unblank or power down). */ int msm_drm_notifier_call_chain(unsigned long val, void *v) { return blocking_notifier_call_chain(&msm_drm_notifier_list, val, v); } EXPORT_SYMBOL(msm_drm_notifier_call_chain);