To query the maximum value for vscale, the LV queries the vscale_range attribute or a TTI hook. To avoid having to reimplement the same behaviour for multiple uses (such as in D142894), it makes sense to move this code to a separate function.