From patchwork Mon Dec 23 11:33:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 182395 Delivered-To: patch@linaro.org Received: by 2002:a92:a146:0:0:0:0:0 with SMTP id v67csp305619ili; Mon, 23 Dec 2019 03:33:48 -0800 (PST) X-Google-Smtp-Source: APXvYqzddO7SpHXa2dGtd+Rrzv6VZEXEx56Vz4mk6L1MMFfWV990w3jBTC6aOTGWrrCoROWSwiz/ X-Received: by 2002:a05:6830:139a:: with SMTP id d26mr32886602otq.75.1577100828338; Mon, 23 Dec 2019 03:33:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577100828; cv=none; d=google.com; s=arc-20160816; b=srG5Dx+1/HDzXuQ80K9aPx2WE4aB4I28c584f0qthD/d8liZb3iYVpv7Z3o8IBAxMs fJCTrg+gKriifF+FdSy4eexPHC5shnbvor5zNIizSWySE7k22KPdRsWOFRuLywM7+tsN J0qQWh6clJJrWbdCW0dqtbUyXKq5/x+qji2LNpRm7B/WFa7GNMXGroLVgIA0wfe263iy NVtkG+5LYuRm9guu93Yjte2kt44w02PByPU/1TSIALIv2baSsxeSvbvv5C7SKr9gMigs A6vgvKhYgD3GbnhUEBXy/CoWWOu4dQQRK7nwEQZPNgaHQkqVy3cruuYmySmQ2ngyqDAS b/8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=NVL5+pBVbAL5rpEkMW1hQcPnra9m/vRP70pZvH2RbgM=; b=eP3CxngosuBz3j+d6TbSdzbWckVRUGeVh55jcn00Qa9ydt2Ju/xoPh9OfVPGpHTsmp hOujQq+M3MwyqHYrRY+l84GHYb0Zx1vzUHO4TwhtzvzJXDpB7ed/3rHphJsYIX2Pkg87 XjsLU7gkDnH3DoOzupMBOJvzPKvANnLt/2QeP6dXhK8RKzd4V3fobsRbkZil6JeAN8a7 QwUZGver/Ydiwkf5yFrOMecd3YZsr0qQajVWLjJ1c6sCp4bGbzjaVA+zK9dLtnOPm1EN F+yP7bJ85M/vWGmq4eRNVvB4zkcRmEDXzEKa9QteIFB/PdHcLT7IBd578wVVq7QDPqul rK5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uyzLyA6K; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x20si10290877otq.222.2019.12.23.03.33.48; Mon, 23 Dec 2019 03:33:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uyzLyA6K; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726887AbfLWLdq (ORCPT + 15 others); Mon, 23 Dec 2019 06:33:46 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:44917 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726866AbfLWLdq (ORCPT ); Mon, 23 Dec 2019 06:33:46 -0500 Received: by mail-lj1-f195.google.com with SMTP id u71so17404202lje.11 for ; Mon, 23 Dec 2019 03:33:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NVL5+pBVbAL5rpEkMW1hQcPnra9m/vRP70pZvH2RbgM=; b=uyzLyA6K0/D3lztcG0wV5t26vLt+Njmpe9ixCw34YaraGQOqEUGSONL78FevubphC+ hcOz+DyDQPP0btExCyIWRmUwbMu1jxFk/crK0L1HJZPIINAvfRNu9cRbnrmbskdZOabs fyX+BF4okS4eXAl6IPjfToZ2zMilAPVw5OirsCnbzj5pEC/sifndpkekk0f51iV3jXuG eeh3va+879UW1hwq1GurgAQOI86Mv3xLzUNZfm0vEhhXOylREWApQ8Cw1zwweIpDOpVv uYM8sZoCdQsU+FxFp/Brhd8aUYYDVgMBUy67cVj5pAdLXfL5exQHZzvAx8ueQqj8rWgM 9HPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=NVL5+pBVbAL5rpEkMW1hQcPnra9m/vRP70pZvH2RbgM=; b=WsEY0NV7TWIS6SlGKwWnUFHrCF9/KBysdftM1PSbpjHKLbcsAoIOwDdGM51HYKnHfJ 4A6+ZrCkmIY9Lj+9UXQYPJ4a068Myb+CU1qARCDrMhv5gaIA7ygI2LOmvAWJRVmyopw+ edjlwM8Ymsm0Jv4+btlSborMVnJyIoQT7IG6Q2+wLCqP2cTggHOQOmoU0Kf2kZsYk7SM Wj3d1IjbnMYw9l7MXATLDbJUVcJJqa5fjqHlbMhvKT6X1AexDCBpz0/RzT9qz7JS4z75 PWD1vRZVpgHjSZnf2dXTMBaiT47B+fFBtGV2VI0Wfv3gxJR/N8p21VT0qGkxP/+kWGar oqEA== X-Gm-Message-State: APjAAAUf6TRZbJaYtTgIAsiWYkzR5Sa7Om+LVeKbycRKTGmORx62qX+o H8QWkreTiplzXN+51B9H5PsyBzdNsVY= X-Received: by 2002:a2e:7816:: with SMTP id t22mr17796612ljc.161.1577100823535; Mon, 23 Dec 2019 03:33:43 -0800 (PST) Received: from localhost.localdomain ([37.157.136.193]) by smtp.gmail.com with ESMTPSA id g15sm8381500ljk.8.2019.12.23.03.33.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Dec 2019 03:33:42 -0800 (PST) From: Stanimir Varbanov To: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Vikash Garodia , dikshita@codeaurora.org, Aniket Masule , Stanimir Varbanov Subject: [PATCH v3 02/12] media: venus: introduce core selection Date: Mon, 23 Dec 2019 13:33:01 +0200 Message-Id: <20191223113311.20602-3-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191223113311.20602-1-stanimir.varbanov@linaro.org> References: <20191223113311.20602-1-stanimir.varbanov@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Aniket Masule Presently the core (vcodec pipelines) assignment is static. Here we introduce dynamic load balancing across the cores depending on the current session load. The load on earch core is calculated and core with minimum load is assigned to given instance. This will be applicable on Venus v4 with more than one vcodec cores. Signed-off-by: Aniket Masule Co-developed-by: Stanimir Varbanov Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.h | 3 + drivers/media/platform/qcom/venus/helpers.c | 17 +- drivers/media/platform/qcom/venus/helpers.h | 1 - .../media/platform/qcom/venus/hfi_helper.h | 1 + .../media/platform/qcom/venus/hfi_parser.h | 5 + .../media/platform/qcom/venus/pm_helpers.c | 183 ++++++++++++++++-- .../media/platform/qcom/venus/pm_helpers.h | 26 +++ drivers/media/platform/qcom/venus/vdec.c | 11 +- drivers/media/platform/qcom/venus/venc.c | 10 +- 9 files changed, 221 insertions(+), 36 deletions(-) -- 2.17.1 diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h index c66763e1b8f1..bfbd4a1ba089 100644 --- a/drivers/media/platform/qcom/venus/core.h +++ b/drivers/media/platform/qcom/venus/core.h @@ -181,6 +181,8 @@ struct venus_core { struct delayed_work work; struct venus_caps caps[MAX_CODEC_NUM]; unsigned int codecs_count; + unsigned int core0_usage_count; + unsigned int core1_usage_count; }; struct vdec_controls { @@ -379,6 +381,7 @@ struct venus_inst { const struct hfi_inst_ops *ops; u32 session_type; union hfi_get_property hprop; + unsigned int core_acquired: 1; }; #define IS_V1(core) ((core)->res->hfi_version == HFI_VERSION_1XX) diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index cbeeaf6077e0..043e0d8705a8 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -723,21 +723,6 @@ int venus_helper_set_work_mode(struct venus_inst *inst, u32 mode) } EXPORT_SYMBOL_GPL(venus_helper_set_work_mode); -int venus_helper_set_core_usage(struct venus_inst *inst, u32 usage) -{ - const u32 ptype = HFI_PROPERTY_CONFIG_VIDEOCORES_USAGE; - struct hfi_videocores_usage_type cu; - - inst->clk_data.core_id = usage; - if (!IS_V4(inst->core)) - return 0; - - cu.video_core_enable_mask = usage; - - return hfi_session_set_property(inst, ptype, &cu); -} -EXPORT_SYMBOL_GPL(venus_helper_set_core_usage); - int venus_helper_init_codec_freq_data(struct venus_inst *inst) { const struct codec_freq_data *data; @@ -1101,6 +1086,8 @@ void venus_helper_vb2_stop_streaming(struct vb2_queue *q) else inst->streamon_cap = 0; + venus_pm_release_core(inst); + mutex_unlock(&inst->lock); } EXPORT_SYMBOL_GPL(venus_helper_vb2_stop_streaming); diff --git a/drivers/media/platform/qcom/venus/helpers.h b/drivers/media/platform/qcom/venus/helpers.h index 44b50914cd12..b64875564064 100644 --- a/drivers/media/platform/qcom/venus/helpers.h +++ b/drivers/media/platform/qcom/venus/helpers.h @@ -34,7 +34,6 @@ int venus_helper_set_output_resolution(struct venus_inst *inst, u32 buftype); int venus_helper_set_work_mode(struct venus_inst *inst, u32 mode); int venus_helper_init_codec_freq_data(struct venus_inst *inst); -int venus_helper_set_core_usage(struct venus_inst *inst, u32 usage); int venus_helper_set_num_bufs(struct venus_inst *inst, unsigned int input_bufs, unsigned int output_bufs, unsigned int output2_bufs); diff --git a/drivers/media/platform/qcom/venus/hfi_helper.h b/drivers/media/platform/qcom/venus/hfi_helper.h index b70551e296b7..2a47f6c0a07a 100644 --- a/drivers/media/platform/qcom/venus/hfi_helper.h +++ b/drivers/media/platform/qcom/venus/hfi_helper.h @@ -550,6 +550,7 @@ struct hfi_bitrate { #define HFI_CAPABILITY_LCU_SIZE 0x14 #define HFI_CAPABILITY_HIER_P_HYBRID_NUM_ENH_LAYERS 0x15 #define HFI_CAPABILITY_MBS_PER_SECOND_POWERSAVE 0x16 +#define HFI_CAPABILITY_MAX_VIDEOCORES 0x2b struct hfi_capability { u32 capability_type; diff --git a/drivers/media/platform/qcom/venus/hfi_parser.h b/drivers/media/platform/qcom/venus/hfi_parser.h index 3e931c747e19..264e6dd2415f 100644 --- a/drivers/media/platform/qcom/venus/hfi_parser.h +++ b/drivers/media/platform/qcom/venus/hfi_parser.h @@ -107,4 +107,9 @@ static inline u32 frate_step(struct venus_inst *inst) return cap_step(inst, HFI_CAPABILITY_FRAMERATE); } +static inline u32 core_num_max(struct venus_inst *inst) +{ + return cap_max(inst, HFI_CAPABILITY_MAX_VIDEOCORES); +} + #endif diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c index 9531c01f067b..46d9d2fb5e23 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.c +++ b/drivers/media/platform/qcom/venus/pm_helpers.c @@ -14,6 +14,7 @@ #include #include "core.h" +#include "hfi_parser.h" #include "hfi_venus_io.h" #include "pm_helpers.h" @@ -480,6 +481,173 @@ static int poweron_coreid(struct venus_core *core, unsigned int coreid_mask) return 0; } +static void +min_loaded_core(struct venus_inst *inst, u32 *min_coreid, u32 *min_load) +{ + u32 mbs_per_sec, load, core1_load = 0, core2_load = 0; + u32 cores_max = core_num_max(inst); + struct venus_core *core = inst->core; + struct venus_inst *inst_pos; + unsigned long vpp_freq; + u32 coreid; + + mutex_lock(&core->lock); + + list_for_each_entry(inst_pos, &core->instances, list) { + if (inst_pos == inst) + continue; + vpp_freq = inst_pos->clk_data.codec_freq_data->vpp_freq; + coreid = inst_pos->clk_data.core_id; + + mbs_per_sec = load_per_instance(inst_pos); + load = mbs_per_sec * vpp_freq; + + if ((coreid & VIDC_CORE_ID_3) == VIDC_CORE_ID_3) { + core1_load += load / 2; + core2_load += load / 2; + } else if (coreid & VIDC_CORE_ID_1) { + core1_load += load; + } else if (coreid & VIDC_CORE_ID_2) { + core2_load += load; + } + } + + *min_coreid = core1_load <= core2_load ? + VIDC_CORE_ID_1 : VIDC_CORE_ID_2; + *min_load = min(core1_load, core2_load); + + if (cores_max < VIDC_CORE_ID_2 || core->res->vcodec_num < 2) { + *min_coreid = VIDC_CORE_ID_1; + *min_load = core1_load; + } + + mutex_unlock(&core->lock); +} + +static int decide_core(struct venus_inst *inst) +{ + const u32 ptype = HFI_PROPERTY_CONFIG_VIDEOCORES_USAGE; + struct venus_core *core = inst->core; + u32 min_coreid, min_load, inst_load; + struct hfi_videocores_usage_type cu; + unsigned long max_freq; + + if (legacy_binding) { + if (inst->session_type == VIDC_SESSION_TYPE_DEC) + cu.video_core_enable_mask = VIDC_CORE_ID_1; + else + cu.video_core_enable_mask = VIDC_CORE_ID_2; + + goto done; + } + + if (inst->clk_data.core_id != VIDC_CORE_ID_DEFAULT) + return 0; + + inst_load = load_per_instance(inst); + inst_load *= inst->clk_data.codec_freq_data->vpp_freq; + max_freq = core->res->freq_tbl[0].freq; + + min_loaded_core(inst, &min_coreid, &min_load); + + if ((inst_load + min_load) > max_freq) { + dev_warn(core->dev, "HW is overloaded, needed: %u max: %lu\n", + inst_load, max_freq); + return -EINVAL; + } + + inst->clk_data.core_id = min_coreid; + cu.video_core_enable_mask = min_coreid; + +done: + return hfi_session_set_property(inst, ptype, &cu); +} + +static int acquire_core(struct venus_inst *inst) +{ + struct venus_core *core = inst->core; + unsigned int coreid_mask = 0; + + if (inst->core_acquired) + return 0; + + inst->core_acquired = true; + + if (inst->clk_data.core_id & VIDC_CORE_ID_1) { + if (core->core0_usage_count++) + return 0; + + coreid_mask = VIDC_CORE_ID_1; + } + + if (inst->clk_data.core_id & VIDC_CORE_ID_2) { + if (core->core1_usage_count++) + return 0; + + coreid_mask |= VIDC_CORE_ID_2; + } + + return poweron_coreid(core, coreid_mask); +} + +static int release_core(struct venus_inst *inst) +{ + struct venus_core *core = inst->core; + unsigned int coreid_mask = 0; + int ret; + + if (!inst->core_acquired) + return 0; + + if (inst->clk_data.core_id & VIDC_CORE_ID_1) { + if (--core->core0_usage_count) + goto done; + + coreid_mask = VIDC_CORE_ID_1; + } + + if (inst->clk_data.core_id & VIDC_CORE_ID_2) { + if (--core->core1_usage_count) + goto done; + + coreid_mask |= VIDC_CORE_ID_2; + } + + ret = poweroff_coreid(core, coreid_mask); + if (ret) + return ret; + +done: + inst->clk_data.core_id = VIDC_CORE_ID_DEFAULT; + inst->core_acquired = false; + return 0; +} + +static int coreid_power_v4(struct venus_inst *inst, int on) +{ + struct venus_core *core = inst->core; + int ret; + + if (legacy_binding) + return 0; + + if (on == POWER_ON) { + ret = decide_core(inst); + if (ret) + return ret; + + mutex_lock(&core->lock); + ret = acquire_core(inst); + mutex_unlock(&core->lock); + } else { + mutex_lock(&core->lock); + ret = release_core(inst); + mutex_unlock(&core->lock); + } + + return ret; +} + static int vdec_get_v4(struct device *dev) { struct venus_core *core = dev_get_drvdata(dev); @@ -661,22 +829,12 @@ static void core_put_v4(struct device *dev) static int core_power_v4(struct device *dev, int on) { struct venus_core *core = dev_get_drvdata(dev); - const unsigned int coreid_mask = VIDC_CORE_ID_1 | VIDC_CORE_ID_2; int ret = 0; - if (on == POWER_ON) { + if (on == POWER_ON) ret = core_clks_enable(core); - if (ret) - return ret; - - if (!legacy_binding) - ret = poweron_coreid(core, coreid_mask); - } else { - if (!legacy_binding) - ret = poweroff_coreid(core, coreid_mask); - + else core_clks_disable(core); - } return ret; } @@ -786,6 +944,7 @@ static const struct venus_pm_ops pm_ops_v4 = { .venc_get = venc_get_v4, .venc_put = venc_put_v4, .venc_power = venc_power_v4, + .coreid_power = coreid_power_v4, .load_scale = load_scale_v4, }; diff --git a/drivers/media/platform/qcom/venus/pm_helpers.h b/drivers/media/platform/qcom/venus/pm_helpers.h index d98b6dc20740..aa2f6afa2354 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.h +++ b/drivers/media/platform/qcom/venus/pm_helpers.h @@ -21,6 +21,8 @@ struct venus_pm_ops { void (*venc_put)(struct device *dev); int (*venc_power)(struct device *dev, int on); + int (*coreid_power)(struct venus_inst *inst, int on); + int (*load_scale)(struct venus_inst *inst); }; @@ -36,4 +38,28 @@ static inline int venus_pm_load_scale(struct venus_inst *inst) return core->pm_ops->load_scale(inst); } +static inline int venus_pm_acquire_core(struct venus_inst *inst) +{ + struct venus_core *core = inst->core; + const struct venus_pm_ops *pm_ops = core->pm_ops; + int ret = 0; + + if (pm_ops && pm_ops->coreid_power) + ret = pm_ops->coreid_power(inst, POWER_ON); + + return ret; +} + +static inline int venus_pm_release_core(struct venus_inst *inst) +{ + struct venus_core *core = inst->core; + const struct venus_pm_ops *pm_ops = core->pm_ops; + int ret = 0; + + if (pm_ops && pm_ops->coreid_power) + ret = pm_ops->coreid_power(inst, POWER_OFF); + + return ret; +} + #endif diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 83ce30516591..7b7a4f3377cf 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -579,10 +579,6 @@ static int vdec_output_conf(struct venus_inst *inst) if (ret) return ret; - ret = venus_helper_set_core_usage(inst, VIDC_CORE_ID_1); - if (ret) - return ret; - if (core->res->hfi_version == HFI_VERSION_1XX) { ptype = HFI_PROPERTY_PARAM_VDEC_CONTINUE_DATA_TRANSFER; ret = hfi_session_set_property(inst, ptype, &en); @@ -951,6 +947,10 @@ static int vdec_start_streaming(struct vb2_queue *q, unsigned int count) mutex_lock(&inst->lock); + ret = venus_pm_acquire_core(inst); + if (ret) + return ret; + if (q->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) ret = vdec_start_capture(inst); else @@ -1078,6 +1078,7 @@ static void vdec_session_release(struct venus_inst *inst) venus_helper_free_dpb_bufs(inst); venus_pm_load_scale(inst); + venus_pm_release_core(inst); INIT_LIST_HEAD(&inst->registeredbufs); mutex_unlock(&inst->lock); @@ -1337,6 +1338,8 @@ static int vdec_open(struct file *file) inst->num_output_bufs = 1; inst->codec_state = VENUS_DEC_STATE_DEINIT; inst->buf_count = 0; + inst->clk_data.core_id = VIDC_CORE_ID_DEFAULT; + inst->core_acquired = false; init_waitqueue_head(&inst->reconf_wait); venus_helper_init_instance(inst); diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index 5fa1724cb537..4f594fe4b661 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -656,10 +656,6 @@ static int venc_set_properties(struct venus_inst *inst) if (ret) return ret; - ret = venus_helper_set_core_usage(inst, VIDC_CORE_ID_2); - if (ret) - return ret; - ptype = HFI_PROPERTY_CONFIG_FRAME_RATE; frate.buffer_type = HFI_BUFFER_OUTPUT; frate.framerate = inst->fps * (1 << 16); @@ -992,6 +988,10 @@ static int venc_start_streaming(struct vb2_queue *q, unsigned int count) if (ret) goto bufs_done; + ret = venus_pm_acquire_core(inst); + if (ret) + goto deinit_sess; + ret = venc_set_properties(inst); if (ret) goto deinit_sess; @@ -1160,6 +1160,8 @@ static int venc_open(struct file *file) inst->core = core; inst->session_type = VIDC_SESSION_TYPE_ENC; + inst->clk_data.core_id = VIDC_CORE_ID_DEFAULT; + inst->core_acquired = false; venus_helper_init_instance(inst); From patchwork Mon Dec 23 11:33:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 182405 Delivered-To: patch@linaro.org Received: by 2002:a92:a146:0:0:0:0:0 with SMTP id v67csp306510ili; Mon, 23 Dec 2019 03:34:36 -0800 (PST) X-Google-Smtp-Source: APXvYqx2N1AWKetMI/5dMqreidFMGW7fhyONy12oaUFu6hposj79aWCoNsSv0Zs2OlvArmEME5kD X-Received: by 2002:a9d:7f11:: with SMTP id j17mr33261172otq.281.1577100876742; Mon, 23 Dec 2019 03:34:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577100876; cv=none; d=google.com; s=arc-20160816; b=EpJfmh/COTzUSL8DU2JMRE/uDjfcXY5W3dFj9wJbE0Msn+MR60Pd/es4Uk9i4Zf41D 0iDMv9a5iGKwjQxpIHYnFHOgl6d4nkY6da23rmhaWC2ZJzbTWwiM5NIvDbTONkG3w+lk jpgjUr7OJmB2liRnhozS020Xx0DV+0RfYqKlXFPrHiCL/Pq9qHx9Z+73csHjvl9MCtyL FNMe7OW4Fe0xjd1OUUxesJEnTuB6oN454fRFNHpCzzdtQUQ1OS3HpQYKOrxxp34CElXs TDGmjhpmPOBM/a2h17i7hCz2lCrepGTTU97e57FAPUwJgxJcAS/ioXC3/diUQnkEIJBN Ensg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=fdnv5G54kjVyBGm0/gl9gu7nvtpvFPt8yg5pxAgrcmE=; b=GT302vaX/jnuMMnIyrc36tV/3APBMUPvvMqBo7V5H8dAKB1ux7xnIdaHG3cufsSZng oyduNZkm5X5ixW5S2JZ2DErsZwe4BAWPVmHoM2cHF3A3sOlpWvTxVpuWdoMyiAY8SuZK u+k/DKyvVd/P91Wc36eFRy3/3leXzmlszSgievVq7V5TkCTTm+fRCUdsRgofkPhmgU1e J6lmabgNJonAM6odGi4HbmprlAjhuEuEmqqdpZtDUgAvY+O0Y/2TrCbEwUQjTHqOq0Ij yPl6ckHzxlXx4jrJqKrzBiqWawVRwBAIiPo6Cr8JVr16op+OTpd1K/WGtNEIj3eXknP0 +YHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gAq2cysK; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q190si168837oic.187.2019.12.23.03.34.36; Mon, 23 Dec 2019 03:34:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gAq2cysK; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726936AbfLWLdu (ORCPT + 15 others); Mon, 23 Dec 2019 06:33:50 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:40220 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726893AbfLWLdu (ORCPT ); Mon, 23 Dec 2019 06:33:50 -0500 Received: by mail-lj1-f194.google.com with SMTP id u1so17403917ljk.7 for ; Mon, 23 Dec 2019 03:33:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fdnv5G54kjVyBGm0/gl9gu7nvtpvFPt8yg5pxAgrcmE=; b=gAq2cysKYZZfj4Q8zAemwVqnt5m0oC3iqy37p1iR40SVb+N7zvSbX9h4shinQdiimL tcxtDJadBJ572tOx6WeL2xYwiCMx8viFF8fASfQGgBD2DvK+oAEv/Tm4fFeM/0uNl9In yXxqZkCfQErbq/BfvBOTW1KvoLHsf4p5MhC3QbBHuq5aUHykWh3sdJPDku6WotC5We2G 6WoQzNoV2XMM5l6YLzdDQYY0EuQZIyH6J5K6J0Y0dMdUFwrbyAWlfkoW/9+I6O76NlWP cPT5B7ENvofMc1Wl6O1nUmL3VVrPqG6XRnkBejagryZ3Z/H/VpAVEJ+BvOPOObB7rSuK oQbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fdnv5G54kjVyBGm0/gl9gu7nvtpvFPt8yg5pxAgrcmE=; b=F+49T5cBoq5gi9K4KIsHOwSkR8u4DSP3JJeAH4o9z2R9TIzXnfI1oI8n4AZgyKJc9O pyArsNjywmhbCH4WZbNp9z400pOydgPs/1TRAQEiJ1D2ZM4vws4RpvXF1LU3Uvs/VDnC DBy3To3WFW+URzHzKBUkcIHxNrPOkK0p2O3tTkQlIuu8PacmR1wgXcDhZkISGnoRhukO d0TZZ69Les4zoF/kL8gJFbGzD8zQh6zTQQQiN9AgOmnBEnDnMEH/iwBJ8ebnOGE/bP4e kTeMJ0TWd+tNEt2exgJbMrxl75HjCm9jHo+DKnmVqLQGrI/qe/iSqazg3I9Vkt6w0t7L V0zw== X-Gm-Message-State: APjAAAV8saleXoya3U/QlYU/4YzIYZ/rMoHbZOYlRbcZZ/i8FF6w80H4 zdHZMVVTdhSjQt4uDfB6QP5B4Ppj7x8= X-Received: by 2002:a2e:6c13:: with SMTP id h19mr8124037ljc.221.1577100827132; Mon, 23 Dec 2019 03:33:47 -0800 (PST) Received: from localhost.localdomain ([37.157.136.193]) by smtp.gmail.com with ESMTPSA id g15sm8381500ljk.8.2019.12.23.03.33.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Dec 2019 03:33:46 -0800 (PST) From: Stanimir Varbanov To: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Vikash Garodia , dikshita@codeaurora.org, Stanimir Varbanov Subject: [PATCH v3 04/12] v4l: Add source event change for bit-depth Date: Mon, 23 Dec 2019 13:33:03 +0200 Message-Id: <20191223113311.20602-5-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191223113311.20602-1-stanimir.varbanov@linaro.org> References: <20191223113311.20602-1-stanimir.varbanov@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This event indicate that the source color bit-depth is changed during run-time. The client must get the new format and re-allocate buffers for it. This can usually happens with video decoder (encoders) when the bit-stream color bit-depth is changed from 8 to 10bits or vice versa. Acked-by: Sakari Ailus Signed-off-by: Stanimir Varbanov --- Documentation/media/uapi/v4l/vidioc-dqevent.rst | 8 +++++++- Documentation/media/videodev2.h.rst.exceptions | 1 + include/uapi/linux/videodev2.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/Documentation/media/uapi/v4l/vidioc-dqevent.rst b/Documentation/media/uapi/v4l/vidioc-dqevent.rst index 42659a3d1705..fad853d440cf 100644 --- a/Documentation/media/uapi/v4l/vidioc-dqevent.rst +++ b/Documentation/media/uapi/v4l/vidioc-dqevent.rst @@ -402,7 +402,13 @@ call. that many Video Capture devices are not able to recover from a temporary loss of signal and so restarting streaming I/O is required in order for the hardware to synchronize to the video signal. - + * - ``V4L2_EVENT_SRC_CH_COLOR_DEPTH`` + - 0x0002 + - This event gets triggered when color bit-depth change is detected + from a video decoder. Applications will have to query the new pixel + format and re-negotiate the queue. In most cases the streaming must be + stopped and restarted (:ref:`VIDIOC_STREAMOFF ` + followed by :ref:`VIDIOC_STREAMON `). Return Value ============ diff --git a/Documentation/media/videodev2.h.rst.exceptions b/Documentation/media/videodev2.h.rst.exceptions index cb6ccf91776e..209709114378 100644 --- a/Documentation/media/videodev2.h.rst.exceptions +++ b/Documentation/media/videodev2.h.rst.exceptions @@ -490,6 +490,7 @@ replace define V4L2_EVENT_CTRL_CH_FLAGS ctrl-changes-flags replace define V4L2_EVENT_CTRL_CH_RANGE ctrl-changes-flags replace define V4L2_EVENT_SRC_CH_RESOLUTION src-changes-flags +replace define V4L2_EVENT_SRC_CH_COLOR_DEPTH src-changes-flags replace define V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ :c:type:`v4l2_event_motion_det` diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 04481c717fee..2a5138ac6d25 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -2307,6 +2307,7 @@ struct v4l2_event_frame_sync { }; #define V4L2_EVENT_SRC_CH_RESOLUTION (1 << 0) +#define V4L2_EVENT_SRC_CH_COLOR_DEPTH (1 << 1) struct v4l2_event_src_change { __u32 changes; From patchwork Mon Dec 23 11:33:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 182402 Delivered-To: patch@linaro.org Received: by 2002:a92:a146:0:0:0:0:0 with SMTP id v67csp305952ili; Mon, 23 Dec 2019 03:34:07 -0800 (PST) X-Google-Smtp-Source: APXvYqy73/pjmiZQZvrYE6X4J/MQSurS8Co0pDmIo69KDGFduEcnzoPcuShgAmELiMLoNuGjKj68 X-Received: by 2002:a05:6830:1353:: with SMTP id r19mr32550620otq.288.1577100846958; Mon, 23 Dec 2019 03:34:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577100846; cv=none; d=google.com; s=arc-20160816; b=jnbrRi2l9utemsW/xrnD7rQfc53oVh7Y6SNf8fr4aVWCw21QoFH8fg4Hu2rTnJ4TkS AXMkvMuv+4T5SwfoeXFEehd6bZRmb4JZbD16e8kyY+OJ9gsmahzEmLYUUo8GHP9BlMkt +pqOwUu2/zR3XlsScHihv0gQgUHrRn+1gz7GV1bWdq+WJG7sfCEFstQkZQpW3wq6HK2t JT2hK0QEpj475NVN3cdNgE5rDPIlcqAs+hTEXGeFdJdR/1PNRU0Q08IQHqquX5KGt5C7 H8Llsw7DKqWob3iJoyN0dXY0W2ZCk2vVvnJhvFe1VTriSjGDem0NAQEAmD0h9ZZDjkMM StNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=sRlbBOojW7v2VRLaDWPeR8d17hgWrl9wNZOspFmUuFU=; b=rXWE3wdFOPNsG2oXPKMWe+Rl28IqbDZ3m85fcc2xm2Fyu6DHde/COwBLS7aslzMxEY +dv0HqL9RIKGT/MuJcyyEt/EBbhuHMBD5u25nCfLQGQNoTz7O30n3mHMzCL9IIcP65MM oJEC7GousBWeuoEQXsKfx12sP5cVKIUMs4+KgGV7H2dwzegxGYonGiuwR9WiZynD5j4H Ks6sYq2O30k0uvs753h2/diAzw/j1ZGZ+GCpCMU2/2Xyiy6AXpOjkA2LECo9GBi70V99 X3rBTPJO9AviDCTpQ7l53E8zO6u97IIQ/Xs83+x8reOydIKPLlY9JDhrjYuBEsTGALmc jupQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d4l5DT24; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 200si9003352oii.156.2019.12.23.03.34.06; Mon, 23 Dec 2019 03:34:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d4l5DT24; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727166AbfLWLeF (ORCPT + 15 others); Mon, 23 Dec 2019 06:34:05 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:33721 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727146AbfLWLeF (ORCPT ); Mon, 23 Dec 2019 06:34:05 -0500 Received: by mail-lf1-f66.google.com with SMTP id n25so12404279lfl.0 for ; Mon, 23 Dec 2019 03:34:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sRlbBOojW7v2VRLaDWPeR8d17hgWrl9wNZOspFmUuFU=; b=d4l5DT24Y38W5mGuPJIynJ4QPy5y2AWXpfgy1NN3L/MYUmQX19hnKTTiPzFkalQ9Mn PgyRbz56ibJ1HYrr7UfrDjkHeXb40tsZdYSFwRRS3BuRxDe2BsmwolxenveHq6hPUruv Xy7PCG415Tej4ov7zYhfhSmb9vQHj05DFGuUWvmLwEwJZm+V7KN5LN9XDXsaK4AOPICJ D4waAR3nseEIP22O3paOsc50esLW1/Ln3N51JGKwiw4/BLhSltqxp1dirTucsmhovzk9 UwU5u7lk3FKJaQ119nGK3AsNrPL7AummJd/0hqvuOagRfVuePG5e3XMUyBIPvyBSh8CM X8Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sRlbBOojW7v2VRLaDWPeR8d17hgWrl9wNZOspFmUuFU=; b=LcA+Bbxoq7JmufelNL/n9cVQYFmRVBPtD5SDX3HhksZHtO++OiQXDFgDANPLYEWIPW 4Knnxus5lRROiPzalIyZQ0gUQazC2jXZRAuUTZgNuDFrrRczyNAUv/p7nB/M3Bs696Xq 1I2WMgYA+6lL/D7N974N+jiRzCGZcrU88aJ0QvMVhXNUZRE1wNWcbNLTq9j670lWCAZs 24+ETrD+9gbIalbRy63WNO+YIGh7k6T948INCl15rIw9sWMSRunQxidGeWJDVKSgSeJ/ mIHNhKni6tGH5HX8AEGIyqcYn2O6GzksiVP5cVpuK3YnxYf58r9MraEAy83w75u5zQEC yjFA== X-Gm-Message-State: APjAAAVfpoiMYYXjoxeT9ItXJUIbAdMhKiZLRhk73tuPk+Kpje6rP+Qh TxSrGdNo+v5uGLJmF6fr1nw252YyqhE= X-Received: by 2002:a19:888:: with SMTP id 130mr16914253lfi.167.1577100842992; Mon, 23 Dec 2019 03:34:02 -0800 (PST) Received: from localhost.localdomain ([37.157.136.193]) by smtp.gmail.com with ESMTPSA id g15sm8381500ljk.8.2019.12.23.03.34.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Dec 2019 03:34:02 -0800 (PST) From: Stanimir Varbanov To: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Vikash Garodia , dikshita@codeaurora.org, Stanimir Varbanov Subject: [PATCH v3 11/12] arm64: dts: sdm845: follow venus-sdm845v2 DT binding Date: Mon, 23 Dec 2019 13:33:10 +0200 Message-Id: <20191223113311.20602-12-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191223113311.20602-1-stanimir.varbanov@linaro.org> References: <20191223113311.20602-1-stanimir.varbanov@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Move all pmdomain and clock resources to Venus DT node. And make possible to support dynamic core assignment on v4. Signed-off-by: Stanimir Varbanov --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) -- 2.17.1 diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index ddb1f23c936f..c5784951d408 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -2568,32 +2568,33 @@ }; video-codec@aa00000 { - compatible = "qcom,sdm845-venus"; + compatible = "qcom,sdm845-venus-v2"; reg = <0 0x0aa00000 0 0xff000>; interrupts = ; - power-domains = <&videocc VENUS_GDSC>; + power-domains = <&videocc VENUS_GDSC>, + <&videocc VCODEC0_GDSC>, + <&videocc VCODEC1_GDSC>; + power-domain-names = "venus", "vcodec0", "vcodec1"; clocks = <&videocc VIDEO_CC_VENUS_CTL_CORE_CLK>, <&videocc VIDEO_CC_VENUS_AHB_CLK>, - <&videocc VIDEO_CC_VENUS_CTL_AXI_CLK>; - clock-names = "core", "iface", "bus"; + <&videocc VIDEO_CC_VENUS_CTL_AXI_CLK>, + <&videocc VIDEO_CC_VCODEC0_CORE_CLK>, + <&videocc VIDEO_CC_VCODEC0_AXI_CLK>, + <&videocc VIDEO_CC_VCODEC1_CORE_CLK>, + <&videocc VIDEO_CC_VCODEC1_AXI_CLK>; + clock-names = "core", "iface", "bus", + "vcodec0_core", "vcodec0_bus", + "vcodec1_core", "vcodec1_bus"; iommus = <&apps_smmu 0x10a0 0x8>, <&apps_smmu 0x10b0 0x0>; memory-region = <&venus_mem>; video-core0 { compatible = "venus-decoder"; - clocks = <&videocc VIDEO_CC_VCODEC0_CORE_CLK>, - <&videocc VIDEO_CC_VCODEC0_AXI_CLK>; - clock-names = "core", "bus"; - power-domains = <&videocc VCODEC0_GDSC>; }; video-core1 { compatible = "venus-encoder"; - clocks = <&videocc VIDEO_CC_VCODEC1_CORE_CLK>, - <&videocc VIDEO_CC_VCODEC1_AXI_CLK>; - clock-names = "core", "bus"; - power-domains = <&videocc VCODEC1_GDSC>; }; }; From patchwork Mon Dec 23 11:33:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 182403 Delivered-To: patch@linaro.org Received: by 2002:a92:a146:0:0:0:0:0 with SMTP id v67csp306023ili; Mon, 23 Dec 2019 03:34:11 -0800 (PST) X-Google-Smtp-Source: APXvYqxblejFp71zSzKSypcG+NCd2R0i3+QM1nMzFzZwUMZRDKFhv8R0tE5m/SVdzTq3jV2Uu4lN X-Received: by 2002:a9d:7d09:: with SMTP id v9mr12077220otn.338.1577100851257; Mon, 23 Dec 2019 03:34:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577100851; cv=none; d=google.com; s=arc-20160816; b=MGu+oa9NyXnti0OCf9qyFPdDVZKaHbM+KdQ8KoFKmzrhf+gpB8/liC/1b0YEolUtCg K6zHlmrTIkLM67eJQJoWNL+A5Cj16c9lqXhBUmC9sy5SpbeUvsIrZZxEjwWMAuRVPGHZ J3VdqQgKfAW8by3nAJHfAXdi5BimsinAMyEPXWmKJ+9tiUTLMyfsSjbcKfHcJKu8lOKL 3GwBda0pk5YyiFmA28gj3JlY731sWrZtDcuRnMY/+FDhrbDY2g78V65hix/BdNRzhbCx 9K1EagzJg9xVEf/9ld50/rQwzJFbpCBhz3oBgdDMsK6meng5QseyYuC/0kEIl2dqcJVO truA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=T1y8MMPNkqcrm20up1WtHiDJ34NUPmK2DHqDsNPyhC4=; b=PVZNroPxUdgZAIMcpvCAhCuNL35pR9Q72H8lhJsm3MH+tOwGpG8zC89xrcDIcsaSAM NiZFTUKUUqtrZnbhIiWdrbMMz5gHpx3Ax9VXx70wAsDRalqEwa77CfU+joDwYfjlOtmG uTwrX6oyeBZH83H23PuV2oYe98RYl6/s9YpW1+ntQ8d3Cns3jw2YOy/zUpYUAM3R8tVj MbG3BgHjmMOCcHxr2/6s01oFUCAP7sxpX+jz+743dHnrP0raVt3r/VfaaJYRXrZckkjq oSXVIhKmdKhDbtV2FMqtdXSPGyWH2pWa50afFRbT/YPbGRGDUPWjZBj2zGFDJ+6t4+0J KfFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ADm3wWZI; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z194si9484929oia.50.2019.12.23.03.34.11; Mon, 23 Dec 2019 03:34:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ADm3wWZI; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727217AbfLWLeJ (ORCPT + 15 others); Mon, 23 Dec 2019 06:34:09 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:44154 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727180AbfLWLeI (ORCPT ); Mon, 23 Dec 2019 06:34:08 -0500 Received: by mail-lf1-f67.google.com with SMTP id v201so12342156lfa.11 for ; Mon, 23 Dec 2019 03:34:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=T1y8MMPNkqcrm20up1WtHiDJ34NUPmK2DHqDsNPyhC4=; b=ADm3wWZImcglGNzePYJDfnN8M0JUlQ5PtPe5E50RqqFWTmMTtETsAvZo4NeNhckwqd E28GFEn43RSTWd6NisqrDH6TTSBVK5M0of3J/cfGmfvVbTI8Ex7zk0866p/pJXK5wqiS +C28+fUx1PYlT1Rr5ZIlZn6DM99d+5JVZ7ModYadUCL9hnaOzWcgF4UZfUSEgPdXuP5i h9ewBJhPXtlBoXiWfYZavGFP3+SUEgwnpmM31PCPfUe4wy2RE428/xp6tJQZ5xfGB2OC otmTsqRcJS4I5o9bvWDho29L9S8Vbm5p/bcZGVkvKSKkVdXEUwv4Ul6n8Z6KJ/eT4ZiS CGxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=T1y8MMPNkqcrm20up1WtHiDJ34NUPmK2DHqDsNPyhC4=; b=QBi/4Rg2UfnZ4Lucq+5f/WrCK5ZfrLdl5jUM5zY/FJg0CgrxCIiNXqqI5zfUVWEa8o 3vOoA5Be8IzBYlKUB3kUUgHgy7pH8iJZD3xRbUUZuCNCBV1MWx570FytKkaNHea6fv6Z Dv6yphBVC5Zmw9bmSelg9/pHFg1ccGanJfaJFxGaKNW1k7/KnHVQBaljnyJaGe6Sk5Cd Bpuzmc3iBy+gKIEqfUjOzJWpMwb9NjLSp/beWv7LIoYu3ztd+dqUDRcl/oWn6UUD9Tfj kGjpB4daC8HkgihHqZt3cXj1KY/0QpWWI8eFUClS+vX3iMeBgX4EbvJ/mU+e4fPfDriP HnZw== X-Gm-Message-State: APjAAAVJc/ARG3+Ik95zqsZ9DwBjRESXQMyqwRkHi3+Y+6KoarXAOYIG 45mlvYHL0FYFKTXxm7KpURJuM5nNJoI= X-Received: by 2002:ac2:4a91:: with SMTP id l17mr16799912lfp.75.1577100845219; Mon, 23 Dec 2019 03:34:05 -0800 (PST) Received: from localhost.localdomain ([37.157.136.193]) by smtp.gmail.com with ESMTPSA id g15sm8381500ljk.8.2019.12.23.03.34.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Dec 2019 03:34:04 -0800 (PST) From: Stanimir Varbanov To: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Vikash Garodia , dikshita@codeaurora.org, Stanimir Varbanov Subject: [PATCH v3 12/12] dt-bindings: media: venus: delete old binding document Date: Mon, 23 Dec 2019 13:33:11 +0200 Message-Id: <20191223113311.20602-13-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191223113311.20602-1-stanimir.varbanov@linaro.org> References: <20191223113311.20602-1-stanimir.varbanov@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org After transitioning to YAML DT schema we don't need this old-style document. Signed-off-by: Stanimir Varbanov --- .../devicetree/bindings/media/qcom,venus.txt | 120 ------------------ 1 file changed, 120 deletions(-) delete mode 100644 Documentation/devicetree/bindings/media/qcom,venus.txt -- 2.17.1 diff --git a/Documentation/devicetree/bindings/media/qcom,venus.txt b/Documentation/devicetree/bindings/media/qcom,venus.txt deleted file mode 100644 index b602c4c025e7..000000000000 --- a/Documentation/devicetree/bindings/media/qcom,venus.txt +++ /dev/null @@ -1,120 +0,0 @@ -* Qualcomm Venus video encoder/decoder accelerators - -- compatible: - Usage: required - Value type: - Definition: Value should contain one of: - - "qcom,msm8916-venus" - - "qcom,msm8996-venus" - - "qcom,sdm845-venus" -- reg: - Usage: required - Value type: - Definition: Register base address and length of the register map. -- interrupts: - Usage: required - Value type: - Definition: Should contain interrupt line number. -- clocks: - Usage: required - Value type: - Definition: A List of phandle and clock specifier pairs as listed - in clock-names property. -- clock-names: - Usage: required for msm8916 - Value type: - Definition: Should contain the following entries: - - "core" Core video accelerator clock - - "iface" Video accelerator AHB clock - - "bus" Video accelerator AXI clock -- clock-names: - Usage: required for msm8996 - Value type: - Definition: Should contain the following entries: - - "core" Core video accelerator clock - - "iface" Video accelerator AHB clock - - "bus" Video accelerator AXI clock - - "mbus" Video MAXI clock -- power-domains: - Usage: required - Value type: - Definition: A phandle and power domain specifier pairs to the - power domain which is responsible for collapsing - and restoring power to the peripheral. -- iommus: - Usage: required - Value type: - Definition: A list of phandle and IOMMU specifier pairs. -- memory-region: - Usage: required - Value type: - Definition: reference to the reserved-memory for the firmware - memory region. - -* Subnodes -The Venus video-codec node must contain two subnodes representing -video-decoder and video-encoder, and one optional firmware subnode. -Firmware subnode is needed when the platform does not have TrustZone. - -Every of video-encoder or video-decoder subnode should have: - -- compatible: - Usage: required - Value type: - Definition: Value should contain "venus-decoder" or "venus-encoder" -- clocks: - Usage: required for msm8996 - Value type: - Definition: A List of phandle and clock specifier pairs as listed - in clock-names property. -- clock-names: - Usage: required for msm8996 - Value type: - Definition: Should contain the following entries: - - "core" Subcore video accelerator clock - -- power-domains: - Usage: required for msm8996 - Value type: - Definition: A phandle and power domain specifier pairs to the - power domain which is responsible for collapsing - and restoring power to the subcore. - -The firmware subnode must have: - -- iommus: - Usage: required - Value type: - Definition: A list of phandle and IOMMU specifier pairs. - -* An Example - video-codec@1d00000 { - compatible = "qcom,msm8916-venus"; - reg = <0x01d00000 0xff000>; - interrupts = ; - clocks = <&gcc GCC_VENUS0_VCODEC0_CLK>, - <&gcc GCC_VENUS0_AHB_CLK>, - <&gcc GCC_VENUS0_AXI_CLK>; - clock-names = "core", "iface", "bus"; - power-domains = <&gcc VENUS_GDSC>; - iommus = <&apps_iommu 5>; - memory-region = <&venus_mem>; - - video-decoder { - compatible = "venus-decoder"; - clocks = <&mmcc VIDEO_SUBCORE0_CLK>; - clock-names = "core"; - power-domains = <&mmcc VENUS_CORE0_GDSC>; - }; - - video-encoder { - compatible = "venus-encoder"; - clocks = <&mmcc VIDEO_SUBCORE1_CLK>; - clock-names = "core"; - power-domains = <&mmcc VENUS_CORE1_GDSC>; - }; - - video-firmware { - iommus = <&apps_iommu 0x10b2 0x0>; - }; - };