[Nouveau] LUT update skipped on first modeset?

Ilia Mirkin imirkin at alum.mit.edu
Sun Dec 31 02:54:19 UTC 2017


Hi Ben,

I was looking into some of the LUT-related modesetting issues. I've
noticed the following... after I load nouveau, one of my secondary
GPUs shows this on first modeset (with drm.debug=4):

[ 2368.081307] [drm:drm_helper_probe_single_connector_modes
[drm_kms_helper]] [CONNECTOR:44:DVI-I-1]
[ 2368.113148] [drm:drm_add_display_info [drm]] non_desktop set to 0
[ 2368.113183] [drm:drm_add_display_info [drm]] non_desktop set to 0
[ 2368.113337] [drm:drm_helper_probe_single_connector_modes
[drm_kms_helper]] [CONNECTOR:44:DVI-I-1] probed modes :
[ 2368.113358] [drm:drm_mode_debug_printmodeline [drm]] Modeline
51:"1920x1200" 60 154000 1920 1968 2000 2080 1200 1203 1209 1235 0x48
0x9
[ 2368.113379] [drm:drm_mode_debug_printmodeline [drm]] Modeline
53:"1600x1200" 60 162000 1600 1664 1856 2160 1200 1201 1204 1250 0x40
0x5
[ 2368.113399] [drm:drm_mode_debug_printmodeline [drm]] Modeline
55:"1680x1050" 60 146250 1680 1784 1960 2240 1050 1053 1059 1089 0x40
0x6
[ 2368.113419] [drm:drm_mode_debug_printmodeline [drm]] Modeline
60:"1280x1024" 75 135000 1280 1296 1440 1688 1024 1025 1028 1066 0x40
0x5
[ 2368.113439] [drm:drm_mode_debug_printmodeline [drm]] Modeline
52:"1280x1024" 60 108000 1280 1328 1440 1688 1024 1025 1028 1066 0x40
0x5
[ 2368.113459] [drm:drm_mode_debug_printmodeline [drm]] Modeline
54:"1152x864" 75 108000 1152 1216 1344 1600 864 865 868 900 0x40 0x5
[ 2368.113480] [drm:drm_mode_debug_printmodeline [drm]] Modeline
61:"1024x768" 75 78750 1024 1040 1136 1312 768 769 772 800 0x40 0x5
[ 2368.113500] [drm:drm_mode_debug_printmodeline [drm]] Modeline
62:"1024x768" 60 65000 1024 1048 1184 1344 768 771 777 806 0x40 0xa
[ 2368.113520] [drm:drm_mode_debug_printmodeline [drm]] Modeline
63:"800x600" 75 49500 800 816 896 1056 600 601 604 625 0x40 0x5
[ 2368.113540] [drm:drm_mode_debug_printmodeline [drm]] Modeline
56:"800x600" 60 40000 800 840 968 1056 600 601 605 628 0x40 0x5
[ 2368.113560] [drm:drm_mode_debug_printmodeline [drm]] Modeline
57:"640x480" 75 31500 640 656 720 840 480 481 484 500 0x40 0xa
[ 2368.113581] [drm:drm_mode_debug_printmodeline [drm]] Modeline
58:"640x480" 60 25175 640 656 752 800 480 490 492 525 0x40 0xa
[ 2368.113601] [drm:drm_mode_debug_printmodeline [drm]] Modeline
59:"720x400" 70 28320 720 738 846 900 400 412 414 449 0x40 0x6
[ 2368.113635] [drm:drm_helper_probe_single_connector_modes
[drm_kms_helper]] [CONNECTOR:47:DVI-I-2]
[ 2368.125321] [drm:drm_helper_probe_single_connector_modes
[drm_kms_helper]] [CONNECTOR:47:DVI-I-2] disconnected
[ 2368.141673] [drm:drm_mode_addfb2 [drm]] [FB:65]
[ 2368.141704] [drm:drm_mode_setcrtc [drm]] [CRTC:40:head-0]
[ 2368.141717] [drm:drm_mode_setcrtc [drm]] [CONNECTOR:44:DVI-I-1]
[ 2368.141735] 0900 1 nv50_head_base
[ 2368.141736]  00000001
[ 2368.141737] 08a0 1 nv50_head_dither
[ 2368.141737]  00000003
[ 2368.141752] 00a0 2 nv50_base_ntfy_set
[ 2368.141752]  00000120
[ 2368.141753]  f0000000
[ 2368.141754] 0084 1 nv50_base_image_set
[ 2368.141754]  00000010
[ 2368.141755] 00c0 1 nv50_base_image_set
[ 2368.141755]  fb000000
[ 2368.141756] 0800 5 nv50_base_image_set
[ 2368.141756]  00009400
[ 2368.141757]  00000000
[ 2368.141757]  04b00780
[ 2368.141757]  00100800
[ 2368.141758]  00001e00
[ 2368.141759] 0080 1 nv50_base_update
[ 2368.141759]  00000001
[ 2368.141761] 0084 1 nv50_disp_atomic_commit_core
[ 2368.141761]  80000000
[ 2368.141762] 0080 2 nv50_disp_atomic_commit_core
[ 2368.141762]  00000002
[ 2368.141763]  00000000


Note that at no point does it call any of the nv50_head stuff. This is
with just running 'modetest' pointed at the device. When I kill it,
the screen turns off and we get:

[ 2378.495375] 0840 1 nv50_head_lut_clr
[ 2378.495376]  40000000
[ 2378.495378] 085c 1 nv50_head_lut_clr
[ 2378.495378]  00000000
[ 2378.495380] 0874 1 nv50_head_core_clr
[ 2378.495381]  00000000
[ 2378.495383] 00a4 1 nv50_base_ntfy_clr
[ 2378.495383]  00000000
[ 2378.495385] 0084 1 nv50_base_image_clr
[ 2378.495386]  00000000
[ 2378.495387] 00c0 1 nv50_base_image_clr
[ 2378.495387]  00000000
[ 2378.495389] 0480 1 nv50_dac_disable
[ 2378.495390]  00000000
[ 2378.495393] 0080 1 nv50_base_update
[ 2378.495393]  00000001
[ 2378.495395] 0084 1 nv50_disp_atomic_commit_core
[ 2378.495396]  80000000
[ 2378.495397] 0080 2 nv50_disp_atomic_commit_core
[ 2378.495398]  00000002
[ 2378.495398]  00000000


As one might expect, all the *clr functions get called. When I run the
exact same modetest command again, I get the following:


[ 2381.616114] [drm:drm_helper_probe_single_connector_modes
[drm_kms_helper]] [CONNECTOR:44:DVI-I-1]
[ 2381.646633] [drm:drm_add_display_info [drm]] non_desktop set to 0
[ 2381.646663] [drm:drm_add_display_info [drm]] non_desktop set to 0
[ 2381.646820] [drm:drm_helper_probe_single_connector_modes
[drm_kms_helper]] [CONNECTOR:44:DVI-I-1] probed modes :
[ 2381.646841] [drm:drm_mode_debug_printmodeline [drm]] Modeline
51:"1920x1200" 60 154000 1920 1968 2000 2080 1200 1203 1209 1235 0x48
0x9
[ 2381.646862] [drm:drm_mode_debug_printmodeline [drm]] Modeline
53:"1600x1200" 60 162000 1600 1664 1856 2160 1200 1201 1204 1250 0x40
0x5
[ 2381.646882] [drm:drm_mode_debug_printmodeline [drm]] Modeline
55:"1680x1050" 60 146250 1680 1784 1960 2240 1050 1053 1059 1089 0x40
0x6
[ 2381.646902] [drm:drm_mode_debug_printmodeline [drm]] Modeline
60:"1280x1024" 75 135000 1280 1296 1440 1688 1024 1025 1028 1066 0x40
0x5
[ 2381.646922] [drm:drm_mode_debug_printmodeline [drm]] Modeline
52:"1280x1024" 60 108000 1280 1328 1440 1688 1024 1025 1028 1066 0x40
0x5
[ 2381.646942] [drm:drm_mode_debug_printmodeline [drm]] Modeline
54:"1152x864" 75 108000 1152 1216 1344 1600 864 865 868 900 0x40 0x5
[ 2381.646963] [drm:drm_mode_debug_printmodeline [drm]] Modeline
61:"1024x768" 75 78750 1024 1040 1136 1312 768 769 772 800 0x40 0x5
[ 2381.646983] [drm:drm_mode_debug_printmodeline [drm]] Modeline
62:"1024x768" 60 65000 1024 1048 1184 1344 768 771 777 806 0x40 0xa
[ 2381.647003] [drm:drm_mode_debug_printmodeline [drm]] Modeline
63:"800x600" 75 49500 800 816 896 1056 600 601 604 625 0x40 0x5
[ 2381.647023] [drm:drm_mode_debug_printmodeline [drm]] Modeline
56:"800x600" 60 40000 800 840 968 1056 600 601 605 628 0x40 0x5
[ 2381.647043] [drm:drm_mode_debug_printmodeline [drm]] Modeline
57:"640x480" 75 31500 640 656 720 840 480 481 484 500 0x40 0xa
[ 2381.647064] [drm:drm_mode_debug_printmodeline [drm]] Modeline
58:"640x480" 60 25175 640 656 752 800 480 490 492 525 0x40 0xa
[ 2381.647084] [drm:drm_mode_debug_printmodeline [drm]] Modeline
59:"720x400" 70 28320 720 738 846 900 400 412 414 449 0x40 0x6
[ 2381.647117] [drm:drm_helper_probe_single_connector_modes
[drm_kms_helper]] [CONNECTOR:47:DVI-I-2]
[ 2381.658629] [drm:drm_helper_probe_single_connector_modes
[drm_kms_helper]] [CONNECTOR:47:DVI-I-2] disconnected
[ 2381.675026] [drm:drm_mode_addfb2 [drm]] [FB:65]
[ 2381.675052] [drm:drm_mode_setcrtc [drm]] [CRTC:40:head-0]
[ 2381.675065] [drm:drm_mode_setcrtc [drm]] [CONNECTOR:44:DVI-I-1]
[ 2381.675085] 0480 2 nv50_dac_enable
[ 2381.675086]  00000001
[ 2381.675086]  00000002
[ 2381.675087] 08a4 1 nv50_head_view
[ 2381.675088]  00000000
[ 2381.675088] 08c8 1 nv50_head_view
[ 2381.675089]  04b00780
[ 2381.675089] 08d8 2 nv50_head_view
[ 2381.675089]  04b00780
[ 2381.675090]  04b00780
[ 2381.675091] 0804 2 nv50_head_mode
[ 2381.675092]  00825990
[ 2381.675092]  00000000
[ 2381.675092] 0810 7 nv50_head_mode
[ 2381.675093]  00000000
[ 2381.675093]  04d30820
[ 2381.675093]  0005001f
[ 2381.675094]  001f006f
[ 2381.675094]  04cf07ef
[ 2381.675094]  00000001
[ 2381.675095]  000001bd
[ 2381.675095] 082c 1 nv50_head_mode
[ 2381.675096]  00000000
[ 2381.675097] 0840 2 nv50_head_lut_set
[ 2381.675097]  80000000
[ 2381.675098]  00000610
[ 2381.675098] 085c 1 nv50_head_lut_set
[ 2381.675099]  f0000001
[ 2381.675100] 0860 1 nv50_head_core_set
[ 2381.675100]  00000000
[ 2381.675101] 0868 4 nv50_head_core_set
[ 2381.675101]  04b00780
[ 2381.675102]  00101e00
[ 2381.675102]  0000cf00
[ 2381.675102]  f0000001
[ 2381.675103] 08c0 1 nv50_head_core_set
[ 2381.675103]  00000000
[ 2381.675104] 0900 1 nv50_head_base
[ 2381.675105]  00000001
[ 2381.675107] 08a0 1 nv50_head_dither
[ 2381.675107]  00000003
[ 2381.675108] 08a8 1 nv50_head_procamp
[ 2381.675109]  00040000
[ 2381.676006] 00a0 2 nv50_base_ntfy_set
[ 2381.676007]  00000130
[ 2381.676007]  f0000000
[ 2381.676009] 0084 1 nv50_base_image_set
[ 2381.676009]  00000010
[ 2381.676010] 00c0 1 nv50_base_image_set
[ 2381.676010]  fb000000
[ 2381.676011] 0800 5 nv50_base_image_set
[ 2381.676011]  00009400
[ 2381.676012]  00000000
[ 2381.676012]  04b00780
[ 2381.676016]  00100800
[ 2381.676017]  00001e00
[ 2381.676018] 00e0 1 nv50_base_lut
[ 2381.676019]  40000000
[ 2381.676021] 0080 1 nv50_base_update
[ 2381.676021]  00000001
[ 2381.676023] 0084 1 nv50_disp_atomic_commit_core
[ 2381.676023]  80000000
[ 2381.676025] 0080 2 nv50_disp_atomic_commit_core
[ 2381.676025]  00000002
[ 2381.676026]  00000000


Among other things, it goes into nv50_head_lut_set. Odd, right?
Unfortunately the acronyms used in nv50_display.c are too cryptic for
me to decode (might I recommend putting some notes up top to explain
what all those 4-letter mnemonics stand for)... can you tell what's
going on?

The end result is that the LUT isn't set on first modeset, which in
turn means that indexed mode doesn't work. (It also doesn't work with
0xc0000000 -- I had to move it back to 0x80000000, as you can see in
the example above.)

  -ilia


More information about the Nouveau mailing list