]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/arm/hdlcd: Actually validate CRTC modes
authorRobin Murphy <robin.murphy@arm.com>
Fri, 17 May 2019 16:37:21 +0000 (17:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Jun 2019 03:36:52 +0000 (11:36 +0800)
commit301f9d04c5909193b564718f7330ffae50b27eef
treec798496f163e93d8d89d450c1b249aba42f64d06
parentcd8020337b26f2bcb8b753ee2fa61e0624872638
drm/arm/hdlcd: Actually validate CRTC modes

[ Upstream commit b96151edced4edb6a18aa89a5fa02c7066efff45 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/arm/hdlcd_crtc.c