drivers/gpu/drm/bridge/samsung-dsim.c link error

Adam Ford aford173 at gmail.com
Thu Aug 3 15:24:44 UTC 2023


On Thu, Aug 3, 2023 at 9:42 AM Aleksandr Nogikh <nogikh at google.com> wrote:
>
> Hello,
>
> We've been seing the following linker error on arm64 syzbot instances:
>
> ld.lld: error: undefined symbol: phy_mipi_dphy_get_default_config_for_hsclk
> >>> referenced by samsung-dsim.c:731 (drivers/gpu/drm/bridge/samsung-dsim.c:731)
> >>>               drivers/gpu/drm/bridge/samsung-dsim.o:(samsung_dsim_init) in archive vmlinux.a
>
> Steps to reproduce on the latest linux-next:
>
> $ git checkout next-20230803
> $ wget -O '.config' 'https://raw.githubusercontent.com/google/syzkaller/master/dashboard/config/linux/upstream-arm64-kasan.config'
> $ make CC=clang ARCH=arm64 LD=ld.lld CROSS_COMPILE=aarch64-linux-gnu- olddefconfig
>
> This also prints:
>
> WARNING: unmet direct dependencies detected for GENERIC_PHY_MIPI_DPHY
>   Depends on [n]: GENERIC_PHY [=n]
>   Selected by [y]:
>   - DRM_NWL_MIPI_DSI [=y] && DRM_BRIDGE [=y] && DRM [=y] && COMMON_CLK [=y] && OF [=y] && HAS_IOMEM [=y]
>   - DRM_SAMSUNG_DSIM [=y] && DRM [=y] && DRM_BRIDGE [=y] && COMMON_CLK [=y] && OF [=y] && HAS_IOMEM [=y]
>
> $ make CC=clang ARCH=arm64 LD=ld.lld CROSS_COMPILE=aarch64-linux-gnu- -j$(nproc)
>
> The kernel should have still compiled fine even despite the message above, right?
>
> Could you please take a look?

GENERIC_PHY_MIPI_DPHY was enabled to use
phy_mipi_dphy_get_default_config() which takes in the pixel clock,
bits-per-pixel, number of lanes and phy structure.  It applies a bunch
of math based on the info passed and fills in the structure, but that
function itself doesn't appear to be referencing phy code, so it's
likely safe.

I think this can be resolved by enabling GENERIC_PHY.  I just checked
linux-next and when I built the arm64 defconfig, it enables
GENERIC_PHY=y, so I don't think this is an issue.  I also checked the
multi_v7_defconfig for ARM and it also sets GENERIC_PHY=y for 32-bit
ARM people using some of the Exynos boards.

I don't know what version of Linux you're trying to build, but I can't
replicate your issue.

adam


>
> --
> Thank you!
> Aleksandr


More information about the dri-devel mailing list