[Intel-gfx] Help needed for unusual hack

harrykipper harrykipper at gmail.com
Fri Jul 31 06:34:06 PDT 2015


Hello, I have a Thinkpad X230 (IvyBridge, HD4000) with a very clever 
display mod (described to some extent by a guy here --> 
http://boweihe.me/?p=1442). Practically the low res native LVDS panel 
of the laptop was replaced with a FHD IPS eDP panel. The FHD eDP screen 
is attached to the dock DisplayPort connector on the laptop's 
mainboard, which has been rewired in some way, possibly with an 
interface board. The setup works fairly well, the screen is detected as 
DP-3 (the laptop has two other external digital ports) and treated as 
external. I could disable the non existent lvds screen using 
video=lvds1:d to prevent the gpu from duplicating the signal and 
wasting power, but that doesn't give me brightness controls because the 
lvds port is still initialized by the drm module and the 
intel_backlight/ directory is found in 
/sys/devices/pci0000\:00/0000\:00\:02.0/drm/card0/card0-LVDS-1/.

To try and solve this I went ahead and:
1 - added my laptop's vendor and model number to the 
intel_no_lvds_dmi_callback() function in intel_lvds.c
2 - changed the is_edp() function in intel_dp.c to always return 'true' 
:-D

This way the lvds port skips being initialized, so card0-LVDS-1 doesn't 
exist at all, the DP port is detected as eDP and intel_backlight sits 
correctly in 
/sys/devices/pci0000\:00/0000\:00\:02.0/drm/card0/card0-DP-1/. The 
screen works perfectly, I have full backlight control and xrandr shows 
all the modes supported by the panel. The backdrop is that the other 
two digital ports are lost, because the kernel disables them when it 
tries to initialize them as eDP, which obviously they are not. In dmesg 
I see

[drm] failed to retrieve link info, disabling eDP

repeated twice, suggesting that the third port is configured correctly, 
as in fact it is.

Now obviously this is a very ugly hack that I came up with as a non 
programmer, unfamiliar with the kernel, and additionally I have an 
error at boot (see below)

My question is (are): could anyone suggest a more clever way of forcing 
the third DP port to be detected as eDP and keeping the other two 
alive? Is the error below something that I should worry about?

Thanks very much and sorry if this is not the right place to ask.

WARNING: CPU: 0 PID: 6 at drivers/gpu/drm/i915/intel_display.c:1034 
ironlake_crtc_disable+0x93/0x7f0()
[    3.220452] pipe_off wait timed out
[    3.220453] Modules linked in:
[    3.220456] CPU: 0 PID: 6 Comm: kworker/u16:0 Tainted: G     U       
   4.1.3-eDP #7
[    3.220458] Hardware name: LENOVO 2324B14/2324B14, BIOS G2ETA4WW 
(2.64 ) 04/09/2015
[    3.220463] Workqueue: events_unbound async_run_entry_fn
[    3.220466]  ffffffff8174a298 000000004c6f2a3f ffffffff8174a298 
ffffffff815d398b
[    3.220468]  ffff8802149377f0 ffffffff81071907 ffff8802146e0000 
ffff880214a92800
[    3.220470]  0000000000000000 ffff880214a92b38 ffff880214a92b40 
ffffffff81071998
[    3.220471] Call Trace:
[    3.220478]  [<ffffffff815d398b>] ? dump_stack+0x47/0x67
[    3.220482]  [<ffffffff81071907>] ? warn_slowpath_common+0x77/0xb0
[    3.220484]  [<ffffffff81071998>] ? warn_slowpath_fmt+0x58/0x80
[    3.220488]  [<ffffffff813c7183>] ? ironlake_crtc_disable+0x93/0x7f0
[    3.220492]  [<ffffffff81358229>] ? drm_mode_copy+0x19/0x30
[    3.220496]  [<ffffffff81158c30>] ? __kmalloc_track_caller+0x20/0x1d0
[    3.220499]  [<ffffffff813c897c>] ? __intel_set_mode+0xb6c/0xc90
[    3.220503]  [<ffffffff813be913>] ? 
intel_dump_pipe_config.isra.52+0x33/0x3e0
[    3.220508]  [<ffffffff813b141c>] ? gen6_write32+0x2c/0x90
[    3.220510]  [<ffffffff813cfc9a>] ? 
intel_crtc_set_config+0xd3a/0x1060
[    3.220514]  [<ffffffff8136178a>] ? 
drm_atomic_state_clear+0x10a/0x180
[    3.220517]  [<ffffffff81351fcf>] ? 
drm_mode_set_config_internal+0x5f/0x100
[    3.220521]  [<ffffffff81340279>] ? restore_fbdev_mode+0xb9/0xe0
[    3.220524]  [<ffffffff8134218b>] ? 
drm_fb_helper_restore_fbdev_mode_unlocked+0x1b/0x60
[    3.220526]  [<ffffffff813421ed>] ? drm_fb_helper_set_par+0x1d/0x40
[    3.220530]  [<ffffffff813de4f1>] ? intel_fbdev_set_par+0x11/0x60
[    3.220533]  [<ffffffff812a50e0>] ? fbcon_init+0x580/0x610
[    3.220536]  [<ffffffff8130bb4c>] ? visual_init+0xac/0x110
[    3.220539]  [<ffffffff8130d694>] ? do_bind_con_driver+0x1e4/0x440
[    3.220542]  [<ffffffff8130dc30>] ? do_take_over_console+0x110/0x1a0
[    3.220545]  [<ffffffff812a51c3>] ? do_fbcon_takeover+0x53/0xc0
[    3.220550]  [<ffffffff8108d647>] ? notifier_call_chain+0x47/0x70
[    3.220552]  [<ffffffff8108d93c>] ? 
__blocking_notifier_call_chain+0x3c/0x60
[    3.220556]  [<ffffffff812ae0d0>] ? register_framebuffer+0x210/0x360
[    3.220559]  [<ffffffff81342492>] ? 
drm_fb_helper_initial_config+0x282/0x470
[    3.220561]  [<ffffffff8108ed7e>] ? async_run_entry_fn+0x3e/0x150
[    3.220564]  [<ffffffff81086d4e>] ? process_one_work+0x11e/0x3d0
[    3.220566]  [<ffffffff81087048>] ? worker_thread+0x48/0x4c0
[    3.220570]  [<ffffffff815d70ca>] ? preempt_schedule_common+0x1a/0x40
[    3.220572]  [<ffffffff81087000>] ? process_one_work+0x3d0/0x3d0
[    3.220576]  [<ffffffff8108ca38>] ? kthread+0xc8/0xe0
[    3.220579]  [<ffffffff8108c970>] ? kthread_worker_fn+0x180/0x180
[    3.220582]  [<ffffffff815da8d2>] ? ret_from_fork+0x42/0x70
[    3.220585]  [<ffffffff8108c970>] ? kthread_worker_fn+0x180/0x180
[    3.220587] ---[ end trace 5ff7400acd9836ea ]---
[    3.330758] [drm:ironlake_crtc_disable] *ERROR* failed to disable 
transcoder A
[    3.333347] [drm:intel_set_pch_fifo_underrun_reporting] *ERROR* 
uncleared pch fifo underrun on pch transcoder A
[    3.333350] [drm:cpt_irq_handler] *ERROR* PCH transcoder A FIFO 
underrun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20150731/a092675a/attachment.html>


More information about the Intel-gfx mailing list