Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6625471imu; Wed, 30 Jan 2019 19:14:31 -0800 (PST) X-Google-Smtp-Source: AHgI3IYspZAFZz3r/w8bFKrPCVTPKgLyAtfP+4QOEn5PDuNiOyEzjechPk0KiiezO/G4tvfBDK84 X-Received: by 2002:a62:3a8b:: with SMTP id v11mr2052696pfj.81.1548904471252; Wed, 30 Jan 2019 19:14:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548904471; cv=none; d=google.com; s=arc-20160816; b=WlKGAnEpdkr2766rCDtA6Rl7GwG6S3ntjlpvYfM/OH+i3PlPTVwi7WVOgjjbm0r964 GnGbtbzf5y+mFTr186qeG+Z69jpPWIYFecs8CS5+XAegvuLl+o1aISCJ/FyWjVr9OZNV 0bXx21UAy/OoTh4KNwstSW/RxsXIJELxLdXPlSoenMzHUjehuf+BCDsROgMyLgVWDFPB MSgQ/pxVBmm4q/S7nipRrXVMKJaOOxhORDPhIp1AdVnJVYH4HTh8f2jnFffNyb1k0h31 2L2xU/Orbl9ZDSwQPv0+8lwzzITuSVjdQALyTeJksXDf/pFnD7U65Fub+essTVlI1eBB +3Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=XV4YobU7ttw48NB0jjEtgkvARozZhIivUqJ+XCeaWjE=; b=dopgUiFowdMql5xMJ5ecyFcfaVaPKHXJ2kmcpPXW5a+nP+IwwXNuLmIGetnWui5sMk p/rU+1AYzysDlphR5wKIEn44Vz7utVcPYOIRvMH4zA01T1uO43mr9Fh8J/7tCp/Re3er Rt/qnV6Ev4aJqb80mYG/d0p3Yeh+cigRGwiD6k2+DLhwaF8ETnBmmhBNin+hCIfa4fQs rN2d2vVzydRMzt/LqaVblP0BkaYNiKY5x6TXL/1wZeriZy/5x7Vh/4q9hCIafLsEND0f NluWQgMHQRjlySP+k+JWJ68vPSRSH+Ys+mZbnEI49Anb6EBHoOBD0a1hmBPCpafxhWto lUUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l61si3482660plb.6.2019.01.30.19.14.14; Wed, 30 Jan 2019 19:14:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730787AbfAaDNv (ORCPT + 99 others); Wed, 30 Jan 2019 22:13:51 -0500 Received: from kozue.soulik.info ([108.61.200.231]:36586 "EHLO kozue.soulik.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725535AbfAaDNu (ORCPT ); Wed, 30 Jan 2019 22:13:50 -0500 Received: from misaki.sumomo.pri (unknown [IPv6:2001:470:b30d:2:c604:15ff:0:91f]) by kozue.soulik.info (Postfix) with ESMTPA id D5A0B1018B6; Thu, 31 Jan 2019 12:14:55 +0900 (JST) From: ayaka To: linux-media@vger.kernel.org Cc: Randy 'ayaka' Li , acourbot@chromium.org, nicolas@ndufresne.ca, paul.kocialkowski@bootlin.com, jernej.skrabec@gmail.com, joro@8bytes.org, mchehab@kernel.org, maxime.ripard@bootlin.com, hverkuil@xs4all.nl, ezequiel@collabora.com, thomas.petazzoni@bootlin.com, randy.li@rock-chips.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH 0/4] WIP: rockchip mpp for v4l2 video decoder Date: Thu, 31 Jan 2019 11:13:29 +0800 Message-Id: <20190131031333.11905-1-ayaka@soulik.info> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy 'ayaka' Li Hello Those patches are based on the previous vendor driver I post before, but it can apply without the previous one. I really want to make it work before FOSDEM and I didn't. And upcoming the lunar new year holiday would last two week. I have verified the v4l2 part but I meet a problem with power or clock, it would be a complex problem, I would handle to solve it after I am back. But I just tell my design on this kind dirver. A few questions I think you may ask I would like to answer it here. 1. Why it is based on the previous vendor driver ? The vendor driver I post to mail list is a clean version which having a efficient work flow and those platform dependency controls having been merged into it. For the stateless device, V4L2 is just another interface for userspace to translate it into registers. 2. Why use a structure to store register infomation not marco ? I really don't want to define many marcos for a device having more than a hundred of registers. And there are many fields in a registers. For the VDPU1/VDPU2 which would support more than 10 video codecs, these two devices would re-use many registers for many codecs, It would be hard to show the conflict relations between them in marco but more easy with C union and structure. BTW, I would prefer to write a number of registers into the device though AHB bus not just generate one then write one, you can save some times here. Besides the two previous answers. I really have a big problem with v4l2 design. Which would driver wait the work of the previous picture is done, leading a large gap time more idle of the device. I am ok the current face that v4l2 stateless driver is not stateless. But it would limit the ability of stateless decoder. It is more flexible to those videos having different resolution or orientation sequences. But I don't like the method to reconstruct the bitstream in driver, it is a bad idea to limit what data the device want. Those problem is mainly talking in the HEVC slice thread. And it was ironic for the VPx serial codec, which mixed compressed data and umcompress header together and twisted. Even for the ITU H serial codec, it would become a problem in SVC or Google Android CTS test. And thanks kwiboo, ezequielg and Paulk, I copy some v4l2 code from their code. Randy Li (1): staging: video: rockchip: add video codec ayaka (3): [WIP]: staging: video: rockchip: add v4l2 common [WIP] staging: video: rockchip: vdpu2 [TEST]: rockchip: mpp: support qtable drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/rockchip-mpp/Kconfig | 54 + drivers/staging/rockchip-mpp/Makefile | 8 + drivers/staging/rockchip-mpp/mpp_debug.h | 87 ++ drivers/staging/rockchip-mpp/mpp_dev_common.c | 1365 +++++++++++++++++ drivers/staging/rockchip-mpp/mpp_dev_common.h | 215 +++ drivers/staging/rockchip-mpp/mpp_dev_rkvdec.c | 878 +++++++++++ drivers/staging/rockchip-mpp/mpp_dev_vdpu2.c | 755 +++++++++ drivers/staging/rockchip-mpp/mpp_service.c | 197 +++ drivers/staging/rockchip-mpp/mpp_service.h | 38 + drivers/staging/rockchip-mpp/rkvdec/hal.h | 53 + drivers/staging/rockchip-mpp/rkvdec/regs.h | 395 +++++ drivers/staging/rockchip-mpp/vdpu2/hal.h | 52 + drivers/staging/rockchip-mpp/vdpu2/mpeg2.c | 253 +++ drivers/staging/rockchip-mpp/vdpu2/regs.h | 699 +++++++++ 16 files changed, 5052 insertions(+) create mode 100644 drivers/staging/rockchip-mpp/Kconfig create mode 100644 drivers/staging/rockchip-mpp/Makefile create mode 100644 drivers/staging/rockchip-mpp/mpp_debug.h create mode 100644 drivers/staging/rockchip-mpp/mpp_dev_common.c create mode 100644 drivers/staging/rockchip-mpp/mpp_dev_common.h create mode 100644 drivers/staging/rockchip-mpp/mpp_dev_rkvdec.c create mode 100644 drivers/staging/rockchip-mpp/mpp_dev_vdpu2.c create mode 100644 drivers/staging/rockchip-mpp/mpp_service.c create mode 100644 drivers/staging/rockchip-mpp/mpp_service.h create mode 100644 drivers/staging/rockchip-mpp/rkvdec/hal.h create mode 100644 drivers/staging/rockchip-mpp/rkvdec/regs.h create mode 100644 drivers/staging/rockchip-mpp/vdpu2/hal.h create mode 100644 drivers/staging/rockchip-mpp/vdpu2/mpeg2.c create mode 100644 drivers/staging/rockchip-mpp/vdpu2/regs.h -- 2.20.1