From patchwork Mon Mar 12 10:17:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 7228 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 E633123E14 for ; Mon, 12 Mar 2012 10:08:24 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 8EEA5A183E6 for ; Mon, 12 Mar 2012 10:08:24 +0000 (UTC) Received: by iage36 with SMTP id e36so8580000iag.11 for ; Mon, 12 Mar 2012 03:08:24 -0700 (PDT) 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:cc :subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:x-gm-message-state; bh=cGlD5WkZYrXt+no2FXIXlI5fONjVqsRPRlRP0geCIHg=; b=B+pVg6b3Z5DM8NWZsamDS/+dbTSKt6FpA8F3BrcFA8Fcq47lEyvxDhzjVF6Wfg9LgM 1lQ3ufM8ZMIQ5wNP+p+62F4cd45R9QYmu7pU7L+exwBewwCeyFV+ZPvemrgFdVjHyMZo mWht/xQVOVGFI3sr2l37MtP+tpukJIDTfkqDVGc1wSTfdr9vKrw9/Bh9Vt9aBAZT7JuD hGouOaRj3k2HOlLOphevvw0BJ+2BJf2LIN6AkxWd2i01V3qG0Ziw/42VZs/gNG18fRRR aREzhlA1PhCXKnhm6QG/i8yEudLXd7yrsP22QUlVM5mPyZm48kpcRYFROvv6d7sZ7X9g 9Ohw== Received: by 10.42.147.199 with SMTP id o7mr14782741icv.50.1331546903970; Mon, 12 Mar 2012 03:08:23 -0700 (PDT) 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.231.53.18 with SMTP id k18csp36654ibg; Mon, 12 Mar 2012 03:08:23 -0700 (PDT) Received: by 10.213.15.13 with SMTP id i13mr938904eba.72.1331546902807; Mon, 12 Mar 2012 03:08:22 -0700 (PDT) Received: from eu1sys200aog120.obsmtp.com (eu1sys200aog120.obsmtp.com. [207.126.144.149]) by mx.google.com with SMTP id e2si5869750eea.80.2012.03.12.03.08.20 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Mar 2012 03:08:22 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.149 is neither permitted nor denied by best guess record for domain of benjamin.gaignard@stericsson.com) client-ip=207.126.144.149; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.149 is neither permitted nor denied by best guess record for domain of benjamin.gaignard@stericsson.com) smtp.mail=benjamin.gaignard@stericsson.com Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob120.postini.com ([207.126.147.11]) with SMTP ID DSNKT13LEltDaSYShVdiCM+00ii6CmWS0HHn@postini.com; Mon, 12 Mar 2012 10:08:22 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 21FA0157; Mon, 12 Mar 2012 09:59:48 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id A308BAC9; Mon, 12 Mar 2012 10:06:52 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id CE0EE24C2F6; Mon, 12 Mar 2012 11:06:46 +0100 (CET) Received: from localhost.localdomain (10.230.100.153) by smtp.stericsson.com (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.3.83.0; Mon, 12 Mar 2012 11:06:51 +0100 From: To: Cc: , , Benjamin Gaignard Subject: [PATCH 1/3] make struct ion_device available for other heap Date: Mon, 12 Mar 2012 11:17:09 +0100 Message-ID: <1331547431-3737-2-git-send-email-benjamin.gaignard@stericsson.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1331547431-3737-1-git-send-email-benjamin.gaignard@stericsson.com> References: <1331547431-3737-1-git-send-email-benjamin.gaignard@stericsson.com> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQnI3ciWTihoXlTrY+5JVpKf8vyuNo6ws3nkAiX5aSXWkBxyffZGScX/OlWNX9CK5I2E5hD+ From: Benjamin Gaignard CMA heap needs to know misc device to be able to do the link between ION heap and CMA area reserved in board configuration file. Signed-off-by: Benjamin Gaignard --- drivers/gpu/ion/ion.c | 20 -------------------- drivers/gpu/ion/ion_priv.h | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/ion/ion.c b/drivers/gpu/ion/ion.c index 37b23af..dbfdd7e 100644 --- a/drivers/gpu/ion/ion.c +++ b/drivers/gpu/ion/ion.c @@ -34,26 +34,6 @@ #define DEBUG /** - * struct ion_device - the metadata of the ion device node - * @dev: the actual misc device - * @buffers: an rb tree of all the existing buffers - * @lock: lock protecting the buffers & heaps trees - * @heaps: list of all the heaps in the system - * @user_clients: list of all the clients created from userspace - */ -struct ion_device { - struct miscdevice dev; - struct rb_root buffers; - struct mutex lock; - struct rb_root heaps; - long (*custom_ioctl) (struct ion_client *client, unsigned int cmd, - unsigned long arg); - struct rb_root user_clients; - struct rb_root kernel_clients; - struct dentry *debug_root; -}; - -/** * struct ion_client - a process/hw block local address space * @ref: for reference counting the client * @node: node in the tree of all clients diff --git a/drivers/gpu/ion/ion_priv.h b/drivers/gpu/ion/ion_priv.h index 3323954..82e44ea 100644 --- a/drivers/gpu/ion/ion_priv.h +++ b/drivers/gpu/ion/ion_priv.h @@ -22,6 +22,8 @@ #include #include #include +#include +#include struct ion_mapping; @@ -38,6 +40,26 @@ struct ion_kernel_mapping { struct ion_buffer *ion_handle_buffer(struct ion_handle *handle); /** + * struct ion_device - the metadata of the ion device node + * @dev: the actual misc device + * @buffers: an rb tree of all the existing buffers + * @lock: lock protecting the buffers & heaps trees + * @heaps: list of all the heaps in the system + * @user_clients: list of all the clients created from userspace + */ +struct ion_device { + struct miscdevice dev; + struct rb_root buffers; + struct mutex lock; + struct rb_root heaps; + long (*custom_ioctl) (struct ion_client *client, unsigned int cmd, + unsigned long arg); + struct rb_root user_clients; + struct rb_root kernel_clients; + struct dentry *debug_root; +}; + +/** * struct ion_buffer - metadata for a particular buffer * @ref: refernce count * @node: node in the ion_device buffers tree