* Re: [PATCH v2] drivers: video: fbcmap: remove the redundency and incorrect checkings
From: Chen Gang @ 2013-08-30 8:47 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <5212D594.3020802@asianux.com>
On 08/30/2013 04:41 PM, Tomi Valkeinen wrote:
> On 20/08/13 05:33, Chen Gang wrote:
>> fb_set_cmap() already checks the parameters, so need remove the
>> redundancy checking.
>>
>> This redundancy checking is also incorrect, the related warning:
>>
>> drivers/video/fbcmap.c:288:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
>>
>>
>> Signed-off-by: Chen Gang <gang.chen@asianux.com>
>> ---
>> drivers/video/fbcmap.c | 7 +------
>> 1 files changed, 1 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/video/fbcmap.c b/drivers/video/fbcmap.c
>> index 5c3960d..f89245b 100644
>> --- a/drivers/video/fbcmap.c
>> +++ b/drivers/video/fbcmap.c
>> @@ -285,13 +285,8 @@ int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *info)
>> rc = -ENODEV;
>> goto out;
>> }
>> - if (cmap->start < 0 || (!info->fbops->fb_setcolreg &&
>> - !info->fbops->fb_setcmap)) {
>> - rc = -EINVAL;
>> - goto out1;
>> - }
>> +
>> rc = fb_set_cmap(&umap, info);
>> -out1:
>> unlock_fb_info(info);
>> out:
>> fb_dealloc_cmap(&umap);
>>
>
> Thanks, queued this for 3.12.
>
Thank you too.
> Tomi
>
>
--
Chen Gang
^ permalink raw reply
* Re: [PATCH] fbmem: move EXPORT_SYMBOL annotation next to symbol declarations
From: Tomi Valkeinen @ 2013-08-30 8:44 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <1376575975-13215-1-git-send-email-zonque@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 335 bytes --]
On 15/08/13 17:12, Daniel Mack wrote:
> Just a cosmetic thing to bring that file in line with others in the
> tree.
>
> Signed-off-by: Daniel Mack <zonque@gmail.com>
> ---
> drivers/video/fbmem.c | 29 +++++++++++++----------------
> 1 file changed, 13 insertions(+), 16 deletions(-)
Thanks, queued for 3.12.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply
* Re: [PATCH] drivers: video: i740fb: add 'default' processing contents for 'switch'.
From: Chen Gang @ 2013-08-30 8:44 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <51ECF12D.8060903@asianux.com>
On 08/30/2013 04:36 PM, Tomi Valkeinen wrote:
> On 30/08/13 11:17, Chen Gang wrote:
>> On 08/30/2013 03:21 PM, Tomi Valkeinen wrote:
>
>>> I don't think you should use BUG there. BUG should be used when there's
>>> not really a good way to continue. Here you could have just a WARN, and
>>> return some default FIFO watermark value.
>>>
>>
>> i740_calc_fifo() is a static function, so we can check its caller's
>> information to find the suitable fixing ways (for extern function, we
>> almost can not do like this).
>>
>> it has only one caller i740fb_decode_var(), which has already let 'bpp'
>> within the values (8, 15, 16, 24, 32). So if another values occurs, it
>> must be a BUG (e.g. the stack may override under ia32).
>
> My point was that there should almost never be need for BUG in a normal
> driver. BUG means that the whole kernel will probably halt. Even if an
> fb driver encounters a problem that should never happen, it should maybe
> give a WARN, and continue or fail in a controlled manner.
>
e.g when the stack is override under ia32, it is better to stop continue
as soon as possible to try to avoid the kernel continue blindly, that
may let the coredump/KDB analyzers' work much easier.
Hmm... when driver cause issue, it has effect with the whole kernel
(kernel may die soon), so BUG() is used under the whole kernel wide
(include normal drivers).
> Tomi
>
>
Thanks.
--
Chen Gang
^ permalink raw reply
* Re: [PATCH v2] drivers: video: fbcmap: remove the redundency and incorrect checkings
From: Tomi Valkeinen @ 2013-08-30 8:41 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <5212D594.3020802@asianux.com>
[-- Attachment #1: Type: text/plain, Size: 1088 bytes --]
On 20/08/13 05:33, Chen Gang wrote:
> fb_set_cmap() already checks the parameters, so need remove the
> redundancy checking.
>
> This redundancy checking is also incorrect, the related warning:
>
> drivers/video/fbcmap.c:288:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
>
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> ---
> drivers/video/fbcmap.c | 7 +------
> 1 files changed, 1 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/video/fbcmap.c b/drivers/video/fbcmap.c
> index 5c3960d..f89245b 100644
> --- a/drivers/video/fbcmap.c
> +++ b/drivers/video/fbcmap.c
> @@ -285,13 +285,8 @@ int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *info)
> rc = -ENODEV;
> goto out;
> }
> - if (cmap->start < 0 || (!info->fbops->fb_setcolreg &&
> - !info->fbops->fb_setcmap)) {
> - rc = -EINVAL;
> - goto out1;
> - }
> +
> rc = fb_set_cmap(&umap, info);
> -out1:
> unlock_fb_info(info);
> out:
> fb_dealloc_cmap(&umap);
>
Thanks, queued this for 3.12.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply
* Re: [PATCH] drivers: video: i740fb: add 'default' processing contents for 'switch'.
From: Tomi Valkeinen @ 2013-08-30 8:36 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <51ECF12D.8060903@asianux.com>
[-- Attachment #1: Type: text/plain, Size: 976 bytes --]
On 30/08/13 11:17, Chen Gang wrote:
> On 08/30/2013 03:21 PM, Tomi Valkeinen wrote:
>> I don't think you should use BUG there. BUG should be used when there's
>> not really a good way to continue. Here you could have just a WARN, and
>> return some default FIFO watermark value.
>>
>
> i740_calc_fifo() is a static function, so we can check its caller's
> information to find the suitable fixing ways (for extern function, we
> almost can not do like this).
>
> it has only one caller i740fb_decode_var(), which has already let 'bpp'
> within the values (8, 15, 16, 24, 32). So if another values occurs, it
> must be a BUG (e.g. the stack may override under ia32).
My point was that there should almost never be need for BUG in a normal
driver. BUG means that the whole kernel will probably halt. Even if an
fb driver encounters a problem that should never happen, it should maybe
give a WARN, and continue or fail in a controlled manner.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply
* Re: [PATCH] drivers: video: i740fb: add 'default' processing contents for 'switch'.
From: Chen Gang @ 2013-08-30 8:17 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <51ECF12D.8060903@asianux.com>
On 08/30/2013 03:21 PM, Tomi Valkeinen wrote:
> On 22/07/13 11:45, Chen Gang wrote:
>> Need add related 'default' processing contents for 'switch', or may
>> report 'wm' uninitialized warning.
>>
>> The related warning:
>>
>> drivers/video/i740fb.c:662:26: warning: �wm� may be used uninitialized in this function [-Wmaybe-uninitialized]
>>
>>
>> Signed-off-by: Chen Gang <gang.chen@asianux.com>
>> ---
>> drivers/video/i740fb.c | 3 +++
>> 1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/video/i740fb.c b/drivers/video/i740fb.c
>> index 6c48388..e82e767 100644
>> --- a/drivers/video/i740fb.c
>> +++ b/drivers/video/i740fb.c
>> @@ -336,6 +336,9 @@ static u32 i740_calc_fifo(struct i740fb_par *par, u32 freq, int bpp)
>> wm = 0x16110000;
>> }
>> break;
>> + default:
>> + wm = 0;
>> + BUG();
>> }
>
> I don't think you should use BUG there. BUG should be used when there's
> not really a good way to continue. Here you could have just a WARN, and
> return some default FIFO watermark value.
>
i740_calc_fifo() is a static function, so we can check its caller's
information to find the suitable fixing ways (for extern function, we
almost can not do like this).
it has only one caller i740fb_decode_var(), which has already let 'bpp'
within the values (8, 15, 16, 24, 32). So if another values occurs, it
must be a BUG (e.g. the stack may override under ia32).
Hmm... it really has quite a few same cases in kernel wide like our
case, but at least they do not report warnings (this does not like our
case), so let just fix our case to satisfy the compiler. :-)
> Tomi
>
>
Thanks.
--
Chen Gang
^ permalink raw reply
* Re: [PATCH] omap2: panel-generic: Added panel parameters for ortus-com37h3m05dtc/99dtc and sharp-lq0
From: Tomi Valkeinen @ 2013-08-30 7:57 UTC (permalink / raw)
To: Marek Belisko
Cc: plagnioj, linux-omap, linux-fbdev, linux-kernel,
H. Nikolaus Schaller
In-Reply-To: <1377779724-30648-1-git-send-email-marek@goldelico.com>
[-- Attachment #1: Type: text/plain, Size: 862 bytes --]
On 29/08/13 15:35, Marek Belisko wrote:
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> Signed-off-by: Marek Belisko <marek@goldelico.com>
> ---
> drivers/video/omap2/displays/panel-generic-dpi.c | 53 ++++++++++++++++++++++++
> 1 file changed, 53 insertions(+)
>
> diff --git a/drivers/video/omap2/displays/panel-generic-dpi.c b/drivers/video/omap2/displays/panel-generic-dpi.c
> index bebebd4..d573291 100644
> --- a/drivers/video/omap2/displays/panel-generic-dpi.c
> +++ b/drivers/video/omap2/displays/panel-generic-dpi.c
> @@ -107,6 +107,33 @@ static struct panel_config generic_dpi_panels[] = {
> .name = "sharp_ls",
> },
The drivers in drivers/video/omap2/displays/ are on their way out, and
will probably be removed for 3.12. Please look at the new one at
drivers/video/omap2/displays-new/panel-dpi.c.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply
* Re: [PATCH 2/29] video: mxsfb: simplify use of devm_ioremap_resource
From: Tomi Valkeinen @ 2013-08-30 7:51 UTC (permalink / raw)
To: Julia Lawall
Cc: Jean-Christophe Plagniol-Villard, kernel-janitors, linux-fbdev,
linux-kernel
In-Reply-To: <1376471493-22215-3-git-send-email-Julia.Lawall@lip6.fr>
[-- Attachment #1: Type: text/plain, Size: 1991 bytes --]
On 14/08/13 12:11, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Remove unneeded error handling on the result of a call to
> platform_get_resource when the value is passed to devm_ioremap_resource.
>
> Move the call to platform_get_resource adjacent to the call to
> devm_ioremap_resource to make the connection between them more clear.
>
> A simplified version of the semantic patch that makes this change is as
> follows: (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression pdev,res,n,e,e1;
> expression ret != 0;
> identifier l;
> @@
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, n);
> ... when != res
> - if (res == NULL) { ... \(goto l;\|return ret;\) }
> ... when != res
> + res = platform_get_resource(pdev, IORESOURCE_MEM, n);
> e = devm_ioremap_resource(e1, res);
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> drivers/video/mxsfb.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
> index c2d3514..d250ed0 100644
> --- a/drivers/video/mxsfb.c
> +++ b/drivers/video/mxsfb.c
> @@ -855,12 +855,6 @@ static int mxsfb_probe(struct platform_device *pdev)
> if (of_id)
> pdev->id_entry = of_id->data;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!res) {
> - dev_err(&pdev->dev, "Cannot get memory IO resource\n");
> - return -ENODEV;
> - }
> -
> fb_info = framebuffer_alloc(sizeof(struct mxsfb_info), &pdev->dev);
> if (!fb_info) {
> dev_err(&pdev->dev, "Failed to allocate fbdev\n");
> @@ -869,6 +863,7 @@ static int mxsfb_probe(struct platform_device *pdev)
>
> host = to_imxfb_host(fb_info);
>
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> host->base = devm_ioremap_resource(&pdev->dev, res);
> if (IS_ERR(host->base)) {
> ret = PTR_ERR(host->base);
>
Thanks, queued for 3.12.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply
* Re: [PATCH] Release efifb's colormap in efifb_destroy()
From: Tomi Valkeinen @ 2013-08-30 7:47 UTC (permalink / raw)
To: Peter Jones
Cc: Catalin Marinas, Alexandra N. Kossovsky, linux-fbdev,
linux-kernel
In-Reply-To: <1374767291-2874-1-git-send-email-pjones@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1930 bytes --]
On 25/07/13 18:48, Peter Jones wrote:
> This was found by Alexandra Kossovsky, who noted this traceback from
> kmemleak:
>
>> unreferenced object 0xffff880216fcfe00 (size 512):
>> comm "swapper/0", pid 1, jiffies 4294895429 (age 1415.320s)
>> hex dump (first 32 bytes):
>> 00 00 00 00 00 00 00 00 aa aa aa aa aa aa aa aa ................
>> 55 55 55 55 55 55 55 55 ff ff ff ff ff ff ff ff UUUUUUUU........
>> backtrace:
>> [<ffffffff813e415c>] kmemleak_alloc+0x21/0x3e
>> [<ffffffff8111c17f>]
>> kmemleak_alloc_recursive.constprop.57+0x16/0x18
>> [<ffffffff8111e63b>] __kmalloc+0xf9/0x144
>> [<ffffffff8123d9cf>] fb_alloc_cmap_gfp+0x47/0xe1
>> [<ffffffff8123da77>] fb_alloc_cmap+0xe/0x10
>> [<ffffffff81aff40a>] efifb_probe+0x3e9/0x48f
>> [<ffffffff812c566f>] platform_drv_probe+0x34/0x5e
>> [<ffffffff812c3e6d>] driver_probe_device+0x98/0x1b4
>> [<ffffffff812c3fd7>] __driver_attach+0x4e/0x6f
>> [<ffffffff812c25bf>] bus_for_each_dev+0x57/0x8a
>> [<ffffffff812c3984>] driver_attach+0x19/0x1b
>> [<ffffffff812c362b>] bus_add_driver+0xde/0x201
>> [<ffffffff812c453f>] driver_register+0x8c/0x110
>> [<ffffffff812c510d>] platform_driver_register+0x41/0x43
>> [<ffffffff812c5127>] platform_driver_probe+0x18/0x8a
>> [<ffffffff81aff002>] efifb_init+0x276/0x295
> ---
> drivers/video/efifb.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
> index 390b61b..1f3eab3 100644
> --- a/drivers/video/efifb.c
> +++ b/drivers/video/efifb.c
> @@ -289,6 +289,7 @@ static void efifb_destroy(struct fb_info *info)
> if (request_mem_succeeded)
> release_mem_region(info->apertures->ranges[0].base,
> info->apertures->ranges[0].size);
> + fb_dealloc_cmap(&info->cmap);
> framebuffer_release(info);
> }
>
Thanks, queued for 3.12.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply
* Re: [PATCH] drivers: video: i740fb: add 'default' processing contents for 'switch'.
From: Tomi Valkeinen @ 2013-08-30 7:21 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <51ECF12D.8060903@asianux.com>
[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]
On 22/07/13 11:45, Chen Gang wrote:
> Need add related 'default' processing contents for 'switch', or may
> report 'wm' uninitialized warning.
>
> The related warning:
>
> drivers/video/i740fb.c:662:26: warning: ‘wm’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> ---
> drivers/video/i740fb.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/video/i740fb.c b/drivers/video/i740fb.c
> index 6c48388..e82e767 100644
> --- a/drivers/video/i740fb.c
> +++ b/drivers/video/i740fb.c
> @@ -336,6 +336,9 @@ static u32 i740_calc_fifo(struct i740fb_par *par, u32 freq, int bpp)
> wm = 0x16110000;
> }
> break;
> + default:
> + wm = 0;
> + BUG();
> }
I don't think you should use BUG there. BUG should be used when there's
not really a good way to continue. Here you could have just a WARN, and
return some default FIFO watermark value.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply
* Re: [PATCH v4 3/5] at91/avr32/atmel_lcdfb: prepare clk before calling enable
From: Tomi Valkeinen @ 2013-08-30 7:18 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1374133225-19141-1-git-send-email-b.brezillon@overkiz.com>
[-- Attachment #1: Type: text/plain, Size: 1225 bytes --]
On 18/07/13 10:40, Boris BREZILLON wrote:
> Replace clk_enable/disable with clk_prepare_enable/disable_unprepare to
> avoid common clk framework warnings.
>
> Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
> drivers/video/atmel_lcdfb.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
> index ece49d5..bf9c5d0 100644
> --- a/drivers/video/atmel_lcdfb.c
> +++ b/drivers/video/atmel_lcdfb.c
> @@ -954,14 +954,14 @@ static int __init atmel_lcdfb_init_fbinfo(struct atmel_lcdfb_info *sinfo)
>
> static void atmel_lcdfb_start_clock(struct atmel_lcdfb_info *sinfo)
> {
> - clk_enable(sinfo->bus_clk);
> - clk_enable(sinfo->lcdc_clk);
> + clk_prepare_enable(sinfo->bus_clk);
> + clk_prepare_enable(sinfo->lcdc_clk);
> }
>
> static void atmel_lcdfb_stop_clock(struct atmel_lcdfb_info *sinfo)
> {
> - clk_disable(sinfo->bus_clk);
> - clk_disable(sinfo->lcdc_clk);
> + clk_disable_unprepare(sinfo->bus_clk);
> + clk_disable_unprepare(sinfo->lcdc_clk);
> }
>
> #ifdef CONFIG_OF
Thanks, queued this for 3.12.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply
* Re: [PATCH] video: exynos: Ensure definitions match prototypes
From: Tomi Valkeinen @ 2013-08-30 7:15 UTC (permalink / raw)
To: Mark Brown
Cc: Jingoo Han, linux-fbdev, linux-samsung-soc, linaro-kernel,
Mark Brown
In-Reply-To: <1372764414-9102-1-git-send-email-broonie@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 355 bytes --]
On 02/07/13 14:26, Mark Brown wrote:
> From: Mark Brown <broonie@linaro.org>
>
> Ensure that the definitions of functions match the prototypes used by
> other modules by including the header with the prototypes in the files
> with the definitions.
>
> Signed-off-by: Mark Brown <broonie@linaro.org>
Thanks, queued this for 3.12.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply
* Re: [PATCH 00/15] OMAPDSS: remove old panel model code
From: Tomi Valkeinen @ 2013-08-30 6:00 UTC (permalink / raw)
To: Archit Taneja; +Cc: linux-omap, linux-fbdev
In-Reply-To: <521F5C35.4040106@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1023 bytes --]
On 29/08/13 17:35, Archit Taneja wrote:
> On Thursday 29 August 2013 07:01 PM, Tomi Valkeinen wrote:
>> Here's a series removing all the old panel model code from the omapdss
>> driver.
>> This series depends on the series that changes the board files to use
>> the new
>> panel drivers.
>>
>> There's nothing much special in this series, as it's mostly removing
>> code that
>> is not used. There are also related cleanups, like making functions
>> static if
>> they are no longer called from outside the file, and such.
>>
>> Tested on OMAP4 SDP, OMAP4 Panda, OMAP3 Beagle, OMAP3 Beagle xM.
>>
>> This series can also be found from:
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git
>> 3.12/dss-legacy-removal
>>
>
> For the series:
>
> Reviewed-by: Archit Taneja <archit@ti.com>
> Acked-by: Archit Taneja <archit@ti.com>
Thanks for review. I've updated the branch in my git tree.
You may want to rebase your HDMI work on top of this branch at some point.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply
* Re: [PATCH 13/15] OMAPDSS: DSS: remove legacy dss bus support
From: Tomi Valkeinen @ 2013-08-30 5:52 UTC (permalink / raw)
To: Archit Taneja; +Cc: linux-omap, linux-fbdev
In-Reply-To: <521F5B80.6080802@ti.com>
[-- Attachment #1: Type: text/plain, Size: 751 bytes --]
On 29/08/13 17:32, Archit Taneja wrote:
> On Thursday 29 August 2013 07:01 PM, Tomi Valkeinen wrote:
>> With all the old panels removed and all the old panel model APIs removed
>> from the DSS encoders, we can now remove the custom omapdss-bus which
>> was used in the old panel model.
>>
>> static void __exit omap_dss_exit(void)
>> {
>> omap_dss_unregister_drivers();
>> -
>> - omap_dss_bus_unregister();
>> }
>>
>> module_init(omap_dss_init);
>> module_exit(omap_dss_exit);
>
> minor comment here, we could use
> omap_dss_register_driver/unregister_driver for the module_init/exit
> directly, the funcs omap_dss_init/ext don't seem to be doing much here.
Yes, that's true. I'll clean it up.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply
* Re: [PATCH/RFC v3 06/19] video: display: OF support
From: Laurent Pinchart @ 2013-08-30 0:47 UTC (permalink / raw)
To: Philipp Zabel; +Cc: Laurent Pinchart, dri-devel, linux-fbdev, linux-media
In-Reply-To: <1377595851.4338.18.camel@pizza.hi.pengutronix.de>
Hi Philipp,
On Tuesday 27 August 2013 11:30:51 Philipp Zabel wrote:
> Hi Laurent,
>
> I have another small issue with the graph helpers below:
>
> Am Samstag, den 10.08.2013, 01:03 +0200 schrieb Laurent Pinchart:
> [...]
>
> > +/*
> > -------------------------------------------------------------------------
> > ---->
> > * Graph Helpers
> > */
> >
> > @@ -420,6 +599,161 @@ int display_entity_link_graph(struct device *dev,
> > struct list_head *entities)>
> > }
> > EXPORT_SYMBOL_GPL(display_entity_link_graph);
> >
> > +#ifdef CONFIG_OF
> > +
> > +static int display_of_entity_link_entity(struct device *dev,
> > + struct display_entity *entity,
> > + struct list_head *entities,
> > + struct display_entity *root)
> > +{
> > + u32 link_flags = MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED;
> > + const struct device_node *node = entity->dev->of_node;
> > + struct media_entity *local = &entity->entity;
> > + struct device_node *ep = NULL;
> > + int ret = 0;
> > +
> > + dev_dbg(dev, "creating links for entity %s\n", local->name);
> > +
> > + while (1) {
> > + struct media_entity *remote = NULL;
> > + struct media_pad *remote_pad;
> > + struct media_pad *local_pad;
> > + struct display_of_link link;
> > + struct display_entity *ent;
> > + struct device_node *next;
> > +
> > + /* Get the next endpoint and parse its link. */
> > + next = display_of_get_next_endpoint(node, ep);
> > + if (next = NULL)
> > + break;
> > +
> > + of_node_put(ep);
> > + ep = next;
> > +
> > + dev_dbg(dev, "processing endpoint %s\n", ep->full_name);
> > +
> > + ret = display_of_parse_link(ep, &link);
> > + if (ret < 0) {
> > + dev_err(dev, "failed to parse link for %s\n",
> > + ep->full_name);
> > + continue;
> > + }
> > +
> > + /* Skip source pads, they will be processed from the other end of
> > + * the link.
> > + */
> > + if (link.local_port >= local->num_pads) {
> > + dev_err(dev, "invalid port number %u on %s\n",
> > + link.local_port, link.local_node->full_name);
> > + display_of_put_link(&link);
> > + ret = -EINVAL;
> > + break;
> > + }
> > +
> > + local_pad = &local->pads[link.local_port];
> > +
> > + if (local_pad->flags & MEDIA_PAD_FL_SOURCE) {
> > + dev_dbg(dev, "skipping source port %s:%u\n",
> > + link.local_node->full_name, link.local_port);
> > + display_of_put_link(&link);
> > + continue;
> > + }
> > +
> > + /* Find the remote entity. If not found, just skip the link as
> > + * it goes out of scope of the entities handled by the notifier.
> > + */
> > + list_for_each_entry(ent, entities, list) {
> > + if (ent->dev->of_node = link.remote_node) {
> > + remote = &ent->entity;
> > + break;
> > + }
> > + }
> > +
> > + if (root->dev->of_node = link.remote_node)
> > + remote = &root->entity;
> > +
> > + if (remote = NULL) {
> > + dev_dbg(dev, "no entity found for %s\n",
> > + link.remote_node->full_name);
> > + display_of_put_link(&link);
> > + continue;
> > + }
> > +
> > + if (link.remote_port >= remote->num_pads) {
> > + dev_err(dev, "invalid port number %u on %s\n",
> > + link.remote_port, link.remote_node->full_name);
> > + display_of_put_link(&link);
> > + ret = -EINVAL;
> > + break;
> > + }
> > +
> > + remote_pad = &remote->pads[link.remote_port];
> > +
> > + display_of_put_link(&link);
> > +
> > + /* Create the media link. */
> > + dev_dbg(dev, "creating %s:%u -> %s:%u link\n",
> > + remote->name, remote_pad->index,
> > + local->name, local_pad->index);
> > +
> > + ret = media_entity_create_link(remote, remote_pad->index,
> > + local, local_pad->index,
> > + link_flags);
> > + if (ret < 0) {
> > + dev_err(dev,
> > + "failed to create %s:%u -> %s:%u link\n",
> > + remote->name, remote_pad->index,
> > + local->name, local_pad->index);
> > + break;
> > + }
> > + }
> > +
> > + of_node_put(ep);
> > + return ret;
> > +}
> > +
> > +/**
> > + * display_of_entity_link_graph - Link all entities in a graph
> > + * @dev: device used to print debugging and error messages
> > + * @root: optional root display entity
> > + * @entities: list of display entities in the graph
> > + *
> > + * This function creates media controller links for all entities in a
> > graph + * based on the device tree graph representation. It relies on all
> > entities + * having been instantiated from the device tree.
> > + *
> > + * The list of entities is typically taken directly from a display
> > notifier + * done list. It will thus not include any display entity not
> > handled by the + * notifier, such as entities directly accessible by the
> > caller without going + * through the notification process. The optional
> > root entity parameter can be + * used to pass such a display entity and
> > include it in the graph. For all + * practical purpose the root entity is
> > handled is if it was part of the + * entities list.
> > + *
> > + * Return 0 on success or a negative error code otherwise.
> > + */
> > +int display_of_entity_link_graph(struct device *dev, struct list_head
> > *entities, + struct display_entity *root)
> > +{
> > + struct display_entity *entity;
> > + int ret;
> > +
> > + list_for_each_entry(entity, entities, list) {
> > + if (WARN_ON(entity->match->type != DISPLAY_ENTITY_BUS_DT))
> > + return -EINVAL;
> > +
> > + ret = display_of_entity_link_entity(dev, entity, entities,
> > + root);
> > + if (ret < 0)
> > + return ret;
> > + }
> > +
> > + return display_of_entity_link_entity(dev, root, entities, root);
> > +}
> > +EXPORT_SYMBOL_GPL(display_of_entity_link_graph);
>
> The root display entity given to display_of_entity_link_graph is documented
> to be optional. Therefore, do not try to dereference root if it is NULL:
Good catch ! I'll fix it in v4, thank you.
> diff --git a/drivers/video/display/display-core.c
> b/drivers/video/display/display-core.c index 328ead7..6c8094f 100644
> --- a/drivers/video/display/display-core.c
> +++ b/drivers/video/display/display-core.c
> @@ -669,7 +669,7 @@ static int display_of_entity_link_entity(struct device
> *dev, }
> }
>
> - if (root->dev->of_node = link.remote_node)
> + if (root && root->dev->of_node = link.remote_node)
> remote = &root->entity;
>
> if (remote = NULL) {
> @@ -748,6 +748,9 @@ int display_of_entity_link_graph(struct device *dev,
> struct list_head *entities, return ret;
> }
>
> + if (!root)
> + return 0;
> +
> return display_of_entity_link_entity(dev, root, entities, root);
> }
> EXPORT_SYMBOL_GPL(display_of_entity_link_graph);
--
Regards,
Laurent Pinchart
^ permalink raw reply
* Re: [PATCH 00/15] OMAPDSS: remove old panel model code
From: Archit Taneja @ 2013-08-29 14:47 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev
In-Reply-To: <1377783120-14001-1-git-send-email-tomi.valkeinen@ti.com>
On Thursday 29 August 2013 07:01 PM, Tomi Valkeinen wrote:
> Here's a series removing all the old panel model code from the omapdss driver.
> This series depends on the series that changes the board files to use the new
> panel drivers.
>
> There's nothing much special in this series, as it's mostly removing code that
> is not used. There are also related cleanups, like making functions static if
> they are no longer called from outside the file, and such.
>
> Tested on OMAP4 SDP, OMAP4 Panda, OMAP3 Beagle, OMAP3 Beagle xM.
>
> This series can also be found from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git 3.12/dss-legacy-removal
>
For the series:
Reviewed-by: Archit Taneja <archit@ti.com>
Acked-by: Archit Taneja <archit@ti.com>
Thanks,
Archit
^ permalink raw reply
* Re: [PATCH 13/15] OMAPDSS: DSS: remove legacy dss bus support
From: Archit Taneja @ 2013-08-29 14:44 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev
In-Reply-To: <1377783120-14001-14-git-send-email-tomi.valkeinen@ti.com>
On Thursday 29 August 2013 07:01 PM, Tomi Valkeinen wrote:
> With all the old panels removed and all the old panel model APIs removed
> from the DSS encoders, we can now remove the custom omapdss-bus which
> was used in the old panel model.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
> drivers/video/omap2/dss/core.c | 279 +----------------------------------------
> drivers/video/omap2/dss/dss.h | 9 --
> include/video/omapdss.h | 6 -
> 3 files changed, 3 insertions(+), 291 deletions(-)
>
> diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
> index 71e6a77..54f3320 100644
> --- a/drivers/video/omap2/dss/core.c
> +++ b/drivers/video/omap2/dss/core.c
> @@ -248,235 +248,6 @@ static struct platform_driver omap_dss_driver = {
> },
> };
>
> -/* BUS */
> -static int dss_bus_match(struct device *dev, struct device_driver *driver)
> -{
> - struct omap_dss_device *dssdev = to_dss_device(dev);
> -
> - DSSDBG("bus_match. dev %s/%s, drv %s\n",
> - dev_name(dev), dssdev->driver_name, driver->name);
> -
> - return strcmp(dssdev->driver_name, driver->name) = 0;
> -}
> -
> -static struct bus_type dss_bus_type = {
> - .name = "omapdss",
> - .match = dss_bus_match,
> -};
> -
> -static void dss_bus_release(struct device *dev)
> -{
> - DSSDBG("bus_release\n");
> -}
> -
> -static struct device dss_bus = {
> - .release = dss_bus_release,
> -};
> -
> -struct bus_type *dss_get_bus(void)
> -{
> - return &dss_bus_type;
> -}
> -
> -/* DRIVER */
> -static int dss_driver_probe(struct device *dev)
> -{
> - int r;
> - struct omap_dss_driver *dssdrv = to_dss_driver(dev->driver);
> - struct omap_dss_device *dssdev = to_dss_device(dev);
> -
> - DSSDBG("driver_probe: dev %s/%s, drv %s\n",
> - dev_name(dev), dssdev->driver_name,
> - dssdrv->driver.name);
> -
> - r = dssdrv->probe(dssdev);
> -
> - if (r) {
> - DSSERR("driver probe failed: %d\n", r);
> - return r;
> - }
> -
> - DSSDBG("probe done for device %s\n", dev_name(dev));
> -
> - dssdev->driver = dssdrv;
> -
> - return 0;
> -}
> -
> -static int dss_driver_remove(struct device *dev)
> -{
> - struct omap_dss_driver *dssdrv = to_dss_driver(dev->driver);
> - struct omap_dss_device *dssdev = to_dss_device(dev);
> -
> - DSSDBG("driver_remove: dev %s/%s\n", dev_name(dev),
> - dssdev->driver_name);
> -
> - dssdrv->remove(dssdev);
> -
> - dssdev->driver = NULL;
> -
> - return 0;
> -}
> -
> -static int omapdss_default_connect(struct omap_dss_device *dssdev)
> -{
> - struct omap_dss_device *out;
> - struct omap_overlay_manager *mgr;
> - int r;
> -
> - out = dssdev->output;
> -
> - if (out = NULL)
> - return -ENODEV;
> -
> - mgr = omap_dss_get_overlay_manager(out->dispc_channel);
> - if (!mgr)
> - return -ENODEV;
> -
> - r = dss_mgr_connect(mgr, out);
> - if (r)
> - return r;
> -
> - return 0;
> -}
> -
> -static void omapdss_default_disconnect(struct omap_dss_device *dssdev)
> -{
> - struct omap_dss_device *out;
> - struct omap_overlay_manager *mgr;
> -
> - out = dssdev->output;
> -
> - if (out = NULL)
> - return;
> -
> - mgr = out->manager;
> -
> - if (mgr = NULL)
> - return;
> -
> - dss_mgr_disconnect(mgr, out);
> -}
> -
> -int omap_dss_register_driver(struct omap_dss_driver *dssdriver)
> -{
> - dssdriver->driver.bus = &dss_bus_type;
> - dssdriver->driver.probe = dss_driver_probe;
> - dssdriver->driver.remove = dss_driver_remove;
> -
> - if (dssdriver->get_resolution = NULL)
> - dssdriver->get_resolution = omapdss_default_get_resolution;
> - if (dssdriver->get_recommended_bpp = NULL)
> - dssdriver->get_recommended_bpp > - omapdss_default_get_recommended_bpp;
> - if (dssdriver->get_timings = NULL)
> - dssdriver->get_timings = omapdss_default_get_timings;
> - if (dssdriver->connect = NULL)
> - dssdriver->connect = omapdss_default_connect;
> - if (dssdriver->disconnect = NULL)
> - dssdriver->disconnect = omapdss_default_disconnect;
> -
> - return driver_register(&dssdriver->driver);
> -}
> -EXPORT_SYMBOL(omap_dss_register_driver);
> -
> -void omap_dss_unregister_driver(struct omap_dss_driver *dssdriver)
> -{
> - driver_unregister(&dssdriver->driver);
> -}
> -EXPORT_SYMBOL(omap_dss_unregister_driver);
> -
> -/* DEVICE */
> -
> -static void omap_dss_dev_release(struct device *dev)
> -{
> - struct omap_dss_device *dssdev = to_dss_device(dev);
> - kfree(dssdev);
> -}
> -
> -static int disp_num_counter;
> -
> -struct omap_dss_device *dss_alloc_and_init_device(struct device *parent)
> -{
> - struct omap_dss_device *dssdev;
> -
> - dssdev = kzalloc(sizeof(*dssdev), GFP_KERNEL);
> - if (!dssdev)
> - return NULL;
> -
> - dssdev->old_dev.bus = &dss_bus_type;
> - dssdev->old_dev.parent = parent;
> - dssdev->old_dev.release = omap_dss_dev_release;
> - dev_set_name(&dssdev->old_dev, "display%d", disp_num_counter++);
> -
> - device_initialize(&dssdev->old_dev);
> -
> - return dssdev;
> -}
> -
> -int dss_add_device(struct omap_dss_device *dssdev)
> -{
> - dssdev->dev = &dssdev->old_dev;
> -
> - omapdss_register_display(dssdev);
> - return device_add(&dssdev->old_dev);
> -}
> -
> -void dss_put_device(struct omap_dss_device *dssdev)
> -{
> - put_device(&dssdev->old_dev);
> -}
> -
> -void dss_unregister_device(struct omap_dss_device *dssdev)
> -{
> - device_unregister(&dssdev->old_dev);
> - omapdss_unregister_display(dssdev);
> -}
> -
> -static int dss_unregister_dss_dev(struct device *dev, void *data)
> -{
> - struct omap_dss_device *dssdev = to_dss_device(dev);
> - dss_unregister_device(dssdev);
> - return 0;
> -}
> -
> -void dss_unregister_child_devices(struct device *parent)
> -{
> - device_for_each_child(parent, NULL, dss_unregister_dss_dev);
> -}
> -
> -void dss_copy_device_pdata(struct omap_dss_device *dst,
> - const struct omap_dss_device *src)
> -{
> - u8 *d = (u8 *)dst;
> - u8 *s = (u8 *)src;
> - size_t dsize = sizeof(struct device);
> -
> - memcpy(d + dsize, s + dsize, sizeof(struct omap_dss_device) - dsize);
> -}
> -
> -/* BUS */
> -static int __init omap_dss_bus_register(void)
> -{
> - int r;
> -
> - r = bus_register(&dss_bus_type);
> - if (r) {
> - DSSERR("bus register failed\n");
> - return r;
> - }
> -
> - dev_set_name(&dss_bus, "omapdss");
> - r = device_register(&dss_bus);
> - if (r) {
> - DSSERR("bus driver register failed\n");
> - bus_unregister(&dss_bus_type);
> - return r;
> - }
> -
> - return 0;
> -}
> -
> /* INIT */
> static int (*dss_output_drv_reg_funcs[])(void) __initdata = {
> #ifdef CONFIG_OMAP2_DSS_DSI
> @@ -553,6 +324,8 @@ static int __init omap_dss_register_drivers(void)
> dss_output_drv_loaded[i] = true;
> }
>
> + dss_initialized = true;
> +
> return 0;
>
> err_dispc:
> @@ -578,64 +351,18 @@ static void __exit omap_dss_unregister_drivers(void)
> platform_driver_unregister(&omap_dss_driver);
> }
>
> -#ifdef CONFIG_OMAP2_DSS_MODULE
> -static void omap_dss_bus_unregister(void)
> -{
> - device_unregister(&dss_bus);
> -
> - bus_unregister(&dss_bus_type);
> -}
> -
> static int __init omap_dss_init(void)
> {
> - int r;
> -
> - r = omap_dss_bus_register();
> - if (r)
> - return r;
> -
> - r = omap_dss_register_drivers();
> - if (r) {
> - omap_dss_bus_unregister();
> - return r;
> - }
> -
> - dss_initialized = true;
> -
> - return 0;
> + return omap_dss_register_drivers();
> }
>
> static void __exit omap_dss_exit(void)
> {
> omap_dss_unregister_drivers();
> -
> - omap_dss_bus_unregister();
> }
>
> module_init(omap_dss_init);
> module_exit(omap_dss_exit);
minor comment here, we could use
omap_dss_register_driver/unregister_driver for the module_init/exit
directly, the funcs omap_dss_init/ext don't seem to be doing much here.
Archit
^ permalink raw reply
* Re: [PATCH 06/15] OMAPDSS: remove all old panel drivers
From: Archit Taneja @ 2013-08-29 14:20 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev
In-Reply-To: <521F555C.8090802@ti.com>
On Thursday 29 August 2013 07:36 PM, Tomi Valkeinen wrote:
> Hi,
>
> On 29/08/13 17:00, Archit Taneja wrote:
>> On Thursday 29 August 2013 07:01 PM, Tomi Valkeinen wrote:
>>> The board files now use the new panel drivers, making the old panel
>>> drivers obsolete.
>>>
>>> Remove the old panel drivers, Kconfig and Makefile entries, and the
>>> panels' platform data structs.
>>
>> Can we convert the picodlp driver to the new panel driver model, and
>> report it as broken for now?
>
> (please cut your quotes a bit, you just included some thousands of lines
> of code there =).
Oops, sure, will try to remember.
>
> We could, but I'm not sure what would be the point. The new picodlp
> would be (more or less) totally new driver, so we would still end up
> removing the old driver. We can as well add it later if we manage to get
> it working.
Okay. Let's do that then.
Archit
^ permalink raw reply
* Re: [PATCH 06/15] OMAPDSS: remove all old panel drivers
From: Tomi Valkeinen @ 2013-08-29 14:06 UTC (permalink / raw)
To: Archit Taneja; +Cc: linux-omap, linux-fbdev
In-Reply-To: <521F53F0.4030203@ti.com>
[-- Attachment #1: Type: text/plain, Size: 887 bytes --]
Hi,
On 29/08/13 17:00, Archit Taneja wrote:
> On Thursday 29 August 2013 07:01 PM, Tomi Valkeinen wrote:
>> The board files now use the new panel drivers, making the old panel
>> drivers obsolete.
>>
>> Remove the old panel drivers, Kconfig and Makefile entries, and the
>> panels' platform data structs.
>
> Can we convert the picodlp driver to the new panel driver model, and
> report it as broken for now?
(please cut your quotes a bit, you just included some thousands of lines
of code there =).
We could, but I'm not sure what would be the point. The new picodlp
would be (more or less) totally new driver, so we would still end up
removing the old driver. We can as well add it later if we manage to get
it working.
The RFBI case is a bit different, as there we just changed the current
driver a bit and we didn't create a totally new one.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply
* [PATCH 15/15] OMAPDSS: rename omap_dss_device's 'device' field to 'dst'
From: Tomi Valkeinen @ 2013-08-29 13:32 UTC (permalink / raw)
To: linux-omap, linux-fbdev; +Cc: Archit Taneja, Tomi Valkeinen
In-Reply-To: <1377783120-14001-1-git-send-email-tomi.valkeinen@ti.com>
In the old panel device model we had omap_dss_output entities,
representing the encoders in the DSS block. This entity had "device"
field, which pointed to the panel that was using the omap_dss_output.
With the new panel device model, the omap_dss_output is integrated into
omap_dss_device, which now represents a "display entity". Thus the "device"
field, now in omap_dss_device, points to the next entity in the display
entity-chain.
This patch renames the "device" field to "dst", which much better tells
what the field points to.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/displays-new/encoder-tfp410.c | 10 +++++-----
drivers/video/omap2/displays-new/encoder-tpd12s015.c | 10 +++++-----
drivers/video/omap2/dss/apply.c | 4 ++--
drivers/video/omap2/dss/dpi.c | 4 ++--
drivers/video/omap2/dss/dsi.c | 4 ++--
drivers/video/omap2/dss/hdmi.c | 4 ++--
drivers/video/omap2/dss/output.c | 16 ++++++++--------
drivers/video/omap2/dss/sdi.c | 4 ++--
drivers/video/omap2/dss/venc.c | 4 ++--
include/video/omapdss.h | 2 +-
10 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/drivers/video/omap2/displays-new/encoder-tfp410.c b/drivers/video/omap2/displays-new/encoder-tfp410.c
index 454f771..4a291e7 100644
--- a/drivers/video/omap2/displays-new/encoder-tfp410.c
+++ b/drivers/video/omap2/displays-new/encoder-tfp410.c
@@ -44,7 +44,7 @@ static int tfp410_connect(struct omap_dss_device *dssdev,
return r;
dst->src = dssdev;
- dssdev->device = dst;
+ dssdev->dst = dst;
return 0;
}
@@ -59,12 +59,12 @@ static void tfp410_disconnect(struct omap_dss_device *dssdev,
if (!omapdss_device_is_connected(dssdev))
return;
- WARN_ON(dst != dssdev->device);
- if (dst != dssdev->device)
+ WARN_ON(dst != dssdev->dst);
+ if (dst != dssdev->dst)
return;
dst->src = NULL;
- dssdev->device = NULL;
+ dssdev->dst = NULL;
in->ops.dpi->disconnect(in, &ddata->dssdev);
}
@@ -244,7 +244,7 @@ static int __exit tfp410_remove(struct platform_device *pdev)
WARN_ON(omapdss_device_is_connected(dssdev));
if (omapdss_device_is_connected(dssdev))
- tfp410_disconnect(dssdev, dssdev->device);
+ tfp410_disconnect(dssdev, dssdev->dst);
omap_dss_put_device(in);
diff --git a/drivers/video/omap2/displays-new/encoder-tpd12s015.c b/drivers/video/omap2/displays-new/encoder-tpd12s015.c
index a3d2991..798ef20 100644
--- a/drivers/video/omap2/displays-new/encoder-tpd12s015.c
+++ b/drivers/video/omap2/displays-new/encoder-tpd12s015.c
@@ -67,7 +67,7 @@ static int tpd_connect(struct omap_dss_device *dssdev,
return r;
dst->src = dssdev;
- dssdev->device = dst;
+ dssdev->dst = dst;
INIT_COMPLETION(ddata->hpd_completion);
@@ -95,15 +95,15 @@ static void tpd_disconnect(struct omap_dss_device *dssdev,
struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in;
- WARN_ON(dst != dssdev->device);
+ WARN_ON(dst != dssdev->dst);
- if (dst != dssdev->device)
+ if (dst != dssdev->dst)
return;
gpio_set_value_cansleep(ddata->ct_cp_hpd_gpio, 0);
dst->src = NULL;
- dssdev->device = NULL;
+ dssdev->dst = NULL;
in->ops.hdmi->disconnect(in, &ddata->dssdev);
}
@@ -372,7 +372,7 @@ static int __exit tpd_remove(struct platform_device *pdev)
WARN_ON(omapdss_device_is_connected(dssdev));
if (omapdss_device_is_connected(dssdev))
- tpd_disconnect(dssdev, dssdev->device);
+ tpd_disconnect(dssdev, dssdev->dst);
omap_dss_put_device(in);
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index d6212d63..60758db 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -428,8 +428,8 @@ static struct omap_dss_device *dss_mgr_get_device(struct omap_overlay_manager *m
if (dssdev = NULL)
return NULL;
- while (dssdev->device)
- dssdev = dssdev->device;
+ while (dssdev->dst)
+ dssdev = dssdev->dst;
if (dssdev->driver)
return dssdev;
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index b268d04..bd48cde 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -643,9 +643,9 @@ static int dpi_connect(struct omap_dss_device *dssdev,
static void dpi_disconnect(struct omap_dss_device *dssdev,
struct omap_dss_device *dst)
{
- WARN_ON(dst != dssdev->device);
+ WARN_ON(dst != dssdev->dst);
- if (dst != dssdev->device)
+ if (dst != dssdev->dst)
return;
omapdss_output_unset_device(dssdev);
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 3daaf7e..a598b58 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -5264,9 +5264,9 @@ static int dsi_connect(struct omap_dss_device *dssdev,
static void dsi_disconnect(struct omap_dss_device *dssdev,
struct omap_dss_device *dst)
{
- WARN_ON(dst != dssdev->device);
+ WARN_ON(dst != dssdev->dst);
- if (dst != dssdev->device)
+ if (dst != dssdev->dst)
return;
omapdss_output_unset_device(dssdev);
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index 0b8e4de..75f3c74 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -900,9 +900,9 @@ static int hdmi_connect(struct omap_dss_device *dssdev,
static void hdmi_disconnect(struct omap_dss_device *dssdev,
struct omap_dss_device *dst)
{
- WARN_ON(dst != dssdev->device);
+ WARN_ON(dst != dssdev->dst);
- if (dst != dssdev->device)
+ if (dst != dssdev->dst)
return;
omapdss_output_unset_device(dssdev);
diff --git a/drivers/video/omap2/dss/output.c b/drivers/video/omap2/dss/output.c
index 15f47af..2ab3afa 100644
--- a/drivers/video/omap2/dss/output.c
+++ b/drivers/video/omap2/dss/output.c
@@ -34,9 +34,9 @@ int omapdss_output_set_device(struct omap_dss_device *out,
mutex_lock(&output_lock);
- if (out->device) {
+ if (out->dst) {
DSSERR("output already has device %s connected to it\n",
- out->device->name);
+ out->dst->name);
r = -EINVAL;
goto err;
}
@@ -47,7 +47,7 @@ int omapdss_output_set_device(struct omap_dss_device *out,
goto err;
}
- out->device = dssdev;
+ out->dst = dssdev;
dssdev->src = out;
mutex_unlock(&output_lock);
@@ -66,21 +66,21 @@ int omapdss_output_unset_device(struct omap_dss_device *out)
mutex_lock(&output_lock);
- if (!out->device) {
+ if (!out->dst) {
DSSERR("output doesn't have a device connected to it\n");
r = -EINVAL;
goto err;
}
- if (out->device->state != OMAP_DSS_DISPLAY_DISABLED) {
+ if (out->dst->state != OMAP_DSS_DISPLAY_DISABLED) {
DSSERR("device %s is not disabled, cannot unset device\n",
- out->device->name);
+ out->dst->name);
r = -EINVAL;
goto err;
}
- out->device->src = NULL;
- out->device = NULL;
+ out->dst->src = NULL;
+ out->dst = NULL;
mutex_unlock(&output_lock);
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index b327688..ccc569a 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -306,9 +306,9 @@ static int sdi_connect(struct omap_dss_device *dssdev,
static void sdi_disconnect(struct omap_dss_device *dssdev,
struct omap_dss_device *dst)
{
- WARN_ON(dst != dssdev->device);
+ WARN_ON(dst != dssdev->dst);
- if (dst != dssdev->device)
+ if (dst != dssdev->dst)
return;
omapdss_output_unset_device(dssdev);
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index 0d8ccde..5f88ac4 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -753,9 +753,9 @@ static int venc_connect(struct omap_dss_device *dssdev,
static void venc_disconnect(struct omap_dss_device *dssdev,
struct omap_dss_device *dst)
{
- WARN_ON(dst != dssdev->device);
+ WARN_ON(dst != dssdev->dst);
- if (dst != dssdev->device)
+ if (dst != dssdev->dst)
return;
omapdss_output_unset_device(dssdev);
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 5fa81dd..3d7c51a 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -793,7 +793,7 @@ struct omap_dss_device {
/* dynamic fields */
struct omap_overlay_manager *manager;
- struct omap_dss_device *device;
+ struct omap_dss_device *dst;
};
struct omap_dss_hdmi_data
--
1.8.1.2
^ permalink raw reply related
* [PATCH 14/15] OMAPDSS: rename omap_dss_device's 'output' to 'src'
From: Tomi Valkeinen @ 2013-08-29 13:31 UTC (permalink / raw)
To: linux-omap, linux-fbdev; +Cc: Archit Taneja, Tomi Valkeinen
In-Reply-To: <1377783120-14001-1-git-send-email-tomi.valkeinen@ti.com>
In the old panel device model we had "outputs", which were the encoders
inside OMAP DSS block, and panel devices (omap_dss_device). The panel
devices had a reference to the source of the video data, i.e. reference
to an "output", in a field named "output".
That was somewhat confusing even in the old panel device model, but even
more so with the panel device model where we can have longer chains of
display entities.
This patch renames the "output" field to "src", which much better tells
what the field points to.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/gpu/drm/omapdrm/omap_encoder.c | 2 +-
drivers/video/omap2/displays-new/encoder-tfp410.c | 4 ++--
drivers/video/omap2/displays-new/encoder-tpd12s015.c | 4 ++--
drivers/video/omap2/dss/output.c | 8 ++++----
include/video/omapdss.h | 4 ++--
5 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/omap_encoder.c b/drivers/gpu/drm/omapdrm/omap_encoder.c
index c29451b..6a12e89 100644
--- a/drivers/gpu/drm/omapdrm/omap_encoder.c
+++ b/drivers/gpu/drm/omapdrm/omap_encoder.c
@@ -133,7 +133,7 @@ int omap_encoder_update(struct drm_encoder *encoder,
struct omap_dss_driver *dssdrv = dssdev->driver;
int ret;
- dssdev->output->manager = mgr;
+ dssdev->src->manager = mgr;
if (dssdrv->check_timings) {
ret = dssdrv->check_timings(dssdev, timings);
diff --git a/drivers/video/omap2/displays-new/encoder-tfp410.c b/drivers/video/omap2/displays-new/encoder-tfp410.c
index a04f658..454f771 100644
--- a/drivers/video/omap2/displays-new/encoder-tfp410.c
+++ b/drivers/video/omap2/displays-new/encoder-tfp410.c
@@ -43,7 +43,7 @@ static int tfp410_connect(struct omap_dss_device *dssdev,
if (r)
return r;
- dst->output = dssdev;
+ dst->src = dssdev;
dssdev->device = dst;
return 0;
@@ -63,7 +63,7 @@ static void tfp410_disconnect(struct omap_dss_device *dssdev,
if (dst != dssdev->device)
return;
- dst->output = NULL;
+ dst->src = NULL;
dssdev->device = NULL;
in->ops.dpi->disconnect(in, &ddata->dssdev);
diff --git a/drivers/video/omap2/displays-new/encoder-tpd12s015.c b/drivers/video/omap2/displays-new/encoder-tpd12s015.c
index ce0e010..a3d2991 100644
--- a/drivers/video/omap2/displays-new/encoder-tpd12s015.c
+++ b/drivers/video/omap2/displays-new/encoder-tpd12s015.c
@@ -66,7 +66,7 @@ static int tpd_connect(struct omap_dss_device *dssdev,
if (r)
return r;
- dst->output = dssdev;
+ dst->src = dssdev;
dssdev->device = dst;
INIT_COMPLETION(ddata->hpd_completion);
@@ -102,7 +102,7 @@ static void tpd_disconnect(struct omap_dss_device *dssdev,
gpio_set_value_cansleep(ddata->ct_cp_hpd_gpio, 0);
- dst->output = NULL;
+ dst->src = NULL;
dssdev->device = NULL;
in->ops.hdmi->disconnect(in, &ddata->dssdev);
diff --git a/drivers/video/omap2/dss/output.c b/drivers/video/omap2/dss/output.c
index 3f5c0a7..15f47af 100644
--- a/drivers/video/omap2/dss/output.c
+++ b/drivers/video/omap2/dss/output.c
@@ -48,7 +48,7 @@ int omapdss_output_set_device(struct omap_dss_device *out,
}
out->device = dssdev;
- dssdev->output = out;
+ dssdev->src = out;
mutex_unlock(&output_lock);
@@ -79,7 +79,7 @@ int omapdss_output_unset_device(struct omap_dss_device *out)
goto err;
}
- out->device->output = NULL;
+ out->device->src = NULL;
out->device = NULL;
mutex_unlock(&output_lock);
@@ -146,8 +146,8 @@ EXPORT_SYMBOL(omap_dss_find_output_by_node);
struct omap_dss_device *omapdss_find_output_from_display(struct omap_dss_device *dssdev)
{
- while (dssdev->output)
- dssdev = dssdev->output;
+ while (dssdev->src)
+ dssdev = dssdev->src;
if (dssdev->id != 0)
return omap_dss_get_device(dssdev);
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 763b11b..5fa81dd 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -774,7 +774,7 @@ struct omap_dss_device {
enum omap_display_caps caps;
- struct omap_dss_device *output;
+ struct omap_dss_device *src;
enum omap_dss_display_state state;
@@ -1011,7 +1011,7 @@ void dss_mgr_unregister_framedone_handler(struct omap_overlay_manager *mgr,
static inline bool omapdss_device_is_connected(struct omap_dss_device *dssdev)
{
- return dssdev->output;
+ return dssdev->src;
}
static inline bool omapdss_device_is_enabled(struct omap_dss_device *dssdev)
--
1.8.1.2
^ permalink raw reply related
* [PATCH 13/15] OMAPDSS: DSS: remove legacy dss bus support
From: Tomi Valkeinen @ 2013-08-29 13:31 UTC (permalink / raw)
To: linux-omap, linux-fbdev; +Cc: Archit Taneja, Tomi Valkeinen
In-Reply-To: <1377783120-14001-1-git-send-email-tomi.valkeinen@ti.com>
With all the old panels removed and all the old panel model APIs removed
from the DSS encoders, we can now remove the custom omapdss-bus which
was used in the old panel model.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/core.c | 279 +----------------------------------------
drivers/video/omap2/dss/dss.h | 9 --
include/video/omapdss.h | 6 -
3 files changed, 3 insertions(+), 291 deletions(-)
diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
index 71e6a77..54f3320 100644
--- a/drivers/video/omap2/dss/core.c
+++ b/drivers/video/omap2/dss/core.c
@@ -248,235 +248,6 @@ static struct platform_driver omap_dss_driver = {
},
};
-/* BUS */
-static int dss_bus_match(struct device *dev, struct device_driver *driver)
-{
- struct omap_dss_device *dssdev = to_dss_device(dev);
-
- DSSDBG("bus_match. dev %s/%s, drv %s\n",
- dev_name(dev), dssdev->driver_name, driver->name);
-
- return strcmp(dssdev->driver_name, driver->name) = 0;
-}
-
-static struct bus_type dss_bus_type = {
- .name = "omapdss",
- .match = dss_bus_match,
-};
-
-static void dss_bus_release(struct device *dev)
-{
- DSSDBG("bus_release\n");
-}
-
-static struct device dss_bus = {
- .release = dss_bus_release,
-};
-
-struct bus_type *dss_get_bus(void)
-{
- return &dss_bus_type;
-}
-
-/* DRIVER */
-static int dss_driver_probe(struct device *dev)
-{
- int r;
- struct omap_dss_driver *dssdrv = to_dss_driver(dev->driver);
- struct omap_dss_device *dssdev = to_dss_device(dev);
-
- DSSDBG("driver_probe: dev %s/%s, drv %s\n",
- dev_name(dev), dssdev->driver_name,
- dssdrv->driver.name);
-
- r = dssdrv->probe(dssdev);
-
- if (r) {
- DSSERR("driver probe failed: %d\n", r);
- return r;
- }
-
- DSSDBG("probe done for device %s\n", dev_name(dev));
-
- dssdev->driver = dssdrv;
-
- return 0;
-}
-
-static int dss_driver_remove(struct device *dev)
-{
- struct omap_dss_driver *dssdrv = to_dss_driver(dev->driver);
- struct omap_dss_device *dssdev = to_dss_device(dev);
-
- DSSDBG("driver_remove: dev %s/%s\n", dev_name(dev),
- dssdev->driver_name);
-
- dssdrv->remove(dssdev);
-
- dssdev->driver = NULL;
-
- return 0;
-}
-
-static int omapdss_default_connect(struct omap_dss_device *dssdev)
-{
- struct omap_dss_device *out;
- struct omap_overlay_manager *mgr;
- int r;
-
- out = dssdev->output;
-
- if (out = NULL)
- return -ENODEV;
-
- mgr = omap_dss_get_overlay_manager(out->dispc_channel);
- if (!mgr)
- return -ENODEV;
-
- r = dss_mgr_connect(mgr, out);
- if (r)
- return r;
-
- return 0;
-}
-
-static void omapdss_default_disconnect(struct omap_dss_device *dssdev)
-{
- struct omap_dss_device *out;
- struct omap_overlay_manager *mgr;
-
- out = dssdev->output;
-
- if (out = NULL)
- return;
-
- mgr = out->manager;
-
- if (mgr = NULL)
- return;
-
- dss_mgr_disconnect(mgr, out);
-}
-
-int omap_dss_register_driver(struct omap_dss_driver *dssdriver)
-{
- dssdriver->driver.bus = &dss_bus_type;
- dssdriver->driver.probe = dss_driver_probe;
- dssdriver->driver.remove = dss_driver_remove;
-
- if (dssdriver->get_resolution = NULL)
- dssdriver->get_resolution = omapdss_default_get_resolution;
- if (dssdriver->get_recommended_bpp = NULL)
- dssdriver->get_recommended_bpp - omapdss_default_get_recommended_bpp;
- if (dssdriver->get_timings = NULL)
- dssdriver->get_timings = omapdss_default_get_timings;
- if (dssdriver->connect = NULL)
- dssdriver->connect = omapdss_default_connect;
- if (dssdriver->disconnect = NULL)
- dssdriver->disconnect = omapdss_default_disconnect;
-
- return driver_register(&dssdriver->driver);
-}
-EXPORT_SYMBOL(omap_dss_register_driver);
-
-void omap_dss_unregister_driver(struct omap_dss_driver *dssdriver)
-{
- driver_unregister(&dssdriver->driver);
-}
-EXPORT_SYMBOL(omap_dss_unregister_driver);
-
-/* DEVICE */
-
-static void omap_dss_dev_release(struct device *dev)
-{
- struct omap_dss_device *dssdev = to_dss_device(dev);
- kfree(dssdev);
-}
-
-static int disp_num_counter;
-
-struct omap_dss_device *dss_alloc_and_init_device(struct device *parent)
-{
- struct omap_dss_device *dssdev;
-
- dssdev = kzalloc(sizeof(*dssdev), GFP_KERNEL);
- if (!dssdev)
- return NULL;
-
- dssdev->old_dev.bus = &dss_bus_type;
- dssdev->old_dev.parent = parent;
- dssdev->old_dev.release = omap_dss_dev_release;
- dev_set_name(&dssdev->old_dev, "display%d", disp_num_counter++);
-
- device_initialize(&dssdev->old_dev);
-
- return dssdev;
-}
-
-int dss_add_device(struct omap_dss_device *dssdev)
-{
- dssdev->dev = &dssdev->old_dev;
-
- omapdss_register_display(dssdev);
- return device_add(&dssdev->old_dev);
-}
-
-void dss_put_device(struct omap_dss_device *dssdev)
-{
- put_device(&dssdev->old_dev);
-}
-
-void dss_unregister_device(struct omap_dss_device *dssdev)
-{
- device_unregister(&dssdev->old_dev);
- omapdss_unregister_display(dssdev);
-}
-
-static int dss_unregister_dss_dev(struct device *dev, void *data)
-{
- struct omap_dss_device *dssdev = to_dss_device(dev);
- dss_unregister_device(dssdev);
- return 0;
-}
-
-void dss_unregister_child_devices(struct device *parent)
-{
- device_for_each_child(parent, NULL, dss_unregister_dss_dev);
-}
-
-void dss_copy_device_pdata(struct omap_dss_device *dst,
- const struct omap_dss_device *src)
-{
- u8 *d = (u8 *)dst;
- u8 *s = (u8 *)src;
- size_t dsize = sizeof(struct device);
-
- memcpy(d + dsize, s + dsize, sizeof(struct omap_dss_device) - dsize);
-}
-
-/* BUS */
-static int __init omap_dss_bus_register(void)
-{
- int r;
-
- r = bus_register(&dss_bus_type);
- if (r) {
- DSSERR("bus register failed\n");
- return r;
- }
-
- dev_set_name(&dss_bus, "omapdss");
- r = device_register(&dss_bus);
- if (r) {
- DSSERR("bus driver register failed\n");
- bus_unregister(&dss_bus_type);
- return r;
- }
-
- return 0;
-}
-
/* INIT */
static int (*dss_output_drv_reg_funcs[])(void) __initdata = {
#ifdef CONFIG_OMAP2_DSS_DSI
@@ -553,6 +324,8 @@ static int __init omap_dss_register_drivers(void)
dss_output_drv_loaded[i] = true;
}
+ dss_initialized = true;
+
return 0;
err_dispc:
@@ -578,64 +351,18 @@ static void __exit omap_dss_unregister_drivers(void)
platform_driver_unregister(&omap_dss_driver);
}
-#ifdef CONFIG_OMAP2_DSS_MODULE
-static void omap_dss_bus_unregister(void)
-{
- device_unregister(&dss_bus);
-
- bus_unregister(&dss_bus_type);
-}
-
static int __init omap_dss_init(void)
{
- int r;
-
- r = omap_dss_bus_register();
- if (r)
- return r;
-
- r = omap_dss_register_drivers();
- if (r) {
- omap_dss_bus_unregister();
- return r;
- }
-
- dss_initialized = true;
-
- return 0;
+ return omap_dss_register_drivers();
}
static void __exit omap_dss_exit(void)
{
omap_dss_unregister_drivers();
-
- omap_dss_bus_unregister();
}
module_init(omap_dss_init);
module_exit(omap_dss_exit);
-#else
-static int __init omap_dss_init(void)
-{
- return omap_dss_bus_register();
-}
-
-static int __init omap_dss_init2(void)
-{
- int r;
-
- r = omap_dss_register_drivers();
- if (r)
- return r;
-
- dss_initialized = true;
-
- return 0;
-}
-
-core_initcall(omap_dss_init);
-device_initcall(omap_dss_init2);
-#endif
MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@nokia.com>");
MODULE_DESCRIPTION("OMAP2/3 Display Subsystem");
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index 68dd27f..e172531 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -163,20 +163,11 @@ struct platform_device;
/* core */
struct platform_device *dss_get_core_pdev(void);
-struct bus_type *dss_get_bus(void);
int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask);
void dss_dsi_disable_pads(int dsi_id, unsigned lane_mask);
int dss_set_min_bus_tput(struct device *dev, unsigned long tput);
int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *));
-struct omap_dss_device *dss_alloc_and_init_device(struct device *parent);
-int dss_add_device(struct omap_dss_device *dssdev);
-void dss_unregister_device(struct omap_dss_device *dssdev);
-void dss_unregister_child_devices(struct device *parent);
-void dss_put_device(struct omap_dss_device *dssdev);
-void dss_copy_device_pdata(struct omap_dss_device *dst,
- const struct omap_dss_device *src);
-
/* display */
int dss_suspend_all_devices(void);
int dss_resume_all_devices(void);
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index ca04b56..763b11b 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -703,10 +703,6 @@ struct omapdss_dsi_ops {
};
struct omap_dss_device {
- /* old device, to be removed */
- struct device old_dev;
-
- /* new device, pointer to panel device */
struct device *dev;
struct module *owner;
@@ -808,8 +804,6 @@ struct omap_dss_hdmi_data
};
struct omap_dss_driver {
- struct device_driver driver;
-
int (*probe)(struct omap_dss_device *);
void (*remove)(struct omap_dss_device *);
--
1.8.1.2
^ permalink raw reply related
* [PATCH 12/15] OMAPDSS: RFBI: remove code related to old panel model
From: Tomi Valkeinen @ 2013-08-29 13:31 UTC (permalink / raw)
To: linux-omap, linux-fbdev; +Cc: Archit Taneja, Tomi Valkeinen
In-Reply-To: <1377783120-14001-1-git-send-email-tomi.valkeinen@ti.com>
Now that the old panel drivers have been removed, we can remove the
old-model API and related code from the DSS encoder drivers.
This patch removes the code from the RFBI driver.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/rfbi.c | 135 ++++++-----------------------------------
include/video/omapdss.h | 26 --------
2 files changed, 19 insertions(+), 142 deletions(-)
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c
index fdfe6e6..c8a81a2 100644
--- a/drivers/video/omap2/dss/rfbi.c
+++ b/drivers/video/omap2/dss/rfbi.c
@@ -151,19 +151,17 @@ static void rfbi_runtime_put(void)
WARN_ON(r < 0 && r != -ENOSYS);
}
-void rfbi_bus_lock(void)
+static void rfbi_bus_lock(void)
{
down(&rfbi.bus_lock);
}
-EXPORT_SYMBOL(rfbi_bus_lock);
-void rfbi_bus_unlock(void)
+static void rfbi_bus_unlock(void)
{
up(&rfbi.bus_lock);
}
-EXPORT_SYMBOL(rfbi_bus_unlock);
-void omap_rfbi_write_command(const void *buf, u32 len)
+static void rfbi_write_command(const void *buf, u32 len)
{
switch (rfbi.parallelmode) {
case OMAP_DSS_RFBI_PARALLELMODE_8:
@@ -189,9 +187,8 @@ void omap_rfbi_write_command(const void *buf, u32 len)
BUG();
}
}
-EXPORT_SYMBOL(omap_rfbi_write_command);
-void omap_rfbi_read_data(void *buf, u32 len)
+static void rfbi_read_data(void *buf, u32 len)
{
switch (rfbi.parallelmode) {
case OMAP_DSS_RFBI_PARALLELMODE_8:
@@ -221,9 +218,8 @@ void omap_rfbi_read_data(void *buf, u32 len)
BUG();
}
}
-EXPORT_SYMBOL(omap_rfbi_read_data);
-void omap_rfbi_write_data(const void *buf, u32 len)
+static void rfbi_write_data(const void *buf, u32 len)
{
switch (rfbi.parallelmode) {
case OMAP_DSS_RFBI_PARALLELMODE_8:
@@ -250,9 +246,8 @@ void omap_rfbi_write_data(const void *buf, u32 len)
}
}
-EXPORT_SYMBOL(omap_rfbi_write_data);
-void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width,
+static void rfbi_write_pixels(const void __iomem *buf, int scr_width,
u16 x, u16 y,
u16 w, u16 h)
{
@@ -305,7 +300,6 @@ void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width,
BUG();
}
}
-EXPORT_SYMBOL(omap_rfbi_write_pixels);
static int rfbi_transfer_area(struct omap_dss_device *dssdev,
void (*callback)(void *data), void *data)
@@ -574,7 +568,7 @@ static int rfbi_convert_timings(struct rfbi_timings *t)
}
/* xxx FIX module selection missing */
-int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode,
+static int rfbi_setup_te(enum omap_rfbi_te_mode mode,
unsigned hs_pulse_time, unsigned vs_pulse_time,
int hs_pol_inv, int vs_pol_inv, int extif_div)
{
@@ -613,10 +607,9 @@ int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode,
return 0;
}
-EXPORT_SYMBOL(omap_rfbi_setup_te);
/* xxx FIX module selection missing */
-int omap_rfbi_enable_te(bool enable, unsigned line)
+static int rfbi_enable_te(bool enable, unsigned line)
{
u32 l;
@@ -636,9 +629,8 @@ int omap_rfbi_enable_te(bool enable, unsigned line)
return 0;
}
-EXPORT_SYMBOL(omap_rfbi_enable_te);
-static int rfbi_configure(int rfbi_module, int bpp, int lines)
+static int rfbi_configure_bus(int rfbi_module, int bpp, int lines)
{
u32 l;
int cycle1 = 0, cycle2 = 0, cycle3 = 0;
@@ -770,45 +762,39 @@ static int rfbi_configure(int rfbi_module, int bpp, int lines)
return 0;
}
-int omap_rfbi_configure(struct omap_dss_device *dssdev)
+static int rfbi_configure(struct omap_dss_device *dssdev)
{
- return rfbi_configure(dssdev->phy.rfbi.channel, rfbi.pixel_size,
+ return rfbi_configure_bus(dssdev->phy.rfbi.channel, rfbi.pixel_size,
rfbi.data_lines);
}
-EXPORT_SYMBOL(omap_rfbi_configure);
-int omap_rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *),
+static int rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *),
void *data)
{
return rfbi_transfer_area(dssdev, callback, data);
}
-EXPORT_SYMBOL(omap_rfbi_update);
-void omapdss_rfbi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h)
+static void rfbi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h)
{
rfbi.timings.x_res = w;
rfbi.timings.y_res = h;
}
-EXPORT_SYMBOL(omapdss_rfbi_set_size);
-void omapdss_rfbi_set_pixel_size(struct omap_dss_device *dssdev, int pixel_size)
+static void rfbi_set_pixel_size(struct omap_dss_device *dssdev, int pixel_size)
{
rfbi.pixel_size = pixel_size;
}
-EXPORT_SYMBOL(omapdss_rfbi_set_pixel_size);
-void omapdss_rfbi_set_data_lines(struct omap_dss_device *dssdev, int data_lines)
+static void rfbi_set_data_lines(struct omap_dss_device *dssdev, int data_lines)
{
rfbi.data_lines = data_lines;
}
-EXPORT_SYMBOL(omapdss_rfbi_set_data_lines);
-void omapdss_rfbi_set_interface_timings(struct omap_dss_device *dssdev,
+static void rfbi_set_interface_timings(struct omap_dss_device *dssdev,
struct rfbi_timings *timings)
{
rfbi.intf_timings = *timings;
}
-EXPORT_SYMBOL(omapdss_rfbi_set_interface_timings);
static void rfbi_dump_regs(struct seq_file *s)
{
@@ -888,7 +874,7 @@ static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev)
dss_mgr_set_timings(mgr, &rfbi.timings);
}
-int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev)
+static int rfbi_display_enable(struct omap_dss_device *dssdev)
{
struct omap_dss_device *out = &rfbi.output;
int r;
@@ -911,7 +897,7 @@ int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev)
rfbi_config_lcd_manager(dssdev);
- rfbi_configure(dssdev->phy.rfbi.channel, rfbi.pixel_size,
+ rfbi_configure_bus(dssdev->phy.rfbi.channel, rfbi.pixel_size,
rfbi.data_lines);
rfbi_set_timings(dssdev->phy.rfbi.channel, &rfbi.intf_timings);
@@ -921,9 +907,8 @@ err1:
rfbi_runtime_put();
return r;
}
-EXPORT_SYMBOL(omapdss_rfbi_display_enable);
-void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev)
+static void rfbi_display_disable(struct omap_dss_device *dssdev)
{
struct omap_dss_device *out = &rfbi.output;
@@ -932,7 +917,6 @@ void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev)
rfbi_runtime_put();
}
-EXPORT_SYMBOL(omapdss_rfbi_display_disable);
static int rfbi_init_display(struct omap_dss_device *dssdev)
{
@@ -940,77 +924,6 @@ static int rfbi_init_display(struct omap_dss_device *dssdev)
return 0;
}
-static struct omap_dss_device *rfbi_find_dssdev(struct platform_device *pdev)
-{
- struct omap_dss_board_info *pdata = pdev->dev.platform_data;
- const char *def_disp_name = omapdss_get_default_display_name();
- struct omap_dss_device *def_dssdev;
- int i;
-
- def_dssdev = NULL;
-
- for (i = 0; i < pdata->num_devices; ++i) {
- struct omap_dss_device *dssdev = pdata->devices[i];
-
- if (dssdev->type != OMAP_DISPLAY_TYPE_DBI)
- continue;
-
- if (def_dssdev = NULL)
- def_dssdev = dssdev;
-
- if (def_disp_name != NULL &&
- strcmp(dssdev->name, def_disp_name) = 0) {
- def_dssdev = dssdev;
- break;
- }
- }
-
- return def_dssdev;
-}
-
-static int rfbi_probe_pdata(struct platform_device *rfbidev)
-{
- struct omap_dss_device *plat_dssdev;
- struct omap_dss_device *dssdev;
- int r;
-
- plat_dssdev = rfbi_find_dssdev(rfbidev);
-
- if (!plat_dssdev)
- return 0;
-
- dssdev = dss_alloc_and_init_device(&rfbidev->dev);
- if (!dssdev)
- return -ENOMEM;
-
- dss_copy_device_pdata(dssdev, plat_dssdev);
-
- r = rfbi_init_display(dssdev);
- if (r) {
- DSSERR("device %s init failed: %d\n", dssdev->name, r);
- dss_put_device(dssdev);
- return r;
- }
-
- r = omapdss_output_set_device(&rfbi.output, dssdev);
- if (r) {
- DSSERR("failed to connect output to new device: %s\n",
- dssdev->name);
- dss_put_device(dssdev);
- return r;
- }
-
- r = dss_add_device(dssdev);
- if (r) {
- DSSERR("device %s register failed: %d\n", dssdev->name, r);
- omapdss_output_unset_device(&rfbi.output);
- dss_put_device(dssdev);
- return r;
- }
-
- return 0;
-}
-
static void rfbi_init_output(struct platform_device *pdev)
{
struct omap_dss_device *out = &rfbi.output;
@@ -1085,16 +998,8 @@ static int omap_rfbihw_probe(struct platform_device *pdev)
rfbi_init_output(pdev);
- if (pdev->dev.platform_data) {
- r = rfbi_probe_pdata(pdev);
- if (r)
- goto err_probe;
- }
-
return 0;
-err_probe:
- rfbi_uninit_output(pdev);
err_runtime_get:
pm_runtime_disable(&pdev->dev);
return r;
@@ -1102,8 +1007,6 @@ err_runtime_get:
static int __exit omap_rfbihw_remove(struct platform_device *pdev)
{
- dss_unregister_child_devices(&pdev->dev);
-
rfbi_uninit_output(pdev);
pm_runtime_disable(&pdev->dev);
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 3395804..ca04b56 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -250,19 +250,6 @@ struct rfbi_timings {
int converted;
};
-void omap_rfbi_write_command(const void *buf, u32 len);
-void omap_rfbi_read_data(void *buf, u32 len);
-void omap_rfbi_write_data(const void *buf, u32 len);
-void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width,
- u16 x, u16 y,
- u16 w, u16 h);
-int omap_rfbi_enable_te(bool enable, unsigned line);
-int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode,
- unsigned hs_pulse_time, unsigned vs_pulse_time,
- int hs_pol_inv, int vs_pol_inv, int extif_div);
-void rfbi_bus_lock(void);
-void rfbi_bus_unlock(void);
-
/* DSI */
enum omap_dss_dsi_trans_mode {
@@ -987,19 +974,6 @@ int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi,
#define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver)
#define to_dss_device(x) container_of((x), struct omap_dss_device, old_dev)
-int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev);
-void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev);
-int omap_rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *),
- void *data);
-int omap_rfbi_configure(struct omap_dss_device *dssdev);
-void omapdss_rfbi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h);
-void omapdss_rfbi_set_pixel_size(struct omap_dss_device *dssdev,
- int pixel_size);
-void omapdss_rfbi_set_data_lines(struct omap_dss_device *dssdev,
- int data_lines);
-void omapdss_rfbi_set_interface_timings(struct omap_dss_device *dssdev,
- struct rfbi_timings *timings);
-
int omapdss_compat_init(void);
void omapdss_compat_uninit(void);
--
1.8.1.2
^ permalink raw reply related
* [PATCH 11/15] OMAPDSS: VENC: remove code related to old panel model
From: Tomi Valkeinen @ 2013-08-29 13:31 UTC (permalink / raw)
To: linux-omap, linux-fbdev; +Cc: Archit Taneja, Tomi Valkeinen
In-Reply-To: <1377783120-14001-1-git-send-email-tomi.valkeinen@ti.com>
Now that the old panel drivers have been removed, we can remove the
old-model API and related code from the DSS encoder drivers.
This patch removes the code from the VENC driver.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/Makefile | 2 +-
drivers/video/omap2/dss/dss.h | 14 -----
drivers/video/omap2/dss/venc.c | 118 ++++++---------------------------------
3 files changed, 17 insertions(+), 117 deletions(-)
diff --git a/drivers/video/omap2/dss/Makefile b/drivers/video/omap2/dss/Makefile
index e022ed1..94832eb 100644
--- a/drivers/video/omap2/dss/Makefile
+++ b/drivers/video/omap2/dss/Makefile
@@ -7,7 +7,7 @@ omapdss-y += manager.o manager-sysfs.o overlay.o overlay-sysfs.o apply.o \
dispc-compat.o display-sysfs.o
omapdss-$(CONFIG_OMAP2_DSS_DPI) += dpi.o
omapdss-$(CONFIG_OMAP2_DSS_RFBI) += rfbi.o
-omapdss-$(CONFIG_OMAP2_DSS_VENC) += venc.o venc_panel.o
+omapdss-$(CONFIG_OMAP2_DSS_VENC) += venc.o
omapdss-$(CONFIG_OMAP2_DSS_SDI) += sdi.o
omapdss-$(CONFIG_OMAP2_DSS_DSI) += dsi.o
omapdss-$(CONFIG_OMAP4_DSS_HDMI) += hdmi.o ti_hdmi_4xxx_ip.o
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index 6142885..68dd27f 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -434,20 +434,6 @@ int dispc_wb_setup(const struct omap_dss_writeback_info *wi,
/* VENC */
int venc_init_platform_driver(void) __init;
void venc_uninit_platform_driver(void) __exit;
-int omapdss_venc_display_enable(struct omap_dss_device *dssdev);
-void omapdss_venc_display_disable(struct omap_dss_device *dssdev);
-void omapdss_venc_set_timings(struct omap_dss_device *dssdev,
- struct omap_video_timings *timings);
-int omapdss_venc_check_timings(struct omap_dss_device *dssdev,
- struct omap_video_timings *timings);
-u32 omapdss_venc_get_wss(struct omap_dss_device *dssdev);
-int omapdss_venc_set_wss(struct omap_dss_device *dssdev, u32 wss);
-void omapdss_venc_set_type(struct omap_dss_device *dssdev,
- enum omap_dss_venc_type type);
-void omapdss_venc_invert_vid_out_polarity(struct omap_dss_device *dssdev,
- bool invert_polarity);
-int venc_panel_init(void);
-void venc_panel_exit(void);
/* HDMI */
int hdmi_init_platform_driver(void) __init;
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
index 496a106..0d8ccde 100644
--- a/drivers/video/omap2/dss/venc.c
+++ b/drivers/video/omap2/dss/venc.c
@@ -492,7 +492,7 @@ static void venc_power_off(struct omap_dss_device *dssdev)
venc_runtime_put();
}
-int omapdss_venc_display_enable(struct omap_dss_device *dssdev)
+static int venc_display_enable(struct omap_dss_device *dssdev)
{
struct omap_dss_device *out = &venc.output;
int r;
@@ -521,7 +521,7 @@ err0:
return r;
}
-void omapdss_venc_display_disable(struct omap_dss_device *dssdev)
+static void venc_display_disable(struct omap_dss_device *dssdev)
{
DSSDBG("venc_display_disable\n");
@@ -532,7 +532,7 @@ void omapdss_venc_display_disable(struct omap_dss_device *dssdev)
mutex_unlock(&venc.venc_lock);
}
-void omapdss_venc_set_timings(struct omap_dss_device *dssdev,
+static void venc_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings)
{
DSSDBG("venc_set_timings\n");
@@ -550,7 +550,7 @@ void omapdss_venc_set_timings(struct omap_dss_device *dssdev,
mutex_unlock(&venc.venc_lock);
}
-int omapdss_venc_check_timings(struct omap_dss_device *dssdev,
+static int venc_check_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings)
{
DSSDBG("venc_check_timings\n");
@@ -574,13 +574,13 @@ static void venc_get_timings(struct omap_dss_device *dssdev,
mutex_unlock(&venc.venc_lock);
}
-u32 omapdss_venc_get_wss(struct omap_dss_device *dssdev)
+static u32 venc_get_wss(struct omap_dss_device *dssdev)
{
/* Invert due to VENC_L21_WC_CTL:INV=1 */
return (venc.wss_data >> 8) ^ 0xfffff;
}
-int omapdss_venc_set_wss(struct omap_dss_device *dssdev, u32 wss)
+static int venc_set_wss(struct omap_dss_device *dssdev, u32 wss)
{
const struct venc_config *config;
int r;
@@ -609,7 +609,7 @@ err:
return r;
}
-void omapdss_venc_set_type(struct omap_dss_device *dssdev,
+static void venc_set_type(struct omap_dss_device *dssdev,
enum omap_dss_venc_type type)
{
mutex_lock(&venc.venc_lock);
@@ -619,7 +619,7 @@ void omapdss_venc_set_type(struct omap_dss_device *dssdev,
mutex_unlock(&venc.venc_lock);
}
-void omapdss_venc_invert_vid_out_polarity(struct omap_dss_device *dssdev,
+static void venc_invert_vid_out_polarity(struct omap_dss_device *dssdev,
bool invert_polarity)
{
mutex_lock(&venc.venc_lock);
@@ -721,74 +721,6 @@ static int venc_get_clocks(struct platform_device *pdev)
return 0;
}
-static struct omap_dss_device *venc_find_dssdev(struct platform_device *pdev)
-{
- struct omap_dss_board_info *pdata = pdev->dev.platform_data;
- const char *def_disp_name = omapdss_get_default_display_name();
- struct omap_dss_device *def_dssdev;
- int i;
-
- def_dssdev = NULL;
-
- for (i = 0; i < pdata->num_devices; ++i) {
- struct omap_dss_device *dssdev = pdata->devices[i];
-
- if (dssdev->type != OMAP_DISPLAY_TYPE_VENC)
- continue;
-
- if (def_dssdev = NULL)
- def_dssdev = dssdev;
-
- if (def_disp_name != NULL &&
- strcmp(dssdev->name, def_disp_name) = 0) {
- def_dssdev = dssdev;
- break;
- }
- }
-
- return def_dssdev;
-}
-
-static int venc_probe_pdata(struct platform_device *vencdev)
-{
- struct omap_dss_device *plat_dssdev;
- struct omap_dss_device *dssdev;
- int r;
-
- plat_dssdev = venc_find_dssdev(vencdev);
-
- if (!plat_dssdev)
- return 0;
-
- r = venc_init_regulator();
- if (r)
- return r;
-
- dssdev = dss_alloc_and_init_device(&vencdev->dev);
- if (!dssdev)
- return -ENOMEM;
-
- dss_copy_device_pdata(dssdev, plat_dssdev);
-
- r = omapdss_output_set_device(&venc.output, dssdev);
- if (r) {
- DSSERR("failed to connect output to new device: %s\n",
- dssdev->name);
- dss_put_device(dssdev);
- return r;
- }
-
- r = dss_add_device(dssdev);
- if (r) {
- DSSERR("device %s register failed: %d\n", dssdev->name, r);
- omapdss_output_unset_device(&venc.output);
- dss_put_device(dssdev);
- return r;
- }
-
- return 0;
-}
-
static int venc_connect(struct omap_dss_device *dssdev,
struct omap_dss_device *dst)
{
@@ -836,18 +768,18 @@ static const struct omapdss_atv_ops venc_ops = {
.connect = venc_connect,
.disconnect = venc_disconnect,
- .enable = omapdss_venc_display_enable,
- .disable = omapdss_venc_display_disable,
+ .enable = venc_display_enable,
+ .disable = venc_display_disable,
- .check_timings = omapdss_venc_check_timings,
- .set_timings = omapdss_venc_set_timings,
+ .check_timings = venc_check_timings,
+ .set_timings = venc_set_timings,
.get_timings = venc_get_timings,
- .set_type = omapdss_venc_set_type,
- .invert_vid_out_polarity = omapdss_venc_invert_vid_out_polarity,
+ .set_type = venc_set_type,
+ .invert_vid_out_polarity = venc_invert_vid_out_polarity,
- .set_wss = omapdss_venc_set_wss,
- .get_wss = omapdss_venc_get_wss,
+ .set_wss = venc_set_wss,
+ .get_wss = venc_get_wss,
};
static void venc_init_output(struct platform_device *pdev)
@@ -913,26 +845,12 @@ static int omap_venchw_probe(struct platform_device *pdev)
venc_runtime_put();
- r = venc_panel_init();
- if (r)
- goto err_panel_init;
-
dss_debugfs_create_file("venc", venc_dump_regs);
venc_init_output(pdev);
- if (pdev->dev.platform_data) {
- r = venc_probe_pdata(pdev);
- if (r)
- goto err_probe;
- }
-
return 0;
-err_probe:
- venc_panel_exit();
- venc_uninit_output(pdev);
-err_panel_init:
err_runtime_get:
pm_runtime_disable(&pdev->dev);
return r;
@@ -940,10 +858,6 @@ err_runtime_get:
static int __exit omap_venchw_remove(struct platform_device *pdev)
{
- dss_unregister_child_devices(&pdev->dev);
-
- venc_panel_exit();
-
venc_uninit_output(pdev);
pm_runtime_disable(&pdev->dev);
--
1.8.1.2
^ permalink raw reply related
* [PATCH 10/15] OMAPDSS: SDI: remove code related to old panel model
From: Tomi Valkeinen @ 2013-08-29 13:31 UTC (permalink / raw)
To: linux-omap, linux-fbdev; +Cc: Archit Taneja, Tomi Valkeinen
In-Reply-To: <1377783120-14001-1-git-send-email-tomi.valkeinen@ti.com>
Now that the old panel drivers have been removed, we can remove the
old-model API and related code from the DSS encoder drivers.
This patch removes the code from the SDI driver.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/omap2/dss/sdi.c | 105 ++++--------------------------------------
include/video/omapdss.h | 6 ---
2 files changed, 8 insertions(+), 103 deletions(-)
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index 82b64e3..b327688 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -124,7 +124,7 @@ static void sdi_config_lcd_manager(struct omap_dss_device *dssdev)
dss_mgr_set_lcd_config(mgr, &sdi.mgr_config);
}
-int omapdss_sdi_display_enable(struct omap_dss_device *dssdev)
+static int sdi_display_enable(struct omap_dss_device *dssdev)
{
struct omap_dss_device *out = &sdi.output;
struct omap_video_timings *t = &sdi.timings;
@@ -211,9 +211,8 @@ err_get_dispc:
err_reg_enable:
return r;
}
-EXPORT_SYMBOL(omapdss_sdi_display_enable);
-void omapdss_sdi_display_disable(struct omap_dss_device *dssdev)
+static void sdi_display_disable(struct omap_dss_device *dssdev)
{
struct omap_overlay_manager *mgr = sdi.output.manager;
@@ -225,14 +224,12 @@ void omapdss_sdi_display_disable(struct omap_dss_device *dssdev)
regulator_disable(sdi.vdds_sdi_reg);
}
-EXPORT_SYMBOL(omapdss_sdi_display_disable);
-void omapdss_sdi_set_timings(struct omap_dss_device *dssdev,
+static void sdi_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings)
{
sdi.timings = *timings;
}
-EXPORT_SYMBOL(omapdss_sdi_set_timings);
static void sdi_get_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings)
@@ -254,11 +251,10 @@ static int sdi_check_timings(struct omap_dss_device *dssdev,
return 0;
}
-void omapdss_sdi_set_datapairs(struct omap_dss_device *dssdev, int datapairs)
+static void sdi_set_datapairs(struct omap_dss_device *dssdev, int datapairs)
{
sdi.datapairs = datapairs;
}
-EXPORT_SYMBOL(omapdss_sdi_set_datapairs);
static int sdi_init_regulator(void)
{
@@ -278,77 +274,6 @@ static int sdi_init_regulator(void)
return 0;
}
-static struct omap_dss_device *sdi_find_dssdev(struct platform_device *pdev)
-{
- struct omap_dss_board_info *pdata = pdev->dev.platform_data;
- const char *def_disp_name = omapdss_get_default_display_name();
- struct omap_dss_device *def_dssdev;
- int i;
-
- def_dssdev = NULL;
-
- for (i = 0; i < pdata->num_devices; ++i) {
- struct omap_dss_device *dssdev = pdata->devices[i];
-
- if (dssdev->type != OMAP_DISPLAY_TYPE_SDI)
- continue;
-
- if (def_dssdev = NULL)
- def_dssdev = dssdev;
-
- if (def_disp_name != NULL &&
- strcmp(dssdev->name, def_disp_name) = 0) {
- def_dssdev = dssdev;
- break;
- }
- }
-
- return def_dssdev;
-}
-
-static int sdi_probe_pdata(struct platform_device *sdidev)
-{
- struct omap_dss_device *plat_dssdev;
- struct omap_dss_device *dssdev;
- int r;
-
- plat_dssdev = sdi_find_dssdev(sdidev);
-
- if (!plat_dssdev)
- return 0;
-
- dssdev = dss_alloc_and_init_device(&sdidev->dev);
- if (!dssdev)
- return -ENOMEM;
-
- dss_copy_device_pdata(dssdev, plat_dssdev);
-
- r = sdi_init_regulator();
- if (r) {
- DSSERR("device %s init failed: %d\n", dssdev->name, r);
- dss_put_device(dssdev);
- return r;
- }
-
- r = omapdss_output_set_device(&sdi.output, dssdev);
- if (r) {
- DSSERR("failed to connect output to new device: %s\n",
- dssdev->name);
- dss_put_device(dssdev);
- return r;
- }
-
- r = dss_add_device(dssdev);
- if (r) {
- DSSERR("device %s register failed: %d\n", dssdev->name, r);
- omapdss_output_unset_device(&sdi.output);
- dss_put_device(dssdev);
- return r;
- }
-
- return 0;
-}
-
static int sdi_connect(struct omap_dss_device *dssdev,
struct omap_dss_device *dst)
{
@@ -396,14 +321,14 @@ static const struct omapdss_sdi_ops sdi_ops = {
.connect = sdi_connect,
.disconnect = sdi_disconnect,
- .enable = omapdss_sdi_display_enable,
- .disable = omapdss_sdi_display_disable,
+ .enable = sdi_display_enable,
+ .disable = sdi_display_disable,
.check_timings = sdi_check_timings,
- .set_timings = omapdss_sdi_set_timings,
+ .set_timings = sdi_set_timings,
.get_timings = sdi_get_timings,
- .set_datapairs = omapdss_sdi_set_datapairs,
+ .set_datapairs = sdi_set_datapairs,
};
static void sdi_init_output(struct platform_device *pdev)
@@ -430,29 +355,15 @@ static void __exit sdi_uninit_output(struct platform_device *pdev)
static int omap_sdi_probe(struct platform_device *pdev)
{
- int r;
-
sdi.pdev = pdev;
sdi_init_output(pdev);
- if (pdev->dev.platform_data) {
- r = sdi_probe_pdata(pdev);
- if (r)
- goto err_probe;
- }
-
return 0;
-
-err_probe:
- sdi_uninit_output(pdev);
- return r;
}
static int __exit omap_sdi_remove(struct platform_device *pdev)
{
- dss_unregister_child_devices(&pdev->dev);
-
sdi_uninit_output(pdev);
return 0;
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 6d7297f..3395804 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -987,12 +987,6 @@ int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi,
#define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver)
#define to_dss_device(x) container_of((x), struct omap_dss_device, old_dev)
-int omapdss_sdi_display_enable(struct omap_dss_device *dssdev);
-void omapdss_sdi_display_disable(struct omap_dss_device *dssdev);
-void omapdss_sdi_set_timings(struct omap_dss_device *dssdev,
- struct omap_video_timings *timings);
-void omapdss_sdi_set_datapairs(struct omap_dss_device *dssdev, int datapairs);
-
int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev);
void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev);
int omap_rfbi_update(struct omap_dss_device *dssdev, void (*callback)(void *),
--
1.8.1.2
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox