From patchwork Tue Nov 2 11:27:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 297112 X-Patchwork-Delegate: lethal@linux-sh.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oA2BRnnv029875 for ; Tue, 2 Nov 2010 11:27:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752604Ab0KBL1U (ORCPT ); Tue, 2 Nov 2010 07:27:20 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:34038 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with SMTP id S1752584Ab0KBL1N (ORCPT ); Tue, 2 Nov 2010 07:27:13 -0400 Received: (qmail invoked by alias); 02 Nov 2010 11:27:08 -0000 Received: from p5089880D.dip0.t-ipconnect.de (EHLO axis700.grange) [80.137.136.13] by mail.gmx.net (mp058) with SMTP; 02 Nov 2010 12:27:08 +0100 X-Authenticated: #20450766 X-Provags-ID: V01U2FsdGVkX1+720V625O7kz/DTqv3jyXwA8OUrQgS0ZHsNnbTlA Cy3WhvTwaVnNOd Received: from lyakh (helo=localhost) by axis700.grange with local-esmtp (Exim 4.63) (envelope-from ) id 1PDF1M-0001fK-3g; Tue, 02 Nov 2010 12:27:20 +0100 Date: Tue, 2 Nov 2010 12:27:20 +0100 (CET) From: Guennadi Liakhovetski To: linux-sh@vger.kernel.org cc: linux-fbdev@vger.kernel.org, Paul Mundt Subject: [PATCH 2/4 v2] fbdev: sh_mobile_hdmi: improve support for more video modes In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Y-GMX-Trusted: 0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 02 Nov 2010 11:27:50 +0000 (UTC) diff --git a/drivers/video/sh_mobile_hdmi.c b/drivers/video/sh_mobile_hdmi.c index ff7f785..c474b0bd 100644 --- a/drivers/video/sh_mobile_hdmi.c +++ b/drivers/video/sh_mobile_hdmi.c @@ -466,7 +466,7 @@ static void sh_hdmi_audio_config(struct sh_hdmi *hdmi) */ static void sh_hdmi_phy_config(struct sh_hdmi *hdmi) { - if (hdmi->var.yres > 480) { + if (hdmi->var.pixclock < 30000) { /* 720p, 8bit, 74.25MHz. Might need to be adjusted for other formats */ /* * [1:0] Speed_A @@ -570,8 +570,12 @@ static void sh_hdmi_avi_infoframe_setup(struct sh_hdmi *hdmi) */ if (hdmi->var.yres == 1080 && hdmi->var.xres == 1920) vic = 16; + else if (hdmi->var.yres == 576 && hdmi->var.xres == 720) + vic = 17; else if (hdmi->var.yres == 480 && hdmi->var.xres == 720) vic = 2; + else if (hdmi->var.yres == 480 && hdmi->var.xres == 640) + vic = 1; else vic = 4; hdmi_write(hdmi, vic, HDMI_CTRL_PKT_BUF_ACCESS_PB4); @@ -824,9 +828,11 @@ static int sh_hdmi_read_edid(struct sh_hdmi *hdmi, unsigned long *hdmi_rate, if (!found) return -ENXIO; - if ((found->xres == 720 && found->yres == 480) || - (found->xres == 1280 && found->yres == 720) || - (found->xres == 1920 && found->yres == 1080)) + if ((found->xres == 640 && found->yres == 480 && found->refresh == 60) || + (found->xres == 720 && found->yres == 480 && found->refresh == 60) || + (found->xres == 720 && found->yres == 576 && found->refresh == 50) || + (found->xres == 1280 && found->yres == 720 && found->refresh == 60) || + (found->xres == 1920 && found->yres == 1080 && found->refresh == 60)) hdmi->preprogrammed_mode = true; else hdmi->preprogrammed_mode = false;