]> git.baikalelectronics.ru Git - kernel.git/commit
drm/rockchip: handle non-platform devices in rockchip_drm_endpoint_is_subdriver
authorAlex Bee <knaerzche@gmail.com>
Tue, 14 Sep 2021 15:07:56 +0000 (17:07 +0200)
committerHeiko Stuebner <heiko@sntech.de>
Tue, 21 Sep 2021 09:17:37 +0000 (11:17 +0200)
commita85cc5f87a7f221bbf73c86fb422edd41f11c823
tree02dc33a4aeed69fe615d0092f7dd13f3fdaca0be
parent28084a2bd61702fbef5d1ca6ec179bf5378d96e9
drm/rockchip: handle non-platform devices in rockchip_drm_endpoint_is_subdriver

As discussed at [1] rockchip_drm_endpoint_is_subdriver will currently always
return -ENODEV for non-platform-devices (e.g. external i2c bridges), what
makes them never being considered in rockchip_rgb_init.

As suggested at [1] this additionally adds a of_device_is_available for
the node found, which will work for both platform and non-platform devices.
Also we can return early for non-platform-devices if they are enabled,
as rockchip_sub_drivers contains exclusively platform-devices.

[1] https://lore.kernel.org/all/20210316182753.GA25685@earth.li/

Suggested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Alex Bee <knaerzche@gmail.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20210914150756.85190-1-knaerzche@gmail.com
drivers/gpu/drm/rockchip/rockchip_drm_drv.c