The amount of energy needed by brains is fixed. The amount needed by computers can be decreased.
Also, the upper bound on how much energy is available to us should we really need, from the nearest power source, is some 6-9 orders of magnitude greater than the amount we currently take from it as a whole planet (most of it being wasted). Food growth, on the other hand, is much more limited by many other factors such as ecosystem impact, limited land area, failing crops, speed of production of seeds, and all sorts of pesky logistical issues...
I was referring to going and harnessing the sun's output, which is, iirc, somewhere between 10^7 and 10^9 times bigger than what the Earth gets (can't be bothered to do the calculation to figure out exact order of magnitude).
If our hypothetical AI saturates insolation output and minimises waste (most of our 5% usage is utter waste from a computational point of view. We mostly spend our energy to produce poop and move physical stuff around pointlessly), it will already have a lot more energy to spend on computation than we do today, and then if it really needs more there's millions of times more energy available just one AU away, easily harvested if it's already figured out how to do so efficiently on Earth.
So my point is, there may be a Malthusian limit of sorts, but by the time we reach that, the bottom part of the S curve is so far behind that we can't even remember it anymore. It's as if the classical Malthusian limit was that Earth can "only" feed 10 million billion people.
Oh, and I forgot another source of huge amounts of energy: Jupiter. 75% hydrogen, 1.8986×10^27 kg, which works out as ... well, a whole lot of fusion energy if you can harvest it.
Also, the upper bound on how much energy is available to us should we really need, from the nearest power source, is some 6-9 orders of magnitude greater than the amount we currently take from it as a whole planet (most of it being wasted). Food growth, on the other hand, is much more limited by many other factors such as ecosystem impact, limited land area, failing crops, speed of production of seeds, and all sorts of pesky logistical issues...