diff options
author | Robby Cai <R63905@freescale.com> | 2010-01-26 10:48:34 +0800 |
---|---|---|
committer | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2010-05-24 11:50:05 +0200 |
commit | aaa31dcdc25ee4833067aae00d87d0c728767363 (patch) | |
tree | 178c5cffc361246d93e5013117b338bc0a91cefa /drivers/media | |
parent | 152616ce5ff4377dd27ba08df74540ddbec88216 (diff) |
ENGR00120447-2 FIX: MX23 PXP set wrong RGBBUF and RGBSIZE after TV/LCD switch
After TV/LCD switch, PXP uses wrong old FB info to set RGBBUF/RGBSIZE.
This patch fixes this problem by notifying PXP to adjust when FB changed.
Signed-off-by: Robby Cai <R63905@freescale.com>
Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/pxp.c | 21 | ||||
-rw-r--r-- | drivers/media/video/pxp.h | 5 |
2 files changed, 24 insertions, 2 deletions
diff --git a/drivers/media/video/pxp.c b/drivers/media/video/pxp.c index 1029cad524a7..0aaa93af6094 100644 --- a/drivers/media/video/pxp.c +++ b/drivers/media/video/pxp.c @@ -3,7 +3,7 @@ * * Author: Matt Porter <mporter@embeddedalley.com> * - * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright 2008-2010 Freescale Semiconductor, Inc. * Copyright 2008-2009 Embedded Alley Solutions, Inc All Rights Reserved. */ @@ -35,6 +35,7 @@ #include <mach/platform.h> #include <mach/regs-pxp.h> +#include <mach/lcdif.h> #include "pxp.h" @@ -1199,6 +1200,21 @@ out: return IRQ_HANDLED; } +static int pxp_notifier_callback(struct notifier_block *self, + unsigned long event, void *data) +{ + struct pxps *pxp = container_of(self, struct pxps, nb); + + switch (event) { + case STMP3XXX_LCDIF_PANEL_INIT: + pxp_set_fbinfo(pxp); + break; + default: + break; + } + return 0; +} + static int pxp_probe(struct platform_device *pdev) { struct pxps *pxp; @@ -1279,6 +1295,8 @@ static int pxp_probe(struct platform_device *pdev) goto freevdev; } + pxp->nb.notifier_call = pxp_notifier_callback, + stmp3xxx_lcdif_register_client(&pxp->nb); dev_info(&pdev->dev, "initialized\n"); exit: @@ -1303,6 +1321,7 @@ static int __devexit pxp_remove(struct platform_device *pdev) { struct pxps *pxp = platform_get_drvdata(pdev); + stmp3xxx_lcdif_unregister_client(&pxp->nb); video_unregister_device(pxp->vdev); video_device_release(pxp->vdev); diff --git a/drivers/media/video/pxp.h b/drivers/media/video/pxp.h index 31731420e7e9..11b41dcc6ade 100644 --- a/drivers/media/video/pxp.h +++ b/drivers/media/video/pxp.h @@ -3,7 +3,7 @@ * * Author: Matt Porter <mporter@embeddedalley.com> * - * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright 2008-2010 Freescale Semiconductor, Inc. * Copyright 2008-2009 Embedded Alley Solutions, Inc All Rights Reserved. */ @@ -112,6 +112,9 @@ struct pxps { struct pxp_registers *regs_virt; wait_queue_head_t done; int next_queue_ended; + + /* notifier for PXP when fb changed */ + struct notifier_block nb; }; struct pxp_data_format { |