From: Daniel Vetter Subject: Re: [PATCH 1/2] drm: expose subpixel order name routine v2 Date: Mon, 10 Feb 2014 10:16:08 +0100 Message-ID: <20140210091608.GO17001@phenom.ffwll.local> References: <1391806095-2635-1-git-send-email-jbarnes@virtuousgeek.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f178.google.com (mail-ea0-f178.google.com [209.85.215.178]) by gabe.freedesktop.org (Postfix) with ESMTP id 90B1BFA403 for ; Mon, 10 Feb 2014 01:16:13 -0800 (PST) Received: by mail-ea0-f178.google.com with SMTP id a15so2815042eae.23 for ; Mon, 10 Feb 2014 01:16:12 -0800 (PST) Content-Disposition: inline In-Reply-To: <1391806095-2635-1-git-send-email-jbarnes@virtuousgeek.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Jesse Barnes Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, Feb 07, 2014 at 12:48:14PM -0800, Jesse Barnes wrote: > Just like we have for connector type etc. > > v2: drop static array (Chris) > > Signed-off-by: Jesse Barnes Cc: dri-devel is missing. Also a tiny kerneldoc would be nice (I have patches somewhere to kerneldocify all the other functions in this file). -Daniel > --- > drivers/gpu/drm/drm_crtc.c | 16 ++++++++++++++++ > include/drm/drm_crtc.h | 1 + > 2 files changed, 17 insertions(+) > > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c > index 3b7d32d..8136f09 100644 > --- a/drivers/gpu/drm/drm_crtc.c > +++ b/drivers/gpu/drm/drm_crtc.c > @@ -215,6 +215,16 @@ static const struct drm_prop_enum_list drm_encoder_enum_list[] = > { DRM_MODE_ENCODER_DSI, "DSI" }, > }; > > +static const struct drm_prop_enum_list drm_subpixel_enum_list[] = > +{ > + { SubPixelUnknown, "Unknown" }, > + { SubPixelHorizontalRGB, "Horizontal RGB" }, > + { SubPixelHorizontalBGR, "Horizontal BGR" }, > + { SubPixelVerticalRGB, "Vertical RGB" }, > + { SubPixelVerticalBGR, "Vertical BGR" }, > + { SubPixelNone, "None" }, > +}; > + > void drm_connector_ida_init(void) > { > int i; > @@ -264,6 +274,12 @@ const char *drm_get_connector_status_name(enum drm_connector_status status) > } > EXPORT_SYMBOL(drm_get_connector_status_name); > > +const char *drm_get_subpixel_order_name(enum subpixel_order order) > +{ > + return drm_subpixel_enum_list[order].name; > +} > +EXPORT_SYMBOL(drm_get_subpixel_order_name); > + > static char printable_char(int c) > { > return isascii(c) && isprint(c) ? c : '?'; > diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h > index 71727b6..ce9ee60 100644 > --- a/include/drm/drm_crtc.h > +++ b/include/drm/drm_crtc.h > @@ -991,6 +991,7 @@ extern void drm_encoder_cleanup(struct drm_encoder *encoder); > > extern const char *drm_get_connector_name(const struct drm_connector *connector); > extern const char *drm_get_connector_status_name(enum drm_connector_status status); > +extern const char *drm_get_subpixel_order_name(enum subpixel_order order); > extern const char *drm_get_dpms_name(int val); > extern const char *drm_get_dvi_i_subconnector_name(int val); > extern const char *drm_get_dvi_i_select_name(int val); > -- > 1.7.9.5 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch