lkml.org 
[lkml]   [2023]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/9] ALSA: hda/i915: Allow override of gpu binding.
On Tue, 25 Jul 2023 13:52:32 +0200,
Pierre-Louis Bossart wrote:
>
>
> >>>> @@ -121,6 +128,9 @@ static int i915_gfx_present(struct pci_dev
> >>>> *hdac_pci)
> >>>>   {
> >>>>       struct pci_dev *display_dev = NULL;
> >>>>   +    if (!gpu_bind || (gpu_bind < 0 &&
> >>>> video_firmware_drivers_only()))
> >>>> +        return false;
> >>
> >>
> >> Bear with me since I am just going back to work mode but I can't figure
> >> out what the second part of the test does
> >>
> >> bool video_firmware_drivers_only(void)
> >> {
> >>     return video_nomodeset;
> >> }
> >> EXPORT_SYMBOL(video_firmware_drivers_only);
> >>
> >> and video_nomodeset=1 by default, so why would we return false when
> >> gpu_bind = -1?
> >>
> >> This seems to be a change of functionality, what am I missing?
> > video_nomodeset is 0 by default, only when nomodeset is given as
> > argument is it set to 1. :-)
>
>
> I must be missing something on how the default is handled.
>
> bool video_firmware_drivers_only(void)
> {
> return video_nomodeset;
> }
> EXPORT_SYMBOL(video_firmware_drivers_only);
>
> static int __init disable_modeset(char *str)
> {
> video_nomodeset = true;
>
> isn't default 'true' then?

disable_modeset() is called *only* when nomodeset boot option is
given. Then it overrides the value to true.


Takashi

\
 
 \ /
  Last update: 2023-07-25 14:20    [W:0.110 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site