From patchwork Wed Oct 27 16:24:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 286212 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 o9RGNuls014167 for ; Wed, 27 Oct 2010 16:24:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753166Ab0J0QYE (ORCPT ); Wed, 27 Oct 2010 12:24:04 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:35328 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with SMTP id S1753105Ab0J0QYD (ORCPT ); Wed, 27 Oct 2010 12:24:03 -0400 Received: (qmail invoked by alias); 27 Oct 2010 16:24:01 -0000 Received: from p50898A83.dip0.t-ipconnect.de (EHLO axis700.grange) [80.137.138.131] by mail.gmx.net (mp035) with SMTP; 27 Oct 2010 18:24:01 +0200 X-Authenticated: #20450766 X-Provags-ID: V01U2FsdGVkX18TP3kNNHUTpwl3P6ipyK4ovq8MeAjWt3n5LRDMQ3 KyI46vEW97VODC Received: from lyakh (helo=localhost) by axis700.grange with local-esmtp (Exim 4.63) (envelope-from ) id 1PB8nO-00034X-Ui; Wed, 27 Oct 2010 18:24:14 +0200 Date: Wed, 27 Oct 2010 18:24:14 +0200 (CEST) From: Guennadi Liakhovetski To: linux-sh@vger.kernel.org cc: linux-fbdev@vger.kernel.org Subject: [PATCH 2/3] 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]); Wed, 27 Oct 2010 16:24:05 +0000 (UTC) diff --git a/drivers/video/sh_mobile_hdmi.c b/drivers/video/sh_mobile_hdmi.c index 7ece656..b1c6aed 100644 --- a/drivers/video/sh_mobile_hdmi.c +++ b/drivers/video/sh_mobile_hdmi.c @@ -393,7 +393,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 @@ -497,8 +497,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); @@ -751,9 +755,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;