drm/arm: Kconfig annotate drivers as COMPILE_TEST
Subsystems (5)
PATCH 1/3 drm/arm: Kconfig annotate drivers as COMPILE_TEST
Add the COMPILE_TEST conditional, so that people can at least build test the drivers.
---
Please merge through the ARM tree.
Aside: would make sense to have the tree drivers in separate folders alongside each other.
With lima and panfrost in-tree, there's little point in the extra "display" for komeda. Might as well remove that one.
--- drivers/gpu/drm/arm/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/arm/Kconfig +2 -2
@@ -3,7 +3,7 @@ menu "ARM devices" config DRM_HDLCD tristate "ARM HDLCD" - depends on DRM && OF && (ARM || ARM64) + depends on DRM && OF && (ARM || ARM64 || COMPILE_TEST) depends on COMMON_CLK select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER
@@ -24,7 +24,7 @@ config DRM_HDLCD_SHOW_UNDERRUN config DRM_MALI_DISPLAY tristate "ARM Mali Display Processor" - depends on DRM && OF && (ARM || ARM64) + depends on DRM && OF && (ARM || ARM64 || COMPILE_TEST) depends on COMMON_CLK select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER
Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/3 drm/malidp: convert platform driver to use dev_groups
Platform drivers now have the option to have the platform core create and remove any needed sysfs attribute files. So take advantage of that and do not register "by hand" a sysfs file.
---
Compile tested only. Please test locally and merge through your tree.
--- drivers/gpu/drm/arm/malidp_drv.c | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-)
drivers/gpu/drm/arm/malidp_drv.c +6 -21
@@ -666,20 +666,11 @@ static ssize_t core_id_show(struct device *dev, struct device_attribute *attr,static DEVICE_ATTR_RO (core_id); -static int malidp_init_sysfs (struct device *dev) -{ -int ret =device_create_file (dev, &dev_attr_core_id); - -if (ret) -DRM_ERROR ("failed to create device file for core_id\n" ); - -return ret; -} - -static void malidp_fini_sysfs (struct device *dev) -{ -device_remove_file (dev, &dev_attr_core_id); -} +static struct attribute *mali_dp_attrs[] = { + &dev_attr_core_id.attr, +NULL , +}; +ATTRIBUTE_GROUPS (mali_dp);#define MAX_OUTPUT_CHANNELS 3
@@ -841,10 +832,6 @@ static int malidp_bind(struct device *dev)if (ret <0 ) goto query_hw_fail; - ret =malidp_init_sysfs (dev); -if (ret) - goto init_fail; -/* Set the CRTC's port so that the encoder component can find it */ malidp->crtc.port =of_graph_get_port_by_id (dev->of_node,0 );
@@ -902,8 +889,6 @@ static int malidp_bind(struct device *dev) bind_fail:of_node_put (malidp->crtc.port); malidp->crtc.port =NULL ; -init_fail: -malidp_fini_sysfs (dev);malidp_fini (drm); query_hw_fail:pm_runtime_put (dev);
@@ -937,7 +922,6 @@ static void malidp_unbind(struct device *dev)component_unbind_all (dev, drm);of_node_put (malidp->crtc.port); malidp->crtc.port =NULL ; -malidp_fini_sysfs (dev);malidp_fini (drm);pm_runtime_put (dev);if (pm_runtime_enabled (dev))
@@ -1033,6 +1017,7 @@ static struct platform_driver malidp_platform_driver = { .name = "mali-dp", .pm = &malidp_pm_ops, .of_match_table = malidp_drm_of_match, + .dev_groups = mali_dp_groups, }, };
Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/3 drm/exynos-vidi: convert platform driver to use dev_groups
In reply to Emil VelikovPlatform drivers now have the option to have the platform core create and remove any needed sysfs attribute files. So take advantage of that and do not register "by hand" a sysfs file.
---
Compile tested only. Please test locally and merge through your tree.
--- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 26 ++++++++---------------- 1 file changed, 8 insertions(+), 18 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_vidi.c +8 -18
@@ -214,6 +214,12 @@ static ssize_t vidi_store_connection(struct device *dev, static DEVICE_ATTR(connection, 0644, vidi_show_connection, vidi_store_connection); +static struct attribute *vidi_attrs[] = { + &dev_attr_connection.attr, +NULL , +}; +ATTRIBUTE_GROUPS (vidi); +int vidi_connection_ioctl (struct drm_device *drm_dev,void *data,struct drm_file *file_priv) {
@@ -439,7 +445,6 @@ static int vidi_probe(struct platform_device *pdev) {struct vidi_context *ctx;struct device *dev = &pdev->dev; -int ret; ctx =devm_kzalloc (dev,sizeof (*ctx),GFP_KERNEL );if (!ctx)
@@ -453,23 +458,7 @@ static int vidi_probe(struct platform_device *pdev)platform_set_drvdata (pdev, ctx); - ret =device_create_file (dev, &dev_attr_connection); -if (ret <0 ) { -DRM_DEV_ERROR (dev, -"failed to create connection sysfs.\n" ); -return ret; - } - - ret =component_add (dev, &vidi_component_ops); -if (ret) - goto err_remove_file; - -return ret; - -err_remove_file: -device_remove_file (dev, &dev_attr_connection); - -return ret; +return component_add (dev, &vidi_component_ops); }static int vidi_remove (struct platform_device *pdev)
@@ -494,5 +483,6 @@ struct platform_driver vidi_driver = { .driver = { .name = "exynos-drm-vidi", .owner = THIS_MODULE, + .dev_groups = vidi_groups, }, };
Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Inki Dae
maintainerRe: [PATCH 3/3] drm/exynos-vidi: convert platform driver to use dev_groups
Hi Email,
20. 5. 18. 오전 4:36에 Emil Velikov 이(가) 쓴 글:
Quoted 4 lines
Platform drivers now have the option to have the platform core create and remove any needed sysfs attribute files. So take advantage of that and do not register "by hand" a sysfs file.
Quoted 8 lines
Cc Inki Dae <[email protected]>Cc Joonyoung Shim <[email protected]>Cc Seung-Woo Kim <[email protected]>Cc Kyungmin Park <[email protected]>Signed-off-by Emil Velikov <[email protected]>---
Compile tested only. Please test locally and merge through your tree.
Thanks for taking care of this. Tested and worked well like below,
# echo 1 > /sys/devices/platform/exynos-drm-vidi/connection # modetest -M exynos -v -s 91@89:1920x1080 -s 77@54:1440x2560 setting mode 1920x1080-60Hz@XR24 on connectors 91, crtc 89 setting mode 1440x2560-60Hz@XR24 on connectors 77, crtc 54 freq: 60.22Hz freq: 50.44Hz freq: 59.78Hz freq: 50.00Hz freq: 59.77Hz freq: 50.00Hz
Ps. 91 is connector ID of exynos-drm-vidi
Merged.
Thanks,
Inki Dae
Quoted 56 lines
--- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 26 ++++++++---------------- 1 file changed, 8 insertions(+), 18 deletions(-)drivers/gpu/drm/exynos/exynos_drm_vidi.c +7
-18@@ -214,6 +214,12 @@ static ssize_t vidi_store_connection(struct device *dev, static DEVICE_ATTR(connection, 0644, vidi_show_connection, vidi_store_connection); +static struct attribute *vidi_attrs[] = { + &dev_attr_connection.attr, +NULL , +}; +ATTRIBUTE_GROUPS (vidi); +int vidi_connection_ioctl (struct drm_device *drm_dev,void *data,struct drm_file *file_priv) {@@ -439,7 +445,6 @@ static int vidi_probe(struct platform_device *pdev) {struct vidi_context *ctx;struct device *dev = &pdev->dev; -int ret; ctx =devm_kzalloc (dev,sizeof (*ctx),GFP_KERNEL );if (!ctx)@@ -453,23 +458,7 @@ static int vidi_probe(struct platform_device *pdev)platform_set_drvdata (pdev, ctx); - ret =device_create_file (dev, &dev_attr_connection); -if (ret <0 ) { -DRM_DEV_ERROR (dev, -"failed to create connection sysfs.\n" ); -return ret; - } - - ret =component_add (dev, &vidi_component_ops); -if (ret) - goto err_remove_file; - -return ret; - -err_remove_file: -device_remove_file (dev, &dev_attr_connection); - -return ret; +return component_add (dev, &vidi_component_ops); }static int vidi_remove (struct platform_device *pdev)
drivers/gpu/drm/exynos/exynos_drm_vidi.c struct platform_driver vidi_driver = { · line 488
Quoted 6 lines
drivers/gpu/drm/exynos/exynos_drm_vidi.c +1
-0@@ -494,5 +483,6 @@ struct platform_driver vidi_driver = { .driver = { .name = "exynos-drm-vidi", .owner = THIS_MODULE, + .dev_groups = vidi_groups, }, };
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 4 lines · Emil Velikov
Add the
COMPILE_TESTconditional, so that people can at least build test the drivers.Cc Liviu Dudau <[email protected]>
Quoted 6 lines
Cc Brian Starkey <[email protected]>Cc Mali DP Maintainers <[email protected]>Signed-off-by Emil Velikov <[email protected]>---
Please merge through the ARM tree.
We're not using the ARM tree anymore, we push patches through drm-misc.
I'm happy if you want to push the whole series or I can do the 2 patches that I've been Cc-ed on.
Best regards,
Liviu
Quoted 39 lines
Aside: would make sense to have the tree drivers in separate folders alongside each other.
With lima and panfrost in-tree, there's little point in the extra "display" for komeda. Might as well remove that one.
--- drivers/gpu/drm/arm/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/arm/Kconfig +2
-2@@ -3,7 +3,7 @@ menu "ARM devices" config DRM_HDLCD tristate "ARM HDLCD" - depends on DRM && OF && (ARM || ARM64) + depends on DRM && OF && (ARM || ARM64 || COMPILE_TEST) depends on COMMON_CLK select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER@@ -24,7 +24,7 @@ config DRM_HDLCD_SHOW_UNDERRUN config DRM_MALI_DISPLAY tristate "ARM Mali Display Processor" - depends on DRM && OF && (ARM || ARM64) + depends on DRM && OF && (ARM || ARM64 || COMPILE_TEST) depends on COMMON_CLK select DRM_KMS_HELPER select DRM_KMS_CMA_HELPERSignature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 12 lines
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-develQuoted 16 lines · Liviu Dudau
Quoted 4 lines · Emil Velikov
Add the
COMPILE_TESTconditional, so that people can at least build test the drivers.Cc Liviu Dudau <[email protected]>Acked-by Liviu Dudau <[email protected]>Quoted 6 lines
Cc Brian Starkey <[email protected]>Cc Mali DP Maintainers <[email protected]>Signed-off-by Emil Velikov <[email protected]>---
Please merge through the ARM tree.
Quoted 5 lines
We're not using the ARM tree anymore, we push patches through drm-misc.
I'm happy if you want to push the whole series or I can do the 2 patches that I've been Cc-ed on.
The third patch should be taken care of. So 1/3 + 2/3 need taking care of. Please do a quick runtime test for 2/3. As you can see I've only compiled it.
-Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Emil,
Quoted 17 lines · Emil Velikov
Quoted 16 lines · Liviu Dudau
Quoted 4 lines · Emil Velikov
Add the
COMPILE_TESTconditional, so that people can at least build test the drivers.Cc Liviu Dudau <[email protected]>Acked-by Liviu Dudau <[email protected]>Quoted 6 lines
Cc Brian Starkey <[email protected]>Cc Mali DP Maintainers <[email protected]>Signed-off-by Emil Velikov <[email protected]>---
Please merge through the ARM tree.
Quoted 7 lines
Quoted 5 lines
We're not using the ARM tree anymore, we push patches through drm-misc.
I'm happy if you want to push the whole series or I can do the 2 patches that I've been Cc-ed on.
The third patch should be taken care of. So 1/3 + 2/3 need taking care of. Please do a quick runtime test for 2/3. As you can see I've only compiled it.
For 1/3 + 2/3:
Best regards,
Liviu
Quoted 6 lines
-Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 12 lines
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-develQuoted 26 lines · Liviu Dudau
Hi Emil,
Quoted 22 lines · Emil Velikov
Quoted 21 lines · Liviu Dudau
Quoted 4 lines · Emil Velikov
Add the
COMPILE_TESTconditional, so that people can at least build test the drivers.Cc Liviu Dudau <[email protected]>Acked-by Liviu Dudau <[email protected]>Quoted 6 lines
Cc Brian Starkey <[email protected]>Cc Mali DP Maintainers <[email protected]>Signed-off-by Emil Velikov <[email protected]>---
Please merge through the ARM tree.We're not using the ARM tree anymore, we push patches through drm-misc.
I'm happy if you want to push the whole series or I can do the 2 patches that I've been Cc-ed on.
Quoted 8 lines
Quoted 2 lines
The third patch should be taken care of. So 1/3 + 2/3 need taking care of. Please do a quick runtime test for 2/3. As you can see I've only compiled it.
For 1/3 + 2/3:
Tested-by Liviu Dudau <[email protected]>Acked-by Liviu Dudau <[email protected]>
Thank you Liviu. Added the tags and pushed to drm-misc.
-Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel