diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-05-29 05:04:24 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-05-29 05:04:24 -0400 |
commit | 42f1d2e06a25628ae4ceaadccc4fa67c7787e2b4 (patch) | |
tree | 8aac83e399de7ad13748a59853a0feea9ed2c5cb /drivers/gpu | |
parent | 9af5324a070e0b2dcb6e22c89e17424eba245fcc (diff) | |
parent | 77bbca138c64cb80259732db6f70e1668123f2a7 (diff) |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci into devel
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/Kconfig | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/drm_bufs.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/drm_drv.c | 2 |
3 files changed, 15 insertions, 1 deletions
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 17b24c580c09..4cd35d8fd799 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig | |||
@@ -84,6 +84,12 @@ config DRM_I915 | |||
84 | config DRM_I915_KMS | 84 | config DRM_I915_KMS |
85 | bool "Enable modesetting on intel by default" | 85 | bool "Enable modesetting on intel by default" |
86 | depends on DRM_I915 | 86 | depends on DRM_I915 |
87 | # i915 KMS depends on ACPI_VIDEO when ACPI is enabled | ||
88 | # but for select to work, need to select ACPI_VIDEO's dependencies, ick | ||
89 | select VIDEO_OUTPUT_CONTROL if ACPI | ||
90 | select BACKLIGHT_CLASS_DEVICE if ACPI | ||
91 | select INPUT if ACPI | ||
92 | select ACPI_VIDEO if ACPI | ||
87 | help | 93 | help |
88 | Choose this option if you want kernel modesetting enabled by default, | 94 | Choose this option if you want kernel modesetting enabled by default, |
89 | and you have a new enough userspace to support this. Running old | 95 | and you have a new enough userspace to support this. Running old |
diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c index 6d80d17f1e96..0411d912d82a 100644 --- a/drivers/gpu/drm/drm_bufs.c +++ b/drivers/gpu/drm/drm_bufs.c | |||
@@ -170,6 +170,14 @@ static int drm_addmap_core(struct drm_device * dev, resource_size_t offset, | |||
170 | } | 170 | } |
171 | DRM_DEBUG("offset = 0x%08llx, size = 0x%08lx, type = %d\n", | 171 | DRM_DEBUG("offset = 0x%08llx, size = 0x%08lx, type = %d\n", |
172 | (unsigned long long)map->offset, map->size, map->type); | 172 | (unsigned long long)map->offset, map->size, map->type); |
173 | |||
174 | /* page-align _DRM_SHM maps. They are allocated here so there is no security | ||
175 | * hole created by that and it works around various broken drivers that use | ||
176 | * a non-aligned quantity to map the SAREA. --BenH | ||
177 | */ | ||
178 | if (map->type == _DRM_SHM) | ||
179 | map->size = PAGE_ALIGN(map->size); | ||
180 | |||
173 | if ((map->offset & (~(resource_size_t)PAGE_MASK)) || (map->size & (~PAGE_MASK))) { | 181 | if ((map->offset & (~(resource_size_t)PAGE_MASK)) || (map->size & (~PAGE_MASK))) { |
174 | drm_free(map, sizeof(*map), DRM_MEM_MAPS); | 182 | drm_free(map, sizeof(*map), DRM_MEM_MAPS); |
175 | return -EINVAL; | 183 | return -EINVAL; |
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index f01def16a669..019b7c578236 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c | |||
@@ -481,7 +481,7 @@ int drm_ioctl(struct inode *inode, struct file *filp, | |||
481 | } | 481 | } |
482 | retcode = func(dev, kdata, file_priv); | 482 | retcode = func(dev, kdata, file_priv); |
483 | 483 | ||
484 | if ((retcode == 0) && (cmd & IOC_OUT)) { | 484 | if (cmd & IOC_OUT) { |
485 | if (copy_to_user((void __user *)arg, kdata, | 485 | if (copy_to_user((void __user *)arg, kdata, |
486 | _IOC_SIZE(cmd)) != 0) | 486 | _IOC_SIZE(cmd)) != 0) |
487 | retcode = -EFAULT; | 487 | retcode = -EFAULT; |