The short answer is this: If, on an interior surface, there are at least two holes or tears, the ‘bayis’ is invalid, unless there is at least one completely intact compartment between the torn ones. The internal surfaces must be without any tears or holes, as must the ‘titura’ (base of the ‘bayis’).
Fixing Tefillin / Retzuos (straps) part IMBY 33:1 We have learned that the ‘bayis shel rosh’ is made up of four compartments which are one – i.e. either made originally from the same leather, or fused together somehow. If there is a hole or a tear or two in the leather of the compartments, does that invalidate the ‘bayis’?