Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2477124pxj; Mon, 10 May 2021 04:03:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrdqNwh2l4I63Xqc2qGxAEUiDBRq1gg3LxfvLSV3U6MokHB0Qc5swX07vPSRmTwfUkQe4B X-Received: by 2002:a05:6402:1547:: with SMTP id p7mr28869524edx.319.1620644620370; Mon, 10 May 2021 04:03:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620644620; cv=none; d=google.com; s=arc-20160816; b=BjsFND1gTdluL7w+WQHndtxqgQRAhFCuE/Unupyx9oSqOxqJVXnOq/riFMiFAT6wiw jzs3fVg0JUo6Rr34p7DhplpZZV4GUVcLI2jPevHQyXXxdWiAoE/YPLj7/7qUnenN+S8M RWeBpiQ97PnXU7wQwNpkNTXUjiUKzLKwOtyeCVM46YJMrV6l6amhltRfms5+u5ziiu7a LSMEXh3FqLjZm1CcA2ckcM9Rzo1mco7fG7qSiYrcv6W/XCg2T2Vw96c9Q82SZvYHd8Tg cZWcOQrvGb4vTDaqURsoX72/MXDkB9ZyJ8bOwLWwSJRyiBZytaqL3YxHJW3VdLmX4Hna 4zsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oHAA6no4nzOdUWbCJlAdAadtMHXF53Yg/6CQRD5GBrk=; b=e5WHRahM7USh5xdlKqogFcxpNGVoxe+odo154sPwZYhJfrglgboKnZV1dm3WxrSeA5 gkb/qdymnP0eYzuDWabu+/VPw8JgYrw2Huh+LhpAtykZWmJYhdJk7rAVtHf4Fdk5EEG9 a1J74B6ReixKvFsFhfUmmVRyfhNa39o2Kv/jm10nAoausYScadLyJ55qr5MFcsM3xD2O 0XqFvWYfhAKTn5KtBm6VWmOVsh1YffCuwNHqSqPfZ8Avy6odjdaMYAWIPKDBmZUFpqP1 vQdgdyCOr6ao3MvMjxU2kiBZG4lFamapozEK5xMlt6R1W2FSIXOlbfaEso3LMEeci+nc P4JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VKpDplJ4; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r13si2066332eja.684.2021.05.10.04.03.17; Mon, 10 May 2021 04:03:40 -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=pass header.i=@linuxfoundation.org header.s=korg header.b=VKpDplJ4; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234210AbhEJLCe (ORCPT + 99 others); Mon, 10 May 2021 07:02:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:59364 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233328AbhEJKpi (ORCPT ); Mon, 10 May 2021 06:45:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C7EF5619A5; Mon, 10 May 2021 10:35:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620642949; bh=E2g8ime9QkUYS40eEOyvOOQeeqASSg3edaevTPAa3hA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VKpDplJ4gHJf3L+QQsfiEX/wGe80hLOs77TPA6unloe8lhw+/btfNrmpBu2Bys7P6 KKTrkeTKu74h7hvLEf6F6mV9MzDwbITiKcnMW57ZNSsIf9uKF+VWOWiYgXGn23uAj1 Td/2wpFzKLuju31e4Dog7Oe5/VGYm8WNCojz4sy4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Zimmermann , Gerd Hoffmann , Sasha Levin Subject: [PATCH 5.10 116/299] drm/ast: Fix invalid usage of AST_MAX_HWC_WIDTH in cursor atomic_check Date: Mon, 10 May 2021 12:18:33 +0200 Message-Id: <20210510102008.802160295@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102004.821838356@linuxfoundation.org> References: <20210510102004.821838356@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Zimmermann [ Upstream commit ee4a92d690f30f3793df942939726bec0338e65b ] Use AST_MAX_HWC_HEIGHT for setting offset_y in the cursor plane's atomic_check. The code used AST_MAX_HWC_WIDTH instead. This worked because both constants has the same value. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20210209134632.12157-3-tzimmermann@suse.de Signed-off-by: Sasha Levin --- drivers/gpu/drm/ast/ast_mode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index 0a1e1cf57e19..a3c2f76668ab 100644 --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c @@ -688,7 +688,7 @@ ast_cursor_plane_helper_atomic_update(struct drm_plane *plane, unsigned int offset_x, offset_y; offset_x = AST_MAX_HWC_WIDTH - fb->width; - offset_y = AST_MAX_HWC_WIDTH - fb->height; + offset_y = AST_MAX_HWC_HEIGHT - fb->height; if (state->fb != old_state->fb) { /* A new cursor image was installed. */ -- 2.30.2