From patchwork Fri Aug 18 14:16:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 110389 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp889150obb; Fri, 18 Aug 2017 07:16:38 -0700 (PDT) X-Received: by 10.84.140.235 with SMTP id 98mr9763241plt.30.1503065798674; Fri, 18 Aug 2017 07:16:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503065798; cv=none; d=google.com; s=arc-20160816; b=blTNXg28MCeY5wU04rdxVqto2ciIFDBMgFzb9/ljHQv8C4lCydL+wNBKyeQXig0nHO xRgtHC8CtrFJDBrQ4AkPk/LXBvwfcLKWJT43Z+6SrmqDBhIAQmOZiiOm+6V5n6+RyG10 +0Rxm/Qn8AbUcvLwadHWrn/xZnOw1Tk6xbKpR1Cfl3hFn57Sn9qhLhP8W5UA9wBw0jrq Oj5epvYKM94bHEMkpJxTxkI4ByA+zKXAYwPEIYL44hgMfumOFQr9Ri1+VpFJ1q3sXG26 q8Qz/IVbwlwi0CN6/rPtVlI8llGZDRG7+DK2lv4riJVa++ySpJZTcgmOZuco5HmO+vE+ 8YmQ== 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:arc-authentication-results; bh=L0g6fKOEmmncXvkdiuu40bYuuVUP8AvEIgXYB2y/Ezw=; b=wdAedo0GeVrnDLts8Mi+PSIlyZFnsLYoeJWoKDrKkRuTW5Cm/O124oyyQaiCNitvX2 MvAI22PcaDAFonlaEHIuNHyRKJGYsCP+9CC97Bq8w/1rvgR4jbjxLb/lDP7lME7kLuFh 2mSuzF9TAF86EKRxL2PL2LZ/4zLXyvMam+IVYHvaK31zU0zAnLUniSFXHm0ZepnFuU9C /VlGgRNJGR2No3gw9lPdAqgbEpIEQUROh4Ij7pgJd9KYMpw76UdguAczoiKEOopaWmt6 H8+XPoidSSfkijoklzycKPDRy7OIwpNcGbusRm+12FzakgaCZbHyH+rH8TfOx5bALhvQ 7QZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PK0iEgWJ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u10si3957256plu.864.2017.08.18.07.16.38; Fri, 18 Aug 2017 07:16:38 -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 header.s=google header.b=PK0iEgWJ; 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 S1753496AbdHROQg (ORCPT + 26 others); Fri, 18 Aug 2017 10:16:36 -0400 Received: from mail-wm0-f41.google.com ([74.125.82.41]:37730 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752945AbdHROQd (ORCPT ); Fri, 18 Aug 2017 10:16:33 -0400 Received: by mail-wm0-f41.google.com with SMTP id i66so993952wmg.0 for ; Fri, 18 Aug 2017 07:16:32 -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=L0g6fKOEmmncXvkdiuu40bYuuVUP8AvEIgXYB2y/Ezw=; b=PK0iEgWJjlWK2f16aNtwbups+9QzkbWCGNjODydq6wElPztlwzRfca9BjSKHTxkdB9 76xnAbWI7DjhJzeAG4ZM9liAl/YMaQCzRJvK8tB4CTrpz8wNhCd9AQsK4l1+r1AGtcFn yxeqaqAwZhlxURGzPWZXaOeELOuOpqq9AN1lw= 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=L0g6fKOEmmncXvkdiuu40bYuuVUP8AvEIgXYB2y/Ezw=; b=hz2EqgD2PEwedux9O0ORsobyL420bJR04qiaqlA5HxPWy3+v+B/XthkQ2ajzEcPnjL 7QifzFqVZW3rhSGOXMgKwbb9RRf+Yw/twc6b6KrZ32FbMJKCE+EQVZTR8aGR75zHzskj eF88IYZ6yRBCtOZL8CSiETbBkuBMLrr0gdgF+WWLGIc0YL+ywSy0C2mXWn5ZUf23aVrw m/XC0wHq1bYJr7DoOmCoFtgze/o7oaYVjOu6/5AoAfODdajq5jmJY3CF3Iq9yvB80dgX vgmByawPF5xcWVaAiDIVfEU6Udod3cZ6IqKOKCDtGHEY0cQlLweiDMca1C4e2c/jgXgL gwfQ== X-Gm-Message-State: AHYfb5gtITjU8rZRWfpIWSKoooVGjYnRLA6d5SkooNwUEdMzA3yRySUW VSpi87QNxyq1MlVO X-Received: by 10.28.19.9 with SMTP id 9mr1678615wmt.171.1503065791755; Fri, 18 Aug 2017 07:16:31 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id 55sm1387383wrv.32.2017.08.18.07.16.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Aug 2017 07:16:31 -0700 (PDT) From: Stanimir Varbanov To: Mauro Carvalho Chehab , Hans Verkuil Cc: Pawel Osciak , Marek Szyprowski , Kyungmin Park , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Stanimir Varbanov Subject: [PATCH 1/7] media: vb2: add bidirectional flag in vb2_queue Date: Fri, 18 Aug 2017 17:16:00 +0300 Message-Id: <20170818141606.4835-2-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170818141606.4835-1-stanimir.varbanov@linaro.org> References: <20170818141606.4835-1-stanimir.varbanov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This change is intended to give to the v4l2 drivers a choice to change the default behavior of the v4l2-core DMA mapping direction from DMA_TO/FROM_DEVICE (depending on the buffer type CAPTURE or OUTPUT) to DMA_BIDIRECTIONAL during queue_init time. Initially the issue with DMA mapping direction has been found in Venus encoder driver where the hardware (firmware side) adds few lines padding on bottom of the image buffer, and the consequence is triggering of IOMMU protection faults. This will help supporting venus encoder (and probably other drivers in the future) which wants to map output type of buffers as read/write. Signed-off-by: Stanimir Varbanov --- drivers/media/v4l2-core/videobuf2-core.c | 17 ++++++++--------- include/media/videobuf2-core.h | 13 +++++++++++++ 2 files changed, 21 insertions(+), 9 deletions(-) -- 2.11.0 diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index 0924594989b4..cb115ba6a1d2 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c @@ -194,8 +194,6 @@ static void __enqueue_in_driver(struct vb2_buffer *vb); static int __vb2_buf_mem_alloc(struct vb2_buffer *vb) { struct vb2_queue *q = vb->vb2_queue; - enum dma_data_direction dma_dir = - q->is_output ? DMA_TO_DEVICE : DMA_FROM_DEVICE; void *mem_priv; int plane; int ret = -ENOMEM; @@ -209,7 +207,7 @@ static int __vb2_buf_mem_alloc(struct vb2_buffer *vb) mem_priv = call_ptr_memop(vb, alloc, q->alloc_devs[plane] ? : q->dev, - q->dma_attrs, size, dma_dir, q->gfp_flags); + q->dma_attrs, size, q->dma_dir, q->gfp_flags); if (IS_ERR_OR_NULL(mem_priv)) { if (mem_priv) ret = PTR_ERR(mem_priv); @@ -978,8 +976,6 @@ static int __prepare_userptr(struct vb2_buffer *vb, const void *pb) void *mem_priv; unsigned int plane; int ret = 0; - enum dma_data_direction dma_dir = - q->is_output ? DMA_TO_DEVICE : DMA_FROM_DEVICE; bool reacquired = vb->planes[0].mem_priv == NULL; memset(planes, 0, sizeof(planes[0]) * vb->num_planes); @@ -1030,7 +1026,7 @@ static int __prepare_userptr(struct vb2_buffer *vb, const void *pb) mem_priv = call_ptr_memop(vb, get_userptr, q->alloc_devs[plane] ? : q->dev, planes[plane].m.userptr, - planes[plane].length, dma_dir); + planes[plane].length, q->dma_dir); if (IS_ERR(mem_priv)) { dprintk(1, "failed acquiring userspace memory for plane %d\n", plane); @@ -1096,8 +1092,6 @@ static int __prepare_dmabuf(struct vb2_buffer *vb, const void *pb) void *mem_priv; unsigned int plane; int ret = 0; - enum dma_data_direction dma_dir = - q->is_output ? DMA_TO_DEVICE : DMA_FROM_DEVICE; bool reacquired = vb->planes[0].mem_priv == NULL; memset(planes, 0, sizeof(planes[0]) * vb->num_planes); @@ -1156,7 +1150,7 @@ static int __prepare_dmabuf(struct vb2_buffer *vb, const void *pb) /* Acquire each plane's memory */ mem_priv = call_ptr_memop(vb, attach_dmabuf, q->alloc_devs[plane] ? : q->dev, - dbuf, planes[plane].length, dma_dir); + dbuf, planes[plane].length, q->dma_dir); if (IS_ERR(mem_priv)) { dprintk(1, "failed to attach dmabuf\n"); ret = PTR_ERR(mem_priv); @@ -2003,6 +1997,11 @@ int vb2_core_queue_init(struct vb2_queue *q) if (q->buf_struct_size == 0) q->buf_struct_size = sizeof(struct vb2_buffer); + if (q->bidirectional) + q->dma_dir = DMA_BIDIRECTIONAL; + else + q->dma_dir = q->is_output ? DMA_TO_DEVICE : DMA_FROM_DEVICE; + return 0; } EXPORT_SYMBOL_GPL(vb2_core_queue_init); diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index cb97c224be73..ede09fff1de8 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h @@ -427,6 +427,17 @@ struct vb2_buf_ops { * @dev: device to use for the default allocation context if the driver * doesn't fill in the @alloc_devs array. * @dma_attrs: DMA attributes to use for the DMA. + * @dma_dir: DMA mapping direction. + * @bidirectional: when this flag is set the DMA direction for the buffers of + * this queue will be overridden with DMA_BIDIRECTIONAL direction. + * This is useful in cases where the hardware (firmware) writes to + * a buffer which is mapped as read (DMA_TO_DEVICE), or reads from + * buffer which is mapped for write (DMA_FROM_DEVICE) in order + * to satisfy some internal hardware restrictions or adds a padding + * needed by the processing algorithm. In case the DMA mapping is + * not bidirectional but the hardware (firmware) trying to access + * the buffer (in the opposite direction) this could lead to an + * IOMMU protection faults. * @fileio_read_once: report EOF after reading the first buffer * @fileio_write_immediately: queue buffer after each write() call * @allow_zero_bytesused: allow bytesused == 0 to be passed to the driver @@ -495,6 +506,8 @@ struct vb2_queue { unsigned int io_modes; struct device *dev; unsigned long dma_attrs; + enum dma_data_direction dma_dir; + unsigned bidirectional:1; unsigned fileio_read_once:1; unsigned fileio_write_immediately:1; unsigned allow_zero_bytesused:1; From patchwork Fri Aug 18 14:16:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 110390 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp889393obb; Fri, 18 Aug 2017 07:16:50 -0700 (PDT) X-Received: by 10.99.191.6 with SMTP id v6mr8654038pgf.212.1503065810898; Fri, 18 Aug 2017 07:16:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503065810; cv=none; d=google.com; s=arc-20160816; b=Rg/Bs11uczH1CDODWrsviHKImIUvHn3QCWnDKxrTpruDfyTaq8qOCxPHUckJ9FBpS7 1GfnIR1Hv5OtI4NdtYea95Yx5tZHH9jXAQo+k2ubbjnkbIrwhjXngbwxkMlxSevoC+Aw wvJolbSQbxOHgCg+TRLtVG1en8PeSJxXeTtOszBYKRwfmopjxt8Dn08NA7+b3xGsVTNM CaURKMd7sWtEu11aasMKxjEdf4LyBZ1OmZd+kAZwOlm40wF9qsthNKMaY1XoGwvAmG7K LmItPO1vtM61150FkyBQDopWz3OcSjkDpuPxt6qLizESL9WELTqV67JVqDxc78lYRP6S n/tw== 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:arc-authentication-results; bh=fPvxh0qR9CW6WhPE5CJMXBqbGYGNaBIq2sr3FMXrPZM=; b=ITtH4xa1EY2IHQd2lFv2kJpvA35v0I5hwobLrJw0qqIAJQfLqRGfFRuCpIyy9l5X3X jTErO+BEcwlg6SK9ZbsvBzAsEoWHfFWlpplobTk1+lsg/2RGTG9NnhXRzDXeRQlkYZd/ FyoeKoc+MioCGA69I75nJteOSPwLJ3K5Q0j3nEptI9auND5XuOpl8MzaDrKT5Hue1EyX b49enq92N9yzYla2JzrYTRkfNuRY4MXkGcHGKEg6/tblvMim4mQC1RsD6CX1Sp3boFnF PN4bdBqExTXcdfefqEjvR/2CAF8BarrAXi0VqSwh0I0a7DbLiNd33XGlsm85RKojJ16N x0+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EaJLf6li; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u10si3957256plu.864.2017.08.18.07.16.50; Fri, 18 Aug 2017 07:16:50 -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 header.s=google header.b=EaJLf6li; 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 S1753508AbdHROQt (ORCPT + 26 others); Fri, 18 Aug 2017 10:16:49 -0400 Received: from mail-wr0-f179.google.com ([209.85.128.179]:36358 "EHLO mail-wr0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753124AbdHROQq (ORCPT ); Fri, 18 Aug 2017 10:16:46 -0400 Received: by mail-wr0-f179.google.com with SMTP id f8so27683397wrf.3 for ; Fri, 18 Aug 2017 07:16:46 -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=fPvxh0qR9CW6WhPE5CJMXBqbGYGNaBIq2sr3FMXrPZM=; b=EaJLf6liG2i161ib+BVCt3tJMdsmV5GWeYW8mTXE+WElQxyGF9q/4VkE7YvhGEmvlO s9c+0tFV8uO8RrCxQcTC5rWWnghy38lTjOoIma9bsluXPxdPb/TgUJNdgitwEaK4rlHw cM8N7X9K25RbUI4bkxviEU8z+nCxEvM6f7HMY= 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=fPvxh0qR9CW6WhPE5CJMXBqbGYGNaBIq2sr3FMXrPZM=; b=V9A/K4DLJubS/Ert7lHSV2ZSquwN7snSLdul2bVRHLm8Tyo9kXXPoqg0lck9BZxzKk PavyepVh0qGMSN3sdZpyEpcf97M3VgNT7cq4Bm1NweFkTUf29XKvlpZYeHyVUq7Pmbg1 XPqED3t4XXdvWz4bTqffebejUdR740rXIgdNUvwWOaw6jxFveFbFzSCRDskFE2ul2F3r d7hPZqnWLU4iTF2nRtsd6jAajMX0SKB85ZrbIur8a8R11890PYDnNKVvflrUV0ux/8H6 bzbrhccYMt0Q48MQ2iy98hJV6fWgdGIhDZ8C+Kux8vq7qm5fUJPToK9uFNng9dWKK62C clyQ== X-Gm-Message-State: AHYfb5gYKqum3GI3rZ4Szt6fTnvnCrAuyIcsfvdJkKMJSHQERjAG3nZX La91phDnP84Tsaa5 X-Received: by 10.223.160.240 with SMTP id n45mr5361589wrn.74.1503065805474; Fri, 18 Aug 2017 07:16:45 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id 55sm1387383wrv.32.2017.08.18.07.16.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Aug 2017 07:16:45 -0700 (PDT) From: Stanimir Varbanov To: Mauro Carvalho Chehab , Hans Verkuil Cc: Pawel Osciak , Marek Szyprowski , Kyungmin Park , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Stanimir Varbanov Subject: [PATCH 2/7] media: venus: venc: set correct resolution on compressed stream Date: Fri, 18 Aug 2017 17:16:01 +0300 Message-Id: <20170818141606.4835-3-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170818141606.4835-1-stanimir.varbanov@linaro.org> References: <20170818141606.4835-1-stanimir.varbanov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This change the alignment restriction for output type of buffers only, also set corect input resolution and fill bidirectional vb2 queue flag in order to map output type buffers read/write. The last is needed by encoder firmware to add padding at the bottom of output (input buffers). Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/venc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 2.11.0 diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index 39748e7a08e4..01af1ac89edf 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -289,7 +289,7 @@ venc_try_fmt_common(struct venus_inst *inst, struct v4l2_format *f) pixmp->height = clamp(pixmp->height, inst->cap_height.min, inst->cap_height.max); - if (inst->core->res->hfi_version == HFI_VERSION_1XX) + if (f->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) pixmp->height = ALIGN(pixmp->height, 32); pixmp->width = ALIGN(pixmp->width, 2); @@ -747,8 +747,8 @@ static int venc_init_session(struct venus_inst *inst) if (ret) return ret; - ret = venus_helper_set_input_resolution(inst, inst->out_width, - inst->out_height); + ret = venus_helper_set_input_resolution(inst, inst->width, + inst->height); if (ret) goto deinit; @@ -1010,6 +1010,8 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq, src_vq->allow_zero_bytesused = 1; src_vq->min_buffers_needed = 1; src_vq->dev = inst->core->dev; + if (inst->core->res->hfi_version == HFI_VERSION_1XX) + src_vq->bidirectional = 1; ret = vb2_queue_init(src_vq); if (ret) return ret; From patchwork Fri Aug 18 14:16:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 110391 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp889575obb; Fri, 18 Aug 2017 07:17:00 -0700 (PDT) X-Received: by 10.84.211.7 with SMTP id b7mr4090806pli.382.1503065820076; Fri, 18 Aug 2017 07:17:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503065820; cv=none; d=google.com; s=arc-20160816; b=mVPk7A1FFfwvicRFl1TAqbRbZEhEWljXb5up+s+NvAEtYZWRVCQ5Twu4slJ7Sek8ry J4eOmW6np+mGonm6Smk9dZ1XOdE4JFKHCsirh6UpBljADGsCwGNSzgmhqjfWRDhkTfPA 2nODDMNaqc4R00IE65mbeKgTeGFDhwCB+rUsek+LpgSaMZA8LMbsazgooCdcBmABdj1k CzH6HLLRjSDO/GTQ74WtCFizsLkTvOl9XRF24dxa8Ps6PvaE4CuucwTS4zKpHECwpfzA Mkzf3n37tnCRwp3NzjK6SKxrLFUr558toHQiHGWMWSB7njqGRLz1yhU5JkVwjhQuXbBI rKzQ== 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:arc-authentication-results; bh=mATXhJBFqfgGfnp9YkucyadR4MMQGIvNcPONmIvAiXA=; b=PshN0J32EhPaNdQfcjdX6C62FxUEcFW1DGyK6flTdd4rFx42+HZAjNw601WHSoQNe+ bLaDUbqDtCgxm9Bn5DGcUtbD4bfgH26aR+Qw8h2wr2MPt2sJ/QTnljg+Xg8J4rgGObyx kjroCNm1gIWYlv2osq54A5GGCdprKjZru24QdUbY3LOb6zHhR9crZ6NwqLWrLt5ONAsP tsMwt9EudKVNxyqq0N7s1/8Xxfp6m0JodKePnOY4f+svxcTwV4HhxBbBYcx0tMHKbWWx 6o3GUkjNpUIBFJE7O83qjOsk2/1p0Swrv8d0ra0jQGhI98UGO63t61ELqgXd684cu4dN XVlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WWoEAkDH; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b1si3971379plc.28.2017.08.18.07.16.59; Fri, 18 Aug 2017 07:17:00 -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 header.s=google header.b=WWoEAkDH; 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 S1753542AbdHROQy (ORCPT + 26 others); Fri, 18 Aug 2017 10:16:54 -0400 Received: from mail-wr0-f180.google.com ([209.85.128.180]:36375 "EHLO mail-wr0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753512AbdHROQv (ORCPT ); Fri, 18 Aug 2017 10:16:51 -0400 Received: by mail-wr0-f180.google.com with SMTP id f8so27684146wrf.3 for ; Fri, 18 Aug 2017 07:16:50 -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=mATXhJBFqfgGfnp9YkucyadR4MMQGIvNcPONmIvAiXA=; b=WWoEAkDH0PenIawla9fih4oCVACZ1ctEtQL4pbJUo5tcZSzxrKFNWcwPm89FRf1T7+ ovwzVYXSw7WimS2gcjD660jeaBm1CccqKP9o8YK2K8OacSG0o09uiHSH/GN7n9sPyYGA k1T9l6rDjs7u4t5nS4hWoVfOmwvF3XZWlAuDo= 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=mATXhJBFqfgGfnp9YkucyadR4MMQGIvNcPONmIvAiXA=; b=PlfK0srmicOaBUrwi/NCcJ/MMjo4n3dRrbfH1ACn3x+zQXaxkrftJOUecdyR+4LfNk psQpk0yB1QKg4RpGYCrvQUZdYDDnCrStV+XgrmWwsAzoCAjfRYtAF5+7xEchJobubZv7 yx91g+NhGgCLZ9+cEtH3Xp1me/zy+ySLmo6cRZGod0nUulpv/DwipdnnUtOIiM8t+Bam cHO95JlC82kgBsEuQI8MyPcta0zOQHYSyAtppJIgFc6ttVqEQI8j3AFIjnqbkQP5/qQK bO9uP/GEkq24JdgZaL7/GjjgBjXLncL41VHdsyLiXHKwOPD0wf1P1WAkKjd3EcmZInGJ t9QQ== X-Gm-Message-State: AHYfb5h239TygJkrE98Iy4ISCtp5UhAe8+7XuemSOCe5sQc38TQaZJaK GJlMdlaa3vd3kZaY X-Received: by 10.223.131.37 with SMTP id 34mr5201045wrd.155.1503065809716; Fri, 18 Aug 2017 07:16:49 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id 55sm1387383wrv.32.2017.08.18.07.16.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Aug 2017 07:16:49 -0700 (PDT) From: Stanimir Varbanov To: Mauro Carvalho Chehab , Hans Verkuil Cc: Pawel Osciak , Marek Szyprowski , Kyungmin Park , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Stanimir Varbanov Subject: [PATCH 3/7] media: venus: mark venc and vdec PM functions as __maybe_unused Date: Fri, 18 Aug 2017 17:16:02 +0300 Message-Id: <20170818141606.4835-4-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170818141606.4835-1-stanimir.varbanov@linaro.org> References: <20170818141606.4835-1-stanimir.varbanov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Without PM support gcc could warns about unused functions, thus mark runtime_suspend/resume as __maybe_unused. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/vdec.c | 6 ++---- drivers/media/platform/qcom/venus/venc.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) -- 2.11.0 diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index eb0c1c51cfef..44d4848e878a 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -1103,8 +1103,7 @@ static int vdec_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM -static int vdec_runtime_suspend(struct device *dev) +static __maybe_unused int vdec_runtime_suspend(struct device *dev) { struct venus_core *core = dev_get_drvdata(dev); @@ -1118,7 +1117,7 @@ static int vdec_runtime_suspend(struct device *dev) return 0; } -static int vdec_runtime_resume(struct device *dev) +static __maybe_unused int vdec_runtime_resume(struct device *dev) { struct venus_core *core = dev_get_drvdata(dev); int ret; @@ -1132,7 +1131,6 @@ static int vdec_runtime_resume(struct device *dev) return ret; } -#endif static const struct dev_pm_ops vdec_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index 01af1ac89edf..4bffadd67238 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -1226,8 +1226,7 @@ static int venc_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM -static int venc_runtime_suspend(struct device *dev) +static __maybe_unused int venc_runtime_suspend(struct device *dev) { struct venus_core *core = dev_get_drvdata(dev); @@ -1241,7 +1240,7 @@ static int venc_runtime_suspend(struct device *dev) return 0; } -static int venc_runtime_resume(struct device *dev) +static __maybe_unused int venc_runtime_resume(struct device *dev) { struct venus_core *core = dev_get_drvdata(dev); int ret; @@ -1255,7 +1254,6 @@ static int venc_runtime_resume(struct device *dev) return ret; } -#endif static const struct dev_pm_ops venc_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, From patchwork Fri Aug 18 14:16:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 110395 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp891190obb; Fri, 18 Aug 2017 07:18:19 -0700 (PDT) X-Received: by 10.101.73.136 with SMTP id r8mr8472601pgs.21.1503065899707; Fri, 18 Aug 2017 07:18:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503065899; cv=none; d=google.com; s=arc-20160816; b=uZ9BmRST3r5kFbN6LmBo/bMa3VP5fpjy9iI0FtghgQR8gpoUw1N3PiyWR4zuH40Ky/ 3mS+rgNRIC7daYl1kMLkBd7UDvYD8200bTUuohFn7XcAzfXk+wsguk/TtKBjvGcQy0Hm Pjzw3QYHXx+nfBQ4S4LYpL98vgx8/I2fYNTGasF7DGYQ/FVY49q8UCgMI/QvBhni+i0W gBcqmfYgHKmnxmkwJEdh+7YVatSfIMhzjl8h0xKfxjsZtRViOsuGnKYvnuJrt59oi4YY jL1RSqAIFLuWwS1Jlh2TD5elrx/oXFHE5gYK8TGEvK4xdVBxLpp/YOp9VDbe3W1elyjN yzsQ== 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:arc-authentication-results; bh=xgYvQv5/ooAnh9gVSKLlupjldBumwIY441TcBDMdzG0=; b=hxv7WH3xqnhIBsylE6IPUwQ1qnV0Zffuv8WIX8o8gR5uhJVkGjktC+TQNGuhy82Uhp +Mzqdp1eaHMdVMqMOTRrNaSLS92HHkQOIQr7YeCSYkNFCua6YNzIvdl5cJUlshL9qpOK dKMvdEdqVdcxQX+Qx7BY3VofuERJL9hzkgBsGSoI2YDU2gEDZOW5JFAkyNnjslZPMszt QAO9GyIkbPLh0maOZFFpV9sGWdnxrHyX2V+rY0yk9mYPKB49r73reyACiAD9BtVlxntm Mx54NBvXIfZb46jSrm3A28rHFL3rnz8emOX5HHLMLPP/4Yz4ZQAuDTJsOUBPOGVINrOz +9iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jkV6DeCj; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9si1856811pgs.254.2017.08.18.07.18.19; Fri, 18 Aug 2017 07:18:19 -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 header.s=google header.b=jkV6DeCj; 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 S1753605AbdHROSQ (ORCPT + 26 others); Fri, 18 Aug 2017 10:18:16 -0400 Received: from mail-wr0-f175.google.com ([209.85.128.175]:36384 "EHLO mail-wr0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752597AbdHROQw (ORCPT ); Fri, 18 Aug 2017 10:16:52 -0400 Received: by mail-wr0-f175.google.com with SMTP id f8so27684486wrf.3 for ; Fri, 18 Aug 2017 07:16:52 -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=xgYvQv5/ooAnh9gVSKLlupjldBumwIY441TcBDMdzG0=; b=jkV6DeCju0RDR0uPrOD7j6V0clCE+/nHPnww12rbZzvPhHBpsWVk575AOyHlJ1/7ND uz1E8HC/WcPlVt6rV8Dnq6VCtgPQ/QHEyA//greexlQp7THuLluIwNKn6Z+qODsFuz1J ZZt8BYEr9nAn5OJnJ0Lpq0HAGZuGRgOvKwuwQ= 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=xgYvQv5/ooAnh9gVSKLlupjldBumwIY441TcBDMdzG0=; b=fNx9gWmGqE8aP/3OwtHDJ2O/7bSm3guwPzTAL/BUg7xx8MVA4bFJZytwXpqBaCtVn7 JCRU3x8OrD0dAJwSx74lyMg8ql3EL7kFqPg0Cfjhp42X7ipXlSMnnSqyvij3n3GHpTHN A/xRXJnQmdVuXeG9TUQ0PtRgYVRUlHyuMdx4Wk9kEEyQq4Vy6lFta1/a0ksFuogzjgrf HHOMC3yf40c5C/hMctQu/rcClEsrLo/QPj8fNgOaofYoiKo9q5T4R+f88xs4cDoZRw0n n2akpJWD36q/fP/OWHXKeh0292lqcSoTa24VlfMQbKTeUfO4kjtJs9VZnlLaw5ddQPJc DoaA== X-Gm-Message-State: AHYfb5ic2pSQznetEG4gvnk9IZbuS5Y/BQKDTIeKpmdskkjTrJXXjeQ7 zfwZgFoLtehzVd2X X-Received: by 10.223.137.17 with SMTP id s17mr6162092wrs.263.1503065811820; Fri, 18 Aug 2017 07:16:51 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id 55sm1387383wrv.32.2017.08.18.07.16.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Aug 2017 07:16:51 -0700 (PDT) From: Stanimir Varbanov To: Mauro Carvalho Chehab , Hans Verkuil Cc: Pawel Osciak , Marek Szyprowski , Kyungmin Park , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Stanimir Varbanov Subject: [PATCH 4/7] media: venus: fill missing video_device name Date: Fri, 18 Aug 2017 17:16:03 +0300 Message-Id: <20170818141606.4835-5-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170818141606.4835-1-stanimir.varbanov@linaro.org> References: <20170818141606.4835-1-stanimir.varbanov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This fills missing (forgotten) video device name with appropriate string so that udev can distinguishes between decoder and encoder devices. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/vdec.c | 1 + drivers/media/platform/qcom/venus/venc.c | 1 + 2 files changed, 2 insertions(+) -- 2.11.0 diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 44d4848e878a..32a1feb2fe6a 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -1069,6 +1069,7 @@ static int vdec_probe(struct platform_device *pdev) if (!vdev) return -ENOMEM; + strlcpy(vdev->name, "qcom-venus-decoder", sizeof(vdev->name)); vdev->release = video_device_release; vdev->fops = &vdec_fops; vdev->ioctl_ops = &vdec_ioctl_ops; diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index 4bffadd67238..bcb50d39f88a 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -1192,6 +1192,7 @@ static int venc_probe(struct platform_device *pdev) if (!vdev) return -ENOMEM; + strlcpy(vdev->name, "qcom-venus-encoder", sizeof(vdev->name)); vdev->release = video_device_release; vdev->fops = &venc_fops; vdev->ioctl_ops = &venc_ioctl_ops; From patchwork Fri Aug 18 14:16:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 110392 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp889642obb; Fri, 18 Aug 2017 07:17:03 -0700 (PDT) X-Received: by 10.98.3.3 with SMTP id 3mr8927571pfd.31.1503065822903; Fri, 18 Aug 2017 07:17:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503065822; cv=none; d=google.com; s=arc-20160816; b=rVSB5V4JZcF4xjAUh1ALcUvPbmyIwXsAmHV5WzlsrLd1POtnftuSBD4pVGsUukeOXq xAUv9ecFhMCeHwQuEDINeYKqCQBzDaSLsQbRofsZcvtajI3lA5rbkzB2N02VmummCYaz WeK3CDxQnfJokDiXMZxlKZ1nCFJNmxEpaRYlY7yRYYlJgCkA9n5Dyc6h6I/vXZJvdxFO Weqeie9fAJLR28FlUFxEQQi3pc9hUZPJGQ5auc2RnX5qQijvrJkmXVJD7tw2LanwFbx6 O8mcF12emvB2HVwDB/mempH3kBTdI9wtAyUFC8YNC455/m4L6ON3/m3HFa2Kf2JyFt+u c9lw== 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:arc-authentication-results; bh=6LzLQlwqYUmbanL6ynw/oWBDQUrO9sUKe8UbegFTTqM=; b=M9NnbqKiit5Fd2npwS3rmsfyI0QHMdQ0U6thRxKpwGVExYJkuPpXRT5ystLKfl0NxH RipjotqDvoTG9e9jfdTFcysgd6fpvhMOoAMcpOqjkElKSwqTDB1AChPN+2HrxBToBbNE KXUyNf2t6Y0wypI+4U5dR5ffEv1miLAjt+AwLOAV6Jpe+6LMrD1PrYfD/jHVrByDHP0l y2zkHAaFfv4qT3Vqy1DNoheBnweHyUr+FsUJlE1mR6TYsNsE3JddXqfdssUAz+5R3FNK i+z3vkljacOFR4iBSYE1GqAfIp1caVE0nz8NU2L1ycQOhXNb9Di49CsC3q/nhw26aOIR lh3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OOQ+d51S; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b1si3971379plc.28.2017.08.18.07.17.02; Fri, 18 Aug 2017 07:17:02 -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 header.s=google header.b=OOQ+d51S; 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 S1753565AbdHROQ7 (ORCPT + 26 others); Fri, 18 Aug 2017 10:16:59 -0400 Received: from mail-wr0-f177.google.com ([209.85.128.177]:38057 "EHLO mail-wr0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753532AbdHROQy (ORCPT ); Fri, 18 Aug 2017 10:16:54 -0400 Received: by mail-wr0-f177.google.com with SMTP id 5so47465938wrz.5 for ; Fri, 18 Aug 2017 07:16:54 -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=6LzLQlwqYUmbanL6ynw/oWBDQUrO9sUKe8UbegFTTqM=; b=OOQ+d51SR2uhRROXzBfet2esxSAeBZNotIfNdX+8undK17l8nM96/PLkGq1oXsfIYX 6TqJUeOHqcO8qDL7v5oqrrVYphao7tslmWfo8seqJjmUrm7t1BLRKqLSqMHmd0FQZxea G9WTUKP/vOVm2E+DYFS5+DhI2i8WCBJmds7AY= 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=6LzLQlwqYUmbanL6ynw/oWBDQUrO9sUKe8UbegFTTqM=; b=L0Jk4lEMHYZmQ0DFuQaGqKFP6fB+ioRPbcH4HDDIzKAdahxFzDIyRBQHkJwTW8/UnG TtybZNECebZLFGKLSUOHlbGEg8gqovr8sKrekrsWf8HJ76lFrrSJZdjVMVdXdrjDfu+G Birvd32neIdxCGD1kjYCi0qF1d20ocwIVTnn0203/45A2dQn0JHgq97X0Kd1elANjNuC 1Z4MW5NUMkbOmWtaJogT8+zByWB1k3EbZXafqqrkWvc6j8wHeh2Ul19gleUbOnicXrBr xapxOnU4P4FGaTXbWS7pZ6JRldGHig6WdMG0zcG6cXDb4KboooloCm3pTKKjitRCXy7Y Ju2w== X-Gm-Message-State: AHYfb5gHD97zoX6Q0JK4gfD1G2rYInJnSXJYBFjaNa/DFPEfWhLi0tOg 9Tg54LunLGLXTR2o X-Received: by 10.223.129.135 with SMTP id 7mr5333525wra.11.1503065813726; Fri, 18 Aug 2017 07:16:53 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id 55sm1387383wrv.32.2017.08.18.07.16.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Aug 2017 07:16:53 -0700 (PDT) From: Stanimir Varbanov To: Mauro Carvalho Chehab , Hans Verkuil Cc: Pawel Osciak , Marek Szyprowski , Kyungmin Park , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Stanimir Varbanov Subject: [PATCH 5/7] media: venus: add helper to check supported codecs Date: Fri, 18 Aug 2017 17:16:04 +0300 Message-Id: <20170818141606.4835-6-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170818141606.4835-1-stanimir.varbanov@linaro.org> References: <20170818141606.4835-1-stanimir.varbanov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adds a helper function to runtime check supported encoder and decoder codecs depending on venus version and platform. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/helpers.c | 49 +++++++++++++++++++++++++++++ drivers/media/platform/qcom/venus/helpers.h | 1 + 2 files changed, 50 insertions(+) -- 2.11.0 diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 5f4434c0a8f1..b52410deeb4c 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -34,6 +34,55 @@ struct intbuf { unsigned long attrs; }; +bool venus_helper_check_codec(struct venus_inst *inst, u32 v4l2_pixfmt) +{ + struct venus_core *core = inst->core; + u32 session_type = inst->session_type; + u32 codec; + + switch (v4l2_pixfmt) { + case V4L2_PIX_FMT_H264: + codec = HFI_VIDEO_CODEC_H264; + break; + case V4L2_PIX_FMT_H263: + codec = HFI_VIDEO_CODEC_H263; + break; + case V4L2_PIX_FMT_MPEG1: + codec = HFI_VIDEO_CODEC_MPEG1; + break; + case V4L2_PIX_FMT_MPEG2: + codec = HFI_VIDEO_CODEC_MPEG2; + break; + case V4L2_PIX_FMT_MPEG4: + codec = HFI_VIDEO_CODEC_MPEG4; + break; + case V4L2_PIX_FMT_VC1_ANNEX_G: + case V4L2_PIX_FMT_VC1_ANNEX_L: + codec = HFI_VIDEO_CODEC_VC1; + break; + case V4L2_PIX_FMT_VP8: + codec = HFI_VIDEO_CODEC_VP8; + break; + case V4L2_PIX_FMT_VP9: + codec = HFI_VIDEO_CODEC_VP9; + break; + case V4L2_PIX_FMT_XVID: + codec = HFI_VIDEO_CODEC_DIVX; + break; + default: + return false; + } + + if (session_type == VIDC_SESSION_TYPE_ENC && core->enc_codecs & codec) + return true; + + if (session_type == VIDC_SESSION_TYPE_DEC && core->dec_codecs & codec) + return true; + + return false; +} +EXPORT_SYMBOL_GPL(venus_helper_check_codec); + static int intbufs_set_buffer(struct venus_inst *inst, u32 type) { struct venus_core *core = inst->core; diff --git a/drivers/media/platform/qcom/venus/helpers.h b/drivers/media/platform/qcom/venus/helpers.h index 6a061b417a93..971392be5df5 100644 --- a/drivers/media/platform/qcom/venus/helpers.h +++ b/drivers/media/platform/qcom/venus/helpers.h @@ -19,6 +19,7 @@ struct venus_inst; +bool venus_helper_check_codec(struct venus_inst *inst, u32 v4l2_pixfmt); struct vb2_v4l2_buffer *venus_helper_find_buf(struct venus_inst *inst, unsigned int type, u32 idx); void venus_helper_buffers_done(struct venus_inst *inst, From patchwork Fri Aug 18 14:16:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 110394 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp890359obb; Fri, 18 Aug 2017 07:17:37 -0700 (PDT) X-Received: by 10.84.128.8 with SMTP id 8mr9820294pla.391.1503065857664; Fri, 18 Aug 2017 07:17:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503065857; cv=none; d=google.com; s=arc-20160816; b=OBapm7OUgU39YzRsJCQ+bhC9PwCGkGrObzgN8aBQXI1ED/T/iLnv2In6Tvz4QtwCN6 Zn0L8/7+4TcDogI6iXK73wgh6DkYcSe6EjRaq42T//zMhhcegNKz/vn4dihwNOiqTbPN /rD5C4StuUZWewK93xVSxOiuNZL8tPGaBubcgZh1BjFh2AvU8SLI9TeOLijiz6iQC7sX K67JKcPc3lzXu3b9PPzxmTc6E1Nh/QKNgaLhnamtwrEm1kjpxg0m3GWTU+4MfjURihhG hH+MIB/DFzjCqCVHnTLVRL5xM61H7mx5qj59Du/86DdIjXTtbqOmebonLtJ7B+VoGR/2 vo4w== 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:arc-authentication-results; bh=JUcb4HvTZWV0yKtvl9xHmW1BdrAcrjHvWwV4dagX/qs=; b=ulaeEoTY4+6Pp3EHd5wyrf/zQ6Tn88mcOCMnkC7uBibc9pjCkTP5tvtWlshM48I69p 4Qo4DL8TVZp0zD26R3Hi3JIypmigPJMkrXdUyEmv1MGkec5ukL/WcTVDyFaJAnIPVgIN wvZumOWzyApjKF5p206uWVt9HbDOEEvN2SAoWycyGDiq9+aW0d5v5RAiCK17cioGRxGO dDSo4S8oGZak2qrPZ7+7SyAtwLBGKzeo+K4vWtmgEt+Evv2zEhzyDkQaeZSNSw64rKS3 IDjP+BzTQ6n9MZ8O73wDh27VZQAWyUz4MJg8oEop+MU6bLih5Ajnzbmo+eatFPdXq2tS 9Unw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eWncoVqo; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 102si4026753ple.858.2017.08.18.07.17.36; Fri, 18 Aug 2017 07:17:37 -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 header.s=google header.b=eWncoVqo; 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 S1753594AbdHRORe (ORCPT + 26 others); Fri, 18 Aug 2017 10:17:34 -0400 Received: from mail-wr0-f169.google.com ([209.85.128.169]:33960 "EHLO mail-wr0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753462AbdHROQ5 (ORCPT ); Fri, 18 Aug 2017 10:16:57 -0400 Received: by mail-wr0-f169.google.com with SMTP id y96so68404912wrc.1 for ; Fri, 18 Aug 2017 07:16:56 -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=JUcb4HvTZWV0yKtvl9xHmW1BdrAcrjHvWwV4dagX/qs=; b=eWncoVqo8jLCgstxd8NQiipD69WhX9N4uYINDczdle4aScmNE0T34IA51Gy6ST0CU0 04T4+WJy3vhtS5wbCWIPWo/xmMUEYwGw9y8fBeMku1PMnHPI/iGcrukpdbLuOol1D6lp C5ozC98CxGMPeO4IvGTSNvTURL3ExvEASRU2Y= 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=JUcb4HvTZWV0yKtvl9xHmW1BdrAcrjHvWwV4dagX/qs=; b=FRIbaZ56HmfHpB7C/tPaE9GmOrQtVLx+NHIhH3tByPeCwPewMQrCclo8YC0nuiRmXa tqd3C5S0BuKhVsDthHj9E/PUNROfltOvgKyNvCamhUKdjTV77xM7+1d1bDwbeTWT/1J0 YqmKCcKEd0ghDZTiUMYCcWACqZKKfAruioH8IshVF0dEkXNQh/k+WQCjmj/xGm5fjbIQ p7bELlYfSgvTJB+s38+bwf8lcjnjm0YwJy5FTKgUlhsqne9sGHotd6PZSZrfnKIAkkRJ VH46aFc5khPmYveomevxLEkkEPj/cxy6xDlfmw8ie4ZVwnq8O4bEDgyL58DnECKgz4nF qo9A== X-Gm-Message-State: AHYfb5h0JQhVU3iX1qrc4WfQkuMoh9QAbDdw00x5YM/e7wPp45wzGJg7 aNLkmdMvHFnOEeVF X-Received: by 10.223.136.104 with SMTP id e37mr1372440wre.152.1503065815857; Fri, 18 Aug 2017 07:16:55 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id 55sm1387383wrv.32.2017.08.18.07.16.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Aug 2017 07:16:55 -0700 (PDT) From: Stanimir Varbanov To: Mauro Carvalho Chehab , Hans Verkuil Cc: Pawel Osciak , Marek Szyprowski , Kyungmin Park , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Stanimir Varbanov Subject: [PATCH 6/7] media: venus: use helper function to check supported codecs Date: Fri, 18 Aug 2017 17:16:05 +0300 Message-Id: <20170818141606.4835-7-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170818141606.4835-1-stanimir.varbanov@linaro.org> References: <20170818141606.4835-1-stanimir.varbanov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the helper function in decoder and encoder find_format to runtime check supported codecs. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/vdec.c | 24 +++++++++++++++++------- drivers/media/platform/qcom/venus/venc.c | 28 +++++++++++++++++++--------- 2 files changed, 36 insertions(+), 16 deletions(-) -- 2.11.0 diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 32a1feb2fe6a..da611a5eb670 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -102,7 +102,8 @@ static const struct venus_format vdec_formats[] = { }, }; -static const struct venus_format *find_format(u32 pixfmt, u32 type) +static const struct venus_format * +find_format(struct venus_inst *inst, u32 pixfmt, u32 type) { const struct venus_format *fmt = vdec_formats; unsigned int size = ARRAY_SIZE(vdec_formats); @@ -116,11 +117,15 @@ static const struct venus_format *find_format(u32 pixfmt, u32 type) if (i == size || fmt[i].type != type) return NULL; + if (type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE && + !venus_helper_check_codec(inst, fmt[i].pixfmt)) + return NULL; + return &fmt[i]; } static const struct venus_format * -find_format_by_index(unsigned int index, u32 type) +find_format_by_index(struct venus_inst *inst, unsigned int index, u32 type) { const struct venus_format *fmt = vdec_formats; unsigned int size = ARRAY_SIZE(vdec_formats); @@ -140,6 +145,10 @@ find_format_by_index(unsigned int index, u32 type) if (i == size) return NULL; + if (type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE && + !venus_helper_check_codec(inst, fmt[i].pixfmt)) + return NULL; + return &fmt[i]; } @@ -154,7 +163,7 @@ vdec_try_fmt_common(struct venus_inst *inst, struct v4l2_format *f) memset(pfmt[0].reserved, 0, sizeof(pfmt[0].reserved)); memset(pixmp->reserved, 0, sizeof(pixmp->reserved)); - fmt = find_format(pixmp->pixelformat, f->type); + fmt = find_format(inst, pixmp->pixelformat, f->type); if (!fmt) { if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) pixmp->pixelformat = V4L2_PIX_FMT_NV12; @@ -162,7 +171,7 @@ vdec_try_fmt_common(struct venus_inst *inst, struct v4l2_format *f) pixmp->pixelformat = V4L2_PIX_FMT_H264; else return NULL; - fmt = find_format(pixmp->pixelformat, f->type); + fmt = find_format(inst, pixmp->pixelformat, f->type); pixmp->width = 1280; pixmp->height = 720; } @@ -364,11 +373,12 @@ vdec_querycap(struct file *file, void *fh, struct v4l2_capability *cap) static int vdec_enum_fmt(struct file *file, void *fh, struct v4l2_fmtdesc *f) { + struct venus_inst *inst = to_inst(file); const struct venus_format *fmt; memset(f->reserved, 0, sizeof(f->reserved)); - fmt = find_format_by_index(f->index, f->type); + fmt = find_format_by_index(inst, f->index, f->type); if (!fmt) return -EINVAL; @@ -417,10 +427,10 @@ static int vdec_enum_framesizes(struct file *file, void *fh, struct venus_inst *inst = to_inst(file); const struct venus_format *fmt; - fmt = find_format(fsize->pixel_format, + fmt = find_format(inst, fsize->pixel_format, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE); if (!fmt) { - fmt = find_format(fsize->pixel_format, + fmt = find_format(inst, fsize->pixel_format, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE); if (!fmt) return -EINVAL; diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index bcb50d39f88a..9f459024aa07 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -91,7 +91,8 @@ static const struct venus_format venc_formats[] = { }, }; -static const struct venus_format *find_format(u32 pixfmt, u32 type) +static const struct venus_format * +find_format(struct venus_inst *inst, u32 pixfmt, u32 type) { const struct venus_format *fmt = venc_formats; unsigned int size = ARRAY_SIZE(venc_formats); @@ -105,11 +106,15 @@ static const struct venus_format *find_format(u32 pixfmt, u32 type) if (i == size || fmt[i].type != type) return NULL; + if (type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE && + !venus_helper_check_codec(inst, fmt[i].pixfmt)) + return NULL; + return &fmt[i]; } static const struct venus_format * -find_format_by_index(unsigned int index, u32 type) +find_format_by_index(struct venus_inst *inst, unsigned int index, u32 type) { const struct venus_format *fmt = venc_formats; unsigned int size = ARRAY_SIZE(venc_formats); @@ -129,6 +134,10 @@ find_format_by_index(unsigned int index, u32 type) if (i == size) return NULL; + if (type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE && + !venus_helper_check_codec(inst, fmt[i].pixfmt)) + return NULL; + return &fmt[i]; } @@ -246,9 +255,10 @@ venc_querycap(struct file *file, void *fh, struct v4l2_capability *cap) static int venc_enum_fmt(struct file *file, void *fh, struct v4l2_fmtdesc *f) { + struct venus_inst *inst = to_inst(file); const struct venus_format *fmt; - fmt = find_format_by_index(f->index, f->type); + fmt = find_format_by_index(inst, f->index, f->type); memset(f->reserved, 0, sizeof(f->reserved)); @@ -271,7 +281,7 @@ venc_try_fmt_common(struct venus_inst *inst, struct v4l2_format *f) memset(pfmt[0].reserved, 0, sizeof(pfmt[0].reserved)); memset(pixmp->reserved, 0, sizeof(pixmp->reserved)); - fmt = find_format(pixmp->pixelformat, f->type); + fmt = find_format(inst, pixmp->pixelformat, f->type); if (!fmt) { if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) pixmp->pixelformat = V4L2_PIX_FMT_H264; @@ -279,7 +289,7 @@ venc_try_fmt_common(struct venus_inst *inst, struct v4l2_format *f) pixmp->pixelformat = V4L2_PIX_FMT_NV12; else return NULL; - fmt = find_format(pixmp->pixelformat, f->type); + fmt = find_format(inst, pixmp->pixelformat, f->type); pixmp->width = 1280; pixmp->height = 720; } @@ -524,10 +534,10 @@ static int venc_enum_framesizes(struct file *file, void *fh, fsize->type = V4L2_FRMSIZE_TYPE_STEPWISE; - fmt = find_format(fsize->pixel_format, + fmt = find_format(inst, fsize->pixel_format, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE); if (!fmt) { - fmt = find_format(fsize->pixel_format, + fmt = find_format(inst, fsize->pixel_format, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE); if (!fmt) return -EINVAL; @@ -554,10 +564,10 @@ static int venc_enum_frameintervals(struct file *file, void *fh, fival->type = V4L2_FRMIVAL_TYPE_STEPWISE; - fmt = find_format(fival->pixel_format, + fmt = find_format(inst, fival->pixel_format, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE); if (!fmt) { - fmt = find_format(fival->pixel_format, + fmt = find_format(inst, fival->pixel_format, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE); if (!fmt) return -EINVAL; From patchwork Fri Aug 18 14:16:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 110393 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp889822obb; Fri, 18 Aug 2017 07:17:12 -0700 (PDT) X-Received: by 10.99.2.86 with SMTP id 83mr8561661pgc.264.1503065832016; Fri, 18 Aug 2017 07:17:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503065832; cv=none; d=google.com; s=arc-20160816; b=VePy19lVMvNr7rsswKAeKbn14I7k3+e/a4GBH+rOMNt4vzn2tYhTF4qOIMzOYyIJ1p +sYgpHpz9feU81l+p3VeK5ZHhu+PThORScDfXJVCX/NHbihMfQAYBku2RxuXhyQZh1oR NjwtB+tMpHyBNHchquszAdSapV8IfWjkE+8E+DaFiiJpttwn77Vbjzj2fd6QHXxjdOxp wlc/jQeGsyX9MhZNnGfLXwWmEIvOins2yIe7e8klrcSOS32lQHDaMJfnsOkGqU5g1tAC Zlf+EykdOc7svmDLfUDJV8GOQ0hH8hmwIXSHVMnkUrqT/C0w/H2NuUt6OraJVktIPTP6 +dPA== 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:arc-authentication-results; bh=WIVCx9i75rYrHgb2/nNKPZnjGAdClq20eXiTxX2V5Ys=; b=Z12oi6zLdXlmKqEtcCrpzffTLU73JSyiUxUjJnLlM357ZcFX9CMPqg8MUkBr8CTt/z shwpeVChRxVB8CXCQpvv7A8eMtoTTV8t+EclU8VSiZfcjHHWCdx4siQ3Vz1DyLS+6qxJ 6oXL3Pdib3Amp1uhHN3pDpSCohL/X8MyGdp+tmDGIcR7BwVSEdj2dVVhvcf6g58m3JYU ByZUbmUfg3u5NV5LIP4wjbkrkm0eepP34Lh//X7OrQXTPVeWYDk7RaoP4lG9MR6Q9uJD mNRLvFqm7M9PIvlUXyiUfw0L49FpEP36oGplf2LgEKXGvRkBKrOjm3LLTAA2jYnhC4I/ 9Pcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M9qGK70A; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l66si3716017pfb.64.2017.08.18.07.17.11; Fri, 18 Aug 2017 07:17:12 -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 header.s=google header.b=M9qGK70A; 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 S1753585AbdHRORI (ORCPT + 26 others); Fri, 18 Aug 2017 10:17:08 -0400 Received: from mail-wr0-f171.google.com ([209.85.128.171]:38072 "EHLO mail-wr0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753545AbdHROQ6 (ORCPT ); Fri, 18 Aug 2017 10:16:58 -0400 Received: by mail-wr0-f171.google.com with SMTP id 5so47466533wrz.5 for ; Fri, 18 Aug 2017 07:16:58 -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=WIVCx9i75rYrHgb2/nNKPZnjGAdClq20eXiTxX2V5Ys=; b=M9qGK70A0jlxpIVQAwqHgWYPf2c1D6F7mFDkShh/KG07hz2/eyOU56OjIEpx+jTVSC /gr+mn/uFR/bAE6+wStQHXCMjD/v2Bo4dF3bPLx4DrgjBk9TbbWwD3oPPLXv42xH6QSy YxA4mW1lpmv3qLm3H0l5zmmaui4VU/YBSa2KA= 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=WIVCx9i75rYrHgb2/nNKPZnjGAdClq20eXiTxX2V5Ys=; b=MWbsHOz0arRYC3Z23LzxJgZ/XQfywx9MYn3kR+Bi+5XwSoiSYW3gXXvn/c/MepU/bt 6hT96iQ7Ueoj4ir8q884mWlVZbBUWX1ZUtqoZgOupjSkZWzyQ+XJGIz3BROGJzHrDDy6 qkY/Loto90tERGVrX+a7xn46JTloP26m69cEzH0+AJhi1H/ee0IqKSiPfOFhKhTpu0Oy mvmkq6dNLU4FZIseXA6a2OasBhaguujxJtPzRpylHg1kaDIgqxInxFKhXk0231TmqPbL FLQMefP2cgevI8yOjCAgRZovNxz3xgnADfUuWA+y/8W4Q76hz39jjdufuN457sOf5nuP AQpg== X-Gm-Message-State: AHYfb5jDQgqTOehosf5d/6in2WK3BM/NdcIUTMEjCl3z0Y6GBtjDCUVb 99oM+VZ6y+o5BC5l X-Received: by 10.223.156.1 with SMTP id f1mr4011662wrc.20.1503065817549; Fri, 18 Aug 2017 07:16:57 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id 55sm1387383wrv.32.2017.08.18.07.16.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Aug 2017 07:16:57 -0700 (PDT) From: Stanimir Varbanov To: Mauro Carvalho Chehab , Hans Verkuil Cc: Pawel Osciak , Marek Szyprowski , Kyungmin Park , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Stanimir Varbanov Subject: [PATCH 7/7] media: venus: venc: drop VP9 codec support Date: Fri, 18 Aug 2017 17:16:06 +0300 Message-Id: <20170818141606.4835-8-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170818141606.4835-1-stanimir.varbanov@linaro.org> References: <20170818141606.4835-1-stanimir.varbanov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No one of the supported Venus version has implemented VP9 codec for enconding, so drop it from the list of codecs. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/venc.c | 4 ---- 1 file changed, 4 deletions(-) -- 2.11.0 diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index 9f459024aa07..6f123a387cf9 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -84,10 +84,6 @@ static const struct venus_format venc_formats[] = { .pixfmt = V4L2_PIX_FMT_VP8, .num_planes = 1, .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, - }, { - .pixfmt = V4L2_PIX_FMT_VP9, - .num_planes = 1, - .type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, }, };