lspci -vnnn | perl -lne 'print if /^\d+\:.+(\[\S+\:\S+\])/' | egrep "VGA|3D"
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0116] (rev 09) (prog-if 00 [VGA controller]) 01:00.0 3D controller [0302]: nVidia Corporation GF106 [GeForce GT 555M] [10de:0df4] (rev a1)
lspci -vnnn | perl -lne 'print if /^\d+\: .+(\[\S+ \:\S+\] )/' | egrep "VGA|3D"
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0116] (rev 09) (prog-if 00 [VGA controller])
01:00.0 3D controller [0302]: nVidia Corporation GF106 [GeForce GT 555M] [10de:0df4] (rev a1)