From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7205C433EF for ; Fri, 18 Mar 2022 14:04:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236965AbiCROFd (ORCPT ); Fri, 18 Mar 2022 10:05:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233096AbiCROFc (ORCPT ); Fri, 18 Mar 2022 10:05:32 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF03B2B78C6; Fri, 18 Mar 2022 07:04:11 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: kholk11) with ESMTPSA id 9196A1F46079 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1647612250; bh=YOVEdyrfGs6YY8KU6+URoAWfguVsIhXu0otlSBy1Fos=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=kizndKYJmfyPLeA2ieV3Q4kGKXJU2rh4JGfZq6SjPorWANlBeVNlaeLBiWUn93v1P H/MDKh29H0lBtD4YBJjCB0lInZmsLH72ZIwUjSaiXLW2QNmjkXxG6nW4Tppa6YmgYe y7LgQegeL9LkyM+zSTyCsPn/r/vrIkc8nnIdIkoDpT6ky5GtRJK8q83DQLtORJkDst BglkyRU9LgthB+9tV7x1+XqqnEJcmjzVFfqIx8lEARq+VgRXvqbDYzTOfr7lGo7f0O rbwUkydtWo3Ke80nNPnrohlJ1ylLQbzU29DhWmgWYmP1NHTAHIHUy9nEX70gPMqbl0 exAXJ7m5Ol42g== Message-ID: Date: Fri, 18 Mar 2022 15:04:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH v3, 00/10] Enable two H264 encoder core on MT8195 Content-Language: en-US To: Irui Wang , Hans Verkuil , Tzung-Bi Shih , Rob Herring , Alexandre Courbot , Mauro Carvalho Chehab , Matthias Brugger , Tomasz Figa , Yong Wu , Tiffany Lin , Andrew-CT Chen Cc: Hsin-Yi Wang , Maoguang Meng , Longfei Wang , Yunfei Dong , Fritz Koenig , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, srv_heupstream@mediatek.com, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com References: <20220317082230.23622-1-irui.wang@mediatek.com> From: AngeloGioacchino Del Regno In-Reply-To: <20220317082230.23622-1-irui.wang@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Il 17/03/22 09:22, Irui Wang ha scritto: > MT8195 has two H264 encoder cores, they have their own power-domains, > clocks, interrupts, register base. The two H264 encoder cores can work > together to achieve higher performance, it's a core mode called > frame-racing, one core has 4K@30fps performance, two cores can achieve > 4K@60fps. > The two encoder core encoding process looks like this: > > VENC Core0: frm#0....frm#2....frm#4.... > VENC Core1: ..frm#1....frm#3....frm#5.... > > This series of patches are used to enable the two H264 encoder cores, > encoding process will be changed: > As-Is: Synchronous > V4L2_VIDIOC_QBUF#0 --> device_run(triger encoder) --> wait encoder IRQ --> > encoding done with result --> job_finish > V4l2_VIDIOC_QBUF#1 --> device_run(triger encoder) --> wait encoder IRQ --> > encoding done with result --> job_finish > ... > > To-Be: Asynchronous > V4L2_VIDIOC_QBUF#0 --> device_run(triger encoder) --> job_finish > ..V4l2_VIDIOC_QBUF#1 --> device_run(triger encoder) --> job_finish > (venc core0 may encode done here, done the encoding result to client) > V4L2_VIDIOC_QBUF#2 --> device_run(triger encoder) --> job_finish. > > There is no "wait encoder IRQ" synchronous call during frame-racing mode > encoding process, it can full use the two encoder cores to achieve higher > performance. > Hello Irui, like v1 and v2, also this version of the series will crash the kernel when trying to encode. Before pushing the next series, you shall ensure that it is not crashing the entire kernel, hence, please test your code with gstreamer. Please use the following pipeline to test: gst-launch-1.0 videotestsrc num-buffers=100 ! v4l2h264enc ! queue ! h264parse ! qtmux ! filesink location=test.mov Regards, Angelo