diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-09 19:04:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-09 19:04:31 -0400 |
commit | 2e17c5a97e231f3cb426f4b7895eab5be5c5442e (patch) | |
tree | 80871817427250200d6931a45ccb4833c4add74a /drivers/video | |
parent | 5f097cd249f00683442c3e265d6f27d80fc83563 (diff) | |
parent | 774d8e34e46506222bb5e2888e3ef42b2775715f (diff) |
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm updates from Dave Airlie:
"Okay this is the big one, I was stalled on the fbdev pull req as I
stupidly let fbdev guys merge a patch I required to fix a warning with
some patches I had, they ended up merging the patch from the wrong
place, but the warning should be fixed. In future I'll just take the
patch myself!
Outside drm:
There are some snd changes for the HDMI audio interactions on haswell,
they've been acked for inclusion via my tree. This relies on the
wound/wait tree from Ingo which is already merged.
Major changes:
AMD finally released the dynamic power management code for all their
GPUs from r600->present day, this is great, off by default for now but
also a huge amount of code, in fact it is most of this pull request.
Since it landed there has been a lot of community testing and Alex has
sent a lot of fixes for any bugs found so far. I suspect radeon might
now be the biggest kernel driver ever :-P p.s. radeon.dpm=1 to enable
dynamic powermanagement for anyone.
New drivers:
Renesas r-car display unit.
Other highlights:
- core: GEM CMA prime support, use new w/w mutexs for TTM
reservations, cursor hotspot, doc updates
- dvo chips: chrontel 7010B support
- i915: Haswell (fbc, ips, vecs, watermarks, audio powerwell),
Valleyview (enabled by default, rc6), lots of pll reworking, 30bpp
support (this time for sure)
- nouveau: async buffer object deletion, context/register init
updates, kernel vp2 engine support, GF117 support, GK110 accel
support (with external nvidia ucode), context cleanups.
- exynos: memory leak fixes, Add S3C64XX SoC series support, device
tree updates, common clock framework support,
- qxl: cursor hotspot support, multi-monitor support, suspend/resume
support
- mgag200: hw cursor support, g200 mode limiting
- shmobile: prime support
- tegra: fixes mostly
I've been banging on this quite a lot due to the size of it, and it
seems to okay on everything I've tested it on."
* 'drm-next' of git://people.freedesktop.org/~airlied/linux: (811 commits)
drm/radeon/dpm: implement vblank_too_short callback for si
drm/radeon/dpm: implement vblank_too_short callback for cayman
drm/radeon/dpm: implement vblank_too_short callback for btc
drm/radeon/dpm: implement vblank_too_short callback for evergreen
drm/radeon/dpm: implement vblank_too_short callback for 7xx
drm/radeon/dpm: add checks against vblank time
drm/radeon/dpm: add helper to calculate vblank time
drm/radeon: remove stray line in old pm code
drm/radeon/dpm: fix display_gap programming on rv7xx
drm/nvc0/gr: fix gpc firmware regression
drm/nouveau: fix minor thinko causing bo moves to not be async on kepler
drm/radeon/dpm: implement force performance level for TN
drm/radeon/dpm: implement force performance level for ON/LN
drm/radeon/dpm: implement force performance level for SI
drm/radeon/dpm: implement force performance level for cayman
drm/radeon/dpm: implement force performance levels for 7xx/eg/btc
drm/radeon/dpm: add infrastructure to force performance levels
drm/radeon: fix surface setup on r1xx
drm/radeon: add support for 3d perf states on older asics
drm/radeon: set default clocks for SI when DPM is disabled
...
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/console/vgacon.c | 17 | ||||
-rw-r--r-- | drivers/video/of_display_timing.c | 6 | ||||
-rw-r--r-- | drivers/video/uvesafb.c | 70 |
3 files changed, 34 insertions, 59 deletions
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 5855d17d19ac..9d8feac67637 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/kd.h> | 42 | #include <linux/kd.h> |
43 | #include <linux/slab.h> | 43 | #include <linux/slab.h> |
44 | #include <linux/vt_kern.h> | 44 | #include <linux/vt_kern.h> |
45 | #include <linux/sched.h> | ||
45 | #include <linux/selection.h> | 46 | #include <linux/selection.h> |
46 | #include <linux/spinlock.h> | 47 | #include <linux/spinlock.h> |
47 | #include <linux/ioport.h> | 48 | #include <linux/ioport.h> |
@@ -1124,11 +1125,15 @@ static int vgacon_do_font_op(struct vgastate *state,char *arg,int set,int ch512) | |||
1124 | 1125 | ||
1125 | if (arg) { | 1126 | if (arg) { |
1126 | if (set) | 1127 | if (set) |
1127 | for (i = 0; i < cmapsz; i++) | 1128 | for (i = 0; i < cmapsz; i++) { |
1128 | vga_writeb(arg[i], charmap + i); | 1129 | vga_writeb(arg[i], charmap + i); |
1130 | cond_resched(); | ||
1131 | } | ||
1129 | else | 1132 | else |
1130 | for (i = 0; i < cmapsz; i++) | 1133 | for (i = 0; i < cmapsz; i++) { |
1131 | arg[i] = vga_readb(charmap + i); | 1134 | arg[i] = vga_readb(charmap + i); |
1135 | cond_resched(); | ||
1136 | } | ||
1132 | 1137 | ||
1133 | /* | 1138 | /* |
1134 | * In 512-character mode, the character map is not contiguous if | 1139 | * In 512-character mode, the character map is not contiguous if |
@@ -1139,11 +1144,15 @@ static int vgacon_do_font_op(struct vgastate *state,char *arg,int set,int ch512) | |||
1139 | charmap += 2 * cmapsz; | 1144 | charmap += 2 * cmapsz; |
1140 | arg += cmapsz; | 1145 | arg += cmapsz; |
1141 | if (set) | 1146 | if (set) |
1142 | for (i = 0; i < cmapsz; i++) | 1147 | for (i = 0; i < cmapsz; i++) { |
1143 | vga_writeb(arg[i], charmap + i); | 1148 | vga_writeb(arg[i], charmap + i); |
1149 | cond_resched(); | ||
1150 | } | ||
1144 | else | 1151 | else |
1145 | for (i = 0; i < cmapsz; i++) | 1152 | for (i = 0; i < cmapsz; i++) { |
1146 | arg[i] = vga_readb(charmap + i); | 1153 | arg[i] = vga_readb(charmap + i); |
1154 | cond_resched(); | ||
1155 | } | ||
1147 | } | 1156 | } |
1148 | } | 1157 | } |
1149 | 1158 | ||
diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c index 9c0f17b2e6fb..171821ddd78d 100644 --- a/drivers/video/of_display_timing.c +++ b/drivers/video/of_display_timing.c | |||
@@ -23,7 +23,7 @@ | |||
23 | * Every display_timing can be specified with either just the typical value or | 23 | * Every display_timing can be specified with either just the typical value or |
24 | * a range consisting of min/typ/max. This function helps handling this | 24 | * a range consisting of min/typ/max. This function helps handling this |
25 | **/ | 25 | **/ |
26 | static int parse_timing_property(struct device_node *np, const char *name, | 26 | static int parse_timing_property(const struct device_node *np, const char *name, |
27 | struct timing_entry *result) | 27 | struct timing_entry *result) |
28 | { | 28 | { |
29 | struct property *prop; | 29 | struct property *prop; |
@@ -56,7 +56,7 @@ static int parse_timing_property(struct device_node *np, const char *name, | |||
56 | * of_parse_display_timing - parse display_timing entry from device_node | 56 | * of_parse_display_timing - parse display_timing entry from device_node |
57 | * @np: device_node with the properties | 57 | * @np: device_node with the properties |
58 | **/ | 58 | **/ |
59 | static int of_parse_display_timing(struct device_node *np, | 59 | static int of_parse_display_timing(const struct device_node *np, |
60 | struct display_timing *dt) | 60 | struct display_timing *dt) |
61 | { | 61 | { |
62 | u32 val = 0; | 62 | u32 val = 0; |
@@ -92,6 +92,8 @@ static int of_parse_display_timing(struct device_node *np, | |||
92 | dt->flags |= DISPLAY_FLAGS_INTERLACED; | 92 | dt->flags |= DISPLAY_FLAGS_INTERLACED; |
93 | if (of_property_read_bool(np, "doublescan")) | 93 | if (of_property_read_bool(np, "doublescan")) |
94 | dt->flags |= DISPLAY_FLAGS_DOUBLESCAN; | 94 | dt->flags |= DISPLAY_FLAGS_DOUBLESCAN; |
95 | if (of_property_read_bool(np, "doubleclk")) | ||
96 | dt->flags |= DISPLAY_FLAGS_DOUBLECLK; | ||
95 | 97 | ||
96 | if (ret) { | 98 | if (ret) { |
97 | pr_err("%s: error reading timing properties\n", | 99 | pr_err("%s: error reading timing properties\n", |
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c index 10138b60fd70..b963ea12d175 100644 --- a/drivers/video/uvesafb.c +++ b/drivers/video/uvesafb.c | |||
@@ -24,9 +24,6 @@ | |||
24 | #ifdef CONFIG_X86 | 24 | #ifdef CONFIG_X86 |
25 | #include <video/vga.h> | 25 | #include <video/vga.h> |
26 | #endif | 26 | #endif |
27 | #ifdef CONFIG_MTRR | ||
28 | #include <asm/mtrr.h> | ||
29 | #endif | ||
30 | #include "edid.h" | 27 | #include "edid.h" |
31 | 28 | ||
32 | static struct cb_id uvesafb_cn_id = { | 29 | static struct cb_id uvesafb_cn_id = { |
@@ -1540,67 +1537,30 @@ static void uvesafb_init_info(struct fb_info *info, struct vbe_mode_ib *mode) | |||
1540 | 1537 | ||
1541 | static void uvesafb_init_mtrr(struct fb_info *info) | 1538 | static void uvesafb_init_mtrr(struct fb_info *info) |
1542 | { | 1539 | { |
1543 | #ifdef CONFIG_MTRR | 1540 | struct uvesafb_par *par = info->par; |
1541 | |||
1544 | if (mtrr && !(info->fix.smem_start & (PAGE_SIZE - 1))) { | 1542 | if (mtrr && !(info->fix.smem_start & (PAGE_SIZE - 1))) { |
1545 | int temp_size = info->fix.smem_len; | 1543 | int temp_size = info->fix.smem_len; |
1546 | unsigned int type = 0; | ||
1547 | 1544 | ||
1548 | switch (mtrr) { | 1545 | int rc; |
1549 | case 1: | ||
1550 | type = MTRR_TYPE_UNCACHABLE; | ||
1551 | break; | ||
1552 | case 2: | ||
1553 | type = MTRR_TYPE_WRBACK; | ||
1554 | break; | ||
1555 | case 3: | ||
1556 | type = MTRR_TYPE_WRCOMB; | ||
1557 | break; | ||
1558 | case 4: | ||
1559 | type = MTRR_TYPE_WRTHROUGH; | ||
1560 | break; | ||
1561 | default: | ||
1562 | type = 0; | ||
1563 | break; | ||
1564 | } | ||
1565 | 1546 | ||
1566 | if (type) { | 1547 | /* Find the largest power-of-two */ |
1567 | int rc; | 1548 | temp_size = roundup_pow_of_two(temp_size); |
1568 | 1549 | ||
1569 | /* Find the largest power-of-two */ | 1550 | /* Try and find a power of two to add */ |
1570 | temp_size = roundup_pow_of_two(temp_size); | 1551 | do { |
1552 | rc = arch_phys_wc_add(info->fix.smem_start, temp_size); | ||
1553 | temp_size >>= 1; | ||
1554 | } while (temp_size >= PAGE_SIZE && rc == -EINVAL); | ||
1571 | 1555 | ||
1572 | /* Try and find a power of two to add */ | 1556 | if (rc >= 0) |
1573 | do { | 1557 | par->mtrr_handle = rc; |
1574 | rc = mtrr_add(info->fix.smem_start, | ||
1575 | temp_size, type, 1); | ||
1576 | temp_size >>= 1; | ||
1577 | } while (temp_size >= PAGE_SIZE && rc == -EINVAL); | ||
1578 | } | ||
1579 | } | 1558 | } |
1580 | #endif /* CONFIG_MTRR */ | ||
1581 | } | 1559 | } |
1582 | 1560 | ||
1583 | static void uvesafb_ioremap(struct fb_info *info) | 1561 | static void uvesafb_ioremap(struct fb_info *info) |
1584 | { | 1562 | { |
1585 | #ifdef CONFIG_X86 | 1563 | info->screen_base = ioremap_wc(info->fix.smem_start, info->fix.smem_len); |
1586 | switch (mtrr) { | ||
1587 | case 1: /* uncachable */ | ||
1588 | info->screen_base = ioremap_nocache(info->fix.smem_start, info->fix.smem_len); | ||
1589 | break; | ||
1590 | case 2: /* write-back */ | ||
1591 | info->screen_base = ioremap_cache(info->fix.smem_start, info->fix.smem_len); | ||
1592 | break; | ||
1593 | case 3: /* write-combining */ | ||
1594 | info->screen_base = ioremap_wc(info->fix.smem_start, info->fix.smem_len); | ||
1595 | break; | ||
1596 | case 4: /* write-through */ | ||
1597 | default: | ||
1598 | info->screen_base = ioremap(info->fix.smem_start, info->fix.smem_len); | ||
1599 | break; | ||
1600 | } | ||
1601 | #else | ||
1602 | info->screen_base = ioremap(info->fix.smem_start, info->fix.smem_len); | ||
1603 | #endif /* CONFIG_X86 */ | ||
1604 | } | 1564 | } |
1605 | 1565 | ||
1606 | static ssize_t uvesafb_show_vbe_ver(struct device *dev, | 1566 | static ssize_t uvesafb_show_vbe_ver(struct device *dev, |
@@ -1851,6 +1811,7 @@ static int uvesafb_remove(struct platform_device *dev) | |||
1851 | unregister_framebuffer(info); | 1811 | unregister_framebuffer(info); |
1852 | release_region(0x3c0, 32); | 1812 | release_region(0x3c0, 32); |
1853 | iounmap(info->screen_base); | 1813 | iounmap(info->screen_base); |
1814 | arch_phys_wc_del(par->mtrr_handle); | ||
1854 | release_mem_region(info->fix.smem_start, info->fix.smem_len); | 1815 | release_mem_region(info->fix.smem_start, info->fix.smem_len); |
1855 | fb_destroy_modedb(info->monspecs.modedb); | 1816 | fb_destroy_modedb(info->monspecs.modedb); |
1856 | fb_dealloc_cmap(&info->cmap); | 1817 | fb_dealloc_cmap(&info->cmap); |
@@ -1930,6 +1891,9 @@ static int uvesafb_setup(char *options) | |||
1930 | } | 1891 | } |
1931 | } | 1892 | } |
1932 | 1893 | ||
1894 | if (mtrr != 3 && mtrr != 1) | ||
1895 | pr_warn("uvesafb: mtrr should be set to 0 or 3; %d is unsupported", mtrr); | ||
1896 | |||
1933 | return 0; | 1897 | return 0; |
1934 | } | 1898 | } |
1935 | #endif /* !MODULE */ | 1899 | #endif /* !MODULE */ |