Re: [PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()

Lucas De Marchi
2025-04-08T14:39:21Z

On Tue, Apr 08, 2025 at 05:26:27PM +0300, Dmitry Baryshkov wrote:
>On Tue, Apr 08, 2025 at 04:51:25PM +0300, Jani Nikula wrote:
>> On Tue, 08 Apr 2025, "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com> wrote:
>> >> > We will need more changes than fixing the variable names.
>> >> >
>> >> > I get this error
>> >> >
>> >> > ERROR: modpost: "__devm_drm_panel_alloc"
>> >> [drivers/gpu/drm/panel/panel-auo-a030jtn01.ko] undefined!
>> >> > make[2]: *** [scripts/Makefile.modpost:147: Module.symvers] Error 1
>> >> > make[1]: ***
>> >> > [/home/chaitanya/exodus/repos/drm-tip-sandbox/Makefile:1956:
>> >> modpost]
>> >> > Error 2
>> >> > make: *** [Makefile:248: __sub-make] Error 2
>> >> >
>> >> > after making the following change.
>> >>
>> >> I couldn't reproduce this one on current drm-misc-next with arm64 and
>> >> x86 allmodconfig. Could you share your configuration?
>> >>
>> >
>> > Here is the config that our CI uses
>> >
>> > https://gitlab.freedesktop.org/drm/xe/ci/-/raw/main/kernel/kconfig
>>
>> There's
>>
>> CONFIG_DRM_PANEL=y
>> # CONFIG_OF is not set
>>
>> but __devm_drm_panel_alloc is inside #ifdef CONFIG_OF. I don't know that
>> it should be.
>>
>> There are some stubs in drm_panel.h for !CONFIG_OF but not this one.
>>
>> Finally, DRM_PANEL_AUO_A030JTN01 does not depend on OF.
>>
>>
>> That's the issue, but I don't know what the correct fix would be.
>
>I'l send a patch.

I wish I had seen this thread before the patch series mentioned in IRC
to fix it. The additional patch needed is probably something like in
https://lore.kernel.org/dri-devel/nyrjnvctqnk6f3x5q7rlmy5nb7iopoti56pgh43zqknici5ms4@cibpldh7epra/

?

Lucas De Marchi