From patchwork Thu Aug 16 13:00:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1331421 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 70576E0000 for ; Thu, 16 Aug 2012 13:00:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932176Ab2HPNAt (ORCPT ); Thu, 16 Aug 2012 09:00:49 -0400 Received: from perceval.ideasonboard.com ([95.142.166.194]:60953 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932167Ab2HPNAr (ORCPT ); Thu, 16 Aug 2012 09:00:47 -0400 Received: from avalon.ideasonboard.com (unknown [91.178.185.167]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6CBC935A8E; Thu, 16 Aug 2012 15:00:43 +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 09/19] fbdev: sh_mipi_dsi: Remove last reference to LCDC platform data Date: Thu, 16 Aug 2012 15:00:44 +0200 Message-Id: <1345122054-16013-10-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 The format check that references LCDC platform data isn't needed, as the mismatch between LCDC and MIPI-DSI platform it detects would result in a badly displayed image, which isn't worse than a complete failure to setup the transmitter. Signed-off-by: Laurent Pinchart --- drivers/video/sh_mipi_dsi.c | 18 ------------------ 1 files changed, 0 insertions(+), 18 deletions(-) diff --git a/drivers/video/sh_mipi_dsi.c b/drivers/video/sh_mipi_dsi.c index f88b204..f496229 100644 --- a/drivers/video/sh_mipi_dsi.c +++ b/drivers/video/sh_mipi_dsi.c @@ -131,10 +131,8 @@ static int sh_mipi_setup(struct sh_mipi *mipi, const struct fb_videomode *mode) { void __iomem *base = mipi->base; struct sh_mipi_dsi_info *pdata = mipi->pdev->dev.platform_data; - struct sh_mobile_lcdc_chan_cfg *ch = pdata->lcd_chan; u32 pctype, datatype, pixfmt, linelength, vmctr2; u32 tmp, top, bottom, delay, div; - bool yuv; int bpp; /* @@ -148,77 +146,66 @@ static int sh_mipi_setup(struct sh_mipi *mipi, const struct fb_videomode *mode) datatype = MIPI_DSI_PACKED_PIXEL_STREAM_24; pixfmt = MIPI_DCS_PIXEL_FMT_24BIT; linelength = mode->xres * 3; - yuv = false; break; case MIPI_RGB565: pctype = 1; datatype = MIPI_DSI_PACKED_PIXEL_STREAM_16; pixfmt = MIPI_DCS_PIXEL_FMT_16BIT; linelength = mode->xres * 2; - yuv = false; break; case MIPI_RGB666_LP: pctype = 2; datatype = MIPI_DSI_PIXEL_STREAM_3BYTE_18; pixfmt = MIPI_DCS_PIXEL_FMT_24BIT; linelength = mode->xres * 3; - yuv = false; break; case MIPI_RGB666: pctype = 3; datatype = MIPI_DSI_PACKED_PIXEL_STREAM_18; pixfmt = MIPI_DCS_PIXEL_FMT_18BIT; linelength = (mode->xres * 18 + 7) / 8; - yuv = false; break; case MIPI_BGR888: pctype = 8; datatype = MIPI_DSI_PACKED_PIXEL_STREAM_24; pixfmt = MIPI_DCS_PIXEL_FMT_24BIT; linelength = mode->xres * 3; - yuv = false; break; case MIPI_BGR565: pctype = 9; datatype = MIPI_DSI_PACKED_PIXEL_STREAM_16; pixfmt = MIPI_DCS_PIXEL_FMT_16BIT; linelength = mode->xres * 2; - yuv = false; break; case MIPI_BGR666_LP: pctype = 0xa; datatype = MIPI_DSI_PIXEL_STREAM_3BYTE_18; pixfmt = MIPI_DCS_PIXEL_FMT_24BIT; linelength = mode->xres * 3; - yuv = false; break; case MIPI_BGR666: pctype = 0xb; datatype = MIPI_DSI_PACKED_PIXEL_STREAM_18; pixfmt = MIPI_DCS_PIXEL_FMT_18BIT; linelength = (mode->xres * 18 + 7) / 8; - yuv = false; break; case MIPI_YUYV: pctype = 4; datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16; pixfmt = MIPI_DCS_PIXEL_FMT_16BIT; linelength = mode->xres * 2; - yuv = true; break; case MIPI_UYVY: pctype = 5; datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR16; pixfmt = MIPI_DCS_PIXEL_FMT_16BIT; linelength = mode->xres * 2; - yuv = true; break; case MIPI_YUV420_L: pctype = 6; datatype = MIPI_DSI_PACKED_PIXEL_STREAM_YCBCR12; pixfmt = MIPI_DCS_PIXEL_FMT_12BIT; linelength = (mode->xres * 12 + 7) / 8; - yuv = true; break; case MIPI_YUV420: pctype = 7; @@ -226,16 +213,11 @@ static int sh_mipi_setup(struct sh_mipi *mipi, const struct fb_videomode *mode) pixfmt = MIPI_DCS_PIXEL_FMT_12BIT; /* Length of U/V line */ linelength = (mode->xres + 1) / 2; - yuv = true; break; default: return -EINVAL; } - if ((yuv && ch->interface_type != YUV422) || - (!yuv && ch->interface_type != RGB24)) - return -EINVAL; - if (!pdata->lane) return -EINVAL;