Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755361AbbBLJZu (ORCPT ); Thu, 12 Feb 2015 04:25:50 -0500 Received: from mail-we0-f176.google.com ([74.125.82.176]:41811 "EHLO mail-we0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755232AbbBLJZq (ORCPT ); Thu, 12 Feb 2015 04:25:46 -0500 Date: Thu, 12 Feb 2015 10:26:42 +0100 From: Daniel Vetter To: Liu Ying Cc: dri-devel@lists.freedesktop.org, stefan.wahren@i2se.com, devicetree@vger.kernel.org, linux@arm.linux.org.uk, kernel@pengutronix.de, sboyd@codeaurora.org, linux-kernel@vger.kernel.org, a.hajda@samsung.com, andy.yan@rock-chips.com, mturquette@linaro.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH RFC v9 09/20] drm/dsi: Add a helper to get bits per pixel of MIPI DSI pixel format Message-ID: <20150212092642.GY24485@phenom.ffwll.local> Mail-Followup-To: Liu Ying , dri-devel@lists.freedesktop.org, stefan.wahren@i2se.com, devicetree@vger.kernel.org, linux@arm.linux.org.uk, kernel@pengutronix.de, sboyd@codeaurora.org, linux-kernel@vger.kernel.org, a.hajda@samsung.com, andy.yan@rock-chips.com, mturquette@linaro.org, linux-arm-kernel@lists.infradead.org References: <1423720903-24806-1-git-send-email-Ying.Liu@freescale.com> <1423720903-24806-10-git-send-email-Ying.Liu@freescale.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1423720903-24806-10-git-send-email-Ying.Liu@freescale.com> X-Operating-System: Linux phenom 3.16-2-amd64 User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2140 Lines: 79 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. -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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/