Yuan Zhao | 2858bd9 | 2017-09-27 10:36:24 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017, The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 and |
| 6 | * only version 2 as published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | */ |
| 13 | #ifndef _MSM_DRM_NOTIFY_H_ |
| 14 | #define _MSM_DRM_NOTIFY_H_ |
| 15 | |
| 16 | #include <linux/notifier.h> |
| 17 | |
| 18 | /* A hardware display blank change occurred */ |
| 19 | #define MSM_DRM_EVENT_BLANK 0x01 |
| 20 | /* A hardware display blank early change occurred */ |
| 21 | #define MSM_DRM_EARLY_EVENT_BLANK 0x02 |
| 22 | |
| 23 | enum { |
| 24 | /* panel: power on */ |
| 25 | MSM_DRM_BLANK_UNBLANK, |
| 26 | /* panel: power off */ |
| 27 | MSM_DRM_BLANK_POWERDOWN, |
| 28 | }; |
| 29 | |
| 30 | enum msm_drm_display_id { |
| 31 | /* primary display */ |
| 32 | MSM_DRM_PRIMARY_DISPLAY, |
| 33 | /* external display */ |
| 34 | MSM_DRM_EXTERNAL_DISPLAY, |
| 35 | MSM_DRM_DISPLAY_MAX |
| 36 | }; |
| 37 | |
| 38 | struct msm_drm_notifier { |
| 39 | enum msm_drm_display_id id; |
| 40 | void *data; |
| 41 | }; |
| 42 | |
| 43 | int msm_drm_register_client(struct notifier_block *nb); |
| 44 | int msm_drm_unregister_client(struct notifier_block *nb); |
| 45 | #endif |