Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5821306rwl; Wed, 22 Mar 2023 02:51:10 -0700 (PDT) X-Google-Smtp-Source: AK7set/+bQXNH8WiI0b5E9uJ2q8pi3jOeCH7BTPAnYiD0e4UntImio0Uyl4bB/D26KHXnZ/cPzRn X-Received: by 2002:a17:907:a042:b0:92f:2c64:9d43 with SMTP id gz2-20020a170907a04200b0092f2c649d43mr6291269ejc.68.1679478670478; Wed, 22 Mar 2023 02:51:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679478670; cv=none; d=google.com; s=arc-20160816; b=h5xEdlJIPotGg7SzPdiEy1PTD9XXewIXjmd4qVNuoV09dSnpQwRURcEYLzXIlOC4f3 1QWW5X+197v+7xLwXKuTJIIRwAjuC0W9SWTGxzask7xLSoz/I38QP+n/jf392YlpVifb +OMj7aT4V3ZFVWp9jFjiTgmMXlOI+T9Tt0AyuJXzg4c9Q/9EOz+yh7tw3INDWbo885T8 GHpTqATGjO2xIOjgGNmFOwzqG8ckHfrLS2AFpxjYt4Jg3kvLXTskj0wjkqr6wPaEnzRz XbeQYyec9rSMuG2woHFXYQx/8kL5+Ckp5U9EcsoEcx6daVPEZLep8hP9QJ5dq6dCLJl3 U4cg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=akEC/GZ73xx89vSNdUnfCjR2mWzHXFKUONd0W+l4ZME=; b=0jA20txgexQEclcst4Z5eyxxzWbuV45YLscq2vyrayHRdbMtdKaJNYFqUJ+oFJz9cO MsZFD4Pqgpgk4PcSeFprMKtz6tgHMaono7kxMvD038wJ+yP3Yg2PcMxInWZK1NB0XsDw kOkLPV58V0iOk9KQV4RUHI498+3ve/auLs3s5i5/D+nZc32jRX//4WbTT5IeawAZ4KfV 4XvMMgkSCQlAUjRWTAkypPjoJ8sR+NdKM3WIUDxCHpS7WFqpmLOLTHnf5pXntg7bt6W5 fidOY+jQCrC3s9yx6HELIt4hvpccZCSzHyX5bRhxq1EqT6dPqouiWXwl2g0Oo8xn7SdU KZpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=gXmfC4jZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v8-20020a1709063bc800b00933312aeb76si12341065ejf.205.2023.03.22.02.50.46; Wed, 22 Mar 2023 02:51:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=gXmfC4jZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231167AbjCVJqe (ORCPT + 99 others); Wed, 22 Mar 2023 05:46:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230408AbjCVJqa (ORCPT ); Wed, 22 Mar 2023 05:46:30 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A73B15DC96; Wed, 22 Mar 2023 02:46:27 -0700 (PDT) X-UUID: 66e7b2f6c89611edb6b9f13eb10bd0fe-20230322 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=akEC/GZ73xx89vSNdUnfCjR2mWzHXFKUONd0W+l4ZME=; b=gXmfC4jZSk2qNK666eY1qIeMKtOT5U66kzsPwVTTB1uaBcVbARyayb2tjP6jtxxBVmxKIkCp8Z8D6QCZU8pJJXm2fdRqIQIdOM4+Qccdw0N43ghtJC1Ue4gcynQdjEfjRCIdGuTtMmjaWXD/q7q+rnD9RUFLorYpcrSyV7h3drw=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.22,REQID:ce7fd9a2-6c27-4056-b835-2d26b7d43ef8,IP:0,U RL:0,TC:0,Content:-25,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:-25 X-CID-META: VersionHash:120426c,CLOUDID:5b812429-564d-42d9-9875-7c868ee415ec,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-UUID: 66e7b2f6c89611edb6b9f13eb10bd0fe-20230322 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 383714623; Wed, 22 Mar 2023 17:46:21 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Wed, 22 Mar 2023 17:46:20 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Wed, 22 Mar 2023 17:46:19 +0800 From: Yunfei Dong To: Yunfei Dong , Chen-Yu Tsai , Nicolas Dufresne , Hans Verkuil , AngeloGioacchino Del Regno , Benjamin Gaignard , =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= CC: Matthias Brugger , Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , Steve Cho , , , , , , Subject: [PATCH v2,0/7] media: mediatek: vcodec: Add debugfs file for decode and encode Date: Wed, 22 Mar 2023 17:46:10 +0800 Message-ID: <20230322094617.19410-1-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Need to change kernel driver to open decode and encode debug log at current period, it's very unreasonable. Adding debugfs common interface to support decode and encode, using echo command to control debug log level and getting useful information for each instance. patch 1 add dbgfs common interface. patch 2~5 support decode. patch 6~7 support encode --- changed with v1: - add new patch 4 and 5. - using cmd 'cat vdec' to show debug information instead of pr_info directly. --- Yunfei Dong (7): media: mediatek: vcodec: Add debugfs interface to get debug information media: mediatek: vcodec: Add debug params to control different log level media: mediatek: vcodec: Add a debugfs file to get different useful information media: mediatek: vcodec: Get each context resolution information media: mediatek: vcodec: Get get each instance format type media: mediatek: vcodec: Change dbgfs interface to support encode media: mediatek: vcodec: Add encode to support dbgfs .../media/platform/mediatek/vcodec/Makefile | 6 + .../mediatek/vcodec/mtk_vcodec_dbgfs.c | 196 ++++++++++++++++++ .../mediatek/vcodec/mtk_vcodec_dbgfs.h | 73 +++++++ .../mediatek/vcodec/mtk_vcodec_dec_drv.c | 4 + .../platform/mediatek/vcodec/mtk_vcodec_drv.h | 4 + .../mediatek/vcodec/mtk_vcodec_enc_drv.c | 2 + .../mediatek/vcodec/mtk_vcodec_util.c | 8 + .../mediatek/vcodec/mtk_vcodec_util.h | 25 ++- 8 files changed, 315 insertions(+), 3 deletions(-) create mode 100644 drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c create mode 100644 drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.h -- 2.18.0