From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8736C4338F for ; Wed, 28 Jul 2021 02:56:01 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BCE9060F41 for ; Wed, 28 Jul 2021 02:56:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BCE9060F41 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 78A9560093; Wed, 28 Jul 2021 02:56:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mF-g60PfRYJH; Wed, 28 Jul 2021 02:55:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 7708B6058C; Wed, 28 Jul 2021 02:55:59 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 67C141BF3D6 for ; Wed, 28 Jul 2021 02:55:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 64229405CE for ; Wed, 28 Jul 2021 02:55:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kuN0h50L2eTy for ; Wed, 28 Jul 2021 02:55:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by smtp4.osuosl.org (Postfix) with ESMTP id 1E695405CC for ; Wed, 28 Jul 2021 02:55:55 +0000 (UTC) Received: by ajax-webmail-mail.loongson.cn (Coremail) ; Wed, 28 Jul 2021 10:55:47 +0800 (GMT+08:00) X-Originating-IP: [10.20.41.133] Date: Wed, 28 Jul 2021 10:55:47 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: =?UTF-8?B?5p2O5pmo6Ziz?= To: "Sam Ravnborg" Subject: Reply: Re: [PATCH v3 1/3] drm/loongson: Add DRM Driver for Loongson 7A1000 bridge chip X-Priority: 3 X-Mailer: Coremail Webmail Server Version XT5.0.10a build 20191018(4c4f6d15) Copyright (c) 2002-2021 www.mailtech.cn .loongson.cn In-Reply-To: References: <20210723031251.200686-1-lichenyang@loongson.cn> MIME-Version: 1.0 Message-ID: <2c5313e0.10541.17aeb0a2210.Coremail.lichenyang@loongson.cn> X-Coremail-Locale: en_US X-CM-TRANSID: AQAAf9BxsOIzxwBhc+0kAA--.17811W X-CM-SenderInfo: xolfxvxq1d0wo6or00hjvr0hdfq/1tbiAQAQA13QvNu3SwAAsE X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , David Airlie , Huacai Chen , dri-devel@lists.freedesktop.org, Maxime Ripard , Thomas Zimmermann , devel@linuxdriverproject.org, Dan Carpenter Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" Hi Sam, Thank you very much for your attention to our driver. I will consider your opinion, The next version is due in the near future. > -----Original Messages----- > From: "Sam Ravnborg" > Sent Time: 2021-07-28 01:41:30 (Wednesday) > To: "Daniel Vetter" > Subject: Re: [PATCH v3 1/3] drm/loongson: Add DRM Driver for Loongson 7A1000 bridge chip > > Hi Chenyang, > > I browsed the code on lore and noticed a few things and thought it > better to bring it to your attention now. > > The general structure of the drivers seems good and coding style is > fine. The feedback is mostly stuff we have decided to do different over > time, so likely because you based the driver on some older driver. > And it can be hard to follow all the refactoring going on - something > that you get for free (almost) when is is mainlined. > > 1) Use drm_ for logging whereever possible (need drm_device) > 2) Do not use irq mid-layer support in drm_driver, it is about to be > legacy only. In other words avoid using drm_irq* stuff. > 3) Look at drm_drv to see code snippet how to use the drmm* > infrastructure. It will save you some cleanup and in general make the > driver more stable > 4) Sort includes alphabetically, and split them on in blocks. > is one block > > is next block > 5) Put entry in makefile in alphabetical order > 6) You most like can use the simple_encoder stuff we have today > 7) The *_load and *_unlod names where used in the past. Maybe be > inspired by some newer driver here. _load functiosn is something used > by legacy drivers so it confuses me a little. > > I look forward to see next revision of the patch-set. > And sorry for not providing these high-level feedback issues before - I > have not had time to look at your driver. > > Sam ------------------------------ LiChenyang _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel