drm/msm: teardown all modes in lastclose handler

Need to teardown all active crtcs during lastclose to avoid
causing faults by turning off clocks on running hardware. To
do this, implement the lastclose handler, and have it send in a
disabling commit for all planes and crtcs. To support this,
need to move the clock enable / disable out of the device open
and close handlers, and into the use case enable / disable in
the encoder, and into the vblank enable / disable handlers. As
well, needed to remove fence refcounting logic from duplicate
state function since the fd at that time is not valid, and the
ref counting itself is unnecessary.

Change-Id: I841bbbdec0e64bb76470007e09066663c13134e3
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
6 files changed