Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753860AbdLUMsr (ORCPT ); Thu, 21 Dec 2017 07:48:47 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:52835 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753831AbdLUMsq (ORCPT ); Thu, 21 Dec 2017 07:48:46 -0500 Date: Thu, 21 Dec 2017 13:48:44 +0100 From: Maxime Ripard To: Jonathan Liu Cc: David Airlie , Chen-Yu Tsai , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH] drm/sun4i: hdmi: Fix sun4i_tmds_determine_rate Message-ID: <20171221124844.2ur26ijap3rtv2o7@flea.lan> References: <20171221112411.21550-1-net147@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="g7lktqrmtc2tfeo3" Content-Disposition: inline In-Reply-To: <20171221112411.21550-1-net147@gmail.com> User-Agent: NeoMutt/20171208 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1936 Lines: 54 --g7lktqrmtc2tfeo3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Thu, Dec 21, 2017 at 10:24:11PM +1100, Jonathan Liu wrote: > There are several issues in sun4i_tmds_determine_rate: > - doesn't check if the best match was already set before comparing it > with the enumerated parameters which could result in integer divide > by zero > - doesn't consider rate halving when determining closest match if it > can't match the requested rate exactly > - sets best_div to i which corresponds to rate halving when it should be > set to j which corresponds to the divider >=20 > Fix these issues. >=20 > Fixes: 9c5681011a0c ("drm/sun4i: Add HDMI support") > Signed-off-by: Jonathan Liu Please make separate patches for each of these issues, if possible detailing how do you reproduce them. Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --g7lktqrmtc2tfeo3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAlo7rasACgkQ0rTAlCFN r3QWWw//XTaoB8PYHqGG0B23vZ8PPTaTBXLY4KfEF2qGNU7/z/cTuDPnofnjZYvr wp2T1DPfx3sxifo7VSpMJuWASDyk1P+yCyHAjmRCXFHVunWMMqfFsVP0WFrYgkU6 f/Qwinkp0Xj1FoTY6hRW/pM9PqzqerRj05RXxzqKtEhmkk/1c8ScYbfO3qQRZCGq GObOmT+8GHcJBY5t/jFOuo9mnjmHYNUKN7eCW7E7z0035oosIoqkNn2Bimt3ON9x bKQT5zO5MzVZ+XNyNX5HL5iH8ztocyIX58fOEiPTZeyJpu1feesz+MUsgKKDPtLK rln2r++PV2+/yiL3uyKH7wWJM7AxWsYDwzZlAbDZhtmu2Y5ahI1AtimYPsvTSqi+ 1DLEAh+xgVqnca3GnKf0K/u/LLf1QxdqYMlypSRUVh9IeDoWlJXzcbd7n4vC8P+I /MZet6FnXhS+hzm6CAQV4REjxkAclXcm9RQaGiIFXwJOTJtYm6vHBdH5saU+L7xx xZ6lJN7O3rSmw5abRfPMe5mQTb+PflpRZWmRywbCu6LoSFV1RErWqqrus/RPwpBU UmS9ahr3KO0cwIAFJQinqHB/L3VNZEFcAd33DhcJSwrKW6a5mQr4wahoBvxVUfB3 QTSALHFSDv8ZWzn6Milfi1G55IfuTYOMAfkP1//zWsUFKbrFxf8= =YQs5 -----END PGP SIGNATURE----- --g7lktqrmtc2tfeo3--