From patchwork Thu Aug 16 13:00:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1331391 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id BBA603FC33 for ; Thu, 16 Aug 2012 13:00:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756360Ab2HPNAo (ORCPT ); Thu, 16 Aug 2012 09:00:44 -0400 Received: from perceval.ideasonboard.com ([95.142.166.194]:60947 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932123Ab2HPNAm (ORCPT ); Thu, 16 Aug 2012 09:00:42 -0400 Received: from avalon.ideasonboard.com (unknown [91.178.185.167]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1889D35A86; Thu, 16 Aug 2012 15:00:41 +0200 (CEST) From: Laurent Pinchart To: linux-fbdev@vger.kernel.org Cc: linux-sh@vger.kernel.org, Kuninori Morimoto , Magnus Damm , Paul Mundt Subject: [PATCH 01/19] fbdev: sh_mobile_lcdc: Get display dimensions from the channel structure Date: Thu, 16 Aug 2012 15:00:36 +0200 Message-Id: <1345122054-16013-2-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1345122054-16013-1-git-send-email-laurent.pinchart@ideasonboard.com> References: <1345122054-16013-1-git-send-email-laurent.pinchart@ideasonboard.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Get the display dimensions directly from the channel structure instead of recomputing them from the monitor specs or accessing the platform data. Signed-off-by: Laurent Pinchart --- drivers/video/sh_mobile_lcdcfb.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index bccfd7e..7375dbf 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c @@ -586,8 +586,8 @@ static int sh_mobile_lcdc_display_notify(struct sh_mobile_lcdc_chan *ch, * Just turn on, if we run a resume here, the * logo disappears. */ - info->var.width = monspec->max_x * 10; - info->var.height = monspec->max_y * 10; + info->var.width = ch->display.width; + info->var.height = ch->display.height; sh_mobile_lcdc_display_on(ch); } else { /* New monitor or have to wake up */ @@ -2248,8 +2248,8 @@ sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch, */ var = &info->var; fb_videomode_to_var(var, mode); - var->width = ch->cfg->panel_cfg.width; - var->height = ch->cfg->panel_cfg.height; + var->width = ch->display.width; + var->height = ch->display.height; var->xres_virtual = ch->xres_virtual; var->yres_virtual = ch->yres_virtual; var->activate = FB_ACTIVATE_NOW;