[PATCH] drm/tests: Remove CONFIG_DRM_FBDEV_EMULATION on .kunitconfig

Arthur Grillo Queiroz Cabral arthurgrillo at riseup.net
Thu Jul 27 16:39:40 UTC 2023



On 27/07/23 13:07, Javier Martinez Canillas wrote:
> "Arnd Bergmann" <arnd at arndb.de> writes:
> 
>> On Thu, Jul 27, 2023, at 00:03, Arthur Grillo wrote:
>>> Using the `kunit_tool` with the command:
>>>
>>> tools/testing/kunit/kunit.py run --kunitconfig=drivers/gpu/drm/tests/
>>>
>>> Lead to this error[0]. Fix it by expliciting removing the
>>> CONFIG_DRM_FBDEV_EMULATION.
>>>
>>> [0]
>>> ERROR:root:
>>> WARNING: unmet direct dependencies detected for FRAMEBUFFER_CONSOLE
>>>   Depends on [n]: VT [=n] && FB_CORE [=y] && !UML [=y]
>>>   Selected by [y]:
>>>   - DRM_FBDEV_EMULATION [=y] && HAS_IOMEM [=y] && DRM [=y] && !EXPERT [=n]
>>>
>>
>> I think that's a bug in the Kconfig files that should be fixed
>> by enforcing the correct set of dependencies. I have not encountered
>> this in my randconfig builds (with a lot of other fixes applied)
>>
>> In linux-next, CONFIG_VT cannot be disabled if CONFIG_EXPERT=n,
>> so this does not happen.
>>
> 
>>> diff --git a/drivers/gpu/drm/tests/.kunitconfig 
>>> b/drivers/gpu/drm/tests/.kunitconfig
>>> index 6ec04b4c979d..c50b5a12faae 100644
>>> --- a/drivers/gpu/drm/tests/.kunitconfig
>>> +++ b/drivers/gpu/drm/tests/.kunitconfig
>>> @@ -1,3 +1,4 @@
>>>  CONFIG_KUNIT=y
>>>  CONFIG_DRM=y
>>>  CONFIG_DRM_KUNIT_TEST=y
>>> +CONFIG_DRM_FBDEV_EMULATION=n
>>>
>>> base-commit: 45b58669e532bcdfd6e1593488d1f23eabd55428
>>
>> Changing the local config should not be required after fixing
>> the Kconfig files.
>>
> 
> CONFIG_VT can only be disabled if CONFIG_EXPERT=y but I also see that it
> does not default to 'y' if !UML. Also FRAMEBUFFER_CONSOLE depends on !UML
> but DRM_FBDEV_EMULATION selects FRAMEBUFFER_CONSOLE if !EXPERT.
> 
> Maybe we should include !UML in that condition to? Something like this:
> 
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index 0d499669d653..734332f222ea 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -135,7 +135,7 @@ config DRM_DEBUG_MODESET_LOCK
>  config DRM_FBDEV_EMULATION
>         bool "Enable legacy fbdev support for your modesetting driver"
>         depends on DRM
> -       select FRAMEBUFFER_CONSOLE if !EXPERT
> +       select FRAMEBUFFER_CONSOLE if (!EXPERT && !UML)
>         select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE
>         default y
>         help
> 
> 
> With that I'm able to run the DRM kunit tests wihtout the mentioned
> problem. But I'm not sure if that is the correct fix or not.

It works here too, I just don't understand why this commit caused this
bug, as it did not touch this line.
> 


More information about the dri-devel mailing list