diff options
author | Benoit Parrot <bparrot@ti.com> | 2016-11-18 21:20:43 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-11-22 08:11:25 -0200 |
commit | 51b56c3941410c046c28005fce7c72f02327b42d (patch) | |
tree | a7c65115c734249599d5de15cd0c98c024da60c8 /drivers/media/platform/ti-vpe/csc.c | |
parent | ee1c02949d99be22485c790fe1c26aaa88e77837 (diff) |
[media] media: ti-vpe: Make colorspace converter library into its own module
In preparation to add colorspace conversion support to VIP,
we need to turn csc.c into its own kernel module.
Signed-off-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/ti-vpe/csc.c')
-rw-r--r-- | drivers/media/platform/ti-vpe/csc.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/media/platform/ti-vpe/csc.c b/drivers/media/platform/ti-vpe/csc.c index bec674994752..9fc6f70adeeb 100644 --- a/drivers/media/platform/ti-vpe/csc.c +++ b/drivers/media/platform/ti-vpe/csc.c @@ -14,6 +14,7 @@ #include <linux/err.h> #include <linux/io.h> +#include <linux/module.h> #include <linux/platform_device.h> #include <linux/slab.h> #include <linux/videodev2.h> @@ -105,11 +106,13 @@ void csc_dump_regs(struct csc_data *csc) #undef DUMPREG } +EXPORT_SYMBOL(csc_dump_regs); void csc_set_coeff_bypass(struct csc_data *csc, u32 *csc_reg5) { *csc_reg5 |= CSC_BYPASS; } +EXPORT_SYMBOL(csc_set_coeff_bypass); /* * set the color space converter coefficient shadow register values @@ -160,8 +163,9 @@ void csc_set_coeff(struct csc_data *csc, u32 *csc_reg0, for (; coeff < end_coeff; coeff += 2) *shadow_csc++ = (*(coeff + 1) << 16) | *coeff; } +EXPORT_SYMBOL(csc_set_coeff); -struct csc_data *csc_create(struct platform_device *pdev) +struct csc_data *csc_create(struct platform_device *pdev, const char *res_name) { struct csc_data *csc; @@ -176,9 +180,10 @@ struct csc_data *csc_create(struct platform_device *pdev) csc->pdev = pdev; csc->res = platform_get_resource_byname(pdev, IORESOURCE_MEM, - "csc"); + res_name); if (csc->res == NULL) { - dev_err(&pdev->dev, "missing platform resources data\n"); + dev_err(&pdev->dev, "missing '%s' platform resources data\n", + res_name); return ERR_PTR(-ENODEV); } @@ -190,3 +195,8 @@ struct csc_data *csc_create(struct platform_device *pdev) return csc; } +EXPORT_SYMBOL(csc_create); + +MODULE_DESCRIPTION("TI VIP/VPE Color Space Converter"); +MODULE_AUTHOR("Texas Instruments Inc."); +MODULE_LICENSE("GPL v2"); |