aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-10-14 03:39:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-14 03:39:08 -0400
commit2d65a9f48fcdf7866aab6457bc707ca233e0c791 (patch)
treef93e5838d6ac2e59434367f4ff905f7d9c45fc2b /drivers/video
parentda92da3638a04894afdca8b99e973ddd20268471 (diff)
parentdfda0df3426483cf5fc7441f23f318edbabecb03 (diff)
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm updates from Dave Airlie: "This is the main git pull for the drm, I pretty much froze major pulls at -rc5/6 time, and haven't had much fallout, so will probably continue doing that. Lots of changes all over, big internal header cleanup to make it clear drm features are legacy things and what are things that modern KMS drivers should be using. Also big move to use the new generic fences in all the TTM drivers. core: atomic prep work, vblank rework changes, allows immediate vblank disables major header reworking and cleanups to better delinate legacy interfaces from what KMS drivers should be using. cursor planes locking fixes ttm: move to generic fences (affects all TTM drivers) ppc64 caching fixes radeon: userptr support, uvd for old asics, reset rework for fence changes better buffer placement changes, dpm feature enablement hdmi audio support fixes intel: Cherryview work, 180 degree rotation, skylake prep work, execlist command submission full ppgtt prep work cursor improvements edid caching, vdd handling improvements nouveau: fence reworking kepler memory clock work gt21x clock work fan control improvements hdmi infoframe fixes DP audio ast: ppc64 fixes caching fix rcar: rcar-du DT support ipuv3: prep work for capture support msm: LVDS support for mdp4, new panel, gpu refactoring exynos: exynos3250 SoC support, drop bad mmap interface, mipi dsi changes, and component match support" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (640 commits) drm/mst: rework payload table allocation to conform better. drm/ast: Fix HW cursor image drm/radeon/kv: add uvd/vce info to dpm debugfs output drm/radeon/ci: add uvd/vce info to dpm debugfs output drm/radeon: export reservation_object from dmabuf to ttm drm/radeon: cope with foreign fences inside the reservation object drm/radeon: cope with foreign fences inside display drm/core: use helper to check driver features drm/radeon/cik: write gfx ucode version to ucode addr reg drm/radeon/si: print full CS when we hit a packet 0 drm/radeon: remove unecessary includes drm/radeon/combios: declare legacy_connector_convert as static drm/radeon/atombios: declare connector convert tables as static drm/radeon: drop btc_get_max_clock_from_voltage_dependency_table drm/radeon/dpm: drop clk/voltage dependency filters for BTC drm/radeon/dpm: drop clk/voltage dependency filters for CI drm/radeon/dpm: drop clk/voltage dependency filters for SI drm/radeon/dpm: drop clk/voltage dependency filters for NI drm/radeon: disable audio when we disable hdmi (v2) drm/radeon: split audio enable between eg and r600 (v2) ...
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/Kconfig4
-rw-r--r--drivers/video/fbdev/core/Makefile1
-rw-r--r--drivers/video/fbdev/core/fb_cmdline.c110
-rw-r--r--drivers/video/fbdev/core/fbmem.c92
-rw-r--r--drivers/video/fbdev/core/modedb.c3
5 files changed, 115 insertions, 95 deletions
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index e911b9c96e19..ccbe2ae22ac5 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -4,6 +4,7 @@
4 4
5menuconfig FB 5menuconfig FB
6 tristate "Support for frame buffer devices" 6 tristate "Support for frame buffer devices"
7 select FB_CMDLINE
7 ---help--- 8 ---help---
8 The frame buffer device provides an abstraction for the graphics 9 The frame buffer device provides an abstraction for the graphics
9 hardware. It represents the frame buffer of some video hardware and 10 hardware. It represents the frame buffer of some video hardware and
@@ -52,6 +53,9 @@ config FIRMWARE_EDID
52 combination with certain motherboards and monitors are known to 53 combination with certain motherboards and monitors are known to
53 suffer from this problem. 54 suffer from this problem.
54 55
56config FB_CMDLINE
57 bool
58
55config FB_DDC 59config FB_DDC
56 tristate 60 tristate
57 depends on FB 61 depends on FB
diff --git a/drivers/video/fbdev/core/Makefile b/drivers/video/fbdev/core/Makefile
index fa306538dac2..67f28e20a892 100644
--- a/drivers/video/fbdev/core/Makefile
+++ b/drivers/video/fbdev/core/Makefile
@@ -1,4 +1,5 @@
1obj-y += fb_notify.o 1obj-y += fb_notify.o
2obj-$(CONFIG_FB_CMDLINE) += fb_cmdline.o
2obj-$(CONFIG_FB) += fb.o 3obj-$(CONFIG_FB) += fb.o
3fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \ 4fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \
4 modedb.o fbcvt.o 5 modedb.o fbcvt.o
diff --git a/drivers/video/fbdev/core/fb_cmdline.c b/drivers/video/fbdev/core/fb_cmdline.c
new file mode 100644
index 000000000000..39509ccd92f1
--- /dev/null
+++ b/drivers/video/fbdev/core/fb_cmdline.c
@@ -0,0 +1,110 @@
1/*
2 * linux/drivers/video/fb_cmdline.c
3 *
4 * Copyright (C) 2014 Intel Corp
5 * Copyright (C) 1994 Martin Schaller
6 *
7 * 2001 - Documented with DocBook
8 * - Brad Douglas <brad@neruo.com>
9 *
10 * This file is subject to the terms and conditions of the GNU General Public
11 * License. See the file COPYING in the main directory of this archive
12 * for more details.
13 *
14 * Authors:
15 * Vetter <danie.vetter@ffwll.ch>
16 */
17#include <linux/init.h>
18#include <linux/fb.h>
19
20static char *video_options[FB_MAX] __read_mostly;
21static int ofonly __read_mostly;
22
23const char *fb_mode_option;
24EXPORT_SYMBOL_GPL(fb_mode_option);
25
26/**
27 * fb_get_options - get kernel boot parameters
28 * @name: framebuffer name as it would appear in
29 * the boot parameter line
30 * (video=<name>:<options>)
31 * @option: the option will be stored here
32 *
33 * NOTE: Needed to maintain backwards compatibility
34 */
35int fb_get_options(const char *name, char **option)
36{
37 char *opt, *options = NULL;
38 int retval = 0;
39 int name_len = strlen(name), i;
40
41 if (name_len && ofonly && strncmp(name, "offb", 4))
42 retval = 1;
43
44 if (name_len && !retval) {
45 for (i = 0; i < FB_MAX; i++) {
46 if (video_options[i] == NULL)
47 continue;
48 if (!video_options[i][0])
49 continue;
50 opt = video_options[i];
51 if (!strncmp(name, opt, name_len) &&
52 opt[name_len] == ':')
53 options = opt + name_len + 1;
54 }
55 }
56 /* No match, pass global option */
57 if (!options && option && fb_mode_option)
58 options = kstrdup(fb_mode_option, GFP_KERNEL);
59 if (options && !strncmp(options, "off", 3))
60 retval = 1;
61
62 if (option)
63 *option = options;
64
65 return retval;
66}
67EXPORT_SYMBOL(fb_get_options);
68
69/**
70 * video_setup - process command line options
71 * @options: string of options
72 *
73 * Process command line options for frame buffer subsystem.
74 *
75 * NOTE: This function is a __setup and __init function.
76 * It only stores the options. Drivers have to call
77 * fb_get_options() as necessary.
78 *
79 * Returns zero.
80 *
81 */
82static int __init video_setup(char *options)
83{
84 int i, global = 0;
85
86 if (!options || !*options)
87 global = 1;
88
89 if (!global && !strncmp(options, "ofonly", 6)) {
90 ofonly = 1;
91 global = 1;
92 }
93
94 if (!global && !strchr(options, ':')) {
95 fb_mode_option = options;
96 global = 1;
97 }
98
99 if (!global) {
100 for (i = 0; i < FB_MAX; i++) {
101 if (video_options[i] == NULL) {
102 video_options[i] = options;
103 break;
104 }
105 }
106 }
107
108 return 1;
109}
110__setup("video=", video_setup);
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index b5e85f6c1c26..0705d8883ede 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -1908,96 +1908,4 @@ int fb_new_modelist(struct fb_info *info)
1908 return err; 1908 return err;
1909} 1909}
1910 1910
1911static char *video_options[FB_MAX] __read_mostly;
1912static int ofonly __read_mostly;
1913
1914/**
1915 * fb_get_options - get kernel boot parameters
1916 * @name: framebuffer name as it would appear in
1917 * the boot parameter line
1918 * (video=<name>:<options>)
1919 * @option: the option will be stored here
1920 *
1921 * NOTE: Needed to maintain backwards compatibility
1922 */
1923int fb_get_options(const char *name, char **option)
1924{
1925 char *opt, *options = NULL;
1926 int retval = 0;
1927 int name_len = strlen(name), i;
1928
1929 if (name_len && ofonly && strncmp(name, "offb", 4))
1930 retval = 1;
1931
1932 if (name_len && !retval) {
1933 for (i = 0; i < FB_MAX; i++) {
1934 if (video_options[i] == NULL)
1935 continue;
1936 if (!video_options[i][0])
1937 continue;
1938 opt = video_options[i];
1939 if (!strncmp(name, opt, name_len) &&
1940 opt[name_len] == ':')
1941 options = opt + name_len + 1;
1942 }
1943 }
1944 /* No match, pass global option */
1945 if (!options && option && fb_mode_option)
1946 options = kstrdup(fb_mode_option, GFP_KERNEL);
1947 if (options && !strncmp(options, "off", 3))
1948 retval = 1;
1949
1950 if (option)
1951 *option = options;
1952
1953 return retval;
1954}
1955EXPORT_SYMBOL(fb_get_options);
1956
1957#ifndef MODULE
1958/**
1959 * video_setup - process command line options
1960 * @options: string of options
1961 *
1962 * Process command line options for frame buffer subsystem.
1963 *
1964 * NOTE: This function is a __setup and __init function.
1965 * It only stores the options. Drivers have to call
1966 * fb_get_options() as necessary.
1967 *
1968 * Returns zero.
1969 *
1970 */
1971static int __init video_setup(char *options)
1972{
1973 int i, global = 0;
1974
1975 if (!options || !*options)
1976 global = 1;
1977
1978 if (!global && !strncmp(options, "ofonly", 6)) {
1979 ofonly = 1;
1980 global = 1;
1981 }
1982
1983 if (!global && !strchr(options, ':')) {
1984 fb_mode_option = options;
1985 global = 1;
1986 }
1987
1988 if (!global) {
1989 for (i = 0; i < FB_MAX; i++) {
1990 if (video_options[i] == NULL) {
1991 video_options[i] = options;
1992 break;
1993 }
1994
1995 }
1996 }
1997
1998 return 1;
1999}
2000__setup("video=", video_setup);
2001#endif
2002
2003MODULE_LICENSE("GPL"); 1911MODULE_LICENSE("GPL");
diff --git a/drivers/video/fbdev/core/modedb.c b/drivers/video/fbdev/core/modedb.c
index a9a907c440d7..388f7971494b 100644
--- a/drivers/video/fbdev/core/modedb.c
+++ b/drivers/video/fbdev/core/modedb.c
@@ -29,9 +29,6 @@
29#define DPRINTK(fmt, args...) 29#define DPRINTK(fmt, args...)
30#endif 30#endif
31 31
32const char *fb_mode_option;
33EXPORT_SYMBOL_GPL(fb_mode_option);
34
35/* 32/*
36 * Standard video mode definitions (taken from XFree86) 33 * Standard video mode definitions (taken from XFree86)
37 */ 34 */