Sorry guys,
But the mushrooms and other fungus are heterotrophic creatures, like the animals; but mainly saprophytic (they feed of organic residues), other are parasitic (like Athlete's Foot). Many others live in a true symbiotic relation with plants (see Mycorrhizas).
On the other hand, I think that the fungus used by the dorfs, like the plump helmets, are planted in a compost matrix (the destination of all waste residues of all fortress; including carpentry, booze and fecal residues), like our
Agaricus bisporus cultivation (I don't know the true name (or mainly know name) of this mushroom in english), that is mainly planted with farm residues (straw, feces, wine production residues and others, in a high descomposition degree). Really, the fungus don't need light, they need a good organic source: trunks, fallen leaves, roots, feces, corpses... and high humidity degree.
Other option is that all the plant-like organisms of the caverns, are a symbiotic fungus-lithoautotrophic bacteria association. This bacterias used the minerals compounds of the soil and the gases of atmosphere to produce organic products; the fungus create a structure that support and protect the bacterial community, perhaps, synthesizing some toxins against the cavern grazers and other bacterial communities (the fungus have a very complex metabolism that create great toxins, see Amanita; and substances that stop the bacterial grow or directly kill this, see Antibiotics like penicilin). And this symbiotic association support all the cavern ecosistem.
I don't discard that some of these organism are bioluminescent that permit grow some and rare strange photosynthetic creatures in other "symbiotic" or "dependent" relation.