Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3229601rwd; Mon, 22 May 2023 10:22:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5uVyNQDLrG+k6VrY6kmJjWuu+V6vzV1Dyl6lH1mRTa8Z7v4/clZBNlr21NBKXS7aTDL4lm X-Received: by 2002:a05:6a20:6a14:b0:103:883b:10c1 with SMTP id p20-20020a056a206a1400b00103883b10c1mr11229941pzk.41.1684776172564; Mon, 22 May 2023 10:22:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684776172; cv=none; d=google.com; s=arc-20160816; b=rEbegZU/WieTCoZzSe0R0n5QjzjC92T7y87YymY5VF/t6oQc2J2UqRDbg0zHHpEfhk O/oNTk31y6gkCadiMcU6bjkgJcd0aIkn4MWlgLcJ+3dWikgK72GczzVgh8wNgeUcJQBS qGRltm7eQ7NOB48X08SBHGQ3qUbQgIlwOvKZEmjwPZt0PKQ3QI2qY8kgNvx+cdb28wai mzHLmGg+iuknHZaxmSr0aeKtgv8JTqr36mCsPjsbs8foTY6Rlfa8SQWT6DBBFhFuaGM1 WYfl9tjqMr31niGaAMb/BsRf+8DluQTtLU+J2wiFtIOtDvs148aTC3uxR+CWO5UC9qJ6 jw0Q== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=TsZcPwsribVZPBN/N5hbOWDnAfKQ7kXzx3Br5upDXkg=; b=YoeD19F/X8BOjzRw6sJ9cR9fg8FJ/urp9UPw2YMLfrDD4H3HmaZDK+Znp6lE3XPMmX SmJeX7qkNjxCUGa5JhPVSm2QvWDJEEiu88t8MAJwzvDcW0BOSooSqi8+LJ+F5Ylw1M7i OqeKTvhUjvv444jYpITe5R1hXTWAnWC/jmK6UoUKIv0eIXLz081ZskMx7uAd9ppjkqZC dEZqle2pQNd7uX8aAOefrFxcuEP9Z4yZKupsAegXMrEY14pTE/TqYK80arRfsB8Ci3AN e9Vz+dLvDONPeWib1xbXMWyTh4Sof/pcVS24cmbXJp8XCG/VNa/7uoqgKOi8bTdypqZh YyHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b=ByO6tXGD; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h191-20020a6383c8000000b0051392b219dfsi5365852pge.334.2023.05.22.10.22.40; Mon, 22 May 2023 10:22:52 -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=@xen0n.name header.s=mail header.b=ByO6tXGD; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232979AbjEVQkn (ORCPT + 99 others); Mon, 22 May 2023 12:40:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231615AbjEVQkl (ORCPT ); Mon, 22 May 2023 12:40:41 -0400 Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB80A8F; Mon, 22 May 2023 09:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xen0n.name; s=mail; t=1684773636; bh=A1hv5dYBingqEFthCPsCseNbX30f00AobtL7UQqoAhw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ByO6tXGD+zH7oxF9QSuPqV291kN0lgYYjc1XqAiTxlstxptwNTGBtmChIDn35LsNS 8MIt1CXkJitjYFFaZcxY2UpuS7leVr0/ANkcXC/IcfvOViY7z9D6dIo3ISR85OMdvt ++YwiPSc8zUlzZMs6NFpmcy80lgyzokgv9AOyivg= Received: from [192.168.9.172] (unknown [101.228.138.124]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailbox.box.xen0n.name (Postfix) with ESMTPSA id 62372600DA; Tue, 23 May 2023 00:40:36 +0800 (CST) Message-ID: Date: Tue, 23 May 2023 00:40:35 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v14 1/2] drm: add kms driver for loongson display controller To: Sui Jingfeng <15330273260@189.cn>, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Li Yi , Sumit Semwal , Christian Koenig , Emil Velikov Cc: linaro-mm-sig@lists.linaro.org, loongson-kernel@lists.loongnix.cn, Geert Uytterhoeven , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Javier Martinez Canillas , Nathan Chancellor , Liu Peibao , linux-media@vger.kernel.org References: <20230520105718.325819-1-15330273260@189.cn> <20230520105718.325819-2-15330273260@189.cn> <26fd78b9-c074-8341-c99c-4e3b38cd861a@xen0n.name> <331e7baa-a83b-b0c9-37f7-0e8e39187df4@xen0n.name> <5ae49b7a-b8d2-a822-65bc-6a894d2b1b4e@189.cn> <0e5e4a4b-1426-ffae-e958-cf8f9aece166@xen0n.name> <69edaf49-359a-229c-c8b4-8aa3af622008@189.cn> Content-Language: en-US From: WANG Xuerui In-Reply-To: <69edaf49-359a-229c-c8b4-8aa3af622008@189.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On 5/22/23 21:13, Sui Jingfeng wrote: > Hi, > > On 2023/5/22 18:25, WANG Xuerui wrote: >> On 2023/5/22 18:17, Sui Jingfeng wrote: >>> Hi, >>> >>> On 2023/5/22 18:05, WANG Xuerui wrote: >>>> On 2023/5/22 17:49, Sui Jingfeng wrote: >>>>> Hi, >>>>> >>>>> On 2023/5/22 17:28, WANG Xuerui wrote: >>>>>> On 2023/5/22 17:25, Sui Jingfeng wrote: >>>>>>> Hi, >>>>>>> >>>>>>> On 2023/5/21 20:21, WANG Xuerui wrote: >>>>>>>>> + * LS3A4000/LS3A5000/LS3A6000 CPU, they are equipped with >>>>>>>>> on-board video RAM >>>>>>>>> + * typically. While LS2K0500/LS2K1000/LS2K2000 are low cost >>>>>>>>> SoCs which share >>>>>>>>> + * the system RAM as video RAM, they don't has a dediacated >>>>>>>>> VRAM. >>>>>>>> >>>>>>>> CPU models are not typically prefixed with "LS", so "Loongson >>>>>>>> 3A4000/3A5000/3A6000". >>>>>>>> >>>>>>> Here is because when you do programming, variable name should >>>>>>> prefix with letters. >>>>>> >>>>>> Commit messages, comments, and log messages etc. are natural >>>>>> language, so it's better to treat them differently. No problem to >>>>>> keep code as-is IMO. >>>>>> >>>>> Then you get two name for a single chip,  take  LS7A1000 as an >>>>> example. >>>>> >>>>> You name it as Loongson 7A1000 in commit message,  and then you >>>>> have to define another name in the code,  say LS7A1000. >>>>> >>>>> "Loongson 7A1000" is too long,  not as compact as LS7A1000. >>>>> >>>>> This also avoid bind the company name to a specific product, >>>>> because a company can produce many product. >>>> >>>> Nah, the existing convention is "LS7Xxxxx" for bridges and >>>> "Loongson 3Axxxx" for CPUs (SoCs like 2K fall under this category >>>> too). It's better to stick with existing practice so it would be >>>> familiar to long-time Loongson/LoongArch developers, but I >>>> personally don't think it will hamper understanding if you feel >>>> like doing otherwise. >>>> >>> Can you explain why it is better? >>> >>> is it that the already existing is better ? >> >> It's not about subjective perception of "better" or "worse", but >> about tree-wide consistency, and about reducing any potential >> confusion from newcomers. I remember Huacai once pointing out that >> outsiders usually have a hard time remembering "1, 2, and 3 are CPUs, >> some 2 are SoCs, 7 are bridge chips", and consistently referring to >> the bridge chips throughout the tree as "LS7A" helped. >> >> In any case, for the sake of consistency, you can definitely refer to >> the CPU models in natural language like "LS3Axxxx"; just make sure to >> refactor for example every occurrence in arch/loongarch and other >> parts of drivers/. That's a lot of churn, though, so I don't expect >> such changes to get accepted, and that's why the tree-wide >> consistency should be favored over the local one. >> > There are document[1] which named LS7A1000 bridge chip as Loongson > 7A1000 Bridge, > > which is opposed to what you have said "the existing convention is > LS7Xxxxx for bridges". > > > there are also plenty projects[2] which encode ls2k1000 as project > name, which simply > > don't fall into the category as you have mentioned("Loongson 3Axxxx"). > > > See [1][2] for reference, how to explain this phenomenon then? Turn down the flames a little bit, okay? ;-) What I'm describing is simply the kernel convention. Try grepping the commit log of linux: you can see almost all mentions of "Loongson 7A" is just referring to the manual which is named like that; that "LS3A" only ever appear as part of some board name; and that "LS2K" only briefly appearing when mentioned together with LS7A, maybe that's emphasis on the SoC's bridge part. "Loongson [123]" and "LS7A" are clearly the majority there. But, as the convention was established by Huacai and I'm only reiterating his rules, you may instead just check with him and not continue the boring debate with me. Meanwhile maybe keeping all "LS3A" and/or "LS2K" is kind of acceptable, given such naming is etched right on the chip's packaging; I'd follow whatever Huacai mandates. -- WANG "xen0n" Xuerui Linux/LoongArch mailing list: https://lore.kernel.org/loongarch/