From patchwork Thu Dec 6 12:50:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 13392 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id C23DF23E0B for ; Thu, 6 Dec 2012 12:51:34 +0000 (UTC) Received: from mail-ie0-f170.google.com (mail-ie0-f170.google.com [209.85.223.170]) by fiordland.canonical.com (Postfix) with ESMTP id 71D19A198CE for ; Thu, 6 Dec 2012 12:51:34 +0000 (UTC) Received: by mail-ie0-f170.google.com with SMTP id k10so11170821iea.29 for ; Thu, 06 Dec 2012 04:51:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to :date:message-id:x-mailer:in-reply-to:references:subject:x-beenthere :x-mailman-version:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-gm-message-state; bh=WZh/QTqWWokp/L0m/WG6WAEYRNYRP/M9rnziFSvQYYA=; b=BBVDqtVJzXigu8sekImzBeWpj8Ir6mDrGaSZ77gt3hwhmKb+0d7isVGFoTqDqRF3/c So1ihgjHjJ4b8uAzuaLvHcEW0kaJEb7l36UyWAKn51M5O9Scn4FqgAEY0TgbV7qtbBh9 GCIvvakHwwR8QSRUDvIhm/NtkI69IGmkQD9JtJGJgGyxZAN2rWZSIhb6iZ6ylDXT71Lq bmxvt/zFif3o60OgEL/k/0U2rhI4e4ea/D3MxokT5jGbXGrWXv23703u8+rH1V9AJIqn c2t8bXs+myJB8erP9MYh2GkK+/pzhmluXU1lTGS1WN5HGtpYTE3x5yeJr3UgA4jwc99U l98A== Received: by 10.50.187.197 with SMTP id fu5mr1176285igc.70.1354798293870; Thu, 06 Dec 2012 04:51:33 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp407258igt; Thu, 6 Dec 2012 04:51:33 -0800 (PST) Received: by 10.14.219.72 with SMTP id l48mr5371357eep.37.1354798290789; Thu, 06 Dec 2012 04:51:30 -0800 (PST) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id l8si832051eem.5.2012.12.06.04.51.29; Thu, 06 Dec 2012 04:51:30 -0800 (PST) Received-SPF: neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) client-ip=91.189.95.16; Authentication-Results: mx.google.com; spf=neutral (google.com: 91.189.95.16 is neither permitted nor denied by best guess record for domain of linaro-mm-sig-bounces@lists.linaro.org) smtp.mail=linaro-mm-sig-bounces@lists.linaro.org Received: from localhost ([127.0.0.1] helo=mombin.canonical.com) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TgavJ-0004dp-2S; Thu, 06 Dec 2012 12:51:29 +0000 Received: from mail-we0-f170.google.com ([74.125.82.170]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TgavH-0004cr-0f for linaro-mm-sig@lists.linaro.org; Thu, 06 Dec 2012 12:51:27 +0000 Received: by mail-we0-f170.google.com with SMTP id r1so4932928wey.1 for ; Thu, 06 Dec 2012 04:51:27 -0800 (PST) Received: by 10.180.86.36 with SMTP id m4mr8898977wiz.5.1354798286934; Thu, 06 Dec 2012 04:51:26 -0800 (PST) Received: from localhost.localdomain (LPuteaux-156-14-44-212.w82-127.abo.wanadoo.fr. [82.127.83.212]) by mx.google.com with ESMTPS id ec3sm23009893wib.10.2012.12.06.04.51.25 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Dec 2012 04:51:26 -0800 (PST) From: benjamin.gaignard@linaro.org To: linaro-mm-sig@lists.linaro.org, rebecca@android.com Date: Thu, 6 Dec 2012 13:50:47 +0100 Message-Id: <50c094ce.c361b40a.59fe.420f@mx.google.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1354798248-11308-1-git-send-email-y> References: <1354798248-11308-1-git-send-email-y> Subject: [Linaro-mm-sig] [PATCH v7 2/3] gpu: ion: add private field in ion_heap and ion_platform_heap structure X-BeenThere: linaro-mm-sig@lists.linaro.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Unified memory management interest group." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linaro-mm-sig-bounces@lists.linaro.org Errors-To: linaro-mm-sig-bounces@lists.linaro.org X-Gm-Message-State: ALoCoQkSlhbg4FfvbA2r40NqcpuebODdTEJ5b4DAC0XE8wVFk78fWK2wi/GDYz3MhVMqsDFG6Thy From: Benjamin Gaignard copy private field from platform configuration to internal heap structure. Signed-off-by: Benjamin Gaignard --- drivers/gpu/ion/ion_heap.c | 1 + drivers/gpu/ion/ion_priv.h | 2 ++ include/linux/ion.h | 2 ++ 3 files changed, 5 insertions(+) diff --git a/drivers/gpu/ion/ion_heap.c b/drivers/gpu/ion/ion_heap.c index 8ce3c19..f9ab1df 100644 --- a/drivers/gpu/ion/ion_heap.c +++ b/drivers/gpu/ion/ion_heap.c @@ -47,6 +47,7 @@ struct ion_heap *ion_heap_create(struct ion_platform_heap *heap_data) heap->name = heap_data->name; heap->id = heap_data->id; + heap->priv = heap_data->priv; return heap; } diff --git a/drivers/gpu/ion/ion_priv.h b/drivers/gpu/ion/ion_priv.h index 21c1963..a31203b 100644 --- a/drivers/gpu/ion/ion_priv.h +++ b/drivers/gpu/ion/ion_priv.h @@ -117,6 +117,7 @@ struct ion_heap_ops { * allocating. These are specified by platform data and * MUST be unique * @name: used for debugging + * @priv: heap private data * @debug_show: called when heap debug file is read to add any * heap specific debug info to output * @@ -132,6 +133,7 @@ struct ion_heap { struct ion_heap_ops *ops; int id; const char *name; + void *priv; int (*debug_show)(struct ion_heap *heap, struct seq_file *, void *); }; diff --git a/include/linux/ion.h b/include/linux/ion.h index 6541a11..b85f4b1 100644 --- a/include/linux/ion.h +++ b/include/linux/ion.h @@ -77,6 +77,7 @@ struct ion_buffer; * @name: used for debug purposes * @base: base address of heap in physical memory if applicable * @size: size of the heap in bytes if applicable + * @priv: heap private data * * Provided by the board file. */ @@ -86,6 +87,7 @@ struct ion_platform_heap { const char *name; ion_phys_addr_t base; size_t size; + void *priv; }; /**