Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp477762rwl; Wed, 5 Apr 2023 03:38:53 -0700 (PDT) X-Google-Smtp-Source: AKy350aymv7KJL5Opw9veA5w9cAah4Xq+taizPubBuq45WFNMwTmdpOtsPQhWipbf/skW3hQ2hSL X-Received: by 2002:a05:6a20:1aa1:b0:db:314d:c19a with SMTP id ci33-20020a056a201aa100b000db314dc19amr4617091pzb.50.1680691133149; Wed, 05 Apr 2023 03:38:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680691133; cv=none; d=google.com; s=arc-20160816; b=ULRPHf+JbDZWPx2akLgZG22m/PHyhlfKO5KwaV/gVPDzZa7T3q7YAdkxTZmIbNdqdK GSalGYSI8IC22y+Pg27qYmCfbS9fkrJpWamUDqCgbT4C/G1Ys3AkdsDrXKXKZmpdLYgF EnARUAbMqXkywzla55jPH4kQFlpUz0oOTtbWrjB9f7WLoRvz7dNMqYxRLYKZm0/Y0lSz uZupr4bLiK9ufdZeQCAB9SBfA55zuGoC/Qm+XJlT4ByxJr97226RlJmBZn8s7K4wQOio w9Jdg7gCSGFIKTcTr/iktktrZk0mTf5Ggmj5jnSvxGwLHZf4/hnJitz2hNjWsxuNU8HI Zh6Q== 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 :content-language:references:cc:to:from:subject:user-agent :mime-version:date:message-id:sender:hmm_source_type:hmm_attache_num :hmm_source_ip; bh=TcMDaPvMu9yyR7Ok6s6CAJh2VFY8TCVdiwhL5mFaK5o=; b=Sl4yEi3IUZOq1oouVxGpxmcCgPZwoN7ZojOtTwTtr7agB/zp2hJXYX7jjY18sPc26r iOiuho91+fNVx+t+7w2GGVkp3GCcKbcXSkkRnT9D3ajEJkK98vU+zvpg2X5ePf9UN97S k2YxBYitx7VlNe96Dkjx25j1APuonyb5BPAwcPolZoplFDMY96u9TH6QJD6n+g2GphlU VDBQOffntwrBxpUYNWhubEMmmxpkPVVylMNq+skShnEdu5xAX7MuB7nWIKGWhNikG/nS DpvA5Y9Gz124pJhqqyokqsHqCiJ+95EQct7cEadpgRZDeWo5s9HZaz+N3xr9UnyTLxNO GR/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 j191-20020a638bc8000000b0050bd83dcd42si11810094pge.370.2023.04.05.03.38.40; Wed, 05 Apr 2023 03:38:53 -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 S237627AbjDEKhL (ORCPT + 99 others); Wed, 5 Apr 2023 06:37:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237551AbjDEKhJ (ORCPT ); Wed, 5 Apr 2023 06:37:09 -0400 Received: from 189.cn (ptr.189.cn [183.61.185.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CB62B55B3; Wed, 5 Apr 2023 03:36:58 -0700 (PDT) HMM_SOURCE_IP: 10.64.8.43:45396.591263666 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 B48D2100212; Wed, 5 Apr 2023 18:36:54 +0800 (CST) Received: from ([114.242.206.180]) by gateway-151646-dep-7b48884fd-tj646 with ESMTP id fa906cc8fb9f4f46a2ec08ab67748914 for javierm@redhat.com; Wed, 05 Apr 2023 18:36:56 CST X-Transaction-ID: fa906cc8fb9f4f46a2ec08ab67748914 X-Real-From: 15330273260@189.cn X-Receive-IP: 114.242.206.180 X-MEDUSA-Status: 0 Sender: 15330273260@189.cn Message-ID: <99489e62-c4c4-ee82-5a47-d0e74cabc124@189.cn> Date: Wed, 5 Apr 2023 18:36:53 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH] video/aperture: fix typos From: Sui Jingfeng <15330273260@189.cn> To: Javier Martinez Canillas , Thomas Zimmermann , Maxime Ripard , David Airlie , Daniel Vetter , Li Yi , Christian Koenig , Helge Deller , Lucas De Marchi Cc: linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org References: <20230404040101.2165600-1-suijingfeng@loongson.cn> <0ad03743-0224-b154-a149-e3e4d54b252d@suse.de> <87355fex1f.fsf@minerva.mail-host-address-is-not-set> <87zg7ndi57.fsf@minerva.mail-host-address-is-not-set> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,FROM_LOCAL_DIGITS,FROM_LOCAL_HEX,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS autolearn=unavailable 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 2023/4/5 17:55, Sui Jingfeng wrote: > Hi, > > thanks you for the time and effort  for reviewing. > > On 2023/4/4 19:03, Javier Martinez Canillas wrote: >> Javier Martinez Canillas writes: >> >> [...] >> >>>>>        /* >>>>>         * Remove the device from the device hierarchy. This is the >>>>> right thing >>>>> -     * to do for firmware-based DRM drivers, such as EFI, VESA or >>>>> VGA. After >>>>> +     * to do for firmware-based fb drivers, such as EFI, VESA or >>>>> VGA. After >>>> That sentences is not well phrased. Maybe say 'This is required for >>>> firmware-provided graphics, such as EFI, VESA or VGA.' >>>> >>> Graphic drivers or display drivers would indeed be more accurate >>> here. But >>> I think that "fb drivers" is still well pharsed since the are other >>> places >>> where either fbdev or DRM drivers for firmware-provided framebuffers >>> are >>> named like that. >>> >> Sui, >> >> Maybe you could post a follow-up patch to improve the comment as >> suggested >> by Thomas? >> > Yes, certainly. > > > This is the right thing to do for conflicting drivers takes over the > hardware resource required. > While the `drivers` include both drm driver and the real device dependent framebuffer driver, They are typically build as kernel module as oppose to the efifb and simplefb which is built into kernel kernel.  Firmware framebuffer is conflict with the drm driver is because the memory region they use overlaps.  If there no overlap, then no `taken over`  will be happen. By the way,  I'm asked to made efifb and simplefb works on LoongArch and Mips platform in the past. We are using downstream kernel(linux-4.19)  at that time. efifb is ony works for platform with uefi firmware support. By ensure that framebuffer locate at the address range of the on-board video ram(VRAM) and passing screen_info parameters to kernel correctly, drm_aperture_remove_conflicting_framebuffers will success. This required the uefi firmware engineer understand this, for loongson bridge chip, this need a small trick.  Simplefb is only tested on loongson SoC platform by providing fb parameters in DT which match the PMON firmware's setting. As the framebuffer may located at anywhere in the physical address space, there no aperture for SoC anymore.  Should call aperture_remove_conflicting_devices(0, ~0, false, "drmfb") to remove them all. > > But the comments is actually nearly perfect in overall, it has some > difficulty to improve > > the perfection.  Below is my personal understanding toward the above > sentence. > > > efifb and simplefb belong to the class of firmware based framebuffer > driver. > > They are generic and platform agnostic, yet they have to relay on the > firmware > > to passing fb format, fb size, fb base address, fb resolution and fb > stride etc to the kernel. > > Linux kernel using those information to fill the global screen_info > structure. > > sysfb_init() then using the global screen_info to  create a platform > device, > > the device will be claimed by efifb or simplefb driver finally. This > is a hand over solution. > > It relay on the firmware setup such a framebuffer and hand over the > state(this is > > actually a kind of modeset state) to kernel. > > > efifb only own the potential hardware resource for a very short time if a > > conflicting drm driver probe successfully. > > > For the platform/graphics without  a drm driver, developers may choose to > > use efifb driver as a replacement.  So, there are no conflicting > happen on > > such a case. The `nomodeset` kernel cmd options can also be used for > > debugging and testing purpose if the more intelligent drm driver is > broken > > due to bugs. >