Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1483864pxv; Fri, 2 Jul 2021 05:06:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/nuzxkLDgkwhwwZchsSqJaS7GA+zd2y2P4u1ClOkxLIqAm0broqEYth9XlKfzOWz/wz+5 X-Received: by 2002:a05:6402:849:: with SMTP id b9mr6317991edz.270.1625227567659; Fri, 02 Jul 2021 05:06:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625227567; cv=none; d=google.com; s=arc-20160816; b=P5UBSv1LoHsFbpWQG4+lj+Ku92fAerrJcBwkjiRCVUhxTuh1osVRblG/fYO0/dl2pI uM37pte/b3Oaf9m0VE3P+60bNoVSBTdoDJKO+OYB78gYa5Pilw+/dKvTGQDFTfnjFaVg cEOoF8rmiyeWeSkRRDk3nAKYe6TgS7S37BycCkNLn+5Zuk45eiX1zkj8Ns+YVuR5FNF9 Q7wl6hG6wiROI7mH4oVwrIol4ZPuimVOLjYYsI1TP+kVapH2986e0BKKibtBeukchrej Lk6VRK/dUWvos10+tAMKjEfEuVOCT2gS4ll0TCyURsn13JQUBa0Riff8ruD5z9LUsXcr oDBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=YJ+EtDWQs+us5BNhruD1jgDhGjdRaOspQtCVuCEvz6w=; b=uMcsDsudiM9H7sHRjtxMaidI6nNOG8eywzDrwx2vN9XN4N5jGru3HmFUFDrVTeyf6h 5rgQ92q1xun3lHOHvoOYfPRj+KasJS2r8OWoX7EYCDsu4k0GUDs9MGBj/0x5kPEjDMI/ diSQZSkBfsjAYNsXFtPH6unzdeFaiQD85dLE1AXPbTY0DPuwM059bLz03PEbvF8dayc5 Wn7SXg4fXjoUSy9h6nGljKQiSlF96pPXZoX0cDBnbFsU1rc/dccvUP+fNfvpbzXtnTWz aOxipH5rUHrnsDc51Bu4BGXnDMURYwCmZHvSPQWeXlcKEZ6HlMFe2iR1AYf+fm66dVaq Lzqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HjTbAAxc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gx12si3046843ejc.658.2021.07.02.05.05.22; Fri, 02 Jul 2021 05:06:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HjTbAAxc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232056AbhGBMDO (ORCPT + 99 others); Fri, 2 Jul 2021 08:03:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232026AbhGBMDO (ORCPT ); Fri, 2 Jul 2021 08:03:14 -0400 Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32960C061762; Fri, 2 Jul 2021 05:00:41 -0700 (PDT) Received: by mail-oi1-x22a.google.com with SMTP id o6so11006207oic.9; Fri, 02 Jul 2021 05:00:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YJ+EtDWQs+us5BNhruD1jgDhGjdRaOspQtCVuCEvz6w=; b=HjTbAAxcGzjV6TBksscfbS39Y0D5cXtkVuCR9ZUNTYvK7MNOcQXOaW6LVxvxFcxiNa 259jkdIOYViNy6gVGSIDmEiAt0DLNGa66t+q01Oi7MYvCrIntzJ6mgd80d3Ww+oiAPQp w9Df7ljvR+MRo4t6/YhXSeERV1yKgCzkyG4/PhNtUan/GFDZMHtlGveKMjyvTbhwKgsJ FXlFT9mIe58Gqjus8GKGNWfJHpJQZ5AyVHHdNZnHVgkpuGZxwhHqnZ4A1FcaEaB5qSyl DTBfAnG99kySz8EwXWQwrtXBk9PgfDMJNHmGz0OOCN9fexL5hTL4XGFhZC+Mj8XcajRi 152A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YJ+EtDWQs+us5BNhruD1jgDhGjdRaOspQtCVuCEvz6w=; b=Wij14HJkoPkmDgsorD+AgNS53SJLaEK17ruAHXmJzH+2nd5owPdIQyUJuIKKhWNwxa PuWm6m40c97++5P5Nt4D7Dh/l517t9WmgSdAHC8bNhK9bHrRejYCI9jAwe6/Vk18QNUF EEviEsUWg6Y0ZxZRNbqFiufHge10hvAFVUZEf6Kb/jy5SpkAoMoBApykggXvFwAGHjDn GqSzeqOluA//CnWMnPgPeY0gArrQ+xn9JLtZoqNQB97R3AqdschJfbg9DNk23PHWXKz+ pNcpiHZAgZidDsS0iRKNwRJ48pJsx3LBFnLehPudUcwoonhhRh5kIjzPzRO6L5N6gsDA YGuw== X-Gm-Message-State: AOAM5315gmPHBbkKC97/BAcHLYleUJrBXH4GYxQMtVwWvD0l0026qHem HXJirrxMl/0hPEQ7DE04n3MMpojRXtvkEY3b6Ig= X-Received: by 2002:aca:a9d0:: with SMTP id s199mr3600343oie.47.1625227240500; Fri, 02 Jul 2021 05:00:40 -0700 (PDT) MIME-Version: 1.0 References: <20210623073549.24170-1-moudy.ho@mediatek.com> In-Reply-To: <20210623073549.24170-1-moudy.ho@mediatek.com> From: Enric Balletbo Serra Date: Fri, 2 Jul 2021 14:00:28 +0200 Message-ID: Subject: Re: [RFC PATCH V0 01/10] media: mtk-mdp3: Add Mediatek MDP Driver To: Moudy Ho Cc: Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Hans Verkuil , Jernej Skrabec , Maoguang Meng , Krzysztof Kozlowski , daoyuan huang , Ping-Hsun Wu , Geert Uytterhoeven , Rob Landley , Laurent Pinchart , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, tfiga@chromium.org, drinkcat@chromium.org, acourbot@chromium.org, pihsun@chromium.org, menghui.lin@mediatek.com, sj.huang@mediatek.com, ben.lok@mediatek.com, randy.wu@mediatek.com, srv_heupstream@mediatek.com, frederic.chen@mediatek.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mody Ho, Thank you for your patch. Some comments below. Missatge de Moudy Ho del dia dc., 23 de juny 2021 a les 9:36: > > From: mtk18742 > Please fix your git configuration, I assume this should be something like Moudy Ho . Note that the author and the Signed-off must match. > Add MDP driver for MT8183 > In general please use a more verbose commit messages, you know what MDP means (I probably also know, but not everyone knows what MDP means) It is a good practice to when you introduce a new driver to explain well what is and for what is used. The first question that I have here is why current MDP driver (that supports other Mediatek chips like the MT8173) can't be extended to support MT8183. How different is this MDP driver and why can't share the code. This single patch is huge, and is unlikely that anyone spend time reviewing it just for that. I'd recommend to split it and introduce step-by-step, functionality by functionally. I also have the impression that you're just reimplementing things that are actually upstream or not taking advantage of what is already upstream. i.e the access to the mmsys registers. Please use current kernel drivers/interfaces API instead of reimplementing it. I'd strongly recommend to look at current Mediatek mdp driver and see if you can add support for MT8183 there, and if not, looks at it as reference. Best regards, Enric > Signed-off-by: Moudy Ho > --- > drivers/media/platform/Kconfig | 17 + > drivers/media/platform/Makefile | 2 + > drivers/media/platform/mtk-mdp3/Makefile | 9 + > drivers/media/platform/mtk-mdp3/isp_reg.h | 37 + > .../media/platform/mtk-mdp3/mdp-platform.h | 58 + > .../media/platform/mtk-mdp3/mdp_reg_ccorr.h | 75 + > .../media/platform/mtk-mdp3/mdp_reg_rdma.h | 206 +++ > drivers/media/platform/mtk-mdp3/mdp_reg_rsz.h | 109 ++ > .../media/platform/mtk-mdp3/mdp_reg_wdma.h | 125 ++ > .../media/platform/mtk-mdp3/mdp_reg_wrot.h | 115 ++ > .../media/platform/mtk-mdp3/mmsys_config.h | 188 +++ > drivers/media/platform/mtk-mdp3/mmsys_mutex.h | 35 + > .../media/platform/mtk-mdp3/mmsys_reg_base.h | 38 + > drivers/media/platform/mtk-mdp3/mtk-img-ipi.h | 282 ++++ > .../media/platform/mtk-mdp3/mtk-mdp3-cmdq.c | 521 +++++++ > .../media/platform/mtk-mdp3/mtk-mdp3-cmdq.h | 54 + > .../media/platform/mtk-mdp3/mtk-mdp3-comp.c | 1329 +++++++++++++++++ > .../media/platform/mtk-mdp3/mtk-mdp3-comp.h | 155 ++ > .../media/platform/mtk-mdp3/mtk-mdp3-core.c | 282 ++++ > .../media/platform/mtk-mdp3/mtk-mdp3-core.h | 86 ++ > .../media/platform/mtk-mdp3/mtk-mdp3-debug.c | 973 ++++++++++++ > .../media/platform/mtk-mdp3/mtk-mdp3-debug.h | 39 + > .../media/platform/mtk-mdp3/mtk-mdp3-m2m.c | 804 ++++++++++ > .../media/platform/mtk-mdp3/mtk-mdp3-m2m.h | 42 + > .../media/platform/mtk-mdp3/mtk-mdp3-regs.c | 748 ++++++++++ > .../media/platform/mtk-mdp3/mtk-mdp3-regs.h | 373 +++++ > .../media/platform/mtk-mdp3/mtk-mdp3-vpu.c | 313 ++++ > .../media/platform/mtk-mdp3/mtk-mdp3-vpu.h | 79 + > 28 files changed, 7094 insertions(+) > create mode 100644 drivers/media/platform/mtk-mdp3/Makefile > create mode 100644 drivers/media/platform/mtk-mdp3/isp_reg.h > create mode 100644 drivers/media/platform/mtk-mdp3/mdp-platform.h > create mode 100644 drivers/media/platform/mtk-mdp3/mdp_reg_ccorr.h > create mode 100644 drivers/media/platform/mtk-mdp3/mdp_reg_rdma.h > create mode 100644 drivers/media/platform/mtk-mdp3/mdp_reg_rsz.h > create mode 100644 drivers/media/platform/mtk-mdp3/mdp_reg_wdma.h > create mode 100644 drivers/media/platform/mtk-mdp3/mdp_reg_wrot.h > create mode 100644 drivers/media/platform/mtk-mdp3/mmsys_config.h > create mode 100644 drivers/media/platform/mtk-mdp3/mmsys_mutex.h > create mode 100644 drivers/media/platform/mtk-mdp3/mmsys_reg_base.h > create mode 100644 drivers/media/platform/mtk-mdp3/mtk-img-ipi.h > create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.c > create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-cmdq.h > create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.c > create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-comp.h > create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-core.c > create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-core.h > create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-debug.c > create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-debug.h > create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-m2m.c > create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-m2m.h > create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-regs.c > create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-regs.h > create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.c > create mode 100644 drivers/media/platform/mtk-mdp3/mtk-mdp3-vpu.h [snip] > -- > 2.18.0 >