drm/arm/hdlcd: Actually validate CRTC modes
authorRobin Murphy <robin.murphy@arm.com>
Fri, 17 May 2019 16:37:21 +0000 (17:37 +0100)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Tue, 4 Jun 2019 14:12:44 +0000 (15:12 +0100)
commitb96151edced4edb6a18aa89a5fa02c7066efff45
tree6be6878505c7fa48f980c91160df4a05fbdc46f2
parent6a88e0c14813d00f8520d0e16cd4136c6cf8b4d4
drm/arm/hdlcd: Actually validate CRTC modes

Rather than allowing any old mode through, then subsequently refusing
unmatchable clock rates in atomic_check when it's too late to back out
and pick a different mode, let's do that validation up-front where it
will cause unsupported modes to be correctly pruned in the first place.

This also eliminates an issue whereby a perceived clock rate of 0 would
cause atomic disable to fail and prevent the module from being unloaded.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
drivers/gpu/drm/arm/hdlcd_crtc.c