From patchwork Thu Jul 31 17:42:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Kumar X-Patchwork-Id: 4658381 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E92699F36A for ; Thu, 31 Jul 2014 17:45:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3BB8920138 for ; Thu, 31 Jul 2014 17:45:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A5D0020158 for ; Thu, 31 Jul 2014 17:45:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752386AbaGaRpe (ORCPT ); Thu, 31 Jul 2014 13:45:34 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:43485 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752134AbaGaRpc (ORCPT ); Thu, 31 Jul 2014 13:45:32 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N9L006C27ZUJZ00@mailout2.samsung.com>; Fri, 01 Aug 2014 02:45:30 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.123]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id C3.C7.25328.AB08AD35; Fri, 01 Aug 2014 02:45:30 +0900 (KST) X-AuditID: cbfee68d-b7f2f6d0000062f0-e9-53da80babc66 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id BE.2E.05196.AB08AD35; Fri, 01 Aug 2014 02:45:30 +0900 (KST) Received: from chromebld-server.sisodomain.com ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N9L00GWZ7ZJ9070@mmp1.samsung.com>; Fri, 01 Aug 2014 02:45:30 +0900 (KST) From: Ajay Kumar To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, thierry.reding@gmail.com Cc: inki.dae@samsung.com, seanpaul@google.com, ajaynumb@gmail.com, jg1.han@samsung.com, joshi@samsung.com, prashanth.g@samsung.com, Ajay Kumar Subject: [PATCH 02/15] drm/panel: Add get_modes helper Date: Thu, 31 Jul 2014 23:12:01 +0530 Message-id: <1406828534-10072-3-git-send-email-ajaykumar.rs@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1406828534-10072-1-git-send-email-ajaykumar.rs@samsung.com> References: <1406828534-10072-1-git-send-email-ajaykumar.rs@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupgkeLIzCtJLcpLzFFi42JZI2JSrbur4VawwYovphYH3h9ksdjwZiGz xfwj51gtrnx9z2Yx6f4EFovLCy+xWnzf9YXdYsb5fUwWqw5vYLeYezDX4ueueSwO3B47Z91l 91iwqdTjfvdxJo++LasYPT5vkgtgjeKySUnNySxLLdK3S+DKuLjoHlPBXLaKpz+nsDUwTmft YuTkkBAwkXh15jQ7hC0mceHeerYuRi4OIYGljBKbulazwRT1Lj3LBJFYxChx59NMFghnApPE 8tMdzCBVbALaEtum32QBsUUE6iT2L7/PCFLELLCWUeLpvMlgCWEBM4mWLwvBxrIIqEpMu7ST CcTmFfCQmH3vE9BNHEDrFCTmTLIBCXMKeEpM7b3MDhIWAip5djwNZKSEwDZ2idfnQOaDjBGQ +Db5EAtEq6zEpgPMEEdLShxccYNlAqPwAkaGVYyiqQXJBcVJ6UWGesWJucWleel6yfm5mxiB sX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eVyf/UP82cXi2YtZVuwtF1RRHO+XOf95mUfP6kV PTxjcnLuBKNNvjZhC4PfHJrkNsG66fwKhh2Gl6q/M2drC1k75sVdmcio4WEdVPJ6K4eBnuq7 e0osxRmJhlrMRcWJAGkqxIHKAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Add a helper function drm_panel_get_modes to get modes from the panel. Signed-off-by: Ajay Kumar --- include/drm/drm_panel.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index 9addc69..efc63cc 100644 --- a/include/drm/drm_panel.h +++ b/include/drm/drm_panel.h @@ -80,6 +80,14 @@ static inline int drm_panel_enable(struct drm_panel *panel) return panel ? -ENOSYS : -EINVAL; } +static inline int drm_panel_get_modes(struct drm_panel *panel) +{ + if (panel && panel->funcs && panel->funcs->get_modes) + return panel->funcs->get_modes(panel); + + return 0; +} + void drm_panel_init(struct drm_panel *panel); int drm_panel_add(struct drm_panel *panel);