Heat 1/2 tbsp of the oil in a skillet. Add the coriander, cumin, chillies. cardamom, cloves, cinnamon, peppercorns, poppy seeds and fennel seeds and roast until the coriander seeds start changing color and become fragrant.
Add the sliced onion, garlic and ginger and saute until the onions get brown spots. Remove to a blender.
Without adding any more oil, roast the shredded coconut in the hot pan until they start turning golden-brown. Be vigilant because coconut can burn easily. Add the coconut to the blender with the other spices and the tomato.
Blend into a smooth paste. Add a little water if necessary to keep the blades moving. I find that the juice in the tomatoes is usually enough.
In the same skillet used for toasting the spices and onions, heat the remaining 1 tbsp of oil.
Add the chopped onions and cilantro and cook until the onions start getting brown spots.
Stir in the turmeric and add the mushrooms and eggplants, if using. Add some salt and stir well. Cover the pan and let the vegetables cook over medium-low heat for about five minutes. Stir a couple of times to make sure they don't stick -- some brown spots are fine and even good.
Add the cooked potatoes and the ground masala from the blender. Add two cups water or vegetable stock is even better.
Stir to mix well and bring everything to a boil. You can add more stock or water if you want a thinner curry.
Add salt if needed and let the curry simmer for another 10 minutes so the flavors meld.
Garnish with cilantro and serve hot with rice or bread, and wedges of lemons to squirt on top of the curry. A cucumber raita goes perfectly with this.