Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp109504imn; Wed, 27 Jul 2022 00:48:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uoxBftsqW1poQ7xH657DuMlK35lCEPOffpMy+Z3DA2YxkiCgDck1D29SbDVQd8FVWq1CcB X-Received: by 2002:a17:907:7617:b0:72b:49fe:fdf7 with SMTP id jx23-20020a170907761700b0072b49fefdf7mr17601236ejc.25.1658908095045; Wed, 27 Jul 2022 00:48:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658908095; cv=none; d=google.com; s=arc-20160816; b=JvaUNhDaidWawkLd2LTi3k56E8gH6/2I/v5ZSikTsvpOsQPFdVsq5K4e120lSTqHTw MivUJmzevlVaUcuBtCHa3OixJ7pj2sad8hCzNgIMo/mFQ4uf0uRKSaXNJiEUH0QoFw9M C87ztTjxVRDavhHu8mQtaUkrEkd+3ZGB3WXGE/p5JgBNDMQc1Or/tYqEjLBA/MnHxuX9 7wxbVIiOfX3ccRyuubgB06yc7ln6iJM0Ro/Pln9MEtsu937UzIJBeUOOEEyZugPLoypt 8kyKwgDTG58HcdhP005PBzr87kIbFCbosLYdImK054mczXVR4jXTpLB2gKZ67/iouKZC 1WQg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rO4phdManN60SPf1W9WiyPdt9raYFpN1OI/PcK1NnQ0=; b=d7tfwU8mmkOYlyuYu3fWOytbxmoS91vwqBrGKJbjI8wsQmC/VnKKP+hssxZ1eAhLlW EdoHk26ohAMXo06Hn2GK28toW2GeOLa0BZjDLNtmGSfq5RKMR9RV0SMQJJSzxP3Fbmaa Umv4sYY3YGJDrACSqYqUnRGfZi61S8ywtBzqpOZ+8k0fmHA15RffIYu00G1Pn8mwiLHI 9BdV3Z5S9JM+YCYCrATXelZ/rXVK6tCtpZkTifh1ag3Rw9yszmco+IXGZC87TMeusxMh nioU82aLnBhieYHMQP01ZYWbUqZGn1RkM9mKm7gYNNeckCoN3VcSgkDywJw5hg5c/6Og yUAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@streamunlimited.com header.s=google header.b=uf7lDkpV; 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=streamunlimited.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd28-20020a1709076e1c00b0072b87c68bf1si2667813ejc.68.2022.07.27.00.47.49; Wed, 27 Jul 2022 00:48:15 -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=@streamunlimited.com header.s=google header.b=uf7lDkpV; 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=streamunlimited.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230298AbiG0HgY (ORCPT + 99 others); Wed, 27 Jul 2022 03:36:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229680AbiG0HgX (ORCPT ); Wed, 27 Jul 2022 03:36:23 -0400 Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5017F21278 for ; Wed, 27 Jul 2022 00:36:22 -0700 (PDT) Received: by mail-qk1-x72e.google.com with SMTP id l3so12722962qkl.3 for ; Wed, 27 Jul 2022 00:36:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=streamunlimited.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rO4phdManN60SPf1W9WiyPdt9raYFpN1OI/PcK1NnQ0=; b=uf7lDkpVYO56NWMPL08t3bV7ykOUYmDaRNEf57tqkkhLMFpNUwzcla0Lokoe8tkjv6 GY7TYiWRZHqk7bMBMb76LrdFBYz0PHG29omXVyfilS5Kj7k2Y34QjUeFMx9v5Rx6hD86 OatRJqn2LPFVr9JyH10I7+SY5t911D/Yjk6Sc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rO4phdManN60SPf1W9WiyPdt9raYFpN1OI/PcK1NnQ0=; b=FrPTfO7oI8wv5FilmgdG60e2rKeF/ueZAgcHYyfHav6A6GTj7BN3PsN56io5iMIQPM Sm7Z3FJ3EWE9nLrVCa6b/e7GJYssEKE2MTk9xqwf8BA9XNL9syUNbrXMg609xQpmpOxN phDkQ3djaSGcyVlZYQVJp2MzwsL2/oMIF5irA4UR9dDIYLfn8aX83LtHsxFims+3S78r 1rRvIQO42gyCfJiF+j2SdJ9eIzsm9v5CtLZEU/POYCkZYjgO3Y1SNuwqV/Qf7AMcdoKm 2OISNzvLaXPl0JZERKBpwtNnRxbqL9gdK+hx9PWXij13tz5F3lr7n8uIi9kLiwvxZ8HN BH6A== X-Gm-Message-State: AJIora8A5yVcr7cLaTmZuqP+jGsXqi9Zfi72r/Y3KUmiH43G/JcbsCr9 cI45+thJwHTm+mbPJlWm+xIxWg== X-Received: by 2002:a05:620a:2552:b0:6b4:8dbf:8992 with SMTP id s18-20020a05620a255200b006b48dbf8992mr15785127qko.109.1658907381478; Wed, 27 Jul 2022 00:36:21 -0700 (PDT) Received: from localhost.localdomain (vpn.streamunlimited.com. [91.114.0.140]) by smtp.gmail.com with ESMTPSA id x22-20020ac86b56000000b0031f4007dd92sm2709526qts.89.2022.07.27.00.36.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 00:36:21 -0700 (PDT) From: Peter Suti To: chuansheng.liu@intel.com, dan.carpenter@oracle.com, Greg Kroah-Hartman , Thomas Zimmermann , Javier Martinez Canillas Cc: Peter Suti , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v3] staging: fbtft: core: set smem_len before fb_deferred_io_init call Date: Wed, 27 Jul 2022 09:35:50 +0200 Message-Id: <20220727073550.1491126-1-peter.suti@streamunlimited.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 The fbtft_framebuffer_alloc() calls fb_deferred_io_init() before initializing info->fix.smem_len. It is set to zero by the framebuffer_alloc() function. It will trigger a WARN_ON() at the start of fb_deferred_io_init() and the function will not do anything. Fixes: 856082f021a2 ("fbdev: defio: fix the pagelist corruption") Signed-off-by: Peter Suti --- V2 -> V3: Add patch changelog V1 -> V2: Change commit message and base on top of linux-next drivers/staging/fbtft/fbtft-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index 9b3eaed80cdd..afaba94d1d1c 100644 --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -654,7 +654,6 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display, fbdefio->delay = HZ / fps; fbdefio->sort_pagereflist = true; fbdefio->deferred_io = fbtft_deferred_io; - fb_deferred_io_init(info); snprintf(info->fix.id, sizeof(info->fix.id), "%s", dev->driver->name); info->fix.type = FB_TYPE_PACKED_PIXELS; @@ -665,6 +664,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display, info->fix.line_length = width * bpp / 8; info->fix.accel = FB_ACCEL_NONE; info->fix.smem_len = vmem_size; + fb_deferred_io_init(info); info->var.rotate = pdata->rotate; info->var.xres = width; -- 2.25.1