diff options
-rw-r--r-- | drivers/gpu/drm/drm_ioctl.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_display.c | 3 | ||||
-rw-r--r-- | include/drm/drm.h | 2 | ||||
-rw-r--r-- | include/drm/drm_crtc.h | 3 |
5 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index 2300ab1a2a77..cf85155da2a0 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c | |||
@@ -277,6 +277,12 @@ int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_priv) | |||
277 | case DRM_CAP_VBLANK_HIGH_CRTC: | 277 | case DRM_CAP_VBLANK_HIGH_CRTC: |
278 | req->value = 1; | 278 | req->value = 1; |
279 | break; | 279 | break; |
280 | case DRM_CAP_DUMB_PREFERRED_DEPTH: | ||
281 | req->value = dev->mode_config.preferred_depth; | ||
282 | break; | ||
283 | case DRM_CAP_DUMB_PREFER_SHADOW: | ||
284 | req->value = dev->mode_config.prefer_shadow; | ||
285 | break; | ||
280 | default: | 286 | default: |
281 | return -EINVAL; | 287 | return -EINVAL; |
282 | } | 288 | } |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index dfa67449827a..0a8a640d36ef 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -9089,6 +9089,9 @@ void intel_modeset_init(struct drm_device *dev) | |||
9089 | dev->mode_config.min_width = 0; | 9089 | dev->mode_config.min_width = 0; |
9090 | dev->mode_config.min_height = 0; | 9090 | dev->mode_config.min_height = 0; |
9091 | 9091 | ||
9092 | dev->mode_config.preferred_depth = 24; | ||
9093 | dev->mode_config.prefer_shadow = 1; | ||
9094 | |||
9092 | dev->mode_config.funcs = (void *)&intel_mode_funcs; | 9095 | dev->mode_config.funcs = (void *)&intel_mode_funcs; |
9093 | 9096 | ||
9094 | intel_init_quirks(dev); | 9097 | intel_init_quirks(dev); |
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index 5515f1054b29..7cb062daa71e 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c | |||
@@ -1240,6 +1240,9 @@ int radeon_modeset_init(struct radeon_device *rdev) | |||
1240 | rdev->ddev->mode_config.max_height = 4096; | 1240 | rdev->ddev->mode_config.max_height = 4096; |
1241 | } | 1241 | } |
1242 | 1242 | ||
1243 | rdev->ddev->mode_config.preferred_depth = 24; | ||
1244 | rdev->ddev->mode_config.prefer_shadow = 1; | ||
1245 | |||
1243 | rdev->ddev->mode_config.fb_base = rdev->mc.aper_base; | 1246 | rdev->ddev->mode_config.fb_base = rdev->mc.aper_base; |
1244 | 1247 | ||
1245 | ret = radeon_modeset_create_props(rdev); | 1248 | ret = radeon_modeset_create_props(rdev); |
diff --git a/include/drm/drm.h b/include/drm/drm.h index 49d94ede2ec2..34a7b89fd006 100644 --- a/include/drm/drm.h +++ b/include/drm/drm.h | |||
@@ -761,6 +761,8 @@ struct drm_event_vblank { | |||
761 | 761 | ||
762 | #define DRM_CAP_DUMB_BUFFER 0x1 | 762 | #define DRM_CAP_DUMB_BUFFER 0x1 |
763 | #define DRM_CAP_VBLANK_HIGH_CRTC 0x2 | 763 | #define DRM_CAP_VBLANK_HIGH_CRTC 0x2 |
764 | #define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3 | ||
765 | #define DRM_CAP_DUMB_PREFER_SHADOW 0x4 | ||
764 | 766 | ||
765 | /* typedef area */ | 767 | /* typedef area */ |
766 | #ifndef __KERNEL__ | 768 | #ifndef __KERNEL__ |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 823531454799..2a0872cac333 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -796,6 +796,9 @@ struct drm_mode_config { | |||
796 | struct drm_property *scaling_mode_property; | 796 | struct drm_property *scaling_mode_property; |
797 | struct drm_property *dithering_mode_property; | 797 | struct drm_property *dithering_mode_property; |
798 | struct drm_property *dirty_info_property; | 798 | struct drm_property *dirty_info_property; |
799 | |||
800 | /* dumb ioctl parameters */ | ||
801 | uint32_t preferred_depth, prefer_shadow; | ||
799 | }; | 802 | }; |
800 | 803 | ||
801 | #define obj_to_crtc(x) container_of(x, struct drm_crtc, base) | 804 | #define obj_to_crtc(x) container_of(x, struct drm_crtc, base) |