From patchwork Wed Sep 5 08:25:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 1406121 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 D92D8DF28C for ; Wed, 5 Sep 2012 08:26:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758070Ab2IEI01 (ORCPT ); Wed, 5 Sep 2012 04:26:27 -0400 Received: from na3sys009aog114.obsmtp.com ([74.125.149.211]:55541 "EHLO na3sys009aog114.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756598Ab2IEI0Z (ORCPT ); Wed, 5 Sep 2012 04:26:25 -0400 Received: from mail-lpp01m010-f46.google.com ([209.85.215.46]) (using TLSv1) by na3sys009aob114.postini.com ([74.125.148.12]) with SMTP ID DSNKUEcMsCAocmZZZ/Pm1nFlIxNcgGZdw6A5@postini.com; Wed, 05 Sep 2012 01:26:24 PDT Received: by lagy9 with SMTP id y9so139341lag.19 for ; Wed, 05 Sep 2012 01:26:22 -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=Y8V7tvxFAYmGlpwDnPaCz2N+QXOJN2WOl1SVYgSW4MM=; b=lwqoKLqDFP9BqJmXKIOLbjbyp2HlbL25Gv5fqJOYaL1RaiCGeNf/ODrbLHCITP5fbj LGTIOBO8QZ4sWtST/eAd7drEJZS6A58QuV2iwUZFrOGRq/OVEDkY/XJBN/zO8KSSrdmG UHhC0vhF3K2HSW+cqZgupRslSpjZNIeJ1V027SDOJ3AfBzO0nvCkYh1QxyM+P6jzI31T TwjdVti1RJI6S2hNbLbN9PJytQm8ls6Q5E96hiqN7IVj3Z1Qwjl171O2eBclAioOJOOX YDhnc8TKWTES2M5pWxjGlqbIbn8LmuPj586k+exLfLKSnuoFPvRHi4XnGX01EXWWbtlQ vnFQ== Received: by 10.152.123.206 with SMTP id mc14mr19498625lab.33.1346833582677; Wed, 05 Sep 2012 01:26:22 -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.20 (version=SSLv3 cipher=OTHER); Wed, 05 Sep 2012 01:26:20 -0700 (PDT) From: Tomi Valkeinen To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, archit@ti.com Cc: Tomi Valkeinen , Russell King - ARM Linux Subject: [PATCH 06/17] OMAPDSS: VRAM: Remove clearing with sDMA Date: Wed, 5 Sep 2012 11:25:44 +0300 Message-Id: <1346833555-31258-7-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: ALoCoQkSMXjEf6XxPKSjTAHRt4/WhFwX6LIIwTelcMGkQxNVvp5P9kwv3vFX+dsp5YSqvXsrj1wv Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Currently vram.c clears the allocated memory automatically using OMAP system DMA. In an effort to reduce OMAP dependencies, we'll do the memory clear with CPU from now on. The previous patch implemented memory clear in the omapfb driver, and this patch removes the now obsolete clear functionality from vram.c. Signed-off-by: Tomi Valkeinen Cc: Russell King - ARM Linux --- drivers/video/omap2/vram.c | 56 -------------------------------------------- 1 file changed, 56 deletions(-) diff --git a/drivers/video/omap2/vram.c b/drivers/video/omap2/vram.c index 87e421e..f2b15c4 100644 --- a/drivers/video/omap2/vram.c +++ b/drivers/video/omap2/vram.c @@ -34,7 +34,6 @@ #include #include -#include #ifdef DEBUG #define DBG(format, ...) pr_debug("VRAM: " format, ## __VA_ARGS__) @@ -250,59 +249,6 @@ int omap_vram_reserve(unsigned long paddr, size_t size) } EXPORT_SYMBOL(omap_vram_reserve); -static void _omap_vram_dma_cb(int lch, u16 ch_status, void *data) -{ - struct completion *compl = data; - complete(compl); -} - -static int _omap_vram_clear(u32 paddr, unsigned pages) -{ - struct completion compl; - unsigned elem_count; - unsigned frame_count; - int r; - int lch; - - init_completion(&compl); - - r = omap_request_dma(OMAP_DMA_NO_DEVICE, "VRAM DMA", - _omap_vram_dma_cb, - &compl, &lch); - if (r) { - pr_err("VRAM: request_dma failed for memory clear\n"); - return -EBUSY; - } - - elem_count = pages * PAGE_SIZE / 4; - frame_count = 1; - - omap_set_dma_transfer_params(lch, OMAP_DMA_DATA_TYPE_S32, - elem_count, frame_count, - OMAP_DMA_SYNC_ELEMENT, - 0, 0); - - omap_set_dma_dest_params(lch, 0, OMAP_DMA_AMODE_POST_INC, - paddr, 0, 0); - - omap_set_dma_color_mode(lch, OMAP_DMA_CONSTANT_FILL, 0x000000); - - omap_start_dma(lch); - - if (wait_for_completion_timeout(&compl, msecs_to_jiffies(1000)) == 0) { - omap_stop_dma(lch); - pr_err("VRAM: dma timeout while clearing memory\n"); - r = -EIO; - goto err; - } - - r = 0; -err: - omap_free_dma(lch); - - return r; -} - static int _omap_vram_alloc(unsigned pages, unsigned long *paddr) { struct vram_region *rm; @@ -337,8 +283,6 @@ found: *paddr = start; - _omap_vram_clear(start, pages); - return 0; }