From: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
To: Jonathan Corbet <corbet@lwn.net>
Cc: linux-kernel@vger.kernel.org, Harald Welte <laforge@gnumonks.org>,
JosephChan@via.com.tw, ScottFang@viatech.com.cn,
Deepak Saxena <dsaxena@laptop.org>,
linux-fbdev-devel@lists.sourceforge.net
Subject: Re: [PATCH 07/16] viafb: Add 1200x900 DCON/LCD panel modes for OLPC XO-1.5
Date: Fri, 09 Apr 2010 23:27:30 +0200 [thread overview]
Message-ID: <4BBF9BC2.9070502@gmx.de> (raw)
In-Reply-To: <1270746946-12467-8-git-send-email-corbet@lwn.net>
Jonathan Corbet schrieb:
> From: Chris Ball <cjb@laptop.org>
>
> [jc: extensive merge conflict fixes]
> Signed-off-by: Chris Ball <cjb@laptop.org>
> ---
> drivers/video/via/hw.c | 1 +
> drivers/video/via/ioctl.h | 2 +-
> drivers/video/via/lcd.c | 10 ++++++++++
> drivers/video/via/lcd.h | 2 ++
> drivers/video/via/share.h | 8 ++++++++
> drivers/video/via/viamode.c | 14 ++++++++++++++
> 6 files changed, 36 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
> index 963704e..7be462e 100644
> --- a/drivers/video/via/hw.c
> +++ b/drivers/video/via/hw.c
> @@ -63,6 +63,7 @@ static struct pll_map pll_value[] = {
> CX700_52_977M, VX855_52_977M},
> {CLK_56_250M, CLE266_PLL_56_250M, K800_PLL_56_250M,
> CX700_56_250M, VX855_56_250M},
> + {CLK_57_275M, 0, 0, 0, VX855_57_275M},
What will happen if someone with no VX855 will try to enter 1200x900
mode? Probably the world won't be destroyed but I have a really ugly
feeling that the driver is not well prepared for this situation. Haven't
tested yet as I'm waiting for the official forward port but I think it
might be better to reschedule this patch for later or add some PLL
values that are supposed to work (using/executing the formulas in the
VIA open source X driver)
Otherwise it looks fine.
Thanks,
Florian Tobias Schandinat
> {CLK_60_466M, CLE266_PLL_60_466M, K800_PLL_60_466M,
> CX700_60_466M, VX855_60_466M},
> {CLK_61_500M, CLE266_PLL_61_500M, K800_PLL_61_500M,
> diff --git a/drivers/video/via/ioctl.h b/drivers/video/via/ioctl.h
> index de89980..c430fa2 100644
> --- a/drivers/video/via/ioctl.h
> +++ b/drivers/video/via/ioctl.h
> @@ -75,7 +75,7 @@
> /*SAMM operation flag*/
> #define OP_SAMM 0x80
>
> -#define LCD_PANEL_ID_MAXIMUM 22
> +#define LCD_PANEL_ID_MAXIMUM 23
>
> #define STATE_ON 0x1
> #define STATE_OFF 0x0
> diff --git a/drivers/video/via/lcd.c b/drivers/video/via/lcd.c
> index 71e3200..e0e2310 100644
> --- a/drivers/video/via/lcd.c
> +++ b/drivers/video/via/lcd.c
> @@ -456,6 +456,16 @@ static int fp_id_to_vindex(int panel_id)
> viaparinfo->lvds_setting_info->LCDDithering = 1;
> return VIA_RES_480X640;
> break;
> + case 0x17:
> + /* OLPC XO-1.5 panel */
> + viaparinfo->lvds_setting_info->lcd_panel_hres = 1200;
> + viaparinfo->lvds_setting_info->lcd_panel_vres = 900;
> + viaparinfo->lvds_setting_info->lcd_panel_id =
> + LCD_PANEL_IDD_1200X900;
> + viaparinfo->lvds_setting_info->device_lcd_dualedge = 0;
> + viaparinfo->lvds_setting_info->LCDDithering = 0;
> + return VIA_RES_1200X900;
> + break;
> default:
> viaparinfo->lvds_setting_info->lcd_panel_hres = 800;
> viaparinfo->lvds_setting_info->lcd_panel_vres = 600;
> diff --git a/drivers/video/via/lcd.h b/drivers/video/via/lcd.h
> index 071f47c..9762ec6 100644
> --- a/drivers/video/via/lcd.h
> +++ b/drivers/video/via/lcd.h
> @@ -60,6 +60,8 @@
> #define LCD_PANEL_IDB_1360X768 0x0B
> /* Resolution: 480x640, Channel: single, Dithering: Enable */
> #define LCD_PANEL_IDC_480X640 0x0C
> +/* Resolution: 1200x900, Channel: single, Dithering: Disable */
> +#define LCD_PANEL_IDD_1200X900 0x0D
>
>
> extern int viafb_LCD2_ON;
> diff --git a/drivers/video/via/share.h b/drivers/video/via/share.h
> index 7cd03e2..ecbbf93 100644
> --- a/drivers/video/via/share.h
> +++ b/drivers/video/via/share.h
> @@ -86,6 +86,7 @@
> #define VIA_RES_1920X1200 38
> #define VIA_RES_2048X1536 39
> #define VIA_RES_480X640 40
> +#define VIA_RES_1200X900 41
>
> /*Reduce Blanking*/
> #define VIA_RES_1360X768_RB 131
> @@ -626,6 +627,10 @@
> #define M1200X720_R60_HSP NEGATIVE
> #define M1200X720_R60_VSP POSITIVE
>
> +/* 1200x900@60 Sync Polarity (DCON) */
> +#define M1200X900_R60_HSP NEGATIVE
> +#define M1200X900_R60_VSP NEGATIVE
> +
> /* 1280x600@60 Sync Polarity (GTF Mode) */
> #define M1280x600_R60_HSP NEGATIVE
> #define M1280x600_R60_VSP POSITIVE
> @@ -707,6 +712,7 @@
> #define CLK_52_406M 52406000
> #define CLK_52_977M 52977000
> #define CLK_56_250M 56250000
> +#define CLK_57_275M 57275000
> #define CLK_60_466M 60466000
> #define CLK_61_500M 61500000
> #define CLK_65_000M 65000000
> @@ -995,6 +1001,7 @@
> #define VX855_52_406M 0x00580C03
> #define VX855_52_977M 0x00940C05
> #define VX855_56_250M 0x009D0C05
> +#define VX855_57_275M 0x009D8C85 /* Used by XO panel */
> #define VX855_60_466M 0x00A90C05
> #define VX855_61_500M 0x00AC0C05
> #define VX855_65_000M 0x006D0C03
> @@ -1121,6 +1128,7 @@
> #define RES_1600X1200_60HZ_PIXCLOCK 6172
> #define RES_1600X1200_75HZ_PIXCLOCK 4938
> #define RES_1280X720_60HZ_PIXCLOCK 13426
> +#define RES_1200X900_60HZ_PIXCLOCK 17459
> #define RES_1920X1080_60HZ_PIXCLOCK 5787
> #define RES_1400X1050_60HZ_PIXCLOCK 8214
> #define RES_1400X1050_75HZ_PIXCLOCK 6410
> diff --git a/drivers/video/via/viamode.c b/drivers/video/via/viamode.c
> index b74f8a6..46833b4 100644
> --- a/drivers/video/via/viamode.c
> +++ b/drivers/video/via/viamode.c
> @@ -66,6 +66,7 @@ struct res_map_refresh res_map_refresh_tbl[] = {
> {1088, 612, RES_1088X612_60HZ_PIXCLOCK, 60},
> {1152, 720, RES_1152X720_60HZ_PIXCLOCK, 60},
> {1200, 720, RES_1200X720_60HZ_PIXCLOCK, 60},
> + {1200, 900, RES_1200X900_60HZ_PIXCLOCK, 60},
> {1280, 600, RES_1280X600_60HZ_PIXCLOCK, 60},
> {1280, 720, RES_1280X720_50HZ_PIXCLOCK, 50},
> {1280, 768, RES_1280X768_50HZ_PIXCLOCK, 50},
> @@ -759,6 +760,16 @@ struct crt_mode_table CRTM1200x720[] = {
> {1568, 1200, 1200, 368, 1256, 128, 746, 720, 720, 26, 721, 3} }
> };
>
> +/* 1200x900 (DCON) */
> +struct crt_mode_table DCON1200x900[] = {
> + /* r_rate, vclk, hsp, vsp */
> + {REFRESH_60, CLK_57_275M, M1200X900_R60_HSP, M1200X900_R60_VSP,
> + /* The correct htotal is 1240, but this doesn't raster on VX855. */
> + /* Via suggested changing to a multiple of 16, hence 1264. */
> + /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
> + {1264, 1200, 1200, 64, 1211, 32, 912, 900, 900, 12, 901, 10} }
> +};
> +
> /* 1280x600 (GTF) */
> struct crt_mode_table CRTM1280x600[] = {
> /* r_rate, vclk, hsp, vsp */
> @@ -946,6 +957,9 @@ struct VideoModeTable CLE266Modes[] = {
> /* Display : 1200x720 (GTF) */
> {VIA_RES_1200X720, CRTM1200x720, ARRAY_SIZE(CRTM1200x720)},
>
> + /* Display : 1200x900 (DCON) */
> + {VIA_RES_1200X900, DCON1200x900, ARRAY_SIZE(DCON1200x900)},
> +
> /* Display : 1280x600 (GTF) */
> {VIA_RES_1280X600, CRTM1280x600, ARRAY_SIZE(CRTM1280x600)},
>
next prev parent reply other threads:[~2010-04-09 21:27 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-08 17:15 [RFC] Initial OLPC Viafb merge Jonathan Corbet
2010-04-08 17:15 ` [PATCH 01/16] [FB] viafb: Fix various resource leaks during module_init() Jonathan Corbet
2010-04-08 18:22 ` Florian Tobias Schandinat
2010-04-09 19:31 ` Jonathan Corbet
2010-04-08 17:15 ` [PATCH 02/16] viafb: use proper pci config API Jonathan Corbet
2010-04-08 18:42 ` Florian Tobias Schandinat
2010-04-09 19:46 ` Jonathan Corbet
2010-04-10 6:41 ` Harald Welte
2010-04-08 17:15 ` [PATCH 03/16] viafb: Unmap the frame buffer on initialization error Jonathan Corbet
2010-04-08 18:55 ` Florian Tobias Schandinat
2010-04-08 17:15 ` [PATCH 04/16] viafb: Retain GEMODE reserved bits Jonathan Corbet
2010-04-09 3:07 ` Florian Tobias Schandinat
2010-04-09 19:59 ` Jonathan Corbet
2010-04-09 20:23 ` Florian Tobias Schandinat
2010-04-09 20:30 ` Jonathan Corbet
2010-04-08 17:15 ` [PATCH 05/16] viafb: Determine type of 2D engine and store it in chip_info Jonathan Corbet
2010-04-09 3:20 ` Florian Tobias Schandinat
2010-04-09 20:11 ` Jonathan Corbet
2010-04-09 20:34 ` Florian Tobias Schandinat
2010-04-18 17:34 ` Jonathan Corbet
2010-04-18 18:00 ` Harald Welte
2010-04-18 18:05 ` Florian Tobias Schandinat
2010-04-08 17:15 ` [PATCH 06/16] viafb: complete support for VX800/VX855 accelerated framebuffer Jonathan Corbet
2010-04-09 4:21 ` Florian Tobias Schandinat
2010-04-09 20:18 ` Jonathan Corbet
2010-04-08 17:15 ` [PATCH 07/16] viafb: Add 1200x900 DCON/LCD panel modes for OLPC XO-1.5 Jonathan Corbet
2010-04-09 21:27 ` Florian Tobias Schandinat [this message]
2010-04-18 17:39 ` Jonathan Corbet
2010-04-18 18:24 ` Florian Tobias Schandinat
2010-04-08 17:15 ` [PATCH 08/16] viafb: Do not probe for LVDS/TMDS on " Jonathan Corbet
2010-04-09 21:40 ` Florian Tobias Schandinat
2010-04-10 0:19 ` Jonathan Corbet
2010-04-10 0:42 ` Florian Tobias Schandinat
2010-04-10 0:55 ` Jonathan Corbet
2010-04-10 6:34 ` Harald Welte
2010-04-08 17:15 ` [PATCH 09/16] viafb: rework the I2C support in the VIA framebuffer driver Jonathan Corbet
2010-04-09 22:07 ` Florian Tobias Schandinat
2010-04-08 17:15 ` [PATCH 10/16] suppress verbose debug messages: change printk() to DEBUG_MSG() Jonathan Corbet
2010-04-09 22:09 ` Florian Tobias Schandinat
2010-04-08 17:15 ` [PATCH 11/16] Minimal support for viafb suspend/resume Jonathan Corbet
2010-04-08 17:15 ` [PATCH 12/16] fix register save count, so it matches the restore count Jonathan Corbet
2010-04-08 17:15 ` [PATCH 13/16] VIAFB: Update suspend/resume to selectively restore registers Jonathan Corbet
2010-04-08 17:15 ` [PATCH 14/16] Remove cursor restore hack in viafb Jonathan Corbet
2010-04-08 17:15 ` [PATCH 15/16] viafb: rework suspend/resume Jonathan Corbet
2010-04-08 17:15 ` [PATCH 16/16] viafb: Only suspend/resume on VX855 Jonathan Corbet
2010-04-09 5:43 ` [RFC] Initial OLPC Viafb merge Florian Tobias Schandinat
2010-04-09 18:46 ` Jonathan Corbet
2010-04-09 23:32 ` Florian Tobias Schandinat
2010-04-10 0:27 ` Jonathan Corbet
2010-04-10 1:02 ` Florian Tobias Schandinat
2010-04-10 8:52 ` Bruno Prémont
2010-04-13 3:03 ` Florian Tobias Schandinat
2010-04-21 20:37 ` Jonathan Corbet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BBF9BC2.9070502@gmx.de \
--to=florianschandinat@gmx.de \
--cc=JosephChan@via.com.tw \
--cc=ScottFang@viatech.com.cn \
--cc=corbet@lwn.net \
--cc=dsaxena@laptop.org \
--cc=laforge@gnumonks.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.