Loading drivers/media/platform/msm/sde/rotator/sde_rotator_base.c +9 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2012, 2015-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2012, 2015-2019, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) "%s: " fmt, __func__ Loading Loading @@ -746,6 +746,8 @@ static void sde_mdp_destroy_dt_misc(struct platform_device *pdev, #define BUS_VOTE_40_MHZ 320000000 #define BUS_VOTE_80_MHZ 640000000 #ifdef CONFIG_QCOM_BUS_SCALING static struct msm_bus_vectors mdp_reg_bus_vectors[] = { MDP_REG_BUS_VECTOR_ENTRY(0, 0), MDP_REG_BUS_VECTOR_ENTRY(0, BUS_VOTE_19_MHZ), Loading Loading @@ -786,6 +788,12 @@ static int sde_mdp_bus_scale_register(struct sde_rot_data_type *mdata) return 0; } #else static inline int sde_mdp_bus_scale_register(struct sde_rot_data_type *mdata) { return 0; } #endif static void sde_mdp_bus_scale_unregister(struct sde_rot_data_type *mdata) { Loading drivers/media/platform/msm/sde/rotator/sde_rotator_base.h +2 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,7 @@ enum sde_rot_type { * @SDE_CAPS_PARTIALWR: partial write override * @SDE_CAPS_HW_TIMESTAMP: rotator has hw timestamp support * @SDE_CAPS_UBWC_3: universal bandwidth compression version 3 * @SDE_CAPS_UBWC_4: universal bandwidth compression version 4 */ enum sde_caps_settings { SDE_CAPS_R1_WB, Loading @@ -139,6 +140,7 @@ enum sde_caps_settings { SDE_CAPS_PARTIALWR, SDE_CAPS_HW_TIMESTAMP, SDE_CAPS_UBWC_3, SDE_CAPS_UBWC_4, SDE_CAPS_MAX, }; Loading drivers/media/platform/msm/sde/rotator/sde_rotator_core.c +77 −24 Original line number Diff line number Diff line Loading @@ -78,6 +78,10 @@ #define BUS_VOTE_19_MHZ 153600000 /* forward prototype */ static int sde_rotator_update_perf(struct sde_rot_mgr *mgr); #ifdef CONFIG_QCOM_BUS_SCALING static struct msm_bus_vectors rot_reg_bus_vectors[] = { SDE_REG_BUS_VECTOR_ENTRY(0, 0), SDE_REG_BUS_VECTOR_ENTRY(0, BUS_VOTE_19_MHZ), Loading @@ -91,9 +95,6 @@ static struct msm_bus_scale_pdata rot_reg_bus_scale_table = { .active_only = 1, }; /* forward prototype */ static int sde_rotator_update_perf(struct sde_rot_mgr *mgr); static int sde_rotator_bus_scale_set_quota(struct sde_rot_bus_data_type *bus, u64 quota) { Loading Loading @@ -190,6 +191,18 @@ static int sde_rotator_enable_reg_bus(struct sde_rot_mgr *mgr, u64 quota) return ret; } #else static inline int sde_rotator_enable_reg_bus(struct sde_rot_mgr *mgr, u64 quota) { return 0; } static inline int sde_rotator_bus_scale_set_quota( struct sde_rot_bus_data_type *bus, u64 quota) { return 0; } #endif /* * Clock rate of all open sessions working a particular hw block Loading Loading @@ -1508,6 +1521,7 @@ static void sde_rotator_commit_handler(struct kthread_work *work) struct sde_rot_hw_resource *hw; struct sde_rot_mgr *mgr; struct sched_param param = { .sched_priority = 5 }; struct sde_rot_trace_entry rot_trace; int ret; entry = container_of(work, struct sde_rot_entry, commit_work); Loading Loading @@ -1556,17 +1570,26 @@ static void sde_rotator_commit_handler(struct kthread_work *work) if (entry->item.ts) entry->item.ts[SDE_ROTATOR_TS_COMMIT] = ktime_get(); /* Set values to pass to trace */ rot_trace.wb_idx = entry->item.wb_idx; rot_trace.flags = entry->item.flags; rot_trace.input_format = entry->item.input.format; rot_trace.input_width = entry->item.input.width; rot_trace.input_height = entry->item.input.height; rot_trace.src_x = entry->item.src_rect.x; rot_trace.src_y = entry->item.src_rect.y; rot_trace.src_w = entry->item.src_rect.w; rot_trace.src_h = entry->item.src_rect.h; rot_trace.output_format = entry->item.output.format; rot_trace.output_width = entry->item.output.width; rot_trace.output_height = entry->item.output.height; rot_trace.dst_x = entry->item.dst_rect.x; rot_trace.dst_y = entry->item.dst_rect.y; rot_trace.dst_w = entry->item.dst_rect.w; rot_trace.dst_h = entry->item.dst_rect.h; trace_rot_entry_commit( entry->item.session_id, entry->item.sequence_id, entry->item.wb_idx, entry->item.flags, entry->item.input.format, entry->item.input.width, entry->item.input.height, entry->item.src_rect.x, entry->item.src_rect.y, entry->item.src_rect.w, entry->item.src_rect.h, entry->item.output.format, entry->item.output.width, entry->item.output.height, entry->item.dst_rect.x, entry->item.dst_rect.y, entry->item.dst_rect.w, entry->item.dst_rect.h); entry->item.session_id, entry->item.sequence_id, &rot_trace); ATRACE_INT("sde_smmu_ctrl", 0); ret = sde_smmu_ctrl(1); Loading Loading @@ -1652,6 +1675,7 @@ static void sde_rotator_done_handler(struct kthread_work *work) struct sde_rot_entry_container *request; struct sde_rot_hw_resource *hw; struct sde_rot_mgr *mgr; struct sde_rot_trace_entry rot_trace; int ret; entry = container_of(work, struct sde_rot_entry, done_work); Loading Loading @@ -1686,17 +1710,26 @@ static void sde_rotator_done_handler(struct kthread_work *work) if (entry->item.ts) entry->item.ts[SDE_ROTATOR_TS_DONE] = ktime_get(); trace_rot_entry_done( entry->item.session_id, entry->item.sequence_id, entry->item.wb_idx, entry->item.flags, entry->item.input.format, entry->item.input.width, entry->item.input.height, entry->item.src_rect.x, entry->item.src_rect.y, entry->item.src_rect.w, entry->item.src_rect.h, entry->item.output.format, entry->item.output.width, entry->item.output.height, entry->item.dst_rect.x, entry->item.dst_rect.y, entry->item.dst_rect.w, entry->item.dst_rect.h); /* Set values to pass to trace */ rot_trace.wb_idx = entry->item.wb_idx; rot_trace.flags = entry->item.flags; rot_trace.input_format = entry->item.input.format; rot_trace.input_width = entry->item.input.width; rot_trace.input_height = entry->item.input.height; rot_trace.src_x = entry->item.src_rect.x; rot_trace.src_y = entry->item.src_rect.y; rot_trace.src_w = entry->item.src_rect.w; rot_trace.src_h = entry->item.src_rect.h; rot_trace.output_format = entry->item.output.format; rot_trace.output_width = entry->item.output.width; rot_trace.output_height = entry->item.output.height; rot_trace.dst_x = entry->item.dst_rect.x; rot_trace.dst_y = entry->item.dst_rect.y; rot_trace.dst_w = entry->item.dst_rect.w; rot_trace.dst_h = entry->item.dst_rect.h; trace_rot_entry_done(entry->item.session_id, entry->item.sequence_id, &rot_trace); sde_rot_mgr_lock(mgr); sde_rotator_put_hw_resource(entry->commitq, entry, entry->commitq->hw); Loading Loading @@ -2710,6 +2743,7 @@ static struct attribute_group sde_rotator_fs_attr_group = { .attrs = sde_rotator_fs_attrs }; #ifdef CONFIG_QCOM_BUS_SCALING static int sde_rotator_parse_dt_bus(struct sde_rot_mgr *mgr, struct platform_device *dev) { Loading Loading @@ -2752,6 +2786,13 @@ static int sde_rotator_parse_dt_bus(struct sde_rot_mgr *mgr, return ret; } #else static inline int sde_rotator_parse_dt_bus(struct sde_rot_mgr *mgr, struct platform_device *dev) { return 0; } #endif static int sde_rotator_parse_dt(struct sde_rot_mgr *mgr, struct platform_device *dev) Loading Loading @@ -2856,6 +2897,7 @@ static int sde_rotator_get_dt_vreg_data(struct device *dev, return rc; } #ifdef CONFIG_QCOM_BUS_SCALING static void sde_rotator_bus_scale_unregister(struct sde_rot_mgr *mgr) { SDEROT_DBG("unregister bus_hdl=%x, reg_bus_hdl=%x\n", Loading Loading @@ -2899,6 +2941,15 @@ static int sde_rotator_bus_scale_register(struct sde_rot_mgr *mgr) return 0; } #else static inline void sde_rotator_bus_scale_unregister(struct sde_rot_mgr *mgr) { } static inline int sde_rotator_bus_scale_register(struct sde_rot_mgr *mgr) { return 0; } #endif static inline int sde_rotator_search_dt_clk(struct platform_device *pdev, struct sde_rot_mgr *mgr, char *clk_name, int clk_idx, Loading @@ -2916,6 +2967,8 @@ static inline int sde_rotator_search_dt_clk(struct platform_device *pdev, if (IS_ERR(tmp)) { if (mandatory) SDEROT_ERR("unable to get clk: %s\n", clk_name); else tmp = NULL; rc = PTR_ERR(tmp); } Loading drivers/media/platform/msm/sde/rotator/sde_rotator_core.h +23 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved. */ #ifndef SDE_ROTATOR_CORE_H Loading Loading @@ -312,6 +312,28 @@ struct sde_rot_entry { struct sde_rot_file_private *private; }; /* * struct sde_rot_trace_entry - structure used to pass info to trace */ struct sde_rot_trace_entry { u32 wb_idx; u32 flags; u32 input_format; u32 input_width; u32 input_height; u32 src_x; u32 src_y; u32 src_w; u32 src_h; u32 output_format; u32 output_width; u32 output_height; u32 dst_x; u32 dst_y; u32 dst_w; u32 dst_h; }; /* * struct sde_rot_perf - rotator session performance configuration * @list: list of performance configuration under one session Loading drivers/media/platform/msm/sde/rotator/sde_rotator_dev.c +43 −32 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) "%s:%d: " fmt, __func__, __LINE__ Loading Loading @@ -1638,6 +1638,7 @@ int sde_rotator_inline_commit(void *handle, struct sde_rotator_inline_cmd *cmd, struct sde_rotator_request *request = NULL; struct sde_rot_entry_container *req = NULL; struct sde_rotation_config rotcfg; struct sde_rot_trace_entry rot_trace; ktime_t *ts; u32 flags = 0; int i, ret = 0; Loading Loading @@ -1839,24 +1840,27 @@ int sde_rotator_inline_commit(void *handle, struct sde_rotator_inline_cmd *cmd, req->retire_kw = ctx->work_queue.rot_kw; req->retire_work = &request->retire_work; /* Set values to pass to trace */ rot_trace.wb_idx = req->entries[0].item.wb_idx; rot_trace.flags = req->entries[0].item.flags; rot_trace.input_format = req->entries[0].item.input.format; rot_trace.input_width = req->entries[0].item.input.width; rot_trace.input_height = req->entries[0].item.input.height; rot_trace.src_x = req->entries[0].item.src_rect.x; rot_trace.src_y = req->entries[0].item.src_rect.y; rot_trace.src_w = req->entries[0].item.src_rect.w; rot_trace.src_h = req->entries[0].item.src_rect.h; rot_trace.output_format = req->entries[0].item.output.format; rot_trace.output_width = req->entries[0].item.output.width; rot_trace.output_height = req->entries[0].item.output.height; rot_trace.dst_x = req->entries[0].item.dst_rect.x; rot_trace.dst_y = req->entries[0].item.dst_rect.y; rot_trace.dst_w = req->entries[0].item.dst_rect.w; rot_trace.dst_h = req->entries[0].item.dst_rect.h; trace_rot_entry_fence( ctx->session_id, cmd->sequence_id, req->entries[0].item.wb_idx, req->entries[0].item.flags, req->entries[0].item.input.format, req->entries[0].item.input.width, req->entries[0].item.input.height, req->entries[0].item.src_rect.x, req->entries[0].item.src_rect.y, req->entries[0].item.src_rect.w, req->entries[0].item.src_rect.h, req->entries[0].item.output.format, req->entries[0].item.output.width, req->entries[0].item.output.height, req->entries[0].item.dst_rect.x, req->entries[0].item.dst_rect.y, req->entries[0].item.dst_rect.w, req->entries[0].item.dst_rect.h); ctx->session_id, cmd->sequence_id, &rot_trace); ret = sde_rotator_handle_request_common( rot_dev->mgr, ctx->private, req); Loading Loading @@ -3078,6 +3082,7 @@ static int sde_rotator_process_buffers(struct sde_rotator_ctx *ctx, struct sde_rotator_statistics *stats = &rot_dev->stats; struct sde_rotator_vbinfo *vbinfo_out; struct sde_rotator_vbinfo *vbinfo_cap; struct sde_rot_trace_entry rot_trace; ktime_t *ts; int ret; Loading Loading @@ -3119,21 +3124,27 @@ static int sde_rotator_process_buffers(struct sde_rotator_ctx *ctx, ts[SDE_ROTATOR_TS_FENCE] = ktime_get(); /* Set values to pass to trace */ rot_trace.wb_idx = ctx->fh.prio; rot_trace.flags = (ctx->rotate << 0) | (ctx->hflip << 8) | (ctx->hflip << 9) | (ctx->secure << 10); rot_trace.input_format = ctx->format_out.fmt.pix.pixelformat; rot_trace.input_width = ctx->format_out.fmt.pix.width; rot_trace.input_height = ctx->format_out.fmt.pix.height; rot_trace.src_x = ctx->crop_out.left; rot_trace.src_y = ctx->crop_out.top; rot_trace.src_w = ctx->crop_out.width; rot_trace.src_h = ctx->crop_out.height; rot_trace.output_format = ctx->format_cap.fmt.pix.pixelformat; rot_trace.output_width = ctx->format_cap.fmt.pix.width; rot_trace.output_height = ctx->format_cap.fmt.pix.height; rot_trace.dst_x = ctx->crop_cap.left; rot_trace.dst_y = ctx->crop_cap.top; rot_trace.dst_w = ctx->crop_cap.width; rot_trace.dst_h = ctx->crop_cap.height; trace_rot_entry_fence( ctx->session_id, vbinfo_cap->fence_ts, ctx->fh.prio, (ctx->rotate << 0) | (ctx->hflip << 8) | (ctx->hflip << 9) | (ctx->secure << 10), ctx->format_out.fmt.pix.pixelformat, ctx->format_out.fmt.pix.width, ctx->format_out.fmt.pix.height, ctx->crop_out.left, ctx->crop_out.top, ctx->crop_out.width, ctx->crop_out.height, ctx->format_cap.fmt.pix.pixelformat, ctx->format_cap.fmt.pix.width, ctx->format_cap.fmt.pix.height, ctx->crop_cap.left, ctx->crop_cap.top, ctx->crop_cap.width, ctx->crop_cap.height); ctx->session_id, vbinfo_cap->fence_ts, &rot_trace); if (vbinfo_out->fence) { sde_rot_mgr_unlock(rot_dev->mgr); Loading Loading
drivers/media/platform/msm/sde/rotator/sde_rotator_base.c +9 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2012, 2015-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2012, 2015-2019, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) "%s: " fmt, __func__ Loading Loading @@ -746,6 +746,8 @@ static void sde_mdp_destroy_dt_misc(struct platform_device *pdev, #define BUS_VOTE_40_MHZ 320000000 #define BUS_VOTE_80_MHZ 640000000 #ifdef CONFIG_QCOM_BUS_SCALING static struct msm_bus_vectors mdp_reg_bus_vectors[] = { MDP_REG_BUS_VECTOR_ENTRY(0, 0), MDP_REG_BUS_VECTOR_ENTRY(0, BUS_VOTE_19_MHZ), Loading Loading @@ -786,6 +788,12 @@ static int sde_mdp_bus_scale_register(struct sde_rot_data_type *mdata) return 0; } #else static inline int sde_mdp_bus_scale_register(struct sde_rot_data_type *mdata) { return 0; } #endif static void sde_mdp_bus_scale_unregister(struct sde_rot_data_type *mdata) { Loading
drivers/media/platform/msm/sde/rotator/sde_rotator_base.h +2 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,7 @@ enum sde_rot_type { * @SDE_CAPS_PARTIALWR: partial write override * @SDE_CAPS_HW_TIMESTAMP: rotator has hw timestamp support * @SDE_CAPS_UBWC_3: universal bandwidth compression version 3 * @SDE_CAPS_UBWC_4: universal bandwidth compression version 4 */ enum sde_caps_settings { SDE_CAPS_R1_WB, Loading @@ -139,6 +140,7 @@ enum sde_caps_settings { SDE_CAPS_PARTIALWR, SDE_CAPS_HW_TIMESTAMP, SDE_CAPS_UBWC_3, SDE_CAPS_UBWC_4, SDE_CAPS_MAX, }; Loading
drivers/media/platform/msm/sde/rotator/sde_rotator_core.c +77 −24 Original line number Diff line number Diff line Loading @@ -78,6 +78,10 @@ #define BUS_VOTE_19_MHZ 153600000 /* forward prototype */ static int sde_rotator_update_perf(struct sde_rot_mgr *mgr); #ifdef CONFIG_QCOM_BUS_SCALING static struct msm_bus_vectors rot_reg_bus_vectors[] = { SDE_REG_BUS_VECTOR_ENTRY(0, 0), SDE_REG_BUS_VECTOR_ENTRY(0, BUS_VOTE_19_MHZ), Loading @@ -91,9 +95,6 @@ static struct msm_bus_scale_pdata rot_reg_bus_scale_table = { .active_only = 1, }; /* forward prototype */ static int sde_rotator_update_perf(struct sde_rot_mgr *mgr); static int sde_rotator_bus_scale_set_quota(struct sde_rot_bus_data_type *bus, u64 quota) { Loading Loading @@ -190,6 +191,18 @@ static int sde_rotator_enable_reg_bus(struct sde_rot_mgr *mgr, u64 quota) return ret; } #else static inline int sde_rotator_enable_reg_bus(struct sde_rot_mgr *mgr, u64 quota) { return 0; } static inline int sde_rotator_bus_scale_set_quota( struct sde_rot_bus_data_type *bus, u64 quota) { return 0; } #endif /* * Clock rate of all open sessions working a particular hw block Loading Loading @@ -1508,6 +1521,7 @@ static void sde_rotator_commit_handler(struct kthread_work *work) struct sde_rot_hw_resource *hw; struct sde_rot_mgr *mgr; struct sched_param param = { .sched_priority = 5 }; struct sde_rot_trace_entry rot_trace; int ret; entry = container_of(work, struct sde_rot_entry, commit_work); Loading Loading @@ -1556,17 +1570,26 @@ static void sde_rotator_commit_handler(struct kthread_work *work) if (entry->item.ts) entry->item.ts[SDE_ROTATOR_TS_COMMIT] = ktime_get(); /* Set values to pass to trace */ rot_trace.wb_idx = entry->item.wb_idx; rot_trace.flags = entry->item.flags; rot_trace.input_format = entry->item.input.format; rot_trace.input_width = entry->item.input.width; rot_trace.input_height = entry->item.input.height; rot_trace.src_x = entry->item.src_rect.x; rot_trace.src_y = entry->item.src_rect.y; rot_trace.src_w = entry->item.src_rect.w; rot_trace.src_h = entry->item.src_rect.h; rot_trace.output_format = entry->item.output.format; rot_trace.output_width = entry->item.output.width; rot_trace.output_height = entry->item.output.height; rot_trace.dst_x = entry->item.dst_rect.x; rot_trace.dst_y = entry->item.dst_rect.y; rot_trace.dst_w = entry->item.dst_rect.w; rot_trace.dst_h = entry->item.dst_rect.h; trace_rot_entry_commit( entry->item.session_id, entry->item.sequence_id, entry->item.wb_idx, entry->item.flags, entry->item.input.format, entry->item.input.width, entry->item.input.height, entry->item.src_rect.x, entry->item.src_rect.y, entry->item.src_rect.w, entry->item.src_rect.h, entry->item.output.format, entry->item.output.width, entry->item.output.height, entry->item.dst_rect.x, entry->item.dst_rect.y, entry->item.dst_rect.w, entry->item.dst_rect.h); entry->item.session_id, entry->item.sequence_id, &rot_trace); ATRACE_INT("sde_smmu_ctrl", 0); ret = sde_smmu_ctrl(1); Loading Loading @@ -1652,6 +1675,7 @@ static void sde_rotator_done_handler(struct kthread_work *work) struct sde_rot_entry_container *request; struct sde_rot_hw_resource *hw; struct sde_rot_mgr *mgr; struct sde_rot_trace_entry rot_trace; int ret; entry = container_of(work, struct sde_rot_entry, done_work); Loading Loading @@ -1686,17 +1710,26 @@ static void sde_rotator_done_handler(struct kthread_work *work) if (entry->item.ts) entry->item.ts[SDE_ROTATOR_TS_DONE] = ktime_get(); trace_rot_entry_done( entry->item.session_id, entry->item.sequence_id, entry->item.wb_idx, entry->item.flags, entry->item.input.format, entry->item.input.width, entry->item.input.height, entry->item.src_rect.x, entry->item.src_rect.y, entry->item.src_rect.w, entry->item.src_rect.h, entry->item.output.format, entry->item.output.width, entry->item.output.height, entry->item.dst_rect.x, entry->item.dst_rect.y, entry->item.dst_rect.w, entry->item.dst_rect.h); /* Set values to pass to trace */ rot_trace.wb_idx = entry->item.wb_idx; rot_trace.flags = entry->item.flags; rot_trace.input_format = entry->item.input.format; rot_trace.input_width = entry->item.input.width; rot_trace.input_height = entry->item.input.height; rot_trace.src_x = entry->item.src_rect.x; rot_trace.src_y = entry->item.src_rect.y; rot_trace.src_w = entry->item.src_rect.w; rot_trace.src_h = entry->item.src_rect.h; rot_trace.output_format = entry->item.output.format; rot_trace.output_width = entry->item.output.width; rot_trace.output_height = entry->item.output.height; rot_trace.dst_x = entry->item.dst_rect.x; rot_trace.dst_y = entry->item.dst_rect.y; rot_trace.dst_w = entry->item.dst_rect.w; rot_trace.dst_h = entry->item.dst_rect.h; trace_rot_entry_done(entry->item.session_id, entry->item.sequence_id, &rot_trace); sde_rot_mgr_lock(mgr); sde_rotator_put_hw_resource(entry->commitq, entry, entry->commitq->hw); Loading Loading @@ -2710,6 +2743,7 @@ static struct attribute_group sde_rotator_fs_attr_group = { .attrs = sde_rotator_fs_attrs }; #ifdef CONFIG_QCOM_BUS_SCALING static int sde_rotator_parse_dt_bus(struct sde_rot_mgr *mgr, struct platform_device *dev) { Loading Loading @@ -2752,6 +2786,13 @@ static int sde_rotator_parse_dt_bus(struct sde_rot_mgr *mgr, return ret; } #else static inline int sde_rotator_parse_dt_bus(struct sde_rot_mgr *mgr, struct platform_device *dev) { return 0; } #endif static int sde_rotator_parse_dt(struct sde_rot_mgr *mgr, struct platform_device *dev) Loading Loading @@ -2856,6 +2897,7 @@ static int sde_rotator_get_dt_vreg_data(struct device *dev, return rc; } #ifdef CONFIG_QCOM_BUS_SCALING static void sde_rotator_bus_scale_unregister(struct sde_rot_mgr *mgr) { SDEROT_DBG("unregister bus_hdl=%x, reg_bus_hdl=%x\n", Loading Loading @@ -2899,6 +2941,15 @@ static int sde_rotator_bus_scale_register(struct sde_rot_mgr *mgr) return 0; } #else static inline void sde_rotator_bus_scale_unregister(struct sde_rot_mgr *mgr) { } static inline int sde_rotator_bus_scale_register(struct sde_rot_mgr *mgr) { return 0; } #endif static inline int sde_rotator_search_dt_clk(struct platform_device *pdev, struct sde_rot_mgr *mgr, char *clk_name, int clk_idx, Loading @@ -2916,6 +2967,8 @@ static inline int sde_rotator_search_dt_clk(struct platform_device *pdev, if (IS_ERR(tmp)) { if (mandatory) SDEROT_ERR("unable to get clk: %s\n", clk_name); else tmp = NULL; rc = PTR_ERR(tmp); } Loading
drivers/media/platform/msm/sde/rotator/sde_rotator_core.h +23 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved. */ #ifndef SDE_ROTATOR_CORE_H Loading Loading @@ -312,6 +312,28 @@ struct sde_rot_entry { struct sde_rot_file_private *private; }; /* * struct sde_rot_trace_entry - structure used to pass info to trace */ struct sde_rot_trace_entry { u32 wb_idx; u32 flags; u32 input_format; u32 input_width; u32 input_height; u32 src_x; u32 src_y; u32 src_w; u32 src_h; u32 output_format; u32 output_width; u32 output_height; u32 dst_x; u32 dst_y; u32 dst_w; u32 dst_h; }; /* * struct sde_rot_perf - rotator session performance configuration * @list: list of performance configuration under one session Loading
drivers/media/platform/msm/sde/rotator/sde_rotator_dev.c +43 −32 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) "%s:%d: " fmt, __func__, __LINE__ Loading Loading @@ -1638,6 +1638,7 @@ int sde_rotator_inline_commit(void *handle, struct sde_rotator_inline_cmd *cmd, struct sde_rotator_request *request = NULL; struct sde_rot_entry_container *req = NULL; struct sde_rotation_config rotcfg; struct sde_rot_trace_entry rot_trace; ktime_t *ts; u32 flags = 0; int i, ret = 0; Loading Loading @@ -1839,24 +1840,27 @@ int sde_rotator_inline_commit(void *handle, struct sde_rotator_inline_cmd *cmd, req->retire_kw = ctx->work_queue.rot_kw; req->retire_work = &request->retire_work; /* Set values to pass to trace */ rot_trace.wb_idx = req->entries[0].item.wb_idx; rot_trace.flags = req->entries[0].item.flags; rot_trace.input_format = req->entries[0].item.input.format; rot_trace.input_width = req->entries[0].item.input.width; rot_trace.input_height = req->entries[0].item.input.height; rot_trace.src_x = req->entries[0].item.src_rect.x; rot_trace.src_y = req->entries[0].item.src_rect.y; rot_trace.src_w = req->entries[0].item.src_rect.w; rot_trace.src_h = req->entries[0].item.src_rect.h; rot_trace.output_format = req->entries[0].item.output.format; rot_trace.output_width = req->entries[0].item.output.width; rot_trace.output_height = req->entries[0].item.output.height; rot_trace.dst_x = req->entries[0].item.dst_rect.x; rot_trace.dst_y = req->entries[0].item.dst_rect.y; rot_trace.dst_w = req->entries[0].item.dst_rect.w; rot_trace.dst_h = req->entries[0].item.dst_rect.h; trace_rot_entry_fence( ctx->session_id, cmd->sequence_id, req->entries[0].item.wb_idx, req->entries[0].item.flags, req->entries[0].item.input.format, req->entries[0].item.input.width, req->entries[0].item.input.height, req->entries[0].item.src_rect.x, req->entries[0].item.src_rect.y, req->entries[0].item.src_rect.w, req->entries[0].item.src_rect.h, req->entries[0].item.output.format, req->entries[0].item.output.width, req->entries[0].item.output.height, req->entries[0].item.dst_rect.x, req->entries[0].item.dst_rect.y, req->entries[0].item.dst_rect.w, req->entries[0].item.dst_rect.h); ctx->session_id, cmd->sequence_id, &rot_trace); ret = sde_rotator_handle_request_common( rot_dev->mgr, ctx->private, req); Loading Loading @@ -3078,6 +3082,7 @@ static int sde_rotator_process_buffers(struct sde_rotator_ctx *ctx, struct sde_rotator_statistics *stats = &rot_dev->stats; struct sde_rotator_vbinfo *vbinfo_out; struct sde_rotator_vbinfo *vbinfo_cap; struct sde_rot_trace_entry rot_trace; ktime_t *ts; int ret; Loading Loading @@ -3119,21 +3124,27 @@ static int sde_rotator_process_buffers(struct sde_rotator_ctx *ctx, ts[SDE_ROTATOR_TS_FENCE] = ktime_get(); /* Set values to pass to trace */ rot_trace.wb_idx = ctx->fh.prio; rot_trace.flags = (ctx->rotate << 0) | (ctx->hflip << 8) | (ctx->hflip << 9) | (ctx->secure << 10); rot_trace.input_format = ctx->format_out.fmt.pix.pixelformat; rot_trace.input_width = ctx->format_out.fmt.pix.width; rot_trace.input_height = ctx->format_out.fmt.pix.height; rot_trace.src_x = ctx->crop_out.left; rot_trace.src_y = ctx->crop_out.top; rot_trace.src_w = ctx->crop_out.width; rot_trace.src_h = ctx->crop_out.height; rot_trace.output_format = ctx->format_cap.fmt.pix.pixelformat; rot_trace.output_width = ctx->format_cap.fmt.pix.width; rot_trace.output_height = ctx->format_cap.fmt.pix.height; rot_trace.dst_x = ctx->crop_cap.left; rot_trace.dst_y = ctx->crop_cap.top; rot_trace.dst_w = ctx->crop_cap.width; rot_trace.dst_h = ctx->crop_cap.height; trace_rot_entry_fence( ctx->session_id, vbinfo_cap->fence_ts, ctx->fh.prio, (ctx->rotate << 0) | (ctx->hflip << 8) | (ctx->hflip << 9) | (ctx->secure << 10), ctx->format_out.fmt.pix.pixelformat, ctx->format_out.fmt.pix.width, ctx->format_out.fmt.pix.height, ctx->crop_out.left, ctx->crop_out.top, ctx->crop_out.width, ctx->crop_out.height, ctx->format_cap.fmt.pix.pixelformat, ctx->format_cap.fmt.pix.width, ctx->format_cap.fmt.pix.height, ctx->crop_cap.left, ctx->crop_cap.top, ctx->crop_cap.width, ctx->crop_cap.height); ctx->session_id, vbinfo_cap->fence_ts, &rot_trace); if (vbinfo_out->fence) { sde_rot_mgr_unlock(rot_dev->mgr); Loading