From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751940AbbBME4b (ORCPT ); Thu, 12 Feb 2015 23:56:31 -0500 Received: from mail-bn1bon0139.outbound.protection.outlook.com ([157.56.111.139]:23960 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751600AbbBME43 (ORCPT ); Thu, 12 Feb 2015 23:56:29 -0500 Date: Fri, 13 Feb 2015 13:01:14 +0800 From: Liu Ying To: Daniel Vetter CC: , , , , , , , , , , Subject: Re: [PATCH RFC v9 09/20] drm/dsi: Add a helper to get bits per pixel of MIPI DSI pixel format Message-ID: <20150213050112.GA18793@victor> References: <1423720903-24806-1-git-send-email-Ying.Liu@freescale.com> <1423720903-24806-10-git-send-email-Ying.Liu@freescale.com> <20150212092642.GY24485@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20150212092642.GY24485@phenom.ffwll.local> User-Agent: Mutt/1.5.23 (2014-03-12) X-EOPAttributedMessage: 0 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=Ying.Liu@freescale.com; lists.infradead.org; dkim=none (message not signed) header.d=none; X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(339900001)(24454002)(51704005)(52604005)(23726002)(15975445007)(62966003)(77156002)(33656002)(110136001)(106466001)(105606002)(104016003)(46406003)(1720100001)(77096005)(2950100001)(19580405001)(87936001)(50986999)(54356999)(76176999)(19580395003)(6806004)(33716001)(57986006)(46102003)(92566002)(575784001)(83506001)(50466002)(97756001)(47776003)(85426001)(86362001)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:BN1PR0301MB0626;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:sfv;LANG:en; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BN1PR0301MB0626; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004);SRVR:BN1PR0301MB0626; X-Forefront-PRVS: 0486A0CB86 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BN1PR0301MB0626; X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Feb 2015 04:56:25.3323 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.168.50] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0301MB0626 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 12, 2015 at 10:26:42AM +0100, Daniel Vetter wrote: > On Thu, Feb 12, 2015 at 02:01:32PM +0800, Liu Ying wrote: > > Signed-off-by: Liu Ying > > --- > > v8->v9: > > * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. > > > > v7->v8: > > * None. > > > > v6->v7: > > * None. > > > > v5->v6: > > * Address the over 80 characters in one line warning reported by the > > checkpatch.pl script. > > > > v4->v5: > > * None. > > > > v3->v4: > > * None. > > > > v2->v3: > > * None. > > > > v1->v2: > > * Thierry Reding suggested that the mipi_dsi_pixel_format_to_bpp() function > > could be placed at the common DRM MIPI DSI driver. > > This patch is newly added. > > > > include/drm/drm_mipi_dsi.h | 14 ++++++++++++++ > > 1 file changed, 14 insertions(+) > > > > diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h > > index f1d8d0d..3662021 100644 > > --- a/include/drm/drm_mipi_dsi.h > > +++ b/include/drm/drm_mipi_dsi.h > > @@ -163,6 +163,20 @@ static inline struct mipi_dsi_device *to_mipi_dsi_device(struct device *dev) > > return container_of(dev, struct mipi_dsi_device, dev); > > } > > > > +static inline int mipi_dsi_pixel_format_to_bpp(enum mipi_dsi_pixel_format fmt) > > Kerneldoc seems to be missing for this one. I'll add it. Thanks for pointing out this. Regards, Liu Ying > -Daniel > > > +{ > > + switch (fmt) { > > + case MIPI_DSI_FMT_RGB888: > > + case MIPI_DSI_FMT_RGB666: > > + return 24; > > + case MIPI_DSI_FMT_RGB666_PACKED: > > + return 18; > > + case MIPI_DSI_FMT_RGB565: > > + return 16; > > + } > > + return -EINVAL; > > +} > > + > > struct mipi_dsi_device *of_find_mipi_dsi_device_by_node(struct device_node *np); > > int mipi_dsi_attach(struct mipi_dsi_device *dsi); > > int mipi_dsi_detach(struct mipi_dsi_device *dsi); > > -- > > 2.1.0 > > > > _______________________________________________ > > dri-devel mailing list > > dri-devel@lists.freedesktop.org > > http://lists.freedesktop.org/mailman/listinfo/dri-devel > > -- > Daniel Vetter > Software Engineer, Intel Corporation > +41 (0) 79 365 57 48 - http://blog.ffwll.ch