Message ID | 20230404040101.2165600-1-suijingfeng@loongson.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2758345vqo; Mon, 3 Apr 2023 21:05:05 -0700 (PDT) X-Google-Smtp-Source: AKy350YcN/I/7R0hDOoLdY6p43WBGBJQFHY5TFcmHfCs1j9veTZJzcXhM/F/HE1YfKHmWV+N3CB0 X-Received: by 2002:a50:fb09:0:b0:4fa:4b1c:5ea3 with SMTP id d9-20020a50fb09000000b004fa4b1c5ea3mr1407805edq.23.1680581105598; Mon, 03 Apr 2023 21:05:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680581105; cv=none; d=google.com; s=arc-20160816; b=PfIkrpN5bPxrvdKVpMJkjViJz0mbUV4FgYyscpxFMeETE39I6mN0yvoXi6w89rDY84 MeNHjyvvk6AxdzAXLTpR0dXBSEXcaawR/ISfhR8Kc36eN/jJaaqFZbUsldG7mmv1VSGk Pzx2Bt5rHIHvK7QoVIwdkV9ljuzFbW0O5aqPaE2gFthgWpwK/TdFqQ34rTOZ7NsuYfPQ vkPIvNB0LvvWoqa9rqlGIco/uYv9kzP8xyVqefZI7qTt8JVlnqG0MavPdiysZFhWhHLa 8jFnyZNxShPUEKFBvdSLGa6EW05H4r1Q/USf+zeEac+fUqKhkps0fkX8YEJIx4vK9FSN +wLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=YrfW7q3X/KlHTlS656HLpYUegr1VRa5FGK7tMAdfs9o=; b=jl6U58UEqvFTQ0Txq5XA9IzT4fGOT4G/gLuRhyrx1t9MFSVgHWso4eQU8ZYdGdVDwj szfF3j7Sx7TPrPw0vP5clR552F+i8Yumozs/N45ZrmK7qtg5bVDRP3dxRO3Kx4u+6BdX AT15EYK9TXooZbODAz30wwfeIwa/4htmmO9aBGC1IFj2+UQjObGEZHD+Fa0Ll6+77CYI 2TZBqp0K4shqQtwixKcuMSkMapX42f00JPQphGV3ZGLJhlmj0ArInutur3qtP9ASwWkm TlKeZm5FkEYsE0XITvQPHAKTNyuEmAZGpiMMQAxkHAKRNvryy92sgkcBpFQozfbXugM0 K/sw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d7-20020a056402516700b005021f0d5752si7580442ede.665.2023.04.03.21.04.41; Mon, 03 Apr 2023 21:05:05 -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 S231208AbjDDEBL (ORCPT <rfc822;zwp10758@gmail.com> + 99 others); Tue, 4 Apr 2023 00:01:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjDDEBJ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 4 Apr 2023 00:01:09 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 64D8319F; Mon, 3 Apr 2023 21:01:04 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.133]) by gateway (Coremail) with SMTP id _____8DxE0z+oCtk2E8WAA--.34589S3; Tue, 04 Apr 2023 12:01:02 +0800 (CST) Received: from openarena.loongson.cn (unknown [10.20.42.133]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cxur39oCtkMO4UAA--.18983S2; Tue, 04 Apr 2023 12:01:01 +0800 (CST) From: Sui Jingfeng <suijingfeng@loongson.cn> To: Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Sui Jingfeng <suijingfeng@loongson.cn>, Li Yi <liyi@loongson.cn>, Javier Martinez Canillas <javierm@redhat.com>, Christian Koenig <christian.koenig@amd.com>, Helge Deller <deller@gmx.de>, Lucas De Marchi <lucas.demarchi@intel.com> Cc: linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH] video/aperture: fix typos Date: Tue, 4 Apr 2023 12:01:01 +0800 Message-Id: <20230404040101.2165600-1-suijingfeng@loongson.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8Cxur39oCtkMO4UAA--.18983S2 X-CM-SenderInfo: xvxlyxpqjiv03j6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBjvJXoW7AF1UZrW7CryrAF17KFyrtFb_yoW8tw4rpF sYgFyUCr1DKr4jgayj9a10yFyrWa93Xay5KFyUA3ya9wn8Ca4rXrWUGFWkG3WDJryku3Wa vFn8Zr18CF4DZrJanT9S1TB71UUUUjJqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bSxYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_Jrv_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVW8JVW5JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwA2z4 x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26r4UJVWxJr1l n4kS14v26r126r1DM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6x ACxx1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r126r1DMcIj6I8E 87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lc7CjxV Aaw2AFwI0_JF0_Jw1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxY O2xFxVAFwI0_JF0_Jw1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGV WUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_ JFI_Gr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rV WUJVWUCwCI42IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4U JbIYCTnIWIevJa73UjIFyTuYvjxU4SoGDUUUU X-Spam-Status: No, score=-0.0 required=5.0 tests=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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762217013422989974?= X-GMAIL-MSGID: =?utf-8?q?1762217013422989974?= |
Series |
video/aperture: fix typos
|
|
Commit Message
Sui Jingfeng
April 4, 2023, 4:01 a.m. UTC
EFI FB, VESA FB or VGA FB etc are belong to firmware based framebuffer
driver.
Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn>
---
drivers/video/aperture.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Comments
Sui Jingfeng <suijingfeng@loongson.cn> writes: > EFI FB, VESA FB or VGA FB etc are belong to firmware based framebuffer > driver. > > Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn> > --- Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Hi Am 04.04.23 um 06:01 schrieb Sui Jingfeng: > EFI FB, VESA FB or VGA FB etc are belong to firmware based framebuffer > driver. No whitespaces at the beginning of the lines. > > Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn> > --- > drivers/video/aperture.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/video/aperture.c b/drivers/video/aperture.c > index 41e77de1ea82..b009468ffdff 100644 > --- a/drivers/video/aperture.c > +++ b/drivers/video/aperture.c > @@ -20,7 +20,7 @@ > * driver can be active at any given time. Many systems load a generic > * graphics drivers, such as EFI-GOP or VESA, early during the boot process. > * During later boot stages, they replace the generic driver with a dedicated, > - * hardware-specific driver. To take over the device the dedicated driver > + * hardware-specific driver. To take over the device, the dedicated driver > * first has to remove the generic driver. Aperture functions manage > * ownership of framebuffer memory and hand-over between drivers. > * > @@ -76,7 +76,7 @@ > * generic EFI or VESA drivers, have to register themselves as owners of their > * framebuffer apertures. Ownership of the framebuffer memory is achieved > * by calling devm_aperture_acquire_for_platform_device(). If successful, the > - * driveris the owner of the framebuffer range. The function fails if the > + * driver is the owner of the framebuffer range. The function fails if the > * framebuffer is already owned by another driver. See below for an example. > * > * .. code-block:: c > @@ -126,7 +126,7 @@ > * et al for the registered framebuffer range, the aperture helpers call > * platform_device_unregister() and the generic driver unloads itself. The > * generic driver also has to provide a remove function to make this work. > - * Once hot unplugged fro mhardware, it may not access the device's > + * Once hot unplugged from hardware, it may not access the device's > * registers, framebuffer memory, ROM, etc afterwards. > */ > > @@ -203,7 +203,7 @@ static void aperture_detach_platform_device(struct device *dev) > > /* > * 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.' Best regards Thomas > * the new driver takes over the hardware, the firmware device's state > * will be lost. > * -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
Javier Martinez Canillas <javierm@redhat.com> writes: > Sui Jingfeng <suijingfeng@loongson.cn> writes: > >> EFI FB, VESA FB or VGA FB etc are belong to firmware based framebuffer >> driver. >> >> Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn> >> --- > > Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> > Pushed to drm-misc (drm-misc-next). Thanks!
Thomas Zimmermann <tzimmermann@suse.de> writes: Hello Thomas, Sorry, I just applied this patch and didn't see your email before... > Hi > > Am 04.04.23 um 06:01 schrieb Sui Jingfeng: >> EFI FB, VESA FB or VGA FB etc are belong to firmware based framebuffer >> driver. > > No whitespaces at the beginning of the lines. > I fixed that before applying, also removed the "are" in the sentence above, since it sounded off and repharsed subject line as "Fix typos in comments". [...] >> /* >> * 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. For example, in the sysfb platform code and Kconfig symbol help text. > Best regards > Thomas >
Javier Martinez Canillas <javierm@redhat.com> 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?
Hi Am 04.04.23 um 12:55 schrieb Javier Martinez Canillas: > Thomas Zimmermann <tzimmermann@suse.de> writes: > > Hello Thomas, > > Sorry, I just applied this patch and didn't see your email before... > >> Hi >> >> Am 04.04.23 um 06:01 schrieb Sui Jingfeng: >>> EFI FB, VESA FB or VGA FB etc are belong to firmware based framebuffer >>> driver. >> >> No whitespaces at the beginning of the lines. >> > > I fixed that before applying, also removed the "are" in the sentence > above, since it sounded off and repharsed subject line as "Fix typos > in comments". > > [...] > >>> /* >>> * 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. I meant my original comment when I said 'not well phrased'. It's not Jingfeng's fault, but in my original text. Removing the device is required for scanout buffers that have been provided by the firmware. The attached graphics driver is secondary to this. But I'm struggling to find a simple sentence to express this. :/ Best regards Thomas > > For example, in the sysfb platform code and Kconfig symbol help text. > >> Best regards >> Thomas >> > -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
Hi, thanks you for the time and effort for reviewing. On 2023/4/4 19:03, Javier Martinez Canillas wrote: > Javier Martinez Canillas <javierm@redhat.com> 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. 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.
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 <javierm@redhat.com> 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. >
Hi! > > Am 04.04.23 um 06:01 schrieb Sui Jingfeng: > >> EFI FB, VESA FB or VGA FB etc are belong to firmware based framebuffer > >> driver. > > > ... > I fixed that before applying, also removed the "are" in the sentence > above, since it sounded off and repharsed subject line as "Fix typos > in comments". I seem to remember that 'all your bases are belong to us' is an old meme, but that was probably not intentional here. Best regards, Pavel --
diff --git a/drivers/video/aperture.c b/drivers/video/aperture.c index 41e77de1ea82..b009468ffdff 100644 --- a/drivers/video/aperture.c +++ b/drivers/video/aperture.c @@ -20,7 +20,7 @@ * driver can be active at any given time. Many systems load a generic * graphics drivers, such as EFI-GOP or VESA, early during the boot process. * During later boot stages, they replace the generic driver with a dedicated, - * hardware-specific driver. To take over the device the dedicated driver + * hardware-specific driver. To take over the device, the dedicated driver * first has to remove the generic driver. Aperture functions manage * ownership of framebuffer memory and hand-over between drivers. * @@ -76,7 +76,7 @@ * generic EFI or VESA drivers, have to register themselves as owners of their * framebuffer apertures. Ownership of the framebuffer memory is achieved * by calling devm_aperture_acquire_for_platform_device(). If successful, the - * driveris the owner of the framebuffer range. The function fails if the + * driver is the owner of the framebuffer range. The function fails if the * framebuffer is already owned by another driver. See below for an example. * * .. code-block:: c @@ -126,7 +126,7 @@ * et al for the registered framebuffer range, the aperture helpers call * platform_device_unregister() and the generic driver unloads itself. The * generic driver also has to provide a remove function to make this work. - * Once hot unplugged fro mhardware, it may not access the device's + * Once hot unplugged from hardware, it may not access the device's * registers, framebuffer memory, ROM, etc afterwards. */ @@ -203,7 +203,7 @@ static void aperture_detach_platform_device(struct device *dev) /* * 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 * the new driver takes over the hardware, the firmware device's state * will be lost. *