Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4554398pxj; Tue, 8 Jun 2021 17:51:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziXGjCgegqQXBJyF0f4Iep8Z7U+6lxANyyWUCp0bSLIvopgMGjFDY1ErkDVCl5QUMFLRZJ X-Received: by 2002:aa7:dd55:: with SMTP id o21mr28636665edw.295.1623199879150; Tue, 08 Jun 2021 17:51:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623199879; cv=none; d=google.com; s=arc-20160816; b=r4d6vBRDywbUUNSVC9w+gXvQ4T060+rX6KTHEQJr1Q0mPaoNG8DsltMvrxzgfbkPZQ ATLRk1PVdPvTOrIj7IqOs0b+gxB4i5ferXl+SB3fRgANQu0UBhKO7hMLUtt0XXtFkTIo I7+ZQD+mVENl1WFXHMjjUsThCvl9cV2iSoTJTO39KRYNk1vsd1kjQ+KR4ctGOHWPhFDf vtJLIGovmq6j2c3x1eE3RCP9TEbCx0HvHxTxcwfNwpAO00kbC8mi4Ddg1O1ZmMmwxuFc c46QDBdyAXN6l90h9RplUikSXDLWHbjqS8um6kd2x+OZyfCAfyP+vB9D29gLyBuIe1vo soqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tFrq06L55Y88t1UsTNBMVBuhf1oW5jJWDm/FwjGxUTg=; b=q8glAmYJRDkHD16pLa4X/Jf3nO2nufF38f7CLKZvu0tvPVhtzLsQZWpqj/YInnt8cx Msxj4PaGAYEek5bd4HzH6rUp6S5i4vqYaz/S85/sERDU7N0CpePhf82C9x1yd3GCFk4L vGBpd3iz0loTVKQFsE0/zNNTontNzgVceai3n7Ynzy+UhsgPBU1bXwswpHsZBrktmfym T7f0t3PQQeo2ewjmYdPnEv/oVpQ49h4dVAzRPAaIctmYIEC00+PSBtuj9ApT7A3zo/My 0p0XMxh4Rlg+F/rdPQ0zos+ZdeYwxRuvro8P/tb02rIRMi+x41CRWF7cann+QjV+5BoV 2Ycg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jp3nTomJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id m19si1202312edd.548.2021.06.08.17.50.54; Tue, 08 Jun 2021 17:51:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jp3nTomJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S232213AbhFHLpl (ORCPT + 99 others); Tue, 8 Jun 2021 07:45:41 -0400 Received: from mail-ed1-f42.google.com ([209.85.208.42]:37483 "EHLO mail-ed1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232208AbhFHLpk (ORCPT ); Tue, 8 Jun 2021 07:45:40 -0400 Received: by mail-ed1-f42.google.com with SMTP id b11so24152634edy.4 for ; Tue, 08 Jun 2021 04:43:31 -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 :mime-version:content-transfer-encoding; bh=tFrq06L55Y88t1UsTNBMVBuhf1oW5jJWDm/FwjGxUTg=; b=Jp3nTomJgkEhgEeyNwnrzndFq1i5o2nkzUWx/TjttTeXoFc+xDqbl/RePlnQ34/o83 aqETP9FV1A5nviFpqiUOhI2WiaWjQQCMqjUKjA7UUHB8kzTqJIA/gnWnur/Sb5Ayux/Y +VNdJOZdweRnciUJCKJxa76D1XseXobydCW9A/ZXTNUK2RLxcJFjkV06DEyndn1U3aNN bEzQOZ1jG2C2ZqEw57GLBKOoRD5TIqcNe9HTaMWLorKiUiyHw3qxr/pvZRh3itKpaMXp UKXp2+v37eTFZ8u41Xlq1T7meq98CeBY5+/mBUbNCkhsPrEticL4nsfddP52mycsznqM GmTQ== 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:mime-version:content-transfer-encoding; bh=tFrq06L55Y88t1UsTNBMVBuhf1oW5jJWDm/FwjGxUTg=; b=s2+W35NjuCnjo4a+FV+V6eWC8zwsrNfZ0izhV/Rt6+3LXtbgFx3aVnidge8J28nRfp e0YR2vOEYoWq06MJURsflc+k5hrhnreeVXR2+XqtFGsFz7ctR7NZfa+Qscn/ddSNx20A 6Jj6+okxsQoxTVJM+Ta+GowSgAADQPvXXj0muqAflXiqvnSKws528ISWV3AQ9fgq0iS6 JVwRmsIK2ZNz507YWHu9xlZAM0d91ueMLUsWlX8C8R2q0xZtiWC2AinDyzSDcIIxA+iY zWpm5heZ9+vV7CKHEZxLC46ZPnmJ0F6O15i/+tUfy1M0cOyAQsabPJn9MIzumdhJY8rX UcWQ== X-Gm-Message-State: AOAM530T96hE4bZ4xJ8NOENhEMgbiWwouQlkKlIUrOZ82WE3azLOBtDn 3zit9xPW14NMy1wyxUYhyctHm9qkylxIb0PP X-Received: by 2002:aa7:c68f:: with SMTP id n15mr9554873edq.145.1623152551207; Tue, 08 Jun 2021 04:42:31 -0700 (PDT) Received: from localhost.localdomain (hst-221-104.medicom.bg. [84.238.221.104]) by smtp.gmail.com with ESMTPSA id x4sm8754740edq.23.2021.06.08.04.42.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 04:42:30 -0700 (PDT) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vikash Garodia , Mansur Alisha Shaik , Stanimir Varbanov Subject: [PATCH v2 4/5] venus: helpers: Add helper to mark fatal vb2 error Date: Tue, 8 Jun 2021 14:41:55 +0300 Message-Id: <20210608114156.87018-5-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210608114156.87018-1-stanimir.varbanov@linaro.org> References: <20210608114156.87018-1-stanimir.varbanov@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a helper to mark source and destination vb2 queues fatal unrecoverable error. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/helpers.c | 12 ++++++++++++ drivers/media/platform/qcom/venus/helpers.h | 1 + 2 files changed, 13 insertions(+) diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 210c628ac8f4..abd41ebf3c1b 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -1505,6 +1505,18 @@ void venus_helper_vb2_stop_streaming(struct vb2_queue *q) } EXPORT_SYMBOL_GPL(venus_helper_vb2_stop_streaming); +void venus_helper_vb2_queue_error(struct venus_inst *inst) +{ + struct v4l2_m2m_ctx *m2m_ctx = inst->m2m_ctx; + struct vb2_queue *q; + + q = v4l2_m2m_get_src_vq(m2m_ctx); + vb2_queue_error(q); + q = v4l2_m2m_get_dst_vq(m2m_ctx); + vb2_queue_error(q); +} +EXPORT_SYMBOL_GPL(venus_helper_vb2_queue_error); + int venus_helper_process_initial_cap_bufs(struct venus_inst *inst) { struct v4l2_m2m_ctx *m2m_ctx = inst->m2m_ctx; diff --git a/drivers/media/platform/qcom/venus/helpers.h b/drivers/media/platform/qcom/venus/helpers.h index e6269b4be3af..6a250c3d3cfe 100644 --- a/drivers/media/platform/qcom/venus/helpers.h +++ b/drivers/media/platform/qcom/venus/helpers.h @@ -21,6 +21,7 @@ int venus_helper_vb2_buf_prepare(struct vb2_buffer *vb); void venus_helper_vb2_buf_queue(struct vb2_buffer *vb); void venus_helper_vb2_stop_streaming(struct vb2_queue *q); int venus_helper_vb2_start_streaming(struct venus_inst *inst); +void venus_helper_vb2_queue_error(struct venus_inst *inst); void venus_helper_m2m_device_run(void *priv); void venus_helper_m2m_job_abort(void *priv); int venus_helper_get_bufreq(struct venus_inst *inst, u32 type, -- 2.25.1