History

Merge tag 'drm-misc-next-2021-11-29' of git://anongit.freedesktop.org/drm/drm-misc into drm-next

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>

Daniel Vetter committed 4 years ago

Commit c8a04cb2 parents c305ae9 69d846129 files · +344 −285Browse files

Unified · Split

29 files
  1. Documentation/admin-guide/kernel-parameters.txt +7 −0
  2. drivers/gpu/drm/Kconfig +6 −0
  3. drivers/gpu/drm/Makefile +2 −0
  4. drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 −4
  5. drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0 −9
  6. drivers/gpu/drm/ast/ast_drv.c +1 −2
  7. drivers/gpu/drm/bridge/analogix/anx7625.c +3 −3
  8. drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c +28 −12
  9. drivers/gpu/drm/drm_atomic.c +99 −81
  10. drivers/gpu/drm/drm_atomic_helper.c +134 −109
  11. drivers/gpu/drm/drm_atomic_uapi.c +1 −1
  12. drivers/gpu/drm/drm_auth.c +8 −4
  13. drivers/gpu/drm/drm_nomodeset.c +24 −0
  14. drivers/gpu/drm/drm_panel_orientation_quirks.c +6 −0
  15. drivers/gpu/drm/i915/i915_module.c +2 −2
  16. drivers/gpu/drm/mgag200/mgag200_drv.c +1 −2
  17. drivers/gpu/drm/nouveau/nouveau_drm.c +2 −2
  18. drivers/gpu/drm/qxl/qxl_drv.c +1 −2
  19. drivers/gpu/drm/radeon/radeon_drv.c +2 −7
  20. drivers/gpu/drm/tiny/bochs.c +1 −2
  21. drivers/gpu/drm/tiny/cirrus.c +2 −2
  22. drivers/gpu/drm/ttm/ttm_range_manager.c +7 −4
  23. drivers/gpu/drm/vboxvideo/vbox_drv.c +1 −4
  24. drivers/gpu/drm/vboxvideo/vbox_main.c +2 −2
  25. drivers/gpu/drm/virtio/virtgpu_drv.c +1 −2
  26. drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +1 −2
  27. drivers/video/console/vgacon.c +0 −21
  28. include/drm/drm_drv.h +1 −0
  29. include/linux/console.h +0 −6
Documentation/admin-guide/kernel-parameters.txt+7−0
@@ -3545,6 +3545,13 @@ · 3544 unmodified lines
3545 shutdown the other cpus. Instead use the REBOOT_VECTOR3545 shutdown the other cpus. Instead use the REBOOT_VECTOR
3546 irq.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 nomodule Disable module load3555 nomodule Disable module load
3549 3556
3550 nopat [X86] Disable PAT (page attribute table extension of3557 nopat [X86] Disable PAT (page attribute table extension of
drivers/gpu/drm/Kconfig+6−0
@@ -8,6 +8,7 @@ · 7 unmodified lines
8menuconfig DRM8menuconfig DRM
9 tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)"9 tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)"
10 depends on (AGP || AGP=n) && !EMULATED_CMPXCHG && HAS_DMA10 depends on (AGP || AGP=n) && !EMULATED_CMPXCHG && HAS_DMA
11 select DRM_NOMODESET
11 select DRM_PANEL_ORIENTATION_QUIRKS12 select DRM_PANEL_ORIENTATION_QUIRKS
12 select HDMI13 select HDMI
13 select FB_CMDLINE14 select FB_CMDLINE
@@ -492,6 +493,11 @@ config DRM_EXPORT_FOR_TESTS · 478 unmodified lines
492config DRM_PANEL_ORIENTATION_QUIRKS493config DRM_PANEL_ORIENTATION_QUIRKS
493 tristate494 tristate
494 495
496# Separate option because nomodeset parameter is global and expected built-in
497config DRM_NOMODESET
498 bool
499 default n
500
495config DRM_LIB_RANDOM501config DRM_LIB_RANDOM
496 bool502 bool
497 default n503 default n
drivers/gpu/drm/Makefile+2−0
@@ -33,6 +33,8 @@ drm-$(CONFIG_DRM_PRIVACY_SCREEN) += drm_privacy_screen.o drm_privacy_screen_x86. · 32 unmodified lines
33 33
34obj-$(CONFIG_DRM_DP_AUX_BUS) += drm_dp_aux_bus.o34obj-$(CONFIG_DRM_DP_AUX_BUS) += drm_dp_aux_bus.o
35 35
36obj-$(CONFIG_DRM_NOMODESET) += drm_nomodeset.o
37
36drm_cma_helper-y := drm_gem_cma_helper.o38drm_cma_helper-y := drm_gem_cma_helper.o
37obj-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_cma_helper.o39obj-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_cma_helper.o
38 40
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c+1−4
@@ -31,7 +31,6 @@ · 30 unmodified lines
31#include "amdgpu_drv.h"31#include "amdgpu_drv.h"
32 32
33#include <drm/drm_pciids.h>33#include <drm/drm_pciids.h>
34#include <linux/console.h>
35#include <linux/module.h>34#include <linux/module.h>
36#include <linux/pm_runtime.h>35#include <linux/pm_runtime.h>
37#include <linux/vga_switcheroo.h>36#include <linux/vga_switcheroo.h>
@@ -2516,10 +2515,8 @@ static int __init amdgpu_init(void) · 2478 unmodified lines
2516{2515{
2517 int r;2516 int r;
2518 2517
2519 if (vgacon_text_force()) {2518 if (drm_firmware_drivers_only())
2520 DRM_ERROR("VGACON disables amdgpu kernel modesetting.\n");
2521 return -EINVAL;2519 return -EINVAL;
2522 }
2523 2520
2524 r = amdgpu_sync_init();2521 r = amdgpu_sync_init();
2525 if (r)2522 if (r)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c+0−9
@@ -116,17 +116,8 @@ static void amdgpu_evict_flags(struct ttm_buffer_object *bo, · 115 unmodified lines
116 116
117 abo = ttm_to_amdgpu_bo(bo);117 abo = ttm_to_amdgpu_bo(bo);
118 if (abo->flags & AMDGPU_AMDKFD_CREATE_SVM_BO) {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 placement->num_placement = 0;119 placement->num_placement = 0;
128 placement->num_busy_placement = 0;120 placement->num_busy_placement = 0;
129 rcu_read_unlock();
130 return;121 return;
131 }122 }
132 123
drivers/gpu/drm/ast/ast_drv.c+1−2
@@ -26,7 +26,6 @@ · 25 unmodified lines
26 * Authors: Dave Airlie <airlied@redhat.com>26 * Authors: Dave Airlie <airlied@redhat.com>
27 */27 */
28 28
29#include <linux/console.h>
30#include <linux/module.h>29#include <linux/module.h>
31#include <linux/pci.h>30#include <linux/pci.h>
32 31
@@ -233,7 +232,7 @@ static struct pci_driver ast_pci_driver = { · 200 unmodified lines
233 232
234static int __init ast_init(void)233static 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 return -EINVAL;236 return -EINVAL;
238 237
239 if (ast_modeset == 0)238 if (ast_modeset == 0)
drivers/gpu/drm/bridge/analogix/anx7625.c+3−3
@@ -850,7 +850,7 @@ static int sp_tx_edid_read(struct anx7625_data *ctx, · 849 unmodified lines
850 int count, blocks_num;850 int count, blocks_num;
851 u8 pblock_buf[MAX_DPCD_BUFFER_SIZE];851 u8 pblock_buf[MAX_DPCD_BUFFER_SIZE];
852 u8 i, j;852 u8 i, j;
853 u8 g_edid_break = 0;853 int g_edid_break = 0;
854 int ret;854 int ret;
855 struct device *dev = &ctx->client->dev;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 g_edid_break = edid_read(ctx, offset,881 g_edid_break = edid_read(ctx, offset,
882 pblock_buf);882 pblock_buf);
883 883
884 if (g_edid_break)884 if (g_edid_break < 0)
885 break;885 break;
886 886
887 memcpy(&pedid_blocks_buf[offset],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 sizeof(codec_data));1636 sizeof(codec_data));
1637 1637
1638 if (IS_ERR(ctx->audio_pdev))1638 if (IS_ERR(ctx->audio_pdev))
1639 return IS_ERR(ctx->audio_pdev);1639 return PTR_ERR(ctx->audio_pdev);
1640 1640
1641 DRM_DEV_DEBUG_DRIVER(dev, "bound to %s", HDMI_CODEC_DRV_NAME);1641 DRM_DEV_DEBUG_DRIVER(dev, "bound to %s", HDMI_CODEC_DRV_NAME);
1642 1642
drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c+28−12
@@ -306,19 +306,10 @@ out: · 305 unmodified lines
306 mutex_unlock(&ge_b850v3_lvds_dev_mutex);306 mutex_unlock(&ge_b850v3_lvds_dev_mutex);
307}307}
308 308
309static int stdp4028_ge_b850v3_fw_probe(struct i2c_client *stdp4028_i2c,309static int ge_b850v3_register(void)
310 const struct i2c_device_id *id)
311{310{
311 struct i2c_client *stdp4028_i2c = ge_b850v3_lvds_ptr->stdp4028_i2c;
312 struct device *dev = &stdp4028_i2c->dev;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 /* drm bridge initialization */314 /* drm bridge initialization */
324 ge_b850v3_lvds_ptr->bridge.funcs = &ge_b850v3_lvds_funcs;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 "ge-b850v3-lvds-dp", ge_b850v3_lvds_ptr);334 "ge-b850v3-lvds-dp", ge_b850v3_lvds_ptr);
344}335}
345 336
337static 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
346static int stdp4028_ge_b850v3_fw_remove(struct i2c_client *stdp4028_i2c)358static int stdp4028_ge_b850v3_fw_remove(struct i2c_client *stdp4028_i2c)
347{359{
348 ge_b850v3_lvds_remove();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 ge_b850v3_lvds_ptr->stdp2690_i2c = stdp2690_i2c;398 ge_b850v3_lvds_ptr->stdp2690_i2c = stdp2690_i2c;
387 i2c_set_clientdata(stdp2690_i2c, ge_b850v3_lvds_ptr);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
392static int stdp2690_ge_b850v3_fw_remove(struct i2c_client *stdp2690_i2c)408static int stdp2690_ge_b850v3_fw_remove(struct i2c_client *stdp2690_i2c)
drivers/gpu/drm/drm_atomic.c+99−81
@@ -74,7 +74,7 @@ int drm_crtc_commit_wait(struct drm_crtc_commit *commit) · 73 unmodified lines
74 74
75 ret = wait_for_completion_timeout(&commit->hw_done, timeout);75 ret = wait_for_completion_timeout(&commit->hw_done, timeout);
76 if (!ret) {76 if (!ret) {
77 DRM_ERROR("hw_done timed out\n");77 drm_err(commit->crtc->dev, "hw_done timed out\n");
78 return -ETIMEDOUT;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 ret = wait_for_completion_timeout(&commit->flip_done, timeout);85 ret = wait_for_completion_timeout(&commit->flip_done, timeout);
86 if (!ret) {86 if (!ret) {
87 DRM_ERROR("flip_done timed out\n");87 drm_err(commit->crtc->dev, "flip_done timed out\n");
88 return -ETIMEDOUT;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 state->dev = dev;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 return 0;145 return 0;
146fail:146fail:
@@ -191,7 +191,7 @@ void drm_atomic_state_default_clear(struct drm_atomic_state *state) · 44 unmodified lines
191 struct drm_mode_config *config = &dev->mode_config;191 struct drm_mode_config *config = &dev->mode_config;
192 int i;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 for (i = 0; i < state->num_connector; i++) {196 for (i = 0; i < state->num_connector; i++) {
197 struct drm_connector *connector = state->connectors[i].ptr;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 drm_atomic_state_clear(state);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 if (config->funcs->atomic_state_free) {306 if (config->funcs->atomic_state_free) {
307 config->funcs->atomic_state_free(state);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 state->crtcs[index].ptr = crtc;358 state->crtcs[index].ptr = crtc;
359 crtc_state->state = state;359 crtc_state->state = state;
360 360
361 DRM_DEBUG_ATOMIC("Added [CRTC:%d:%s] %p state to %p\n",361 drm_dbg_atomic(state->dev, "Added [CRTC:%d:%s] %p state to %p\n",
362 crtc->base.id, crtc->name, crtc_state, state);362 crtc->base.id, crtc->name, crtc_state, state);
363 363
364 return crtc_state;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 if (new_crtc_state->active && !new_crtc_state->enable) {381 if (new_crtc_state->active && !new_crtc_state->enable) {
382 DRM_DEBUG_ATOMIC("[CRTC:%d:%s] active without enabled\n",382 drm_dbg_atomic(crtc->dev,
383 crtc->base.id, crtc->name);383 "[CRTC:%d:%s] active without enabled\n",
384 crtc->base.id, crtc->name);
384 return -EINVAL;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 if (drm_core_check_feature(crtc->dev, DRIVER_ATOMIC) &&392 if (drm_core_check_feature(crtc->dev, DRIVER_ATOMIC) &&
392 WARN_ON(new_crtc_state->enable && !new_crtc_state->mode_blob)) {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 drm_dbg_atomic(crtc->dev,
394 crtc->base.id, crtc->name);395 "[CRTC:%d:%s] enabled without mode blob\n",
396 crtc->base.id, crtc->name);
395 return -EINVAL;397 return -EINVAL;
396 }398 }
397 399
398 if (drm_core_check_feature(crtc->dev, DRIVER_ATOMIC) &&400 if (drm_core_check_feature(crtc->dev, DRIVER_ATOMIC) &&
399 WARN_ON(!new_crtc_state->enable && new_crtc_state->mode_blob)) {401 WARN_ON(!new_crtc_state->enable && new_crtc_state->mode_blob)) {
400 DRM_DEBUG_ATOMIC("[CRTC:%d:%s] disabled with mode blob\n",402 drm_dbg_atomic(crtc->dev,
401 crtc->base.id, crtc->name);403 "[CRTC:%d:%s] disabled with mode blob\n",
404 crtc->base.id, crtc->name);
402 return -EINVAL;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 if (new_crtc_state->event &&418 if (new_crtc_state->event &&
416 !new_crtc_state->active && !old_crtc_state->active) {419 !new_crtc_state->active && !old_crtc_state->active) {
417 DRM_DEBUG_ATOMIC("[CRTC:%d:%s] requesting event but off\n",420 drm_dbg_atomic(crtc->dev,
418 crtc->base.id, crtc->name);421 "[CRTC:%d:%s] requesting event but off\n",
422 crtc->base.id, crtc->name);
419 return -EINVAL;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 return 0;464 return 0;
461 465
462 if (writeback_job->fb && !state->crtc) {466 if (writeback_job->fb && !state->crtc) {
463 DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] framebuffer without CRTC\n",467 drm_dbg_atomic(connector->dev,
464 connector->base.id, connector->name);468 "[CONNECTOR:%d:%s] framebuffer without CRTC\n",
469 connector->base.id, connector->name);
465 return -EINVAL;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 state->crtc);475 state->crtc);
471 476
472 if (writeback_job->fb && !crtc_state->active) {477 if (writeback_job->fb && !crtc_state->active) {
473 DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] has framebuffer, but [CRTC:%d] is off\n",478 drm_dbg_atomic(connector->dev,
474 connector->base.id, connector->name,479 "[CONNECTOR:%d:%s] has framebuffer, but [CRTC:%d] is off\n",
475 state->crtc->base.id);480 connector->base.id, connector->name,
481 state->crtc->base.id);
476 return -EINVAL;482 return -EINVAL;
477 }483 }
478 484
479 if (!writeback_job->fb) {485 if (!writeback_job->fb) {
480 if (writeback_job->out_fence) {486 if (writeback_job->out_fence) {
481 DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] requesting out-fence without framebuffer\n",487 drm_dbg_atomic(connector->dev,
482 connector->base.id, connector->name);488 "[CONNECTOR:%d:%s] requesting out-fence without framebuffer\n",
489 connector->base.id, connector->name);
483 return -EINVAL;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 state->planes[index].new_state = plane_state;544 state->planes[index].new_state = plane_state;
538 plane_state->state = state;545 plane_state->state = state;
539 546
540 DRM_DEBUG_ATOMIC("Added [PLANE:%d:%s] %p state to %p\n",547 drm_dbg_atomic(plane->dev, "Added [PLANE:%d:%s] %p state to %p\n",
541 plane->base.id, plane->name, plane_state, state);548 plane->base.id, plane->name, plane_state, state);
542 549
543 if (plane_state->crtc) {550 if (plane_state->crtc) {
544 struct drm_crtc_state *crtc_state;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 /* either *both* CRTC and FB must be set, or neither */602 /* either *both* CRTC and FB must be set, or neither */
596 if (crtc && !fb) {603 if (crtc && !fb) {
597 DRM_DEBUG_ATOMIC("[PLANE:%d:%s] CRTC set but no FB\n",604 drm_dbg_atomic(plane->dev, "[PLANE:%d:%s] CRTC set but no FB\n",
598 plane->base.id, plane->name);605 plane->base.id, plane->name);
599 return -EINVAL;606 return -EINVAL;
600 } else if (fb && !crtc) {607 } else if (fb && !crtc) {
601 DRM_DEBUG_ATOMIC("[PLANE:%d:%s] FB set but no CRTC\n",608 drm_dbg_atomic(plane->dev, "[PLANE:%d:%s] FB set but no CRTC\n",
602 plane->base.id, plane->name);609 plane->base.id, plane->name);
603 return -EINVAL;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 /* Check whether this plane is usable on this CRTC */617 /* Check whether this plane is usable on this CRTC */
611 if (!(plane->possible_crtcs & drm_crtc_mask(crtc))) {618 if (!(plane->possible_crtcs & drm_crtc_mask(crtc))) {
612 DRM_DEBUG_ATOMIC("Invalid [CRTC:%d:%s] for [PLANE:%d:%s]\n",619 drm_dbg_atomic(plane->dev,
613 crtc->base.id, crtc->name,620 "Invalid [CRTC:%d:%s] for [PLANE:%d:%s]\n",
614 plane->base.id, plane->name);621 crtc->base.id, crtc->name,
622 plane->base.id, plane->name);
615 return -EINVAL;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 ret = drm_plane_check_pixel_format(plane, fb->format->format,627 ret = drm_plane_check_pixel_format(plane, fb->format->format,
620 fb->modifier);628 fb->modifier);
621 if (ret) {629 if (ret) {
622 DRM_DEBUG_ATOMIC("[PLANE:%d:%s] invalid pixel format %p4cc, modifier 0x%llx\n",630 drm_dbg_atomic(plane->dev,
623 plane->base.id, plane->name,631 "[PLANE:%d:%s] invalid pixel format %p4cc, modifier 0x%llx\n",
624 &fb->format->format, fb->modifier);632 plane->base.id, plane->name,
633 &fb->format->format, fb->modifier);
625 return ret;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 new_plane_state->crtc_x > INT_MAX - (int32_t) new_plane_state->crtc_w ||639 new_plane_state->crtc_x > INT_MAX - (int32_t) new_plane_state->crtc_w ||
631 new_plane_state->crtc_h > INT_MAX ||640 new_plane_state->crtc_h > INT_MAX ||
632 new_plane_state->crtc_y > INT_MAX - (int32_t) new_plane_state->crtc_h) {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",642 drm_dbg_atomic(plane->dev,
634 plane->base.id, plane->name,643 "[PLANE:%d:%s] invalid CRTC coordinates %ux%u+%d+%d\n",
635 new_plane_state->crtc_w, new_plane_state->crtc_h,644 plane->base.id, plane->name,
636 new_plane_state->crtc_x, new_plane_state->crtc_y);645 new_plane_state->crtc_w, new_plane_state->crtc_h,
646 new_plane_state->crtc_x, new_plane_state->crtc_y);
637 return -ERANGE;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 new_plane_state->src_x > fb_width - new_plane_state->src_w ||655 new_plane_state->src_x > fb_width - new_plane_state->src_w ||
646 new_plane_state->src_h > fb_height ||656 new_plane_state->src_h > fb_height ||
647 new_plane_state->src_y > fb_height - new_plane_state->src_h) {657 new_plane_state->src_y > fb_height - new_plane_state->src_h) {
648 DRM_DEBUG_ATOMIC("[PLANE:%d:%s] invalid source coordinates "658 drm_dbg_atomic(plane->dev,
649 "%u.%06ux%u.%06u+%u.%06u+%u.%06u (fb %ux%u)\n",659 "[PLANE:%d:%s] invalid source coordinates "
650 plane->base.id, plane->name,660 "%u.%06ux%u.%06u+%u.%06u+%u.%06u (fb %ux%u)\n",
651 new_plane_state->src_w >> 16,661 plane->base.id, plane->name,
652 ((new_plane_state->src_w & 0xffff) * 15625) >> 10,662 new_plane_state->src_w >> 16,
653 new_plane_state->src_h >> 16,663 ((new_plane_state->src_w & 0xffff) * 15625) >> 10,
654 ((new_plane_state->src_h & 0xffff) * 15625) >> 10,664 new_plane_state->src_h >> 16,
655 new_plane_state->src_x >> 16,665 ((new_plane_state->src_h & 0xffff) * 15625) >> 10,
656 ((new_plane_state->src_x & 0xffff) * 15625) >> 10,666 new_plane_state->src_x >> 16,
657 new_plane_state->src_y >> 16,667 ((new_plane_state->src_x & 0xffff) * 15625) >> 10,
658 ((new_plane_state->src_y & 0xffff) * 15625) >> 10,668 new_plane_state->src_y >> 16,
659 fb->width, fb->height);669 ((new_plane_state->src_y & 0xffff) * 15625) >> 10,
670 fb->width, fb->height);
660 return -ENOSPC;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 clips->y1 < 0 ||682 clips->y1 < 0 ||
672 clips->x2 > fb_width ||683 clips->x2 > fb_width ||
673 clips->y2 > fb_height) {684 clips->y2 > fb_height) {
674 DRM_DEBUG_ATOMIC("[PLANE:%d:%s] invalid damage clip %d %d %d %d\n",685 drm_dbg_atomic(plane->dev,
675 plane->base.id, plane->name, clips->x1,686 "[PLANE:%d:%s] invalid damage clip %d %d %d %d\n",
676 clips->y1, clips->x2, clips->y2);687 plane->base.id, plane->name, clips->x1,
688 clips->y1, clips->x2, clips->y2);
677 return -EINVAL;689 return -EINVAL;
678 }690 }
679 clips++;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 if (plane_switching_crtc(old_plane_state, new_plane_state)) {695 if (plane_switching_crtc(old_plane_state, new_plane_state)) {
684 DRM_DEBUG_ATOMIC("[PLANE:%d:%s] switching CRTC directly\n",696 drm_dbg_atomic(plane->dev,
685 plane->base.id, plane->name);697 "[PLANE:%d:%s] switching CRTC directly\n",
698 plane->base.id, plane->name);
686 return -EINVAL;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 state->num_private_objs = num_objs;860 state->num_private_objs = num_objs;
848 861
849 DRM_DEBUG_ATOMIC("Added new private object %p state %p to %p\n",862 drm_dbg_atomic(state->dev,
850 obj, obj_state, state);863 "Added new private object %p state %p to %p\n",
864 obj, obj_state, state);
851 865
852 return obj_state;866 return obj_state;
853}867}
@@ -1027,7 +1041,7 @@ drm_atomic_get_connector_state(struct drm_atomic_state *state, · 173 unmodified lines
1027 state->connectors[index].ptr = connector;1041 state->connectors[index].ptr = connector;
1028 connector_state->state = state;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 connector->base.id, connector->name,1045 connector->base.id, connector->name,
1032 connector_state, state);1046 connector_state, state);
1033 1047
@@ -1160,8 +1174,9 @@ drm_atomic_add_encoder_bridges(struct drm_atomic_state *state, · 126 unmodified lines
1160 if (!encoder)1174 if (!encoder)
1161 return 0;1175 return 0;
1162 1176
1163 DRM_DEBUG_ATOMIC("Adding all bridges for [encoder:%d:%s] to %p\n",1177 drm_dbg_atomic(encoder->dev,
1164 encoder->base.id, encoder->name, state);1178 "Adding all bridges for [encoder:%d:%s] to %p\n",
1179 encoder->base.id, encoder->name, state);
1165 1180
1166 drm_for_each_bridge_in_chain(encoder, bridge) {1181 drm_for_each_bridge_in_chain(encoder, bridge) {
1167 /* Skip bridges that don't implement the atomic state hooks. */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 if (ret)1228 if (ret)
1214 return ret;1229 return ret;
1215 1230
1216 DRM_DEBUG_ATOMIC("Adding all current connectors for [CRTC:%d:%s] to %p\n",1231 drm_dbg_atomic(crtc->dev,
1217 crtc->base.id, crtc->name, state);1232 "Adding all current connectors for [CRTC:%d:%s] to %p\n",
1233 crtc->base.id, crtc->name, state);
1218 1234
1219 /*1235 /*
1220 * Changed connectors are already in @state, so only need to look1236 * 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 WARN_ON(!drm_atomic_get_new_crtc_state(state, crtc));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",1286 drm_dbg_atomic(crtc->dev,
1271 crtc->base.id, crtc->name, state);1287 "Adding all current planes for [CRTC:%d:%s] to %p\n",
1288 crtc->base.id, crtc->name, state);
1272 1289
1273 drm_for_each_plane_mask(plane, state->dev, old_crtc_state->plane_mask) {1290 drm_for_each_plane_mask(plane, state->dev, old_crtc_state->plane_mask) {
1274 struct drm_plane_state *plane_state =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 unsigned int affected_crtc = 0;1325 unsigned int affected_crtc = 0;
1309 int i, ret = 0;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 for_each_new_crtc_in_state(state, crtc, new_crtc_state, i)1330 for_each_new_crtc_in_state(state, crtc, new_crtc_state, i)
1314 requested_crtc |= drm_crtc_mask(crtc);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 for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) {1333 for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) {
1317 ret = drm_atomic_plane_check(old_plane_state, new_plane_state);1334 ret = drm_atomic_plane_check(old_plane_state, new_plane_state);
1318 if (ret) {1335 if (ret) {
1319 DRM_DEBUG_ATOMIC("[PLANE:%d:%s] atomic core check failed\n",1336 drm_dbg_atomic(dev, "[PLANE:%d:%s] atomic core check failed\n",
1320 plane->base.id, plane->name);1337 plane->base.id, plane->name);
1321 return ret;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 for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {1342 for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
1326 ret = drm_atomic_crtc_check(old_crtc_state, new_crtc_state);1343 ret = drm_atomic_crtc_check(old_crtc_state, new_crtc_state);
1327 if (ret) {1344 if (ret) {
1328 DRM_DEBUG_ATOMIC("[CRTC:%d:%s] atomic core check failed\n",1345 drm_dbg_atomic(dev, "[CRTC:%d:%s] atomic core check failed\n",
1329 crtc->base.id, crtc->name);1346 crtc->base.id, crtc->name);
1330 return ret;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 for_each_new_connector_in_state(state, conn, conn_state, i) {1351 for_each_new_connector_in_state(state, conn, conn_state, i) {
1335 ret = drm_atomic_connector_check(conn, conn_state);1352 ret = drm_atomic_connector_check(conn, conn_state);
1336 if (ret) {1353 if (ret) {
1337 DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] atomic core check failed\n",1354 drm_dbg_atomic(dev, "[CONNECTOR:%d:%s] atomic core check failed\n",
1338 conn->base.id, conn->name);1355 conn->base.id, conn->name);
1339 return ret;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 ret = config->funcs->atomic_check(state->dev, state);1361 ret = config->funcs->atomic_check(state->dev, state);
1345 1362
1346 if (ret) {1363 if (ret) {
1347 DRM_DEBUG_ATOMIC("atomic driver check for %p failed: %d\n",1364 drm_dbg_atomic(dev, "atomic driver check for %p failed: %d\n",
1348 state, ret);1365 state, ret);
1349 return ret;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 if (!state->allow_modeset) {1370 if (!state->allow_modeset) {
1354 for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) {1371 for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) {
1355 if (drm_atomic_crtc_needs_modeset(new_crtc_state)) {1372 if (drm_atomic_crtc_needs_modeset(new_crtc_state)) {
1356 DRM_DEBUG_ATOMIC("[CRTC:%d:%s] requires full modeset\n",1373 drm_dbg_atomic(dev, "[CRTC:%d:%s] requires full modeset\n",
1357 crtc->base.id, crtc->name);1374 crtc->base.id, crtc->name);
1358 return -EINVAL;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 * so compositors know what's going on.1391 * so compositors know what's going on.
1375 */1392 */
1376 if (affected_crtc != requested_crtc) {1393 if (affected_crtc != requested_crtc) {
1377 DRM_DEBUG_ATOMIC("driver added CRTC to commit: requested 0x%x, affected 0x%0x\n",1394 drm_dbg_atomic(dev,
1378 requested_crtc, affected_crtc);1395 "driver added CRTC to commit: requested 0x%x, affected 0x%0x\n",
1396 requested_crtc, affected_crtc);
1379 WARN(!state->allow_modeset, "adding CRTC not allowed without modesets: requested 0x%x, affected 0x%0x\n",1397 WARN(!state->allow_modeset, "adding CRTC not allowed without modesets: requested 0x%x, affected 0x%0x\n",
1380 requested_crtc, affected_crtc);1398 requested_crtc, affected_crtc);
1381 }1399 }
@@ -1407,7 +1425,7 @@ int drm_atomic_commit(struct drm_atomic_state *state) · 25 unmodified lines
1407 if (ret)1425 if (ret)
1408 return ret;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 return config->funcs->atomic_commit(state->dev, state, false);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 if (ret)1454 if (ret)
1437 return ret;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 return config->funcs->atomic_commit(state->dev, state, true);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 int i;1651 int i;
1634 1652
1635 if (!p) {1653 if (!p) {
1636 DRM_ERROR("invalid drm printer\n");1654 drm_err(state->dev, "invalid drm printer\n");
1637 return;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 for_each_new_plane_in_state(state, plane, plane_state, i)1660 for_each_new_plane_in_state(state, plane, plane_state, i)
1643 drm_atomic_plane_print_state(p, plane_state);1661 drm_atomic_plane_print_state(p, plane_state);
drivers/gpu/drm/drm_atomic_helper.c+134−109
@@ -132,9 +132,10 @@ static int handle_conflicting_encoders(struct drm_atomic_state *state, · 131 unmodified lines
132 132
133 if (new_encoder) {133 if (new_encoder) {
134 if (encoder_mask & drm_encoder_mask(new_encoder)) {134 if (encoder_mask & drm_encoder_mask(new_encoder)) {
135 DRM_DEBUG_ATOMIC("[ENCODER:%d:%s] on [CONNECTOR:%d:%s] already assigned\n",135 drm_dbg_atomic(connector->dev,
136 new_encoder->base.id, new_encoder->name,136 "[ENCODER:%d:%s] on [CONNECTOR:%d:%s] already assigned\n",
137 connector->base.id, connector->name);137 new_encoder->base.id, new_encoder->name,
138 connector->base.id, connector->name);
138 139
139 return -EINVAL;140 return -EINVAL;
140 }141 }
@@ -169,11 +170,12 @@ static int handle_conflicting_encoders(struct drm_atomic_state *state, · 28 unmodified lines
169 continue;170 continue;
170 171
171 if (!disable_conflicting_encoders) {172 if (!disable_conflicting_encoders) {
172 DRM_DEBUG_ATOMIC("[ENCODER:%d:%s] in use on [CRTC:%d:%s] by [CONNECTOR:%d:%s]\n",173 drm_dbg_atomic(connector->dev,
173 encoder->base.id, encoder->name,174 "[ENCODER:%d:%s] in use on [CRTC:%d:%s] by [CONNECTOR:%d:%s]\n",
174 connector->state->crtc->base.id,175 encoder->base.id, encoder->name,
175 connector->state->crtc->name,176 connector->state->crtc->base.id,
176 connector->base.id, connector->name);177 connector->state->crtc->name,
178 connector->base.id, connector->name);
177 ret = -EINVAL;179 ret = -EINVAL;
178 goto out;180 goto out;
179 }181 }
@@ -184,10 +186,11 @@ static int handle_conflicting_encoders(struct drm_atomic_state *state, · 4 unmodified lines
184 goto out;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",189 drm_dbg_atomic(connector->dev,
188 encoder->base.id, encoder->name,190 "[ENCODER:%d:%s] in use on [CRTC:%d:%s], disabling [CONNECTOR:%d:%s]\n",
189 new_conn_state->crtc->base.id, new_conn_state->crtc->name,191 encoder->base.id, encoder->name,
190 connector->base.id, connector->name);192 new_conn_state->crtc->base.id, new_conn_state->crtc->name,
193 connector->base.id, connector->name);
191 194
192 crtc_state = drm_atomic_get_new_crtc_state(state, new_conn_state->crtc);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 encoder_crtc = old_connector_state->crtc;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",274 drm_dbg_atomic(encoder->dev,
272 encoder->base.id, encoder->name,275 "[ENCODER:%d:%s] in use on [CRTC:%d:%s], stealing it\n",
273 encoder_crtc->base.id, encoder_crtc->name);276 encoder->base.id, encoder->name,
277 encoder_crtc->base.id, encoder_crtc->name);
274 278
275 set_best_encoder(state, new_connector_state, NULL);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 struct drm_encoder *new_encoder;295 struct drm_encoder *new_encoder;
292 struct drm_crtc_state *crtc_state;296 struct drm_crtc_state *crtc_state;
293 297
294 DRM_DEBUG_ATOMIC("Updating routing for [CONNECTOR:%d:%s]\n",298 drm_dbg_atomic(connector->dev, "Updating routing for [CONNECTOR:%d:%s]\n",
295 connector->base.id,299 connector->base.id, connector->name);
296 connector->name);
297 300
298 if (old_connector_state->crtc != new_connector_state->crtc) {301 if (old_connector_state->crtc != new_connector_state->crtc) {
299 if (old_connector_state->crtc) {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 if (!new_connector_state->crtc) {313 if (!new_connector_state->crtc) {
311 DRM_DEBUG_ATOMIC("Disabling [CONNECTOR:%d:%s]\n",314 drm_dbg_atomic(connector->dev, "Disabling [CONNECTOR:%d:%s]\n",
312 connector->base.id,315 connector->base.id, connector->name);
313 connector->name);
314 316
315 set_best_encoder(state, new_connector_state, NULL);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 if (!state->duplicated && drm_connector_is_unregistered(connector) &&342 if (!state->duplicated && drm_connector_is_unregistered(connector) &&
341 crtc_state->active) {343 crtc_state->active) {
342 DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] is not registered\n",344 drm_dbg_atomic(connector->dev,
343 connector->base.id, connector->name);345 "[CONNECTOR:%d:%s] is not registered\n",
346 connector->base.id, connector->name);
344 return -EINVAL;347 return -EINVAL;
345 }348 }
346 349
@@ -354,31 +357,33 @@ update_connector_routing(struct drm_atomic_state *state, · 7 unmodified lines
354 new_encoder = drm_connector_get_single_encoder(connector);357 new_encoder = drm_connector_get_single_encoder(connector);
355 358
356 if (!new_encoder) {359 if (!new_encoder) {
357 DRM_DEBUG_ATOMIC("No suitable encoder found for [CONNECTOR:%d:%s]\n",360 drm_dbg_atomic(connector->dev,
358 connector->base.id,361 "No suitable encoder found for [CONNECTOR:%d:%s]\n",
359 connector->name);362 connector->base.id, connector->name);
360 return -EINVAL;363 return -EINVAL;
361 }364 }
362 365
363 if (!drm_encoder_crtc_ok(new_encoder, new_connector_state->crtc)) {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",367 drm_dbg_atomic(connector->dev,
365 new_encoder->base.id,368 "[ENCODER:%d:%s] incompatible with [CRTC:%d:%s]\n",
366 new_encoder->name,369 new_encoder->base.id,
367 new_connector_state->crtc->base.id,370 new_encoder->name,
368 new_connector_state->crtc->name);371 new_connector_state->crtc->base.id,
372 new_connector_state->crtc->name);
369 return -EINVAL;373 return -EINVAL;
370 }374 }
371 375
372 if (new_encoder == new_connector_state->best_encoder) {376 if (new_encoder == new_connector_state->best_encoder) {
373 set_best_encoder(state, new_connector_state, new_encoder);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",379 drm_dbg_atomic(connector->dev,
376 connector->base.id,380 "[CONNECTOR:%d:%s] keeps [ENCODER:%d:%s], now on [CRTC:%d:%s]\n",
377 connector->name,381 connector->base.id,
378 new_encoder->base.id,382 connector->name,
379 new_encoder->name,383 new_encoder->base.id,
380 new_connector_state->crtc->base.id,384 new_encoder->name,
381 new_connector_state->crtc->name);385 new_connector_state->crtc->base.id,
386 new_connector_state->crtc->name);
382 387
383 return 0;388 return 0;
384 }389 }
@@ -389,13 +394,14 @@ update_connector_routing(struct drm_atomic_state *state, · 4 unmodified lines
389 394
390 crtc_state->connectors_changed = true;395 crtc_state->connectors_changed = true;
391 396
392 DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] using [ENCODER:%d:%s] on [CRTC:%d:%s]\n",397 drm_dbg_atomic(connector->dev,
393 connector->base.id,398 "[CONNECTOR:%d:%s] using [ENCODER:%d:%s] on [CRTC:%d:%s]\n",
394 connector->name,399 connector->base.id,
395 new_encoder->base.id,400 connector->name,
396 new_encoder->name,401 new_encoder->base.id,
397 new_connector_state->crtc->base.id,402 new_encoder->name,
398 new_connector_state->crtc->name);403 new_connector_state->crtc->base.id,
404 new_connector_state->crtc->name);
399 405
400 return 0;406 return 0;
401}407}
@@ -443,7 +449,7 @@ mode_fixup(struct drm_atomic_state *state) · 41 unmodified lines
443 new_crtc_state,449 new_crtc_state,
444 new_conn_state);450 new_conn_state);
445 if (ret) {451 if (ret) {
446 DRM_DEBUG_ATOMIC("Bridge atomic check failed\n");452 drm_dbg_atomic(encoder->dev, "Bridge atomic check failed\n");
447 return ret;453 return ret;
448 }454 }
449 455
@@ -451,16 +457,18 @@ mode_fixup(struct drm_atomic_state *state) · 1 unmodified line
451 ret = funcs->atomic_check(encoder, new_crtc_state,457 ret = funcs->atomic_check(encoder, new_crtc_state,
452 new_conn_state);458 new_conn_state);
453 if (ret) {459 if (ret) {
454 DRM_DEBUG_ATOMIC("[ENCODER:%d:%s] check failed\n",460 drm_dbg_atomic(encoder->dev,
455 encoder->base.id, encoder->name);461 "[ENCODER:%d:%s] check failed\n",
462 encoder->base.id, encoder->name);
456 return ret;463 return ret;
457 }464 }
458 } else if (funcs && funcs->mode_fixup) {465 } else if (funcs && funcs->mode_fixup) {
459 ret = funcs->mode_fixup(encoder, &new_crtc_state->mode,466 ret = funcs->mode_fixup(encoder, &new_crtc_state->mode,
460 &new_crtc_state->adjusted_mode);467 &new_crtc_state->adjusted_mode);
461 if (!ret) {468 if (!ret) {
462 DRM_DEBUG_ATOMIC("[ENCODER:%d:%s] fixup failed\n",469 drm_dbg_atomic(encoder->dev,
463 encoder->base.id, encoder->name);470 "[ENCODER:%d:%s] fixup failed\n",
471 encoder->base.id, encoder->name);
464 return -EINVAL;472 return -EINVAL;
465 }473 }
466 }474 }
@@ -483,8 +491,8 @@ mode_fixup(struct drm_atomic_state *state) · 16 unmodified lines
483 ret = funcs->mode_fixup(crtc, &new_crtc_state->mode,491 ret = funcs->mode_fixup(crtc, &new_crtc_state->mode,
484 &new_crtc_state->adjusted_mode);492 &new_crtc_state->adjusted_mode);
485 if (!ret) {493 if (!ret) {
486 DRM_DEBUG_ATOMIC("[CRTC:%d:%s] fixup failed\n",494 drm_dbg_atomic(crtc->dev, "[CRTC:%d:%s] fixup failed\n",
487 crtc->base.id, crtc->name);495 crtc->base.id, crtc->name);
488 return -EINVAL;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 ret = drm_encoder_mode_valid(encoder, mode);511 ret = drm_encoder_mode_valid(encoder, mode);
504 if (ret != MODE_OK) {512 if (ret != MODE_OK) {
505 DRM_DEBUG_ATOMIC("[ENCODER:%d:%s] mode_valid() failed\n",513 drm_dbg_atomic(encoder->dev,
506 encoder->base.id, encoder->name);514 "[ENCODER:%d:%s] mode_valid() failed\n",
515 encoder->base.id, encoder->name);
507 return ret;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 ret = drm_bridge_chain_mode_valid(bridge, &connector->display_info,520 ret = drm_bridge_chain_mode_valid(bridge, &connector->display_info,
512 mode);521 mode);
513 if (ret != MODE_OK) {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 return ret;524 return ret;
516 }525 }
517 526
518 ret = drm_crtc_mode_valid(crtc, mode);527 ret = drm_crtc_mode_valid(crtc, mode);
519 if (ret != MODE_OK) {528 if (ret != MODE_OK) {
520 DRM_DEBUG_ATOMIC("[CRTC:%d:%s] mode_valid() failed\n",529 drm_dbg_atomic(encoder->dev, "[CRTC:%d:%s] mode_valid() failed\n",
521 crtc->base.id, crtc->name);530 crtc->base.id, crtc->name);
522 return ret;531 return ret;
523 }532 }
524 533
@@ -619,14 +628,14 @@ drm_atomic_helper_check_modeset(struct drm_device *dev, · 94 unmodified lines
619 WARN_ON(!drm_modeset_is_locked(&crtc->mutex));628 WARN_ON(!drm_modeset_is_locked(&crtc->mutex));
620 629
621 if (!drm_mode_equal(&old_crtc_state->mode, &new_crtc_state->mode)) {630 if (!drm_mode_equal(&old_crtc_state->mode, &new_crtc_state->mode)) {
622 DRM_DEBUG_ATOMIC("[CRTC:%d:%s] mode changed\n",631 drm_dbg_atomic(dev, "[CRTC:%d:%s] mode changed\n",
623 crtc->base.id, crtc->name);632 crtc->base.id, crtc->name);
624 new_crtc_state->mode_changed = true;633 new_crtc_state->mode_changed = true;
625 }634 }
626 635
627 if (old_crtc_state->enable != new_crtc_state->enable) {636 if (old_crtc_state->enable != new_crtc_state->enable) {
628 DRM_DEBUG_ATOMIC("[CRTC:%d:%s] enable changed\n",637 drm_dbg_atomic(dev, "[CRTC:%d:%s] enable changed\n",
629 crtc->base.id, crtc->name);638 crtc->base.id, crtc->name);
630 639
631 /*640 /*
632 * For clarity this assignment is done here, but641 * 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 if (old_crtc_state->active != new_crtc_state->active) {652 if (old_crtc_state->active != new_crtc_state->active) {
644 DRM_DEBUG_ATOMIC("[CRTC:%d:%s] active changed\n",653 drm_dbg_atomic(dev, "[CRTC:%d:%s] active changed\n",
645 crtc->base.id, crtc->name);654 crtc->base.id, crtc->name);
646 new_crtc_state->active_changed = true;655 new_crtc_state->active_changed = true;
647 }656 }
648 657
649 if (new_crtc_state->enable != has_connectors) {658 if (new_crtc_state->enable != has_connectors) {
650 DRM_DEBUG_ATOMIC("[CRTC:%d:%s] enabled/connectors mismatch\n",659 drm_dbg_atomic(dev, "[CRTC:%d:%s] enabled/connectors mismatch\n",
651 crtc->base.id, crtc->name);660 crtc->base.id, crtc->name);
652 661
653 return -EINVAL;662 return -EINVAL;
654 }663 }
@@ -708,10 +717,11 @@ drm_atomic_helper_check_modeset(struct drm_device *dev, · 53 unmodified lines
708 if (!drm_atomic_crtc_needs_modeset(new_crtc_state))717 if (!drm_atomic_crtc_needs_modeset(new_crtc_state))
709 continue;718 continue;
710 719
711 DRM_DEBUG_ATOMIC("[CRTC:%d:%s] needs all connectors, enable: %c, active: %c\n",720 drm_dbg_atomic(dev,
712 crtc->base.id, crtc->name,721 "[CRTC:%d:%s] needs all connectors, enable: %c, active: %c\n",
713 new_crtc_state->enable ? 'y' : 'n',722 crtc->base.id, crtc->name,
714 new_crtc_state->active ? 'y' : 'n');723 new_crtc_state->enable ? 'y' : 'n',
724 new_crtc_state->active ? 'y' : 'n');
715 725
716 ret = drm_atomic_add_affected_connectors(state, crtc);726 ret = drm_atomic_add_affected_connectors(state, crtc);
717 if (ret != 0)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 if (!crtc_state->enable && !can_update_disabled) {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 return -EINVAL;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 hscale = drm_rect_calc_hscale(src, dst, min_scale, max_scale);839 hscale = drm_rect_calc_hscale(src, dst, min_scale, max_scale);
829 vscale = drm_rect_calc_vscale(src, dst, min_scale, max_scale);840 vscale = drm_rect_calc_vscale(src, dst, min_scale, max_scale);
830 if (hscale < 0 || vscale < 0) {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 drm_rect_debug_print("src: ", &plane_state->src, true);844 drm_rect_debug_print("src: ", &plane_state->src, true);
833 drm_rect_debug_print("dst: ", &plane_state->dst, false);845 drm_rect_debug_print("dst: ", &plane_state->dst, false);
834 return -ERANGE;846 return -ERANGE;
@@ -852,7 +864,8 @@ int drm_atomic_helper_check_plane_state(struct drm_plane_state *plane_state, · 17 unmodified lines
852 return 0;864 return 0;
853 865
854 if (!can_position && !drm_rect_equals(dst, &clip)) {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 drm_rect_debug_print("dst: ", dst, false);869 drm_rect_debug_print("dst: ", dst, false);
857 drm_rect_debug_print("clip: ", &clip, false);870 drm_rect_debug_print("clip: ", &clip, false);
858 return -EINVAL;871 return -EINVAL;
@@ -904,8 +917,9 @@ drm_atomic_helper_check_planes(struct drm_device *dev, · 45 unmodified lines
904 917
905 ret = funcs->atomic_check(plane, state);918 ret = funcs->atomic_check(plane, state);
906 if (ret) {919 if (ret) {
907 DRM_DEBUG_ATOMIC("[PLANE:%d:%s] atomic driver check failed\n",920 drm_dbg_atomic(plane->dev,
908 plane->base.id, plane->name);921 "[PLANE:%d:%s] atomic driver check failed\n",
922 plane->base.id, plane->name);
909 return ret;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 ret = funcs->atomic_check(crtc, state);935 ret = funcs->atomic_check(crtc, state);
922 if (ret) {936 if (ret) {
923 DRM_DEBUG_ATOMIC("[CRTC:%d:%s] atomic driver check failed\n",937 drm_dbg_atomic(crtc->dev,
924 crtc->base.id, crtc->name);938 "[CRTC:%d:%s] atomic driver check failed\n",
939 crtc->base.id, crtc->name);
925 return ret;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 funcs = encoder->helper_private;1065 funcs = encoder->helper_private;
1051 1066
1052 DRM_DEBUG_ATOMIC("disabling [ENCODER:%d:%s]\n",1067 drm_dbg_atomic(dev, "disabling [ENCODER:%d:%s]\n",
1053 encoder->base.id, encoder->name);1068 encoder->base.id, encoder->name);
1054 1069
1055 /*1070 /*
1056 * Each encoder has at most one connector (since we always steal1071 * 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 funcs = crtc->helper_private;1103 funcs = crtc->helper_private;
1089 1104
1090 DRM_DEBUG_ATOMIC("disabling [CRTC:%d:%s]\n",1105 drm_dbg_atomic(dev, "disabling [CRTC:%d:%s]\n",
1091 crtc->base.id, crtc->name);1106 crtc->base.id, crtc->name);
1092 1107
1093 1108
1094 /* Right function depends upon target state. */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 funcs = crtc->helper_private;1244 funcs = crtc->helper_private;
1230 1245
1231 if (new_crtc_state->enable && funcs->mode_set_nofb) {1246 if (new_crtc_state->enable && funcs->mode_set_nofb) {
1232 DRM_DEBUG_ATOMIC("modeset on [CRTC:%d:%s]\n",1247 drm_dbg_atomic(dev, "modeset on [CRTC:%d:%s]\n",
1233 crtc->base.id, crtc->name);1248 crtc->base.id, crtc->name);
1234 1249
1235 funcs->mode_set_nofb(crtc);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 if (!new_crtc_state->mode_changed)1269 if (!new_crtc_state->mode_changed)
1255 continue;1270 continue;
1256 1271
1257 DRM_DEBUG_ATOMIC("modeset on [ENCODER:%d:%s]\n",1272 drm_dbg_atomic(dev, "modeset on [ENCODER:%d:%s]\n",
1258 encoder->base.id, encoder->name);1273 encoder->base.id, encoder->name);
1259 1274
1260 /*1275 /*
1261 * Each encoder has at most one connector (since we always steal1276 * 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 funcs = crtc->helper_private;1372 funcs = crtc->helper_private;
1358 1373
1359 if (new_crtc_state->enable) {1374 if (new_crtc_state->enable) {
1360 DRM_DEBUG_ATOMIC("enabling [CRTC:%d:%s]\n",1375 drm_dbg_atomic(dev, "enabling [CRTC:%d:%s]\n",
1361 crtc->base.id, crtc->name);1376 crtc->base.id, crtc->name);
1362 if (funcs->atomic_enable)1377 if (funcs->atomic_enable)
1363 funcs->atomic_enable(crtc, old_state);1378 funcs->atomic_enable(crtc, old_state);
1364 else if (funcs->commit)1379 else if (funcs->commit)
@@ -1381,8 +1396,8 @@ void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev, · 16 unmodified lines
1381 encoder = new_conn_state->best_encoder;1396 encoder = new_conn_state->best_encoder;
1382 funcs = encoder->helper_private;1397 funcs = encoder->helper_private;
1383 1398
1384 DRM_DEBUG_ATOMIC("enabling [ENCODER:%d:%s]\n",1399 drm_dbg_atomic(dev, "enabling [ENCODER:%d:%s]\n",
1385 encoder->base.id, encoder->name);1400 encoder->base.id, encoder->name);
1386 1401
1387 /*1402 /*
1388 * Each encoder has at most one connector (since we always steal1403 * 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 ret = wait_for_completion_timeout(&commit->flip_done, 10 * HZ);1567 ret = wait_for_completion_timeout(&commit->flip_done, 10 * HZ);
1553 if (ret == 0)1568 if (ret == 0)
1554 DRM_ERROR("[CRTC:%d:%s] flip_done timed out\n",1569 drm_err(dev, "[CRTC:%d:%s] flip_done timed out\n",
1555 crtc->base.id, crtc->name);1570 crtc->base.id, crtc->name);
1556 }1571 }
1557 1572
1558 if (old_state->fake_commit)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 if (old_plane_state->commit &&1755 if (old_plane_state->commit &&
1741 !try_wait_for_completion(&old_plane_state->commit->hw_done)) {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",1757 drm_dbg_atomic(dev,
1743 plane->base.id, plane->name);1758 "[PLANE:%d:%s] inflight previous commit preventing async commit\n",
1759 plane->base.id, plane->name);
1744 return -EBUSY;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 if (!completed && nonblock) {1979 if (!completed && nonblock) {
1964 spin_unlock(&crtc->commit_lock);1980 spin_unlock(&crtc->commit_lock);
1965 DRM_DEBUG_ATOMIC("[CRTC:%d:%s] busy with a previous commit\n",1981 drm_dbg_atomic(crtc->dev,
1966 crtc->base.id, crtc->name);1982 "[CRTC:%d:%s] busy with a previous commit\n",
1983 crtc->base.id, crtc->name);
1967 1984
1968 return -EBUSY;1985 return -EBUSY;
1969 }1986 }
@@ -1985,8 +2002,8 @@ static int stall_checks(struct drm_crtc *crtc, bool nonblock) · 15 unmodified lines
1985 ret = wait_for_completion_interruptible_timeout(&stall_commit->cleanup_done,2002 ret = wait_for_completion_interruptible_timeout(&stall_commit->cleanup_done,
1986 10*HZ);2003 10*HZ);
1987 if (ret == 0)2004 if (ret == 0)
1988 DRM_ERROR("[CRTC:%d:%s] cleanup_done timed out\n",2005 drm_err(crtc->dev, "[CRTC:%d:%s] cleanup_done timed out\n",
1989 crtc->base.id, crtc->name);2006 crtc->base.id, crtc->name);
1990 2007
1991 drm_crtc_commit_put(stall_commit);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 if (nonblock && old_conn_state->commit &&2168 if (nonblock && old_conn_state->commit &&
2152 !try_wait_for_completion(&old_conn_state->commit->flip_done)) {2169 !try_wait_for_completion(&old_conn_state->commit->flip_done)) {
2153 DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] busy with a previous commit\n",2170 drm_dbg_atomic(conn->dev,
2154 conn->base.id, conn->name);2171 "[CONNECTOR:%d:%s] busy with a previous commit\n",
2172 conn->base.id, conn->name);
2155 2173
2156 return -EBUSY;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 if (nonblock && old_plane_state->commit &&2190 if (nonblock && old_plane_state->commit &&
2173 !try_wait_for_completion(&old_plane_state->commit->flip_done)) {2191 !try_wait_for_completion(&old_plane_state->commit->flip_done)) {
2174 DRM_DEBUG_ATOMIC("[PLANE:%d:%s] busy with a previous commit\n",2192 drm_dbg_atomic(plane->dev,
2175 plane->base.id, plane->name);2193 "[PLANE:%d:%s] busy with a previous commit\n",
2194 plane->base.id, plane->name);
2176 2195
2177 return -EBUSY;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 for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) {2237 for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) {
2219 ret = drm_crtc_commit_wait(old_crtc_state->commit);2238 ret = drm_crtc_commit_wait(old_crtc_state->commit);
2220 if (ret)2239 if (ret)
2221 DRM_ERROR("[CRTC:%d:%s] commit wait timed out\n",2240 drm_err(crtc->dev,
2222 crtc->base.id, crtc->name);2241 "[CRTC:%d:%s] commit wait timed out\n",
2242 crtc->base.id, crtc->name);
2223 }2243 }
2224 2244
2225 for_each_old_connector_in_state(old_state, conn, old_conn_state, i) {2245 for_each_old_connector_in_state(old_state, conn, old_conn_state, i) {
2226 ret = drm_crtc_commit_wait(old_conn_state->commit);2246 ret = drm_crtc_commit_wait(old_conn_state->commit);
2227 if (ret)2247 if (ret)
2228 DRM_ERROR("[CONNECTOR:%d:%s] commit wait timed out\n",2248 drm_err(conn->dev,
2229 conn->base.id, conn->name);2249 "[CONNECTOR:%d:%s] commit wait timed out\n",
2250 conn->base.id, conn->name);
2230 }2251 }
2231 2252
2232 for_each_old_plane_in_state(old_state, plane, old_plane_state, i) {2253 for_each_old_plane_in_state(old_state, plane, old_plane_state, i) {
2233 ret = drm_crtc_commit_wait(old_plane_state->commit);2254 ret = drm_crtc_commit_wait(old_plane_state->commit);
2234 if (ret)2255 if (ret)
2235 DRM_ERROR("[PLANE:%d:%s] commit wait timed out\n",2256 drm_err(plane->dev,
2236 plane->base.id, plane->name);2257 "[PLANE:%d:%s] commit wait timed out\n",
2258 plane->base.id, plane->name);
2237 }2259 }
2238}2260}
2239EXPORT_SYMBOL(drm_atomic_helper_wait_for_dependencies);2261EXPORT_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 ret = drm_atomic_helper_disable_all(dev, &ctx);3143 ret = drm_atomic_helper_disable_all(dev, &ctx);
3122 if (ret)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 DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);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 /* Make sure we don't accidentally do a full modeset. */3404 /* Make sure we don't accidentally do a full modeset. */
3381 state->allow_modeset = false;3405 state->allow_modeset = false;
3382 if (!crtc_state->active) {3406 if (!crtc_state->active) {
3383 DRM_DEBUG_ATOMIC("[CRTC:%d:%s] disabled, rejecting legacy flip\n",3407 drm_dbg_atomic(crtc->dev,
3384 crtc->base.id, crtc->name);3408 "[CRTC:%d:%s] disabled, rejecting legacy flip\n",
3409 crtc->base.id, crtc->name);
3385 return -EINVAL;3410 return -EINVAL;
3386 }3411 }
3387 3412
drivers/gpu/drm/drm_atomic_uapi.c+1−1
@@ -773,7 +773,7 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector, · 772 unmodified lines
773 state->scaling_mode = val;773 state->scaling_mode = val;
774 } else if (property == config->content_protection_property) {774 } else if (property == config->content_protection_property) {
775 if (val == DRM_MODE_CONTENT_PROTECTION_ENABLED) {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 return -EINVAL;777 return -EINVAL;
778 }778 }
779 state->content_protection = val;779 state->content_protection = val;
drivers/gpu/drm/drm_auth.c+8−4
@@ -106,7 +106,7 @@ int drm_getmagic(struct drm_device *dev, void *data, struct drm_file *file_priv) · 105 unmodified lines
106 auth->magic = file_priv->magic;106 auth->magic = file_priv->magic;
107 mutex_unlock(&dev->master_mutex);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 return ret < 0 ? ret : 0;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 struct drm_auth *auth = data;117 struct drm_auth *auth = data;
118 struct drm_file *file;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 mutex_lock(&dev->master_mutex);122 mutex_lock(&dev->master_mutex);
123 file = idr_find(&file_priv->master->magic_map, auth->magic);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 if (file_priv->master->lessor != NULL) {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 ret = -EINVAL;280 ret = -EINVAL;
279 goto out_unlock;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 if (file_priv->master->lessor != NULL) {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 ret = -EINVAL;323 ret = -EINVAL;
320 goto out_unlock;324 goto out_unlock;
321 }325 }
drivers/gpu/drm/drm_nomodeset.c+24−0
@@ -0,0 +1,24 @@
1// SPDX-License-Identifier: GPL-2.0
2
3#include <linux/module.h>
4#include <linux/types.h>
5
6static bool drm_nomodeset;
7
8bool drm_firmware_drivers_only(void)
9{
10 return drm_nomodeset;
11}
12EXPORT_SYMBOL(drm_firmware_drivers_only);
13
14static 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);
drivers/gpu/drm/drm_panel_orientation_quirks.c+6−0
@@ -262,6 +262,12 @@ static const struct dmi_system_id orientation_data[] = { · 261 unmodified lines
262 DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad D330-10IGM"),262 DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad D330-10IGM"),
263 },263 },
264 .driver_data = (void *)&lcd1200x1920_rightside_up,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 }, { /* OneGX1 Pro */271 }, { /* OneGX1 Pro */
266 .matches = {272 .matches = {
267 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "SYSTEM_MANUFACTURER"),273 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "SYSTEM_MANUFACTURER"),
drivers/gpu/drm/i915/i915_module.c+2−2
@@ -4,7 +4,7 @@ · 3 unmodified lines
4 * Copyright © 2021 Intel Corporation4 * Copyright © 2021 Intel Corporation
5 */5 */
6 6
7#include <linux/console.h>7#include <drm/drm_drv.h>
8 8
9#include "gem/i915_gem_context.h"9#include "gem/i915_gem_context.h"
10#include "gem/i915_gem_object.h"10#include "gem/i915_gem_object.h"
@@ -31,7 +31,7 @@ static int i915_check_nomodeset(void) · 20 unmodified lines
31 if (i915_modparams.modeset == 0)31 if (i915_modparams.modeset == 0)
32 use_kms = false;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 use_kms = false;35 use_kms = false;
36 36
37 if (!use_kms) {37 if (!use_kms) {
drivers/gpu/drm/mgag200/mgag200_drv.c+1−2
@@ -6,7 +6,6 @@ · 5 unmodified lines
6 * Dave Airlie6 * Dave Airlie
7 */7 */
8 8
9#include <linux/console.h>
10#include <linux/module.h>9#include <linux/module.h>
11#include <linux/pci.h>10#include <linux/pci.h>
12#include <linux/vmalloc.h>11#include <linux/vmalloc.h>
@@ -378,7 +377,7 @@ static struct pci_driver mgag200_pci_driver = { · 365 unmodified lines
378 377
379static int __init mgag200_init(void)378static 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 return -EINVAL;381 return -EINVAL;
383 382
384 if (mgag200_modeset == 0)383 if (mgag200_modeset == 0)
drivers/gpu/drm/nouveau/nouveau_drm.c+2−2
@@ -22,7 +22,6 @@ · 21 unmodified lines
22 * Authors: Ben Skeggs22 * Authors: Ben Skeggs
23 */23 */
24 24
25#include <linux/console.h>
26#include <linux/delay.h>25#include <linux/delay.h>
27#include <linux/module.h>26#include <linux/module.h>
28#include <linux/pci.h>27#include <linux/pci.h>
@@ -32,6 +31,7 @@ · 3 unmodified lines
32 31
33#include <drm/drm_aperture.h>32#include <drm/drm_aperture.h>
34#include <drm/drm_crtc_helper.h>33#include <drm/drm_crtc_helper.h>
34#include <drm/drm_drv.h>
35#include <drm/drm_gem_ttm_helper.h>35#include <drm/drm_gem_ttm_helper.h>
36#include <drm/drm_ioctl.h>36#include <drm/drm_ioctl.h>
37#include <drm/drm_vblank.h>37#include <drm/drm_vblank.h>
@@ -1358,7 +1358,7 @@ nouveau_drm_init(void) · 1320 unmodified lines
1358 nouveau_display_options();1358 nouveau_display_options();
1359 1359
1360 if (nouveau_modeset == -1) {1360 if (nouveau_modeset == -1) {
1361 if (vgacon_text_force())1361 if (drm_firmware_drivers_only())
1362 nouveau_modeset = 0;1362 nouveau_modeset = 0;
1363 }1363 }
1364 1364
drivers/gpu/drm/qxl/qxl_drv.c+1−2
@@ -29,7 +29,6 @@ · 28 unmodified lines
29 29
30#include "qxl_drv.h"30#include "qxl_drv.h"
31 31
32#include <linux/console.h>
33#include <linux/module.h>32#include <linux/module.h>
34#include <linux/pci.h>33#include <linux/pci.h>
35#include <linux/vgaarb.h>34#include <linux/vgaarb.h>
@@ -295,7 +294,7 @@ static struct drm_driver qxl_driver = { · 259 unmodified lines
295 294
296static int __init qxl_init(void)295static 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 return -EINVAL;298 return -EINVAL;
300 299
301 if (qxl_modeset == 0)300 if (qxl_modeset == 0)
drivers/gpu/drm/radeon/radeon_drv.c+2−7
@@ -31,7 +31,6 @@ · 30 unmodified lines
31 31
32 32
33#include <linux/compat.h>33#include <linux/compat.h>
34#include <linux/console.h>
35#include <linux/module.h>34#include <linux/module.h>
36#include <linux/pm_runtime.h>35#include <linux/pm_runtime.h>
37#include <linux/vga_switcheroo.h>36#include <linux/vga_switcheroo.h>
@@ -637,15 +636,11 @@ static struct pci_driver radeon_kms_pci_driver = { · 599 unmodified lines
637 636
638static int __init radeon_module_init(void)637static int __init radeon_module_init(void)
639{638{
640 if (vgacon_text_force() && radeon_modeset == -1) {639 if (drm_firmware_drivers_only() && radeon_modeset == -1)
641 DRM_INFO("VGACON disable radeon kernel modesetting.\n");
642 radeon_modeset = 0;640 radeon_modeset = 0;
643 }
644 641
645 if (radeon_modeset == 0) {642 if (radeon_modeset == 0)
646 DRM_ERROR("No UMS support in radeon module!\n");
647 return -EINVAL;643 return -EINVAL;
648 }
649 644
650 DRM_INFO("radeon kernel modesetting enabled.\n");645 DRM_INFO("radeon kernel modesetting enabled.\n");
651 radeon_register_atpx_handler();646 radeon_register_atpx_handler();
drivers/gpu/drm/tiny/bochs.c+1−2
@@ -1,6 +1,5 @@
1// SPDX-License-Identifier: GPL-2.0-or-later1// SPDX-License-Identifier: GPL-2.0-or-later
2 2
3#include <linux/console.h>
4#include <linux/pci.h>3#include <linux/pci.h>
5 4
6#include <drm/drm_aperture.h>5#include <drm/drm_aperture.h>
@@ -719,7 +718,7 @@ static struct pci_driver bochs_pci_driver = { · 712 unmodified lines
719 718
720static int __init bochs_init(void)719static 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 return -EINVAL;722 return -EINVAL;
724 723
725 if (bochs_modeset == 0)724 if (bochs_modeset == 0)
drivers/gpu/drm/tiny/cirrus.c+2−2
@@ -16,7 +16,6 @@ · 15 unmodified lines
16 * Copyright 1999-2001 Jeff Garzik <jgarzik@pobox.com>16 * Copyright 1999-2001 Jeff Garzik <jgarzik@pobox.com>
17 */17 */
18 18
19#include <linux/console.h>
20#include <linux/dma-buf-map.h>19#include <linux/dma-buf-map.h>
21#include <linux/module.h>20#include <linux/module.h>
22#include <linux/pci.h>21#include <linux/pci.h>
@@ -636,8 +635,9 @@ static struct pci_driver cirrus_pci_driver = { · 613 unmodified lines
636 635
637static int __init cirrus_init(void)636static int __init cirrus_init(void)
638{637{
639 if (vgacon_text_force())638 if (drm_firmware_drivers_only())
640 return -EINVAL;639 return -EINVAL;
640
641 return pci_register_driver(&cirrus_pci_driver);641 return pci_register_driver(&cirrus_pci_driver);
642}642}
643 643
drivers/gpu/drm/ttm/ttm_range_manager.c+7−4
@@ -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_init131 * ttm_range_man_init_nocheck - Initialise a generic range manager for the
132 * selected memory type.
132 *133 *
133 * @bdev: ttm device134 * @bdev: ttm device
134 * @type: memory manager type135 * @type: memory manager type
135 * @use_tt: if the memory manager uses tt136 * @use_tt: if the memory manager uses tt
136 * @p_size: size of area to be managed in pages.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 * The range manager is installed for this device in the type slot.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 */
141int ttm_range_man_init_nocheck(struct ttm_device *bdev,143int ttm_range_man_init_nocheck(struct ttm_device *bdev,
142 unsigned type, bool use_tt,144 unsigned type, bool use_tt,
@@ -166,12 +168,13 @@ int ttm_range_man_init_nocheck(struct ttm_device *bdev, · 23 unmodified lines
166EXPORT_SYMBOL(ttm_range_man_init_nocheck);168EXPORT_SYMBOL(ttm_range_man_init_nocheck);
167 169
168/**170/**
169 * ttm_range_man_fini171 * ttm_range_man_fini_nocheck - Remove the generic range manager from a slot
172 * and tear it down.
170 *173 *
171 * @bdev: ttm device174 * @bdev: ttm device
172 * @type: memory manager type175 * @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 */
176int ttm_range_man_fini_nocheck(struct ttm_device *bdev,179int ttm_range_man_fini_nocheck(struct ttm_device *bdev,
177 unsigned type)180 unsigned type)
drivers/gpu/drm/vboxvideo/vbox_drv.c+1−4
@@ -7,7 +7,6 @@ · 6 unmodified lines
7 * Michael Thayer <michael.thayer@oracle.com,7 * Michael Thayer <michael.thayer@oracle.com,
8 * Hans de Goede <hdegoede@redhat.com>8 * Hans de Goede <hdegoede@redhat.com>
9 */9 */
10#include <linux/console.h>
11#include <linux/module.h>10#include <linux/module.h>
12#include <linux/pci.h>11#include <linux/pci.h>
13#include <linux/vt_kern.h>12#include <linux/vt_kern.h>
@@ -193,10 +192,8 @@ static const struct drm_driver driver = { · 179 unmodified lines
193 192
194static int __init vbox_init(void)193static int __init vbox_init(void)
195{194{
196#ifdef CONFIG_VGA_CONSOLE195 if (drm_firmware_drivers_only() && vbox_modeset == -1)
197 if (vgacon_text_force() && vbox_modeset == -1)
198 return -EINVAL;196 return -EINVAL;
199#endif
200 197
201 if (vbox_modeset == 0)198 if (vbox_modeset == 0)
202 return -EINVAL;199 return -EINVAL;
drivers/gpu/drm/vboxvideo/vbox_main.c+2−2
@@ -127,8 +127,8 @@ int vbox_hw_init(struct vbox_private *vbox) · 126 unmodified lines
127 /* Create guest-heap mem-pool use 2^4 = 16 byte chunks */127 /* Create guest-heap mem-pool use 2^4 = 16 byte chunks */
128 vbox->guest_pool = devm_gen_pool_create(vbox->ddev.dev, 4, -1,128 vbox->guest_pool = devm_gen_pool_create(vbox->ddev.dev, 4, -1,
129 "vboxvideo-accel");129 "vboxvideo-accel");
130 if (!vbox->guest_pool)130 if (IS_ERR(vbox->guest_pool))
131 return -ENOMEM;131 return PTR_ERR(vbox->guest_pool);
132 132
133 ret = gen_pool_add_virt(vbox->guest_pool,133 ret = gen_pool_add_virt(vbox->guest_pool,
134 (unsigned long)vbox->guest_heap,134 (unsigned long)vbox->guest_heap,
drivers/gpu/drm/virtio/virtgpu_drv.c+1−2
@@ -27,7 +27,6 @@ · 26 unmodified lines
27 */27 */
28 28
29#include <linux/module.h>29#include <linux/module.h>
30#include <linux/console.h>
31#include <linux/pci.h>30#include <linux/pci.h>
32#include <linux/poll.h>31#include <linux/poll.h>
33#include <linux/wait.h>32#include <linux/wait.h>
@@ -104,7 +103,7 @@ static int virtio_gpu_probe(struct virtio_device *vdev) · 70 unmodified lines
104 struct drm_device *dev;103 struct drm_device *dev;
105 int ret;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 return -EINVAL;107 return -EINVAL;
109 108
110 if (virtio_gpu_modeset == 0)109 if (virtio_gpu_modeset == 0)
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c+1−2
@@ -25,7 +25,6 @@ · 24 unmodified lines
25 *25 *
26 **************************************************************************/26 **************************************************************************/
27 27
28#include <linux/console.h>
29#include <linux/dma-mapping.h>28#include <linux/dma-mapping.h>
30#include <linux/module.h>29#include <linux/module.h>
31#include <linux/pci.h>30#include <linux/pci.h>
@@ -1651,7 +1650,7 @@ static int __init vmwgfx_init(void) · 1619 unmodified lines
1651{1650{
1652 int ret;1651 int ret;
1653 1652
1654 if (vgacon_text_force())1653 if (drm_firmware_drivers_only())
1655 return -EINVAL;1654 return -EINVAL;
1656 1655
1657 ret = pci_register_driver(&vmw_pci_driver);1656 ret = pci_register_driver(&vmw_pci_driver);
drivers/video/console/vgacon.c+0−21
@@ -97,30 +97,9 @@ static int vga_video_font_height; · 96 unmodified lines
97static int vga_scan_lines __read_mostly;97static int vga_scan_lines __read_mostly;
98static unsigned int vga_rolled_over; /* last vc_origin offset before wrap */98static unsigned int vga_rolled_over; /* last vc_origin offset before wrap */
99 99
100static bool vgacon_text_mode_force;
101static bool vga_hardscroll_enabled;100static bool vga_hardscroll_enabled;
102static bool vga_hardscroll_user_enable = true;101static bool vga_hardscroll_user_enable = true;
103 102
104bool vgacon_text_force(void)
105{
106 return vgacon_text_mode_force;
107}
108EXPORT_SYMBOL(vgacon_text_force);
109
110static 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
124static int __init no_scroll(char *str)103static int __init no_scroll(char *str)
125{104{
126 /*105 /*
include/drm/drm_drv.h+1−0
@@ -601,5 +601,6 @@ static inline bool drm_drv_uses_atomic_modeset(struct drm_device *dev) · 600 unmodified lines
601 601
602int drm_dev_set_unique(struct drm_device *dev, const char *name);602int drm_dev_set_unique(struct drm_device *dev, const char *name);
603 603
604extern bool drm_firmware_drivers_only(void);
604 605
605#endif606#endif
include/linux/console.h+0−6
@@ -219,12 +219,6 @@ extern atomic_t ignore_console_lock_warning; · 218 unmodified lines
219#define VESA_HSYNC_SUSPEND 2219#define VESA_HSYNC_SUSPEND 2
220#define VESA_POWERDOWN 3220#define VESA_POWERDOWN 3
221 221
222#ifdef CONFIG_VGA_CONSOLE
223extern bool vgacon_text_force(void);
224#else
225static inline bool vgacon_text_force(void) { return false; }
226#endif
227
228extern void console_init(void);222extern void console_init(void);
229 223
230/* For deferred console takeover */224/* For deferred console takeover */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t