Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'topic/drm-misc-2016-04-01' of git://anongit.freedesktop.org/drm-intel into drm-next

* tag 'topic/drm-misc-2016-04-01' of git://anongit.freedesktop.org/drm-intel:
drm: Add new DCS commands in the enum list
drm: Make uapi headers C89 pendantic compliant
drm/atomic: export drm_atomic_helper_wait_for_fences()
drm: Untangle __KERNEL__ guards
drm: Move DRM_MODE_OBJECT_* to uapi headers
drm: align #include directives with libdrm in uapi headers
drm: Make drm.h uapi header safe for C++
vgacon: dummy implementation for vgacon_text_force
drm/sysfs: Nuke TV/DVI property files
drm/ttm: Remove TTM_HAS_AGP
drm: bridge/dw-hdmi: Remove pre_enable/post_disable dummy funcs
Revert "drm: Don't pass negative delta to ktime_sub_ns()"
drm/atmel: Fixup drm_connector_/unplug/unregister/_all
drm: Rename drm_connector_unplug_all() to drm_connector_unregister_all()
drm: bridge: Make (pre/post) enable/disable callbacks optional

+75 -234
-2
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
··· 556 556 static int __init amdgpu_init(void) 557 557 { 558 558 amdgpu_sync_init(); 559 - #ifdef CONFIG_VGA_CONSOLE 560 559 if (vgacon_text_force()) { 561 560 DRM_ERROR("VGACON disables amdgpu kernel modesetting.\n"); 562 561 return -EINVAL; 563 562 } 564 - #endif 565 563 DRM_INFO("amdgpu kernel modesetting enabled.\n"); 566 564 driver = &kms_driver; 567 565 pdriver = &amdgpu_kms_pci_driver;
-2
drivers/gpu/drm/ast/ast_drv.c
··· 218 218 219 219 static int __init ast_init(void) 220 220 { 221 - #ifdef CONFIG_VGA_CONSOLE 222 221 if (vgacon_text_force() && ast_modeset == -1) 223 222 return -EINVAL; 224 - #endif 225 223 226 224 if (ast_modeset == 0) 227 225 return -EINVAL;
+1 -1
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
··· 615 615 static void atmel_hlcdc_dc_connector_unplug_all(struct drm_device *dev) 616 616 { 617 617 mutex_lock(&dev->mode_config.mutex); 618 - drm_connector_unplug_all(dev); 618 + drm_connector_unregister_all(dev); 619 619 mutex_unlock(&dev->mode_config.mutex); 620 620 } 621 621
-7
drivers/gpu/drm/bridge/dw-hdmi.c
··· 1413 1413 mutex_unlock(&hdmi->mutex); 1414 1414 } 1415 1415 1416 - static void dw_hdmi_bridge_nop(struct drm_bridge *bridge) 1417 - { 1418 - /* do nothing */ 1419 - } 1420 - 1421 1416 static enum drm_connector_status 1422 1417 dw_hdmi_connector_detect(struct drm_connector *connector, bool force) 1423 1418 { ··· 1531 1536 static const struct drm_bridge_funcs dw_hdmi_bridge_funcs = { 1532 1537 .enable = dw_hdmi_bridge_enable, 1533 1538 .disable = dw_hdmi_bridge_disable, 1534 - .pre_enable = dw_hdmi_bridge_nop, 1535 - .post_disable = dw_hdmi_bridge_nop, 1536 1539 .mode_set = dw_hdmi_bridge_mode_set, 1537 1540 }; 1538 1541
-2
drivers/gpu/drm/cirrus/cirrus_drv.c
··· 163 163 164 164 static int __init cirrus_init(void) 165 165 { 166 - #ifdef CONFIG_VGA_CONSOLE 167 166 if (vgacon_text_force() && cirrus_modeset == -1) 168 167 return -EINVAL; 169 - #endif 170 168 171 169 if (cirrus_modeset == 0) 172 170 return -EINVAL;
+13 -2
drivers/gpu/drm/drm_atomic_helper.c
··· 984 984 } 985 985 EXPORT_SYMBOL(drm_atomic_helper_commit_modeset_enables); 986 986 987 - static void wait_for_fences(struct drm_device *dev, 987 + /** 988 + * drm_atomic_helper_wait_for_fences - wait for fences stashed in plane state 989 + * @dev: DRM device 990 + * @state: atomic state object with old state structures 991 + * 992 + * For implicit sync, driver should fish the exclusive fence out from the 993 + * incoming fb's and stash it in the drm_plane_state. This is called after 994 + * drm_atomic_helper_swap_state() so it uses the current plane state (and 995 + * just uses the atomic state to find the changed planes) 996 + */ 997 + void drm_atomic_helper_wait_for_fences(struct drm_device *dev, 988 998 struct drm_atomic_state *state) 989 999 { 990 1000 struct drm_plane *plane; ··· 1012 1002 plane->state->fence = NULL; 1013 1003 } 1014 1004 } 1005 + EXPORT_SYMBOL(drm_atomic_helper_wait_for_fences); 1015 1006 1016 1007 /** 1017 1008 * drm_atomic_helper_framebuffer_changed - check if framebuffer has changed ··· 1174 1163 * current layout. 1175 1164 */ 1176 1165 1177 - wait_for_fences(dev, state); 1166 + drm_atomic_helper_wait_for_fences(dev, state); 1178 1167 1179 1168 drm_atomic_helper_commit_modeset_disables(dev, state); 1180 1169
+9 -9
drivers/gpu/drm/drm_crtc.c
··· 1067 1067 } 1068 1068 EXPORT_SYMBOL(drm_connector_unregister); 1069 1069 1070 - 1071 1070 /** 1072 - * drm_connector_unplug_all - unregister connector userspace interfaces 1071 + * drm_connector_unregister_all - unregister connector userspace interfaces 1073 1072 * @dev: drm device 1074 1073 * 1075 - * This function unregisters all connector userspace interfaces in sysfs. Should 1076 - * be call when the device is disconnected, e.g. from an usb driver's 1077 - * ->disconnect callback. 1074 + * This functions unregisters all connectors from sysfs and other places so 1075 + * that userspace can no longer access them. Drivers should call this as the 1076 + * first step tearing down the device instace, or when the underlying 1077 + * physical device disappeared (e.g. USB unplug), right before calling 1078 + * drm_dev_unregister(). 1078 1079 */ 1079 - void drm_connector_unplug_all(struct drm_device *dev) 1080 + void drm_connector_unregister_all(struct drm_device *dev) 1080 1081 { 1081 1082 struct drm_connector *connector; 1082 1083 1083 1084 /* FIXME: taking the mode config mutex ends up in a clash with sysfs */ 1084 - list_for_each_entry(connector, &dev->mode_config.connector_list, head) 1085 + drm_for_each_connector(connector, dev) 1085 1086 drm_connector_unregister(connector); 1086 - 1087 1087 } 1088 - EXPORT_SYMBOL(drm_connector_unplug_all); 1088 + EXPORT_SYMBOL(drm_connector_unregister_all); 1089 1089 1090 1090 /** 1091 1091 * drm_encoder_init - Init a preallocated encoder
+1 -4
drivers/gpu/drm/drm_irq.c
··· 863 863 /* Subtract time delta from raw timestamp to get final 864 864 * vblank_time timestamp for end of vblank. 865 865 */ 866 - if (delta_ns < 0) 867 - etime = ktime_add_ns(etime, -delta_ns); 868 - else 869 - etime = ktime_sub_ns(etime, delta_ns); 866 + etime = ktime_sub_ns(etime, delta_ns); 870 867 *vblank_time = ktime_to_timeval(etime); 871 868 872 869 DRM_DEBUG_VBL("crtc %u : v 0x%x p(%d,%d)@ %ld.%ld -> %ld.%ld [e %d us, %d rep]\n",
-156
drivers/gpu/drm/drm_sysfs.c
··· 287 287 return written; 288 288 } 289 289 290 - static ssize_t tv_subconnector_show(struct device *device, 291 - struct device_attribute *attr, 292 - char *buf) 293 - { 294 - struct drm_connector *connector = to_drm_connector(device); 295 - struct drm_device *dev = connector->dev; 296 - struct drm_property *prop; 297 - uint64_t subconnector; 298 - int ret; 299 - 300 - prop = dev->mode_config.tv_subconnector_property; 301 - if (!prop) { 302 - DRM_ERROR("Unable to find subconnector property\n"); 303 - return 0; 304 - } 305 - 306 - ret = drm_object_property_get_value(&connector->base, prop, &subconnector); 307 - if (ret) 308 - return 0; 309 - 310 - return snprintf(buf, PAGE_SIZE, "%s", 311 - drm_get_tv_subconnector_name((int)subconnector)); 312 - } 313 - 314 - static ssize_t tv_select_subconnector_show(struct device *device, 315 - struct device_attribute *attr, 316 - char *buf) 317 - { 318 - struct drm_connector *connector = to_drm_connector(device); 319 - struct drm_device *dev = connector->dev; 320 - struct drm_property *prop; 321 - uint64_t subconnector; 322 - int ret; 323 - 324 - prop = dev->mode_config.tv_select_subconnector_property; 325 - if (!prop) { 326 - DRM_ERROR("Unable to find select subconnector property\n"); 327 - return 0; 328 - } 329 - 330 - ret = drm_object_property_get_value(&connector->base, prop, &subconnector); 331 - if (ret) 332 - return 0; 333 - 334 - return snprintf(buf, PAGE_SIZE, "%s", 335 - drm_get_tv_select_name((int)subconnector)); 336 - } 337 - 338 - static ssize_t dvii_subconnector_show(struct device *device, 339 - struct device_attribute *attr, 340 - char *buf) 341 - { 342 - struct drm_connector *connector = to_drm_connector(device); 343 - struct drm_device *dev = connector->dev; 344 - struct drm_property *prop; 345 - uint64_t subconnector; 346 - int ret; 347 - 348 - prop = dev->mode_config.dvi_i_subconnector_property; 349 - if (!prop) { 350 - DRM_ERROR("Unable to find subconnector property\n"); 351 - return 0; 352 - } 353 - 354 - ret = drm_object_property_get_value(&connector->base, prop, &subconnector); 355 - if (ret) 356 - return 0; 357 - 358 - return snprintf(buf, PAGE_SIZE, "%s", 359 - drm_get_dvi_i_subconnector_name((int)subconnector)); 360 - } 361 - 362 - static ssize_t dvii_select_subconnector_show(struct device *device, 363 - struct device_attribute *attr, 364 - char *buf) 365 - { 366 - struct drm_connector *connector = to_drm_connector(device); 367 - struct drm_device *dev = connector->dev; 368 - struct drm_property *prop; 369 - uint64_t subconnector; 370 - int ret; 371 - 372 - prop = dev->mode_config.dvi_i_select_subconnector_property; 373 - if (!prop) { 374 - DRM_ERROR("Unable to find select subconnector property\n"); 375 - return 0; 376 - } 377 - 378 - ret = drm_object_property_get_value(&connector->base, prop, &subconnector); 379 - if (ret) 380 - return 0; 381 - 382 - return snprintf(buf, PAGE_SIZE, "%s", 383 - drm_get_dvi_i_select_name((int)subconnector)); 384 - } 385 - 386 290 static DEVICE_ATTR_RW(status); 387 291 static DEVICE_ATTR_RO(enabled); 388 292 static DEVICE_ATTR_RO(dpms); ··· 299 395 &dev_attr_modes.attr, 300 396 NULL 301 397 }; 302 - 303 - static DEVICE_ATTR_RO(tv_subconnector); 304 - static DEVICE_ATTR_RO(tv_select_subconnector); 305 - 306 - static struct attribute *connector_tv_dev_attrs[] = { 307 - &dev_attr_tv_subconnector.attr, 308 - &dev_attr_tv_select_subconnector.attr, 309 - NULL 310 - }; 311 - 312 - static DEVICE_ATTR_RO(dvii_subconnector); 313 - static DEVICE_ATTR_RO(dvii_select_subconnector); 314 - 315 - static struct attribute *connector_dvii_dev_attrs[] = { 316 - &dev_attr_dvii_subconnector.attr, 317 - &dev_attr_dvii_select_subconnector.attr, 318 - NULL 319 - }; 320 - 321 - /* Connector type related helpers */ 322 - static int kobj_connector_type(struct kobject *kobj) 323 - { 324 - struct device *dev = kobj_to_dev(kobj); 325 - struct drm_connector *connector = to_drm_connector(dev); 326 - 327 - return connector->connector_type; 328 - } 329 - 330 - static umode_t connector_is_dvii(struct kobject *kobj, 331 - struct attribute *attr, int idx) 332 - { 333 - return kobj_connector_type(kobj) == DRM_MODE_CONNECTOR_DVII ? 334 - attr->mode : 0; 335 - } 336 - 337 - static umode_t connector_is_tv(struct kobject *kobj, 338 - struct attribute *attr, int idx) 339 - { 340 - switch (kobj_connector_type(kobj)) { 341 - case DRM_MODE_CONNECTOR_Composite: 342 - case DRM_MODE_CONNECTOR_SVIDEO: 343 - case DRM_MODE_CONNECTOR_Component: 344 - case DRM_MODE_CONNECTOR_TV: 345 - return attr->mode; 346 - } 347 - 348 - return 0; 349 - } 350 398 351 399 static struct bin_attribute edid_attr = { 352 400 .attr.name = "edid", ··· 317 461 .bin_attrs = connector_bin_attrs, 318 462 }; 319 463 320 - static const struct attribute_group connector_tv_dev_group = { 321 - .attrs = connector_tv_dev_attrs, 322 - .is_visible = connector_is_tv, 323 - }; 324 - 325 - static const struct attribute_group connector_dvii_dev_group = { 326 - .attrs = connector_dvii_dev_attrs, 327 - .is_visible = connector_is_dvii, 328 - }; 329 - 330 464 static const struct attribute_group *connector_dev_groups[] = { 331 465 &connector_dev_group, 332 - &connector_tv_dev_group, 333 - &connector_dvii_dev_group, 334 466 NULL 335 467 }; 336 468
-2
drivers/gpu/drm/i915/i915_drv.c
··· 1742 1742 if (i915.modeset == 0) 1743 1743 driver.driver_features &= ~DRIVER_MODESET; 1744 1744 1745 - #ifdef CONFIG_VGA_CONSOLE 1746 1745 if (vgacon_text_force() && i915.modeset == -1) 1747 1746 driver.driver_features &= ~DRIVER_MODESET; 1748 - #endif 1749 1747 1750 1748 if (!(driver.driver_features & DRIVER_MODESET)) { 1751 1749 /* Silently fail loading to not upset userspace. */
-2
drivers/gpu/drm/mgag200/mgag200_drv.c
··· 116 116 117 117 static int __init mgag200_init(void) 118 118 { 119 - #ifdef CONFIG_VGA_CONSOLE 120 119 if (vgacon_text_force() && mgag200_modeset == -1) 121 120 return -EINVAL; 122 - #endif 123 121 124 122 if (mgag200_modeset == 0) 125 123 return -EINVAL;
-2
drivers/gpu/drm/nouveau/nouveau_drm.c
··· 1083 1083 nouveau_display_options(); 1084 1084 1085 1085 if (nouveau_modeset == -1) { 1086 - #ifdef CONFIG_VGA_CONSOLE 1087 1086 if (vgacon_text_force()) 1088 1087 nouveau_modeset = 0; 1089 - #endif 1090 1088 } 1091 1089 1092 1090 if (!nouveau_modeset)
-2
drivers/gpu/drm/qxl/qxl_drv.c
··· 272 272 273 273 static int __init qxl_init(void) 274 274 { 275 - #ifdef CONFIG_VGA_CONSOLE 276 275 if (vgacon_text_force() && qxl_modeset == -1) 277 276 return -EINVAL; 278 - #endif 279 277 280 278 if (qxl_modeset == 0) 281 279 return -EINVAL;
-2
drivers/gpu/drm/radeon/radeon_drv.c
··· 566 566 567 567 static int __init radeon_init(void) 568 568 { 569 - #ifdef CONFIG_VGA_CONSOLE 570 569 if (vgacon_text_force() && radeon_modeset == -1) { 571 570 DRM_INFO("VGACON disable radeon kernel modesetting.\n"); 572 571 radeon_modeset = 0; 573 572 } 574 - #endif 575 573 /* set to modesetting by default if not nomodeset */ 576 574 if (radeon_modeset == -1) 577 575 radeon_modeset = 1;
+1 -4
drivers/gpu/drm/rcar-du/rcar_du_drv.c
··· 278 278 struct rcar_du_device *rcdu = platform_get_drvdata(pdev); 279 279 struct drm_device *ddev = rcdu->ddev; 280 280 281 - mutex_lock(&ddev->mode_config.mutex); 282 - drm_connector_unplug_all(ddev); 283 - mutex_unlock(&ddev->mode_config.mutex); 284 - 281 + drm_connector_unregister_all(ddev); 285 282 drm_dev_unregister(ddev); 286 283 287 284 if (rcdu->fbdev)
+2 -1
drivers/gpu/drm/ttm/Makefile
··· 2 2 # Makefile for the drm device driver. This driver provides support for the 3 3 4 4 ccflags-y := -Iinclude/drm 5 - ttm-y := ttm_agp_backend.o ttm_memory.o ttm_tt.o ttm_bo.o \ 5 + ttm-y := ttm_memory.o ttm_tt.o ttm_bo.o \ 6 6 ttm_bo_util.o ttm_bo_vm.o ttm_module.o \ 7 7 ttm_object.o ttm_lock.o ttm_execbuf_util.o ttm_page_alloc.o \ 8 8 ttm_bo_manager.o ttm_page_alloc_dma.o 9 + ttm-$(CONFIG_AGP) += ttm_agp_backend.o 9 10 10 11 obj-$(CONFIG_DRM_TTM) += ttm.o
-3
drivers/gpu/drm/ttm/ttm_agp_backend.c
··· 34 34 #include <drm/ttm/ttm_module.h> 35 35 #include <drm/ttm/ttm_bo_driver.h> 36 36 #include <drm/ttm/ttm_page_alloc.h> 37 - #ifdef TTM_HAS_AGP 38 37 #include <drm/ttm/ttm_placement.h> 39 38 #include <linux/agp_backend.h> 40 39 #include <linux/module.h> ··· 147 148 ttm_pool_unpopulate(ttm); 148 149 } 149 150 EXPORT_SYMBOL(ttm_agp_tt_unpopulate); 150 - 151 - #endif
+4 -4
drivers/gpu/drm/ttm/ttm_page_alloc.c
··· 48 48 #include <drm/ttm/ttm_bo_driver.h> 49 49 #include <drm/ttm/ttm_page_alloc.h> 50 50 51 - #ifdef TTM_HAS_AGP 51 + #if IS_ENABLED(CONFIG_AGP) 52 52 #include <asm/agp.h> 53 53 #endif 54 54 ··· 219 219 #ifndef CONFIG_X86 220 220 static int set_pages_array_wb(struct page **pages, int addrinarray) 221 221 { 222 - #ifdef TTM_HAS_AGP 222 + #if IS_ENABLED(CONFIG_AGP) 223 223 int i; 224 224 225 225 for (i = 0; i < addrinarray; i++) ··· 230 230 231 231 static int set_pages_array_wc(struct page **pages, int addrinarray) 232 232 { 233 - #ifdef TTM_HAS_AGP 233 + #if IS_ENABLED(CONFIG_AGP) 234 234 int i; 235 235 236 236 for (i = 0; i < addrinarray; i++) ··· 241 241 242 242 static int set_pages_array_uc(struct page **pages, int addrinarray) 243 243 { 244 - #ifdef TTM_HAS_AGP 244 + #if IS_ENABLED(CONFIG_AGP) 245 245 int i; 246 246 247 247 for (i = 0; i < addrinarray; i++)
+4 -4
drivers/gpu/drm/ttm/ttm_page_alloc_dma.c
··· 50 50 #include <linux/kthread.h> 51 51 #include <drm/ttm/ttm_bo_driver.h> 52 52 #include <drm/ttm/ttm_page_alloc.h> 53 - #ifdef TTM_HAS_AGP 53 + #if IS_ENABLED(CONFIG_AGP) 54 54 #include <asm/agp.h> 55 55 #endif 56 56 ··· 271 271 #ifndef CONFIG_X86 272 272 static int set_pages_array_wb(struct page **pages, int addrinarray) 273 273 { 274 - #ifdef TTM_HAS_AGP 274 + #if IS_ENABLED(CONFIG_AGP) 275 275 int i; 276 276 277 277 for (i = 0; i < addrinarray; i++) ··· 282 282 283 283 static int set_pages_array_wc(struct page **pages, int addrinarray) 284 284 { 285 - #ifdef TTM_HAS_AGP 285 + #if IS_ENABLED(CONFIG_AGP) 286 286 int i; 287 287 288 288 for (i = 0; i < addrinarray; i++) ··· 293 293 294 294 static int set_pages_array_uc(struct page **pages, int addrinarray) 295 295 { 296 - #ifdef TTM_HAS_AGP 296 + #if IS_ENABLED(CONFIG_AGP) 297 297 int i; 298 298 299 299 for (i = 0; i < addrinarray; i++)
+1 -1
drivers/gpu/drm/udl/udl_drv.c
··· 94 94 struct drm_device *dev = usb_get_intfdata(interface); 95 95 96 96 drm_kms_helper_poll_disable(dev); 97 - drm_connector_unplug_all(dev); 97 + drm_connector_unregister_all(dev); 98 98 udl_fbdev_unplug(dev); 99 99 udl_drop_usb(dev); 100 100 drm_unplug_dev(dev);
-2
drivers/gpu/drm/virtio/virtgpu_drv.c
··· 42 42 43 43 static int virtio_gpu_probe(struct virtio_device *vdev) 44 44 { 45 - #ifdef CONFIG_VGA_CONSOLE 46 45 if (vgacon_text_force() && virtio_gpu_modeset == -1) 47 46 return -EINVAL; 48 - #endif 49 47 50 48 if (virtio_gpu_modeset == 0) 51 49 return -EINVAL;
-2
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
··· 1530 1530 { 1531 1531 int ret; 1532 1532 1533 - #ifdef CONFIG_VGA_CONSOLE 1534 1533 if (vgacon_text_force()) 1535 1534 return -EINVAL; 1536 - #endif 1537 1535 1538 1536 ret = drm_pci_init(&driver, &vmw_pci_driver); 1539 1537 if (ret)
+2
include/drm/drm_atomic_helper.h
··· 42 42 struct drm_atomic_state *state, 43 43 bool async); 44 44 45 + void drm_atomic_helper_wait_for_fences(struct drm_device *dev, 46 + struct drm_atomic_state *state); 45 47 bool drm_atomic_helper_framebuffer_changed(struct drm_device *dev, 46 48 struct drm_atomic_state *old_state, 47 49 struct drm_crtc *crtc);
+2 -12
include/drm/drm_crtc.h
··· 45 45 struct device_node; 46 46 struct fence; 47 47 48 - #define DRM_MODE_OBJECT_CRTC 0xcccccccc 49 - #define DRM_MODE_OBJECT_CONNECTOR 0xc0c0c0c0 50 - #define DRM_MODE_OBJECT_ENCODER 0xe0e0e0e0 51 - #define DRM_MODE_OBJECT_MODE 0xdededede 52 - #define DRM_MODE_OBJECT_PROPERTY 0xb0b0b0b0 53 - #define DRM_MODE_OBJECT_FB 0xfbfbfbfb 54 - #define DRM_MODE_OBJECT_BLOB 0xbbbbbbbb 55 - #define DRM_MODE_OBJECT_PLANE 0xeeeeeeee 56 - #define DRM_MODE_OBJECT_ANY 0 57 - 58 48 struct drm_mode_object { 59 49 uint32_t id; 60 50 uint32_t type; ··· 2249 2259 return connector->connector_id; 2250 2260 } 2251 2261 2252 - /* helper to unplug all connectors from sysfs for device */ 2253 - extern void drm_connector_unplug_all(struct drm_device *dev); 2262 + /* helper to unregister all connectors from sysfs for device */ 2263 + extern void drm_connector_unregister_all(struct drm_device *dev); 2254 2264 2255 2265 extern int drm_bridge_add(struct drm_bridge *bridge); 2256 2266 extern void drm_bridge_remove(struct drm_bridge *bridge);
+1 -2
include/drm/ttm/ttm_bo_driver.h
··· 1030 1030 1031 1031 extern const struct ttm_mem_type_manager_func ttm_bo_manager_func; 1032 1032 1033 - #if (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE))) 1034 - #define TTM_HAS_AGP 1033 + #if IS_ENABLED(CONFIG_AGP) 1035 1034 #include <linux/agp_backend.h> 1036 1035 1037 1036 /**
+2
include/linux/console.h
··· 191 191 192 192 #ifdef CONFIG_VGA_CONSOLE 193 193 extern bool vgacon_text_force(void); 194 + #else 195 + static inline bool vgacon_text_force(void) { return false; } 194 196 #endif 195 197 196 198 #endif /* _LINUX_CONSOLE_H */
+14 -4
include/uapi/drm/drm.h
··· 36 36 #ifndef _DRM_H_ 37 37 #define _DRM_H_ 38 38 39 - #if defined(__KERNEL__) || defined(__linux__) 39 + #if defined(__KERNEL__) 40 + 41 + #include <linux/types.h> 42 + #include <asm/ioctl.h> 43 + typedef unsigned int drm_handle_t; 44 + 45 + #elif defined(__linux__) 40 46 41 47 #include <linux/types.h> 42 48 #include <asm/ioctl.h> ··· 187 181 _DRM_SHM = 2, /**< shared, cached */ 188 182 _DRM_AGP = 3, /**< AGP/GART */ 189 183 _DRM_SCATTER_GATHER = 4, /**< Scatter/gather memory for PCI DMA */ 190 - _DRM_CONSISTENT = 5, /**< Consistent memory for PCI DMA */ 184 + _DRM_CONSISTENT = 5 /**< Consistent memory for PCI DMA */ 191 185 }; 192 186 193 187 /** ··· 379 373 */ 380 374 struct drm_buf_map { 381 375 int count; /**< Length of the buffer list */ 376 + #ifdef __cplusplus 377 + void __user *virt; 378 + #else 382 379 void __user *virtual; /**< Mmap'd area in user-virtual */ 380 + #endif 383 381 struct drm_buf_pub __user *list; /**< Buffer information */ 384 382 }; 385 383 ··· 441 431 * DRM_IOCTL_UPDATE_DRAW ioctl argument type. 442 432 */ 443 433 typedef enum { 444 - DRM_DRAWABLE_CLIPRECTS, 434 + DRM_DRAWABLE_CLIPRECTS 445 435 } drm_drawable_info_type_t; 446 436 447 437 struct drm_update_draw { ··· 691 681 __s32 fd; 692 682 }; 693 683 694 - #include <drm/drm_mode.h> 684 + #include "drm_mode.h" 695 685 696 686 #define DRM_IOCTL_BASE 'd' 697 687 #define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr)
+10
include/uapi/drm/drm_mode.h
··· 320 320 __u32 connector_id; 321 321 }; 322 322 323 + #define DRM_MODE_OBJECT_CRTC 0xcccccccc 324 + #define DRM_MODE_OBJECT_CONNECTOR 0xc0c0c0c0 325 + #define DRM_MODE_OBJECT_ENCODER 0xe0e0e0e0 326 + #define DRM_MODE_OBJECT_MODE 0xdededede 327 + #define DRM_MODE_OBJECT_PROPERTY 0xb0b0b0b0 328 + #define DRM_MODE_OBJECT_FB 0xfbfbfbfb 329 + #define DRM_MODE_OBJECT_BLOB 0xbbbbbbbb 330 + #define DRM_MODE_OBJECT_PLANE 0xeeeeeeee 331 + #define DRM_MODE_OBJECT_ANY 0 332 + 323 333 struct drm_mode_obj_get_properties { 324 334 __u64 props_ptr; 325 335 __u64 prop_values_ptr;
+8
include/video/mipi_display.h
··· 115 115 MIPI_DCS_READ_MEMORY_CONTINUE = 0x3E, 116 116 MIPI_DCS_SET_TEAR_SCANLINE = 0x44, 117 117 MIPI_DCS_GET_SCANLINE = 0x45, 118 + MIPI_DCS_SET_DISPLAY_BRIGHTNESS = 0x51, /* MIPI DCS 1.3 */ 119 + MIPI_DCS_GET_DISPLAY_BRIGHTNESS = 0x52, /* MIPI DCS 1.3 */ 120 + MIPI_DCS_WRITE_CONTROL_DISPLAY = 0x53, /* MIPI DCS 1.3 */ 121 + MIPI_DCS_GET_CONTROL_DISPLAY = 0x54, /* MIPI DCS 1.3 */ 122 + MIPI_DCS_WRITE_POWER_SAVE = 0x55, /* MIPI DCS 1.3 */ 123 + MIPI_DCS_GET_POWER_SAVE = 0x56, /* MIPI DCS 1.3 */ 124 + MIPI_DCS_SET_CABC_MIN_BRIGHTNESS = 0x5E, /* MIPI DCS 1.3 */ 125 + MIPI_DCS_GET_CABC_MIN_BRIGHTNESS = 0x5F, /* MIPI DCS 1.3 */ 118 126 MIPI_DCS_READ_DDB_START = 0xA1, 119 127 MIPI_DCS_READ_DDB_CONTINUE = 0xA8, 120 128 };