From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steffen Trumtrar Subject: =?UTF-8?q?=5BPATCH=20v17=202/7=5D=20video=3A=20add=20display=5Ftiming=20and=20videomode?= Date: Fri, 25 Jan 2013 10:01:50 +0100 Message-ID: <1359104515-8907-3-git-send-email-s.trumtrar@pengutronix.de> References: <1359104515-8907-1-git-send-email-s.trumtrar@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1359104515-8907-1-git-send-email-s.trumtrar@pengutronix.de> Sender: linux-media-owner@vger.kernel.org To: devicetree-discuss@lists.ozlabs.org, Dave Airlie Cc: Steffen Trumtrar , Rob Herring , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Laurent Pinchart , Thierry Reding , Guennady Liakhovetski , linux-media@vger.kernel.org, Tomi Valkeinen , Stephen Warren , Florian Tobias Schandinat , Rob Clark , Leela Krishna Amudala , "Mohammed, Afzal" , kernel@pengutronix.de List-Id: devicetree@vger.kernel.org Add display_timing structure and the according helper functions. This a= llows the description of a display via its supported timing parameters. Also, add helper functions to convert from display timings to a generic= videomode structure. The struct display_timing specifies all needed parameters to describe t= he signal properties of a display in one mode. This includes - ranges for signals that may have min-, max- and typical values - single integers for signals that can be on, off or are ignored - booleans for signals that are either on or off As a display may support multiple modes like this, a struct display_tim= ings is added, that holds all given struct display_timing pointers and declares= the native mode of the display. Although a display may state that a signal can be in a range, it is dri= ven with fixed values that indicate a videomode. Therefore graphic drivers don't= need all the information of struct display_timing, but would generate a videomod= e from the given set of supported signal timings and work with that. The video subsystems all define their own structs that describe a mode = and work with that (e.g. fb_videomode or drm_display_mode). To slowly replace al= l those various structures and allow code reuse across those subsystems, add st= ruct videomode as a generic description. This patch only includes the most basic fields in struct videomode. All= missing fields that are needed to have a really generic video mode description = can be added at a later stage. Signed-off-by: Steffen Trumtrar Reviewed-by: Thierry Reding Acked-by: Thierry Reding Tested-by: Thierry Reding Tested-by: Philipp Zabel Reviewed-by: Laurent Pinchart Acked-by: Laurent Pinchart Tested-by: Afzal Mohammed Tested-by: Rob Clark Tested-by: Leela Krishna Amudala --- drivers/video/Kconfig | 6 ++ drivers/video/Makefile | 2 + drivers/video/display_timing.c | 24 ++++++++ drivers/video/videomode.c | 39 +++++++++++++ include/video/display_timing.h | 124 ++++++++++++++++++++++++++++++++= ++++++++ include/video/videomode.h | 48 ++++++++++++++++ 6 files changed, 243 insertions(+) create mode 100644 drivers/video/display_timing.c create mode 100644 drivers/video/videomode.c create mode 100644 include/video/display_timing.h create mode 100644 include/video/videomode.h diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index e7068c5..09a8f0d 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -33,6 +33,12 @@ config VIDEO_OUTPUT_CONTROL This framework adds support for low-level control of the video=20 output switch. =20 +config DISPLAY_TIMING + bool + +config VIDEOMODE + bool + menuconfig FB tristate "Support for frame buffer devices" ---help--- diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 768a137..e0dd820 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -168,3 +168,5 @@ obj-$(CONFIG_FB_VIRTUAL) +=3D vfb.o =20 #video output switch sysfs driver obj-$(CONFIG_VIDEO_OUTPUT_CONTROL) +=3D output.o +obj-$(CONFIG_DISPLAY_TIMING) +=3D display_timing.o +obj-$(CONFIG_VIDEOMODE) +=3D videomode.o diff --git a/drivers/video/display_timing.c b/drivers/video/display_tim= ing.c new file mode 100644 index 0000000..5e1822c --- /dev/null +++ b/drivers/video/display_timing.c @@ -0,0 +1,24 @@ +/* + * generic display timing functions + * + * Copyright (c) 2012 Steffen Trumtrar , Pe= ngutronix + * + * This file is released under the GPLv2 + */ + +#include +#include +#include