Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1540640ybk; Sat, 16 May 2020 14:53:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygzKyQ1eXsQTeOVd5NHxcvs+SCQP84LA9pzuU2O44cX0TskvRLIi88GkswRxgb7n0zu5A3 X-Received: by 2002:a50:9e89:: with SMTP id a9mr8312812edf.24.1589666013824; Sat, 16 May 2020 14:53:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589666013; cv=none; d=google.com; s=arc-20160816; b=RiJxyF9uk4lLWJv6EgisFBYsZHr/+bv/E5PriNoB/FBkT18WmMU5Gr63qzGDS038xn qpY1oJMo5su9EaI90ot1tqg86pXk2YUdInjGJE/zNGomtjaVeBYJHoJUPBA6rDMNB/VM bMz5aFtVcbK911nRsSzIpp1WrDKFOex+f3ax9WyWxaoY4+1Ek+sbcslYM1tv/6Cx95Md SHj9Sab9i+YSPm9Rqz+7BZ9VZPW+7Gc/xsUj+GAU1zUmHgfUWizEN0h4fzxwMCK+HruX n/+kdqMUg5zGlsb4JvLlcQLnhuv+XMYIKK2cVnEEZTlGozir8+CdIe0gnPvoqUzpXQ+L ZEUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CxOycF7x5Xfh3qQrptTLTKm/tEoeEcVgZ8q3htBi1cA=; b=xkVkc4VEvCwhFULjjq8kwWWGt0fMHDRit8BFggJGQih0XzG4a48kF7Bm2HJ4rSrEqi SKoAXRn/SJGUtDK0iSuNiHJZMy0AJKo2/CFhxowdQ4v5GMOmsQEYV8TydeWENZNRGCqi LqUOLV8273H6dotZDQe8I6gBH3UQjCE6yYWtiYbNEB4s41764gqRbGp97B5uECeDogb4 nrmz3oL6D1wRiIydPLaQmxEKbbotqsdpOJFdWqMhuJHd2y3av8PkK19uTtERR6T03M46 zm8ANti84pk2rMdAvW74RBy75UtpV/CHgN9PJMBzY2ZYn9bPF7OTvvxKaZCZQ15Mmh5k PfTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b="m1udSjW/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si3441639edw.590.2020.05.16.14.53.11; Sat, 16 May 2020 14:53:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b="m1udSjW/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726937AbgEPVve (ORCPT + 99 others); Sat, 16 May 2020 17:51:34 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:46808 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726660AbgEPVve (ORCPT ); Sat, 16 May 2020 17:51:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1589665871; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CxOycF7x5Xfh3qQrptTLTKm/tEoeEcVgZ8q3htBi1cA=; b=m1udSjW/5z3tn0AAeEykySxfbNi61NRIya8NwgjF0btMMeVyaTXPTAhV8LUt/66RUsa+PK /Fk86RtVJaHdJyW3xFFY3la8zMVBbX7xh0ncM1YrYVP/dzHL7M6URy16cHsBzW6+3NQKsM VAg21Lw4ot5ontUY61GNpjtTSldrzjg= From: Paul Cercueil To: David Airlie , Daniel Vetter , Rob Herring , Greg Kroah-Hartman , "Rafael J . Wysocki" Cc: od@zcrc.me, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil , stable@vger.kernel.org Subject: [PATCH 04/12] gpu/drm: ingenic: Fix bogus crtc_atomic_check callback Date: Sat, 16 May 2020 23:50:49 +0200 Message-Id: <20200516215057.392609-4-paul@crapouillou.net> In-Reply-To: <20200516215057.392609-1-paul@crapouillou.net> References: <20200516215057.392609-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The code was comparing the SoC's maximum height with the mode's width, and vice-versa. D'oh. Cc: stable@vger.kernel.org # v5.6 Fixes: a7c909b7c037 ("gpu/drm: ingenic: Check for display size in CRTC atomic check") Signed-off-by: Paul Cercueil --- Notes: This patch was previously sent standalone. I marked it as superseded in patchwork. Nothing has been changed here. drivers/gpu/drm/ingenic/ingenic-drm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c b/drivers/gpu/drm/ingenic/ingenic-drm.c index 632d72177123..0c472382a08b 100644 --- a/drivers/gpu/drm/ingenic/ingenic-drm.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm.c @@ -330,8 +330,8 @@ static int ingenic_drm_crtc_atomic_check(struct drm_crtc *crtc, if (!drm_atomic_crtc_needs_modeset(state)) return 0; - if (state->mode.hdisplay > priv->soc_info->max_height || - state->mode.vdisplay > priv->soc_info->max_width) + if (state->mode.hdisplay > priv->soc_info->max_width || + state->mode.vdisplay > priv->soc_info->max_height) return -EINVAL; rate = clk_round_rate(priv->pix_clk, -- 2.26.2