From patchwork Thu Aug 23 13:45:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 1367311 Return-Path: X-Original-To: patchwork-linux-fbdev@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 76A92DF2AB for ; Thu, 23 Aug 2012 13:45:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934021Ab2HWNp6 (ORCPT ); Thu, 23 Aug 2012 09:45:58 -0400 Received: from na3sys009aog134.obsmtp.com ([74.125.149.83]:51273 "EHLO na3sys009aog134.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934010Ab2HWNpw (ORCPT ); Thu, 23 Aug 2012 09:45:52 -0400 Received: from mail-lb0-f178.google.com ([209.85.217.178]) (using TLSv1) by na3sys009aob134.postini.com ([74.125.148.12]) with SMTP ID DSNKUDY0Dx5b0wEm8eguX+WyjbiZiEllUxHY@postini.com; Thu, 23 Aug 2012 06:45:52 PDT Received: by lbok6 with SMTP id k6so489416lbo.37 for ; Thu, 23 Aug 2012 06:45:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=qr+dqHDChFK1rV7ime7IgFLdlHsSPWxAvKtggaAs/4Y=; b=Y5jPeVhKAERIglIF0atKkpl6vwGiwgA4PF99rP57aqTagTN8SMznenQKsDRKDuq9hz 4sXk/HqGKvamzcrkjIq9xPc0slzQxZRi/xFACt2MGNXkjXd9uZU2Kh1pJ6PVZuhptwfy JziaevwV1qiXFaBu1yaMMIxuTB0M6H2mhGdwjv+UbK2TFQZJsUH6kLHBQuB6NgW23v38 KjJtPe/A2CqAJkFMK5dCT8W5QvFKVP4bzT6DpCqhyy96rAdl65VX55VzUL22peA55wbv IYBgVeyAGwWhhL72xTp3RqRCX2x7gl8bLaLsvBrgkVSrGMcZCtex/nj/4xJRrZzxYnSh haVA== Received: by 10.112.30.41 with SMTP id p9mr971564lbh.26.1345729550130; Thu, 23 Aug 2012 06:45:50 -0700 (PDT) Received: from localhost.localdomain (a91-156-160-115.elisa-laajakaista.fi. [91.156.160.115]) by mx.google.com with ESMTPS id fz8sm466816lbb.9.2012.08.23.06.45.44 (version=SSLv3 cipher=OTHER); Thu, 23 Aug 2012 06:45:45 -0700 (PDT) From: Tomi Valkeinen To: archit@ti.com Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, Tomi Valkeinen Subject: [PATCH 8/8] OMAPDSS: fix use of dssdev->caps Date: Thu, 23 Aug 2012 16:45:14 +0300 Message-Id: <1345729514-2441-9-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1345729514-2441-1-git-send-email-tomi.valkeinen@ti.com> References: <1345729514-2441-1-git-send-email-tomi.valkeinen@ti.com> X-Gm-Message-State: ALoCoQlbn5Qp9Wjfmvdi94lRfWY3kkRFYWqhr9sNXZfnWUG/pVnRXScqwBJF/0hj8+1REpRzCEtL Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Recent commit dca2b1522ccab28d03fb79f6e70e70ea78033d52 (OMAPDSS: DSI: Maintain copy of operation mode in driver data) broke DSI for video mode displays. The commit changed the way dssdev->caps are initialized, and the result was that every DSI display is initialized with manual-update and tear-elim caps. The code that sets dssdev->caps is not very good, even when fixed. omapdss driver shouldn't be writing dssdev->caps at all. This patch fixes the problem with video mode displays by moving the initialization of dssdev->caps to the panel driver. The same change is done for RFBI. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/displays/panel-n8x0.c | 1 + drivers/video/omap2/displays/panel-taal.c | 2 ++ drivers/video/omap2/dss/dsi.c | 5 ----- drivers/video/omap2/dss/rfbi.c | 1 - 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/video/omap2/displays/panel-n8x0.c b/drivers/video/omap2/displays/panel-n8x0.c index 17ae85e..3fc5ad0 100644 --- a/drivers/video/omap2/displays/panel-n8x0.c +++ b/drivers/video/omap2/displays/panel-n8x0.c @@ -489,6 +489,7 @@ static int n8x0_panel_probe(struct omap_dss_device *dssdev) dssdev->panel.timings.y_res = 480; dssdev->ctrl.pixel_size = 16; dssdev->ctrl.rfbi_timings = n8x0_panel_timings; + dssdev->caps = OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE; memset(&props, 0, sizeof(props)); props.max_brightness = 127; diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c index ddda96a..7b2d7bb 100644 --- a/drivers/video/omap2/displays/panel-taal.c +++ b/drivers/video/omap2/displays/panel-taal.c @@ -884,6 +884,8 @@ static int taal_probe(struct omap_dss_device *dssdev) dssdev->panel.timings = panel_config->timings; dssdev->panel.dsi_pix_fmt = OMAP_DSS_DSI_FMT_RGB888; + dssdev->caps = OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE | + OMAP_DSS_DISPLAY_CAP_TEAR_ELIM; td = kzalloc(sizeof(*td), GFP_KERNEL); if (!td) { diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 340c832..254666f 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c @@ -4866,11 +4866,6 @@ static int __init dsi_init_display(struct omap_dss_device *dssdev) DSSDBG("DSI init\n"); - if (dsi->mode == OMAP_DSS_DSI_CMD_MODE) { - dssdev->caps = OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE | - OMAP_DSS_DISPLAY_CAP_TEAR_ELIM; - } - if (dsi->vdds_dsi_reg == NULL) { struct regulator *vdds_dsi; diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index 5a9c0e9..2e520d3 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c @@ -939,7 +939,6 @@ EXPORT_SYMBOL(omapdss_rfbi_display_disable); static int __init rfbi_init_display(struct omap_dss_device *dssdev) { rfbi.dssdev[dssdev->phy.rfbi.channel] = dssdev; - dssdev->caps = OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE; return 0; }