Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2616371rdh; Mon, 30 Oct 2023 02:42:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF7zfPuV9ofdX59hxScb8NXNCUmxTIGfNosvFdV1c2yrYo3AGQ8AVSn649k3xgcnKoiUqBJ X-Received: by 2002:a17:902:e5c2:b0:1cc:3fc9:7d09 with SMTP id u2-20020a170902e5c200b001cc3fc97d09mr4165769plf.15.1698658967303; Mon, 30 Oct 2023 02:42:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698658967; cv=none; d=google.com; s=arc-20160816; b=YhaTVyEHFXdVYlPrNqlrGbOguyY2olzPBJHVF0ELPIxGE99+njDSci4bNj1DK+vWxd pM/vjI0dAjiZdXB6bjB0npLN710qsp+luNnj92wQAsqtDU6PBtR9mCOnB3PXPLY2Itp3 E+pI4Hppyap0fmy15J47z+M+OAkYP8d2d+mZ5RRkvww2/Qqem0ZIno4TLsU7yMOkj8v3 LDx+C6iq2pLPAdx5sTIsbWducAsEo6FYJhSmUskD4o3FLUStA3LMvSZORSFvJCitHrHl eWAosbJ7PA3mOaZyo9jT2FDx4R6Bg1gsrznMcNNF3iObag5puZIRoA5G6zVe3Mycmw1t QXVg== 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; bh=qmsMfJ5BUdzCYNQMKwC4yen7U732ggourf+8tGmTc28=; fh=J3rSMq2MhNzw4MeKUUoMMXOZ4B7HCQwnn+D7df0IsuI=; b=mcjhiOkGbXgymPZcSCPJLrwTSgbpISE/NGYWBNkGa/GmG5ZlYhNnZaezUlOq1Hw0ar galW+fiHwn8FcsiYYDYGpxnR8b5yVOwFsaH/aKCr9eoY99VTyAVQ9EiyBgUbjFBkb87m iKniMC3doZJ4xhGQO8XiRAXZMrNKTsjVr8g7fqxkern4K7Iz79NOPbe3MBMkFyR1RCUt 47PxhDCkrwFg1atapVmr8Z9sih6VEQQSSxNWoN9VTVVN8R5jJIE9rqJ983h3hpbAICYR 4ORg2GlbwUzVJksbeD9Aku0aZakJcJ4IZ72eVLGf7/lTgM4GUKRClYyjydiGYed9s1BJ Fy3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id lc12-20020a170902fa8c00b001cc38a6cb77si2574323plb.204.2023.10.30.02.42.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 02:42:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id EB8C98098FF3; Mon, 30 Oct 2023 02:42:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232432AbjJ3JmZ (ORCPT + 99 others); Mon, 30 Oct 2023 05:42:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231467AbjJ3JmX (ORCPT ); Mon, 30 Oct 2023 05:42:23 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5B40FC5 for ; Mon, 30 Oct 2023 02:42:19 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.43]) by gateway (Coremail) with SMTP id _____8BxuOh5ej9lRbY1AA--.3639S3; Mon, 30 Oct 2023 17:42:17 +0800 (CST) Received: from [10.20.42.43] (unknown [10.20.42.43]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxkN12ej9lD+o2AA--.54880S3; Mon, 30 Oct 2023 17:42:17 +0800 (CST) Message-ID: <3ccb9600-6990-4ec7-81de-0d7b4e1294eb@loongson.cn> Date: Mon, 30 Oct 2023 17:42:28 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/8] drm/loongson: Introduce a drm bridge driver for it66121 HDMI transmitter Content-Language: en-US To: Dmitry Baryshkov Cc: Maxime Ripard , Thomas Zimmermann , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <20231029194607.379459-1-suijingfeng@loongson.cn> <20231029194607.379459-3-suijingfeng@loongson.cn> From: Sui Jingfeng In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: AQAAf8DxkN12ej9lD+o2AA--.54880S3 X-CM-SenderInfo: xvxlyxpqjiv03j6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBj93XoW7WF4xAry7tF17Cr4xGw4DAwc_yoW8AFyfpa nFkw1YkrWUXrW2y39xGF1UJFy5Za93GFWfWFsrJ3s3Wr9xAa40yrn8JFW5Jry7Xa43Ar42 qrZ7GFWUW3WYkrbCm3ZEXasCq-sJn29KB7ZKAUJUUUUr529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUU9Yb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_JFI_Gr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2kKe7AKxVWUXVWUAwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07 AIYIkI8VC2zVCFFI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWU XVWUAwAv7VC2z280aVAFwI0_Cr0_Gr1UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwI xGrwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km07C267AKxVWU XVWUAwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67 kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY 6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0x vEx4A2jsIE14v26F4j6r4UJwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIev Ja73UjIFyTuYvjxU7PrcDUUUU X-Spam-Status: No, score=-0.8 required=5.0 tests=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 groat.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 (groat.vger.email [0.0.0.0]); Mon, 30 Oct 2023 02:42:45 -0700 (PDT) Hi, On 2023/10/30 06:53, Dmitry Baryshkov wrote: > On Sun, 29 Oct 2023 at 21:46, Sui Jingfeng wrote: >> The IT66121 is a DVO to HDMI converter, LS3A5000+LS7A1000 ML5A_MB use this >> chip to support HDMI output. Thus add a drm bridge based driver for it. >> This patch is developed with drivers/gpu/drm/bridge/ite-it66121.c as base. > Please use the original bridge driver instead of adding a new one. I'm agree with the spirit of code sharing, but this is nearly impossible for non-DT system. Because the original bridge driver(say it66121.ko) is fully dependent on the DT. UEFI+ACPI based system can not use with it. Our I2C adapter is created by the drm/loongson.ko on the runtime. The potential problem is that *cyclic dependency* ! I2C adapter driver is depend on drm/loongson drm/loongson depend on drm bridge driver (say it66121.ko) drm bridge driver (say it66121.ko) depend on I2C adapter to setup. This plus the defer probe mechanism is totally a trap, incurring troubles and don't work. > If > it needs to be changed in any way, please help everyone else by > improving it instead of introducing new driver. > >> Signed-off-by: Sui Jingfeng >> --- >> drivers/gpu/drm/loongson/Kconfig | 1 + >> drivers/gpu/drm/loongson/Makefile | 2 + >> drivers/gpu/drm/loongson/ite_it66121.c | 749 ++++++++++++++++++++ >> drivers/gpu/drm/loongson/ite_it66121.h | 19 + >> drivers/gpu/drm/loongson/ite_it66121_regs.h | 268 +++++++ >> 5 files changed, 1039 insertions(+) >> create mode 100644 drivers/gpu/drm/loongson/ite_it66121.c >> create mode 100644 drivers/gpu/drm/loongson/ite_it66121.h >> create mode 100644 drivers/gpu/drm/loongson/ite_it66121_regs.h >