drm: pl111: add CONFIG_VEXPRESS_CONFIG dependency
Subsystems (3)
PATCH 1/1 drm: pl111: add CONFIG_VEXPRESS_CONFIG dependency
The vexpress_config code fails to link in some configurations:
drivers/gpu/drm/pl111/pl111_versatile.o: in function `pl111_versatile_init':
(.text+0x1f0): undefined reference to `devm_regmap_init_vexpress_config'
Add a dependency that links to this only if the dependency is there, and prevent the configuration where the drm driver is built-in but the config is a loadable module.
--- drivers/gpu/drm/pl111/Kconfig | 1 + drivers/gpu/drm/pl111/pl111_versatile.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/pl111/Kconfig +1 -0
@@ -3,6 +3,7 @@ config DRM_PL111 tristate "DRM Support for PL111 CLCD Controller" depends on DRM depends on ARM || ARM64 || COMPILE_TEST + depends on VEXPRESS_CONFIG || !VEXPRESS_CONFIG depends on COMMON_CLK select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER
drivers/gpu/drm/pl111/pl111_versatile.c +2 -1
@@ -476,7 +476,8 @@ int pl111_versatile_init(struct device *dev, struct pl111_drm_dev_private *priv) versatile_clcd_type = (enum versatile_clcd )clcd_id->data;/* Versatile Express special handling */ -if (versatile_clcd_type ==VEXPRESS_CLCD_V2M ) { +if (IS_ENABLED (CONFIG_VEXPRESS_CONFIG ) && + versatile_clcd_type ==VEXPRESS_CLCD_V2M ) {int ret =pl111_vexpress_clcd_init (dev, np, priv);of_node_put (np);if (ret)
Signature · 6 lines
2.26.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 11 lines · Arnd Bergmann
The
vexpress_configcode fails to link in some configurations:
drivers/gpu/drm/pl111/pl111_versatile.o: in function `pl111_versatile_init':
(.text+0x1f0): undefined reference to `devm_regmap_init_vexpress_config'Add a dependency that links to this only if the dependency is there, and prevent the configuration where the drm driver is built-in but the config is a loadable module.
Fixes 826fc86b5903 ("drm: pl111: Move VExpress setup into versatile init")Signed-off-by Arnd Bergmann <[email protected]>
Rob will you apply this directly to the drm tree?
Yours,
Linus Walleij
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Arnd.
Quoted 11 lines · Arnd Bergmann
The
vexpress_configcode fails to link in some configurations:
drivers/gpu/drm/pl111/pl111_versatile.o: in function `pl111_versatile_init':
(.text+0x1f0): undefined reference to `devm_regmap_init_vexpress_config'Add a dependency that links to this only if the dependency is there, and prevent the configuration where the drm driver is built-in but the config is a loadable module.
Fixes 826fc86b5903 ("drm: pl111: Move VExpress setup into versatile init")Signed-off-by Arnd Bergmann <[email protected]>
Could this be another way to fix it:
drivers/gpu/drm/pl111/pl111_versatile.c +1 -1
@@ -379,7 +379,7 @@ static int pl111_vexpress_clcd_init(struct device *dev, struct device_node *np,u32 val;int ret; -if (!IS_ENABLED (CONFIG_VEXPRESS_CONFIG )) +if (!IS_REACHABLE (CONFIG_VEXPRESS_CONFIG ))return -ENODEV ;/*
Then we no longer have the whole driver depending on the value of VEXPRESS_CONFIG.
Not that I like IS_REACHABLE() but we already had IS_ENABLED() to cover up here, and that was not enough.
With your patch would we then need the IS_ENABLED() check?
Sam
Quoted 33 lines
--- drivers/gpu/drm/pl111/Kconfig | 1 + drivers/gpu/drm/pl111/pl111_versatile.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/pl111/Kconfig +1
-0@@ -3,6 +3,7 @@ config DRM_PL111 tristate "DRM Support for PL111 CLCD Controller" depends on DRM depends on ARM || ARM64 || COMPILE_TEST + depends on VEXPRESS_CONFIG || !VEXPRESS_CONFIG depends on COMMON_CLK select DRM_KMS_HELPER select DRM_KMS_CMA_HELPERdrivers/gpu/drm/pl111/pl111_versatile.c +2
-1@@ -476,7 +476,8 @@ int pl111_versatile_init(struct device *dev, struct pl111_drm_dev_private *priv) versatile_clcd_type = (enum versatile_clcd )clcd_id->data;/* Versatile Express special handling */ -if (versatile_clcd_type ==VEXPRESS_CLCD_V2M ) { +if (IS_ENABLED (CONFIG_VEXPRESS_CONFIG ) && + versatile_clcd_type ==VEXPRESS_CLCD_V2M ) {int ret =pl111_vexpress_clcd_init (dev, np, priv);of_node_put (np);if (ret)Signature · 1 line
2.26.2
Quoted 33 lines · Sam Ravnborg
Hi Arnd.
Quoted 11 lines · Arnd Bergmann
The
vexpress_configcode fails to link in some configurations:
drivers/gpu/drm/pl111/pl111_versatile.o: in function `pl111_versatile_init':
(.text+0x1f0): undefined reference to `devm_regmap_init_vexpress_config'Add a dependency that links to this only if the dependency is there, and prevent the configuration where the drm driver is built-in but the config is a loadable module.
Fixes 826fc86b5903 ("drm: pl111: Move VExpress setup into versatile init")Signed-off-by Arnd Bergmann <[email protected]>Could this be another way to fix it:
drivers/gpu/drm/pl111/pl111_versatile.c +1
-1@@ -379,7 +379,7 @@ static int pl111_vexpress_clcd_init(struct device *dev, struct device_node *np,u32 val;int ret; -if (!IS_ENABLED (CONFIG_VEXPRESS_CONFIG )) +if (!IS_REACHABLE (CONFIG_VEXPRESS_CONFIG ))return -ENODEV ;/*
Quoted 7 lines
Then we no longer have the whole driver depending on the value of
VEXPRESS_CONFIG.
Not that I likeIS_REACHABLE()but we already hadIS_ENABLED()to cover up here, and that was not enough.With your patch would we then need the
IS_ENABLED()check?
The IS_ENABLED() check is what I'm adding, not removing. I'd still the Kconfig dependency combined with that check over IS_REACHABLE(), which is more likely to silently not work.
Arnd
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Arnd.
Quoted 39 lines · Arnd Bergmann
Quoted 38 lines · Sam Ravnborg
Hi Arnd.
Quoted 11 lines · Arnd Bergmann
The
vexpress_configcode fails to link in some configurations:
drivers/gpu/drm/pl111/pl111_versatile.o: in function `pl111_versatile_init':
(.text+0x1f0): undefined reference to `devm_regmap_init_vexpress_config'Add a dependency that links to this only if the dependency is there, and prevent the configuration where the drm driver is built-in but the config is a loadable module.
Fixes 826fc86b5903 ("drm: pl111: Move VExpress setup into versatile init")Signed-off-by Arnd Bergmann <[email protected]>Could this be another way to fix it:
drivers/gpu/drm/pl111/pl111_versatile.c +1
-1@@ -379,7 +379,7 @@ static int pl111_vexpress_clcd_init(struct device *dev, struct device_node *np,u32 val;int ret; -if (!IS_ENABLED (CONFIG_VEXPRESS_CONFIG )) +if (!IS_REACHABLE (CONFIG_VEXPRESS_CONFIG ))return -ENODEV ;/* Then we no longer have the whole driver depending on the value of
VEXPRESS_CONFIG.
Not that I likeIS_REACHABLE()but we already hadIS_ENABLED()to cover up here, and that was not enough.
Quoted 6 lines
Quoted 2 lines
With your patch would we then need the
IS_ENABLED()check?The
IS_ENABLED()check is what I'm adding, not removing. I'd still theKconfigdependency combined with that check overIS_REACHABLE(), which is more likely to silently not work.
Then the now redundant IS_ENABLED() check should go. With you patch it looks like this:
... if (IS_ENABLED(CONFIG_VEXPRESS_CONFIG) && ...) pl111_vexpress_clcd_init()
And in pl111_vexpress_clcd_init() we have:
{
if (!IS_ENABLED(CONFIG_VEXPRESS_CONFIG))
return -ENODEV;The IS_ENABLED() in pl111_vexpress_clcd_init() is redundant and the patch should drop it.
Sam
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 55 lines · Sam Ravnborg
Quoted 39 lines · Arnd Bergmann
Quoted 38 lines · Sam Ravnborg
Hi Arnd.
Quoted 11 lines · Arnd Bergmann
The
vexpress_configcode fails to link in some configurations:
drivers/gpu/drm/pl111/pl111_versatile.o: in function `pl111_versatile_init':
(.text+0x1f0): undefined reference to `devm_regmap_init_vexpress_config'Add a dependency that links to this only if the dependency is there, and prevent the configuration where the drm driver is built-in but the config is a loadable module.
Fixes 826fc86b5903 ("drm: pl111: Move VExpress setup into versatile init")Signed-off-by Arnd Bergmann <[email protected]>Could this be another way to fix it:
drivers/gpu/drm/pl111/pl111_versatile.c +1
-1@@ -379,7 +379,7 @@ static int pl111_vexpress_clcd_init(struct device *dev, struct device_node *np,u32 val;int ret; -if (!IS_ENABLED (CONFIG_VEXPRESS_CONFIG )) +if (!IS_REACHABLE (CONFIG_VEXPRESS_CONFIG ))return -ENODEV ;/* Then we no longer have the whole driver depending on the value of
VEXPRESS_CONFIG.
Not that I likeIS_REACHABLE()but we already hadIS_ENABLED()to cover up here, and that was not enough.Quoted 6 lines
Quoted 2 lines
With your patch would we then need the
IS_ENABLED()check?The
IS_ENABLED()check is what I'm adding, not removing. I'd still theKconfigdependency combined with that check overIS_REACHABLE(), which is more likely to silently not work.Then the now redundant
IS_ENABLED()check should go. With you patch it looks like this:... if (IS_ENABLED(CONFIG_VEXPRESS_CONFIG) && ...) pl111_vexpress_clcd_init()
Quoted 8 lines
And in
pl111_vexpress_clcd_init()we have:{ if (!IS_ENABLED(CONFIG_VEXPRESS_CONFIG)) return -ENODEV;The
IS_ENABLED()inpl111_vexpress_clcd_init()is redundant and the patch should drop it.
Ah I see your point now, sorry I missed the double IS_ENABLED() check at first. I'll remove the second one from my patch and resubmit after some more build testing then.
Arnd
Quoted 22 lines · Arnd Bergmann
The
vexpress_configcode fails to link in some configurations:
drivers/gpu/drm/pl111/pl111_versatile.o: in function `pl111_versatile_init':
(.text+0x1f0): undefined reference to `devm_regmap_init_vexpress_config'Add a dependency that links to this only if the dependency is there, and prevent the configuration where the drm driver is built-in but the config is a loadable module.
Fixes 826fc86b5903 ("drm: pl111: Move VExpress setup into versatile init")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/gpu/drm/pl111/Kconfig | 1 + drivers/gpu/drm/pl111/pl111_versatile.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/pl111/Kconfig +0
-0
drivers/gpu/drm/pl111/Kconfig config DRM_PL111 · line 6
Quoted 4 lines
drivers/gpu/drm/pl111/Kconfig +1
-0@@ -3,6 +3,7 @@ config DRM_PL111 tristate "DRM Support for PL111 CLCD Controller" depends on DRM depends on ARM || ARM64 || COMPILE_TEST + depends on VEXPRESS_CONFIG || !VEXPRESS_CONFIG
That's really non-obvious. Sometimes I hate kconfig. Thanks for fixing my mess.
Rob
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel