From patchwork Thu Mar 6 06:12:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Sharma X-Patchwork-Id: 3785451 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6E7E9BF549 for ; Thu, 6 Mar 2014 17:03:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 786C52024C for ; Thu, 6 Mar 2014 17:03:29 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 9A41A2020F for ; Thu, 6 Mar 2014 17:03:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BC4421057EE; Thu, 6 Mar 2014 09:03:17 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by gabe.freedesktop.org (Postfix) with ESMTP id 92ADEFAB4E for ; Wed, 5 Mar 2014 22:13:06 -0800 (PST) Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N2000CBO3XTFXB0@mailout3.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 06 Mar 2014 15:13:05 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.124]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id A1.80.12635.1F118135; Thu, 06 Mar 2014 15:13:05 +0900 (KST) X-AuditID: cbfee68d-b7fcd6d00000315b-b2-531811f1f877 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 3E.28.29263.1F118135; Thu, 06 Mar 2014 15:13:05 +0900 (KST) Received: from localhost.localdomain ([107.108.83.245]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N2000AL63X9JW40@mmp1.samsung.com>; Thu, 06 Mar 2014 15:13:05 +0900 (KST) From: Rahul Sharma To: dri-devel@lists.freedesktop.org Subject: [RFC 4/4] drm: export create and destroy function for blob properties Date: Thu, 06 Mar 2014 11:42:14 +0530 Message-id: <1394086334-20967-5-git-send-email-rahul.sharma@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1394086334-20967-1-git-send-email-rahul.sharma@samsung.com> References: <1394086334-20967-1-git-send-email-rahul.sharma@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplkeLIzCtJLcpLzFFi42JZI2JSo/tRUCLY4MJrEYsT1xcxWRx4f5DF 4srX92wWk+5PYLH4vusLu8WM8/uYLOYd+s1oserwBnaLjRO2MlpMWXSY1eLuhrOMDtwesxsu snjsnHWX3WPBplKP+93HmTz6tqxi9Pi8SS6ALYrLJiU1J7MstUjfLoEr496aDywFE4Uqzr6+ wtjAOJ+/i5GDQ0LARGLr6bouRk4gU0ziwr31bF2MXBxCAksZJaZeX8kGkQCq2bKeHSKxiFHi /oF7UE47k8TD9Z9YQKrYBHQlZh98xghiiwgoS/yduIoRpIhZoI1JYndvLxNIQljAT2Lq+SvM IKtZBFQlrm3hAwnzCnhInDy0lhHiIgWJOZNsQMKcAp4S3X8mgnUKAZXM7V/PBDJSQuAYu0T7 0k6wXSwCAhLfJh9igeiVldh0gBniaEmJgytusExgFF7AyLCKUTS1ILmgOCm9yFCvODG3uDQv XS85P3cTIzAqTv971ruD8fYB60OMyUDjJjJLiSbnA6MqryTe0NjMyMLUxNTYyNzSjDRhJXHe pIdJQUIC6YklqdmpqQ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1V2VavIm3HyumqZexGz PGdnbiz8/fivc9dWJZbijERDLeai4kQA4crBov4CAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Mailman-Approved-At: Thu, 06 Mar 2014 09:03:01 -0800 Cc: linux-samsung-soc@vger.kernel.org, joshi@samsung.com, r.sh.open@google.com, marcheu@chromium.org, prashanth.g@samsung.com, ajaykumar.rs@samsung.com, Rahul Sharma X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Drm drivers can also create and attach private blob properties. This patch exports functions to create and destroy blob properties. Signed-off-by: Rahul Sharma --- drivers/gpu/drm/drm_crtc.c | 8 +++++--- include/drm/drm_crtc.h | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 8771abf..f1939c2 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -3299,8 +3299,8 @@ done: return ret; } -static struct drm_property_blob *drm_property_create_blob(struct drm_device *dev, int length, - void *data) +struct drm_property_blob *drm_property_create_blob(struct drm_device *dev, + int length, void *data) { struct drm_property_blob *blob; int ret; @@ -3326,14 +3326,16 @@ static struct drm_property_blob *drm_property_create_blob(struct drm_device *dev list_add_tail(&blob->head, &dev->mode_config.property_blob_list); return blob; } +EXPORT_SYMBOL(drm_property_create_blob); -static void drm_property_destroy_blob(struct drm_device *dev, +void drm_property_destroy_blob(struct drm_device *dev, struct drm_property_blob *blob) { drm_mode_object_put(dev, &blob->base); list_del(&blob->head); kfree(blob); } +EXPORT_SYMBOL(drm_property_destroy_blob); int drm_mode_getblob_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index df7b178..8bf7fb2 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -1077,6 +1077,10 @@ struct drm_property *drm_property_create_bitmask(struct drm_device *dev, struct drm_property *drm_property_create_range(struct drm_device *dev, int flags, const char *name, uint64_t min, uint64_t max); +extern struct drm_property_blob *drm_property_create_blob(struct drm_device *dev, + int length, void *data); +extern void drm_property_destroy_blob(struct drm_device *dev, + struct drm_property_blob *blob); extern void drm_property_destroy(struct drm_device *dev, struct drm_property *property); extern int drm_property_add_enum(struct drm_property *property, int index, uint64_t value, const char *name);