From patchwork Wed Nov 23 03:16:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 24676 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2567504wrr; Tue, 22 Nov 2022 19:21:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf5aS3Cwv21fBymCJTPKElC7n9RE9TM4D2aHx7TRniUG+fTY7TZqjmO92GKgALJ0YM3QoIlR X-Received: by 2002:a17:90a:4302:b0:218:9b49:aeab with SMTP id q2-20020a17090a430200b002189b49aeabmr18689263pjg.46.1669173710615; Tue, 22 Nov 2022 19:21:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669173710; cv=none; d=google.com; s=arc-20160816; b=R8EqoXFsdqAPGaUbYb2EzhDHBF4spq4XAsBJYGOpHyrN9RfNpru4FyweyLnEmEBOUQ FXSxzhFMnQuBtAiPvG+xnWhDwDPFMkiXljuLdplLjIygzVb4L3m0oeLVuQnAJmlnjFUf GukEcK/octSQmqqil9kArxZZlfKU5flJOiNMUH25fekPCYpm4UqvlZ8khltT4bkO3WZy dAecNoSuQNGV4Ejz04ZgqG17JveMJLUc90cfVIZXnSkTVG7g8C3XY0bjQxjbVDc23mfg dto3ODl/YpGe8ip+L94c/i5HzGuC+Kk37xrNzwh8w2hodkCVI1G9EvHI0ThUOZALi6vE p4aQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=XplI+geP46DYtWKfitoXrwKXFvO9E8ewRJGSG7yitzM=; b=FzbYT3HoEUh2Ii35SIx+Vna17H0Q6k83s39HdS6vcwFJtaqkB88R88rHW5Ox8V156s BDKUxscOEslB4VvKAytaqhkmJ4N1/1hCDw0YkLLasm/6EbC9TqlwcqXIrR53SnSu5cYl +t75RdjoDOA9U9ZkxpR04ZaTzIlADYt3C97eXuJf1FxSgSeeZmZdGQL4zI+JhKbtQ4Dp 8ozaCY92jblNa9Thiz3JwpUZkjmLoCFSByNPu7flFgouUK/eDac47O4SU4K+nEDXcZ81 gjozcyYvSyYNlDu+/3eyYO0RBTKHLGILNzN62kryrMj2PdBG9PuhKBhdG0lrggglR0mT ys1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="GZ2/OsZp"; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h18-20020a656392000000b00476c94abbc5si15931633pgv.681.2022.11.22.19.21.32; Tue, 22 Nov 2022 19:21:50 -0800 (PST) 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=@infradead.org header.s=casper.20170209 header.b="GZ2/OsZp"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235411AbiKWDQS (ORCPT + 99 others); Tue, 22 Nov 2022 22:16:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232723AbiKWDQR (ORCPT ); Tue, 22 Nov 2022 22:16:17 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC3288CBA5; Tue, 22 Nov 2022 19:16:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:In-Reply-To:References; bh=XplI+geP46DYtWKfitoXrwKXFvO9E8ewRJGSG7yitzM=; b=GZ2/OsZp+Fy3h9ep3ygIVEgC88 fW9vkQjgEXLFIxHH92x5HX4AEvdufiaxtG+ylyJFXqyHpHKuBKz+HOjEy+H/B3WDXvJ3PSmS20AWk Ezefu5K4MHaRICK6ZOVkuHcqVw6mm6jgNygD+Ks47tlreyn7EwQ+0gVBDY/0g+ZufZr0+MOavYXL3 uvEE28zbcgtKOnkr5eTCSlwgjEiH7cOz6t8q1CijBSLXuTHu5w+4PoXQF/WDm0fww4JJv8JZzvN7U tm8jP0Tc3v5s/2LziH178aNzWl09w4LTr/LbzHkE0QDaeIMfx1Q5ZDHXzkDQEEqmB9wZydflEbJ0J Gx6gsAsg==; Received: from [2601:1c2:d80:3110::a2e7] (helo=casper.infradead.org) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oxgFF-0073HC-FQ; Wed, 23 Nov 2022 03:16:17 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Masahiro Yamada , Thomas Zimmermann , =?utf-8?q?Michal_Such=C3=A1nek?= , linuxppc-dev@lists.ozlabs.org, Daniel Vetter , Helge Deller , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m Date: Tue, 22 Nov 2022 19:16:05 -0800 Message-Id: <20221123031605.16680-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE 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?1750255492798361575?= X-GMAIL-MSGID: =?utf-8?q?1750255492798361575?= Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m. When the latter symbol is =m, kconfig downgrades (limits) the 'select's under FB_OF to modular (=m). This causes undefined symbol references: powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): undefined reference to `cfb_fillrect' powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): undefined reference to `cfb_copyarea' powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): undefined reference to `cfb_imageblit' Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the selected FB_CFB_* symbols will become =y instead of =m. In tristate logic (for DRM_OFDRM), this changes the dependency from !DRM_OFDRM == 2 - 1 == 1 => modular only (or disabled) to (boolean) DRM_OFDRM != y == y, allowing the 'select's to cause the FB_CFB_* symbols to =y instead of =m. Fixes: c8a17756c425 ("drm/ofdrm: Add ofdrm for Open Firmware framebuffers") Signed-off-by: Randy Dunlap Suggested-by: Masahiro Yamada Cc: Thomas Zimmermann Cc: Michal Suchánek Cc: linuxppc-dev@lists.ozlabs.org Cc: Daniel Vetter Cc: Helge Deller Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Acked-by: Thomas Zimmermann Tested-by: Michal Suchánek --- drivers/video/fbdev/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -455,7 +455,7 @@ config FB_ATARI config FB_OF bool "Open Firmware frame buffer device support" depends on (FB = y) && PPC && (!PPC_PSERIES || PCI) - depends on !DRM_OFDRM + depends on DRM_OFDRM != y select APERTURE_HELPERS select FB_CFB_FILLRECT select FB_CFB_COPYAREA