From patchwork Mon Oct 24 11:26:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9260 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp462157wru; Mon, 24 Oct 2022 06:45:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6napZHB/io5aPcxdU8EgwAtRF7Z1pL0UGvDyc3a5K3Vpww271b6LaruQOcf/leQTbLJ+wJ X-Received: by 2002:a17:90b:1644:b0:20b:1cb4:2c9a with SMTP id il4-20020a17090b164400b0020b1cb42c9amr77039239pjb.193.1666619124982; Mon, 24 Oct 2022 06:45:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666619124; cv=none; d=google.com; s=arc-20160816; b=o4OwSK2D39dvlwPM26hCl2AfVJk7i1hLCJP0amOuPIiRuqJyvjyGNKmB+zf7XNgLfb yYQhxax6pPnfsyuo1ZyrbWLFkkQ0v9aLX/8813IRIuYTQyGegIWV6ET0hFDZtiP7wtEG 8Uk6ROE5rCb4K/Zv0HQ8b3uMHZjKM4jiC33j7bo0ypHqwjw/RDzv3EUZ7OqHEJhIR1R3 KbnI1aOM/i43GGQl+JHJVUgIVve7jRyDQOiIdDo9rKWCCpwdiuFjRY8i96H5Ol3oMAV8 /ecDFpyr1Q5Vxc5HlJBtGymZn/4VLvHBL9iU2aBYUda2E1rItigCIfR9KdH5FTYDHcv+ El3g== 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=0iXjiI1uzDUFY4xmp74E6j77SdFazKA7znoCBQisjxM=; b=nhGbO5sqoVBYNrM/9YXDAOKwlPEqgh1U52I4wSEk7DV461LssWy8WoHZqe/ZlFfDW4 t1eWsnjrhwNse2GAsxZPnbZhEeIZ5ruWMpvadyKwb5jLDwy/Jj/+xNxT0B9w8H0MF7ve SvD8o1Veg9/lWUXJz9f3UqnIBwUeZ2saCPqUieF596w++uZLE7QS7nFR/kJZjSUtqHC3 WgVxGMAzz0Rc/5Z6KxjRNVb7EtTY3FL3oRDcNPlvpoyZ6QAEIqcmubfGok54exeUnwQ8 DtPLpR/Y2pNsqsX6nYDlTh1h/Vxp9Ypi7n5HPXKpqe+GIiFu7jDWJEA6JkFs+n9Xeukv 1s+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=r8mIUjiS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oj17-20020a17090b4d9100b002132abf9ad6si1030814pjb.148.2022.10.24.06.45.11; Mon, 24 Oct 2022 06:45:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=r8mIUjiS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S236287AbiJXNnW (ORCPT + 99 others); Mon, 24 Oct 2022 09:43:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236254AbiJXNjl (ORCPT ); Mon, 24 Oct 2022 09:39:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 915832BB29; Mon, 24 Oct 2022 05:36:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5BE53612A8; Mon, 24 Oct 2022 12:34:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6CF76C433D7; Mon, 24 Oct 2022 12:34:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614885; bh=Ys3ka49cccFJzfsTCTuZ+erQPYHY5yRX3BygybRzjkA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r8mIUjiSewG4SjbDEGxibSFMN9O+yZA3HrAc/z0zk08eBa+uLvf1Ex40l7myfVgjF 1MHaGZbkkvyzcQZv7dkW7vETKuE6zku4uxiU53S5I0ywemnvI6952u+yoaa9fMMa8j 5ci9Phz+1plo5UtbDdAnRH6KnpyKcixIrtC9Zyxc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Helge Deller Subject: [PATCH 5.15 041/530] parisc: fbdev/stifb: Align graphics memory size to 4MB Date: Mon, 24 Oct 2022 13:26:25 +0200 Message-Id: <20221024113046.882427772@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113044.976326639@linuxfoundation.org> References: <20221024113044.976326639@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747576815756669193?= X-GMAIL-MSGID: =?utf-8?q?1747576815756669193?= From: Helge Deller commit aca7c13d3bee81a968337a5515411409ae9d095d upstream. Independend of the current graphics resolution, adjust the reported graphics card memory size to the next 4MB boundary. This fixes the fbtest program which expects a naturally aligned size. Signed-off-by: Helge Deller Cc: Signed-off-by: Greg Kroah-Hartman --- drivers/video/fbdev/stifb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/video/fbdev/stifb.c +++ b/drivers/video/fbdev/stifb.c @@ -1257,7 +1257,7 @@ static int __init stifb_init_fb(struct s /* limit fbsize to max visible screen size */ if (fix->smem_len > yres*fix->line_length) - fix->smem_len = yres*fix->line_length; + fix->smem_len = ALIGN(yres*fix->line_length, 4*1024*1024); fix->accel = FB_ACCEL_NONE;