Preheat oven to 350ºF. Grease a rectangular six-cup baking dish (capacity is often printed on the bottom of the dish, so check if you’re unsure). Sauté mushrooms in oil until soft, about four minutes. Add garlic and thyme and season to taste; cook for an additional minute. Meanwhile, combine butter, broth, salt, and pepper in a medium saucepan over high heat and bring to a boil. Whisk in grits and reduce heat. Cook grits over low to medium heat, whisking frequently to prevent scorching. Once most of the liquid is absorbed, add one-half cup of half-and-half. Continue whisking until liquid is absorbed, about three more minutes; add remaining half-and-half. Cook until grits are done, about two minutes more, whisking occasionally. Remove from heat. Fold in the mushrooms and then add the parmesan. Transfer to baking dish and bake for 15 minutes. Allow to set for five minutes before serving.