From patchwork Mon Oct 24 11:28:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9763 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp550370wru; Mon, 24 Oct 2022 09:45:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6a/2MFFVxNeBqK3qtqxAJH9b1+p/0K+Bv0tsUpQguq8whGYa7z7qTrE+wniRDCeOPbzXl+ X-Received: by 2002:aa7:818f:0:b0:562:dc99:8a84 with SMTP id g15-20020aa7818f000000b00562dc998a84mr34200916pfi.30.1666629954762; Mon, 24 Oct 2022 09:45:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666629954; cv=none; d=google.com; s=arc-20160816; b=enGGKC9PYJ09CM9I0YdT+pipEicWKtF2fGec30ge+xP+3NBUnYjfrkErwL0XKTsHDO GdIgqp2/wpVAD/ut9k+CNBO4rQGXFYpQLvk8cMlJao4ONW2uY8Gp7oyPhsPDHfZWNoRa 24Ng06R08mtl70jVey1VFBESnKveTZd9G5e/uw8dBUEdKkQrLwsGhwtIuYC/ESZA1CuU O/g58cfdepaaiXQ8B+uN2xaNSN7mGfCtVBJCNiRV/APA2+h+G+OzHrKC+jXfFnBOm724 PmvtHFv7JsuEcLRjaoAGakBMXMaPmbsWX3iOwXBR1c0srdDPZ1JSzITvLMrMcGqqibyW 58uw== 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=mduENeGFEoaHBhzOOnbVkK9V/KcF8gCdJevAR4Roa/kEGvRg8GgomTkaJiymgLIz0G uTPuacmzRLSX8e00qVzFt6YhXjgYAPmdTiCcOJC/TC+oGWGAffh4Fz08eme6eXxhbOnl qusWwx7AMBxfCpBj2razF9CcHo2uMDkBC7Feo+GhpgkpP3FhAuo2U3XUxZnrbpbpaiv5 g18bIsD6ByGl2JNsOHY0PFU8Dfr0VmYALIuZB7QwkbIrjfdaTJL8d37fkKNPu8s16y8h iysiklUfYr4IdSTEvLfDUhfIFyUzPE5GAQglnqPiUp0Wo9tAjEJgt38YI/wO0pS+5vd8 VDBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=w2Ry+33J; 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 s4-20020a170902ea0400b00182631bdf78si28396263plg.222.2022.10.24.09.45.36; Mon, 24 Oct 2022 09:45:54 -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=w2Ry+33J; 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 S234809AbiJXQpL (ORCPT + 99 others); Mon, 24 Oct 2022 12:45:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234990AbiJXQoK (ORCPT ); Mon, 24 Oct 2022 12:44:10 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB8199E2C2; Mon, 24 Oct 2022 08:30:27 -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 ams.source.kernel.org (Postfix) with ESMTPS id 2F947B811A5; Mon, 24 Oct 2022 12:07:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 838A2C433C1; Mon, 24 Oct 2022 12:07:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666613229; bh=Ys3ka49cccFJzfsTCTuZ+erQPYHY5yRX3BygybRzjkA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w2Ry+33JZoizGkywHI81h3wacURBrdYsrHmHBSB8m/mp5kQFGn7Q00A9gsIrlzfg0 qz6AVX1BzDtKJ7WrCzn0xJw+bSAAZX+u/N9PCAiCpwWgTzKmz1xQXuqhSagpfsK5Vp Y3sgESGOfOaawnp/xv4enJ82ladi/Y/ISfsSiIAY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Helge Deller Subject: [PATCH 5.4 028/255] parisc: fbdev/stifb: Align graphics memory size to 4MB Date: Mon, 24 Oct 2022 13:28:58 +0200 Message-Id: <20221024113003.381799170@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113002.471093005@linuxfoundation.org> References: <20221024113002.471093005@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?1747588171692062236?= X-GMAIL-MSGID: =?utf-8?q?1747588171692062236?= 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;