drm-misc-next for 5.17: UAPI Changes: Cross-subsystem Changes: * Move 'nomodeset' kernel boot option into DRM subsystem Core Changes: * Replace several DRM_*() logging macros with drm_*() equivalents * panel: Add quirk for Lenovo Yoga Book X91F/L * ttm: Documentation fixes Driver Changes: * Cleanup nomodeset handling in drivers * Fixes * bridge/anx7625: Fix reading EDID; Fix error code * bridge/megachips: Probe both bridges before registering * vboxvideo: Fix ERR_PTR usage Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Unified · Split
| @@ -3545,6 +3545,13 @@ · 3544 unmodified lines | ||
| 3545 | 3545 | shutdown the other cpus. Instead use the REBOOT_VECTOR |
| 3546 | 3546 | irq. |
| 3547 | 3547 | |
| 3548 | + nomodeset Disable kernel modesetting. DRM drivers will not perform | |
| 3549 | + display-mode changes or accelerated rendering. Only the | |
| 3550 | + system framebuffer will be available for use if this was | |
| 3551 | + set-up by the firmware or boot loader. | |
| 3552 | + | |
| 3553 | + Useful as fallback, or for testing and debugging. | |
| 3554 | + | |
| 3548 | 3555 | nomodule Disable module load |
| 3549 | 3556 | |
| 3550 | 3557 | nopat [X86] Disable PAT (page attribute table extension of |
| @@ -8,6 +8,7 @@ · 7 unmodified lines | ||
| 8 | 8 | menuconfig DRM |
| 9 | 9 | tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)" |
| 10 | 10 | depends on (AGP || AGP=n) && !EMULATED_CMPXCHG && HAS_DMA |
| 11 | + select DRM_NOMODESET | |
| 11 | 12 | select DRM_PANEL_ORIENTATION_QUIRKS |
| 12 | 13 | select HDMI |
| 13 | 14 | select FB_CMDLINE |
| @@ -492,6 +493,11 @@ config DRM_EXPORT_FOR_TESTS · 478 unmodified lines | ||
| 492 | 493 | config DRM_PANEL_ORIENTATION_QUIRKS |
| 493 | 494 | tristate |
| 494 | 495 | |
| 496 | +# Separate option because nomodeset parameter is global and expected built-in | |
| 497 | +config DRM_NOMODESET | |
| 498 | + bool | |
| 499 | + default n | |
| 500 | + | |
| 495 | 501 | config DRM_LIB_RANDOM |
| 496 | 502 | bool |
| 497 | 503 | default n |
| @@ -33,6 +33,8 @@ drm-$(CONFIG_DRM_PRIVACY_SCREEN) += drm_privacy_screen.o drm_privacy_screen_x86. · 32 unmodified lines | ||
| 33 | 33 | |
| 34 | 34 | obj-$(CONFIG_DRM_DP_AUX_BUS) += drm_dp_aux_bus.o |
| 35 | 35 | |
| 36 | +obj-$(CONFIG_DRM_NOMODESET) += drm_nomodeset.o | |
| 37 | + | |
| 36 | 38 | drm_cma_helper-y := drm_gem_cma_helper.o |
| 37 | 39 | obj-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_cma_helper.o |
| 38 | 40 | |
| @@ -31,7 +31,6 @@ · 30 unmodified lines | ||
| 31 | 31 | #include "amdgpu_drv.h" |
| 32 | 32 | |
| 33 | 33 | #include <drm/drm_pciids.h> |
| 34 | −#include <linux/console.h> | |
| 35 | 34 | #include <linux/module.h> |
| 36 | 35 | #include <linux/pm_runtime.h> |
| 37 | 36 | #include <linux/vga_switcheroo.h> |
| @@ -2516,10 +2515,8 @@ static int __init amdgpu_init(void) · 2478 unmodified lines | ||
| 2516 | 2515 | { |
| 2517 | 2516 | int r; |
| 2518 | 2517 | |
| 2519 | − if (vgacon_text_force()) { | |
| 2520 | − DRM_ERROR("VGACON disables amdgpu kernel modesetting.\n"); | |
| 2518 | + if (drm_firmware_drivers_only()) | |
| 2521 | 2519 | return -EINVAL; |
| 2522 | − } | |
| 2523 | 2520 | |
| 2524 | 2521 | r = amdgpu_sync_init(); |
| 2525 | 2522 | if (r) |
| @@ -116,17 +116,8 @@ static void amdgpu_evict_flags(struct ttm_buffer_object *bo, · 115 unmodified lines | ||
| 116 | 116 | |
| 117 | 117 | abo = ttm_to_amdgpu_bo(bo); |
| 118 | 118 | if (abo->flags & AMDGPU_AMDKFD_CREATE_SVM_BO) { |
| 119 | − struct dma_fence *fence; | |
| 120 | − struct dma_resv *resv = &bo->base._resv; | |
| 121 | − | |
| 122 | − rcu_read_lock(); | |
| 123 | − fence = rcu_dereference(resv->fence_excl); | |
| 124 | − if (fence && !fence->ops->signaled) | |
| 125 | − dma_fence_enable_sw_signaling(fence); | |
| 126 | − | |
| 127 | 119 | placement->num_placement = 0; |
| 128 | 120 | placement->num_busy_placement = 0; |
| 129 | − rcu_read_unlock(); | |
| 130 | 121 | return; |
| 131 | 122 | } |
| 132 | 123 | |
| @@ -26,7 +26,6 @@ · 25 unmodified lines | ||
| 26 | 26 | * Authors: Dave Airlie <airlied@redhat.com> |
| 27 | 27 | */ |
| 28 | 28 | |
| 29 | −#include <linux/console.h> | |
| 30 | 29 | #include <linux/module.h> |
| 31 | 30 | #include <linux/pci.h> |
| 32 | 31 | |
| @@ -233,7 +232,7 @@ static struct pci_driver ast_pci_driver = { · 200 unmodified lines | ||
| 233 | 232 | |
| 234 | 233 | static int __init ast_init(void) |
| 235 | 234 | { |
| 236 | − if (vgacon_text_force() && ast_modeset == -1) | |
| 235 | + if (drm_firmware_drivers_only() && ast_modeset == -1) | |
| 237 | 236 | return -EINVAL; |
| 238 | 237 | |
| 239 | 238 | if (ast_modeset == 0) |
| @@ -850,7 +850,7 @@ static int sp_tx_edid_read(struct anx7625_data *ctx, · 849 unmodified lines | ||
| 850 | 850 | int count, blocks_num; |
| 851 | 851 | u8 pblock_buf[MAX_DPCD_BUFFER_SIZE]; |
| 852 | 852 | u8 i, j; |
| 853 | − u8 g_edid_break = 0; | |
| 853 | + int g_edid_break = 0; | |
| 854 | 854 | int ret; |
| 855 | 855 | struct device *dev = &ctx->client->dev; |
| 856 | 856 | |
| @@ -881,7 +881,7 @@ static int sp_tx_edid_read(struct anx7625_data *ctx, · 24 unmodified lines | ||
| 881 | 881 | g_edid_break = edid_read(ctx, offset, |
| 882 | 882 | pblock_buf); |
| 883 | 883 | |
| 884 | − if (g_edid_break) | |
| 884 | + if (g_edid_break < 0) | |
| 885 | 885 | break; |
| 886 | 886 | |
| 887 | 887 | memcpy(&pedid_blocks_buf[offset], |
| @@ -1636,7 +1636,7 @@ static int anx7625_register_audio(struct device *dev, struct anx7625_data *ctx) · 748 unmodified lines | ||
| 1636 | 1636 | sizeof(codec_data)); |
| 1637 | 1637 | |
| 1638 | 1638 | if (IS_ERR(ctx->audio_pdev)) |
| 1639 | − return IS_ERR(ctx->audio_pdev); | |
| 1639 | + return PTR_ERR(ctx->audio_pdev); | |
| 1640 | 1640 | |
| 1641 | 1641 | DRM_DEV_DEBUG_DRIVER(dev, "bound to %s", HDMI_CODEC_DRV_NAME); |
| 1642 | 1642 | |
| @@ -306,19 +306,10 @@ out: · 305 unmodified lines | ||
| 306 | 306 | mutex_unlock(&ge_b850v3_lvds_dev_mutex); |
| 307 | 307 | } |
| 308 | 308 | |
| 309 | −static int stdp4028_ge_b850v3_fw_probe(struct i2c_client *stdp4028_i2c, | |
| 310 | − const struct i2c_device_id *id) | |
| 309 | +static int ge_b850v3_register(void) | |
| 311 | 310 | { |
| 311 | + struct i2c_client *stdp4028_i2c = ge_b850v3_lvds_ptr->stdp4028_i2c; | |
| 312 | 312 | struct device *dev = &stdp4028_i2c->dev; |
| 313 | − int ret; | |
| 314 | − | |
| 315 | − ret = ge_b850v3_lvds_init(dev); | |
| 316 | − | |
| 317 | − if (ret) | |
| 318 | − return ret; | |
| 319 | − | |
| 320 | − ge_b850v3_lvds_ptr->stdp4028_i2c = stdp4028_i2c; | |
| 321 | − i2c_set_clientdata(stdp4028_i2c, ge_b850v3_lvds_ptr); | |
| 322 | 313 | |
| 323 | 314 | /* drm bridge initialization */ |
| 324 | 315 | ge_b850v3_lvds_ptr->bridge.funcs = &ge_b850v3_lvds_funcs; |
| @@ -343,6 +334,27 @@ static int stdp4028_ge_b850v3_fw_probe(struct i2c_client *stdp4028_i2c, · 18 unmodified lines | ||
| 343 | 334 | "ge-b850v3-lvds-dp", ge_b850v3_lvds_ptr); |
| 344 | 335 | } |
| 345 | 336 | |
| 337 | +static int stdp4028_ge_b850v3_fw_probe(struct i2c_client *stdp4028_i2c, | |
| 338 | + const struct i2c_device_id *id) | |
| 339 | +{ | |
| 340 | + struct device *dev = &stdp4028_i2c->dev; | |
| 341 | + int ret; | |
| 342 | + | |
| 343 | + ret = ge_b850v3_lvds_init(dev); | |
| 344 | + | |
| 345 | + if (ret) | |
| 346 | + return ret; | |
| 347 | + | |
| 348 | + ge_b850v3_lvds_ptr->stdp4028_i2c = stdp4028_i2c; | |
| 349 | + i2c_set_clientdata(stdp4028_i2c, ge_b850v3_lvds_ptr); | |
| 350 | + | |
| 351 | + /* Only register after both bridges are probed */ | |
| 352 | + if (!ge_b850v3_lvds_ptr->stdp2690_i2c) | |
| 353 | + return 0; | |
| 354 | + | |
| 355 | + return ge_b850v3_register(); | |
| 356 | +} | |
| 357 | + | |
| 346 | 358 | static int stdp4028_ge_b850v3_fw_remove(struct i2c_client *stdp4028_i2c) |
| 347 | 359 | { |
| 348 | 360 | ge_b850v3_lvds_remove(); |
| @@ -386,7 +398,11 @@ static int stdp2690_ge_b850v3_fw_probe(struct i2c_client *stdp2690_i2c, · 37 unmodified lines | ||
| 386 | 398 | ge_b850v3_lvds_ptr->stdp2690_i2c = stdp2690_i2c; |
| 387 | 399 | i2c_set_clientdata(stdp2690_i2c, ge_b850v3_lvds_ptr); |
| 388 | 400 | |
| 389 | − return 0; | |
| 401 | + /* Only register after both bridges are probed */ | |
| 402 | + if (!ge_b850v3_lvds_ptr->stdp4028_i2c) | |
| 403 | + return 0; | |
| 404 | + | |
| 405 | + return ge_b850v3_register(); | |
| 390 | 406 | } |
| 391 | 407 | |
| 392 | 408 | static int stdp2690_ge_b850v3_fw_remove(struct i2c_client *stdp2690_i2c) |
| @@ -74,7 +74,7 @@ int drm_crtc_commit_wait(struct drm_crtc_commit *commit) · 73 unmodified lines | ||
| 74 | 74 | |
| 75 | 75 | ret = wait_for_completion_timeout(&commit->hw_done, timeout); |
| 76 | 76 | if (!ret) { |
| 77 | − DRM_ERROR("hw_done timed out\n"); | |
| 77 | + drm_err(commit->crtc->dev, "hw_done timed out\n"); | |
| 78 | 78 | return -ETIMEDOUT; |
| 79 | 79 | } |
| 80 | 80 | |
| @@ -84,7 +84,7 @@ int drm_crtc_commit_wait(struct drm_crtc_commit *commit) · 3 unmodified lines | ||
| 84 | 84 | */ |
| 85 | 85 | ret = wait_for_completion_timeout(&commit->flip_done, timeout); |
| 86 | 86 | if (!ret) { |
| 87 | − DRM_ERROR("flip_done timed out\n"); | |
| 87 | + drm_err(commit->crtc->dev, "flip_done timed out\n"); | |
| 88 | 88 | return -ETIMEDOUT; |
| 89 | 89 | } |
| 90 | 90 | |
| @@ -140,7 +140,7 @@ drm_atomic_state_init(struct drm_device *dev, struct drm_atomic_state *state) · 49 unmodified lines | ||
| 140 | 140 | |
| 141 | 141 | state->dev = dev; |
| 142 | 142 | |
| 143 | − DRM_DEBUG_ATOMIC("Allocated atomic state %p\n", state); | |
| 143 | + drm_dbg_atomic(dev, "Allocated atomic state %p\n", state); | |
| 144 | 144 | |
| 145 | 145 | return 0; |
| 146 | 146 | fail: |
| @@ -191,7 +191,7 @@ void drm_atomic_state_default_clear(struct drm_atomic_state *state) · 44 unmodified lines | ||
| 191 | 191 | struct drm_mode_config *config = &dev->mode_config; |
| 192 | 192 | int i; |
| 193 | 193 | |
| 194 | − DRM_DEBUG_ATOMIC("Clearing atomic state %p\n", state); | |
| 194 | + drm_dbg_atomic(dev, "Clearing atomic state %p\n", state); | |
| 195 | 195 | |
| 196 | 196 | for (i = 0; i < state->num_connector; i++) { |
| 197 | 197 | struct drm_connector *connector = state->connectors[i].ptr; |
| @@ -301,7 +301,7 @@ void __drm_atomic_state_free(struct kref *ref) · 103 unmodified lines | ||
| 301 | 301 | |
| 302 | 302 | drm_atomic_state_clear(state); |
| 303 | 303 | |
| 304 | − DRM_DEBUG_ATOMIC("Freeing atomic state %p\n", state); | |
| 304 | + drm_dbg_atomic(state->dev, "Freeing atomic state %p\n", state); | |
| 305 | 305 | |
| 306 | 306 | if (config->funcs->atomic_state_free) { |
| 307 | 307 | config->funcs->atomic_state_free(state); |
| @@ -358,8 +358,8 @@ drm_atomic_get_crtc_state(struct drm_atomic_state *state, · 50 unmodified lines | ||
| 358 | 358 | state->crtcs[index].ptr = crtc; |
| 359 | 359 | crtc_state->state = state; |
| 360 | 360 | |
| 361 | − DRM_DEBUG_ATOMIC("Added [CRTC:%d:%s] %p state to %p\n", | |
| 362 | − crtc->base.id, crtc->name, crtc_state, state); | |
| 361 | + drm_dbg_atomic(state->dev, "Added [CRTC:%d:%s] %p state to %p\n", | |
| 362 | + crtc->base.id, crtc->name, crtc_state, state); | |
| 363 | 363 | |
| 364 | 364 | return crtc_state; |
| 365 | 365 | } |
| @@ -379,8 +379,9 @@ static int drm_atomic_crtc_check(const struct drm_crtc_state *old_crtc_state, · 13 unmodified lines | ||
| 379 | 379 | */ |
| 380 | 380 | |
| 381 | 381 | if (new_crtc_state->active && !new_crtc_state->enable) { |
| 382 | − DRM_DEBUG_ATOMIC("[CRTC:%d:%s] active without enabled\n", | |
| 383 | − crtc->base.id, crtc->name); | |
| 382 | + drm_dbg_atomic(crtc->dev, | |
| 383 | + "[CRTC:%d:%s] active without enabled\n", | |
| 384 | + crtc->base.id, crtc->name); | |
| 384 | 385 | return -EINVAL; |
| 385 | 386 | } |
| 386 | 387 | |
| @@ -390,15 +391,17 @@ static int drm_atomic_crtc_check(const struct drm_crtc_state *old_crtc_state, · 3 unmodified lines | ||
| 390 | 391 | */ |
| 391 | 392 | if (drm_core_check_feature(crtc->dev, DRIVER_ATOMIC) && |
| 392 | 393 | WARN_ON(new_crtc_state->enable && !new_crtc_state->mode_blob)) { |
| 393 | − DRM_DEBUG_ATOMIC("[CRTC:%d:%s] enabled without mode blob\n", | |
| 394 | − crtc->base.id, crtc->name); | |
| 394 | + drm_dbg_atomic(crtc->dev, | |
| 395 | + "[CRTC:%d:%s] enabled without mode blob\n", | |
| 396 | + crtc->base.id, crtc->name); | |
| 395 | 397 | return -EINVAL; |
| 396 | 398 | } |
| 397 | 399 | |
| 398 | 400 | if (drm_core_check_feature(crtc->dev, DRIVER_ATOMIC) && |
| 399 | 401 | WARN_ON(!new_crtc_state->enable && new_crtc_state->mode_blob)) { |
| 400 | − DRM_DEBUG_ATOMIC("[CRTC:%d:%s] disabled with mode blob\n", | |
| 401 | − crtc->base.id, crtc->name); | |
| 402 | + drm_dbg_atomic(crtc->dev, | |
| 403 | + "[CRTC:%d:%s] disabled with mode blob\n", | |
| 404 | + crtc->base.id, crtc->name); | |
| 402 | 405 | return -EINVAL; |
| 403 | 406 | } |
| 404 | 407 | |
| @@ -414,8 +417,9 @@ static int drm_atomic_crtc_check(const struct drm_crtc_state *old_crtc_state, · 9 unmodified lines | ||
| 414 | 417 | */ |
| 415 | 418 | if (new_crtc_state->event && |
| 416 | 419 | !new_crtc_state->active && !old_crtc_state->active) { |
| 417 | − DRM_DEBUG_ATOMIC("[CRTC:%d:%s] requesting event but off\n", | |
| 418 | − crtc->base.id, crtc->name); | |
| 420 | + drm_dbg_atomic(crtc->dev, | |
| 421 | + "[CRTC:%d:%s] requesting event but off\n", | |
| 422 | + crtc->base.id, crtc->name); | |
| 419 | 423 | return -EINVAL; |
| 420 | 424 | } |
| 421 | 425 | |
| @@ -460,8 +464,9 @@ static int drm_atomic_connector_check(struct drm_connector *connector, · 38 unmodified lines | ||
| 460 | 464 | return 0; |
| 461 | 465 | |
| 462 | 466 | if (writeback_job->fb && !state->crtc) { |
| 463 | − DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] framebuffer without CRTC\n", | |
| 464 | − connector->base.id, connector->name); | |
| 467 | + drm_dbg_atomic(connector->dev, | |
| 468 | + "[CONNECTOR:%d:%s] framebuffer without CRTC\n", | |
| 469 | + connector->base.id, connector->name); | |
| 465 | 470 | return -EINVAL; |
| 466 | 471 | } |
| 467 | 472 | |
| @@ -470,16 +475,18 @@ static int drm_atomic_connector_check(struct drm_connector *connector, · 2 unmodified lines | ||
| 470 | 475 | state->crtc); |
| 471 | 476 | |
| 472 | 477 | if (writeback_job->fb && !crtc_state->active) { |
| 473 | − DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] has framebuffer, but [CRTC:%d] is off\n", | |
| 474 | − connector->base.id, connector->name, | |
| 475 | − state->crtc->base.id); | |
| 478 | + drm_dbg_atomic(connector->dev, | |
| 479 | + "[CONNECTOR:%d:%s] has framebuffer, but [CRTC:%d] is off\n", | |
| 480 | + connector->base.id, connector->name, | |
| 481 | + state->crtc->base.id); | |
| 476 | 482 | return -EINVAL; |
| 477 | 483 | } |
| 478 | 484 | |
| 479 | 485 | if (!writeback_job->fb) { |
| 480 | 486 | if (writeback_job->out_fence) { |
| 481 | − DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] requesting out-fence without framebuffer\n", | |
| 482 | − connector->base.id, connector->name); | |
| 487 | + drm_dbg_atomic(connector->dev, | |
| 488 | + "[CONNECTOR:%d:%s] requesting out-fence without framebuffer\n", | |
| 489 | + connector->base.id, connector->name); | |
| 483 | 490 | return -EINVAL; |
| 484 | 491 | } |
| 485 | 492 | |
| @@ -537,8 +544,8 @@ drm_atomic_get_plane_state(struct drm_atomic_state *state, · 51 unmodified lines | ||
| 537 | 544 | state->planes[index].new_state = plane_state; |
| 538 | 545 | plane_state->state = state; |
| 539 | 546 | |
| 540 | − DRM_DEBUG_ATOMIC("Added [PLANE:%d:%s] %p state to %p\n", | |
| 541 | − plane->base.id, plane->name, plane_state, state); | |
| 547 | + drm_dbg_atomic(plane->dev, "Added [PLANE:%d:%s] %p state to %p\n", | |
| 548 | + plane->base.id, plane->name, plane_state, state); | |
| 542 | 549 | |
| 543 | 550 | if (plane_state->crtc) { |
| 544 | 551 | struct drm_crtc_state *crtc_state; |
| @@ -594,12 +601,12 @@ static int drm_atomic_plane_check(const struct drm_plane_state *old_plane_state, · 49 unmodified lines | ||
| 594 | 601 | |
| 595 | 602 | /* either *both* CRTC and FB must be set, or neither */ |
| 596 | 603 | if (crtc && !fb) { |
| 597 | − DRM_DEBUG_ATOMIC("[PLANE:%d:%s] CRTC set but no FB\n", | |
| 598 | − plane->base.id, plane->name); | |
| 604 | + drm_dbg_atomic(plane->dev, "[PLANE:%d:%s] CRTC set but no FB\n", | |
| 605 | + plane->base.id, plane->name); | |
| 599 | 606 | return -EINVAL; |
| 600 | 607 | } else if (fb && !crtc) { |
| 601 | − DRM_DEBUG_ATOMIC("[PLANE:%d:%s] FB set but no CRTC\n", | |
| 602 | − plane->base.id, plane->name); | |
| 608 | + drm_dbg_atomic(plane->dev, "[PLANE:%d:%s] FB set but no CRTC\n", | |
| 609 | + plane->base.id, plane->name); | |
| 603 | 610 | return -EINVAL; |
| 604 | 611 | } |
| 605 | 612 | |
| @@ -609,9 +616,10 @@ static int drm_atomic_plane_check(const struct drm_plane_state *old_plane_state, · 3 unmodified lines | ||
| 609 | 616 | |
| 610 | 617 | /* Check whether this plane is usable on this CRTC */ |
| 611 | 618 | if (!(plane->possible_crtcs & drm_crtc_mask(crtc))) { |
| 612 | − DRM_DEBUG_ATOMIC("Invalid [CRTC:%d:%s] for [PLANE:%d:%s]\n", | |
| 613 | − crtc->base.id, crtc->name, | |
| 614 | − plane->base.id, plane->name); | |
| 619 | + drm_dbg_atomic(plane->dev, | |
| 620 | + "Invalid [CRTC:%d:%s] for [PLANE:%d:%s]\n", | |
| 621 | + crtc->base.id, crtc->name, | |
| 622 | + plane->base.id, plane->name); | |
| 615 | 623 | return -EINVAL; |
| 616 | 624 | } |
| 617 | 625 | |
| @@ -619,9 +627,10 @@ static int drm_atomic_plane_check(const struct drm_plane_state *old_plane_state, · 1 unmodified line | ||
| 619 | 627 | ret = drm_plane_check_pixel_format(plane, fb->format->format, |
| 620 | 628 | fb->modifier); |
| 621 | 629 | if (ret) { |
| 622 | − DRM_DEBUG_ATOMIC("[PLANE:%d:%s] invalid pixel format %p4cc, modifier 0x%llx\n", | |
| 623 | − plane->base.id, plane->name, | |
| 624 | − &fb->format->format, fb->modifier); | |
| 630 | + drm_dbg_atomic(plane->dev, | |
| 631 | + "[PLANE:%d:%s] invalid pixel format %p4cc, modifier 0x%llx\n", | |
| 632 | + plane->base.id, plane->name, | |
| 633 | + &fb->format->format, fb->modifier); | |
| 625 | 634 | return ret; |
| 626 | 635 | } |
| 627 | 636 | |
| @@ -630,10 +639,11 @@ static int drm_atomic_plane_check(const struct drm_plane_state *old_plane_state, · 2 unmodified lines | ||
| 630 | 639 | new_plane_state->crtc_x > INT_MAX - (int32_t) new_plane_state->crtc_w || |
| 631 | 640 | new_plane_state->crtc_h > INT_MAX || |
| 632 | 641 | new_plane_state->crtc_y > INT_MAX - (int32_t) new_plane_state->crtc_h) { |
| 633 | − DRM_DEBUG_ATOMIC("[PLANE:%d:%s] invalid CRTC coordinates %ux%u+%d+%d\n", | |
| 634 | − plane->base.id, plane->name, | |
| 635 | − new_plane_state->crtc_w, new_plane_state->crtc_h, | |
| 636 | − new_plane_state->crtc_x, new_plane_state->crtc_y); | |
| 642 | + drm_dbg_atomic(plane->dev, | |
| 643 | + "[PLANE:%d:%s] invalid CRTC coordinates %ux%u+%d+%d\n", | |
| 644 | + plane->base.id, plane->name, | |
| 645 | + new_plane_state->crtc_w, new_plane_state->crtc_h, | |
| 646 | + new_plane_state->crtc_x, new_plane_state->crtc_y); | |
| 637 | 647 | return -ERANGE; |
| 638 | 648 | } |
| 639 | 649 | |
| @@ -645,18 +655,19 @@ static int drm_atomic_plane_check(const struct drm_plane_state *old_plane_state, · 5 unmodified lines | ||
| 645 | 655 | new_plane_state->src_x > fb_width - new_plane_state->src_w || |
| 646 | 656 | new_plane_state->src_h > fb_height || |
| 647 | 657 | new_plane_state->src_y > fb_height - new_plane_state->src_h) { |
| 648 | − DRM_DEBUG_ATOMIC("[PLANE:%d:%s] invalid source coordinates " | |
| 649 | − "%u.%06ux%u.%06u+%u.%06u+%u.%06u (fb %ux%u)\n", | |
| 650 | − plane->base.id, plane->name, | |
| 651 | − new_plane_state->src_w >> 16, | |
| 652 | − ((new_plane_state->src_w & 0xffff) * 15625) >> 10, | |
| 653 | − new_plane_state->src_h >> 16, | |
| 654 | − ((new_plane_state->src_h & 0xffff) * 15625) >> 10, | |
| 655 | − new_plane_state->src_x >> 16, | |
| 656 | − ((new_plane_state->src_x & 0xffff) * 15625) >> 10, | |
| 657 | − new_plane_state->src_y >> 16, | |
| 658 | − ((new_plane_state->src_y & 0xffff) * 15625) >> 10, | |
| 659 | − fb->width, fb->height); | |
| 658 | + drm_dbg_atomic(plane->dev, | |
| 659 | + "[PLANE:%d:%s] invalid source coordinates " | |
| 660 | + "%u.%06ux%u.%06u+%u.%06u+%u.%06u (fb %ux%u)\n", | |
| 661 | + plane->base.id, plane->name, | |
| 662 | + new_plane_state->src_w >> 16, | |
| 663 | + ((new_plane_state->src_w & 0xffff) * 15625) >> 10, | |
| 664 | + new_plane_state->src_h >> 16, | |
| 665 | + ((new_plane_state->src_h & 0xffff) * 15625) >> 10, | |
| 666 | + new_plane_state->src_x >> 16, | |
| 667 | + ((new_plane_state->src_x & 0xffff) * 15625) >> 10, | |
| 668 | + new_plane_state->src_y >> 16, | |
| 669 | + ((new_plane_state->src_y & 0xffff) * 15625) >> 10, | |
| 670 | + fb->width, fb->height); | |
| 660 | 671 | return -ENOSPC; |
| 661 | 672 | } |
| 662 | 673 | |
| @@ -671,9 +682,10 @@ static int drm_atomic_plane_check(const struct drm_plane_state *old_plane_state, · 8 unmodified lines | ||
| 671 | 682 | clips->y1 < 0 || |
| 672 | 683 | clips->x2 > fb_width || |
| 673 | 684 | clips->y2 > fb_height) { |
| 674 | − DRM_DEBUG_ATOMIC("[PLANE:%d:%s] invalid damage clip %d %d %d %d\n", | |
| 675 | − plane->base.id, plane->name, clips->x1, | |
| 676 | − clips->y1, clips->x2, clips->y2); | |
| 685 | + drm_dbg_atomic(plane->dev, | |
| 686 | + "[PLANE:%d:%s] invalid damage clip %d %d %d %d\n", | |
| 687 | + plane->base.id, plane->name, clips->x1, | |
| 688 | + clips->y1, clips->x2, clips->y2); | |
| 677 | 689 | return -EINVAL; |
| 678 | 690 | } |
| 679 | 691 | clips++; |
| @@ -681,8 +693,9 @@ static int drm_atomic_plane_check(const struct drm_plane_state *old_plane_state, · 1 unmodified line | ||
| 681 | 693 | } |
| 682 | 694 | |
| 683 | 695 | if (plane_switching_crtc(old_plane_state, new_plane_state)) { |
| 684 | − DRM_DEBUG_ATOMIC("[PLANE:%d:%s] switching CRTC directly\n", | |
| 685 | − plane->base.id, plane->name); | |
| 696 | + drm_dbg_atomic(plane->dev, | |
| 697 | + "[PLANE:%d:%s] switching CRTC directly\n", | |
| 698 | + plane->base.id, plane->name); | |
| 686 | 699 | return -EINVAL; |
| 687 | 700 | } |
| 688 | 701 | |
| @@ -846,8 +859,9 @@ drm_atomic_get_private_obj_state(struct drm_atomic_state *state, · 157 unmodified lines | ||
| 846 | 859 | |
| 847 | 860 | state->num_private_objs = num_objs; |
| 848 | 861 | |
| 849 | − DRM_DEBUG_ATOMIC("Added new private object %p state %p to %p\n", | |
| 850 | − obj, obj_state, state); | |
| 862 | + drm_dbg_atomic(state->dev, | |
| 863 | + "Added new private object %p state %p to %p\n", | |
| 864 | + obj, obj_state, state); | |
| 851 | 865 | |
| 852 | 866 | return obj_state; |
| 853 | 867 | } |
| @@ -1027,7 +1041,7 @@ drm_atomic_get_connector_state(struct drm_atomic_state *state, · 173 unmodified lines | ||
| 1027 | 1041 | state->connectors[index].ptr = connector; |
| 1028 | 1042 | connector_state->state = state; |
| 1029 | 1043 | |
| 1030 | − DRM_DEBUG_ATOMIC("Added [CONNECTOR:%d:%s] %p state to %p\n", | |
| 1044 | + drm_dbg_atomic(connector->dev, "Added [CONNECTOR:%d:%s] %p state to %p\n", | |
| 1031 | 1045 | connector->base.id, connector->name, |
| 1032 | 1046 | connector_state, state); |
| 1033 | 1047 | |
| @@ -1160,8 +1174,9 @@ drm_atomic_add_encoder_bridges(struct drm_atomic_state *state, · 126 unmodified lines | ||
| 1160 | 1174 | if (!encoder) |
| 1161 | 1175 | return 0; |
| 1162 | 1176 | |
| 1163 | − DRM_DEBUG_ATOMIC("Adding all bridges for [encoder:%d:%s] to %p\n", | |
| 1164 | − encoder->base.id, encoder->name, state); | |
| 1177 | + drm_dbg_atomic(encoder->dev, | |
| 1178 | + "Adding all bridges for [encoder:%d:%s] to %p\n", | |
| 1179 | + encoder->base.id, encoder->name, state); | |
| 1165 | 1180 | |
| 1166 | 1181 | drm_for_each_bridge_in_chain(encoder, bridge) { |
| 1167 | 1182 | /* Skip bridges that don't implement the atomic state hooks. */ |
| @@ -1213,8 +1228,9 @@ drm_atomic_add_affected_connectors(struct drm_atomic_state *state, · 45 unmodified lines | ||
| 1213 | 1228 | if (ret) |
| 1214 | 1229 | return ret; |
| 1215 | 1230 | |
| 1216 | − DRM_DEBUG_ATOMIC("Adding all current connectors for [CRTC:%d:%s] to %p\n", | |
| 1217 | − crtc->base.id, crtc->name, state); | |
| 1231 | + drm_dbg_atomic(crtc->dev, | |
| 1232 | + "Adding all current connectors for [CRTC:%d:%s] to %p\n", | |
| 1233 | + crtc->base.id, crtc->name, state); | |
| 1218 | 1234 | |
| 1219 | 1235 | /* |
| 1220 | 1236 | * Changed connectors are already in @state, so only need to look |
| @@ -1267,8 +1283,9 @@ drm_atomic_add_affected_planes(struct drm_atomic_state *state, · 46 unmodified lines | ||
| 1267 | 1283 | |
| 1268 | 1284 | WARN_ON(!drm_atomic_get_new_crtc_state(state, crtc)); |
| 1269 | 1285 | |
| 1270 | − DRM_DEBUG_ATOMIC("Adding all current planes for [CRTC:%d:%s] to %p\n", | |
| 1271 | − crtc->base.id, crtc->name, state); | |
| 1286 | + drm_dbg_atomic(crtc->dev, | |
| 1287 | + "Adding all current planes for [CRTC:%d:%s] to %p\n", | |
| 1288 | + crtc->base.id, crtc->name, state); | |
| 1272 | 1289 | |
| 1273 | 1290 | drm_for_each_plane_mask(plane, state->dev, old_crtc_state->plane_mask) { |
| 1274 | 1291 | struct drm_plane_state *plane_state = |
| @@ -1308,7 +1325,7 @@ int drm_atomic_check_only(struct drm_atomic_state *state) · 33 unmodified lines | ||
| 1308 | 1325 | unsigned int affected_crtc = 0; |
| 1309 | 1326 | int i, ret = 0; |
| 1310 | 1327 | |
| 1311 | − DRM_DEBUG_ATOMIC("checking %p\n", state); | |
| 1328 | + drm_dbg_atomic(dev, "checking %p\n", state); | |
| 1312 | 1329 | |
| 1313 | 1330 | for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) |
| 1314 | 1331 | requested_crtc |= drm_crtc_mask(crtc); |
| @@ -1316,8 +1333,8 @@ int drm_atomic_check_only(struct drm_atomic_state *state) · 1 unmodified line | ||
| 1316 | 1333 | for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) { |
| 1317 | 1334 | ret = drm_atomic_plane_check(old_plane_state, new_plane_state); |
| 1318 | 1335 | if (ret) { |
| 1319 | − DRM_DEBUG_ATOMIC("[PLANE:%d:%s] atomic core check failed\n", | |
| 1320 | − plane->base.id, plane->name); | |
| 1336 | + drm_dbg_atomic(dev, "[PLANE:%d:%s] atomic core check failed\n", | |
| 1337 | + plane->base.id, plane->name); | |
| 1321 | 1338 | return ret; |
| 1322 | 1339 | } |
| 1323 | 1340 | } |
| @@ -1325,8 +1342,8 @@ int drm_atomic_check_only(struct drm_atomic_state *state) · 1 unmodified line | ||
| 1325 | 1342 | for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) { |
| 1326 | 1343 | ret = drm_atomic_crtc_check(old_crtc_state, new_crtc_state); |
| 1327 | 1344 | if (ret) { |
| 1328 | − DRM_DEBUG_ATOMIC("[CRTC:%d:%s] atomic core check failed\n", | |
| 1329 | − crtc->base.id, crtc->name); | |
| 1345 | + drm_dbg_atomic(dev, "[CRTC:%d:%s] atomic core check failed\n", | |
| 1346 | + crtc->base.id, crtc->name); | |
| 1330 | 1347 | return ret; |
| 1331 | 1348 | } |
| 1332 | 1349 | } |
| @@ -1334,8 +1351,8 @@ int drm_atomic_check_only(struct drm_atomic_state *state) · 1 unmodified line | ||
| 1334 | 1351 | for_each_new_connector_in_state(state, conn, conn_state, i) { |
| 1335 | 1352 | ret = drm_atomic_connector_check(conn, conn_state); |
| 1336 | 1353 | if (ret) { |
| 1337 | − DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] atomic core check failed\n", | |
| 1338 | − conn->base.id, conn->name); | |
| 1354 | + drm_dbg_atomic(dev, "[CONNECTOR:%d:%s] atomic core check failed\n", | |
| 1355 | + conn->base.id, conn->name); | |
| 1339 | 1356 | return ret; |
| 1340 | 1357 | } |
| 1341 | 1358 | } |
| @@ -1344,8 +1361,8 @@ int drm_atomic_check_only(struct drm_atomic_state *state) · 2 unmodified lines | ||
| 1344 | 1361 | ret = config->funcs->atomic_check(state->dev, state); |
| 1345 | 1362 | |
| 1346 | 1363 | if (ret) { |
| 1347 | − DRM_DEBUG_ATOMIC("atomic driver check for %p failed: %d\n", | |
| 1348 | − state, ret); | |
| 1364 | + drm_dbg_atomic(dev, "atomic driver check for %p failed: %d\n", | |
| 1365 | + state, ret); | |
| 1349 | 1366 | return ret; |
| 1350 | 1367 | } |
| 1351 | 1368 | } |
| @@ -1353,8 +1370,8 @@ int drm_atomic_check_only(struct drm_atomic_state *state) · 1 unmodified line | ||
| 1353 | 1370 | if (!state->allow_modeset) { |
| 1354 | 1371 | for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) { |
| 1355 | 1372 | if (drm_atomic_crtc_needs_modeset(new_crtc_state)) { |
| 1356 | − DRM_DEBUG_ATOMIC("[CRTC:%d:%s] requires full modeset\n", | |
| 1357 | − crtc->base.id, crtc->name); | |
| 1373 | + drm_dbg_atomic(dev, "[CRTC:%d:%s] requires full modeset\n", | |
| 1374 | + crtc->base.id, crtc->name); | |
| 1358 | 1375 | return -EINVAL; |
| 1359 | 1376 | } |
| 1360 | 1377 | } |
| @@ -1374,8 +1391,9 @@ int drm_atomic_check_only(struct drm_atomic_state *state) · 13 unmodified lines | ||
| 1374 | 1391 | * so compositors know what's going on. |
| 1375 | 1392 | */ |
| 1376 | 1393 | if (affected_crtc != requested_crtc) { |
| 1377 | − DRM_DEBUG_ATOMIC("driver added CRTC to commit: requested 0x%x, affected 0x%0x\n", | |
| 1378 | − requested_crtc, affected_crtc); | |
| 1394 | + drm_dbg_atomic(dev, | |
| 1395 | + "driver added CRTC to commit: requested 0x%x, affected 0x%0x\n", | |
| 1396 | + requested_crtc, affected_crtc); | |
| 1379 | 1397 | WARN(!state->allow_modeset, "adding CRTC not allowed without modesets: requested 0x%x, affected 0x%0x\n", |
| 1380 | 1398 | requested_crtc, affected_crtc); |
| 1381 | 1399 | } |
| @@ -1407,7 +1425,7 @@ int drm_atomic_commit(struct drm_atomic_state *state) · 25 unmodified lines | ||
| 1407 | 1425 | if (ret) |
| 1408 | 1426 | return ret; |
| 1409 | 1427 | |
| 1410 | − DRM_DEBUG_ATOMIC("committing %p\n", state); | |
| 1428 | + drm_dbg_atomic(state->dev, "committing %p\n", state); | |
| 1411 | 1429 | |
| 1412 | 1430 | return config->funcs->atomic_commit(state->dev, state, false); |
| 1413 | 1431 | } |
| @@ -1436,7 +1454,7 @@ int drm_atomic_nonblocking_commit(struct drm_atomic_state *state) · 22 unmodified lines | ||
| 1436 | 1454 | if (ret) |
| 1437 | 1455 | return ret; |
| 1438 | 1456 | |
| 1439 | − DRM_DEBUG_ATOMIC("committing %p nonblocking\n", state); | |
| 1457 | + drm_dbg_atomic(state->dev, "committing %p nonblocking\n", state); | |
| 1440 | 1458 | |
| 1441 | 1459 | return config->funcs->atomic_commit(state->dev, state, true); |
| 1442 | 1460 | } |
| @@ -1633,11 +1651,11 @@ void drm_atomic_print_new_state(const struct drm_atomic_state *state, · 190 unmodified lines | ||
| 1633 | 1651 | int i; |
| 1634 | 1652 | |
| 1635 | 1653 | if (!p) { |
| 1636 | − DRM_ERROR("invalid drm printer\n"); | |
| 1654 | + drm_err(state->dev, "invalid drm printer\n"); | |
| 1637 | 1655 | return; |
| 1638 | 1656 | } |
| 1639 | 1657 | |
| 1640 | − DRM_DEBUG_ATOMIC("checking %p\n", state); | |
| 1658 | + drm_dbg_atomic(state->dev, "checking %p\n", state); | |
| 1641 | 1659 | |
| 1642 | 1660 | for_each_new_plane_in_state(state, plane, plane_state, i) |
| 1643 | 1661 | drm_atomic_plane_print_state(p, plane_state); |
| @@ -132,9 +132,10 @@ static int handle_conflicting_encoders(struct drm_atomic_state *state, · 131 unmodified lines | ||
| 132 | 132 | |
| 133 | 133 | if (new_encoder) { |
| 134 | 134 | if (encoder_mask & drm_encoder_mask(new_encoder)) { |
| 135 | − DRM_DEBUG_ATOMIC("[ENCODER:%d:%s] on [CONNECTOR:%d:%s] already assigned\n", | |
| 136 | − new_encoder->base.id, new_encoder->name, | |
| 137 | − connector->base.id, connector->name); | |
| 135 | + drm_dbg_atomic(connector->dev, | |
| 136 | + "[ENCODER:%d:%s] on [CONNECTOR:%d:%s] already assigned\n", | |
| 137 | + new_encoder->base.id, new_encoder->name, | |
| 138 | + connector->base.id, connector->name); | |
| 138 | 139 | |
| 139 | 140 | return -EINVAL; |
| 140 | 141 | } |
| @@ -169,11 +170,12 @@ static int handle_conflicting_encoders(struct drm_atomic_state *state, · 28 unmodified lines | ||
| 169 | 170 | continue; |
| 170 | 171 | |
| 171 | 172 | if (!disable_conflicting_encoders) { |
| 172 | − DRM_DEBUG_ATOMIC("[ENCODER:%d:%s] in use on [CRTC:%d:%s] by [CONNECTOR:%d:%s]\n", | |
| 173 | − encoder->base.id, encoder->name, | |
| 174 | − connector->state->crtc->base.id, | |
| 175 | − connector->state->crtc->name, | |
| 176 | − connector->base.id, connector->name); | |
| 173 | + drm_dbg_atomic(connector->dev, | |
| 174 | + "[ENCODER:%d:%s] in use on [CRTC:%d:%s] by [CONNECTOR:%d:%s]\n", | |
| 175 | + encoder->base.id, encoder->name, | |
| 176 | + connector->state->crtc->base.id, | |
| 177 | + connector->state->crtc->name, | |
| 178 | + connector->base.id, connector->name); | |
| 177 | 179 | ret = -EINVAL; |
| 178 | 180 | goto out; |
| 179 | 181 | } |
| @@ -184,10 +186,11 @@ static int handle_conflicting_encoders(struct drm_atomic_state *state, · 4 unmodified lines | ||
| 184 | 186 | goto out; |
| 185 | 187 | } |
| 186 | 188 | |
| 187 | − DRM_DEBUG_ATOMIC("[ENCODER:%d:%s] in use on [CRTC:%d:%s], disabling [CONNECTOR:%d:%s]\n", | |
| 188 | − encoder->base.id, encoder->name, | |
| 189 | − new_conn_state->crtc->base.id, new_conn_state->crtc->name, | |
| 190 | − connector->base.id, connector->name); | |
| 189 | + drm_dbg_atomic(connector->dev, | |
| 190 | + "[ENCODER:%d:%s] in use on [CRTC:%d:%s], disabling [CONNECTOR:%d:%s]\n", | |
| 191 | + encoder->base.id, encoder->name, | |
| 192 | + new_conn_state->crtc->base.id, new_conn_state->crtc->name, | |
| 193 | + connector->base.id, connector->name); | |
| 191 | 194 | |
| 192 | 195 | crtc_state = drm_atomic_get_new_crtc_state(state, new_conn_state->crtc); |
| 193 | 196 | |
| @@ -268,9 +271,10 @@ steal_encoder(struct drm_atomic_state *state, · 74 unmodified lines | ||
| 268 | 271 | |
| 269 | 272 | encoder_crtc = old_connector_state->crtc; |
| 270 | 273 | |
| 271 | − DRM_DEBUG_ATOMIC("[ENCODER:%d:%s] in use on [CRTC:%d:%s], stealing it\n", | |
| 272 | − encoder->base.id, encoder->name, | |
| 273 | − encoder_crtc->base.id, encoder_crtc->name); | |
| 274 | + drm_dbg_atomic(encoder->dev, | |
| 275 | + "[ENCODER:%d:%s] in use on [CRTC:%d:%s], stealing it\n", | |
| 276 | + encoder->base.id, encoder->name, | |
| 277 | + encoder_crtc->base.id, encoder_crtc->name); | |
| 274 | 278 | |
| 275 | 279 | set_best_encoder(state, new_connector_state, NULL); |
| 276 | 280 | |
| @@ -291,9 +295,8 @@ update_connector_routing(struct drm_atomic_state *state, · 14 unmodified lines | ||
| 291 | 295 | struct drm_encoder *new_encoder; |
| 292 | 296 | struct drm_crtc_state *crtc_state; |
| 293 | 297 | |
| 294 | − DRM_DEBUG_ATOMIC("Updating routing for [CONNECTOR:%d:%s]\n", | |
| 295 | − connector->base.id, | |
| 296 | − connector->name); | |
| 298 | + drm_dbg_atomic(connector->dev, "Updating routing for [CONNECTOR:%d:%s]\n", | |
| 299 | + connector->base.id, connector->name); | |
| 297 | 300 | |
| 298 | 301 | if (old_connector_state->crtc != new_connector_state->crtc) { |
| 299 | 302 | if (old_connector_state->crtc) { |
| @@ -308,9 +311,8 @@ update_connector_routing(struct drm_atomic_state *state, · 8 unmodified lines | ||
| 308 | 311 | } |
| 309 | 312 | |
| 310 | 313 | if (!new_connector_state->crtc) { |
| 311 | − DRM_DEBUG_ATOMIC("Disabling [CONNECTOR:%d:%s]\n", | |
| 312 | − connector->base.id, | |
| 313 | − connector->name); | |
| 314 | + drm_dbg_atomic(connector->dev, "Disabling [CONNECTOR:%d:%s]\n", | |
| 315 | + connector->base.id, connector->name); | |
| 314 | 316 | |
| 315 | 317 | set_best_encoder(state, new_connector_state, NULL); |
| 316 | 318 | |
| @@ -339,8 +341,9 @@ update_connector_routing(struct drm_atomic_state *state, · 22 unmodified lines | ||
| 339 | 341 | */ |
| 340 | 342 | if (!state->duplicated && drm_connector_is_unregistered(connector) && |
| 341 | 343 | crtc_state->active) { |
| 342 | − DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] is not registered\n", | |
| 343 | − connector->base.id, connector->name); | |
| 344 | + drm_dbg_atomic(connector->dev, | |
| 345 | + "[CONNECTOR:%d:%s] is not registered\n", | |
| 346 | + connector->base.id, connector->name); | |
| 344 | 347 | return -EINVAL; |
| 345 | 348 | } |
| 346 | 349 | |
| @@ -354,31 +357,33 @@ update_connector_routing(struct drm_atomic_state *state, · 7 unmodified lines | ||
| 354 | 357 | new_encoder = drm_connector_get_single_encoder(connector); |
| 355 | 358 | |
| 356 | 359 | if (!new_encoder) { |
| 357 | − DRM_DEBUG_ATOMIC("No suitable encoder found for [CONNECTOR:%d:%s]\n", | |
| 358 | − connector->base.id, | |
| 359 | − connector->name); | |
| 360 | + drm_dbg_atomic(connector->dev, | |
| 361 | + "No suitable encoder found for [CONNECTOR:%d:%s]\n", | |
| 362 | + connector->base.id, connector->name); | |
| 360 | 363 | return -EINVAL; |
| 361 | 364 | } |
| 362 | 365 | |
| 363 | 366 | if (!drm_encoder_crtc_ok(new_encoder, new_connector_state->crtc)) { |
| 364 | − DRM_DEBUG_ATOMIC("[ENCODER:%d:%s] incompatible with [CRTC:%d:%s]\n", | |
| 365 | − new_encoder->base.id, | |
| 366 | − new_encoder->name, | |
| 367 | − new_connector_state->crtc->base.id, | |
| 368 | − new_connector_state->crtc->name); | |
| 367 | + drm_dbg_atomic(connector->dev, | |
| 368 | + "[ENCODER:%d:%s] incompatible with [CRTC:%d:%s]\n", | |
| 369 | + new_encoder->base.id, | |
| 370 | + new_encoder->name, | |
| 371 | + new_connector_state->crtc->base.id, | |
| 372 | + new_connector_state->crtc->name); | |
| 369 | 373 | return -EINVAL; |
| 370 | 374 | } |
| 371 | 375 | |
| 372 | 376 | if (new_encoder == new_connector_state->best_encoder) { |
| 373 | 377 | set_best_encoder(state, new_connector_state, new_encoder); |
| 374 | 378 | |
| 375 | − DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] keeps [ENCODER:%d:%s], now on [CRTC:%d:%s]\n", | |
| 376 | − connector->base.id, | |
| 377 | − connector->name, | |
| 378 | − new_encoder->base.id, | |
| 379 | − new_encoder->name, | |
| 380 | − new_connector_state->crtc->base.id, | |
| 381 | − new_connector_state->crtc->name); | |
| 379 | + drm_dbg_atomic(connector->dev, | |
| 380 | + "[CONNECTOR:%d:%s] keeps [ENCODER:%d:%s], now on [CRTC:%d:%s]\n", | |
| 381 | + connector->base.id, | |
| 382 | + connector->name, | |
| 383 | + new_encoder->base.id, | |
| 384 | + new_encoder->name, | |
| 385 | + new_connector_state->crtc->base.id, | |
| 386 | + new_connector_state->crtc->name); | |
| 382 | 387 | |
| 383 | 388 | return 0; |
| 384 | 389 | } |
| @@ -389,13 +394,14 @@ update_connector_routing(struct drm_atomic_state *state, · 4 unmodified lines | ||
| 389 | 394 | |
| 390 | 395 | crtc_state->connectors_changed = true; |
| 391 | 396 | |
| 392 | − DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] using [ENCODER:%d:%s] on [CRTC:%d:%s]\n", | |
| 393 | − connector->base.id, | |
| 394 | − connector->name, | |
| 395 | − new_encoder->base.id, | |
| 396 | − new_encoder->name, | |
| 397 | − new_connector_state->crtc->base.id, | |
| 398 | − new_connector_state->crtc->name); | |
| 397 | + drm_dbg_atomic(connector->dev, | |
| 398 | + "[CONNECTOR:%d:%s] using [ENCODER:%d:%s] on [CRTC:%d:%s]\n", | |
| 399 | + connector->base.id, | |
| 400 | + connector->name, | |
| 401 | + new_encoder->base.id, | |
| 402 | + new_encoder->name, | |
| 403 | + new_connector_state->crtc->base.id, | |
| 404 | + new_connector_state->crtc->name); | |
| 399 | 405 | |
| 400 | 406 | return 0; |
| 401 | 407 | } |
| @@ -443,7 +449,7 @@ mode_fixup(struct drm_atomic_state *state) · 41 unmodified lines | ||
| 443 | 449 | new_crtc_state, |
| 444 | 450 | new_conn_state); |
| 445 | 451 | if (ret) { |
| 446 | − DRM_DEBUG_ATOMIC("Bridge atomic check failed\n"); | |
| 452 | + drm_dbg_atomic(encoder->dev, "Bridge atomic check failed\n"); | |
| 447 | 453 | return ret; |
| 448 | 454 | } |
| 449 | 455 | |
| @@ -451,16 +457,18 @@ mode_fixup(struct drm_atomic_state *state) · 1 unmodified line | ||
| 451 | 457 | ret = funcs->atomic_check(encoder, new_crtc_state, |
| 452 | 458 | new_conn_state); |
| 453 | 459 | if (ret) { |
| 454 | − DRM_DEBUG_ATOMIC("[ENCODER:%d:%s] check failed\n", | |
| 455 | − encoder->base.id, encoder->name); | |
| 460 | + drm_dbg_atomic(encoder->dev, | |
| 461 | + "[ENCODER:%d:%s] check failed\n", | |
| 462 | + encoder->base.id, encoder->name); | |
| 456 | 463 | return ret; |
| 457 | 464 | } |
| 458 | 465 | } else if (funcs && funcs->mode_fixup) { |
| 459 | 466 | ret = funcs->mode_fixup(encoder, &new_crtc_state->mode, |
| 460 | 467 | &new_crtc_state->adjusted_mode); |
| 461 | 468 | if (!ret) { |
| 462 | − DRM_DEBUG_ATOMIC("[ENCODER:%d:%s] fixup failed\n", | |
| 463 | − encoder->base.id, encoder->name); | |
| 469 | + drm_dbg_atomic(encoder->dev, | |
| 470 | + "[ENCODER:%d:%s] fixup failed\n", | |
| 471 | + encoder->base.id, encoder->name); | |
| 464 | 472 | return -EINVAL; |
| 465 | 473 | } |
| 466 | 474 | } |
| @@ -483,8 +491,8 @@ mode_fixup(struct drm_atomic_state *state) · 16 unmodified lines | ||
| 483 | 491 | ret = funcs->mode_fixup(crtc, &new_crtc_state->mode, |
| 484 | 492 | &new_crtc_state->adjusted_mode); |
| 485 | 493 | if (!ret) { |
| 486 | − DRM_DEBUG_ATOMIC("[CRTC:%d:%s] fixup failed\n", | |
| 487 | − crtc->base.id, crtc->name); | |
| 494 | + drm_dbg_atomic(crtc->dev, "[CRTC:%d:%s] fixup failed\n", | |
| 495 | + crtc->base.id, crtc->name); | |
| 488 | 496 | return -EINVAL; |
| 489 | 497 | } |
| 490 | 498 | } |
| @@ -502,8 +510,9 @@ static enum drm_mode_status mode_valid_path(struct drm_connector *connector, · 11 unmodified lines | ||
| 502 | 510 | |
| 503 | 511 | ret = drm_encoder_mode_valid(encoder, mode); |
| 504 | 512 | if (ret != MODE_OK) { |
| 505 | − DRM_DEBUG_ATOMIC("[ENCODER:%d:%s] mode_valid() failed\n", | |
| 506 | − encoder->base.id, encoder->name); | |
| 513 | + drm_dbg_atomic(encoder->dev, | |
| 514 | + "[ENCODER:%d:%s] mode_valid() failed\n", | |
| 515 | + encoder->base.id, encoder->name); | |
| 507 | 516 | return ret; |
| 508 | 517 | } |
| 509 | 518 | |
| @@ -511,14 +520,14 @@ static enum drm_mode_status mode_valid_path(struct drm_connector *connector, · 1 unmodified line | ||
| 511 | 520 | ret = drm_bridge_chain_mode_valid(bridge, &connector->display_info, |
| 512 | 521 | mode); |
| 513 | 522 | if (ret != MODE_OK) { |
| 514 | − DRM_DEBUG_ATOMIC("[BRIDGE] mode_valid() failed\n"); | |
| 523 | + drm_dbg_atomic(encoder->dev, "[BRIDGE] mode_valid() failed\n"); | |
| 515 | 524 | return ret; |
| 516 | 525 | } |
| 517 | 526 | |
| 518 | 527 | ret = drm_crtc_mode_valid(crtc, mode); |
| 519 | 528 | if (ret != MODE_OK) { |
| 520 | − DRM_DEBUG_ATOMIC("[CRTC:%d:%s] mode_valid() failed\n", | |
| 521 | − crtc->base.id, crtc->name); | |
| 529 | + drm_dbg_atomic(encoder->dev, "[CRTC:%d:%s] mode_valid() failed\n", | |
| 530 | + crtc->base.id, crtc->name); | |
| 522 | 531 | return ret; |
| 523 | 532 | } |
| 524 | 533 | |
| @@ -619,14 +628,14 @@ drm_atomic_helper_check_modeset(struct drm_device *dev, · 94 unmodified lines | ||
| 619 | 628 | WARN_ON(!drm_modeset_is_locked(&crtc->mutex)); |
| 620 | 629 | |
| 621 | 630 | if (!drm_mode_equal(&old_crtc_state->mode, &new_crtc_state->mode)) { |
| 622 | − DRM_DEBUG_ATOMIC("[CRTC:%d:%s] mode changed\n", | |
| 623 | − crtc->base.id, crtc->name); | |
| 631 | + drm_dbg_atomic(dev, "[CRTC:%d:%s] mode changed\n", | |
| 632 | + crtc->base.id, crtc->name); | |
| 624 | 633 | new_crtc_state->mode_changed = true; |
| 625 | 634 | } |
| 626 | 635 | |
| 627 | 636 | if (old_crtc_state->enable != new_crtc_state->enable) { |
| 628 | − DRM_DEBUG_ATOMIC("[CRTC:%d:%s] enable changed\n", | |
| 629 | − crtc->base.id, crtc->name); | |
| 637 | + drm_dbg_atomic(dev, "[CRTC:%d:%s] enable changed\n", | |
| 638 | + crtc->base.id, crtc->name); | |
| 630 | 639 | |
| 631 | 640 | /* |
| 632 | 641 | * For clarity this assignment is done here, but |
| @@ -641,14 +650,14 @@ drm_atomic_helper_check_modeset(struct drm_device *dev, · 8 unmodified lines | ||
| 641 | 650 | } |
| 642 | 651 | |
| 643 | 652 | if (old_crtc_state->active != new_crtc_state->active) { |
| 644 | − DRM_DEBUG_ATOMIC("[CRTC:%d:%s] active changed\n", | |
| 645 | − crtc->base.id, crtc->name); | |
| 653 | + drm_dbg_atomic(dev, "[CRTC:%d:%s] active changed\n", | |
| 654 | + crtc->base.id, crtc->name); | |
| 646 | 655 | new_crtc_state->active_changed = true; |
| 647 | 656 | } |
| 648 | 657 | |
| 649 | 658 | if (new_crtc_state->enable != has_connectors) { |
| 650 | − DRM_DEBUG_ATOMIC("[CRTC:%d:%s] enabled/connectors mismatch\n", | |
| 651 | − crtc->base.id, crtc->name); | |
| 659 | + drm_dbg_atomic(dev, "[CRTC:%d:%s] enabled/connectors mismatch\n", | |
| 660 | + crtc->base.id, crtc->name); | |
| 652 | 661 | |
| 653 | 662 | return -EINVAL; |
| 654 | 663 | } |
| @@ -708,10 +717,11 @@ drm_atomic_helper_check_modeset(struct drm_device *dev, · 53 unmodified lines | ||
| 708 | 717 | if (!drm_atomic_crtc_needs_modeset(new_crtc_state)) |
| 709 | 718 | continue; |
| 710 | 719 | |
| 711 | − DRM_DEBUG_ATOMIC("[CRTC:%d:%s] needs all connectors, enable: %c, active: %c\n", | |
| 712 | − crtc->base.id, crtc->name, | |
| 713 | − new_crtc_state->enable ? 'y' : 'n', | |
| 714 | − new_crtc_state->active ? 'y' : 'n'); | |
| 720 | + drm_dbg_atomic(dev, | |
| 721 | + "[CRTC:%d:%s] needs all connectors, enable: %c, active: %c\n", | |
| 722 | + crtc->base.id, crtc->name, | |
| 723 | + new_crtc_state->enable ? 'y' : 'n', | |
| 724 | + new_crtc_state->active ? 'y' : 'n'); | |
| 715 | 725 | |
| 716 | 726 | ret = drm_atomic_add_affected_connectors(state, crtc); |
| 717 | 727 | if (ret != 0) |
| @@ -818,7 +828,8 @@ int drm_atomic_helper_check_plane_state(struct drm_plane_state *plane_state, · 100 unmodified lines | ||
| 818 | 828 | } |
| 819 | 829 | |
| 820 | 830 | if (!crtc_state->enable && !can_update_disabled) { |
| 821 | − DRM_DEBUG_KMS("Cannot update plane of a disabled CRTC.\n"); | |
| 831 | + drm_dbg_kms(plane_state->crtc->dev, | |
| 832 | + "Cannot update plane of a disabled CRTC.\n"); | |
| 822 | 833 | return -EINVAL; |
| 823 | 834 | } |
| 824 | 835 | |
| @@ -828,7 +839,8 @@ int drm_atomic_helper_check_plane_state(struct drm_plane_state *plane_state, · 3 unmodified lines | ||
| 828 | 839 | hscale = drm_rect_calc_hscale(src, dst, min_scale, max_scale); |
| 829 | 840 | vscale = drm_rect_calc_vscale(src, dst, min_scale, max_scale); |
| 830 | 841 | if (hscale < 0 || vscale < 0) { |
| 831 | − DRM_DEBUG_KMS("Invalid scaling of plane\n"); | |
| 842 | + drm_dbg_kms(plane_state->crtc->dev, | |
| 843 | + "Invalid scaling of plane\n"); | |
| 832 | 844 | drm_rect_debug_print("src: ", &plane_state->src, true); |
| 833 | 845 | drm_rect_debug_print("dst: ", &plane_state->dst, false); |
| 834 | 846 | return -ERANGE; |
| @@ -852,7 +864,8 @@ int drm_atomic_helper_check_plane_state(struct drm_plane_state *plane_state, · 17 unmodified lines | ||
| 852 | 864 | return 0; |
| 853 | 865 | |
| 854 | 866 | if (!can_position && !drm_rect_equals(dst, &clip)) { |
| 855 | − DRM_DEBUG_KMS("Plane must cover entire CRTC\n"); | |
| 867 | + drm_dbg_kms(plane_state->crtc->dev, | |
| 868 | + "Plane must cover entire CRTC\n"); | |
| 856 | 869 | drm_rect_debug_print("dst: ", dst, false); |
| 857 | 870 | drm_rect_debug_print("clip: ", &clip, false); |
| 858 | 871 | return -EINVAL; |
| @@ -904,8 +917,9 @@ drm_atomic_helper_check_planes(struct drm_device *dev, · 45 unmodified lines | ||
| 904 | 917 | |
| 905 | 918 | ret = funcs->atomic_check(plane, state); |
| 906 | 919 | if (ret) { |
| 907 | − DRM_DEBUG_ATOMIC("[PLANE:%d:%s] atomic driver check failed\n", | |
| 908 | − plane->base.id, plane->name); | |
| 920 | + drm_dbg_atomic(plane->dev, | |
| 921 | + "[PLANE:%d:%s] atomic driver check failed\n", | |
| 922 | + plane->base.id, plane->name); | |
| 909 | 923 | return ret; |
| 910 | 924 | } |
| 911 | 925 | } |
| @@ -920,8 +934,9 @@ drm_atomic_helper_check_planes(struct drm_device *dev, · 8 unmodified lines | ||
| 920 | 934 | |
| 921 | 935 | ret = funcs->atomic_check(crtc, state); |
| 922 | 936 | if (ret) { |
| 923 | − DRM_DEBUG_ATOMIC("[CRTC:%d:%s] atomic driver check failed\n", | |
| 924 | − crtc->base.id, crtc->name); | |
| 937 | + drm_dbg_atomic(crtc->dev, | |
| 938 | + "[CRTC:%d:%s] atomic driver check failed\n", | |
| 939 | + crtc->base.id, crtc->name); | |
| 925 | 940 | return ret; |
| 926 | 941 | } |
| 927 | 942 | } |
| @@ -1049,8 +1064,8 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state) · 121 unmodified lines | ||
| 1049 | 1064 | |
| 1050 | 1065 | funcs = encoder->helper_private; |
| 1051 | 1066 | |
| 1052 | − DRM_DEBUG_ATOMIC("disabling [ENCODER:%d:%s]\n", | |
| 1053 | − encoder->base.id, encoder->name); | |
| 1067 | + drm_dbg_atomic(dev, "disabling [ENCODER:%d:%s]\n", | |
| 1068 | + encoder->base.id, encoder->name); | |
| 1054 | 1069 | |
| 1055 | 1070 | /* |
| 1056 | 1071 | * Each encoder has at most one connector (since we always steal |
| @@ -1087,8 +1102,8 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state) · 30 unmodified lines | ||
| 1087 | 1102 | |
| 1088 | 1103 | funcs = crtc->helper_private; |
| 1089 | 1104 | |
| 1090 | − DRM_DEBUG_ATOMIC("disabling [CRTC:%d:%s]\n", | |
| 1091 | − crtc->base.id, crtc->name); | |
| 1105 | + drm_dbg_atomic(dev, "disabling [CRTC:%d:%s]\n", | |
| 1106 | + crtc->base.id, crtc->name); | |
| 1092 | 1107 | |
| 1093 | 1108 | |
| 1094 | 1109 | /* Right function depends upon target state. */ |
| @@ -1229,8 +1244,8 @@ crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *old_state) · 134 unmodified lines | ||
| 1229 | 1244 | funcs = crtc->helper_private; |
| 1230 | 1245 | |
| 1231 | 1246 | if (new_crtc_state->enable && funcs->mode_set_nofb) { |
| 1232 | − DRM_DEBUG_ATOMIC("modeset on [CRTC:%d:%s]\n", | |
| 1233 | − crtc->base.id, crtc->name); | |
| 1247 | + drm_dbg_atomic(dev, "modeset on [CRTC:%d:%s]\n", | |
| 1248 | + crtc->base.id, crtc->name); | |
| 1234 | 1249 | |
| 1235 | 1250 | funcs->mode_set_nofb(crtc); |
| 1236 | 1251 | } |
| @@ -1254,8 +1269,8 @@ crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *old_state) · 17 unmodified lines | ||
| 1254 | 1269 | if (!new_crtc_state->mode_changed) |
| 1255 | 1270 | continue; |
| 1256 | 1271 | |
| 1257 | − DRM_DEBUG_ATOMIC("modeset on [ENCODER:%d:%s]\n", | |
| 1258 | − encoder->base.id, encoder->name); | |
| 1272 | + drm_dbg_atomic(dev, "modeset on [ENCODER:%d:%s]\n", | |
| 1273 | + encoder->base.id, encoder->name); | |
| 1259 | 1274 | |
| 1260 | 1275 | /* |
| 1261 | 1276 | * Each encoder has at most one connector (since we always steal |
| @@ -1357,8 +1372,8 @@ void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev, · 95 unmodified lines | ||
| 1357 | 1372 | funcs = crtc->helper_private; |
| 1358 | 1373 | |
| 1359 | 1374 | if (new_crtc_state->enable) { |
| 1360 | − DRM_DEBUG_ATOMIC("enabling [CRTC:%d:%s]\n", | |
| 1361 | − crtc->base.id, crtc->name); | |
| 1375 | + drm_dbg_atomic(dev, "enabling [CRTC:%d:%s]\n", | |
| 1376 | + crtc->base.id, crtc->name); | |
| 1362 | 1377 | if (funcs->atomic_enable) |
| 1363 | 1378 | funcs->atomic_enable(crtc, old_state); |
| 1364 | 1379 | else if (funcs->commit) |
| @@ -1381,8 +1396,8 @@ void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev, · 16 unmodified lines | ||
| 1381 | 1396 | encoder = new_conn_state->best_encoder; |
| 1382 | 1397 | funcs = encoder->helper_private; |
| 1383 | 1398 | |
| 1384 | − DRM_DEBUG_ATOMIC("enabling [ENCODER:%d:%s]\n", | |
| 1385 | − encoder->base.id, encoder->name); | |
| 1399 | + drm_dbg_atomic(dev, "enabling [ENCODER:%d:%s]\n", | |
| 1400 | + encoder->base.id, encoder->name); | |
| 1386 | 1401 | |
| 1387 | 1402 | /* |
| 1388 | 1403 | * Each encoder has at most one connector (since we always steal |
| @@ -1551,8 +1566,8 @@ void drm_atomic_helper_wait_for_flip_done(struct drm_device *dev, · 162 unmodified lines | ||
| 1551 | 1566 | |
| 1552 | 1567 | ret = wait_for_completion_timeout(&commit->flip_done, 10 * HZ); |
| 1553 | 1568 | if (ret == 0) |
| 1554 | − DRM_ERROR("[CRTC:%d:%s] flip_done timed out\n", | |
| 1555 | − crtc->base.id, crtc->name); | |
| 1569 | + drm_err(dev, "[CRTC:%d:%s] flip_done timed out\n", | |
| 1570 | + crtc->base.id, crtc->name); | |
| 1556 | 1571 | } |
| 1557 | 1572 | |
| 1558 | 1573 | if (old_state->fake_commit) |
| @@ -1739,8 +1754,9 @@ int drm_atomic_helper_async_check(struct drm_device *dev, · 180 unmodified lines | ||
| 1739 | 1754 | */ |
| 1740 | 1755 | if (old_plane_state->commit && |
| 1741 | 1756 | !try_wait_for_completion(&old_plane_state->commit->hw_done)) { |
| 1742 | − DRM_DEBUG_ATOMIC("[PLANE:%d:%s] inflight previous commit preventing async commit\n", | |
| 1743 | − plane->base.id, plane->name); | |
| 1757 | + drm_dbg_atomic(dev, | |
| 1758 | + "[PLANE:%d:%s] inflight previous commit preventing async commit\n", | |
| 1759 | + plane->base.id, plane->name); | |
| 1744 | 1760 | return -EBUSY; |
| 1745 | 1761 | } |
| 1746 | 1762 | |
| @@ -1962,8 +1978,9 @@ static int stall_checks(struct drm_crtc *crtc, bool nonblock) · 215 unmodified lines | ||
| 1962 | 1978 | */ |
| 1963 | 1979 | if (!completed && nonblock) { |
| 1964 | 1980 | spin_unlock(&crtc->commit_lock); |
| 1965 | − DRM_DEBUG_ATOMIC("[CRTC:%d:%s] busy with a previous commit\n", | |
| 1966 | − crtc->base.id, crtc->name); | |
| 1981 | + drm_dbg_atomic(crtc->dev, | |
| 1982 | + "[CRTC:%d:%s] busy with a previous commit\n", | |
| 1983 | + crtc->base.id, crtc->name); | |
| 1967 | 1984 | |
| 1968 | 1985 | return -EBUSY; |
| 1969 | 1986 | } |
| @@ -1985,8 +2002,8 @@ static int stall_checks(struct drm_crtc *crtc, bool nonblock) · 15 unmodified lines | ||
| 1985 | 2002 | ret = wait_for_completion_interruptible_timeout(&stall_commit->cleanup_done, |
| 1986 | 2003 | 10*HZ); |
| 1987 | 2004 | if (ret == 0) |
| 1988 | − DRM_ERROR("[CRTC:%d:%s] cleanup_done timed out\n", | |
| 1989 | − crtc->base.id, crtc->name); | |
| 2005 | + drm_err(crtc->dev, "[CRTC:%d:%s] cleanup_done timed out\n", | |
| 2006 | + crtc->base.id, crtc->name); | |
| 1990 | 2007 | |
| 1991 | 2008 | drm_crtc_commit_put(stall_commit); |
| 1992 | 2009 | |
| @@ -2150,8 +2167,9 @@ int drm_atomic_helper_setup_commit(struct drm_atomic_state *state, · 157 unmodified lines | ||
| 2150 | 2167 | */ |
| 2151 | 2168 | if (nonblock && old_conn_state->commit && |
| 2152 | 2169 | !try_wait_for_completion(&old_conn_state->commit->flip_done)) { |
| 2153 | − DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] busy with a previous commit\n", | |
| 2154 | − conn->base.id, conn->name); | |
| 2170 | + drm_dbg_atomic(conn->dev, | |
| 2171 | + "[CONNECTOR:%d:%s] busy with a previous commit\n", | |
| 2172 | + conn->base.id, conn->name); | |
| 2155 | 2173 | |
| 2156 | 2174 | return -EBUSY; |
| 2157 | 2175 | } |
| @@ -2171,8 +2189,9 @@ int drm_atomic_helper_setup_commit(struct drm_atomic_state *state, · 13 unmodified lines | ||
| 2171 | 2189 | */ |
| 2172 | 2190 | if (nonblock && old_plane_state->commit && |
| 2173 | 2191 | !try_wait_for_completion(&old_plane_state->commit->flip_done)) { |
| 2174 | − DRM_DEBUG_ATOMIC("[PLANE:%d:%s] busy with a previous commit\n", | |
| 2175 | − plane->base.id, plane->name); | |
| 2192 | + drm_dbg_atomic(plane->dev, | |
| 2193 | + "[PLANE:%d:%s] busy with a previous commit\n", | |
| 2194 | + plane->base.id, plane->name); | |
| 2176 | 2195 | |
| 2177 | 2196 | return -EBUSY; |
| 2178 | 2197 | } |
| @@ -2218,22 +2237,25 @@ void drm_atomic_helper_wait_for_dependencies(struct drm_atomic_state *old_state) · 39 unmodified lines | ||
| 2218 | 2237 | for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) { |
| 2219 | 2238 | ret = drm_crtc_commit_wait(old_crtc_state->commit); |
| 2220 | 2239 | if (ret) |
| 2221 | − DRM_ERROR("[CRTC:%d:%s] commit wait timed out\n", | |
| 2222 | − crtc->base.id, crtc->name); | |
| 2240 | + drm_err(crtc->dev, | |
| 2241 | + "[CRTC:%d:%s] commit wait timed out\n", | |
| 2242 | + crtc->base.id, crtc->name); | |
| 2223 | 2243 | } |
| 2224 | 2244 | |
| 2225 | 2245 | for_each_old_connector_in_state(old_state, conn, old_conn_state, i) { |
| 2226 | 2246 | ret = drm_crtc_commit_wait(old_conn_state->commit); |
| 2227 | 2247 | if (ret) |
| 2228 | − DRM_ERROR("[CONNECTOR:%d:%s] commit wait timed out\n", | |
| 2229 | − conn->base.id, conn->name); | |
| 2248 | + drm_err(conn->dev, | |
| 2249 | + "[CONNECTOR:%d:%s] commit wait timed out\n", | |
| 2250 | + conn->base.id, conn->name); | |
| 2230 | 2251 | } |
| 2231 | 2252 | |
| 2232 | 2253 | for_each_old_plane_in_state(old_state, plane, old_plane_state, i) { |
| 2233 | 2254 | ret = drm_crtc_commit_wait(old_plane_state->commit); |
| 2234 | 2255 | if (ret) |
| 2235 | − DRM_ERROR("[PLANE:%d:%s] commit wait timed out\n", | |
| 2236 | − plane->base.id, plane->name); | |
| 2256 | + drm_err(plane->dev, | |
| 2257 | + "[PLANE:%d:%s] commit wait timed out\n", | |
| 2258 | + plane->base.id, plane->name); | |
| 2237 | 2259 | } |
| 2238 | 2260 | } |
| 2239 | 2261 | EXPORT_SYMBOL(drm_atomic_helper_wait_for_dependencies); |
| @@ -3120,7 +3142,9 @@ void drm_atomic_helper_shutdown(struct drm_device *dev) · 880 unmodified lines | ||
| 3120 | 3142 | |
| 3121 | 3143 | ret = drm_atomic_helper_disable_all(dev, &ctx); |
| 3122 | 3144 | if (ret) |
| 3123 | − DRM_ERROR("Disabling all crtc's during unload failed with %i\n", ret); | |
| 3145 | + drm_err(dev, | |
| 3146 | + "Disabling all crtc's during unload failed with %i\n", | |
| 3147 | + ret); | |
| 3124 | 3148 | |
| 3125 | 3149 | DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); |
| 3126 | 3150 | } |
| @@ -3380,8 +3404,9 @@ static int page_flip_common(struct drm_atomic_state *state, · 253 unmodified lines | ||
| 3380 | 3404 | /* Make sure we don't accidentally do a full modeset. */ |
| 3381 | 3405 | state->allow_modeset = false; |
| 3382 | 3406 | if (!crtc_state->active) { |
| 3383 | − DRM_DEBUG_ATOMIC("[CRTC:%d:%s] disabled, rejecting legacy flip\n", | |
| 3384 | − crtc->base.id, crtc->name); | |
| 3407 | + drm_dbg_atomic(crtc->dev, | |
| 3408 | + "[CRTC:%d:%s] disabled, rejecting legacy flip\n", | |
| 3409 | + crtc->base.id, crtc->name); | |
| 3385 | 3410 | return -EINVAL; |
| 3386 | 3411 | } |
| 3387 | 3412 | |
| @@ -773,7 +773,7 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector, · 772 unmodified lines | ||
| 773 | 773 | state->scaling_mode = val; |
| 774 | 774 | } else if (property == config->content_protection_property) { |
| 775 | 775 | if (val == DRM_MODE_CONTENT_PROTECTION_ENABLED) { |
| 776 | − DRM_DEBUG_KMS("only drivers can set CP Enabled\n"); | |
| 776 | + drm_dbg_kms(dev, "only drivers can set CP Enabled\n"); | |
| 777 | 777 | return -EINVAL; |
| 778 | 778 | } |
| 779 | 779 | state->content_protection = val; |
| @@ -106,7 +106,7 @@ int drm_getmagic(struct drm_device *dev, void *data, struct drm_file *file_priv) · 105 unmodified lines | ||
| 106 | 106 | auth->magic = file_priv->magic; |
| 107 | 107 | mutex_unlock(&dev->master_mutex); |
| 108 | 108 | |
| 109 | − DRM_DEBUG("%u\n", auth->magic); | |
| 109 | + drm_dbg_core(dev, "%u\n", auth->magic); | |
| 110 | 110 | |
| 111 | 111 | return ret < 0 ? ret : 0; |
| 112 | 112 | } |
| @@ -117,7 +117,7 @@ int drm_authmagic(struct drm_device *dev, void *data, · 4 unmodified lines | ||
| 117 | 117 | struct drm_auth *auth = data; |
| 118 | 118 | struct drm_file *file; |
| 119 | 119 | |
| 120 | − DRM_DEBUG("%u\n", auth->magic); | |
| 120 | + drm_dbg_core(dev, "%u\n", auth->magic); | |
| 121 | 121 | |
| 122 | 122 | mutex_lock(&dev->master_mutex); |
| 123 | 123 | file = idr_find(&file_priv->master->magic_map, auth->magic); |
| @@ -274,7 +274,9 @@ int drm_setmaster_ioctl(struct drm_device *dev, void *data, · 150 unmodified lines | ||
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | if (file_priv->master->lessor != NULL) { |
| 277 | − DRM_DEBUG_LEASE("Attempt to set lessee %d as master\n", file_priv->master->lessee_id); | |
| 277 | + drm_dbg_lease(dev, | |
| 278 | + "Attempt to set lessee %d as master\n", | |
| 279 | + file_priv->master->lessee_id); | |
| 278 | 280 | ret = -EINVAL; |
| 279 | 281 | goto out_unlock; |
| 280 | 282 | } |
| @@ -315,7 +317,9 @@ int drm_dropmaster_ioctl(struct drm_device *dev, void *data, · 34 unmodified lines | ||
| 315 | 317 | } |
| 316 | 318 | |
| 317 | 319 | if (file_priv->master->lessor != NULL) { |
| 318 | − DRM_DEBUG_LEASE("Attempt to drop lessee %d as master\n", file_priv->master->lessee_id); | |
| 320 | + drm_dbg_lease(dev, | |
| 321 | + "Attempt to drop lessee %d as master\n", | |
| 322 | + file_priv->master->lessee_id); | |
| 319 | 323 | ret = -EINVAL; |
| 320 | 324 | goto out_unlock; |
| 321 | 325 | } |
| @@ -0,0 +1,24 @@ | ||
| 1 | +// SPDX-License-Identifier: GPL-2.0 | |
| 2 | + | |
| 3 | +#include <linux/module.h> | |
| 4 | +#include <linux/types.h> | |
| 5 | + | |
| 6 | +static bool drm_nomodeset; | |
| 7 | + | |
| 8 | +bool drm_firmware_drivers_only(void) | |
| 9 | +{ | |
| 10 | + return drm_nomodeset; | |
| 11 | +} | |
| 12 | +EXPORT_SYMBOL(drm_firmware_drivers_only); | |
| 13 | + | |
| 14 | +static int __init disable_modeset(char *str) | |
| 15 | +{ | |
| 16 | + drm_nomodeset = true; | |
| 17 | + | |
| 18 | + pr_warn("Booted with the nomodeset parameter. Only the system framebuffer will be available\n"); | |
| 19 | + | |
| 20 | + return 1; | |
| 21 | +} | |
| 22 | + | |
| 23 | +/* Disable kernel modesetting */ | |
| 24 | +__setup("nomodeset", disable_modeset); | |
| @@ -262,6 +262,12 @@ static const struct dmi_system_id orientation_data[] = { · 261 unmodified lines | ||
| 262 | 262 | DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad D330-10IGM"), |
| 263 | 263 | }, |
| 264 | 264 | .driver_data = (void *)&lcd1200x1920_rightside_up, |
| 265 | + }, { /* Lenovo Yoga Book X90F / X91F / X91L */ | |
| 266 | + .matches = { | |
| 267 | + /* Non exact match to match all versions */ | |
| 268 | + DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X9"), | |
| 269 | + }, | |
| 270 | + .driver_data = (void *)&lcd1200x1920_rightside_up, | |
| 265 | 271 | }, { /* OneGX1 Pro */ |
| 266 | 272 | .matches = { |
| 267 | 273 | DMI_EXACT_MATCH(DMI_SYS_VENDOR, "SYSTEM_MANUFACTURER"), |
| @@ -4,7 +4,7 @@ · 3 unmodified lines | ||
| 4 | 4 | * Copyright © 2021 Intel Corporation |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | −#include <linux/console.h> | |
| 7 | +#include <drm/drm_drv.h> | |
| 8 | 8 | |
| 9 | 9 | #include "gem/i915_gem_context.h" |
| 10 | 10 | #include "gem/i915_gem_object.h" |
| @@ -31,7 +31,7 @@ static int i915_check_nomodeset(void) · 20 unmodified lines | ||
| 31 | 31 | if (i915_modparams.modeset == 0) |
| 32 | 32 | use_kms = false; |
| 33 | 33 | |
| 34 | − if (vgacon_text_force() && i915_modparams.modeset == -1) | |
| 34 | + if (drm_firmware_drivers_only() && i915_modparams.modeset == -1) | |
| 35 | 35 | use_kms = false; |
| 36 | 36 | |
| 37 | 37 | if (!use_kms) { |
| @@ -6,7 +6,6 @@ · 5 unmodified lines | ||
| 6 | 6 | * Dave Airlie |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | −#include <linux/console.h> | |
| 10 | 9 | #include <linux/module.h> |
| 11 | 10 | #include <linux/pci.h> |
| 12 | 11 | #include <linux/vmalloc.h> |
| @@ -378,7 +377,7 @@ static struct pci_driver mgag200_pci_driver = { · 365 unmodified lines | ||
| 378 | 377 | |
| 379 | 378 | static int __init mgag200_init(void) |
| 380 | 379 | { |
| 381 | − if (vgacon_text_force() && mgag200_modeset == -1) | |
| 380 | + if (drm_firmware_drivers_only() && mgag200_modeset == -1) | |
| 382 | 381 | return -EINVAL; |
| 383 | 382 | |
| 384 | 383 | if (mgag200_modeset == 0) |
| @@ -22,7 +22,6 @@ · 21 unmodified lines | ||
| 22 | 22 | * Authors: Ben Skeggs |
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | −#include <linux/console.h> | |
| 26 | 25 | #include <linux/delay.h> |
| 27 | 26 | #include <linux/module.h> |
| 28 | 27 | #include <linux/pci.h> |
| @@ -32,6 +31,7 @@ · 3 unmodified lines | ||
| 32 | 31 | |
| 33 | 32 | #include <drm/drm_aperture.h> |
| 34 | 33 | #include <drm/drm_crtc_helper.h> |
| 34 | +#include <drm/drm_drv.h> | |
| 35 | 35 | #include <drm/drm_gem_ttm_helper.h> |
| 36 | 36 | #include <drm/drm_ioctl.h> |
| 37 | 37 | #include <drm/drm_vblank.h> |
| @@ -1358,7 +1358,7 @@ nouveau_drm_init(void) · 1320 unmodified lines | ||
| 1358 | 1358 | nouveau_display_options(); |
| 1359 | 1359 | |
| 1360 | 1360 | if (nouveau_modeset == -1) { |
| 1361 | − if (vgacon_text_force()) | |
| 1361 | + if (drm_firmware_drivers_only()) | |
| 1362 | 1362 | nouveau_modeset = 0; |
| 1363 | 1363 | } |
| 1364 | 1364 | |
| @@ -29,7 +29,6 @@ · 28 unmodified lines | ||
| 29 | 29 | |
| 30 | 30 | #include "qxl_drv.h" |
| 31 | 31 | |
| 32 | −#include <linux/console.h> | |
| 33 | 32 | #include <linux/module.h> |
| 34 | 33 | #include <linux/pci.h> |
| 35 | 34 | #include <linux/vgaarb.h> |
| @@ -295,7 +294,7 @@ static struct drm_driver qxl_driver = { · 259 unmodified lines | ||
| 295 | 294 | |
| 296 | 295 | static int __init qxl_init(void) |
| 297 | 296 | { |
| 298 | − if (vgacon_text_force() && qxl_modeset == -1) | |
| 297 | + if (drm_firmware_drivers_only() && qxl_modeset == -1) | |
| 299 | 298 | return -EINVAL; |
| 300 | 299 | |
| 301 | 300 | if (qxl_modeset == 0) |
| @@ -31,7 +31,6 @@ · 30 unmodified lines | ||
| 31 | 31 | |
| 32 | 32 | |
| 33 | 33 | #include <linux/compat.h> |
| 34 | −#include <linux/console.h> | |
| 35 | 34 | #include <linux/module.h> |
| 36 | 35 | #include <linux/pm_runtime.h> |
| 37 | 36 | #include <linux/vga_switcheroo.h> |
| @@ -637,15 +636,11 @@ static struct pci_driver radeon_kms_pci_driver = { · 599 unmodified lines | ||
| 637 | 636 | |
| 638 | 637 | static int __init radeon_module_init(void) |
| 639 | 638 | { |
| 640 | − if (vgacon_text_force() && radeon_modeset == -1) { | |
| 641 | − DRM_INFO("VGACON disable radeon kernel modesetting.\n"); | |
| 639 | + if (drm_firmware_drivers_only() && radeon_modeset == -1) | |
| 642 | 640 | radeon_modeset = 0; |
| 643 | − } | |
| 644 | 641 | |
| 645 | − if (radeon_modeset == 0) { | |
| 646 | − DRM_ERROR("No UMS support in radeon module!\n"); | |
| 642 | + if (radeon_modeset == 0) | |
| 647 | 643 | return -EINVAL; |
| 648 | − } | |
| 649 | 644 | |
| 650 | 645 | DRM_INFO("radeon kernel modesetting enabled.\n"); |
| 651 | 646 | radeon_register_atpx_handler(); |
| @@ -1,6 +1,5 @@ | ||
| 1 | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 2 | 2 | |
| 3 | −#include <linux/console.h> | |
| 4 | 3 | #include <linux/pci.h> |
| 5 | 4 | |
| 6 | 5 | #include <drm/drm_aperture.h> |
| @@ -719,7 +718,7 @@ static struct pci_driver bochs_pci_driver = { · 712 unmodified lines | ||
| 719 | 718 | |
| 720 | 719 | static int __init bochs_init(void) |
| 721 | 720 | { |
| 722 | − if (vgacon_text_force() && bochs_modeset == -1) | |
| 721 | + if (drm_firmware_drivers_only() && bochs_modeset == -1) | |
| 723 | 722 | return -EINVAL; |
| 724 | 723 | |
| 725 | 724 | if (bochs_modeset == 0) |
| @@ -16,7 +16,6 @@ · 15 unmodified lines | ||
| 16 | 16 | * Copyright 1999-2001 Jeff Garzik <jgarzik@pobox.com> |
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | −#include <linux/console.h> | |
| 20 | 19 | #include <linux/dma-buf-map.h> |
| 21 | 20 | #include <linux/module.h> |
| 22 | 21 | #include <linux/pci.h> |
| @@ -636,8 +635,9 @@ static struct pci_driver cirrus_pci_driver = { · 613 unmodified lines | ||
| 636 | 635 | |
| 637 | 636 | static int __init cirrus_init(void) |
| 638 | 637 | { |
| 639 | − if (vgacon_text_force()) | |
| 638 | + if (drm_firmware_drivers_only()) | |
| 640 | 639 | return -EINVAL; |
| 640 | + | |
| 641 | 641 | return pci_register_driver(&cirrus_pci_driver); |
| 642 | 642 | } |
| 643 | 643 | |
| @@ -128,15 +128,17 @@ static const struct ttm_resource_manager_func ttm_range_manager_func = { · 127 unmodified lines | ||
| 128 | 128 | }; |
| 129 | 129 | |
| 130 | 130 | /** |
| 131 | − * ttm_range_man_init | |
| 131 | + * ttm_range_man_init_nocheck - Initialise a generic range manager for the | |
| 132 | + * selected memory type. | |
| 132 | 133 | * |
| 133 | 134 | * @bdev: ttm device |
| 134 | 135 | * @type: memory manager type |
| 135 | 136 | * @use_tt: if the memory manager uses tt |
| 136 | 137 | * @p_size: size of area to be managed in pages. |
| 137 | 138 | * |
| 138 | − * Initialise a generic range manager for the selected memory type. | |
| 139 | 139 | * The range manager is installed for this device in the type slot. |
| 140 | + * | |
| 141 | + * Return: %0 on success or a negative error code on failure | |
| 140 | 142 | */ |
| 141 | 143 | int ttm_range_man_init_nocheck(struct ttm_device *bdev, |
| 142 | 144 | unsigned type, bool use_tt, |
| @@ -166,12 +168,13 @@ int ttm_range_man_init_nocheck(struct ttm_device *bdev, · 23 unmodified lines | ||
| 166 | 168 | EXPORT_SYMBOL(ttm_range_man_init_nocheck); |
| 167 | 169 | |
| 168 | 170 | /** |
| 169 | − * ttm_range_man_fini | |
| 171 | + * ttm_range_man_fini_nocheck - Remove the generic range manager from a slot | |
| 172 | + * and tear it down. | |
| 170 | 173 | * |
| 171 | 174 | * @bdev: ttm device |
| 172 | 175 | * @type: memory manager type |
| 173 | 176 | * |
| 174 | − * Remove the generic range manager from a slot and tear it down. | |
| 177 | + * Return: %0 on success or a negative error code on failure | |
| 175 | 178 | */ |
| 176 | 179 | int ttm_range_man_fini_nocheck(struct ttm_device *bdev, |
| 177 | 180 | unsigned type) |
| @@ -7,7 +7,6 @@ · 6 unmodified lines | ||
| 7 | 7 | * Michael Thayer <michael.thayer@oracle.com, |
| 8 | 8 | * Hans de Goede <hdegoede@redhat.com> |
| 9 | 9 | */ |
| 10 | −#include <linux/console.h> | |
| 11 | 10 | #include <linux/module.h> |
| 12 | 11 | #include <linux/pci.h> |
| 13 | 12 | #include <linux/vt_kern.h> |
| @@ -193,10 +192,8 @@ static const struct drm_driver driver = { · 179 unmodified lines | ||
| 193 | 192 | |
| 194 | 193 | static int __init vbox_init(void) |
| 195 | 194 | { |
| 196 | −#ifdef CONFIG_VGA_CONSOLE | |
| 197 | − if (vgacon_text_force() && vbox_modeset == -1) | |
| 195 | + if (drm_firmware_drivers_only() && vbox_modeset == -1) | |
| 198 | 196 | return -EINVAL; |
| 199 | −#endif | |
| 200 | 197 | |
| 201 | 198 | if (vbox_modeset == 0) |
| 202 | 199 | return -EINVAL; |
| @@ -127,8 +127,8 @@ int vbox_hw_init(struct vbox_private *vbox) · 126 unmodified lines | ||
| 127 | 127 | /* Create guest-heap mem-pool use 2^4 = 16 byte chunks */ |
| 128 | 128 | vbox->guest_pool = devm_gen_pool_create(vbox->ddev.dev, 4, -1, |
| 129 | 129 | "vboxvideo-accel"); |
| 130 | − if (!vbox->guest_pool) | |
| 131 | − return -ENOMEM; | |
| 130 | + if (IS_ERR(vbox->guest_pool)) | |
| 131 | + return PTR_ERR(vbox->guest_pool); | |
| 132 | 132 | |
| 133 | 133 | ret = gen_pool_add_virt(vbox->guest_pool, |
| 134 | 134 | (unsigned long)vbox->guest_heap, |
| @@ -27,7 +27,6 @@ · 26 unmodified lines | ||
| 27 | 27 | */ |
| 28 | 28 | |
| 29 | 29 | #include <linux/module.h> |
| 30 | −#include <linux/console.h> | |
| 31 | 30 | #include <linux/pci.h> |
| 32 | 31 | #include <linux/poll.h> |
| 33 | 32 | #include <linux/wait.h> |
| @@ -104,7 +103,7 @@ static int virtio_gpu_probe(struct virtio_device *vdev) · 70 unmodified lines | ||
| 104 | 103 | struct drm_device *dev; |
| 105 | 104 | int ret; |
| 106 | 105 | |
| 107 | − if (vgacon_text_force() && virtio_gpu_modeset == -1) | |
| 106 | + if (drm_firmware_drivers_only() && virtio_gpu_modeset == -1) | |
| 108 | 107 | return -EINVAL; |
| 109 | 108 | |
| 110 | 109 | if (virtio_gpu_modeset == 0) |
| @@ -25,7 +25,6 @@ · 24 unmodified lines | ||
| 25 | 25 | * |
| 26 | 26 | **************************************************************************/ |
| 27 | 27 | |
| 28 | −#include <linux/console.h> | |
| 29 | 28 | #include <linux/dma-mapping.h> |
| 30 | 29 | #include <linux/module.h> |
| 31 | 30 | #include <linux/pci.h> |
| @@ -1651,7 +1650,7 @@ static int __init vmwgfx_init(void) · 1619 unmodified lines | ||
| 1651 | 1650 | { |
| 1652 | 1651 | int ret; |
| 1653 | 1652 | |
| 1654 | − if (vgacon_text_force()) | |
| 1653 | + if (drm_firmware_drivers_only()) | |
| 1655 | 1654 | return -EINVAL; |
| 1656 | 1655 | |
| 1657 | 1656 | ret = pci_register_driver(&vmw_pci_driver); |
| @@ -97,30 +97,9 @@ static int vga_video_font_height; · 96 unmodified lines | ||
| 97 | 97 | static int vga_scan_lines __read_mostly; |
| 98 | 98 | static unsigned int vga_rolled_over; /* last vc_origin offset before wrap */ |
| 99 | 99 | |
| 100 | −static bool vgacon_text_mode_force; | |
| 101 | 100 | static bool vga_hardscroll_enabled; |
| 102 | 101 | static bool vga_hardscroll_user_enable = true; |
| 103 | 102 | |
| 104 | −bool vgacon_text_force(void) | |
| 105 | −{ | |
| 106 | − return vgacon_text_mode_force; | |
| 107 | −} | |
| 108 | −EXPORT_SYMBOL(vgacon_text_force); | |
| 109 | − | |
| 110 | −static int __init text_mode(char *str) | |
| 111 | −{ | |
| 112 | − vgacon_text_mode_force = true; | |
| 113 | − | |
| 114 | − pr_warn("You have booted with nomodeset. This means your GPU drivers are DISABLED\n"); | |
| 115 | − pr_warn("Any video related functionality will be severely degraded, and you may not even be able to suspend the system properly\n"); | |
| 116 | − pr_warn("Unless you actually understand what nomodeset does, you should reboot without enabling it\n"); | |
| 117 | − | |
| 118 | − return 1; | |
| 119 | −} | |
| 120 | − | |
| 121 | −/* force text mode - used by kernel modesetting */ | |
| 122 | −__setup("nomodeset", text_mode); | |
| 123 | − | |
| 124 | 103 | static int __init no_scroll(char *str) |
| 125 | 104 | { |
| 126 | 105 | /* |
| @@ -601,5 +601,6 @@ static inline bool drm_drv_uses_atomic_modeset(struct drm_device *dev) · 600 unmodified lines | ||
| 601 | 601 | |
| 602 | 602 | int drm_dev_set_unique(struct drm_device *dev, const char *name); |
| 603 | 603 | |
| 604 | +extern bool drm_firmware_drivers_only(void); | |
| 604 | 605 | |
| 605 | 606 | #endif |
| @@ -219,12 +219,6 @@ extern atomic_t ignore_console_lock_warning; · 218 unmodified lines | ||
| 219 | 219 | #define VESA_HSYNC_SUSPEND 2 |
| 220 | 220 | #define VESA_POWERDOWN 3 |
| 221 | 221 | |
| 222 | −#ifdef CONFIG_VGA_CONSOLE | |
| 223 | −extern bool vgacon_text_force(void); | |
| 224 | −#else | |
| 225 | −static inline bool vgacon_text_force(void) { return false; } | |
| 226 | −#endif | |
| 227 | − | |
| 228 | 222 | extern void console_init(void); |
| 229 | 223 | |
| 230 | 224 | /* For deferred console takeover */ |