diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/drm/drm_mm.h | 15 | ||||
| -rw-r--r-- | include/linux/ipc_router.h | 12 | ||||
| -rw-r--r-- | include/linux/ipc_router_xprt.h | 6 | ||||
| -rw-r--r-- | include/linux/mmc/host.h | 2 | ||||
| -rw-r--r-- | include/linux/msm_mhi.h | 141 | ||||
| -rw-r--r-- | include/linux/sched.h | 4 | ||||
| -rw-r--r-- | include/linux/sde_io_util.h | 2 | ||||
| -rw-r--r-- | include/media/cec-notifier.h | 111 | ||||
| -rw-r--r-- | include/media/cec.h | 10 | ||||
| -rw-r--r-- | include/sound/apr_audio-v2.h | 5 | ||||
| -rw-r--r-- | include/sound/q6adm-v2.h | 1 | ||||
| -rw-r--r-- | include/trace/events/sched.h | 14 | ||||
| -rw-r--r-- | include/trace/events/trace_msm_pil_event.h | 88 | ||||
| -rw-r--r-- | include/uapi/drm/msm_drm.h | 12 | ||||
| -rw-r--r-- | include/uapi/linux/spcom.h | 8 |
15 files changed, 402 insertions, 29 deletions
diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h index 0de6290df4da..6649b6d8c437 100644 --- a/include/drm/drm_mm.h +++ b/include/drm/drm_mm.h @@ -37,6 +37,7 @@ * Generic range manager structs */ #include <linux/bug.h> +#include <linux/rbtree.h> #include <linux/kernel.h> #include <linux/list.h> #include <linux/spinlock.h> @@ -48,6 +49,7 @@ enum drm_mm_search_flags { DRM_MM_SEARCH_DEFAULT = 0, DRM_MM_SEARCH_BEST = 1 << 0, DRM_MM_SEARCH_BELOW = 1 << 1, + DRM_MM_SEARCH_BOTTOM_UP = 1 << 2, }; enum drm_mm_allocator_flags { @@ -61,6 +63,8 @@ enum drm_mm_allocator_flags { struct drm_mm_node { struct list_head node_list; struct list_head hole_stack; + struct rb_node rb; + struct rb_node hole_node; unsigned hole_follows : 1; unsigned scanned_block : 1; unsigned scanned_prev_free : 1; @@ -70,6 +74,7 @@ struct drm_mm_node { unsigned long color; u64 start; u64 size; + u64 __subtree_last; struct drm_mm *mm; }; @@ -79,6 +84,10 @@ struct drm_mm { /* head_node.node_list is the list of all memory nodes, ordered * according to the (increasing) start address of the memory node. */ struct drm_mm_node head_node; + /* Keep an interval_tree for fast lookup of drm_mm_nodes by address. */ + struct rb_root interval_tree; + struct rb_root holes_tree; + unsigned int scan_check_range : 1; unsigned scan_alignment; unsigned long scan_color; @@ -301,6 +310,12 @@ void drm_mm_init(struct drm_mm *mm, void drm_mm_takedown(struct drm_mm *mm); bool drm_mm_clean(struct drm_mm *mm); +struct drm_mm_node * +drm_mm_interval_first(struct drm_mm *mm, u64 start, u64 last); + +struct drm_mm_node * +drm_mm_interval_next(struct drm_mm_node *node, u64 start, u64 last); + void drm_mm_init_scan(struct drm_mm *mm, u64 size, unsigned alignment, diff --git a/include/linux/ipc_router.h b/include/linux/ipc_router.h index b17f684a9895..04a06df66d4b 100644 --- a/include/linux/ipc_router.h +++ b/include/linux/ipc_router.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2015,2017 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 @@ -269,6 +269,14 @@ int register_ipcrtr_af_init_notifier(struct notifier_block *nb); */ int unregister_ipcrtr_af_init_notifier(struct notifier_block *nb); +/** + * msm_ipc_router_set_ws_allowed() - To Enable/disable the wakeup source allowed + * flag + * @flag: Flag to set/clear the wakeup soruce allowed + * + */ +void msm_ipc_router_set_ws_allowed(bool flag); + #else struct msm_ipc_port *msm_ipc_router_create_port( @@ -341,6 +349,8 @@ int unregister_ipcrtr_af_init_notifier(struct notifier_block *nb) return -ENODEV; } +void msm_ipc_router_set_ws_allowed(bool flag) { } + #endif #endif diff --git a/include/linux/ipc_router_xprt.h b/include/linux/ipc_router_xprt.h index 276c79ff1591..ac6c1e4db8a4 100644 --- a/include/linux/ipc_router_xprt.h +++ b/include/linux/ipc_router_xprt.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2015,2017 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 @@ -100,6 +100,7 @@ struct rr_opt_hdr { * @pkt_fragment_q: Queue of SKBs containing payload. * @length: Length of data in the chain of SKBs * @ref: Reference count for the packet. + * @ws_need: Flag to check wakeup soruce need */ struct rr_packet { struct list_head list; @@ -108,6 +109,7 @@ struct rr_packet { struct sk_buff_head *pkt_fragment_q; uint32_t length; struct kref ref; + bool ws_need; }; /** @@ -125,6 +127,7 @@ struct rr_packet { * @close: Method to close the XPRT. * @sft_close_done: Method to indicate to the XPRT that handling of reset * event is complete. + * @get_ws_info: Method to get the wakeup soruce inforamtion of the XPRT */ struct msm_ipc_router_xprt { char *name; @@ -143,6 +146,7 @@ struct msm_ipc_router_xprt { struct msm_ipc_router_xprt *xprt); int (*close)(struct msm_ipc_router_xprt *xprt); void (*sft_close_done)(struct msm_ipc_router_xprt *xprt); + bool (*get_ws_info)(struct msm_ipc_router_xprt *xprt); }; void msm_ipc_router_xprt_notify(struct msm_ipc_router_xprt *xprt, diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index d9e12c1b1748..279411c42ded 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -330,7 +330,9 @@ struct mmc_devfeq_clk_scaling { atomic_t devfreq_abort; bool skip_clk_scale_freq_update; int freq_table_sz; + int pltfm_freq_table_sz; u32 *freq_table; + u32 *pltfm_freq_table; unsigned long total_busy_time_us; unsigned long target_freq; unsigned long curr_freq; diff --git a/include/linux/msm_mhi.h b/include/linux/msm_mhi.h index c01cb1af4231..1704cb93e6a3 100644 --- a/include/linux/msm_mhi.h +++ b/include/linux/msm_mhi.h @@ -81,6 +81,7 @@ enum MHI_CB_REASON { MHI_CB_MHI_SHUTDOWN, MHI_CB_SYS_ERROR, MHI_CB_RDDM, + MHI_CB_MHI_PROBED, }; enum MHI_FLAGS { @@ -119,6 +120,7 @@ struct mhi_client_handle { u32 domain; u32 bus; u32 slot; + bool enabled; struct mhi_client_config *client_config; }; @@ -158,9 +160,11 @@ enum mhi_dev_ctrl { MHI_DEV_CTRL_RESUME, MHI_DEV_CTRL_POWER_OFF, MHI_DEV_CTRL_POWER_ON, + MHI_DEV_CTRL_TRIGGER_RDDM, MHI_DEV_CTRL_RDDM, MHI_DEV_CTRL_RDDM_KERNEL_PANIC, MHI_DEV_CTRL_NOTIFY_LINK_ERROR, + MHI_DEV_CTRL_MAXCMD, }; enum mhi_rddm_segment { @@ -168,6 +172,7 @@ enum mhi_rddm_segment { MHI_RDDM_RD_SEGMENT, }; +#if defined(CONFIG_MSM_MHI) /** * mhi_is_device_ready - Check if MHI is ready to register clients * @@ -187,11 +192,23 @@ bool mhi_is_device_ready(const struct device * const dev, * @userdata: cb data for client * @Return 0 on success */ -int mhi_register_device(struct mhi_device *mhi_device, - const char *node_name, +int mhi_register_device(struct mhi_device *mhi_device, const char *node_name, void *user_data); /** + * mhi_register_channel - Client must call this function to obtain a handle for + * any MHI operations + * + * @client_handle: Handle populated by MHI, opaque to client + * @client_info: Channel\device information provided by client to + * which the handle maps to. + * + * @Return errno + */ +int mhi_register_channel(struct mhi_client_handle **client_handle, + struct mhi_client_info_t *client_info); + +/** * mhi_pm_control_device - power management control api * @mhi_device: registered device structure * @ctrl: specific command @@ -219,19 +236,6 @@ int mhi_xfer_rddm(struct mhi_device *mhi_device, enum mhi_rddm_segment seg, int mhi_deregister_channel(struct mhi_client_handle *client_handle); /** - * mhi_register_channel - Client must call this function to obtain a handle for - * any MHI operations - * - * @client_handle: Handle populated by MHI, opaque to client - * @client_info: Channel\device information provided by client to - * which the handle maps to. - * - * @Return errno - */ -int mhi_register_channel(struct mhi_client_handle **client_handle, - struct mhi_client_info_t *client_info); - -/** * mhi_open_channel - Client must call this function to open a channel * * @client_handle: Handle populated by MHI, opaque to client @@ -258,8 +262,8 @@ int mhi_open_channel(struct mhi_client_handle *client_handle); * * @Return errno */ -int mhi_queue_xfer(struct mhi_client_handle *client_handle, - void *buf, size_t buf_len, enum MHI_FLAGS mhi_flags); +int mhi_queue_xfer(struct mhi_client_handle *client_handle, void *buf, + size_t buf_len, enum MHI_FLAGS mhi_flags); /** * mhi_close_channel - Client can request channel to be closed and handle freed @@ -300,7 +304,7 @@ int mhi_get_free_desc(struct mhi_client_handle *client_handle); * @Return non negative on success */ int mhi_poll_inbound(struct mhi_client_handle *client_handle, - struct mhi_result *result); + struct mhi_result *result); /** * mhi_get_max_desc - Get the maximum number of descriptors @@ -311,12 +315,107 @@ int mhi_poll_inbound(struct mhi_client_handle *client_handle, */ int mhi_get_max_desc(struct mhi_client_handle *client_handle); -/* RmNET Reserved APIs, This APIs are reserved for use by the linux network -* stack only. Use by other clients will introduce system wide issues -*/ +/* following APIs meant to be used by rmnet interface only */ int mhi_set_lpm(struct mhi_client_handle *client_handle, bool enable_lpm); int mhi_get_epid(struct mhi_client_handle *mhi_handle); struct mhi_result *mhi_poll(struct mhi_client_handle *client_handle); void mhi_mask_irq(struct mhi_client_handle *client_handle); void mhi_unmask_irq(struct mhi_client_handle *client_handle); + +#else +static inline bool mhi_is_device_ready(const struct device * const dev, + const char *node_name) +{ + return false; +}; + +static inline int mhi_register_device(struct mhi_device *mhi_device, + const char *node_name, void *user_data) +{ + return -EINVAL; +}; + +static inline int mhi_register_channel(struct mhi_client_handle **client_handle, + struct mhi_client_info_t *client_info) +{ + return -EINVAL; +}; + +static inline int mhi_pm_control_device(struct mhi_device *mhi_device, + enum mhi_dev_ctrl ctrl) +{ + return -EINVAL; +}; + +static inline int mhi_xfer_rddm(struct mhi_device *mhi_device, + enum mhi_rddm_segment seg, + struct scatterlist **sg_list) +{ + return -EINVAL; +}; + +static inline int mhi_deregister_channel(struct mhi_client_handle + *client_handle) +{ + return -EINVAL; +}; + +static inline int mhi_open_channel(struct mhi_client_handle *client_handle) +{ + return -EINVAL; +}; + +static inline int mhi_queue_xfer(struct mhi_client_handle *client_handle, + void *buf, size_t buf_len, + enum MHI_FLAGS mhi_flags) +{ + return -EINVAL; +}; + +static inline void mhi_close_channel(struct mhi_client_handle *client_handle) +{ +}; + +static inline int mhi_get_free_desc(struct mhi_client_handle *client_handle) +{ + return -EINVAL; +}; + +static inline int mhi_poll_inbound(struct mhi_client_handle *client_handle, + struct mhi_result *result) +{ + return -EINVAL; +}; + +static inline int mhi_get_max_desc(struct mhi_client_handle *client_handle) +{ + return -EINVAL; +}; + +static inline int mhi_set_lpm(struct mhi_client_handle *client_handle, + bool enable_lpm) +{ + return -EINVAL; +}; + +static inline int mhi_get_epid(struct mhi_client_handle *mhi_handle) +{ + return -EINVAL; +}; + +static inline struct mhi_result *mhi_poll(struct mhi_client_handle + *client_handle) +{ + return NULL; +}; + +static inline void mhi_mask_irq(struct mhi_client_handle *client_handle) +{ +}; + +static inline void mhi_unmask_irq(struct mhi_client_handle *client_handle) +{ +}; + +#endif #endif diff --git a/include/linux/sched.h b/include/linux/sched.h index c71978453864..138fcf72508a 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -178,7 +178,9 @@ extern u64 nr_running_integral(unsigned int cpu); #endif extern void sched_update_nr_prod(int cpu, long delta, bool inc); -extern void sched_get_nr_running_avg(int *avg, int *iowait_avg, int *big_avg); +extern void sched_get_nr_running_avg(int *avg, int *iowait_avg, int *big_avg, + unsigned int *max_nr, + unsigned int *big_max_nr); extern void calc_global_load(unsigned long ticks); diff --git a/include/linux/sde_io_util.h b/include/linux/sde_io_util.h index 6bd5c168ecd8..da4a50722984 100644 --- a/include/linux/sde_io_util.h +++ b/include/linux/sde_io_util.h @@ -58,6 +58,8 @@ struct dss_vreg { int post_on_sleep; int pre_off_sleep; int post_off_sleep; + bool lp_disable_allowed; + bool disabled; }; struct dss_gpio { diff --git a/include/media/cec-notifier.h b/include/media/cec-notifier.h new file mode 100644 index 000000000000..035712e0993d --- /dev/null +++ b/include/media/cec-notifier.h @@ -0,0 +1,111 @@ +/* + * cec-notifier.h - notify CEC drivers of physical address changes + * + * Copyright 2016 Russell King <rmk+kernel@arm.linux.org.uk> + * Copyright 2016-2017 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * + * This program is free software; you may redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#ifndef LINUX_CEC_NOTIFIER_H +#define LINUX_CEC_NOTIFIER_H + +#include <linux/types.h> +#include <media/cec-edid.h> + +struct device; +struct edid; +struct cec_adapter; +struct cec_notifier; + +#ifdef CONFIG_MEDIA_CEC_NOTIFIER + +/** + * cec_notifier_get - find or create a new cec_notifier for the given device. + * @dev: device that sends the events. + * + * If a notifier for device @dev already exists, then increase the refcount + * and return that notifier. + * + * If it doesn't exist, then allocate a new notifier struct and return a + * pointer to that new struct. + * + * Return NULL if the memory could not be allocated. + */ +struct cec_notifier *cec_notifier_get(struct device *dev); + +/** + * cec_notifier_put - decrease refcount and delete when the refcount reaches 0. + * @n: notifier + */ +void cec_notifier_put(struct cec_notifier *n); + +/** + * cec_notifier_set_phys_addr - set a new physical address. + * @n: the CEC notifier + * @pa: the CEC physical address + * + * Set a new CEC physical address. + */ +void cec_notifier_set_phys_addr(struct cec_notifier *n, u16 pa); + +/** + * cec_notifier_set_phys_addr_from_edid - set parse the PA from the EDID. + * @n: the CEC notifier + * @edid: the struct edid pointer + * + * Parses the EDID to obtain the new CEC physical address and set it. + */ +void cec_notifier_set_phys_addr_from_edid(struct cec_notifier *n, + const struct edid *edid); + +/** + * cec_notifier_register - register a callback with the notifier + * @n: the CEC notifier + * @adap: the CEC adapter, passed as argument to the callback function + * @callback: the callback function + */ +void cec_notifier_register(struct cec_notifier *n, + struct cec_adapter *adap, + void (*callback)(struct cec_adapter *adap, u16 pa)); + +/** + * cec_notifier_unregister - unregister the callback from the notifier. + * @n: the CEC notifier + */ +void cec_notifier_unregister(struct cec_notifier *n); + +#else +static inline struct cec_notifier *cec_notifier_get(struct device *dev) +{ + /* A non-NULL pointer is expected on success */ + return (struct cec_notifier *)0xdeadfeed; +} + +static inline void cec_notifier_put(struct cec_notifier *n) +{ +} + +static inline void cec_notifier_set_phys_addr(struct cec_notifier *n, u16 pa) +{ +} + +static inline void cec_notifier_set_phys_addr_from_edid(struct cec_notifier *n, + const struct edid *edid) +{ +} + +#endif + +#endif diff --git a/include/media/cec.h b/include/media/cec.h index 96a0aa770d61..307f5dcaf034 100644 --- a/include/media/cec.h +++ b/include/media/cec.h @@ -30,6 +30,7 @@ #include <linux/cec-funcs.h> #include <media/rc-core.h> #include <media/cec-edid.h> +#include <media/cec-notifier.h> /** * struct cec_devnode - cec device node @@ -173,6 +174,10 @@ struct cec_adapter { bool passthrough; struct cec_log_addrs log_addrs; +#ifdef CONFIG_MEDIA_CEC_NOTIFIER + struct cec_notifier *notifier; +#endif + struct dentry *cec_dir; struct dentry *status_file; @@ -213,6 +218,11 @@ void cec_transmit_done(struct cec_adapter *adap, u8 status, u8 arb_lost_cnt, u8 nack_cnt, u8 low_drive_cnt, u8 error_cnt); void cec_received_msg(struct cec_adapter *adap, struct cec_msg *msg); +#ifdef CONFIG_MEDIA_CEC_NOTIFIER +void cec_register_cec_notifier(struct cec_adapter *adap, + struct cec_notifier *notifier); +#endif + #else static inline int cec_register_adapter(struct cec_adapter *adap, diff --git a/include/sound/apr_audio-v2.h b/include/sound/apr_audio-v2.h index 1f19ff2210f8..74995a0cdbad 100644 --- a/include/sound/apr_audio-v2.h +++ b/include/sound/apr_audio-v2.h @@ -44,6 +44,8 @@ struct param_outband { #define ADM_MATRIX_ID_COMPRESSED_AUDIO_RX 2 +#define ADM_MATRIX_ID_COMPRESSED_AUDIO_TX 3 + #define ADM_MATRIX_ID_LISTEN_TX 4 /* Enumeration for an audio Tx matrix ID.*/ #define ADM_MATRIX_ID_AUDIOX 1 @@ -446,6 +448,9 @@ struct adm_param_data_v5 { #define ASM_STREAM_CMD_REGISTER_PP_EVENTS 0x00013213 #define ASM_STREAM_PP_EVENT 0x00013214 +#define ASM_STREAM_CMD_REGISTER_IEC_61937_FMT_UPDATE 0x13333 +#define ASM_IEC_61937_MEDIA_FMT_EVENT 0x13334 + #define DSP_STREAM_CMD "ADSP Stream Cmd" #define DSP_STREAM_CALLBACK "ADSP Stream Callback Event" #define DSP_STREAM_CALLBACK_QUEUE_SIZE 1024 diff --git a/include/sound/q6adm-v2.h b/include/sound/q6adm-v2.h index caabb66bd0b4..900d2455993a 100644 --- a/include/sound/q6adm-v2.h +++ b/include/sound/q6adm-v2.h @@ -17,6 +17,7 @@ #define ADM_PATH_LIVE_REC 0x2 #define ADM_PATH_NONLIVE_REC 0x3 #define ADM_PATH_COMPRESSED_RX 0x5 +#define ADM_PATH_COMPRESSED_TX 0x6 #include <linux/qdsp6v2/rtac.h> #include <sound/q6afe-v2.h> #include <sound/q6audio-v2.h> diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 0b92317f6263..9a1ff42a377e 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h @@ -1312,24 +1312,30 @@ TRACE_EVENT(sched_wake_idle_without_ipi, TRACE_EVENT(sched_get_nr_running_avg, - TP_PROTO(int avg, int big_avg, int iowait_avg), + TP_PROTO(int avg, int big_avg, int iowait_avg, + unsigned int max_nr, unsigned int big_max_nr), - TP_ARGS(avg, big_avg, iowait_avg), + TP_ARGS(avg, big_avg, iowait_avg, max_nr, big_max_nr), TP_STRUCT__entry( __field( int, avg ) __field( int, big_avg ) __field( int, iowait_avg ) + __field( unsigned int, max_nr ) + __field( unsigned int, big_max_nr ) ), TP_fast_assign( __entry->avg = avg; __entry->big_avg = big_avg; __entry->iowait_avg = iowait_avg; + __entry->max_nr = max_nr; + __entry->big_max_nr = big_max_nr; ), - TP_printk("avg=%d big_avg=%d iowait_avg=%d", - __entry->avg, __entry->big_avg, __entry->iowait_avg) + TP_printk("avg=%d big_avg=%d iowait_avg=%d max_nr=%u big_max_nr=%u", + __entry->avg, __entry->big_avg, __entry->iowait_avg, + __entry->max_nr, __entry->big_max_nr) ); TRACE_EVENT(core_ctl_eval_need, diff --git a/include/trace/events/trace_msm_pil_event.h b/include/trace/events/trace_msm_pil_event.h new file mode 100644 index 000000000000..4795dc5e0b2e --- /dev/null +++ b/include/trace/events/trace_msm_pil_event.h @@ -0,0 +1,88 @@ +/* Copyright (c) 2017, 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. + */ + +#undef TRACE_SYSTEM +#define TRACE_SYSTEM msm_pil_event + +#if !defined(_TRACE_MSM_PIL_EVENT_H_) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_MSM_PIL_EVENT_H_ + +#include <linux/tracepoint.h> +#include <../drivers/soc/qcom/peripheral-loader.h> + +TRACE_EVENT(pil_event, + + TP_PROTO(const char *event_name, struct pil_desc *desc), + + TP_ARGS(event_name, desc), + + TP_STRUCT__entry( + __string(event_name, event_name) + __string(fw_name, desc->fw_name) + ), + + TP_fast_assign( + __assign_str(event_name, event_name); + __assign_str(fw_name, desc->fw_name); + ), + + TP_printk("event_name=%s fw_name=%s", + __get_str(event_name), + __get_str(fw_name)) +); + +TRACE_EVENT(pil_notif, + + TP_PROTO(const char *event_name, unsigned long code, + const char *fw_name), + + TP_ARGS(event_name, code, fw_name), + + TP_STRUCT__entry( + __string(event_name, event_name) + __field(unsigned long, code) + __string(fw_name, fw_name) + ), + + TP_fast_assign( + __assign_str(event_name, event_name); + __entry->code = code; + __assign_str(fw_name, fw_name); + ), + + TP_printk("event_name=%s code=%lu fw=%s", + __get_str(event_name), + __entry->code, + __get_str(fw_name)) +); + +TRACE_EVENT(pil_func, + + TP_PROTO(const char *func_name), + + TP_ARGS(func_name), + + TP_STRUCT__entry( + __string(func_name, func_name) + ), + + TP_fast_assign( + __assign_str(func_name, func_name); + ), + + TP_printk("func_name=%s", + __get_str(func_name)) +); + +#endif +#define TRACE_INCLUDE_FILE trace_msm_pil_event +#include <trace/define_trace.h> diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h index 7aa6496c7608..cc6d4fb42d9f 100644 --- a/include/uapi/drm/msm_drm.h +++ b/include/uapi/drm/msm_drm.h @@ -102,6 +102,13 @@ struct drm_msm_gem_new { __u32 handle; /* out */ }; +struct drm_msm_gem_svm_new { + __u64 hostptr; /* in, must be page-aligned */ + __u64 size; /* in, must be page-aligned */ + __u32 flags; /* in, mask of MSM_BO_x */ + __u32 handle; /* out */ +}; + #define MSM_INFO_IOVA 0x01 #define MSM_INFO_FLAGS (MSM_INFO_IOVA) @@ -356,6 +363,8 @@ struct drm_msm_gem_sync { #define DRM_MSM_GEM_CPU_FINI 0x05 #define DRM_MSM_GEM_SUBMIT 0x06 #define DRM_MSM_WAIT_FENCE 0x07 +/* Gap for upstream DRM_MSM_GEM_MADVISE */ +#define DRM_MSM_GEM_SVM_NEW 0x09 #define DRM_SDE_WB_CONFIG 0x40 #define DRM_MSM_REGISTER_EVENT 0x41 @@ -395,6 +404,9 @@ struct drm_msm_gem_sync { struct drm_msm_counter_read) #define DRM_IOCTL_MSM_GEM_SYNC DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_GEM_SYNC,\ struct drm_msm_gem_sync) +#define DRM_IOCTL_MSM_GEM_SVM_NEW \ + DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_SVM_NEW, \ + struct drm_msm_gem_svm_new) #if defined(__cplusplus) } diff --git a/include/uapi/linux/spcom.h b/include/uapi/linux/spcom.h index 038a49d5ee57..39b1be03bde0 100644 --- a/include/uapi/linux/spcom.h +++ b/include/uapi/linux/spcom.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2015-2017, 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 @@ -30,6 +30,12 @@ * with special size SPCOM_GET_NEXT_REQUEST_SIZE. */ +/* + * Maximum number of channel between Secure Processor and HLOS. + * including predefined channels, like "sp_kernel". + */ +#define SPCOM_MAX_CHANNELS 0x20 + /* Maximum size (including null) for channel names */ #define SPCOM_CHANNEL_NAME_SIZE 32 |
