From patchwork Wed Sep 5 08:25:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 1406341 Return-Path: X-Original-To: patchwork-linux-fbdev@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 8E44540220 for ; Wed, 5 Sep 2012 08:27:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756713Ab2IEI1w (ORCPT ); Wed, 5 Sep 2012 04:27:52 -0400 Received: from na3sys009aog137.obsmtp.com ([74.125.149.18]:56291 "EHLO na3sys009aog137.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757896Ab2IEI0d (ORCPT ); Wed, 5 Sep 2012 04:26:33 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]) (using TLSv1) by na3sys009aob137.postini.com ([74.125.148.12]) with SMTP ID DSNKUEcMuMeGNG0qnDeijZSHEa73/kAg4+O2@postini.com; Wed, 05 Sep 2012 01:26:33 PDT Received: by lbbgj3 with SMTP id gj3so189906lbb.19 for ; Wed, 05 Sep 2012 01:26:31 -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=32JtqAtXr1X/h32c8xxiABu1YlSlYcJr1gfNCU6GxNI=; b=Z1hTgEYUi3EgR1qUYLOc/U2ZuhbtQYZtFPplOJmNvr955BevLCcP5GWkWLw4tIKHmk TQLH2Qqouf3H/W+AxJu/NvNLPtZwSamD1kDjwGUXDtkpE5ufQhXO1dvz6qubOTIUEC1b JskXecw+x/0dJEZoPv32GBJLzwaCr7pMjZy2H6aDrQD4W2dHR2x0yHaZ1yCfz7Q0c0hs pi8BYdM8MxFNi1UOiV5HPTgqZ3okjYISW1lDcfu9fGBBfqhm+epUD4yuIFMb8k9LNQL2 YDg/DVG6puFK4y+hb07dQ3dzQ7xcnDYsupROxb4fOZLMf1DDih0Myz+gyvDruhZhIfHw JtKA== Received: by 10.112.38.163 with SMTP id h3mr7534690lbk.130.1346833590945; Wed, 05 Sep 2012 01:26:30 -0700 (PDT) Received: from localhost.localdomain (a91-156-160-115.elisa-laajakaista.fi. [91.156.160.115]) by mx.google.com with ESMTPS id bc2sm279735lbb.3.2012.09.05.01.26.29 (version=SSLv3 cipher=OTHER); Wed, 05 Sep 2012 01:26:30 -0700 (PDT) From: Tomi Valkeinen To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, archit@ti.com Cc: Tomi Valkeinen Subject: [PATCH 11/17] OMAPDSS: clean up dss_mgr_set_lcd_config Date: Wed, 5 Sep 2012 11:25:49 +0300 Message-Id: <1346833555-31258-12-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1346833555-31258-1-git-send-email-tomi.valkeinen@ti.com> References: <1346833555-31258-1-git-send-email-tomi.valkeinen@ti.com> X-Gm-Message-State: ALoCoQnpVMYk1HKvkF8MoVckWHMC+XUzSG5+bvaJTx58hkdGSArPNxgbG9ShDR2TbGvfTcQAQHde Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org dss_mgr_set_lcd_config() can only be called when the output is not active. This means that most of the code in the function is extra, as there's no need to write the values to registers, etc, because that will be handled when the output will be enabled. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/apply.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index 52a5940..53629dd 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c @@ -1346,7 +1346,7 @@ void dss_mgr_set_lcd_config(struct omap_overlay_manager *mgr, unsigned long flags; struct mgr_priv_data *mp = get_mgr_priv(mgr); - mutex_lock(&apply_lock); + spin_lock_irqsave(&data_lock, flags); if (mp->enabled) { DSSERR("cannot apply lcd config for %s: manager needs to be disabled\n", @@ -1354,19 +1354,9 @@ void dss_mgr_set_lcd_config(struct omap_overlay_manager *mgr, goto out; } - spin_lock_irqsave(&data_lock, flags); - dss_apply_mgr_lcd_config(mgr, config); - - dss_write_regs(); - dss_set_go_bits(); - - spin_unlock_irqrestore(&data_lock, flags); - - wait_pending_extra_info_updates(); - out: - mutex_unlock(&apply_lock); + spin_unlock_irqrestore(&data_lock, flags); } int dss_ovl_set_info(struct omap_overlay *ovl,