Re: [PATCH v2] of: Fix of platform build on powerpc due to bad of disaply code

From: Erhard F.
Date: Thu Jan 19 2023 - 06:44:00 EST


On Thu, 19 Jan 2023 10:53:23 +0100
Michal Suchanek <msuchanek@xxxxxxx> wrote:

> The commit 2d681d6a23a1 ("of: Make of framebuffer devices unique")
> breaks build because of wrong argument to snprintf. That certainly
> avoids the runtime error but is not the intended outcome.
>
> Also use standard device name format of-display.N for all created
> devices.
>
> Fixes: 2d681d6a23a1 ("of: Make of framebuffer devices unique")
> Signed-off-by: Michal Suchanek <msuchanek@xxxxxxx>
> ---
> v2: Update the device name format

Hi Michal!

Just tested your 'of: Make of framebuffer devices unique' + 'v2 of: Fix of platform build on powerpc due to bad of disaply code' on my G4 and can confirm they fix the original issue (https://bugzilla.kernel.org/show_bug.cgi?id=216095). Thanks!

Also ofdrm gets loaded now without error messages:
# modprobe -v ofdrm
insmod /lib/modules/6.2.0-rc4-PMacG4+/kernel/drivers/video/fbdev/core/cfbcopyarea.ko
insmod /lib/modules/6.2.0-rc4-PMacG4+/kernel/drivers/video/fbdev/core/sysimgblt.ko
insmod /lib/modules/6.2.0-rc4-PMacG4+/kernel/drivers/video/fbdev/core/sysfillrect.ko
insmod /lib/modules/6.2.0-rc4-PMacG4+/kernel/drivers/video/fbdev/core/cfbimgblt.ko
insmod /lib/modules/6.2.0-rc4-PMacG4+/kernel/drivers/video/fbdev/core/syscopyarea.ko
insmod /lib/modules/6.2.0-rc4-PMacG4+/kernel/drivers/video/fbdev/core/cfbfillrect.ko
insmod /lib/modules/6.2.0-rc4-PMacG4+/kernel/drivers/gpu/drm/drm_kms_helper.ko
insmod /lib/modules/6.2.0-rc4-PMacG4+/kernel/drivers/gpu/drm/drm_shmem_helper.ko
insmod /lib/modules/6.2.0-rc4-PMacG4+/kernel/drivers/gpu/drm/tiny/ofdrm.ko

However I get no monitor output yet, despite ofdrm is loaded:
# lsmod | grep -i drm
ofdrm 9736 0
drm_shmem_helper 5704 1 ofdrm
drm_kms_helper 101736 1 ofdrm
cfbfillrect 2896 1 drm_kms_helper
syscopyarea 2400 1 drm_kms_helper
cfbimgblt 2256 1 drm_kms_helper
sysfillrect 2920 1 drm_kms_helper
sysimgblt 2296 1 drm_kms_helper
cfbcopyarea 2376 1 drm_kms_helper
drm 288960 3 drm_shmem_helper,ofdrm,drm_kms_helper
drm_panel_orientation_quirks 16 1 drm

I use DRM [=m], DRM_OFDRM [=m], DRM_RADEON [=n], DRM_FBDEV_EMULATION [=y], FB [=y] and FB_OF [=n] in my kernel test .config. As far as I understand DRM_OFDRM and FB_OF would be mutually exclusive? Also does not seem to make a difference whether FB_SIMPLE [=y] is set.

Regards,
Erhard

Attachment: dmesg_62-rc4_g4
Description: Binary data