From patchwork Fri Apr 28 09:13:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 98313 Delivered-To: patch@linaro.org Received: by 10.182.236.104 with SMTP id ut8csp233644obc; Fri, 28 Apr 2017 02:16:08 -0700 (PDT) X-Received: by 10.98.66.212 with SMTP id h81mr10784427pfd.182.1493370968284; Fri, 28 Apr 2017 02:16:08 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k65si5781014pgc.142.2017.04.28.02.16.07; Fri, 28 Apr 2017 02:16:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1035540AbdD1JPs (ORCPT + 25 others); Fri, 28 Apr 2017 05:15:48 -0400 Received: from mail-wm0-f41.google.com ([74.125.82.41]:37110 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968456AbdD1JOm (ORCPT ); Fri, 28 Apr 2017 05:14:42 -0400 Received: by mail-wm0-f41.google.com with SMTP id m123so40809994wma.0 for ; Fri, 28 Apr 2017 02:14:36 -0700 (PDT) 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=4jU5DmfrXnlwleOmYlVCETyguavsKjwJKkvW9UA3204=; b=cyaNMaPyIYjWhNYlBJp8rHFTSQUT8svXM6zMVtP0Gv9Yt6Ho91LKt5vizwyxfFFava b5gHwz1/+5fZNL6FlwpJL1rfn3SH5AsiPJiMHUFNFxLQ6pSCulbeF1M5AvnpgqUa5lbx XKHA86eMDWAlXMQvyHC0JkvIKkvj//1ERTQGg= 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=4jU5DmfrXnlwleOmYlVCETyguavsKjwJKkvW9UA3204=; b=Rj9pKTLnQW00TKFBUYdHnQPnxJTOjxlZ8s8FvGEbS22lqmemy619nK85qr8z6G2aba ddyfZSDH9RXp7Ew9GgdHuTVORwPJ3VCRPosrr/mqhT4o3w4ITBD0qXtzDJzzwsiA2rw7 EIx+OVjXRfvaxtVtqoge82VvSq+xEbkGWiWX7xr2GIT1llQBQ3q/BJix+ePC/1EK1YJ1 TDYHzh1CyzfVtmePZUe6JirOVYdluahiOIHw3mqsvuGnYHLrft5T/YDPX4Eym+lF0qus vO2ooE3DZwMTKW45vtSUrftL0cAJE7/IuWn4ZBweCvf4CUq1i6E3h3KeHazN+4VoXBb6 N3ww== X-Gm-Message-State: AN3rC/6DQ5W3RhzpZKWGAoM/mhgFVeUS0zIyGSifbO3pU1KjZK129Xmf 3aarE9AA9OdDp4lU X-Received: by 10.28.113.135 with SMTP id d7mr5157880wmi.71.1493370874653; Fri, 28 Apr 2017 02:14:34 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id p197sm5653070wmb.34.2017.04.28.02.14.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Apr 2017 02:14:34 -0700 (PDT) From: Stanimir Varbanov To: Mauro Carvalho Chehab , Hans Verkuil Cc: Andy Gross , Bjorn Andersson , Stephen Boyd , Srinivas Kandagatla , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Stanimir Varbanov Subject: [PATCH v8 01/10] firmware: qcom_scm: Fix to allow COMPILE_TEST-ing Date: Fri, 28 Apr 2017 12:13:48 +0300 Message-Id: <1493370837-19793-2-git-send-email-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1493370837-19793-1-git-send-email-stanimir.varbanov@linaro.org> References: <1493370837-19793-1-git-send-email-stanimir.varbanov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Unfortunatly previous attempt to allow consumer drivers to use COMPILE_TEST option in Kconfig is not enough, because in the past the consumer drivers used 'depends on' Kconfig option but now they are using 'select' Kconfig option which means on non ARM arch'es compilation is triggered. Thus we need to move the ifdefery one level below by touching the private qcom_scm.h header. To: Andy Gross Cc: Stephen Boyd Cc: Bjorn Andersson Signed-off-by: Stanimir Varbanov --- drivers/firmware/Kconfig | 2 +- drivers/firmware/qcom_scm.h | 72 ++++++++++++++++++++++++++++++++++++++------- include/linux/qcom_scm.h | 32 -------------------- 3 files changed, 62 insertions(+), 44 deletions(-) -- 2.7.4 diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig index 6e4ed5a9c6fd..480578c3691a 100644 --- a/drivers/firmware/Kconfig +++ b/drivers/firmware/Kconfig @@ -204,7 +204,7 @@ config FW_CFG_SYSFS_CMDLINE config QCOM_SCM bool - depends on ARM || ARM64 + depends on ARM || ARM64 || COMPILE_TEST select RESET_CONTROLLER config QCOM_SCM_32 diff --git a/drivers/firmware/qcom_scm.h b/drivers/firmware/qcom_scm.h index 9bea691f30fb..d2b5723afb3f 100644 --- a/drivers/firmware/qcom_scm.h +++ b/drivers/firmware/qcom_scm.h @@ -12,6 +12,7 @@ #ifndef __QCOM_SCM_INT_H #define __QCOM_SCM_INT_H +#if IS_ENABLED(CONFIG_ARM) || IS_ENABLED(CONFIG_ARM64) #define QCOM_SCM_SVC_BOOT 0x1 #define QCOM_SCM_BOOT_ADDR 0x1 #define QCOM_SCM_BOOT_ADDR_MC 0x11 @@ -58,6 +59,66 @@ extern int __qcom_scm_pas_auth_and_reset(struct device *dev, u32 peripheral); extern int __qcom_scm_pas_shutdown(struct device *dev, u32 peripheral); extern int __qcom_scm_pas_mss_reset(struct device *dev, bool reset); +#define QCOM_SCM_SVC_MP 0xc +#define QCOM_SCM_RESTORE_SEC_CFG 2 +extern int __qcom_scm_restore_sec_cfg(struct device *dev, u32 device_id, + u32 spare); +#define QCOM_SCM_IOMMU_SECURE_PTBL_SIZE 3 +#define QCOM_SCM_IOMMU_SECURE_PTBL_INIT 4 +extern int __qcom_scm_iommu_secure_ptbl_size(struct device *dev, u32 spare, + size_t *size); +extern int __qcom_scm_iommu_secure_ptbl_init(struct device *dev, u64 addr, + u32 size, u32 spare); +#else +static inline int __qcom_scm_set_remote_state(struct device *dev, u32 state, + u32 id) +{ return -ENODEV; } +static inline int __qcom_scm_set_warm_boot_addr(struct device *dev, void *entry, + const cpumask_t *cpus) +{ return -ENODEV; } +static inline int __qcom_scm_set_cold_boot_addr(void *entry, + const cpumask_t *cpus) +{ return -ENODEV; } +static inline void __qcom_scm_cpu_power_down(u32 flags) {} +static inline int __qcom_scm_is_call_available(struct device *dev, u32 svc_id, + u32 cmd_id) +{ return -ENODEV; } +#define QCOM_SCM_SVC_HDCP 0x11 +#define QCOM_SCM_CMD_HDCP 0x01 +static inline int __qcom_scm_hdcp_req(struct device *dev, + struct qcom_scm_hdcp_req *req, + u32 req_cnt, u32 *resp) +{ return -ENODEV; } +static inline void __qcom_scm_init(void) {} +#define QCOM_SCM_SVC_PIL 0x2 +#define QCOM_SCM_PAS_IS_SUPPORTED_CMD 0x7 +static inline bool __qcom_scm_pas_supported(struct device *dev, u32 peripheral) +{ return false; } +static inline int __qcom_scm_pas_init_image(struct device *dev, u32 peripheral, + dma_addr_t metadata_phys) +{ return -ENODEV; } +static inline int __qcom_scm_pas_mem_setup(struct device *dev, u32 peripheral, + phys_addr_t addr, phys_addr_t size) +{ return -ENODEV; } +static inline int __qcom_scm_pas_auth_and_reset(struct device *dev, + u32 peripheral) +{ return -ENODEV; } +static inline int __qcom_scm_pas_shutdown(struct device *dev, u32 peripheral) +{ return -ENODEV; } +static inline int __qcom_scm_pas_mss_reset(struct device *dev, bool reset) +{ return -ENODEV; } +static inline int __qcom_scm_restore_sec_cfg(struct device *dev, u32 device_id, + u32 spare) +{ return -ENODEV; } +extern int __qcom_scm_iommu_secure_ptbl_size(struct device *dev, u32 spare, + size_t *size) +{ return -ENODEV; } +static inline int __qcom_scm_iommu_secure_ptbl_init(struct device *dev, + u64 addr, u32 size, + u32 spare) +{ return -ENODEV; } +#endif + /* common error codes */ #define QCOM_SCM_V2_EBUSY -12 #define QCOM_SCM_ENOMEM -5 @@ -85,15 +146,4 @@ static inline int qcom_scm_remap_error(int err) return -EINVAL; } -#define QCOM_SCM_SVC_MP 0xc -#define QCOM_SCM_RESTORE_SEC_CFG 2 -extern int __qcom_scm_restore_sec_cfg(struct device *dev, u32 device_id, - u32 spare); -#define QCOM_SCM_IOMMU_SECURE_PTBL_SIZE 3 -#define QCOM_SCM_IOMMU_SECURE_PTBL_INIT 4 -extern int __qcom_scm_iommu_secure_ptbl_size(struct device *dev, u32 spare, - size_t *size); -extern int __qcom_scm_iommu_secure_ptbl_init(struct device *dev, u64 addr, - u32 size, u32 spare); - #endif diff --git a/include/linux/qcom_scm.h b/include/linux/qcom_scm.h index e5380471c2cd..b628f735f355 100644 --- a/include/linux/qcom_scm.h +++ b/include/linux/qcom_scm.h @@ -23,7 +23,6 @@ struct qcom_scm_hdcp_req { u32 val; }; -#if IS_ENABLED(CONFIG_QCOM_SCM) extern int qcom_scm_set_cold_boot_addr(void *entry, const cpumask_t *cpus); extern int qcom_scm_set_warm_boot_addr(void *entry, const cpumask_t *cpus); extern bool qcom_scm_is_available(void); @@ -43,35 +42,4 @@ extern int qcom_scm_set_remote_state(u32 state, u32 id); extern int qcom_scm_restore_sec_cfg(u32 device_id, u32 spare); extern int qcom_scm_iommu_secure_ptbl_size(u32 spare, size_t *size); extern int qcom_scm_iommu_secure_ptbl_init(u64 addr, u32 size, u32 spare); -#else -static inline -int qcom_scm_set_cold_boot_addr(void *entry, const cpumask_t *cpus) -{ - return -ENODEV; -} -static inline -int qcom_scm_set_warm_boot_addr(void *entry, const cpumask_t *cpus) -{ - return -ENODEV; -} -static inline bool qcom_scm_is_available(void) { return false; } -static inline bool qcom_scm_hdcp_available(void) { return false; } -static inline int qcom_scm_hdcp_req(struct qcom_scm_hdcp_req *req, u32 req_cnt, - u32 *resp) { return -ENODEV; } -static inline bool qcom_scm_pas_supported(u32 peripheral) { return false; } -static inline int qcom_scm_pas_init_image(u32 peripheral, const void *metadata, - size_t size) { return -ENODEV; } -static inline int qcom_scm_pas_mem_setup(u32 peripheral, phys_addr_t addr, - phys_addr_t size) { return -ENODEV; } -static inline int -qcom_scm_pas_auth_and_reset(u32 peripheral) { return -ENODEV; } -static inline int qcom_scm_pas_shutdown(u32 peripheral) { return -ENODEV; } -static inline void qcom_scm_cpu_power_down(u32 flags) {} -static inline u32 qcom_scm_get_version(void) { return 0; } -static inline u32 -qcom_scm_set_remote_state(u32 state,u32 id) { return -ENODEV; } -static inline int qcom_scm_restore_sec_cfg(u32 device_id, u32 spare) { return -ENODEV; } -static inline int qcom_scm_iommu_secure_ptbl_size(u32 spare, size_t *size) { return -ENODEV; } -static inline int qcom_scm_iommu_secure_ptbl_init(u64 addr, u32 size, u32 spare) { return -ENODEV; } -#endif #endif From patchwork Fri Apr 28 09:13:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 98316 Delivered-To: patch@linaro.org Received: by 10.182.236.104 with SMTP id ut8csp233657obc; Fri, 28 Apr 2017 02:16:10 -0700 (PDT) X-Received: by 10.98.222.70 with SMTP id h67mr10713397pfg.63.1493370970042; Fri, 28 Apr 2017 02:16:10 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k65si5781014pgc.142.2017.04.28.02.16.09; Fri, 28 Apr 2017 02:16:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1946022AbdD1JQB (ORCPT + 25 others); Fri, 28 Apr 2017 05:16:01 -0400 Received: from mail-wr0-f170.google.com ([209.85.128.170]:35011 "EHLO mail-wr0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S969134AbdD1JOo (ORCPT ); Fri, 28 Apr 2017 05:14:44 -0400 Received: by mail-wr0-f170.google.com with SMTP id z52so30222316wrc.2 for ; Fri, 28 Apr 2017 02:14:43 -0700 (PDT) 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=OrAlylWhhHEYYyebsMFbln5HOCDCCiwo6pmL/qgrjWk=; b=eetVPVZLOjldstcciXvcgQpPfqG9Kdoj37GAw4k1axMQmEED+CAihmuNldmhGRs2nV 6cnWmBCoxPCSgVO8/bzxu4RynF5Te2vBvfsZj5QtDvPBcDJFe3tYlkdYbNbwnmactPyY c46SqfDmYXKDOonbICnrZhS6RV9Vr8b6Ghvks= 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=OrAlylWhhHEYYyebsMFbln5HOCDCCiwo6pmL/qgrjWk=; b=NsBhxA0FOJCLAxV5KDZBkxmE4gkR6uMf46dE+MbRvOHUKxKSqFejGY47FNvW1rZ5G2 ZyauA5LvT3zohmaCNKR29kW+yJ/yTpUp/eAkjyVSMr+9qvLMiIOYCvupfwOWKSZzCXnd fhMIc5mXz+wA17GUFwsLb7lCMMAhAY177Ml21icn1PrFfvtOyHpPpl/XPAyM6zYXk606 DGanPzf0WmdvcWQv29RiEb0/X7Axoc64FXkfZXWqlAsfxley2GW5/rDfp+qmF3co+EgJ zOjW5afJi0BczxCUBiiT7sgiUFJXAGDxX5mDYxFymihSzrw4Bs7nq6eHygoLDL0WRnYI Prag== X-Gm-Message-State: AN3rC/5J2uIuDpev2r3fMWoZzFWDdClP2+i7ZHpTQPITV5e7lcYAFv9m cynqjL6DwxQzaw7E X-Received: by 10.223.135.102 with SMTP id 35mr7424612wrz.141.1493370878042; Fri, 28 Apr 2017 02:14:38 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id p197sm5653070wmb.34.2017.04.28.02.14.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Apr 2017 02:14:37 -0700 (PDT) From: Stanimir Varbanov To: Mauro Carvalho Chehab , Hans Verkuil Cc: Andy Gross , Bjorn Andersson , Stephen Boyd , Srinivas Kandagatla , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Stanimir Varbanov Subject: [PATCH v8 02/10] media: v4l2-mem2mem: extend m2m APIs for more accurate buffer management Date: Fri, 28 Apr 2017 12:13:49 +0300 Message-Id: <1493370837-19793-3-git-send-email-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1493370837-19793-1-git-send-email-stanimir.varbanov@linaro.org> References: <1493370837-19793-1-git-send-email-stanimir.varbanov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org this add functions for: - remove buffers from src/dst queue by index - remove exact buffer from src/dst queue also extends m2m API to iterate over a list of src/dst buffers in safely and non-safely manner. Signed-off-by: Stanimir Varbanov --- drivers/media/v4l2-core/v4l2-mem2mem.c | 37 ++++++++++++++ include/media/v4l2-mem2mem.h | 92 ++++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+) -- 2.7.4 Reviewed-by: Hans Verkuil diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c index 6bc27e7b2a33..f62e68aa04c4 100644 --- a/drivers/media/v4l2-core/v4l2-mem2mem.c +++ b/drivers/media/v4l2-core/v4l2-mem2mem.c @@ -126,6 +126,43 @@ void *v4l2_m2m_buf_remove(struct v4l2_m2m_queue_ctx *q_ctx) } EXPORT_SYMBOL_GPL(v4l2_m2m_buf_remove); +void v4l2_m2m_buf_remove_by_buf(struct v4l2_m2m_queue_ctx *q_ctx, + struct vb2_v4l2_buffer *vbuf) +{ + struct v4l2_m2m_buffer *b; + unsigned long flags; + + spin_lock_irqsave(&q_ctx->rdy_spinlock, flags); + b = container_of(vbuf, struct v4l2_m2m_buffer, vb); + list_del(&b->list); + q_ctx->num_rdy--; + spin_unlock_irqrestore(&q_ctx->rdy_spinlock, flags); +} +EXPORT_SYMBOL_GPL(v4l2_m2m_buf_remove_by_buf); + +struct vb2_v4l2_buffer * +v4l2_m2m_buf_remove_by_idx(struct v4l2_m2m_queue_ctx *q_ctx, unsigned int idx) + +{ + struct v4l2_m2m_buffer *b, *tmp; + struct vb2_v4l2_buffer *ret = NULL; + unsigned long flags; + + spin_lock_irqsave(&q_ctx->rdy_spinlock, flags); + list_for_each_entry_safe(b, tmp, &q_ctx->rdy_queue, list) { + if (b->vb.vb2_buf.index == idx) { + list_del(&b->list); + q_ctx->num_rdy--; + ret = &b->vb; + break; + } + } + spin_unlock_irqrestore(&q_ctx->rdy_spinlock, flags); + + return ret; +} +EXPORT_SYMBOL_GPL(v4l2_m2m_buf_remove_by_idx); + /* * Scheduling handlers */ diff --git a/include/media/v4l2-mem2mem.h b/include/media/v4l2-mem2mem.h index 3ccd01bd245e..e157d5c9b224 100644 --- a/include/media/v4l2-mem2mem.h +++ b/include/media/v4l2-mem2mem.h @@ -437,6 +437,47 @@ static inline void *v4l2_m2m_next_dst_buf(struct v4l2_m2m_ctx *m2m_ctx) } /** + * v4l2_m2m_for_each_dst_buf() - iterate over a list of destination ready + * buffers + * + * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx + * @b: current buffer of type struct v4l2_m2m_buffer + */ +#define v4l2_m2m_for_each_dst_buf(m2m_ctx, b) \ + list_for_each_entry(b, &m2m_ctx->cap_q_ctx.rdy_queue, list) + +/** + * v4l2_m2m_for_each_src_buf() - iterate over a list of source ready buffers + * + * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx + * @b: current buffer of type struct v4l2_m2m_buffer + */ +#define v4l2_m2m_for_each_src_buf(m2m_ctx, b) \ + list_for_each_entry(b, &m2m_ctx->out_q_ctx.rdy_queue, list) + +/** + * v4l2_m2m_for_each_dst_buf_safe() - iterate over a list of destination ready + * buffers safely + * + * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx + * @b: current buffer of type struct v4l2_m2m_buffer + * @n: used as temporary storage + */ +#define v4l2_m2m_for_each_dst_buf_safe(m2m_ctx, b, n) \ + list_for_each_entry_safe(b, n, &m2m_ctx->cap_q_ctx.rdy_queue, list) + +/** + * v4l2_m2m_for_each_src_buf_safe() - iterate over a list of source ready + * buffers safely + * + * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx + * @b: current buffer of type struct v4l2_m2m_buffer + * @n: used as temporary storage + */ +#define v4l2_m2m_for_each_src_buf_safe(m2m_ctx, b, n) \ + list_for_each_entry_safe(b, n, &m2m_ctx->out_q_ctx.rdy_queue, list) + +/** * v4l2_m2m_get_src_vq() - return vb2_queue for source buffers * * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx @@ -488,6 +529,57 @@ static inline void *v4l2_m2m_dst_buf_remove(struct v4l2_m2m_ctx *m2m_ctx) return v4l2_m2m_buf_remove(&m2m_ctx->cap_q_ctx); } +/** + * v4l2_m2m_buf_remove_by_buf() - take off exact buffer from the list of ready + * buffers + * + * @q_ctx: pointer to struct @v4l2_m2m_queue_ctx + * @vbuf: the buffer to be removed + */ +void v4l2_m2m_buf_remove_by_buf(struct v4l2_m2m_queue_ctx *q_ctx, + struct vb2_v4l2_buffer *vbuf); + +/** + * v4l2_m2m_src_buf_remove_by_buf() - take off exact source buffer from the list + * of ready buffers + * + * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx + * @vbuf: the buffer to be removed + */ +static inline void v4l2_m2m_src_buf_remove_by_buf(struct v4l2_m2m_ctx *m2m_ctx, + struct vb2_v4l2_buffer *vbuf) +{ + v4l2_m2m_buf_remove_by_buf(&m2m_ctx->out_q_ctx, vbuf); +} + +/** + * v4l2_m2m_dst_buf_remove_by_buf() - take off exact destination buffer from the + * list of ready buffers + * + * @m2m_ctx: m2m context assigned to the instance given by struct &v4l2_m2m_ctx + * @vbuf: the buffer to be removed + */ +static inline void v4l2_m2m_dst_buf_remove_by_buf(struct v4l2_m2m_ctx *m2m_ctx, + struct vb2_v4l2_buffer *vbuf) +{ + v4l2_m2m_buf_remove_by_buf(&m2m_ctx->cap_q_ctx, vbuf); +} + +struct vb2_v4l2_buffer * +v4l2_m2m_buf_remove_by_idx(struct v4l2_m2m_queue_ctx *q_ctx, unsigned int idx); + +static inline struct vb2_v4l2_buffer * +v4l2_m2m_src_buf_remove_by_idx(struct v4l2_m2m_ctx *m2m_ctx, unsigned int idx) +{ + return v4l2_m2m_buf_remove_by_idx(&m2m_ctx->out_q_ctx, idx); +} + +static inline struct vb2_v4l2_buffer * +v4l2_m2m_dst_buf_remove_by_idx(struct v4l2_m2m_ctx *m2m_ctx, unsigned int idx) +{ + return v4l2_m2m_buf_remove_by_idx(&m2m_ctx->cap_q_ctx, idx); +} + /* v4l2 ioctl helpers */ int v4l2_m2m_ioctl_reqbufs(struct file *file, void *priv, From patchwork Fri Apr 28 09:13:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 98314 Delivered-To: patch@linaro.org Received: by 10.182.236.104 with SMTP id ut8csp233650obc; Fri, 28 Apr 2017 02:16:09 -0700 (PDT) X-Received: by 10.84.238.198 with SMTP id l6mr13640884pln.95.1493370969356; Fri, 28 Apr 2017 02:16:09 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k65si5781014pgc.142.2017.04.28.02.16.09; Fri, 28 Apr 2017 02:16:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1945999AbdD1JPz (ORCPT + 25 others); Fri, 28 Apr 2017 05:15:55 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:36503 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S969025AbdD1JOn (ORCPT ); Fri, 28 Apr 2017 05:14:43 -0400 Received: by mail-wm0-f51.google.com with SMTP id u65so36854095wmu.1 for ; Fri, 28 Apr 2017 02:14:42 -0700 (PDT) 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=2rPw9NUHie0vw7DuvhGnQyL1ZTkTYbn/BNYhRUHhM60=; b=SrpD8f1hkAemzP73eyLpTpJeAaI9ivoYVFRRlLO8x2yoYH4Acvc2zUKJeFVTxpOrxg 8DtPsiGqyf5aBB9sFO6QP3zd7dD7jdOy0nNM3HRpMKm4iuB8GH8+63KzC36c2sOuQrY/ HkKun8qTGbRoZf3LMgMuy3ZVXcbd/tHsrekLQ= 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=2rPw9NUHie0vw7DuvhGnQyL1ZTkTYbn/BNYhRUHhM60=; b=HMv+QoxEzrbaZiagh9512nv/CXQzIZdNO8tPEA9NU4W3KWr/GdN/SEwDd5sEGXqgfY 9irqUpXIkoVd+3S//rwW0CTTCvGynQJaDYdmffayMnl6iQIcBrTHj4stbYiuLXbRplpp UXbo4ZM/m2uUID/4WsOwwI55fqKebDRocVTRio6FRQ6R3O07EwA2h0qjho1TKw967wQx dzpfkBWiAiN2O0AVG9jAo6g0sy9mXd0KIgkKwcZioNIapaxgarTmnM9SlNJo3LeiS236 OVk80zD5VZNRKPXUhYY6iWpfSZ2F+hREpsdVR0UVuuTPwQvlETesMWmK9l1dC4Ddeqeq Mjww== X-Gm-Message-State: AN3rC/7Sdlz41mEa8IKKVqDvcrYWauypiod/aPz58iXu3aSoHg89Frga usfoRjTw9k4esa3BB1o1lg== X-Received: by 10.28.210.16 with SMTP id j16mr5041406wmg.16.1493370882001; Fri, 28 Apr 2017 02:14:42 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id p197sm5653070wmb.34.2017.04.28.02.14.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Apr 2017 02:14:41 -0700 (PDT) From: Stanimir Varbanov To: Mauro Carvalho Chehab , Hans Verkuil Cc: Andy Gross , Bjorn Andersson , Stephen Boyd , Srinivas Kandagatla , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Stanimir Varbanov Subject: [PATCH v8 04/10] MAINTAINERS: Add Qualcomm Venus video accelerator driver Date: Fri, 28 Apr 2017 12:13:51 +0300 Message-Id: <1493370837-19793-5-git-send-email-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1493370837-19793-1-git-send-email-stanimir.varbanov@linaro.org> References: <1493370837-19793-1-git-send-email-stanimir.varbanov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add an entry for Venus video encoder/decoder accelerator driver. Signed-off-by: Stanimir Varbanov --- MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.7.4 diff --git a/MAINTAINERS b/MAINTAINERS index 45be5ef6056c..a3fadd61b835 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10603,6 +10603,14 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel.g S: Supported F: arch/hexagon/ +QUALCOMM VENUS VIDEO ACCELERATOR DRIVER +M: Stanimir Varbanov +L: linux-media@vger.kernel.org +L: linux-arm-msm@vger.kernel.org +T: git git://linuxtv.org/media_tree.git +S: Maintained +F: drivers/media/platform/qcom/venus/ + QUALCOMM WCN36XX WIRELESS DRIVER M: Eugene Krasnikov L: wcn36xx@lists.infradead.org