Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2672299rwd; Mon, 22 May 2023 02:26:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7P/BDxkGeMi9I2OPUNUL0W/UbK/akZsbz+KyGAxkbUs60bx68RftQdGCgfsvtVjvrE9nSj X-Received: by 2002:a17:902:d489:b0:1ae:2c87:f771 with SMTP id c9-20020a170902d48900b001ae2c87f771mr13333458plg.20.1684747605156; Mon, 22 May 2023 02:26:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684747605; cv=none; d=google.com; s=arc-20160816; b=vYTdDTNzZUJp3zM/7CyGkGktlylH1zBknineuOhoeH3rZk2e9E5gCD6876PXoCbIUS IoWfpuOZm4jUP2JRZCW8Huol91Eni71tbk4CSLwkLW7COjz/R+VRe+hYELEGvMnVKiMu gDE7ifqEs9x2eTIQ0fdeHs94Q+LSN3rd3lE4TnH/UYkWU+2Do2vYjyupbSz6fNuLXMbo BiLh9UMkHwhc+RD71Lu0MBdkeeLqTrgQbISS0Qh6fWDsLsHG4ENytINEKi+NvDtCwMJX OtjmnRv4D7Z51Ry1X2HVXhlicfDA0HmLBKisWgK+b+y68IMqB7ErxRpuyV8TRKN7y3ym 9QaA== 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:sender:hmm_source_type:hmm_attache_num :hmm_source_ip; bh=WgOjOBOfDgd07RCUJZxwOnaUj9IQwQ0xS5vKJ2vOBsI=; b=FYoc331586bp9vg0NgXatrRxOMVoni9OtAoa1sg0sSwGSSVdt6YICASebGLUYDJBd4 rrNUbkmwX2GC/42iqnYrgBiCtug77NhS7R8PXG0oaARi2XM2fYtn+1ENbswjkunOXWN6 /t63/UqNHKxyWw6Uk4UaPLBZXDY/z60pCP+vKh3k+G+1PSlnSgK8G9ZOGq8ky94mBz5m 3fW40maeOhi5RA5OdtAI+SGaJg0HIEVZdJivB+56Zo6up8PoohI0jZqoV68ZVaL8bWM8 hqQ13V5cwRR6XXzeP5hh3vqGa7VBR5RBd42L1QMA4K4rKaq9UOlIViOi9H0mkzFe4T5A 7Y/w== ARC-Authentication-Results: i=1; mx.google.com; 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 b19-20020a170902b61300b001ac34fed041si4066236pls.475.2023.05.22.02.26.32; Mon, 22 May 2023 02:26:45 -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; 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 S232707AbjEVJFj (ORCPT + 99 others); Mon, 22 May 2023 05:05:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232526AbjEVJF2 (ORCPT ); Mon, 22 May 2023 05:05:28 -0400 Received: from 189.cn (ptr.189.cn [183.61.185.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D6C50FE; Mon, 22 May 2023 02:05:14 -0700 (PDT) HMM_SOURCE_IP: 10.64.8.43:51158.600247562 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-114.242.206.180 (unknown [10.64.8.43]) by 189.cn (HERMES) with SMTP id 387F01002CF; Mon, 22 May 2023 17:05:11 +0800 (CST) Received: from ([114.242.206.180]) by gateway-151646-dep-75648544bd-7vx9t with ESMTP id 4e1da2ddffb14c7ea87b889e41f0d88c for kernel@xen0n.name; Mon, 22 May 2023 17:05:14 CST X-Transaction-ID: 4e1da2ddffb14c7ea87b889e41f0d88c X-Real-From: 15330273260@189.cn X-Receive-IP: 114.242.206.180 X-MEDUSA-Status: 0 Sender: 15330273260@189.cn Message-ID: <47bfa5a1-8a60-6faa-1983-d8a29589cdb6@189.cn> Date: Mon, 22 May 2023 17:05:10 +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 Content-Language: en-US To: WANG Xuerui , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Sui Jingfeng , 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> From: Sui Jingfeng <15330273260@189.cn> In-Reply-To: <26fd78b9-c074-8341-c99c-4e3b38cd861a@xen0n.name> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FROM_LOCAL_DIGITS, FROM_LOCAL_HEX,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi, On 2023/5/21 20:21, WANG Xuerui wrote: >> +++ b/drivers/gpu/drm/loongson/lsdc_debugfs.c >> @@ -0,0 +1,91 @@ >> +// SPDX-License-Identifier: GPL-2.0+ >> +/* >> + * Copyright (C) 2023 Loongson Technology Corporation Limited >> + */ >> + >> +#include >> + >> +#include "lsdc_benchmark.h" >> +#include "lsdc_drv.h" >> +#include "lsdc_gem.h" >> +#include "lsdc_probe.h" >> +#include "lsdc_ttm.h" >> + >> +/* device level debugfs */ >> + >> +static int lsdc_identify(struct seq_file *m, void *arg) >> +{ >> +    struct drm_info_node *node = (struct drm_info_node *)m->private; >> +    struct lsdc_device *ldev = (struct lsdc_device >> *)node->info_ent->data; >> +    const struct loongson_gfx_desc *gfx = to_loongson_gfx(ldev->descp); >> +    u8 impl, rev; >> + >> +    loongson_cpu_get_prid(&impl, &rev); >> + >> +    seq_printf(m, "Running on cpu 0x%x, cpu revision: 0x%x\n", >> +           impl, rev); > > Is this really needed/relevant for LSDC identification? AFAICS the > loongson_cpu_get_prid helper has only one use (that's here), Yes, this is really needed, when doing the remote debugging, sometime you only have a ssh login the target machine. User of the driver could know what the host is in the DRM way. > so if it's not absolutely necessary you can just get rid of that > function and lsdc_probe.h altogether. This function it written for the future, It will not be removed. > >> + >> +    seq_printf(m, "Contained in: %s\n", gfx->model); > > "model: " would be more appropriate for a piece of info looking like a > "gfx->model"? No, these are nearly equivalent.