Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1564319pxb; Tue, 8 Feb 2022 22:27:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJxrtGlF1dFAwMlPTKIUCssuN7vePBH2K1BI/bCF03jEUPPyzOQeNn89hGq60qaCooPqAcBS X-Received: by 2002:a17:90b:1b0e:: with SMTP id nu14mr1788418pjb.44.1644388075689; Tue, 08 Feb 2022 22:27:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644388075; cv=none; d=google.com; s=arc-20160816; b=mBvvLZdG2sFA8mq8m19LDDYczKjNCKfA6N9IfOLLtoy7TeQbKMPDCXxnVMkUyZeCfZ Fex5iElU/Qf90fJWYDOkF5mlIUFhU6qggNQov5mqG+NVOIcLvTedWYAQR+645V5Rr3TR qOS3usgatLFTsRZQFV919Yf+u3LU78/nuzkozvvF5IIFJ9q97ifj7XCStHMnIyjlf9Si wMlvIsxHphp+8HHV0DuA947l7BAOOgXCfrq1W41KwgC/ri0JfZKJjT7Rzxr5jbBMCf/I r884Q7vx+bsM4bLBdH8MbctxLBrOvIU4wvaLlntCf70b0VwNGLqdKNkz8BtKf2PU680r pjrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=8rCyE259QoTAuF9ujcMI8WQXkRdDBnGG4G9shkzQjfs=; b=AAqm40573vXDx6V6OKBJxItxH9UjxKyaSqW6TFKEgPUwAieQUsRxAMBWOTfsMB+c/L 4PQ26DVcrCP0uZMFhIa8S8oQ8axiqG4x3/BX+QbyR2Gz0d+huuXcr8aA3QUZq9RhJMpN RIH6gCZxQzqla5YbbvzH5bWdzK4c9qzf1Nn/ZSJkGm1Iy3uqx8BqsyW5sXSNrQHMHXHM xiZiRnMP7AHWUNed8dMtflbylxzMO7gZKSbBjToM0em5jjQTYpvwJ7DzRnAgBrQzNd+Z ceLQXMnt9GmW0ELVBddhHzgtkcDCkmkhNlLYNrk+47DasV8KIaJfqhEwButoORv2i2qx PA5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b="TClcMH3/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 8si14880802pfl.267.2022.02.08.22.27.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 22:27:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b="TClcMH3/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B0E9BE024627; Tue, 8 Feb 2022 22:07:47 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387009AbiBHW0q (ORCPT + 99 others); Tue, 8 Feb 2022 17:26:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1386584AbiBHU4r (ORCPT ); Tue, 8 Feb 2022 15:56:47 -0500 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A07E7C0612B8 for ; Tue, 8 Feb 2022 12:56:42 -0800 (PST) Received: by mail-wr1-x42b.google.com with SMTP id f17so581397wrx.1 for ; Tue, 08 Feb 2022 12:56:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=8rCyE259QoTAuF9ujcMI8WQXkRdDBnGG4G9shkzQjfs=; b=TClcMH3/O8IpIo3td4YsN56mO1iC7OT2x7WX2FMn/DpIGkX8EwvlmyzJbHfyaO9kmA QR+OyCNEr5uu9lVSwWwjtgl0lfk3CYGV3p3l0yw3SkRJWXcGZ93pUtqvBqM9Zhqox2W1 OsfUI+doa0d/YIr1nV4EX0pA8AvKm9sFFLitM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=8rCyE259QoTAuF9ujcMI8WQXkRdDBnGG4G9shkzQjfs=; b=uT5ulw9Rr8ONw2qblgpoaIgy+uu+XirdIeCEqkikrJrIpMyq+gwpK6u39qzCg1N6w7 Pb98TtbYHPdLMxZI1MWOzcBLget3B8trh/HYgyc1Cy7+qL7b7u76CxGPQ+m06jHmpD5o g2Gbbe3gihRJR4RxyKvB8yuYdjFPpJ/Jozk29TveuX+CNbobs4pBwyxk0bJYW5EVrIlp q+RmypOFD0dfFy9Xt2RT1oivpSu65lkQagkQzcZ2edtftoXrHBNpcEZb5tQXsd1sH9jN YNcOOMI0y1lvUm73hQbSKQ+oertTubDFnZPuWTjdsnefu1FXoK/qFLKc9S8ZRFYWo7Mv h+cg== X-Gm-Message-State: AOAM532WO+BfkXmrq6AtIkuwlz1IT3Tjk0cCvEmrsp5apXx1F4zHSpWI QrSxfHLN/0r1GkhOoiQMTQrf0ZTWK7ZIVQ== X-Received: by 2002:a05:6000:1a89:: with SMTP id f9mr5048305wry.573.1644353801125; Tue, 08 Feb 2022 12:56:41 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id b16sm3490549wrj.26.2022.02.08.12.56.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 12:56:40 -0800 (PST) Date: Tue, 8 Feb 2022 21:56:38 +0100 From: Daniel Vetter To: Sam Ravnborg Cc: Daniel Vetter , DRI Development , linux-fbdev@vger.kernel.org, Zheyu Ma , Xiyu Yang , Jens Frederich , Tetsuo Handa , Intel Graphics Development , linux-staging@lists.linux.dev, LKML , Matthew Wilcox , Zhen Lei , Guenter Roeck , Greg Kroah-Hartman , Alex Deucher , Daniel Vetter , Jon Nettleton , Helge Deller Subject: Re: [PATCH 21/21] fbdev: Make registered_fb[] private to fbmem.c Message-ID: Mail-Followup-To: Sam Ravnborg , DRI Development , linux-fbdev@vger.kernel.org, Zheyu Ma , Xiyu Yang , Jens Frederich , Tetsuo Handa , Intel Graphics Development , linux-staging@lists.linux.dev, LKML , Matthew Wilcox , Zhen Lei , Guenter Roeck , Greg Kroah-Hartman , Alex Deucher , Daniel Vetter , Jon Nettleton , Helge Deller References: <20220131210552.482606-1-daniel.vetter@ffwll.ch> <20220131210552.482606-22-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 5.10.0-8-amd64 X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 On Tue, Feb 08, 2022 at 08:00:38PM +0100, Sam Ravnborg wrote: > Hi Daniel, > > On Mon, Jan 31, 2022 at 10:05:52PM +0100, Daniel Vetter wrote: > > Well except when the olpc dcon fbdev driver is enabled, that thing > > digs around in there in rather unfixable ways. > > > > Cc oldc_dcon maintainers as fyi. > > > > Cc: Jens Frederich > > Cc: Jon Nettleton > > Cc: Greg Kroah-Hartman > > Cc: linux-staging@lists.linux.dev > > Signed-off-by: Daniel Vetter > > Cc: Daniel Vetter > > Cc: Helge Deller > > Cc: Matthew Wilcox > > Cc: Sam Ravnborg > > Cc: Tetsuo Handa > > Cc: Zhen Lei > > Cc: Alex Deucher > > Cc: Xiyu Yang > > Cc: linux-fbdev@vger.kernel.org > > Cc: Zheyu Ma > > Cc: Guenter Roeck > > with the build thingy fixed: > Acked-by: Sam Ravnborg > > I do wonder if there is a more clean way to trigger a blank > in the main fbdev driver from the olpc driver. > > The current hack is not nice and it would be good to see it gone. Yeah this is just badly engineered. In drm we'd do this with the self refresh helpers, which pretty much give you this exact functionality, but in the helpers, while not randomly breaking actual visible behaviour of the display driver. Well ok the illusion is not perfect, since if the display is suspended the next page flip will take a tad longer. But that's it. I'll also add this to the TODO. -Daniel > > Sam > > > --- > > drivers/video/fbdev/core/fbmem.c | 8 ++++++-- > > include/linux/fb.h | 7 +++---- > > 2 files changed, 9 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c > > index 904ef1250677..dad6572942fa 100644 > > --- a/drivers/video/fbdev/core/fbmem.c > > +++ b/drivers/video/fbdev/core/fbmem.c > > @@ -48,10 +48,14 @@ > > static DEFINE_MUTEX(registration_lock); > > > > struct fb_info *registered_fb[FB_MAX] __read_mostly; > > -EXPORT_SYMBOL(registered_fb); > > - > > int num_registered_fb __read_mostly; > > +#if IS_ENABLED(CONFIG_OLPC_DCON) > > +EXPORT_SYMBOL(registered_fb); > > EXPORT_SYMBOL(num_registered_fb); > > +#endif > > +#define for_each_registered_fb(i) \ > > + for (i = 0; i < FB_MAX; i++) \ > > + if (!registered_fb[i]) {} else > > > > bool fb_center_logo __read_mostly; > > > > diff --git a/include/linux/fb.h b/include/linux/fb.h > > index a8a00d2ba1f3..e236817502c2 100644 > > --- a/include/linux/fb.h > > +++ b/include/linux/fb.h > > @@ -622,16 +622,15 @@ extern int fb_get_color_depth(struct fb_var_screeninfo *var, > > extern int fb_get_options(const char *name, char **option); > > extern int fb_new_modelist(struct fb_info *info); > > > > +#if IS_ENABLED(CONFIG_OLPC_DCON) > > extern struct fb_info *registered_fb[FB_MAX]; > > + > > extern int num_registered_fb; > > +#endif > > extern bool fb_center_logo; > > extern int fb_logo_count; > > extern struct class *fb_class; > > > > -#define for_each_registered_fb(i) \ > > - for (i = 0; i < FB_MAX; i++) \ > > - if (!registered_fb[i]) {} else > > - > > static inline void lock_fb_info(struct fb_info *info) > > { > > mutex_lock(&info->lock); > > -- > > 2.33.0 -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch