I have finished bisecting the commits and the switch from i915 to i915_bpo seems to be the culprit. There are quite a few candidates but that's because all those skipped commits failed to build/compile.
Note that on the first flicker after booting, this message appears in dmesg:
[drm:intel_cpu_fifo_underrun_irq_handler [i915_bpo]] *ERROR* CPU pipe A FIFO underrun
Here is the log of the bisect:
git bisect start '--' 'drivers/gpu/' 'include/drm/' 'include/uapi/drm/' 'ubuntu/i915'
# good: [463f21c6a2dcc90e06dbc2eb2341640ae5c43c28] UBUNTU: Ubuntu-4.4.0-8.23
git bisect good 463f21c6a2dcc90e06dbc2eb2341640ae5c43c28
# bad: [b8723f286caa9218ebda0c47a435d1b52b8dfaf4] UBUNTU: Ubuntu-4.4.0-9.24
git bisect bad b8723f286caa9218ebda0c47a435d1b52b8dfaf4
# good: [1cb8570bf04ab12a03c31c397a4d158f24895d9c] Linux 4.4.2
git bisect good 1cb8570bf04ab12a03c31c397a4d158f24895d9c
# skip: [19ed21af1bffa667745926f2b8b28a0505cca0be] drm: Add "prefix" parameter to drm_rect_debug_print()
git bisect skip 19ed21af1bffa667745926f2b8b28a0505cca0be
# skip: [a9b3cdd235bf966b4cddab82d61dc941a74e3a74] UBUNTU: SAUCE: Backport I915_PARAM_HAS_EXEC_SOFTPIN and EXEC_OBJECT_PINNED
git bisect skip a9b3cdd235bf966b4cddab82d61dc941a74e3a74
# skip: [8bfcd31065a60ffba9e600fafd62bbd90ff0895a] drm/atomic: Add encoder_mask to crtc_state, v3.
git bisect skip 8bfcd31065a60ffba9e600fafd62bbd90ff0895a
# skip: [693a63075524374165196137ca4b952a6afd5265] drm/i915/kbl: Add Kabylake GT4 PCI ID
git bisect skip 693a63075524374165196137ca4b952a6afd5265
# good: [34f091b3d14dadd9ef8d1f8a678656aed759fe33] UBUNTU: SAUCE: radeon: r100: Silence 'may be used uninitialized' warnings
git bisect good 34f091b3d14dadd9ef8d1f8a678656aed759fe33
# skip: [abfd1387464d2e764989d8fbaea78b0b7af89142] drm/i915: Set connector_state->connector using the helper.
git bisect skip abfd1387464d2e764989d8fbaea78b0b7af89142
# skip: [975bc60948107bce995ae5d18e0755dc5f2abf53] drm: fix potential dangling else problems in for_each_ macros
git bisect skip 975bc60948107bce995ae5d18e0755dc5f2abf53
# good: [98e1eef7fa2b711e0946d22a3c2659458582e807] drm/i915/skl: Disable coarse power gating up until F0
git bisect good 98e1eef7fa2b711e0946d22a3c2659458582e807
# skip: [1f955e92dc87f484048109bc1d434fa59221c5dd] drm/atomic: add connector mask to drm_crtc_state.
git bisect skip 1f955e92dc87f484048109bc1d434fa59221c5dd
# skip: [7d5329085d3e64b6b04a9de1c86f5074bac26cc9] drm/i915: Update connector_mask during readout, v2.
git bisect skip 7d5329085d3e64b6b04a9de1c86f5074bac26cc9
# skip: [8167675659a93004ae99d7b3aa90e1134352a836] drm: Implement drm_modeset_lock_all_ctx()
git bisect skip 8167675659a93004ae99d7b3aa90e1134352a836
# skip: [8ba5c26373f1e4341f2cbd198ddeb41644adf9b6] drm/atomic: Do not unset crtc when an encoder is stolen
git bisect skip 8ba5c26373f1e4341f2cbd198ddeb41644adf9b6
# skip: [197b480eac049b43e26cad615d2f541b5eab0238] drm/i915: Add get_eld audio component
git bisect skip 197b480eac049b43e26cad615d2f541b5eab0238
# skip: [59784e17027c76b7621c19393828dfd0aa1ffde5] UBUNTU: SAUCE: i915_bpo: Add i915_bpo_*() calls for ubuntu/i915
git bisect skip 59784e17027c76b7621c19393828dfd0aa1ffde5
# skip: [d34f93f031b9411cbc75444910d79edf8d0adca9] UBUNTU: SAUCE: i915_bpo: Revert passing plane/encoder name
git bisect skip d34f93f031b9411cbc75444910d79edf8d0adca9
# skip: [f1261c30584595faa9b03be3f66d69c7abe3df48] drm/i915: remove an extra level of indirection in PCI ID list
git bisect skip f1261c30584595faa9b03be3f66d69c7abe3df48
# skip: [6c8faa054473d42cec66420014fe14884cbb4a3c] drm/i915: Report context GTT size
git bisect skip 6c8faa054473d42cec66420014fe14884cbb4a3c
# skip: [881abf52cda63355e5cdc21bf7121d46e9212c93] UBUNTU: SAUCE: uapi/drm/i915: Backport I915_EXEC_BSD_MASK
git bisect skip 881abf52cda63355e5cdc21bf7121d46e9212c93
# skip: [0dddd6896b9eba1c833fbe31ff01ad10512aa8c4] dp/mst: add SDP stream support
git bisect skip 0dddd6896b9eba1c833fbe31ff01ad10512aa8c4
# skip: [8e2bd616924b1c169c0ee555a19be6bd73200b7d] UBUNTU: SAUCE: i915_bpo: Rename the backport driver to i915_bpo
git bisect skip 8e2bd616924b1c169c0ee555a19be6bd73200b7d
# skip: [264069c863584121bf73a58e2ec8374753396aa8] UBUNTU: SAUCE: i915_bpo: Support only SKL, KBL and BXT with the backport driver
git bisect skip 264069c863584121bf73a58e2ec8374753396aa8
# skip: [68f514a794848c0817f3da489324ff61373d6bce] drm/i915/kbl: Add Kabylake PCI ID
git bisect skip 68f514a794848c0817f3da489324ff61373d6bce
# skip: [b076ab08db1b852b3f70652aac5ff53bd5ecac86] drm/i915/bxt: update list of PCIIDs
git bisect skip b076ab08db1b852b3f70652aac5ff53bd5ecac86
# skip: [2377d291a6bd3fbd0fc19f3bb688773fd56f6da1] UBUNTU: SAUCE: drm/core: Add drm_encoder_index.
git bisect skip 2377d291a6bd3fbd0fc19f3bb688773fd56f6da1
# skip: [71fb3f740833b86947bfc3c7c8d771629b1bae84] drm/i915/skl: Add missing SKL ids
git bisect skip 71fb3f740833b86947bfc3c7c8d771629b1bae84
# good: [330c218ff8f2b81e9474c30af584131c447f87e1] UBUNTU: SAUCE: i915_bpo: Update intel_ips.h file location
git bisect good 330c218ff8f2b81e9474c30af584131c447f87e1
# skip: [21710abf5c56887940fe72e882e24fde2392a83b] UBUNTU: SAUCE: i915_bpo: Revert "drm/i915: Defer probe if gmux is present but its driver isn't"
git bisect skip 21710abf5c56887940fe72e882e24fde2392a83b
# bad: [71a5e951a8ea93ebe2bb5db0738b63f172688b9b] UBUNTU: SAUCE: i915_bpo: Revert "drm/i915: Switch DDC when reading the EDID"
git bisect bad 71a5e951a8ea93ebe2bb5db0738b63f172688b9b
# only skipped commits left to test
# possible first bad commit: [71a5e951a8ea93ebe2bb5db0738b63f172688b9b] UBUNTU: SAUCE: i915_bpo: Revert "drm/i915: Switch DDC when reading the EDID"
# possible first bad commit: [2377d291a6bd3fbd0fc19f3bb688773fd56f6da1] UBUNTU: SAUCE: drm/core: Add drm_encoder_index.
# possible first bad commit: [8bfcd31065a60ffba9e600fafd62bbd90ff0895a] drm/atomic: Add encoder_mask to crtc_state, v3.
# possible first bad commit: [7d5329085d3e64b6b04a9de1c86f5074bac26cc9] drm/i915: Update connector_mask during readout, v2.
# possible first bad commit: [8ba5c26373f1e4341f2cbd198ddeb41644adf9b6] drm/atomic: Do not unset crtc when an encoder is stolen
# possible first bad commit: [881abf52cda63355e5cdc21bf7121d46e9212c93] UBUNTU: SAUCE: uapi/drm/i915: Backport I915_EXEC_BSD_MASK
# possible first bad commit: [21710abf5c56887940fe72e882e24fde2392a83b] UBUNTU: SAUCE: i915_bpo: Revert "drm/i915: Defer probe if gmux is present but its driver isn't"
# possible first bad commit: [71fb3f740833b86947bfc3c7c8d771629b1bae84] drm/i915/skl: Add missing SKL ids
# possible first bad commit: [b076ab08db1b852b3f70652aac5ff53bd5ecac86] drm/i915/bxt: update list of PCIIDs
# possible first bad commit: [264069c863584121bf73a58e2ec8374753396aa8] UBUNTU: SAUCE: i915_bpo: Support only SKL, KBL and BXT with the backport driver
# possible first bad commit: [8f3bbcff65b81092d3eb3f7f1492f3fc63176e34] UBUNTU: SAUCE: sound/hda: Load i915_bpo from the hda driver on SKL/KBL/BXT
# possible first bad commit: [d34f93f031b9411cbc75444910d79edf8d0adca9] UBUNTU: SAUCE: i915_bpo: Revert passing plane/encoder name
# possible first bad commit: [a9b3cdd235bf966b4cddab82d61dc941a74e3a74] UBUNTU: SAUCE: Backport I915_PARAM_HAS_EXEC_SOFTPIN and EXEC_OBJECT_PINNED
# possible first bad commit: [197b480eac049b43e26cad615d2f541b5eab0238] drm/i915: Add get_eld audio component
# possible first bad commit: [6c8faa054473d42cec66420014fe14884cbb4a3c] drm/i915: Report context GTT size
# possible first bad commit: [1f955e92dc87f484048109bc1d434fa59221c5dd] drm/atomic: add connector mask to drm_crtc_state.
# possible first bad commit: [abfd1387464d2e764989d8fbaea78b0b7af89142] drm/i915: Set connector_state->connector using the helper.
# possible first bad commit: [19ed21af1bffa667745926f2b8b28a0505cca0be] drm: Add "prefix" parameter to drm_rect_debug_print()
# possible first bad commit: [8167675659a93004ae99d7b3aa90e1134352a836] drm: Implement drm_modeset_lock_all_ctx()
# possible first bad commit: [0dddd6896b9eba1c833fbe31ff01ad10512aa8c4] dp/mst: add SDP stream support
# possible first bad commit: [975bc60948107bce995ae5d18e0755dc5f2abf53] drm: fix potential dangling else problems in for_each_ macros
# possible first bad commit: [366186b117cc31a3cfc292a6d7c5f791596078d1] async: export current_is_async()
# possible first bad commit: [e7566892b9a70c6cd3b6884c34c0cadbda4eb8cc] mm: Export nr_swap_pages
# possible first bad commit: [693a63075524374165196137ca4b952a6afd5265] drm/i915/kbl: Add Kabylake GT4 PCI ID
# possible first bad commit: [68f514a794848c0817f3da489324ff61373d6bce] drm/i915/kbl: Add Kabylake PCI ID
# possible first bad commit: [f1261c30584595faa9b03be3f66d69c7abe3df48] drm/i915: remove an extra level of indirection in PCI ID list
# possible first bad commit: [59784e17027c76b7621c19393828dfd0aa1ffde5] UBUNTU: SAUCE: i915_bpo: Add i915_bpo_*() calls for ubuntu/i915
# possible first bad commit: [8e2bd616924b1c169c0ee555a19be6bd73200b7d] UBUNTU: SAUCE: i915_bpo: Rename the backport driver to i915_bpo
I have finished bisecting the commits and the switch from i915 to i915_bpo seems to be the culprit. There are quite a few candidates but that's because all those skipped commits failed to build/compile.
Note that on the first flicker after booting, this message appears in dmesg:
[drm:intel_ cpu_fifo_ underrun_ irq_handler [i915_bpo]] *ERROR* CPU pipe A FIFO underrun
Here is the log of the bisect:
git bisect start '--' 'drivers/gpu/' 'include/drm/' 'include/uapi/drm/' 'ubuntu/i915' 0e06dbc2eb23416 40ae5c43c28] UBUNTU: Ubuntu-4.4.0-8.23 e06dbc2eb234164 0ae5c43c28 18ebda0c47a435d 1b52b8dfaf4] UBUNTU: Ubuntu-4.4.0-9.24 8ebda0c47a435d1 b52b8dfaf4 2a03c31c397a4d1 58f24895d9c] Linux 4.4.2 a03c31c397a4d15 8f24895d9c 67745926f2b8b28 a0505cca0be] drm: Add "prefix" parameter to drm_rect_ debug_print( ) 7745926f2b8b28a 0505cca0be 6b4cddab82d61dc 941a74e3a74] UBUNTU: SAUCE: Backport I915_PARAM_ HAS_EXEC_ SOFTPIN and EXEC_OBJECT_PINNED b4cddab82d61dc9 41a74e3a74 fba9e600fafd62b bd90ff0895a] drm/atomic: Add encoder_mask to crtc_state, v3. ba9e600fafd62bb d90ff0895a 4165196137ca4b9 52a6afd5265] drm/i915/kbl: Add Kabylake GT4 PCI ID 165196137ca4b95 2a6afd5265 d9ef8d1f8a67865 6aed759fe33] UBUNTU: SAUCE: radeon: r100: Silence 'may be used uninitialized' warnings 9ef8d1f8a678656 aed759fe33 764989d8fbaea78 b0b7af89142] drm/i915: Set connector_ state-> connector using the helper. 64989d8fbaea78b 0b7af89142 ce995ae5d18e075 5dc5f2abf53] drm: fix potential dangling else problems in for_each_ macros e995ae5d18e0755 dc5f2abf53 1e0946d22a3c265 9458582e807] drm/i915/skl: Disable coarse power gating up until F0 e0946d22a3c2659 458582e807 84048109bc1d434 fa59221c5dd] drm/atomic: add connector mask to drm_crtc_state. 4048109bc1d434f a59221c5dd b6b04a9de1c86f5 074bac26cc9] drm/i915: Update connector_mask during readout, v2. 6b04a9de1c86f50 74bac26cc9 04ae99d7b3aa90e 1134352a836] drm: Implement drm_modeset_ lock_all_ ctx() 4ae99d7b3aa90e1 134352a836 341f2cbd198ddeb 41644adf9b6] drm/atomic: Do not unset crtc when an encoder is stolen 41f2cbd198ddeb4 1644adf9b6 43e26cad615d2f5 41b5eab0238] drm/i915: Add get_eld audio component 3e26cad615d2f54 1b5eab0238 b7621c19393828d fd0aa1ffde5] UBUNTU: SAUCE: i915_bpo: Add i915_bpo_*() calls for ubuntu/i915 7621c19393828df d0aa1ffde5 1cbc75444910d79 edf8d0adca9] UBUNTU: SAUCE: i915_bpo: Revert passing plane/encoder name cbc75444910d79e df8d0adca9 faa9b03be3f66d6 9c7abe3df48] drm/i915: remove an extra level of indirection in PCI ID list aa9b03be3f66d69 c7abe3df48 2cec66420014fe1 4884cbb4a3c] drm/i915: Report context GTT size cec66420014fe14 884cbb4a3c 55e5cdc21bf7121 d46e9212c93] UBUNTU: SAUCE: uapi/drm/i915: Backport I915_EXEC_BSD_MASK 5e5cdc21bf7121d 46e9212c93 1c833fbe31ff01a d10512aa8c4] dp/mst: add SDP stream support c833fbe31ff01ad 10512aa8c4 169c0ee555a19be 6bd73200b7d] UBUNTU: SAUCE: i915_bpo: Rename the backport driver to i915_bpo 69c0ee555a19be6 bd73200b7d 21bf73a58e2ec83 74753396aa8] UBUNTU: SAUCE: i915_bpo: Support only SKL, KBL and BXT with the backport driver 1bf73a58e2ec837 4753396aa8 0817f3da489324f f61373d6bce] drm/i915/kbl: Add Kabylake PCI ID 817f3da489324ff 61373d6bce 2b3f70652aac5ff 53bd5ecac86] drm/i915/bxt: update list of PCIIDs b3f70652aac5ff5 3bd5ecac86 bd0fc19f3bb6887 73fd56f6da1] UBUNTU: SAUCE: drm/core: Add drm_encoder_index. d0fc19f3bb68877 3fd56f6da1 6947bfc3c7c8d77 1629b1bae84] drm/i915/skl: Add missing SKL ids 947bfc3c7c8d771 629b1bae84 1e9474c30af5841 31c447f87e1] UBUNTU: SAUCE: i915_bpo: Update intel_ips.h file location e9474c30af58413 1c447f87e1 7940fe72e882e24 fde2392a83b] UBUNTU: SAUCE: i915_bpo: Revert "drm/i915: Defer probe if gmux is present but its driver isn't" 940fe72e882e24f de2392a83b ebe2bb5db0738b6 3f172688b9b] UBUNTU: SAUCE: i915_bpo: Revert "drm/i915: Switch DDC when reading the EDID" be2bb5db0738b63 f172688b9b ebe2bb5db0738b6 3f172688b9b] UBUNTU: SAUCE: i915_bpo: Revert "drm/i915: Switch DDC when reading the EDID" bd0fc19f3bb6887 73fd56f6da1] UBUNTU: SAUCE: drm/core: Add drm_encoder_index. fba9e600fafd62b bd90ff0895a] drm/atomic: Add encoder_mask to crtc_state, v3. b6b04a9de1c86f5 074bac26cc9] drm/i915: Update connector_mask during readout, v2. 341f2cbd198ddeb 41644adf9b6] drm/atomic: Do not unset crtc when an encoder is stolen 55e5cdc21bf7121 d46e9212c93] UBUNTU: SAUCE: uapi/drm/i915: Backport I915_EXEC_BSD_MASK 7940fe72e882e24 fde2392a83b] UBUNTU: SAUCE: i915_bpo: Revert "drm/i915: Defer probe if gmux is present but its driver isn't" 6947bfc3c7c8d77 1629b1bae84] drm/i915/skl: Add missing SKL ids 2b3f70652aac5ff 53bd5ecac86] drm/i915/bxt: update list of PCIIDs 21bf73a58e2ec83 74753396aa8] UBUNTU: SAUCE: i915_bpo: Support only SKL, KBL and BXT with the backport driver 92d3eb3f7f1492f 3fc63176e34] UBUNTU: SAUCE: sound/hda: Load i915_bpo from the hda driver on SKL/KBL/BXT 1cbc75444910d79 edf8d0adca9] UBUNTU: SAUCE: i915_bpo: Revert passing plane/encoder name 6b4cddab82d61dc 941a74e3a74] UBUNTU: SAUCE: Backport I915_PARAM_ HAS_EXEC_ SOFTPIN and EXEC_OBJECT_PINNED 43e26cad615d2f5 41b5eab0238] drm/i915: Add get_eld audio component 2cec66420014fe1 4884cbb4a3c] drm/i915: Report context GTT size 84048109bc1d434 fa59221c5dd] drm/atomic: add connector mask to drm_crtc_state. 764989d8fbaea78 b0b7af89142] drm/i915: Set connector_ state-> connector using the helper. 67745926f2b8b28 a0505cca0be] drm: Add "prefix" parameter to drm_rect_ debug_print( ) 04ae99d7b3aa90e 1134352a836] drm: Implement drm_modeset_ lock_all_ ctx() 1c833fbe31ff01a d10512aa8c4] dp/mst: add SDP stream support ce995ae5d18e075 5dc5f2abf53] drm: fix potential dangling else problems in for_each_ macros a3cfc292a6d7c5f 791596078d1] async: export current_is_async() 6cd3b6884c34c0c adbda4eb8cc] mm: Export nr_swap_pages 4165196137ca4b9 52a6afd5265] drm/i915/kbl: Add Kabylake GT4 PCI ID 0817f3da489324f f61373d6bce] drm/i915/kbl: Add Kabylake PCI ID faa9b03be3f66d6 9c7abe3df48] drm/i915: remove an extra level of indirection in PCI ID list b7621c19393828d fd0aa1ffde5] UBUNTU: SAUCE: i915_bpo: Add i915_bpo_*() calls for ubuntu/i915 169c0ee555a19be 6bd73200b7d] UBUNTU: SAUCE: i915_bpo: Rename the backport driver to i915_bpo
# good: [463f21c6a2dcc9
git bisect good 463f21c6a2dcc90
# bad: [b8723f286caa92
git bisect bad b8723f286caa921
# good: [1cb8570bf04ab1
git bisect good 1cb8570bf04ab12
# skip: [19ed21af1bffa6
git bisect skip 19ed21af1bffa66
# skip: [a9b3cdd235bf96
git bisect skip a9b3cdd235bf966
# skip: [8bfcd31065a60f
git bisect skip 8bfcd31065a60ff
# skip: [693a6307552437
git bisect skip 693a63075524374
# good: [34f091b3d14dad
git bisect good 34f091b3d14dadd
# skip: [abfd1387464d2e
git bisect skip abfd1387464d2e7
# skip: [975bc60948107b
git bisect skip 975bc60948107bc
# good: [98e1eef7fa2b71
git bisect good 98e1eef7fa2b711
# skip: [1f955e92dc87f4
git bisect skip 1f955e92dc87f48
# skip: [7d5329085d3e64
git bisect skip 7d5329085d3e64b
# skip: [8167675659a930
git bisect skip 8167675659a9300
# skip: [8ba5c26373f1e4
git bisect skip 8ba5c26373f1e43
# skip: [197b480eac049b
git bisect skip 197b480eac049b4
# skip: [59784e17027c76
git bisect skip 59784e17027c76b
# skip: [d34f93f031b941
git bisect skip d34f93f031b9411
# skip: [f1261c30584595
git bisect skip f1261c30584595f
# skip: [6c8faa054473d4
git bisect skip 6c8faa054473d42
# skip: [881abf52cda633
git bisect skip 881abf52cda6335
# skip: [0dddd6896b9eba
git bisect skip 0dddd6896b9eba1
# skip: [8e2bd616924b1c
git bisect skip 8e2bd616924b1c1
# skip: [264069c8635841
git bisect skip 264069c86358412
# skip: [68f514a794848c
git bisect skip 68f514a794848c0
# skip: [b076ab08db1b85
git bisect skip b076ab08db1b852
# skip: [2377d291a6bd3f
git bisect skip 2377d291a6bd3fb
# skip: [71fb3f740833b8
git bisect skip 71fb3f740833b86
# good: [330c218ff8f2b8
git bisect good 330c218ff8f2b81
# skip: [21710abf5c5688
git bisect skip 21710abf5c56887
# bad: [71a5e951a8ea93
git bisect bad 71a5e951a8ea93e
# only skipped commits left to test
# possible first bad commit: [71a5e951a8ea93
# possible first bad commit: [2377d291a6bd3f
# possible first bad commit: [8bfcd31065a60f
# possible first bad commit: [7d5329085d3e64
# possible first bad commit: [8ba5c26373f1e4
# possible first bad commit: [881abf52cda633
# possible first bad commit: [21710abf5c5688
# possible first bad commit: [71fb3f740833b8
# possible first bad commit: [b076ab08db1b85
# possible first bad commit: [264069c8635841
# possible first bad commit: [8f3bbcff65b810
# possible first bad commit: [d34f93f031b941
# possible first bad commit: [a9b3cdd235bf96
# possible first bad commit: [197b480eac049b
# possible first bad commit: [6c8faa054473d4
# possible first bad commit: [1f955e92dc87f4
# possible first bad commit: [abfd1387464d2e
# possible first bad commit: [19ed21af1bffa6
# possible first bad commit: [8167675659a930
# possible first bad commit: [0dddd6896b9eba
# possible first bad commit: [975bc60948107b
# possible first bad commit: [366186b117cc31
# possible first bad commit: [e7566892b9a70c
# possible first bad commit: [693a6307552437
# possible first bad commit: [68f514a794848c
# possible first bad commit: [f1261c30584595
# possible first bad commit: [59784e17027c76
# possible first bad commit: [8e2bd616924b1c