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: 1406291 Return-Path: X-Original-To: patchwork-linux-omap@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 90C95DF264 for ; Wed, 5 Sep 2012 08:27:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758035Ab2IEI10 (ORCPT ); Wed, 5 Sep 2012 04:27:26 -0400 Received: from na3sys009aog138.obsmtp.com ([74.125.149.19]:52026 "EHLO na3sys009aog138.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758111Ab2IEI0e (ORCPT ); Wed, 5 Sep 2012 04:26:34 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]) (using TLSv1) by na3sys009aob138.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 gj3so189905lbb.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=VQTG5tUDWtmfaDy3WQOdq2EfKUAdAweLiOdJETiOzjCE8mlstgNvzqhXrrUqILnsjf BndFjUYGM/QMzLRef3Jf+1rNr6UBllPXWE52KNMVb3nckhNxFG2P3BloRoBrrsm36vDz Y6dJKQUdE/cBdOUYC4cWLUDa+NMDuDk6f7KmzNbFd+JW8G3LN+UouvlQlfEidrHtj08E eBxd4y7NzCCer68ciZzFfRY62JMAeV6fmzNAdDPA8cNGYfhYus6rIZ3PAVHNq0Wh3mt0 QF923rPPtLrW2lVuKzf6cvoNudE8yXsAKmaDb0Oejfz3GBn58OSvMpkVDQZ+e7SEgtnt G5EQ== 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: ALoCoQnrCXCxIIye5PKjNfjrIvmhetUpc9ClVl2yqsPsH0qlWGfIVq1dw4EKpxArfFklH/AXA4MC Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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,