From patchwork Mon Aug 16 09:15:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Liao X-Patchwork-Id: 61801 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 68425B70E2 for ; Mon, 16 Aug 2010 22:28:37 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1Okynn-0008Cl-45; Mon, 16 Aug 2010 13:28:31 +0100 Received: from dakia3.marvell.com ([65.219.4.28]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1Okvnw-0000zw-NZ for kernel-team@lists.ubuntu.com; Mon, 16 Aug 2010 10:16:29 +0100 X-ASG-Debug-ID: 1281950187-6c36b9e00001-7LEcdI Received: from SC-OWA01.marvell.com (sc-owa01.marvell.com [10.93.76.21]) by dakia3.marvell.com with ESMTP id 7Y8TZLJdvew8nvsv (version=TLSv1 cipher=RC4-MD5 bits=128 verify=NO); Mon, 16 Aug 2010 02:16:27 -0700 (PDT) X-Barracuda-Envelope-From: pliao@marvell.com Received: from SC-vEXCH2.marvell.com ([10.93.76.134]) by SC-OWA01.marvell.com ([10.93.76.21]) with mapi; Mon, 16 Aug 2010 02:16:27 -0700 From: Peter Liao X-Barracuda-BBL-IP: 10.93.76.134 X-Barracuda-RBL-IP: 10.93.76.134 To: Green Wan , Eric Miao , "kernel-team@lists.ubuntu.com" Date: Mon, 16 Aug 2010 02:15:02 -0700 X-ASG-Orig-Subj: RE: [PATCH] dovefb: add more config options to the display controller (DCON) Subject: RE: [PATCH] dovefb: add more config options to the display controller (DCON) Thread-Topic: [PATCH] dovefb: add more config options to the display controller (DCON) Thread-Index: Acs9G+Km73qPMjl/RX6JZo6VHKHTHAAAM5ugAAFo3OA= Message-ID: <689C75E0D210324F8BE88961219F681618132E32BB@SC-VEXCH2.marvell.com> References: <689C75E0D210324F8BE88961219F6816181362C008@SC-VEXCH2.marvell.com> In-Reply-To: <689C75E0D210324F8BE88961219F6816181362C008@SC-VEXCH2.marvell.com> Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: zh-TW, en-US MIME-Version: 1.0 X-Barracuda-Connect: sc-owa01.marvell.com[10.93.76.21] X-Barracuda-Start-Time: 1281950187 X-Barracuda-Encrypted: RC4-MD5 X-Barracuda-URL: http://dakia3.marvell.com:80/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at marvell.com X-Mailman-Approved-At: Mon, 16 Aug 2010 13:28:29 +0100 Cc: Lea Li , Saeed Bishara X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com Dear Eric: Thanks for your suggestion. Your changes will impact a lot to our current implementations, and all of customer and AE are familiar with current implementation already and it can satisfy all of our requirements. We implement the code referring a lot of feedback from customer, design flexibility and based on our supporting experiences. It is painful to us to change the code following your suggestions. I am sorry that we cannot give you any support and we also do not suggest you to do this way. If you do so, you have to revise your entire kernel for the platforms you have and make sure all functions works also with Marvell provided xorg driver. We have limited resources to revise the driver co-working with you in current stage. Please keep the current implementation as much as possible, otherwise you may get a lot f issues to sync up our new code drop. Hope you can understand. Thanks again for your suggestion. -----Original Message----- From: Green Wan Sent: Monday, August 16, 2010 4:59 PM To: Eric Miao; kernel-team@lists.ubuntu.com Cc: Saeed Bishara; Peter Liao; Lea Li Subject: RE: [PATCH] dovefb: add more config options to the display controller (DCON) Hi Eric, =) 1. I exported some paths in /sys/devices/platform/dovedcon/ to configure all possible DCON's status. For example, output LCD0 signal to portA and portB at the same time. Is it what you're referring to? 2. Yes, I think lcd0_enable & lcd1_enable can be decided by the pointer we pass into lcd_platform_init(). But once we rely on passing pointers, doesn't it mean that we can't dynamically enable/disable lcd0 and lcd1 with different bootargs? Actually, I wanted to do auto detect and enable/disable lcd0 automatically before. But turn out I found some h/w can't be detected correctly. 3. Yes, for H/W aspect, DCON is quite independent to LCD output signal. For example, system could enable lcd0 and configure it output to portB. I don't know whether it's suitable to tight these two modules' configuration up together. How do you think of it? BRs, Green -----Original Message----- From: eric.y.miao@gmail.com [mailto:eric.y.miao@gmail.com] On Behalf Of Eric Miao Sent: Monday, August 16, 2010 4:20 PM To: kernel-team@lists.ubuntu.com Cc: Saeed Bishara; Peter Liao; Green Wan; Lea Li Subject: [PATCH] dovefb: add more config options to the display controller (DCON) It would be good if all the possibilities of PortA and PortB combinations in the Display Controller can be exposed, instead of simply having either port_a or port_b being enabled or not. Idea? One more thing is - can be decide lcd0_enable and lcd1_enable depending on the dovefb_mach_info * pointer passed to clcd_platform_init(), it seems to get overly designed to have these two parameters. And lcd0_enable/lcd1_enable seems to have no relationship with DCON configuration, and some of the code can be clean'ed up? Green? commit 84a7f186460e6b5d1428de51cd7093404724125d Author: Eric Miao Date: Sat Aug 14 21:06:46 2010 +0800 dovefb: add more config options to the display controller (DCON) Signed-off-by: Eric Miao #endif /* _KERNEL_ */ diff --git a/arch/arm/mach-dove/clcd.c b/arch/arm/mach-dove/clcd.c index 70e9f7d..b1a8364 100755 --- a/arch/arm/mach-dove/clcd.c +++ b/arch/arm/mach-dove/clcd.c @@ -528,8 +528,7 @@ static struct resource dcon_res[] = { }; static struct dovedcon_mach_info dcon_data = { - .port_a = 1, - .port_b = 1, + .mode = PORTA_ENABLE | PORTB_ENABLE, }; static struct platform_device dcon_platform_device = { @@ -565,7 +564,8 @@ int clcd_platform_init(struct dovefb_mach_info *lcd0_dmi_data, struct dovefb_mach_info *lcd0_vid_dmi_data, struct dovefb_mach_info *lcd1_dmi_data, struct dovefb_mach_info *lcd1_vid_dmi_data, - struct dovebl_platform_data *backlight_data) + struct dovebl_platform_data *backlight_data, + struct dovedcon_mach_info *dcon) { u32 total_x, total_y, i; u64 div_result; @@ -632,16 +632,21 @@ int clcd_platform_init(struct dovefb_mach_info *lcd0_dmi_data, lcd_accurate_clock = 0; #ifdef CONFIG_FB_DOVE_DCON - if (lcd0_enable || lcd1_enable) { - if (lcd0_enable) - dcon_data.port_a = 1; - if (lcd1_enable) - dcon_data.port_b = 1; + if (dcon) + memcpy(&dcon_data, dcon, sizeof(*dcon)); + else { + /* generate default according to cmdline */ + if (lcd0_enable || lcd1_enable) { + if (lcd0_enable) + dcon_data.mode |= PORTA_ENABLE; + if (lcd1_enable) + dcon_data.mode |= PORTB_ENABLE; #ifdef CONFIG_FB_DOVE_CLCD_DCONB_BYPASS0 - dcon_data.port_b = 1; + dcon_data.mode |= PORTB_LCD0_BYPASS; #endif - platform_device_register(&dcon_platform_device); + } } + platform_device_register(&dcon_platform_device); #endif #ifdef CONFIG_BACKLIGHT_DOVE diff --git a/arch/arm/mach-dove/dove-db-setup.c b/arch/arm/mach-dove/dove-db-setup.c index 52d66fe..bd38ca0 100755 --- a/arch/arm/mach-dove/dove-db-setup.c +++ b/arch/arm/mach-dove/dove-db-setup.c @@ -381,7 +381,7 @@ void __init dove_db_clcd_init(void) { } clcd_platform_init(lcd0_dmi, lcd0_vid_dmi, &dove_db_lcd1_dmi, &dove_db_lcd1_vid_dmi, - &dove_db_backlight_data); + &dove_db_backlight_data, NULL); #endif /* CONFIG_FB_DOVE */ } diff --git a/arch/arm/mach-dove/dove-front-panel-common.c b/arch/arm/mach-dove/dove-front-panel-common.c index 3fddf67..9b97a22 100755 --- a/arch/arm/mach-dove/dove-front-panel-common.c +++ b/arch/arm/mach-dove/dove-front-panel-common.c @@ -237,6 +237,6 @@ void __init dove_fp_clcd_init(void) { #ifdef CONFIG_FB_DOVE clcd_platform_init(&dove_lcd0_dmi, &dove_lcd0_vid_dmi, &dove_lcd1_dmi, &dove_lcd1_vid_dmi, - &fp_backlight_data); + &fp_backlight_data, NULL); #endif /* CONFIG_FB_DOVE */ } diff --git a/arch/arm/mach-dove/dove-rd-avng-setup.c b/arch/arm/mach-dove/dove-rd-avng-setup.c index a5e832e..947935a 100755 --- a/arch/arm/mach-dove/dove-rd-avng-setup.c +++ b/arch/arm/mach-dove/dove-rd-avng-setup.c @@ -230,7 +230,7 @@ void __init dove_rd_avng_clcd_init(void) { #ifdef CONFIG_FB_DOVE clcd_platform_init(&dove_rd_avng_lcd0_dmi, &dove_rd_avng_lcd0_vid_dmi, &dove_rd_avng_lcd1_dmi, &dove_rd_avng_lcd1_vid_dmi, - &dove_rd_avng_backlight_data); + &dove_rd_avng_backlight_data, NULL); #endif /* CONFIG_FB_DOVE */ } diff --git a/arch/arm/mach-dove/dove-videoplug-setup.c b/arch/arm/mach-dove/dove-videoplug-setup.c index 37a366e..ff226a1 100644 --- a/arch/arm/mach-dove/dove-videoplug-setup.c +++ b/arch/arm/mach-dove/dove-videoplug-setup.c @@ -129,7 +129,7 @@ static struct dove_ssp_platform_data dove_ssp_platform_data = { void __init dove_videoplug_clcd_init(void) { #ifdef CONFIG_FB_DOVE clcd_platform_init(&dove_videoplug_lcd0_dmi, &dove_videoplug_lcd0_vid_dmi, - NULL, NULL, NULL); + NULL, NULL, NULL, NULL); #endif /* CONFIG_FB_DOVE */ } diff --git a/drivers/video/marvell/dovedcon.c b/drivers/video/marvell/dovedcon.c index 1f3fa24..4de60c8 100755 --- a/drivers/video/marvell/dovedcon.c +++ b/drivers/video/marvell/dovedcon.c @@ -15,7 +15,18 @@ #include