From patchwork Fri May 24 08:53:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10959359 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E30E815A6 for ; Fri, 24 May 2019 08:54:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC9702884B for ; Fri, 24 May 2019 08:54:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C07A928852; Fri, 24 May 2019 08:54:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D27E52884B for ; Fri, 24 May 2019 08:54:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 499C689F03; Fri, 24 May 2019 08:54:03 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1003489F08 for ; Fri, 24 May 2019 08:54:02 +0000 (UTC) Received: by mail-ed1-x541.google.com with SMTP id j12so13318122eds.7 for ; Fri, 24 May 2019 01:54:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ABGB9ijMm74ausSbsUSG+r7Tgh81AzTQA2By7H3MqK0=; b=uDNyLtKWFgQ3JOJaiMQvw2yAK2jJPMOQ/3g5+9Mi9IosdYBGnvQh+DLnwX88HDl7Wj YE5ZURgkPtrFz5xSt+wGwovARkPQfFrrkk3hr68dxBbFQyt9F3hnbuVSKqVvTvYr6X15 qRyS72n4X3X2a1MoDV4V2fOCXjcTfngSZju+868d0R3gR9+Fdcrw4FmxtkAHbFORfFcq 82zq1zTCNQDBKnC/goluYZ/MxUVu8//qxZZp3KywmNUpx6/pJWfoMEd4R00CL7hS9+zK TkdHR9KJpcYkfnBD5maJhp2hG1jnl8/qPS6pEWkmcpRKREzvQuhODpewxrBLbZB6hM9Z /gXw== X-Gm-Message-State: APjAAAWbfjelIOF84XWzILxiFtKE67FcRQNUBEerjxgeAn72SRAhFDlD OLBONv3rBUgK26aLad0irqsUsQ== X-Google-Smtp-Source: APXvYqxrK2k830CxTedQPNxA9osvwGa55a2VhpiUTDxeATilqO8WeKG2KZd0G7Kz/oYMVB07ie1OnQ== X-Received: by 2002:a50:8684:: with SMTP id r4mr103183089eda.98.1558688040683; Fri, 24 May 2019 01:54:00 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id 96sm567082edq.68.2019.05.24.01.53.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 May 2019 01:53:59 -0700 (PDT) From: Daniel Vetter To: LKML Date: Fri, 24 May 2019 10:53:21 +0200 Message-Id: <20190524085354.27411-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ABGB9ijMm74ausSbsUSG+r7Tgh81AzTQA2By7H3MqK0=; b=GNQTgYDY6sm5E5zjkJ0Kn/XOWHlMpo6i/R3x8ovu6wosBABDQbRZgVBLntyKZwLiiq x+gPkl1GfucNZDevkvM+T/jAQnsOyJOUyuwdg/AUB/8Shc5HxyKmANwmqiGcD7Qdmy1z 7B9a0cd1+77NQ0KSgtL3PHNMXd6zzTNkddIJA= Subject: [Intel-gfx] [PATCH 00/33] fbcon notifier begone! X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , Intel Graphics Development , DRI Development Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Hi all, I fixed the fbcon_exited mess that CI spotted (hopefully it works now, the code is still rather brittle imo). Plus all the little nits 0day and people found. Maarten slapped an rb onto the entire pile, but I feel like enough has changed that a 2nd look from him is warranted. I also added a backlight patch on top, I think that nicely highlights how the fb notifier is now only used for backlight notifications. Maybe we could rename it as a follow-up to make that clear. Oh and one rather badly looking thing: am200epd is abusing the notifier in very interesting ways. I guess a proper fix would be to figure out where the display boot memory reservation is some more direct way, instead of listening to the fw fb driver. But that's definitely outside of my knowledge, so I left it at a bunch of #ifdef and comments. I think we also still need an ack from Greg KH for the vt and staging bits. As usual, comments, review and testing very much welcome. btw for future plans: I think this is tricky enough (it's old code and all that) that we should let this soak for 2-3 kernel releases. I think the following would be nice subsequent cleanup/fixes: - push the console lock completely from fbmem.c to fbcon.c. I think we're mostly there with prep, but needs to pondering of corner cases. - move fbcon.c from using indices for tracking fb_info (and accessing registered_fbs without proper locking all the time) to real fb_info pointers with the right amount of refcounting. Mostly motivated by the fun I had trying to simplify fbcon_exit(). - make sure that fbcon call lock/unlock_fb when it calls fbmem.c functions, and sprinkle assert_lockdep_held around in fbmem.c. This needs the console_lock cleanups first. But I think that's material for maybe next year or so. Cheers, Daniel Daniel Vetter (33): dummycon: Sprinkle locking checks fbdev: locking check for fb_set_suspend vt: might_sleep() annotation for do_blank_screen vt: More locking checks fbdev/sa1100fb: Remove dead code fbdev/cyber2000: Remove struct display fbdev/aty128fb: Remove dead code fbcon: s/struct display/struct fbcon_display/ fbcon: Remove fbcon_has_exited fbcon: call fbcon_fb_(un)registered directly fbdev/sh_mobile: remove sh_mobile_lcdc_display_notify fbdev/omap: sysfs files can't disappear before the device is gone fbdev: sysfs files can't disappear before the device is gone staging/olpc: lock_fb_info can't fail fbdev/atyfb: lock_fb_info can't fail fbdev: lock_fb_info cannot fail fbcon: call fbcon_fb_bind directly fbdev: make unregister/unlink functions not fail fbdev: unify unlink_framebuffer paths fbdev/sh_mob: Remove fb notifier callback fbdev: directly call fbcon_suspended/resumed fbcon: Call fbcon_mode_deleted/new_modelist directly fbdev: Call fbcon_get_requirement directly Revert "backlight/fbcon: Add FB_EVENT_CONBLANK" fbmem: pull fbcon_fb_blanked out of fb_blank fbdev: remove FBINFO_MISC_USEREVENT around fb_blank fb: Flatten control flow in fb_set_var fbcon: replace FB_EVENT_MODE_CHANGE/_ALL with direct calls vgaswitcheroo: call fbcon_remap_all directly fbcon: Call con2fb_map functions directly fbcon: Document what I learned about fbcon locking staging/olpc_dcon: Add drm conversion to TODO backlight: simplify lcd notifier arch/arm/mach-pxa/am200epd.c | 13 +- drivers/gpu/vga/vga_switcheroo.c | 11 +- drivers/media/pci/ivtv/ivtvfb.c | 6 +- drivers/staging/fbtft/fbtft-core.c | 4 +- drivers/staging/olpc_dcon/TODO | 7 + drivers/staging/olpc_dcon/olpc_dcon.c | 6 +- drivers/tty/vt/vt.c | 18 + drivers/video/backlight/backlight.c | 2 +- drivers/video/backlight/lcd.c | 12 - drivers/video/console/dummycon.c | 6 + drivers/video/fbdev/aty/aty128fb.c | 64 --- drivers/video/fbdev/aty/atyfb_base.c | 3 +- drivers/video/fbdev/core/fbcmap.c | 6 +- drivers/video/fbdev/core/fbcon.c | 311 ++++++-------- drivers/video/fbdev/core/fbcon.h | 6 +- drivers/video/fbdev/core/fbmem.c | 399 +++++++----------- drivers/video/fbdev/core/fbsysfs.c | 20 +- drivers/video/fbdev/cyber2000fb.c | 1 - drivers/video/fbdev/neofb.c | 9 +- .../video/fbdev/omap2/omapfb/omapfb-sysfs.c | 21 +- drivers/video/fbdev/sa1100fb.c | 25 -- drivers/video/fbdev/savage/savagefb_driver.c | 9 +- drivers/video/fbdev/sh_mobile_lcdcfb.c | 112 +---- drivers/video/fbdev/sh_mobile_lcdcfb.h | 5 - include/linux/console_struct.h | 5 +- include/linux/fb.h | 45 +- include/linux/fbcon.h | 30 ++ 27 files changed, 394 insertions(+), 762 deletions(-) Reviewed-by: Sam Ravnborg