sde: resource config: Refactor scaling logic into util functions

Refactor the scaling logic into util functions that can be called
from other modules that need to validate scaling. For example,
this will be used to validate scaling in the custom framebuffer
size feature for primary and external scaling.

Change-Id: I1be074a59dcbfd5e7b8a0af69f2d992a177e887a
2 files changed