Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp783123rda; Sun, 22 Oct 2023 09:28:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGYAHieT4sejkgrrkr4bANw1RUKcnRUlEU4bBxMtVlDdJiXT7wtDg6m9PCQPHDIAI4GBKqt X-Received: by 2002:a05:6a20:c508:b0:169:cd02:65e9 with SMTP id gm8-20020a056a20c50800b00169cd0265e9mr6854089pzb.33.1697992100347; Sun, 22 Oct 2023 09:28:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697992100; cv=none; d=google.com; s=arc-20160816; b=l3qQFhq/OCybfZkdn42arUlfkfn06rtLkQiYLKUy57uzlSW4aGs8AUOXqWsCjAECbF lvQSf4rS7P+bn8yQoHFtQF8dp/Q0Unoclzj6YdK/koa+2j8wQGn7Y8irb6KPoDagfMNA 7sOF4MDlxnfKqKG+zyzLm2nJR07FzN5gkrH1bFJ8uVmajboGNXIzZOkXPSu5TWEWGI5F TTT/PcP4Tmoca5XD3SYuB5tDVF66UAVjxIsX0vjdLvhh6UqGr/vNKsuies4QIm2Mt9Ih gEUGOqV+yPzl1GS1pRNvR/bwYC+aHwQTlOUUsoBsJI3DO2B9knw73GkcaKBVjQvgeJnh BjMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=INIIQaK5X3fnI0W54Dh7daNnY2U6zqvjTPzA48XdS3U=; fh=ghN8AIZOwAnIZNUDgROAtirKqUUyJs+SWhiDMjmlnVI=; b=qSMyfQocfdF52vAgrCeoEwz3Hj5wPx4fGbOdYv/p4xQsnL6B5wz0tNn83UW/5yY60L P2MfP1fzzz06VHDytpb1QbGHG1AUZEToLPI/uBGB0mctyXLLsn1BiFfOAGaygLKsgSyF LyUAvbEhl7JWahwPnPh3hvu5YvicwZzF7DbegxXs3Bl6kMJZajj8nAWS4laJHYAg5mZP DYVwA3bZlYyfWbb/UTsahJuVbqRO4obNv5h9+lONpvnGoNFRt5cChyEfWkh6Gv+VtTAz iZJbAQoOwu+fXHmAjulW/DIqK1Q3N7gcHiOR6MSQkDJyaAYoY64R42X4DurDmC+0CvX5 BU8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=k3rhCkHS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id p24-20020a63e658000000b00578dfc8f11asi4899402pgj.792.2023.10.22.09.28.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 09:28:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=k3rhCkHS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id A91378074514; Sun, 22 Oct 2023 09:28:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232114AbjJVQ2F (ORCPT + 99 others); Sun, 22 Oct 2023 12:28:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbjJVQ2E (ORCPT ); Sun, 22 Oct 2023 12:28:04 -0400 Received: from smtp.smtpout.orange.fr (smtp-14.smtpout.orange.fr [80.12.242.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA45BFB for ; Sun, 22 Oct 2023 09:28:01 -0700 (PDT) Received: from [192.168.1.18] ([86.243.2.178]) by smtp.orange.fr with ESMTPA id ubIvqzpaN1gtMubIvqacuc; Sun, 22 Oct 2023 18:27:59 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1697992079; bh=INIIQaK5X3fnI0W54Dh7daNnY2U6zqvjTPzA48XdS3U=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=k3rhCkHSS4P2p8LFRggKoz/tyuAJkojsl/19c2MH44v/hcbQtSK4umtesyAzbrIhy PHTKJKv18seaEU11ZZecTK+RFeWXK3me6n1qDFyBUUy4qXHpEQXw1ryoFvxItmfYFj orJDoKTHU0t/8s6c7N0Ek/3sAv8xiP8pXPmhN/XeMYSvTwMHGULAYNO4vvKGTX4800 2mD3K7Tv+golLqpnDaeAAiU5yg6NvmsFCKF+0KXdR2AkvOMaYN6lczwIPDEsEEtRGV 74bsZJoRGXr+zHeRPxDv7r80B54FGZSaSbXUipvIth5tiRfK0FCj6Cn0/CPl1Oxmpk oxLw0/8Z7XRJg== X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 22 Oct 2023 18:27:59 +0200 X-ME-IP: 86.243.2.178 Message-ID: Date: Sun, 22 Oct 2023 18:27:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v13 4/8] media: chips-media: wave5: Add vpuapi layer Content-Language: fr To: Sebastian Fricke , Krzysztof Kozlowski , NXP Linux Team , Conor Dooley , Mauro Carvalho Chehab , Jackson Lee , Hans Verkuil , Sascha Hauer , Rob Herring , Pengutronix Kernel Team , Shawn Guo , Philipp Zabel , Nas Chung , Fabio Estevam Cc: linux-media@vger.kernel.org, Tomasz Figa , linux-kernel@vger.kernel.org, Nicolas Dufresne , kernel@collabora.com, Robert Beckett , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Darren Etheridge References: <20230929-wave5_v13_media_master-v13-0-5ac60ccbf2ce@collabora.com> <20230929-wave5_v13_media_master-v13-4-5ac60ccbf2ce@collabora.com> From: Christophe JAILLET In-Reply-To: <20230929-wave5_v13_media_master-v13-4-5ac60ccbf2ce@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sun, 22 Oct 2023 09:28:17 -0700 (PDT) Le 12/10/2023 à 13:01, Sebastian Fricke a écrit : > From: Nas Chung > > Add the vpuapi layer of the wave5 codec driver. > This layer is used to configure the hardware according > to the parameters. > > Signed-off-by: Sebastian Fricke > Signed-off-by: Nicolas Dufresne > Signed-off-by: Dafna Hirschfeld > Signed-off-by: Robert Beckett > Signed-off-by: Nas Chung > --- ... > +int wave5_vpu_dec_clr_disp_flag(struct vpu_instance *inst, int index) > +{ > + struct dec_info *p_dec_info = &inst->codec_info->dec_info; > + int ret = 0; Nit: No need to init. > + struct vpu_device *vpu_dev = inst->dev; > + > + if (index >= p_dec_info->num_of_display_fbs) > + return -EINVAL; > + > + ret = mutex_lock_interruptible(&vpu_dev->hw_lock); > + if (ret) > + return ret; > + ret = wave5_dec_clr_disp_flag(inst, index); > + mutex_unlock(&vpu_dev->hw_lock); > + > + return ret; > +} ... > +int wave5_vpu_dec_give_command(struct vpu_instance *inst, enum codec_command cmd, void *parameter) > +{ > + struct dec_info *p_dec_info = &inst->codec_info->dec_info; > + int ret = 0; > + > + switch (cmd) { > + case DEC_GET_QUEUE_STATUS: { > + struct queue_status_info *queue_info = parameter; > + > + queue_info->instance_queue_count = p_dec_info->instance_queue_count; > + queue_info->report_queue_count = p_dec_info->report_queue_count; > + break; > + } > + case DEC_RESET_FRAMEBUF_INFO: { > + int i; > + > + for (i = 0; i < MAX_REG_FRAME; i++) { > + ret = wave5_vpu_dec_reset_framebuffer(inst, i); > + if (ret) > + break; > + } > + > + for (i = 0; i < MAX_REG_FRAME; i++) { > + ret = reset_auxiliary_buffers(inst, i); > + if (ret) > + break; > + } > + > + wave5_vdi_free_dma_memory(inst->dev, &p_dec_info->vb_task); > + break; > + } > + case DEC_GET_SEQ_INFO: { > + struct dec_initial_info *seq_info = parameter; > + > + *seq_info = p_dec_info->initial_info; > + break; > + } > + > + default: > + return -EINVAL; > + } > + > + return 0; return ret; ? CJ > +} ...