From patchwork Fri Dec 7 09:02:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 13409 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 663EE23FCC for ; Fri, 7 Dec 2012 09:03:27 +0000 (UTC) Received: from mail-ie0-f174.google.com (mail-ie0-f174.google.com [209.85.223.174]) by fiordland.canonical.com (Postfix) with ESMTP id 01FDFA199D6 for ; Fri, 7 Dec 2012 09:03:26 +0000 (UTC) Received: by mail-ie0-f174.google.com with SMTP id c11so523849ieb.19 for ; Fri, 07 Dec 2012 01:03:26 -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=1v//em+Jex9H0sez4GUNURPNSHUdPbLHWp/WxsFd6ew=; b=lwUinU1JSZJcjKWh8gnH/jntWYjMt4t+6E+AAv5GYFlILWcg8PIHLXY3HG4XGtnqHF 3ZBqSz2q1FC2xUR0+kG1cgYiyXOqtaXdLivf2VAzlENp9oYlxZx4hEW7rEoWisTBPGwg vnAf8bgnRNbksLHo7qEqddPXQC0e5j1keblkyRygVvUDWp+SI8Jzz+3bzLcNJq0ej1rt FkjCsE+jBkpMQRio/OIWD5WWkVwQkcGIP89WODZjgyX6gm8CvjfK4877uj5NOnIBnBHm sbmdEUWUiW+Z0qRt1HEXCFSW3Uo4HTO+jHR1687N1J+1Qr+yPRHysYpJ/e4752tqY0ey LYsQ== Received: by 10.50.152.137 with SMTP id uy9mr4242046igb.62.1354871006441; Fri, 07 Dec 2012 01:03:26 -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 n20csp462233igt; Fri, 7 Dec 2012 01:03:25 -0800 (PST) Received: by 10.216.88.5 with SMTP id z5mr1726439wee.140.1354871003273; Fri, 07 Dec 2012 01:03:23 -0800 (PST) Received: from mombin.canonical.com (mombin.canonical.com. [91.189.95.16]) by mx.google.com with ESMTP id s8si22972208eeo.55.2012.12.07.01.03.21; Fri, 07 Dec 2012 01:03:23 -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 1Tgtq4-0007dZ-5h; Fri, 07 Dec 2012 09:03:20 +0000 Received: from mail-wg0-f46.google.com ([74.125.82.46]) by mombin.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Tgtq2-0007dA-SR for linaro-mm-sig@lists.linaro.org; Fri, 07 Dec 2012 09:03:18 +0000 Received: by mail-wg0-f46.google.com with SMTP id dr13so115049wgb.13 for ; Fri, 07 Dec 2012 01:03:18 -0800 (PST) Received: by 10.216.70.70 with SMTP id o48mr1891732wed.59.1354870998653; Fri, 07 Dec 2012 01:03:18 -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 cf6sm14696617wib.3.2012.12.07.01.03.17 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 07 Dec 2012 01:03:17 -0800 (PST) From: Benjamin Gaignard To: linaro-mm-sig@lists.linaro.org, rebecca@android.com Date: Fri, 7 Dec 2012 10:02:43 +0100 Message-Id: <1354870964-13087-3-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1354870964-13087-1-git-send-email-benjamin.gaignard@linaro.org> References: <1354870964-13087-1-git-send-email-benjamin.gaignard@linaro.org> Subject: [Linaro-mm-sig] [PATCH v8 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: ALoCoQm+X/4EWCkSWm49IaMCitvv1jQrYfKfkHSEJRUQAAZ4m3nwkolEbgjOA1WKO5vUBjQD4a9M 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; }; /**