From patchwork Mon Jun 1 17:53:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 225046 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90A40C433E1 for ; Mon, 1 Jun 2020 18:15:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 600CD206E2 for ; Mon, 1 Jun 2020 18:15:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591035305; bh=REob3D4KrzEOuSUejg/+T6cuJbK+qyQovHToXrnAMuw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=hTdC4MUOdlKq83W6jC4FEUaCCfrJ63V6vEhOLQh8WDJRQYYi4zWNfxK4KuqBi7R+E KpBFN2/3FPGZN+5mXTnvtwwKNce77ia6lns9m0YFufqdq6SbgW4fjkBfzvSXPy2Oag Bzw5n9SRkz+w7U9CzF+RJRWuV/yebbSaKPg6UBG4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731230AbgFASPE (ORCPT ); Mon, 1 Jun 2020 14:15:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:35156 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731545AbgFASPD (ORCPT ); Mon, 1 Jun 2020 14:15:03 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ABA2B2068D; Mon, 1 Jun 2020 18:15:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591035303; bh=REob3D4KrzEOuSUejg/+T6cuJbK+qyQovHToXrnAMuw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=piC5kdxFWKnyJL06nSNhZSXVbc9O955PCpQS5OOmTDG5gb9NrGxn+P1Y4ksABJ2SZ ejO50NhXv6LPL6SBbAFmOyECMXKO2VOn0KXXxoGM6c60Mki4wkj+XKa9Q9omk1yOZJ xpQv5civCDx9jjAgaaM5gKvKojE25Hg3bgMFcWdw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Cercueil , Sam Ravnborg , Sasha Levin Subject: [PATCH 5.6 100/177] gpu/drm: ingenic: Fix bogus crtc_atomic_check callback Date: Mon, 1 Jun 2020 19:53:58 +0200 Message-Id: <20200601174057.015963628@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200601174048.468952319@linuxfoundation.org> References: <20200601174048.468952319@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Paul Cercueil [ Upstream commit a53bcc19876498bdd3b4ef796c787295dcc498b4 ] 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 Link: https://patchwork.freedesktop.org/patch/msgid/20200516215057.392609-4-paul@crapouillou.net Acked-by: Sam Ravnborg Signed-off-by: Sasha Levin --- 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 bcba2f024842..8f5077370a52 100644 --- a/drivers/gpu/drm/ingenic/ingenic-drm.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm.c @@ -328,8 +328,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,