[PATCH v2 2/3] arch: Remove struct fb_info from video helpers

Helge Deller deller at gmx.de
Fri Mar 29 01:59:27 AEDT 2024


On 3/28/24 14:33, Thomas Zimmermann wrote:
> Am 28.03.24 um 12:04 schrieb Helge Deller:
>> On 3/27/24 21:41, Thomas Zimmermann wrote:
>>> The per-architecture video helpers do not depend on struct fb_info
>>> or anything else from fbdev. Remove it from the interface and replace
>>> fb_is_primary_device() with video_is_primary_device(). The new helper
>>
>> Since you rename this function, wouldn't something similar to
>>
>> device_is_primary_display()
>>     or
>> device_is_primary_console()
>>     or
>> is_primary_graphics_device()
>>     or
>> is_primary_display_device()
>>
>> be a better name?
>
> The video_ prefix is there to signal that the code is part of the video subsystem.
>
> But there's too much code that tried to figure out a default video
> device. So I actually have different plans for this function. I'd
> like to replace it with a helper that returns the default device
> instead of just testing for it. Sample code for x86 is already in
> vgaarb.c. [1] The function's name would then be
> video_default_device() and return the appropriate struct device*.
> video_is_primary device() will be removed. This rename here is the
> easiest step towards the new helper. Ok?
Sounds ok.

Helge


More information about the Linuxppc-dev mailing list