From patchwork Wed Mar 19 12:10:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislaw Gruszka X-Patchwork-Id: 14022532 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7ED1D25525E for ; Wed, 19 Mar 2025 12:10:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742386253; cv=none; b=JCv53S0FjE9a4giry5IR9v7/gtMhjxaeScspDbFtIn1VEVFurmtNhVllQbFcy9vJ74vTEdXh0DKMMb9n8HsxmXQimq1LZsuemNTcbUMddwCs9OR7bZlsEMwllvRyGoSl31UdTGwNQjDtkShKdvSaI/j8z6S8GpM0HJfnrWkoKLE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742386253; c=relaxed/simple; bh=vH5+xbbou20STiGnVyTnCSGVCu5CZJUwwUGfbD4nQ78=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uXyrtRpxnI5ZzWjKJU/RyKv9aGEOuC+D8ckHPVUNP3T8TgHDAIKKmsUATV0F7nng1O+ZGueNkpxhJggk4yXt6sgTu5/sYPRbrOQRS54gcow1piss3NcEQEFlBHELhH/qi74YLoEZH1HtAaMFieVNyMWwWmhHEqZFi0r/jQI66Vw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=bAhKj0wY; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="bAhKj0wY" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1742386253; x=1773922253; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vH5+xbbou20STiGnVyTnCSGVCu5CZJUwwUGfbD4nQ78=; b=bAhKj0wYnIgRmyV2s8a+Gch+eGxbWbVwuxTF2e4wHEqVjTEF1Idn3kxj EZKh61jY4G0MJeJEb2FHRTNS5MZnwSmG58czUNuhrGkgl78jIQOUFnEBI pKUJ2XjhkmUs+AIoZngdVEGnfZ1/hD+wUY8nYI6SWfWPyOf0NqRygPXxO lyMup5HLfzHkcJghH2/ezcFCbhEh056IUIsSPZgetVRI096bAfLSF02a9 1uwHn6ZiRGIioBffI64ZM4COUpFs5+ZCOFrLTUhxdoMRCHZz+i/m9OFtZ GVftSvo207vCfRky9ib3VobK3N0jEXR7DgFOgbcb9E6+8lLXI4OCPOzZd g==; X-CSE-ConnectionGUID: lMgpWDU0RtqqtljUrseJsw== X-CSE-MsgGUID: Zk2Yoh6/TReL0qlcWVUhxQ== X-IronPort-AV: E=McAfee;i="6700,10204,11377"; a="53785886" X-IronPort-AV: E=Sophos;i="6.14,259,1736841600"; d="scan'208";a="53785886" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2025 05:10:52 -0700 X-CSE-ConnectionGUID: v7Kx3IzQQNygzJMRPyLy3A== X-CSE-MsgGUID: A16WTS+sQHKTPor8qz9q9w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.14,259,1736841600"; d="scan'208";a="123086679" Received: from sgruszka-mobl.ger.corp.intel.com (HELO localhost) ([10.245.81.118]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2025 05:10:52 -0700 From: Stanislaw Gruszka To: linux-media@vger.kernel.org Cc: Sakari Ailus , Bingbu Cao Subject: [PATCH v2 1/5] media: intel/ipu6: Add missing new line character in error message Date: Wed, 19 Mar 2025 13:10:40 +0100 Message-Id: <20250319121044.113705-2-stanislaw.gruszka@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250319121044.113705-1-stanislaw.gruszka@linux.intel.com> References: <20250319121044.113705-1-stanislaw.gruszka@linux.intel.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 End error message with new line. Signed-off-by: Stanislaw Gruszka --- drivers/media/pci/intel/ipu6/ipu6-isys-queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c index 72f5f987ef48..9a19695abbaf 100644 --- a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c +++ b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c @@ -797,7 +797,7 @@ void ipu6_isys_queue_buf_ready(struct ipu6_isys_stream *stream, return; } - dev_err(dev, "Failed to find a matching video buffer"); + dev_err(dev, "Failed to find a matching video buffer\n"); spin_unlock_irqrestore(&aq->lock, flags); } From patchwork Wed Mar 19 12:10:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislaw Gruszka X-Patchwork-Id: 14022533 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44B25255E32 for ; Wed, 19 Mar 2025 12:10:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742386258; cv=none; b=WMpdfMkh03qRHUerEjvW1mXHjJoOkrAkexGdsUxre0f1X24UNUGgzdCefz7CW0923NTjfiOZe1AKArkPURgdmEF031ckHdDE/aWpr0kEWhArFaYpEctpM88Rh+lpasY+q6LqpR6mCjNoQskdQXHbS7aKM1vshmvQC6LwiuVcjyQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742386258; c=relaxed/simple; bh=G7NQhlYi/kHEIZJ6KFDfFjuxatvH7Nf5cpE1EqfT6Ls=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YAAmu4c3A8By5/wMzaQBbpowRicgaay3ioETwNRY7B1Ml3eYsfCI5E2CDzEpt+QezPSMJwc8PKWQ3W0LQhFAj4ktJxVoOskb02+QpM3+dDUl5HINocVexgd/3O/WbUuC4YqZqfS5zD7BcyMd8f/dqDP3YCtxkqv0LTmAUZv7EdM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=IvfN9EX8; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="IvfN9EX8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1742386256; x=1773922256; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=G7NQhlYi/kHEIZJ6KFDfFjuxatvH7Nf5cpE1EqfT6Ls=; b=IvfN9EX8d45Z9duUsEO+3w6lrKWYsTUMuq0NBMRrHYb18qfSeyQR68VZ R5pn/LxqPWAwftgf0bhz2gqiwidvZPjcFhO/5G+T6zvkp1K8V4/ElI08e 5uXI9wHhLWuDjhm2AMupy2tyQYloDGmMduC+Sr1t7eg8ZVb69loYiewsH sCmXY7GVVIR8SwTu2LUd3b11SoMBCYTojMLFhdw3qOL+eXg3Ls97L473y uxSojA0hUoAyUAloyLlJtgQp92BiMuq6Oov89R6ucDweJ5gUnu/bpEOvg ejSkKxiQ6E4tYNaq31BaDIt7JsnWzLcSW9Y6imWkE1DntNgcjmMSHdzeK Q==; X-CSE-ConnectionGUID: aWjlMMdHRU6GbxITF4DLDw== X-CSE-MsgGUID: CXCIpzkrRZuvjUzTf7u5fQ== X-IronPort-AV: E=McAfee;i="6700,10204,11377"; a="53785889" X-IronPort-AV: E=Sophos;i="6.14,259,1736841600"; d="scan'208";a="53785889" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2025 05:10:56 -0700 X-CSE-ConnectionGUID: 7ROpEWQST9m841GK9uKvlQ== X-CSE-MsgGUID: 2WhphlRpRSiCW88t4TbioQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.14,259,1736841600"; d="scan'208";a="123086699" Received: from sgruszka-mobl.ger.corp.intel.com (HELO localhost) ([10.245.81.118]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2025 05:10:55 -0700 From: Stanislaw Gruszka To: linux-media@vger.kernel.org Cc: Sakari Ailus , Bingbu Cao Subject: [PATCH v2 2/5] media: intel/ipu6: Make two functions static Date: Wed, 19 Mar 2025 13:10:41 +0100 Message-Id: <20250319121044.113705-3-stanislaw.gruszka@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250319121044.113705-1-stanislaw.gruszka@linux.intel.com> References: <20250319121044.113705-1-stanislaw.gruszka@linux.intel.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Make function used only in one file static and remove from header file. Signed-off-by: Stanislaw Gruszka --- drivers/media/pci/intel/ipu6/ipu6-isys-queue.c | 7 ++++--- drivers/media/pci/intel/ipu6/ipu6-isys-queue.h | 4 ---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c index 9a19695abbaf..3984b9d43919 100644 --- a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c +++ b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c @@ -697,8 +697,9 @@ static u64 get_sof_ns_delta(struct ipu6_isys_video *av, return ipu6_buttress_tsc_ticks_to_ns(delta, isp); } -void ipu6_isys_buf_calc_sequence_time(struct ipu6_isys_buffer *ib, - struct ipu6_fw_isys_resp_info_abi *info) +static void +ipu6_isys_buf_calc_sequence_time(struct ipu6_isys_buffer *ib, + struct ipu6_fw_isys_resp_info_abi *info) { struct vb2_buffer *vb = ipu6_isys_buffer_to_vb2_buffer(ib); struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); @@ -721,7 +722,7 @@ void ipu6_isys_buf_calc_sequence_time(struct ipu6_isys_buffer *ib, vbuf->vb2_buf.timestamp); } -void ipu6_isys_queue_buf_done(struct ipu6_isys_buffer *ib) +static void ipu6_isys_queue_buf_done(struct ipu6_isys_buffer *ib) { struct vb2_buffer *vb = ipu6_isys_buffer_to_vb2_buffer(ib); diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.h b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.h index fe8fc796a58f..1a277b0fb4b5 100644 --- a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.h +++ b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.h @@ -69,10 +69,6 @@ void ipu6_isys_buf_to_fw_frame_buf(struct ipu6_fw_isys_frame_buff_set_abi *set, struct ipu6_isys_stream *stream, struct ipu6_isys_buffer_list *bl); -void -ipu6_isys_buf_calc_sequence_time(struct ipu6_isys_buffer *ib, - struct ipu6_fw_isys_resp_info_abi *info); -void ipu6_isys_queue_buf_done(struct ipu6_isys_buffer *ib); void ipu6_isys_queue_buf_ready(struct ipu6_isys_stream *stream, struct ipu6_fw_isys_resp_info_abi *info); int ipu6_isys_queue_init(struct ipu6_isys_queue *aq); From patchwork Wed Mar 19 12:10:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislaw Gruszka X-Patchwork-Id: 14022534 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3473B255241 for ; Wed, 19 Mar 2025 12:11:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742386261; cv=none; b=RmsK3A28s/ZgQ72uqBxoMogDVon1vCrXvg9/LnwTGomku5M3DU+ZmVV5+bMRFPLl1StiyCFr3ORxEVT2yw77gWCxaGqDXL05zbefMo1ZhNMk3c3XCo83ne9d9K7Rz5jo42oYm1taN2BQo0kwC6d/k5uCzlL3meVTpNct3gdkLyA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742386261; c=relaxed/simple; bh=RZ5b/AXSyS1/UHSTuZZXOdXuinogRB+HyfTLhilwR/I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=bSjLl+Wo0F/jLLAlXbxD9+vdjOXSKfz1ha1Nr5LBDe+sRALe2unJZe9PqaFvXmgnCeLBPgtRUp+5Qt6JH1/NzWxmjqf2rj6jLeQqrfSaEHV8y6+lkxdKrsNrH1yPqpaovDKKizSQVXvKC5XyXXPRnrteFQwseIldOJC+lNwChDs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=QWAoW+gA; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QWAoW+gA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1742386260; x=1773922260; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RZ5b/AXSyS1/UHSTuZZXOdXuinogRB+HyfTLhilwR/I=; b=QWAoW+gAemT8jwfRUa48Peuht+jgt4hVGnOk6y9EM3P7czth2JGws7aw dR0ijNM0hlbHevyj31m4M0szDGUBXE4k6lI4Y5kQTY9tEPQccbZmfW29Y og/b+GmvI/CepRNUHLlqGqHG7HKE4lGgRo6OiOtL9DMx4GaM7sLBbrXPE wm9aLVlYiE15Y3sL5tzhRFuwlOpfUm+kM3wonWhgazs6bVfSPXk6mAR3v 3u9Ra86WhxZua/BMmQys2dHt8fXkF+9plhuZmo4JVdeimiCs6pUGgihNk sCJURl09GGzK2tiHBpSbFjRky2x3sBjVNhyzYzd7urapbDK7Bu7oNChlX g==; X-CSE-ConnectionGUID: mXzllPk7SgKIf/cy5VCUzg== X-CSE-MsgGUID: 9ASEogG4R5yjpB9lQI85gQ== X-IronPort-AV: E=McAfee;i="6700,10204,11377"; a="53785890" X-IronPort-AV: E=Sophos;i="6.14,259,1736841600"; d="scan'208";a="53785890" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2025 05:11:00 -0700 X-CSE-ConnectionGUID: PnwOnI64RWeYDswSNxdVug== X-CSE-MsgGUID: zau1CFO9TEyRR5YVLic+Bg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.14,259,1736841600"; d="scan'208";a="123086726" Received: from sgruszka-mobl.ger.corp.intel.com (HELO localhost) ([10.245.81.118]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2025 05:10:59 -0700 From: Stanislaw Gruszka To: linux-media@vger.kernel.org Cc: Sakari Ailus , Bingbu Cao Subject: [PATCH v2 3/5] media: intel/ipu6: Use timestamp value directly Date: Wed, 19 Mar 2025 13:10:42 +0100 Message-Id: <20250319121044.113705-4-stanislaw.gruszka@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250319121044.113705-1-stanislaw.gruszka@linux.intel.com> References: <20250319121044.113705-1-stanislaw.gruszka@linux.intel.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Remove pointer for fw abi structure when setting frame sequence and time, use timestamp value from the structure directly. Signed-off-by: Stanislaw Gruszka --- .../media/pci/intel/ipu6/ipu6-isys-queue.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c index 3984b9d43919..c68dc577daf0 100644 --- a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c +++ b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c @@ -652,10 +652,8 @@ static void stop_streaming(struct vb2_queue *q) } static unsigned int -get_sof_sequence_by_timestamp(struct ipu6_isys_stream *stream, - struct ipu6_fw_isys_resp_info_abi *info) +get_sof_sequence_by_timestamp(struct ipu6_isys_stream *stream, u64 time) { - u64 time = (u64)info->timestamp[1] << 32 | info->timestamp[0]; struct ipu6_isys *isys = stream->isys; struct device *dev = &isys->adev->auxdev.dev; unsigned int i; @@ -681,8 +679,7 @@ get_sof_sequence_by_timestamp(struct ipu6_isys_stream *stream, return 0; } -static u64 get_sof_ns_delta(struct ipu6_isys_video *av, - struct ipu6_fw_isys_resp_info_abi *info) +static u64 get_sof_ns_delta(struct ipu6_isys_video *av, u64 timestamp) { struct ipu6_bus_device *adev = av->isys->adev; struct ipu6_device *isp = adev->isp; @@ -692,14 +689,13 @@ static u64 get_sof_ns_delta(struct ipu6_isys_video *av, if (!tsc_now) return 0; - delta = tsc_now - ((u64)info->timestamp[1] << 32 | info->timestamp[0]); + delta = tsc_now - timestamp; return ipu6_buttress_tsc_ticks_to_ns(delta, isp); } static void -ipu6_isys_buf_calc_sequence_time(struct ipu6_isys_buffer *ib, - struct ipu6_fw_isys_resp_info_abi *info) +ipu6_isys_buf_calc_sequence_time(struct ipu6_isys_buffer *ib, u64 time) { struct vb2_buffer *vb = ipu6_isys_buffer_to_vb2_buffer(ib); struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); @@ -710,8 +706,8 @@ ipu6_isys_buf_calc_sequence_time(struct ipu6_isys_buffer *ib, u64 ns; u32 sequence; - ns = ktime_get_ns() - get_sof_ns_delta(av, info); - sequence = get_sof_sequence_by_timestamp(stream, info); + ns = ktime_get_ns() - get_sof_ns_delta(av, time); + sequence = get_sof_sequence_by_timestamp(stream, time); vbuf->vb2_buf.timestamp = ns; vbuf->sequence = sequence; @@ -749,6 +745,7 @@ void ipu6_isys_queue_buf_ready(struct ipu6_isys_stream *stream, unsigned long flags; bool first = true; struct vb2_v4l2_buffer *buf; + u64 time = (u64)info->timestamp[1] << 32 | info->timestamp[0]; spin_lock_irqsave(&aq->lock, flags); if (list_empty(&aq->active)) { @@ -791,7 +788,7 @@ void ipu6_isys_queue_buf_ready(struct ipu6_isys_stream *stream, list_del(&ib->head); spin_unlock_irqrestore(&aq->lock, flags); - ipu6_isys_buf_calc_sequence_time(ib, info); + ipu6_isys_buf_calc_sequence_time(ib, time); ipu6_isys_queue_buf_done(ib); From patchwork Wed Mar 19 12:10:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislaw Gruszka X-Patchwork-Id: 14022535 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF62A255E3C for ; Wed, 19 Mar 2025 12:11:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742386266; cv=none; b=n/FZKi30/kG6oUpSqazQH6/dWb0ILIP4okEAnBZ514xfoRnve6CSfmWSRulp73+ayVMwMsxcFqZcETkMsPYgduk6H+WAQN8vYV1/KSpmXy7QRXnq6gGhNoo8gYNUDyMm9Koqwg6sbW15D6YUKaQAXXLRosuAqr0rAN5233ZDGTU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742386266; c=relaxed/simple; bh=fUZM8Qx+E9sFwFA8sRDU+MoPUK99weHi3tgGUE2s1Ig=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=a0HGn3l8ljgdVscxDpIqU8gQtI/PTaMrh7172YIk4DxxhYvJ9ksRfhQnR/Hal972r5ZKbsiJ5wqFggt9jgD9G1h4UiyFv325N5CUTIvy60WjglWV23fVzUDtX6LLcvUYnYJw8/twhHnuV2LqAGO+QkQRp1r+tQc+VW3qUPEeLDA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=K0htUgPk; arc=none smtp.client-ip=192.198.163.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="K0htUgPk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1742386265; x=1773922265; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fUZM8Qx+E9sFwFA8sRDU+MoPUK99weHi3tgGUE2s1Ig=; b=K0htUgPkHTOX7eqQ1ty2KNFksht5PldF/q6T/lruabrS9SJNMYnuRj92 6bd/9XTw95ehEg6uxNdPx2LKVruxceQTjSqc/jerNsmMD4FuSs4CLfCRq ea48+m9GRa6algWKz4oiIabKWkB+S/vxIDqQjP2RYtQ2gUyVrpHBKu1A7 WhCTNlNxI+4e6t42MVG4tCn/+2mc4c1uW/ktSFbqEtcA14frw1to3YUfT wgJjMJaOsHkaG/lj7KJhvVz/rZ3EuQqdkVLU3BCg83sDwvUzhU4FudW4N IHM75SoTgZo6KvYAVyEcAsFPSRPcpaF10QoVAdyBWf7yOA2pYuXTvk1a+ w==; X-CSE-ConnectionGUID: ES1KMtRUQj+fPhNdqmkfHQ== X-CSE-MsgGUID: uSqSYC94TQK3TkJe8RRJ9g== X-IronPort-AV: E=McAfee;i="6700,10204,11377"; a="61100276" X-IronPort-AV: E=Sophos;i="6.14,259,1736841600"; d="scan'208";a="61100276" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2025 05:11:04 -0700 X-CSE-ConnectionGUID: EAZ2sDyPRNS7KdGCfbnGNw== X-CSE-MsgGUID: ZUxqcLyHTta/Ae5ulYRcDQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.14,259,1736841600"; d="scan'208";a="122598967" Received: from sgruszka-mobl.ger.corp.intel.com (HELO localhost) ([10.245.81.118]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2025 05:11:03 -0700 From: Stanislaw Gruszka To: linux-media@vger.kernel.org Cc: Sakari Ailus , Bingbu Cao Subject: [PATCH v2 4/5] media: intel/ipu6: Abstract buf ready function Date: Wed, 19 Mar 2025 13:10:43 +0100 Message-Id: <20250319121044.113705-5-stanislaw.gruszka@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250319121044.113705-1-stanislaw.gruszka@linux.intel.com> References: <20250319121044.113705-1-stanislaw.gruszka@linux.intel.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Extract values needed by ipu6_queue_buf_ready() function from fw abi structure. This will allow to reuse same buf ready code when fw abi change. Signed-off-by: Stanislaw Gruszka --- .../media/pci/intel/ipu6/ipu6-isys-queue.c | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c index c68dc577daf0..55d45d2d8768 100644 --- a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c +++ b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c @@ -734,10 +734,11 @@ static void ipu6_isys_queue_buf_done(struct ipu6_isys_buffer *ib) } } -void ipu6_isys_queue_buf_ready(struct ipu6_isys_stream *stream, - struct ipu6_fw_isys_resp_info_abi *info) +static void +ipu6_stream_buf_ready(struct ipu6_isys_stream *stream, u8 pin_id, u32 pin_addr, + u64 time, bool error_check) { - struct ipu6_isys_queue *aq = stream->output_pins[info->pin_id].aq; + struct ipu6_isys_queue *aq = stream->output_pins[pin_id].aq; struct ipu6_isys *isys = stream->isys; struct device *dev = &isys->adev->auxdev.dev; struct ipu6_isys_buffer *ib; @@ -745,7 +746,6 @@ void ipu6_isys_queue_buf_ready(struct ipu6_isys_stream *stream, unsigned long flags; bool first = true; struct vb2_v4l2_buffer *buf; - u64 time = (u64)info->timestamp[1] << 32 | info->timestamp[0]; spin_lock_irqsave(&aq->lock, flags); if (list_empty(&aq->active)) { @@ -764,7 +764,7 @@ void ipu6_isys_queue_buf_ready(struct ipu6_isys_stream *stream, ivb = vb2_buffer_to_ipu6_isys_video_buffer(vvb); addr = ivb->dma_addr; - if (info->pin.addr != addr) { + if (pin_addr != addr) { if (first) dev_err(dev, "Unexpected buffer address %pad\n", &addr); @@ -772,8 +772,7 @@ void ipu6_isys_queue_buf_ready(struct ipu6_isys_stream *stream, continue; } - if (info->error_info.error == - IPU6_FW_ISYS_ERROR_HW_REPORTED_STR2MMIO) { + if (error_check) { /* * Check for error message: * 'IPU6_FW_ISYS_ERROR_HW_REPORTED_STR2MMIO' @@ -800,6 +799,15 @@ void ipu6_isys_queue_buf_ready(struct ipu6_isys_stream *stream, spin_unlock_irqrestore(&aq->lock, flags); } +void ipu6_isys_queue_buf_ready(struct ipu6_isys_stream *stream, + struct ipu6_fw_isys_resp_info_abi *info) +{ + u64 time = (u64)info->timestamp[1] << 32 | info->timestamp[0]; + bool err = info->error_info.error == IPU6_FW_ISYS_ERROR_HW_REPORTED_STR2MMIO; + + ipu6_stream_buf_ready(stream, info->pin_id, info->pin.addr, time, err); +} + static const struct vb2_ops ipu6_isys_queue_ops = { .queue_setup = ipu6_isys_queue_setup, .buf_init = ipu6_isys_buf_init, From patchwork Wed Mar 19 12:10:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislaw Gruszka X-Patchwork-Id: 14022536 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E0EA7254AEF for ; Wed, 19 Mar 2025 12:11:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742386269; cv=none; b=ry+kps5jMhT7MlnMEC9pSd94iZhUFzif2DRFZSyTD3sxJQWgUloPscLfPLTRbLTSw2OC3OZPPygkf37AUzpQeHX7AiU7HhFmM6K3SyOD5jpX6Y0oPvwTehiExHOTksYW0krrc11rAbpe9m0pIHs9O4Xn26RtW5BtKwzYJI0SjS4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742386269; c=relaxed/simple; bh=Hf6EDwWa5P8EU7y22uz2o+RNtpuBXNtLi04CeKOcOHU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=A5crY+5GOWJpK9+xBT4uWxq+yLEeQyVEueq7b62jlN3m5J0Y0F0jjNruu7B1p++4NO75yjnqWqGlqMtQbp+TR347Xt7KppBGoVbbzhZS1NYcbGUTyVNDtqkwxFuSqm3RnTyG353Wi1DiqvB1WpZ/XbSPwFP1Nx886srUPNhagE8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=OcmKm5nT; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="OcmKm5nT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1742386268; x=1773922268; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Hf6EDwWa5P8EU7y22uz2o+RNtpuBXNtLi04CeKOcOHU=; b=OcmKm5nTErChMAZgk5FsIaSmiF3Bafe/NW4ySCtyw8RMOgXg2LCECJ69 T4tZ0D8RSXS5TxSdXNvMsx2wTLz6Q25xhr2yk72cn8efPF1bzAjwqpC5d vNZ3rzyjzddY3C9A+A5hDnUXFUh3Fqz1I9/XjshiDMJb/2xUMqaTyhjXG mrKPBKzEsHZq62gcfjRdJ9w8/c4pyBcmOX68kLMP8bRnbsoI+1ZBinAC7 8zHluiLn34p3lE8klm9L/zbesemSQfML146/rWpg4WKGAU/X6TYfbdJNd W81KgesQiawmaO7JCbPdYw8Ih7KFuAPI7VdGeT+jLCl5biN7tNEprxMTh w==; X-CSE-ConnectionGUID: 8JKn7tAQRAimyJMbM1DsHg== X-CSE-MsgGUID: PgfbUncgSma7z5ymVYCNLQ== X-IronPort-AV: E=McAfee;i="6700,10204,11377"; a="53785897" X-IronPort-AV: E=Sophos;i="6.14,259,1736841600"; d="scan'208";a="53785897" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2025 05:11:08 -0700 X-CSE-ConnectionGUID: DnEG+5dNTuqdruwBvFijRA== X-CSE-MsgGUID: FV7zuIekTOu0aoLjdxcBdg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.14,259,1736841600"; d="scan'208";a="123086752" Received: from sgruszka-mobl.ger.corp.intel.com (HELO localhost) ([10.245.81.118]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2025 05:11:07 -0700 From: Stanislaw Gruszka To: linux-media@vger.kernel.org Cc: Sakari Ailus , Bingbu Cao Subject: [PATCH v2 5/5] media: intel/ipu6: Remove unused dev field from ipu6_isys_queue Date: Wed, 19 Mar 2025 13:10:44 +0100 Message-Id: <20250319121044.113705-6-stanislaw.gruszka@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250319121044.113705-1-stanislaw.gruszka@linux.intel.com> References: <20250319121044.113705-1-stanislaw.gruszka@linux.intel.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 With current code base dev is only written but never read. Remove it as redundant. Signed-off-by: Stanislaw Gruszka --- drivers/media/pci/intel/ipu6/ipu6-isys-queue.c | 1 - drivers/media/pci/intel/ipu6/ipu6-isys-queue.h | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c index 55d45d2d8768..a9127b1c4d45 100644 --- a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c +++ b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.c @@ -841,7 +841,6 @@ int ipu6_isys_queue_init(struct ipu6_isys_queue *aq) if (ret) return ret; - aq->dev = &adev->auxdev.dev; aq->vbq.dev = &adev->isp->pdev->dev; spin_lock_init(&aq->lock); INIT_LIST_HEAD(&aq->active); diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.h b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.h index 1a277b0fb4b5..b865428a0fce 100644 --- a/drivers/media/pci/intel/ipu6/ipu6-isys-queue.h +++ b/drivers/media/pci/intel/ipu6/ipu6-isys-queue.h @@ -20,7 +20,6 @@ struct ipu6_isys_stream; struct ipu6_isys_queue { struct vb2_queue vbq; struct list_head node; - struct device *dev; /* * @lock: serialise access to queued and pre_streamon_queued */