From: Javier Martinez Canillas <javierm@redhat.com>
To: Thomas Zimmermann <tzimmermann@suse.de>, linux-kernel@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org, Laszlo Ersek <lersek@redhat.com>,
Alex Williamson <alex.williamson@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
kvm@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
kernel test robot <lkp@intel.com>,
Jens Frederich <jfrederich@gmail.com>,
Jon Nettleton <jon.nettleton@gmail.com>,
linux-staging@lists.linux.dev,
Daniel Vetter <daniel.vetter@intel.com>,
Daniel Vetter <daniel@ffwll.ch>, Helge Deller <deller@gmx.de>,
Matthew Wilcox <willy@infradead.org>,
Sam Ravnborg <sam@ravnborg.org>,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
Zhen Lei <thunder.leizhen@huawei.com>,
Alex Deucher <alexander.deucher@amd.com>,
Xiyu Yang <xiyuyang19@fudan.edu.cn>,
linux-fbdev@vger.kernel.org, Zheyu Ma <zheyuma97@gmail.com>,
Guenter Roeck <linux@roeck-us.net>
Subject: Re: [PATCH v6 5/5] fbdev: Make registered_fb[] private to fbmem.c
Date: Thu, 9 Jun 2022 15:09:21 +0200 [thread overview]
Message-ID: <69d8ad0e-efc6-f37d-9aa7-d06f8de16a6a@redhat.com> (raw)
In-Reply-To: <3ebac271-1276-8132-6175-ca95a26cfcbb@suse.de>
Hello Thomas,
On 6/9/22 13:49, Thomas Zimmermann wrote:
> Hi Javier
>
> Am 07.06.22 um 20:23 schrieb Javier Martinez Canillas:
>> From: Daniel Vetter <daniel.vetter@ffwll.ch>
>>
>> Well except when the olpc dcon fbdev driver is enabled, that thing
>> digs around in there in rather unfixable ways.
>
> There is fb_client_register() to set up a 'client' on top of an fbdev.
> The client would then get messages about modesetting, blanks, removals,
> etc. But you'd probably need an OLPC to convert dcon, and the mechanism
> itself is somewhat unloved these days.
>
> Your patch complicates the fbdev code AFAICT. So I'd either drop it or,
> even better, build a nicer interface for dcon.
>
> The dcon driver appears to look only at the first entry. Maybe add
> fb_info_get_by_index() and fb_info_put() and export those. They would be
> trivial wrappers somewhere in fbmem.c:
>
> #if IS_ENABLED(CONFIG_FB_OLPC_DCON)
> struct fb_info *fb_info_get_by_index(unsigned int index)
> {
> return get_fb_info(index);
> }
> EXPORT_SYMBOL()
> void fb_info_put(struct fb_info *fb_info)
> {
> put_fb_info(fb_info);
> }
> EXPORT_SYMBOL()
> #endif
>
> In dcon itself, using the new interfaces will actually acquire a
> reference to keep the display alive. The code at [1] could be replaced.
> And a call to fb_info_put() needs to go into dcon_remove(). [2]
>
Thanks for your suggestions, that makes sense to me. I'll drop this
patch from the set and post as a follow-up a different approach as
you suggested.
--
Best regards,
Javier Martinez Canillas
Linux Engineering
Red Hat
next prev parent reply other threads:[~2022-06-09 13:09 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-07 18:23 [PATCH v6 0/5] Fix some races between sysfb device registration and drivers probe Javier Martinez Canillas
2022-06-07 18:23 ` [PATCH v6 1/5] firmware: sysfb: Make sysfb_create_simplefb() return a pdev pointer Javier Martinez Canillas
2022-06-07 18:23 ` [PATCH v6 2/5] firmware: sysfb: Add sysfb_disable() helper function Javier Martinez Canillas
2022-06-07 18:23 ` [PATCH v6 3/5] fbdev: Disable sysfb device registration when removing conflicting FBs Javier Martinez Canillas
2022-06-16 19:29 ` Zack Rusin
2022-06-16 19:55 ` Javier Martinez Canillas
2022-06-16 21:03 ` Zack Rusin
2022-06-16 22:18 ` Javier Martinez Canillas
2022-06-16 23:21 ` Javier Martinez Canillas
2022-06-17 1:35 ` Zack Rusin
2022-06-17 6:46 ` Javier Martinez Canillas
2022-07-04 9:36 ` Xi Ruoyao
2022-07-04 10:29 ` Xi Ruoyao
2022-07-04 11:04 ` Javier Martinez Canillas
2022-07-04 12:11 ` Xi Ruoyao
2022-07-04 12:22 ` Javier Martinez Canillas
2022-07-04 12:22 ` Thomas Zimmermann
2022-06-07 18:23 ` [PATCH v6 4/5] Revert "fbdev: Prevent probing generic drivers if a FB is already registered" Javier Martinez Canillas
2022-06-07 18:23 ` [PATCH v6 5/5] fbdev: Make registered_fb[] private to fbmem.c Javier Martinez Canillas
2022-06-09 11:49 ` Thomas Zimmermann
2022-06-09 13:09 ` Javier Martinez Canillas [this message]
2022-06-09 17:23 ` Mark olpc_dcon BROKEN [Was: [PATCH v6 5/5] fbdev: Make registered_fb[] private to fbmem.c] Sam Ravnborg
2022-06-09 17:38 ` Javier Martinez Canillas
2022-06-09 14:28 ` [PATCH v6 0/5] Fix some races between sysfb device registration and drivers probe Javier Martinez Canillas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=69d8ad0e-efc6-f37d-9aa7-d06f8de16a6a@redhat.com \
--to=javierm@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=alexander.deucher@amd.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=daniel@ffwll.ch \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=jfrederich@gmail.com \
--cc=jon.nettleton@gmail.com \
--cc=kraxel@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=lersek@redhat.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linux@roeck-us.net \
--cc=lkp@intel.com \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=sam@ravnborg.org \
--cc=thunder.leizhen@huawei.com \
--cc=tzimmermann@suse.de \
--cc=willy@infradead.org \
--cc=xiyuyang19@fudan.edu.cn \
--cc=zheyuma97@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).