Re: [PATCH v2 2/5] fbdev: Give atafb proper parent

Michael Schmitz <[email protected]>
Newsgroups org.kernel.vger.linux-m68k,org.kernel.vger.linux-fbdev
Message-ID <[email protected]>
Hi Thomas,

On 17/08/26 19:57, Thomas Zimmermann wrote:
>
>>
>>> If so, could you also replace the hard coded fb_info with a call to
>>> framebuffer_alloc()?
>>
>> Can't see how that would work - fb_info isn't passed to all functions 
>> that need to use it, especially in the hardware detection phase 
>> (hence the use of a static fb_info struct)?
>
> You'd have to modify the driver to pass the allocated instance, of 
> course. It's not a trivial oneliner, but if this driver is still 
> relevant, it might be worth improving it.

Wasn't all that hard after all - do you want that patch on top of the 
current series or replacing Miro's patch 2, Helge?

Cheers,

     Michael


>
> Best regards
> Thomas
>
>>
>> Cheers,
>>
>>     Michael
>>
>>>>
>>>> Signed-off-by: Miro Kropacek <[email protected]>
>>>> Reviewed-by: Michael Schmitz <[email protected]>
>>>> Signed-off-by: Michael Schmitz <[email protected]>
>>>> Cc: <[email protected]>
>>>> Link: https://lists.debian.org/debian-68k/2026/08/msg00000.html
>>>> ---
>>>>   drivers/video/fbdev/atafb.c | 5 +++++
>>>>   1 file changed, 5 insertions(+)
>>>>
>>>> diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c
>>>> index b8ed1c537293..3d540803dc2b 100644
>>>> --- a/drivers/video/fbdev/atafb.c
>>>> +++ b/drivers/video/fbdev/atafb.c
>>>> @@ -3101,6 +3101,11 @@ static int __init atafb_probe(struct
>>>> platform_device *pdev)
>>>>   #endif /* ATAFB_EXT */
>>>>     //    strcpy(fb_info.mode->name, "Atari Builtin ");
>>>> +    /* Parent the fb device properly: without this fb0 registers as a
>>>> +     * virtual sysfs device with no /sys/class/graphics/fb0/device 
>>>> link,
>>>> +     * which makes Xorg's fbdevhw reject it ("No devices detected").
>>>> +     */
>>>> +    fb_info.device = &pdev->dev;
>>>
>>> Because this is supposed to happen in framebuffer_alloc() and 
>>> keeping it
>>> there would be preferable.
>>>
>>> Best regards
>>> Thomas
>>>
>>>>       fb_info.fbops = &atafb_ops;
>>>>       // try to set default (detected; requested) var
>>>>       do_fb_set_var(&atafb_predefined[default_par - 1], 1);
>>>
>>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.