From patchwork Fri Apr 17 15:55:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11495459 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6F58B15AB for ; Fri, 17 Apr 2020 15:56:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6218A20656 for ; Fri, 17 Apr 2020 15:56:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726168AbgDQP4v (ORCPT ); Fri, 17 Apr 2020 11:56:51 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:42739 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729282AbgDQP4u (ORCPT ); Fri, 17 Apr 2020 11:56:50 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1MLA6m-1jhYSy1x5e-00IH6g; Fri, 17 Apr 2020 17:56:22 +0200 From: Arnd Bergmann To: dri-devel@lists.freedesktop.org, Jani Nikula , linux-fbdev@vger.kernel.org Cc: Arnd Bergmann , Nicolas Pitre , Andrzej Hajda , Jason Gunthorpe , Saeed Mahameed , masahiroy@kernel.org, Laurent.pinchart@ideasonboard.com, linux-renesas-soc@vger.kernel.org, kieran.bingham+renesas@ideasonboard.com, airlied@linux.ie, daniel@zonque.org, haojian.zhuang@gmail.com, robert.jarzmik@free.fr, daniel@ffwll.ch, marex@denx.de, stefan@agner.ch, linux-graphics-maintainer@vmware.com, thellstrom@vmware.com, jfrederich@gmail.com, dsd@laptop.org, geert@linux-m68k.org Subject: [PATCH 1/8] fbdev: w100fb: clean up mach-pxa compile-time dependency Date: Fri, 17 Apr 2020 17:55:46 +0200 Message-Id: <20200417155553.675905-2-arnd@arndb.de> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200417155553.675905-1-arnd@arndb.de> References: <20200417155553.675905-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:FSyLS2kD2Du4FJkr2PSO5IkSDJpM+w9TppbZSoEDwbAnlGno6cr YdxN/mZKd7kefnolwRhTPLde2WQ0EoCyTZCr7cOP1aeyIqV6Ol3kYdvRjUPrKM2Jh5F0IRh ikgcv4BOa4yHk3Q+8fTNKD0mrjUithBTDu+WQ5rtMVaA73zed4VfhnY36WE16r6Zo7h3JvL 9yF1U57DofTc9Sr1hFqIA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ogNLYWrB+oo=:z0WSPEoafwNG2cLJOcdNRg 4iuJlVK2HhjWe+k8SExSQv4hsI8qssLLJO/lQyDXGMmprFboPKV7ZvEr44vsBg3qBx+F57F4/ xZRdCz8EGtQtyQiyazkUoV81uxF8VilRNT6zvxpyOCoqyd9RCIhcjxsrB2O85/i3Iqt7v3MPu U3j4KkNT2QmtJP1zi9HN2R7dAQYcF/itwCf9rUvsjOQhtQYsVHCEOTFRcPn4Q9fSnW4YB/a3v 1Cqg6gPD6xwkWYJfieB0Jh+Mnw3tSRFHQWp2HtjrXUqgpiv6v01i6OTxYC0Z2gAhbq6iBlYCE cDBH0vL3yX36Ddt7fq7cS9LYNIvrXFR4QgAPcrlC/TtgsIpo5vmgQMKIKFt0h7+I3Bn1u/YLH XGHBSvzAQ6+laXUzZgX3s4saVzy058/6DYJH9j0QNzHON/xpecaWH1wLSrgOYg8MY8gftZEc0 iC4h5RvSmDSximaq0Iumb2r5Ku482IMGcZhly4jD/dXe/2+iXXzvMjenvHix9RSRnOVV4Ldrs JsE66YZUYg8cX8K9oP8nZvQa7DaiAbGMFamLpwTKfpEJf713q9ZGz/P1fgDqrBhFvg54jVG0A 62hBGnK1yBGcRKyXCuGsBmoMuK/n0fCXi7VCQrY+rb5xc0XZZgrD9RUcIZYP8zIsxkQU2mXlo JFuVqlbSKfn409OIadBpGveT/hItNOcLrxAdJiEkQqra1TehL0FWtFZAwYIucWRHmZM+MA0CM 3XxpyfrrKJq578U7kun86fNmz9L0DyWXOvVT5IWyIR9LLOTDBhb/sLiZ0V0tkOnR9idzCSUIs 90N1+uN6aSeaxQxLMKgomeVW8uSXrq0bp376Jo5Tda/1sY6Ip0= Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org In order to get rid of the 'select FB' line in Kconfig for all platforms, change the w100fb driver to handle the gpio lines itself rather than using an indirect function call. This also allows removing the remaining exported interfaces from the driver, the only other symbol has been unused for a long time. Signed-off-by: Arnd Bergmann --- arch/arm/configs/pxa_defconfig | 2 + arch/arm/mach-pxa/Kconfig | 3 -- arch/arm/mach-pxa/eseries.c | 14 +----- drivers/video/fbdev/w100fb.c | 84 +++++----------------------------- include/video/w100fb.h | 6 +-- 5 files changed, 16 insertions(+), 93 deletions(-) diff --git a/arch/arm/configs/pxa_defconfig b/arch/arm/configs/pxa_defconfig index b817c57f05f1..8df88e8a3048 100644 --- a/arch/arm/configs/pxa_defconfig +++ b/arch/arm/configs/pxa_defconfig @@ -454,6 +454,8 @@ CONFIG_V4L_MEM2MEM_DRIVERS=y CONFIG_SOC_CAMERA_MT9M111=m CONFIG_DRM=m CONFIG_FIRMWARE_EDID=y +CONFIG_FB=y +CONFIG_FB_W100=y CONFIG_FB_TILEBLITTING=y CONFIG_FB_PXA_OVERLAY=y CONFIG_FB_PXA_PARAMETERS=y diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index f60bc29aef68..8444d40df1b3 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig @@ -549,9 +549,6 @@ config MACH_ICONTROL config ARCH_PXA_ESERIES bool "PXA based Toshiba e-series PDAs" - select FB_W100 - select FB - select PXA25x config MACH_E330 bool "Toshiba e330" diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c index f37c44b6139d..023ee901a7eb 100644 --- a/arch/arm/mach-pxa/eseries.c +++ b/arch/arm/mach-pxa/eseries.c @@ -849,20 +849,8 @@ static struct w100_mem_info e800_w100_mem_info = { .size = 0x1fffff, }; -static void e800_tg_change(struct w100fb_par *par) -{ - unsigned long tmp; - - tmp = w100fb_gpio_read(W100_GPIO_PORT_A); - if (par->mode->xres == 480) - tmp |= 0x100; - else - tmp &= ~0x100; - w100fb_gpio_write(W100_GPIO_PORT_A, tmp); -} - static struct w100_tg_info e800_tg_info = { - .change = e800_tg_change, + .change_e800 = true, }; static struct w100fb_mach_info e800_fb_info = { diff --git a/drivers/video/fbdev/w100fb.c b/drivers/video/fbdev/w100fb.c index 2d6e2738b792..512c4d5a73a3 100644 --- a/drivers/video/fbdev/w100fb.c +++ b/drivers/video/fbdev/w100fb.c @@ -48,7 +48,6 @@ static void w100_init_lcd(struct w100fb_par*); static void w100_set_dispregs(struct w100fb_par*); static void w100_update_enable(void); static void w100_update_disable(void); -static void calc_hsync(struct w100fb_par *par); static void w100_init_graphic_engine(struct w100fb_par *par); struct w100_pll_info *w100_get_xtal_table(unsigned int freq); @@ -101,8 +100,6 @@ static ssize_t flip_store(struct device *dev, struct device_attribute *attr, con w100_set_dispregs(par); w100_update_enable(); - calc_hsync(par); - return count; } @@ -157,7 +154,6 @@ static ssize_t fastpllclk_store(struct device *dev, struct device_attribute *att } w100_init_clocks(par); - calc_hsync(par); return count; } @@ -173,23 +169,6 @@ static struct attribute *w100fb_attrs[] = { }; ATTRIBUTE_GROUPS(w100fb); -/* - * Some touchscreens need hsync information from the video driver to - * function correctly. We export it here. - */ -unsigned long w100fb_get_hsynclen(struct device *dev) -{ - struct fb_info *info = dev_get_drvdata(dev); - struct w100fb_par *par=info->par; - - /* If display is blanked/suspended, hsync isn't active */ - if (par->blanked) - return 0; - else - return par->hsync_len; -} -EXPORT_SYMBOL(w100fb_get_hsynclen); - static void w100fb_clear_screen(struct w100fb_par *par) { memset_io(remapped_fbuf + (W100_FB_BASE-MEM_WINDOW_BASE), 0, (par->xres * par->yres * BITS_PER_PIXEL/8)); @@ -405,6 +384,15 @@ static void w100fb_copyarea(struct fb_info *info, writel((w << 16) | (h & 0xffff), remapped_regs + mmDST_WIDTH_HEIGHT); } +static void w100fb_e800_tg_change(struct w100fb_par *par) +{ + u32 tmp = readl(remapped_regs + mmGPIO_DATA); + if (par->mode->xres == 480) + tmp |= 0x100; + else + tmp &= ~0x100; + writel(tmp, remapped_regs + mmGPIO_DATA); +} /* * Change the resolution by calling the appropriate hardware functions @@ -425,10 +413,9 @@ static void w100fb_activate_var(struct w100fb_par *par) w100_update_enable(); w100_init_graphic_engine(par); - calc_hsync(par); - - if (!par->blanked && tg && tg->change) - tg->change(par); + if (IS_ENABLED(CONFIG_ARCH_PXA_ESERIES) && + !par->blanked && tg && tg->change_e800) + w100fb_e800_tg_change(par); } @@ -837,28 +824,6 @@ static void w100_update_enable(void) writel((u32) (disp_db_buf_wr_cntl.val), remapped_regs + mmDISP_DB_BUF_CNTL); } -unsigned long w100fb_gpio_read(int port) -{ - unsigned long value; - - if (port==W100_GPIO_PORT_A) - value = readl(remapped_regs + mmGPIO_DATA); - else - value = readl(remapped_regs + mmGPIO_DATA2); - - return value; -} - -void w100fb_gpio_write(int port, unsigned long value) -{ - if (port==W100_GPIO_PORT_A) - writel(value, remapped_regs + mmGPIO_DATA); - else - writel(value, remapped_regs + mmGPIO_DATA2); -} -EXPORT_SYMBOL(w100fb_gpio_read); -EXPORT_SYMBOL(w100fb_gpio_write); - /* * Initialization of critical w100 hardware */ @@ -1497,31 +1462,6 @@ static void w100_set_dispregs(struct w100fb_par *par) writel((par->xres*BITS_PER_PIXEL/8), remapped_regs + mmGRAPHIC_PITCH); } - -/* - * Work out how long the sync pulse lasts - * Value is 1/(time in seconds) - */ -static void calc_hsync(struct w100fb_par *par) -{ - unsigned long hsync; - struct w100_mode *mode = par->mode; - union crtc_ss_u crtc_ss; - - if (mode->pixclk_src == CLK_SRC_XTAL) - hsync=par->mach->xtal_freq; - else - hsync=((par->fastpll_mode && mode->fast_pll_freq) ? mode->fast_pll_freq : mode->pll_freq)*100000; - - hsync /= (w100_pwr_state.pclk_cntl.f.pclk_post_div + 1); - - crtc_ss.val = readl(remapped_regs + mmCRTC_SS); - if (crtc_ss.val) - par->hsync_len = hsync / (crtc_ss.f.ss_end-crtc_ss.f.ss_start); - else - par->hsync_len = 0; -} - static void w100_suspend(u32 mode) { u32 val; diff --git a/include/video/w100fb.h b/include/video/w100fb.h index a614654d8598..8f260ba4fcac 100644 --- a/include/video/w100fb.h +++ b/include/video/w100fb.h @@ -14,13 +14,9 @@ struct w100fb_par; -unsigned long w100fb_gpio_read(int port); -void w100fb_gpio_write(int port, unsigned long value); -unsigned long w100fb_get_hsynclen(struct device *dev); - /* LCD Specific Routines and Config */ struct w100_tg_info { - void (*change)(struct w100fb_par*); + bool change_e800; void (*suspend)(struct w100fb_par*); void (*resume)(struct w100fb_par*); }; From patchwork Fri Apr 17 15:55:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11495465 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C4F90186E for ; Fri, 17 Apr 2020 15:56:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B77E32223F for ; Fri, 17 Apr 2020 15:56:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729545AbgDQP4w (ORCPT ); Fri, 17 Apr 2020 11:56:52 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:48591 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728550AbgDQP4v (ORCPT ); Fri, 17 Apr 2020 11:56:51 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1N8XHb-1jBo980fon-014Txp; Fri, 17 Apr 2020 17:56:23 +0200 From: Arnd Bergmann To: dri-devel@lists.freedesktop.org, Jani Nikula , linux-fbdev@vger.kernel.org Cc: Arnd Bergmann , Nicolas Pitre , Andrzej Hajda , Jason Gunthorpe , Saeed Mahameed , masahiroy@kernel.org, Laurent.pinchart@ideasonboard.com, linux-renesas-soc@vger.kernel.org, kieran.bingham+renesas@ideasonboard.com, airlied@linux.ie, daniel@zonque.org, haojian.zhuang@gmail.com, robert.jarzmik@free.fr, daniel@ffwll.ch, marex@denx.de, stefan@agner.ch, linux-graphics-maintainer@vmware.com, thellstrom@vmware.com, jfrederich@gmail.com, dsd@laptop.org, geert@linux-m68k.org Subject: [PATCH 2/8] fbdev/ARM: pxa: avoid selecting CONFIG_FB Date: Fri, 17 Apr 2020 17:55:47 +0200 Message-Id: <20200417155553.675905-3-arnd@arndb.de> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200417155553.675905-1-arnd@arndb.de> References: <20200417155553.675905-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:9M8pFwKX8xhc5e+yflMbgJ8Ti6PLiBfgEhVySMhV/l2w6DXvyhX NqHG6MTuIAQ0w1jXhYMeQm/4sXwpcF6UovtQtruUfscod7FvMEitj/jjGKxoBkkpMde5A1s TBfzXcBjdh5JWbAS6IpSI6QECoFWTAR3EQJJbyIAER9nV/YNICVaq0mV0hKKyDm8O6XP8Pa wgxD678gZrlSEP9c+3IGQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:t8odLHHYr0o=:Eg4WwvEkIOxDpSqihTijKr gZfLCtw7qujzdzRsUDZ0VHt/JTPiKUG+uXsRdhzshYzby8NPGd4+i45NlI7f1e3dHYOMGwI1X Z+cd9oSIohw+PNDm2ct6SrZcELzbLecOrPCEpv+nOM3yOZ/YX2AMlu6XEYrQl8w4gGvv/tfvq 5bfoKGknTe3qGPhMVMJYMmJi5il5cnGt4bPqMEW7tmwiwezHfBlhqJRXXnARvzJnK4wA/Oyvi nFm8ir/siulpRMerWvH2QoFCE153RArslwfQyVv8JemnPd+hp53+OQDzKfnSvTNa7iuSyMEV7 ZcoIQfYgffOyaPZ4tb15M4eynhQ5+hNKCSMHzPhIhmM/NAvHJ7khVEKQu1TwBxxrBg3U6lML+ wZ8bZO4Jt6U7IEtd9MS4DudbcoGI2beF9R39qF2lMlxsyg0sayLYswdMvLT/6EnDDN9+cvZ/2 nQQkXPvoW87wu9dRxnDWoWEPMRKQogwNfhYVllsS5vMOkgz/UEeUCBkHeYSikxOaayF1BY2/M bvjy/DHSfS6pLnM3gDZuJr9DGNse73vSLTtSOfAHJbbDdLlDoj8O60Q/xd4DvwDc91EkVKMvP j0+H9Zg+FXibtOFohU5BUMVc51UiQMUu9vrOjhmGN8/WaIxW5Wmc4mPcJ5PK36Kac7jSGO5Ve orGU+2sZO3UrxsACZW98bdQnjhkI1B9ZkLdYE6Sg0BKkxD/zEUqgchgqDSvdI7dyMPdce63iX 0mE/5g8hGiJk5/oxqmL8ztt8eThB7X2d8gnUrCpr1A/poSvWXNpQ3BSJ6/duGzk5VTXcC7xgx 4NC4KrpeezbyMCNduMs3m5FvSk8NJrVk5IbKnO3GRcKEvKHsrs= Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org In order to add more compile-time dependencies to CONFIG_FB, remove the last few instances of selecting it from platform code. This was originally written to allow a modular driver, but that never worked because vmlinux cannot call exported functions from a loadable module. Just change the #ifdef check to what it should have been and remove the 'select' statement. Signed-off-by: Arnd Bergmann --- arch/arm/configs/pxa_defconfig | 1 + arch/arm/mach-pxa/Kconfig | 4 ---- arch/arm/mach-pxa/saar.c | 2 +- arch/arm/mach-pxa/tavorevb.c | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/arm/configs/pxa_defconfig b/arch/arm/configs/pxa_defconfig index 8df88e8a3048..3931184e2eb1 100644 --- a/arch/arm/configs/pxa_defconfig +++ b/arch/arm/configs/pxa_defconfig @@ -455,6 +455,7 @@ CONFIG_SOC_CAMERA_MT9M111=m CONFIG_DRM=m CONFIG_FIRMWARE_EDID=y CONFIG_FB=y +CONFIG_FB_PXA=y CONFIG_FB_W100=y CONFIG_FB_TILEBLITTING=y CONFIG_FB_PXA_OVERLAY=y diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index 8444d40df1b3..bea8ce447ed3 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig @@ -76,16 +76,12 @@ config MACH_TAVOREVB select CPU_PXA930 select CPU_PXA935 select PXA3xx - select FB - select FB_PXA config MACH_SAAR bool "PXA930 Handheld Platform (aka SAAR)" select CPU_PXA930 select CPU_PXA935 select PXA3xx - select FB - select FB_PXA comment "Third Party Dev Platforms (sorted by vendor name)" diff --git a/arch/arm/mach-pxa/saar.c b/arch/arm/mach-pxa/saar.c index 3275b679792b..e35d6c57f73e 100644 --- a/arch/arm/mach-pxa/saar.c +++ b/arch/arm/mach-pxa/saar.c @@ -113,7 +113,7 @@ static struct platform_device smc91x_device = { }, }; -#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) +#if defined(CONFIG_FB_PXA) static uint16_t lcd_power_on[] = { /* single frame */ SMART_CMD_NOOP, diff --git a/arch/arm/mach-pxa/tavorevb.c b/arch/arm/mach-pxa/tavorevb.c index a15eb3b9484d..dda5f10b1883 100644 --- a/arch/arm/mach-pxa/tavorevb.c +++ b/arch/arm/mach-pxa/tavorevb.c @@ -165,7 +165,7 @@ static void __init tavorevb_init_keypad(void) static inline void tavorevb_init_keypad(void) {} #endif /* CONFIG_KEYBOARD_PXA27x || CONFIG_KEYBOARD_PXA27x_MODULE */ -#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) +#if defined(CONFIG_FB_PXA) static struct pwm_lookup tavorevb_pwm_lookup[] = { PWM_LOOKUP("pxa27x-pwm.0", 1, "pwm-backlight.0", NULL, 100000, PWM_POLARITY_NORMAL), From patchwork Fri Apr 17 15:55:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11495455 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2C2EC81 for ; Fri, 17 Apr 2020 15:56:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1ED2120656 for ; Fri, 17 Apr 2020 15:56:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729413AbgDQP4u (ORCPT ); Fri, 17 Apr 2020 11:56:50 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:36869 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726168AbgDQP4t (ORCPT ); Fri, 17 Apr 2020 11:56:49 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1MBDvU-1jXlsH3ZNe-00Cfzq; Fri, 17 Apr 2020 17:56:23 +0200 From: Arnd Bergmann To: dri-devel@lists.freedesktop.org, Jani Nikula , linux-fbdev@vger.kernel.org Cc: Arnd Bergmann , Nicolas Pitre , Andrzej Hajda , Jason Gunthorpe , Saeed Mahameed , masahiroy@kernel.org, Laurent.pinchart@ideasonboard.com, linux-renesas-soc@vger.kernel.org, kieran.bingham+renesas@ideasonboard.com, airlied@linux.ie, daniel@zonque.org, haojian.zhuang@gmail.com, robert.jarzmik@free.fr, daniel@ffwll.ch, marex@denx.de, stefan@agner.ch, linux-graphics-maintainer@vmware.com, thellstrom@vmware.com, jfrederich@gmail.com, dsd@laptop.org, geert@linux-m68k.org Subject: [PATCH 3/8] fbdev: rework FB_DDC dependencies Date: Fri, 17 Apr 2020 17:55:48 +0200 Message-Id: <20200417155553.675905-4-arnd@arndb.de> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200417155553.675905-1-arnd@arndb.de> References: <20200417155553.675905-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:2U9gszbYbMjT+zyUR7sFhiOdIUZPycfMTKYG2cp0trTWIbAamkf JXJU/2QL4hsyz1HAy3tjg7sl9G8UVcB+oiwb7PUAAjXHy3WKwCoi6d78k/RIModYnifQMrp NyySFD2n64+7oJ5Hitx7uI7OtO2oWoFcEP8r3CP4qfi0rQ0dsXhJfAywuUalVLZtP61z0jC QSSwnzwbyzSCKvAQolKyg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:XrTAd9lyPFM=:1wciv0hqbcjGrbjumwW/E7 3WaLAFl1zx6dK+KQGgkXLYH3tLrf8+YGuDAuG9EU0rR+ga0chOOJYgsc/edXVBcei4DUtIVvR fZCYJtQCiFD3mPbtekRBtTW0hyGAyPSP5O7hKZLuIBu1u6rEJ8CiWaEwwstxzcMxBlWEg5eaM FmO7SBgN1t5+i/IR5iifChGTs7VkRIqhmbf6TDdsGZm8q5dUFGKSOePvJh/r/o675iGlZ+Q4S bW5n4+JEalu+krrSpEK+QIRmeUWjfdlQPxNfzoHa4F4st/lUBXDh156shwLr7w6vyUpjuH1Bb IuHNm7Aw4GLaS7fhq+yCiETnYncNZIteCKjaouYugDF3aBOqmb9MJ3DYyoVj3dZO/tj2u5YYG jOP8jx+1TX6r77BKMZTpWnhNqIrn7rUFsT+qR7HikkX3u51LSm6Uhfynf6uVNKzX4jp3RQOe5 dcyBbB4LfBfYnXQRE3mQRLzsSzoGi+5j6Bezw1mDtIljapb+JnJogPxscRxgYMmECbTxt8jpj 4ULLVU2RneJxVGYSbXwT8XuPW0uEEVRfqKFKthqUbDdnhgIi9CE8EG+MCtC0eWeGA0+wuSNQr Q9nvJSsgDd2pOnFzuc+zP8SbOhe0WmVoLY/DhX1+0vQgdgJR8BZ+JTSqecWkF2+c802ig1Gf/ sxBYO8k2BVrMlFqAKXR4I5fo1N1hNtT4I0xPGaddsRs4GIbuH2jFHSvMKMaU3TYmDG2WMOcBr KbspylQfr/Yqm23y91sN6ltcQ1nFhl+4P3bWSNWQSX1+6Muf/l6WmXbJIbxC4lRavmsalbfqG z/RXI26Q0r2QuOs8WrZV6R9veTTOr5HUfdZ4MHkML1EniqZWe8= Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Selecting FB_DDC currently turns on CONFIG_I2C implicitly, which is often not desired and can lead to circular dependencies. Change this to a 'depends on' and change all drivers that rely on FB_DDC to have an appropriate I2C dependency as well. Signed-off-by: Arnd Bergmann --- drivers/video/fbdev/Kconfig | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 91b0a719d221..bcf7834dbdbf 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -62,9 +62,8 @@ config FIRMWARE_EDID config FB_DDC tristate - depends on FB + depends on FB && I2C select I2C_ALGOBIT - select I2C config FB_BOOT_VESA_SUPPORT bool @@ -356,6 +355,7 @@ config FB_CYBER2000 config FB_CYBER2000_DDC bool "DDC for CyberPro support" depends on FB_CYBER2000 + depends on I2C=y || I2C=FB_CYBER2000 select FB_DDC default y help @@ -892,6 +892,7 @@ config FB_NVIDIA config FB_NVIDIA_I2C bool "Enable DDC Support" depends on FB_NVIDIA + depends on I2C=y || I2C=FB_NVIDIA select FB_DDC help This enables I2C support for nVidia Chipsets. This is used @@ -938,6 +939,7 @@ config FB_RIVA config FB_RIVA_I2C bool "Enable DDC Support" depends on FB_RIVA + depends on I2C=y || I2C=FB_RIVA select FB_DDC help This enables I2C support for nVidia Chipsets. This is used @@ -965,7 +967,7 @@ config FB_RIVA_BACKLIGHT config FB_I740 tristate "Intel740 support" - depends on FB && PCI + depends on FB && PCI && I2C select FB_MODE_HELPERS select FB_CFB_FILLRECT select FB_CFB_COPYAREA @@ -1019,6 +1021,7 @@ config FB_I810_GTF config FB_I810_I2C bool "Enable DDC Support" depends on FB_I810 && FB_I810_GTF + depends on I2C=y || I2C=FB_I810 select FB_DDC help Add DDC/I2C support for i810fb. This will allow the driver to get @@ -1074,6 +1077,7 @@ config FB_INTEL_DEBUG config FB_INTEL_I2C bool "DDC/I2C for Intel framebuffer support" depends on FB_INTEL + depends on I2C=y || I2C=FB_INTEL select FB_DDC default y help @@ -1153,6 +1157,7 @@ config FB_MATROX_G config FB_MATROX_I2C tristate "Matrox I2C support" depends on FB_MATROX + depends on I2C=y || I2C=FB_MATROX select FB_DDC ---help--- This drivers creates I2C buses which are needed for accessing the @@ -1218,6 +1223,7 @@ config FB_RADEON config FB_RADEON_I2C bool "DDC/I2C for ATI Radeon support" depends on FB_RADEON + depends on I2C=y || I2C=FB_RADEON select FB_DDC default y help @@ -1327,6 +1333,7 @@ config FB_S3 config FB_S3_DDC bool "DDC for S3 support" depends on FB_S3 + depends on I2C=y || I2C=FB_S3 select FB_DDC default y help @@ -1352,6 +1359,7 @@ config FB_SAVAGE config FB_SAVAGE_I2C bool "Enable DDC2 Support" depends on FB_SAVAGE + depends on I2C=y || I2C=FB_SAVAGE select FB_DDC help This enables I2C support for S3 Savage Chipsets. This is used @@ -1491,6 +1499,7 @@ config FB_3DFX_ACCEL config FB_3DFX_I2C bool "Enable DDC/I2C support" depends on FB_3DFX + depends on I2C=y || I2C=FB_3DFX select FB_DDC default y help @@ -1530,7 +1539,7 @@ config FB_VT8623 config FB_TRIDENT tristate "Trident/CyberXXX/CyberBlade support" - depends on FB && PCI + depends on FB && PCI && I2C select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT From patchwork Fri Apr 17 15:55:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11495485 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 191A4186E for ; Fri, 17 Apr 2020 15:56:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0BEE42223C for ; Fri, 17 Apr 2020 15:56:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729582AbgDQP44 (ORCPT ); Fri, 17 Apr 2020 11:56:56 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:49765 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729282AbgDQP44 (ORCPT ); Fri, 17 Apr 2020 11:56:56 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1MmU9X-1iyh6f2Ctl-00iQqH; Fri, 17 Apr 2020 17:56:24 +0200 From: Arnd Bergmann To: dri-devel@lists.freedesktop.org, Jani Nikula , linux-fbdev@vger.kernel.org Cc: Arnd Bergmann , Nicolas Pitre , Andrzej Hajda , Jason Gunthorpe , Saeed Mahameed , masahiroy@kernel.org, Laurent.pinchart@ideasonboard.com, linux-renesas-soc@vger.kernel.org, kieran.bingham+renesas@ideasonboard.com, airlied@linux.ie, daniel@zonque.org, haojian.zhuang@gmail.com, robert.jarzmik@free.fr, daniel@ffwll.ch, marex@denx.de, stefan@agner.ch, linux-graphics-maintainer@vmware.com, thellstrom@vmware.com, jfrederich@gmail.com, dsd@laptop.org, geert@linux-m68k.org Subject: [PATCH 4/8] drm/rcar: stop using 'imply' for dependencies Date: Fri, 17 Apr 2020 17:55:49 +0200 Message-Id: <20200417155553.675905-5-arnd@arndb.de> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200417155553.675905-1-arnd@arndb.de> References: <20200417155553.675905-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:uo1PKQe5aWNhyhZcFZ9CjgTtBalbZwo94DNn1R7d79M+ZtxL4DH DxKpYGp1fptO9Fs4eaFEDRkz5AjVdYui7SxSvwLwJF4Q9shlrUYKfku/gl5u66LWU+BPmXw m3dDTjtsoJEuMrowemsBhNyK+S3xKKJP7VpWWzTlEKcaq+VtY6O+sntw1CeLTzsWIrIj1g9 37OJQujT/P+UU3WH0C1cg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:GEpQHVWHcgc=:1g5dy8zUp1/LQRhBEqoGpG gNy5o2AjfmNTg/cuJVYhiswPZ+aEvQX4Ihc9fqKE/q4j4Z1fAL0XRhDmLGOonFpnw6BYRe0Yz Yn2CEF9hPyze2jzlp0e3vKF++WoAFCYY+gOqN9mVOhTJ06W7q4Lu9sUY9VSLoYpze8DRN24tf fBtMmjNOO6KvWelk7ueoJA4/87xZjNJAfFb5xLa7e/rpznyQcwnOUQl+XhgNdZbuMlOU9p5Um rZXrK+oO0Dqmzae2Ht4p3X53cZbEEs8MEo6GOOUqTgouPTkbIZ35BwSrvlSXGCl5g6VeYBkZm ClfdayJsYpqXMVoD7Cf+8z1TCb5toU023sY2BLsWfxVhGikBl/T7tVKs5Ivo3CNeHfaNwdlwp xmQzkAyDdToLZRee/Nx1r8O//2oYEtAjb2AgOQzu1eCuocA1KJ0cyvBuv5qf30/xCCg0OdC/X CFE/aadn0Fq0o5Yh9APTuMhEz96YWf2YfnF5s12q1dy1d+phbHgSQuyprHOJF7PzhIMKa5jSV RtEzizaYfiJ93ZN8aJd5HumwDJczqso8goqJ2rbXPjaNO/SXLLX9g0o7knTdJavHmeMihpoWI cQu3qV0uCE9yXX+gDFLu/0cEwaORh4dGMaG/WfLqaOjZntvmfdKlzyjAO4TrGuGZOFmZuw01l hEDycmFhs79laZXuNUKp/OrflzBBI7G1o1J4/WmAIkazkIHL+2xJnLny74hgNbvbhI02QoC1z RZXMgnSoTx1I3wglpMTSf4kPrAwgMhvcK2b/0CpGKY6MGBoGIftj/fD8f/38iSdXvIVW6wg9/ ZPaGliZZ32z/tutY7Xed7XyAzn0RNOPFP2x4ObJi7NpfglY/50= Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org The meaning of the 'imply' keyword has changed recently, and neither the old meaning (select the symbol if its dependencies are met) nor the new meaning (enable it by default, but let the user set any other setting) is what we want here. Work around this by adding two more Kconfig options that lead to the correct behavior: if DRM_RCAR_USE_CMM and DRM_RCAR_USE_LVDS are enabled, that portion of the driver becomes usable, and no configuration results in a link error. Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/rcar-du/Kconfig | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig index 0919f1f159a4..d2fcec807dfa 100644 --- a/drivers/gpu/drm/rcar-du/Kconfig +++ b/drivers/gpu/drm/rcar-du/Kconfig @@ -4,8 +4,6 @@ config DRM_RCAR_DU depends on DRM && OF depends on ARM || ARM64 depends on ARCH_RENESAS || COMPILE_TEST - imply DRM_RCAR_CMM - imply DRM_RCAR_LVDS select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER select DRM_GEM_CMA_HELPER @@ -14,13 +12,17 @@ config DRM_RCAR_DU Choose this option if you have an R-Car chipset. If M is selected the module will be called rcar-du-drm. -config DRM_RCAR_CMM - tristate "R-Car DU Color Management Module (CMM) Support" - depends on DRM && OF +config DRM_RCAR_USE_CMM + bool "R-Car DU Color Management Module (CMM) Support" depends on DRM_RCAR_DU + default DRM_RCAR_DU help Enable support for R-Car Color Management Module (CMM). +config DRM_RCAR_CMM + def_tristate DRM_RCAR_DU + depends on DRM_RCAR_USE_CMM + config DRM_RCAR_DW_HDMI tristate "R-Car DU Gen3 HDMI Encoder Support" depends on DRM && OF @@ -28,15 +30,20 @@ config DRM_RCAR_DW_HDMI help Enable support for R-Car Gen3 internal HDMI encoder. -config DRM_RCAR_LVDS - tristate "R-Car DU LVDS Encoder Support" - depends on DRM && DRM_BRIDGE && OF +config DRM_RCAR_USE_LVDS + bool "R-Car DU LVDS Encoder Support" + depends on DRM_BRIDGE && OF + default DRM_RCAR_DU select DRM_PANEL select OF_FLATTREE select OF_OVERLAY help Enable support for the R-Car Display Unit embedded LVDS encoders. +config DRM_RCAR_LVDS + def_tristate DRM_RCAR_DU + depends on DRM_RCAR_USE_LVDS + config DRM_RCAR_VSP bool "R-Car DU VSP Compositor Support" if ARM default y if ARM64 From patchwork Fri Apr 17 15:55:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11495499 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 14F1F15AB for ; Fri, 17 Apr 2020 15:57:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0305920656 for ; Fri, 17 Apr 2020 15:57:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729282AbgDQP5C (ORCPT ); Fri, 17 Apr 2020 11:57:02 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:34491 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729606AbgDQP5C (ORCPT ); Fri, 17 Apr 2020 11:57:02 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1MMGZM-1jievn0oMg-00JN2M; Fri, 17 Apr 2020 17:56:25 +0200 From: Arnd Bergmann To: dri-devel@lists.freedesktop.org, Jani Nikula , linux-fbdev@vger.kernel.org Cc: Arnd Bergmann , Nicolas Pitre , Andrzej Hajda , Jason Gunthorpe , Saeed Mahameed , masahiroy@kernel.org, Laurent.pinchart@ideasonboard.com, linux-renesas-soc@vger.kernel.org, kieran.bingham+renesas@ideasonboard.com, airlied@linux.ie, daniel@zonque.org, haojian.zhuang@gmail.com, robert.jarzmik@free.fr, daniel@ffwll.ch, marex@denx.de, stefan@agner.ch, linux-graphics-maintainer@vmware.com, thellstrom@vmware.com, jfrederich@gmail.com, dsd@laptop.org, geert@linux-m68k.org Subject: [PATCH 5/8] drm/vmwgfx: make framebuffer support optional Date: Fri, 17 Apr 2020 17:55:50 +0200 Message-Id: <20200417155553.675905-6-arnd@arndb.de> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200417155553.675905-1-arnd@arndb.de> References: <20200417155553.675905-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:u6Q1bnM+EnY5/jd2R9vjncEyS7mGp02CUsjYYeJPl/ZfuPSiFVa gk1q2+VpIMQLvU1T5PK1QRkQ0KYA7kgR5f9/7T+YFjeryJxSwBTcuOw9Ry2purwcMKgV0tg zim7UtuCwVmfxb+q9g4c56QgB+rglG7RieqlXDxB/6rSqm8Vy2Tb/qTb4oicWanXec01s4j RRapYoivY8GzFl1mfMDKA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:I8f0G9hikho=:KTGhkcpfCtK2+sSrXzpOre 2Nd6vycMtqFoQaYtkNrp0mVgb7mgisTqOc6SydTmZha5QuHbNxulHzy/fjIChxEwAAEs+rorl dt2+t0X5+tIfLZyFA9HQblEUDKYXVZ8NDiO1AFkpAYCgf5kO1RDdYsMndAwPlWnVaCFwyCKGV AHOTVtVt2gqUPm7cbL0ro7ZIvBA/YbZKd+H584/fSw+nUo9bRTRb9Y5OXn+0NciATlkU2+2B+ 8T1Ay+hP/Eb6cRxUuPTYu0jmC82Y2q4OrTweU3uVjeY8kqWKxDrfG6lYhUMJ/sGSMyV7gSQLx NABnJ6midPm9OFDBYWjJDD7MSmChWpjNO+grq3UmbS/YcL3BBu0xHx58jR3agLuqPPgGPvz8V zFVN3D2CLbM7KgxB6td456He3uz/qHGS9dCEPm82XZmmTaLC/m7+awf9KQmLkYzjMUGAxDNmI 1yO7oADvkyELX8hGiMw6rf8ody00LxgXDryG9XBPBbHdqnckDi0Ccy7cSArRvxxrAbLZrZH8l UyMmBP5f/sSDhSSlG20hPtysFvM4qfvkRcuWySO0nQswfLUSRYYTyPxXA473HNS5ercZhGOX3 8OD8ScV8zFO570CSji2dVQZV5PBSvOeaYA/FOlg1lQqG4GcpuwuJCwGSteiAARFtReGe/U4if aNPVSj2iW64x5QdiZJXvQwbP1KKurwzSR2M6t7SaCoGjCkWCkbvtZQ0z1v+Xj65HAhJJf1mCF OO1EJs7aiVw2xS4uW0GZxl3Tt1uzOtXpBsoda/K1ooHmLoRAHqbNGArw+UGtZ9FLC1KWqGFsd LVWvRdDWJ1i2vHCHzzd+eiJm6Iq+94zX5Zm1TVwL71lNWRenJM= Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org CONFIG_FB causes unnecessary Kconfig dependency problems when selected from another driver. Since it is already optional in vmwgfx at runtime, turn this into a compile-time dependency so the support can be completely left out of the driver and enabled only if CONFIG_FB is explicitly selected in the configuration. When the FB support is built into the driver, it is turned on by default, but can still be disabled when loading the module. Signed-off-by: Arnd Bergmann Acked-by: Thomas Zimmermann --- drivers/gpu/drm/vmwgfx/Kconfig | 17 +++++++------- drivers/gpu/drm/vmwgfx/Makefile | 4 +++- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 35 +++++++++++++++++++---------- 3 files changed, 35 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/Kconfig b/drivers/gpu/drm/vmwgfx/Kconfig index 15acdf2a7c0f..b2835636991b 100644 --- a/drivers/gpu/drm/vmwgfx/Kconfig +++ b/drivers/gpu/drm/vmwgfx/Kconfig @@ -2,12 +2,7 @@ config DRM_VMWGFX tristate "DRM driver for VMware Virtual GPU" depends on DRM && PCI && X86 && MMU - select FB_DEFERRED_IO - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT select DRM_TTM - select FB select MAPPING_DIRTY_HELPERS # Only needed for the transitional use of drm_crtc_init - can be removed # again once vmwgfx sets up the primary plane itself. @@ -20,9 +15,15 @@ config DRM_VMWGFX The compiled module will be called "vmwgfx.ko". config DRM_VMWGFX_FBCON - depends on DRM_VMWGFX && FB - bool "Enable framebuffer console under vmwgfx by default" + bool "Enable framebuffer console under vmwgfx" + depends on DRM_VMWGFX + depends on FB=y || FB=DRM_VMWGFX + select FB_DEFERRED_IO + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT help Choose this option if you are shipping a new vmwgfx - userspace driver that supports using the kernel driver. + userspace driver that supports using the kernel driver + and you have framebuffer support enabled. diff --git a/drivers/gpu/drm/vmwgfx/Makefile b/drivers/gpu/drm/vmwgfx/Makefile index 31f85f09f1fc..905ebabc79fc 100644 --- a/drivers/gpu/drm/vmwgfx/Makefile +++ b/drivers/gpu/drm/vmwgfx/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \ - vmwgfx_fb.o vmwgfx_ioctl.o vmwgfx_resource.o vmwgfx_ttm_buffer.o \ + vmwgfx_ioctl.o vmwgfx_resource.o vmwgfx_ttm_buffer.o \ vmwgfx_fifo.o vmwgfx_irq.o vmwgfx_ldu.o vmwgfx_ttm_glue.o \ vmwgfx_overlay.o vmwgfx_marker.o vmwgfx_gmrid_manager.o \ vmwgfx_fence.o vmwgfx_bo.o vmwgfx_scrn.o vmwgfx_context.o \ @@ -11,5 +11,7 @@ vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \ vmwgfx_validation.o vmwgfx_page_dirty.o vmwgfx_streamoutput.o \ ttm_object.o ttm_lock.o +vmwgfx-$(CONFIG_DRM_VMWGFX_FBCON) += vmwgfx_fb.o + vmwgfx-$(CONFIG_TRANSPARENT_HUGEPAGE) += vmwgfx_thp.o obj-$(CONFIG_DRM_VMWGFX) := vmwgfx.o diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index c2247a893ed4..a471a659b89d 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c @@ -258,7 +258,6 @@ static const struct pci_device_id vmw_pci_id_list[] = { }; MODULE_DEVICE_TABLE(pci, vmw_pci_id_list); -static int enable_fbdev = IS_ENABLED(CONFIG_DRM_VMWGFX_FBCON); static int vmw_force_iommu; static int vmw_restrict_iommu; static int vmw_force_coherent; @@ -269,8 +268,21 @@ static int vmw_probe(struct pci_dev *, const struct pci_device_id *); static int vmwgfx_pm_notifier(struct notifier_block *nb, unsigned long val, void *ptr); +#ifdef CONFIG_DRM_VMWGFX_FBCON +static int enable_fbdev = 1; MODULE_PARM_DESC(enable_fbdev, "Enable vmwgfx fbdev"); module_param_named(enable_fbdev, enable_fbdev, int, 0600); +static inline bool vmw_fb_enabled(struct vmw_private *dev_priv) +{ + return dev_priv->enable_fb; +} +#else +#define enable_fbdev 0 +static inline bool vmw_fb_enabled(struct vmw_private *dev_priv) +{ + return false; +} +#endif MODULE_PARM_DESC(force_dma_api, "Force using the DMA API for TTM pages"); module_param_named(force_dma_api, vmw_force_iommu, int, 0600); MODULE_PARM_DESC(restrict_iommu, "Try to limit IOMMU usage for TTM pages"); @@ -669,7 +681,6 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset) dev_priv->mmio_start = pci_resource_start(dev->pdev, 2); dev_priv->assume_16bpp = !!vmw_assume_16bpp; - dev_priv->enable_fb = enable_fbdev; vmw_write(dev_priv, SVGA_REG_ID, SVGA_ID_2); @@ -945,7 +956,7 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset) VMWGFX_DRIVER_PATCHLEVEL); vmw_host_log(host_log); - if (dev_priv->enable_fb) { + if (vmw_fb_enabled(dev_priv)) { vmw_fifo_resource_inc(dev_priv); vmw_svga_enable(dev_priv); vmw_fb_init(dev_priv); @@ -1001,7 +1012,7 @@ static void vmw_driver_unload(struct drm_device *dev) if (dev_priv->ctx.res_ht_initialized) drm_ht_remove(&dev_priv->ctx.res_ht); vfree(dev_priv->ctx.cmd_bounce); - if (dev_priv->enable_fb) { + if (vmw_fb_enabled(dev_priv)) { vmw_fb_off(dev_priv); vmw_fb_close(dev_priv); vmw_fifo_resource_dec(dev_priv); @@ -1149,7 +1160,7 @@ static void vmw_master_drop(struct drm_device *dev, struct vmw_private *dev_priv = vmw_priv(dev); vmw_kms_legacy_hotspot_clear(dev_priv); - if (!dev_priv->enable_fb) + if (vmw_fb_enabled(dev_priv)) vmw_svga_disable(dev_priv); } @@ -1347,7 +1358,7 @@ static int vmw_pm_freeze(struct device *kdev) DRM_ERROR("Failed to freeze modesetting.\n"); return ret; } - if (dev_priv->enable_fb) + if (vmw_fb_enabled(dev_priv)) vmw_fb_off(dev_priv); ttm_suspend_lock(&dev_priv->reservation_sem); @@ -1355,18 +1366,18 @@ static int vmw_pm_freeze(struct device *kdev) vmw_resource_evict_all(dev_priv); vmw_release_device_early(dev_priv); ttm_bo_swapout_all(&dev_priv->bdev); - if (dev_priv->enable_fb) + if (vmw_fb_enabled(dev_priv)) vmw_fifo_resource_dec(dev_priv); if (atomic_read(&dev_priv->num_fifo_resources) != 0) { DRM_ERROR("Can't hibernate while 3D resources are active.\n"); - if (dev_priv->enable_fb) + if (vmw_fb_enabled(dev_priv)) vmw_fifo_resource_inc(dev_priv); WARN_ON(vmw_request_device_late(dev_priv)); dev_priv->suspend_locked = false; ttm_suspend_unlock(&dev_priv->reservation_sem); if (dev_priv->suspend_state) vmw_kms_resume(dev); - if (dev_priv->enable_fb) + if (vmw_fb_enabled(dev_priv)) vmw_fb_on(dev_priv); return -EBUSY; } @@ -1388,14 +1399,14 @@ static int vmw_pm_restore(struct device *kdev) vmw_write(dev_priv, SVGA_REG_ID, SVGA_ID_2); (void) vmw_read(dev_priv, SVGA_REG_ID); - if (dev_priv->enable_fb) + if (vmw_fb_enabled(dev_priv)) vmw_fifo_resource_inc(dev_priv); ret = vmw_request_device(dev_priv); if (ret) return ret; - if (dev_priv->enable_fb) + if (vmw_fb_enabled(dev_priv)) __vmw_svga_enable(dev_priv); vmw_fence_fifo_up(dev_priv->fman); @@ -1404,7 +1415,7 @@ static int vmw_pm_restore(struct device *kdev) if (dev_priv->suspend_state) vmw_kms_resume(dev_priv->dev); - if (dev_priv->enable_fb) + if (vmw_fb_enabled(dev_priv)) vmw_fb_on(dev_priv); return 0; From patchwork Fri Apr 17 15:55:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11495479 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F2955186E for ; Fri, 17 Apr 2020 15:56:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E5AF420656 for ; Fri, 17 Apr 2020 15:56:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729581AbgDQP4y (ORCPT ); Fri, 17 Apr 2020 11:56:54 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:41815 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729282AbgDQP4y (ORCPT ); Fri, 17 Apr 2020 11:56:54 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1MFK8N-1jRQDg3bmT-00FgfB; Fri, 17 Apr 2020 17:56:25 +0200 From: Arnd Bergmann To: dri-devel@lists.freedesktop.org, Jani Nikula , linux-fbdev@vger.kernel.org Cc: Arnd Bergmann , Nicolas Pitre , Andrzej Hajda , Jason Gunthorpe , Saeed Mahameed , masahiroy@kernel.org, Laurent.pinchart@ideasonboard.com, linux-renesas-soc@vger.kernel.org, kieran.bingham+renesas@ideasonboard.com, airlied@linux.ie, daniel@zonque.org, haojian.zhuang@gmail.com, robert.jarzmik@free.fr, daniel@ffwll.ch, marex@denx.de, stefan@agner.ch, linux-graphics-maintainer@vmware.com, thellstrom@vmware.com, jfrederich@gmail.com, dsd@laptop.org, geert@linux-m68k.org Subject: [PATCH 6/8] drm: decouple from CONFIG_FB Date: Fri, 17 Apr 2020 17:55:51 +0200 Message-Id: <20200417155553.675905-7-arnd@arndb.de> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200417155553.675905-1-arnd@arndb.de> References: <20200417155553.675905-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:0qBimtVr705+b3+OOeW9OcV+w70RcJb1UeeaRbsNFpRNaBBA8AJ DaMmbf5nUHQLmix18sFU8v0VJkd/IDerpbZDn/IECtMjar9Es06QzoINPu703Pqn4v497Hu Kyq33XSua3Qat0fv0xZ5BALWucGHzs0QGvmZPx+CHew3kGGMaoHKKxm4O4g4ZJkCvZ5G08p Ki8A8j7F9Ysk0P9bf3Q2w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:z3HrAeTyxKs=:dlFdue1DLLnlyYwhRUUq7F iRC6wwHUO48gl2J87xagem97WQclhaIjem3X5f/11XxouIvB+zt9wAARD2S7OeEA5cDurc/Qm j7k7cUlBRsPkUe4J6AUBIeri42SZ3z+Uqa726SqkttH0jsQqumq4jz85/kkZQcEZypC2Y8xja V0rA3bUX0m7vm4TxWx9LrbY7Gr8U2XCX7yZVyOzcrWFVX7v0alBYTuPYhcYOtHRPK6mWesybb JsZzGF3sfZRBHQ1xKGjt45hQy01i7EH09CmBTS/mt6CrUPc9P7ro/3mrbRzw+m9RnwpwCZU1M 5NwNC29DOe45bA6mAQm2EZF17ge6d2Tgiv3zRaR2ylgYyCHpIIbiJ5Sv2p4J1OgQeX24kF2sP EGMMK/xqNtmvdKUrO8dBtNGVVAMjuqwuuT5pZ+t99QV8YlyoyWOmVup7HFYZm9n/xP44u9MYp g1Z2u2BTgX27SeMofxGAkBikDxEvOdxyIZk4R8Tz5S/Qzqlxd+T+kcoh4a0MyoR3YFLkgycob 4O5ij7WMQbXD3UHb+s40r8EP7nHIC6xWqTAuHHQdy8rvvXecQkorwWucRr1AulIgpl4t0Ib9F GwJT6CVh2m8XBm06TDqcZ7lvPgyaKmgLhC/f/nq13VVtfsQCejPq312RKGmDddLcbDC9zK8TI QhxAmBMqJdMvSb0yA/GrOnPQoC+x9DDhnHLoa8k1AQlG6ovCK9eoG7UtE3a8tqqoOOzQuvWM8 LHXuiLGETHoNTmQhAn/nWZj7hWEwg22nGyVaNBXCVjMNZdHHDxa044E9oc+KF/Fa5jWTWmIF9 jOJJOrcw2qzvZZ8lO0s3eouIekb3UuHz5DmfANQ2r34YjG3i8A= Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org CONFIG_DRM_KMS_FB_HELPER selects CONFIG_FB, which is something it really should not, to avoid circular dependencies and accidentally including potentially dangerous user interfaces in the kernel, so change this into a 'depends on' check. Two device drivers currently select CONFIG_DRM_KMS_FB_HELPER, but as far as I can tell, they do not really need to any more, so those selects can be removed. This leaves DRM_FBDEV_EMULATION as the only thing that rightfully selects CONFIG_DRM_KMS_FB_HELPER, and this now has to depend on CONFIG_FB and its dependencies. Signed-off-by: Arnd Bergmann Reviewed-by: Sam Ravnborg --- drivers/gpu/drm/Kconfig | 5 +++-- drivers/gpu/drm/mxsfb/Kconfig | 1 - drivers/gpu/drm/zte/Kconfig | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 43594978958e..7c3109133685 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -80,7 +80,7 @@ config DRM_KMS_HELPER config DRM_KMS_FB_HELPER bool depends on DRM_KMS_HELPER - select FB + depends on FB select FRAMEBUFFER_CONSOLE if !EXPERT select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE select FB_SYS_FOPS @@ -111,7 +111,8 @@ config DRM_DEBUG_DP_MST_TOPOLOGY_REFS config DRM_FBDEV_EMULATION bool "Enable legacy fbdev support for your modesetting driver" - depends on DRM + depends on DRM && FB + depends on FB=y || DRM=m select DRM_KMS_HELPER select DRM_KMS_FB_HELPER default y diff --git a/drivers/gpu/drm/mxsfb/Kconfig b/drivers/gpu/drm/mxsfb/Kconfig index 0dca8f27169e..33916b7b2c50 100644 --- a/drivers/gpu/drm/mxsfb/Kconfig +++ b/drivers/gpu/drm/mxsfb/Kconfig @@ -10,7 +10,6 @@ config DRM_MXSFB depends on COMMON_CLK select DRM_MXS select DRM_KMS_HELPER - select DRM_KMS_FB_HELPER select DRM_KMS_CMA_HELPER select DRM_PANEL help diff --git a/drivers/gpu/drm/zte/Kconfig b/drivers/gpu/drm/zte/Kconfig index 90ebaedc11fd..aa8594190b50 100644 --- a/drivers/gpu/drm/zte/Kconfig +++ b/drivers/gpu/drm/zte/Kconfig @@ -3,7 +3,6 @@ config DRM_ZTE tristate "DRM Support for ZTE SoCs" depends on DRM && ARCH_ZX select DRM_KMS_CMA_HELPER - select DRM_KMS_FB_HELPER select DRM_KMS_HELPER select SND_SOC_HDMI_CODEC if SND_SOC select VIDEOMODE_HELPERS From patchwork Fri Apr 17 15:55:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11495473 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E44E381 for ; Fri, 17 Apr 2020 15:56:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D678E20656 for ; Fri, 17 Apr 2020 15:56:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729576AbgDQP4x (ORCPT ); Fri, 17 Apr 2020 11:56:53 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:48313 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729535AbgDQP4x (ORCPT ); Fri, 17 Apr 2020 11:56:53 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1Mdvyi-1irnEC2GYQ-00b2Ri; Fri, 17 Apr 2020 17:56:26 +0200 From: Arnd Bergmann To: dri-devel@lists.freedesktop.org, Jani Nikula , linux-fbdev@vger.kernel.org Cc: Arnd Bergmann , Nicolas Pitre , Andrzej Hajda , Jason Gunthorpe , Saeed Mahameed , masahiroy@kernel.org, Laurent.pinchart@ideasonboard.com, linux-renesas-soc@vger.kernel.org, kieran.bingham+renesas@ideasonboard.com, airlied@linux.ie, daniel@zonque.org, haojian.zhuang@gmail.com, robert.jarzmik@free.fr, daniel@ffwll.ch, marex@denx.de, stefan@agner.ch, linux-graphics-maintainer@vmware.com, thellstrom@vmware.com, jfrederich@gmail.com, dsd@laptop.org, geert@linux-m68k.org Subject: [PATCH 7/8] fbdev: rework backlight dependencies Date: Fri, 17 Apr 2020 17:55:52 +0200 Message-Id: <20200417155553.675905-8-arnd@arndb.de> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200417155553.675905-1-arnd@arndb.de> References: <20200417155553.675905-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:vGGnc5uwogoaFi6Z70DCSCfFNs3VFNyi23c2w5F8AgwudYdGiOn qf3xmzEH6ZlKvYId4+y9DQOJjPmrdQ5Ly77BVj5lo4BsvRV14yZifvS6wwRiNK5Km3YVcSs ejNr2W/o5YZ78gytJeefvBfMDQhcv9w1VSv2LusnKOjgKAyYAWGZVsgT75IoREAyrU+HGYC /cpVYSCtL6vWKC9ZwSJuQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:C7LFhGxGtwI=:mB0SQmX5ugxSw2eBOppjd9 zXdkkn+O/lxIgg0DC1sbRDZfrULOuQJJC5H7MS2hVxJtfNMZaksC1HDTw2CaZ5GAPRsu8ymQS Lg1DhSrNb3SpHCpYOzUw+YO3FHxgO1C+XbT1lhknn/n6h4YFWyukCKicbG6xD2wph4anHkB2R w7JtfjedEs9HvmcOvbZKDyF6CpWGZtvgp0PLAaRgmAC7sVSgfMIhYENXU76oRTWWeqwAcE4G3 qAysWvA1oq1pc1Sqr6/ESMGwDfx0lDmtmGt4ApX1UqxcCghCLYjMy5HsRvYzJeSWRw6S4h89o STsdrITqli4Q7w5DEErYVWuVUbFxXzuNySZ3nnGDX9s7oA7cPtUFCOB5TYcg0eTlEpk4ALOp4 1l/pEG4DZeiQrFYU1LpkuTA+UxFCG43mgZ1CGsjssToxbb++Zbe93dLUJSK+z2nIg5D4cuDNw h2gO0vOeSu4HBQ4w0pHHZ0DLpRMkwZYm5B21gcoON/k4UbkBpiJdn9r2zF6Z4+5BGuxK8hw4J IwfUio/q5ig2hDVomjbyQF2TCeTQ6h3vrXGAJu+hMfAMewAfb7WrMz0BP+tcVPVYpuhKuTRKK NIMzjex/2BlVkhFpYaglhYlpZN+51xbLLrVTqQgbd0kihOxtCPVmJsV25Wdyp5MKvvJ+3ChjX ESH0Qz/N7XmAfMjXfxHqgS4njsCPr3txSykzf9zA6VlJiTMbA9VXl2wrPPsb/iFGMR6DxoJif oxwkTFEaT6hCPlrxpBDW40S4pHOAMSNJj8XZv0YFWeJX/AhuZiehC9STQMiqe3E4eFR4El0zX Z6xQx3WL137d6sxZhtsWSxhPUxk8gArU7lJBoZsrIuzByFvkAo= Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Rather than having CONFIG_FB_BACKLIGHT select CONFIG_BACKLIGHT_CLASS_DEVICE, make any driver that needs it have a dependency on the class device being available, to prevent circular dependencies. This is the same way that the backlight is already treated for the DRM subsystem. Signed-off-by: Arnd Bergmann Acked-by: Jani Nikula --- drivers/auxdisplay/Kconfig | 1 + drivers/macintosh/Kconfig | 1 + drivers/staging/fbtft/Kconfig | 1 + drivers/staging/olpc_dcon/Kconfig | 2 +- drivers/video/fbdev/Kconfig | 14 +++++++++++--- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/auxdisplay/Kconfig b/drivers/auxdisplay/Kconfig index 48efa7a047f3..f5751b5b0e88 100644 --- a/drivers/auxdisplay/Kconfig +++ b/drivers/auxdisplay/Kconfig @@ -144,6 +144,7 @@ config IMG_ASCII_LCD config HT16K33 tristate "Holtek Ht16K33 LED controller with keyscan" depends on FB && OF && I2C && INPUT + depends on BACKLIGHT_CLASS_DEVICE select FB_SYS_FOPS select FB_SYS_FILLRECT select FB_SYS_COPYAREA diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig index cbd46c1c5bf7..a1c6677c7043 100644 --- a/drivers/macintosh/Kconfig +++ b/drivers/macintosh/Kconfig @@ -113,6 +113,7 @@ config PMAC_MEDIABAY config PMAC_BACKLIGHT bool "Backlight control for LCD screens" depends on PPC_PMAC && ADB_PMU && FB = y && (BROKEN || !PPC64) + depends on BACKLIGHT_CLASS_DEVICE select FB_BACKLIGHT help Say Y here to enable Macintosh specific extensions of the generic diff --git a/drivers/staging/fbtft/Kconfig b/drivers/staging/fbtft/Kconfig index dad1ddcd7b0c..c4f2f01cd798 100644 --- a/drivers/staging/fbtft/Kconfig +++ b/drivers/staging/fbtft/Kconfig @@ -3,6 +3,7 @@ menuconfig FB_TFT tristate "Support for small TFT LCD display modules" depends on FB && SPI depends on GPIOLIB || COMPILE_TEST + depends on BACKLIGHT_CLASS_DEVICE select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT diff --git a/drivers/staging/olpc_dcon/Kconfig b/drivers/staging/olpc_dcon/Kconfig index d1a0dea09ef0..a9f36538d7ab 100644 --- a/drivers/staging/olpc_dcon/Kconfig +++ b/drivers/staging/olpc_dcon/Kconfig @@ -4,7 +4,7 @@ config FB_OLPC_DCON depends on OLPC && FB depends on I2C depends on GPIO_CS5535 && ACPI - select BACKLIGHT_CLASS_DEVICE + depends on BACKLIGHT_CLASS_DEVICE help In order to support very low power operation, the XO laptop uses a secondary Display CONtroller, or DCON. This secondary controller diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index bcf7834dbdbf..47e1b65276f4 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -186,7 +186,7 @@ config FB_MACMODES config FB_BACKLIGHT tristate depends on FB - select BACKLIGHT_CLASS_DEVICE + depends on BACKLIGHT_CLASS_DEVICE config FB_MODE_HELPERS bool "Enable Video Mode Handling Helpers" @@ -275,12 +275,12 @@ config FB_ARMCLCD tristate "ARM PrimeCell PL110 support" depends on ARM || ARM64 || COMPILE_TEST depends on FB && ARM_AMBA && HAS_IOMEM + depends on BACKLIGHT_CLASS_DEVICE || !OF select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select FB_MODE_HELPERS if OF select VIDEOMODE_HELPERS if OF - select BACKLIGHT_CLASS_DEVICE if OF help This framebuffer device driver is for the ARM PrimeCell PL110 Colour LCD controller. ARM PrimeCells provide the building @@ -861,6 +861,7 @@ config FB_ATMEL tristate "AT91 LCD Controller support" depends on FB && OF && HAVE_CLK && HAS_IOMEM depends on HAVE_FB_ATMEL || COMPILE_TEST + depends on BACKLIGHT_CLASS_DEVICE select FB_BACKLIGHT select FB_CFB_FILLRECT select FB_CFB_COPYAREA @@ -914,6 +915,7 @@ config FB_NVIDIA_DEBUG config FB_NVIDIA_BACKLIGHT bool "Support for backlight control" depends on FB_NVIDIA + depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_NVIDIA default y help Say Y here if you want to control the backlight of your display. @@ -961,6 +963,7 @@ config FB_RIVA_DEBUG config FB_RIVA_BACKLIGHT bool "Support for backlight control" depends on FB_RIVA + depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_RIVA default y help Say Y here if you want to control the backlight of your display. @@ -1232,6 +1235,7 @@ config FB_RADEON_I2C config FB_RADEON_BACKLIGHT bool "Support for backlight control" depends on FB_RADEON + depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_RADEON default y help Say Y here if you want to control the backlight of your display. @@ -1263,6 +1267,7 @@ config FB_ATY128 config FB_ATY128_BACKLIGHT bool "Support for backlight control" depends on FB_ATY128 + depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_ATY128 default y help Say Y here if you want to control the backlight of your display. @@ -1312,6 +1317,7 @@ config FB_ATY_GX config FB_ATY_BACKLIGHT bool "Support for backlight control" + depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_ATY depends on FB_ATY default y help @@ -1855,6 +1861,7 @@ config FB_SH_MOBILE_LCDC tristate "SuperH Mobile LCDC framebuffer support" depends on FB && HAVE_CLK && HAS_IOMEM depends on SUPERH || ARCH_RENESAS || COMPILE_TEST + depends on BACKLIGHT_CLASS_DEVICE select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT @@ -2183,7 +2190,7 @@ config FB_PRE_INIT_FB config FB_MX3 tristate "MX3 Framebuffer support" depends on FB && MX3_IPU - select BACKLIGHT_CLASS_DEVICE + depends on BACKLIGHT_CLASS_DEVICE select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT @@ -2250,6 +2257,7 @@ config FB_SSD1307 depends on FB && I2C depends on OF depends on GPIOLIB || COMPILE_TEST + depends on BACKLIGHT_CLASS_DEVICE select FB_SYS_FOPS select FB_SYS_FILLRECT select FB_SYS_COPYAREA From patchwork Fri Apr 17 15:55:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11495469 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 211441951 for ; Fri, 17 Apr 2020 15:56:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 139A22223C for ; Fri, 17 Apr 2020 15:56:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728550AbgDQP4w (ORCPT ); Fri, 17 Apr 2020 11:56:52 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:50219 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729282AbgDQP4w (ORCPT ); Fri, 17 Apr 2020 11:56:52 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1MIdW7-1jUiXm100z-00EZfR; Fri, 17 Apr 2020 17:56:27 +0200 From: Arnd Bergmann To: dri-devel@lists.freedesktop.org, Jani Nikula , linux-fbdev@vger.kernel.org Cc: Arnd Bergmann , Nicolas Pitre , Andrzej Hajda , Jason Gunthorpe , Saeed Mahameed , masahiroy@kernel.org, Laurent.pinchart@ideasonboard.com, linux-renesas-soc@vger.kernel.org, kieran.bingham+renesas@ideasonboard.com, airlied@linux.ie, daniel@zonque.org, haojian.zhuang@gmail.com, robert.jarzmik@free.fr, daniel@ffwll.ch, marex@denx.de, stefan@agner.ch, linux-graphics-maintainer@vmware.com, thellstrom@vmware.com, jfrederich@gmail.com, dsd@laptop.org, geert@linux-m68k.org Subject: [PATCH 8/8] drm/bridge/sii8620: fix extcon dependency Date: Fri, 17 Apr 2020 17:55:53 +0200 Message-Id: <20200417155553.675905-9-arnd@arndb.de> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200417155553.675905-1-arnd@arndb.de> References: <20200417155553.675905-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:UJfZE5doXQXPVZErHGo/jr5SBujC3aYcMMYtNkgKRBF2nc0duPM 08ExwIQTE+EcQe7GilksYVZq8wjVRkU8P8k3vB5MKuopHwNqy/AjaVPeZeCJmXH6egv4IqM VZEQBI/GcnYuDWE25eDN5M9eQPLp1/MvtAC8sE37e4xQqQR79mx3h6eHTZvuvxCt2guGuX8 HdzQN1IbXJRnIpaPlG44g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:miWYTRa2EbE=:JuLeeZ/tDWudAlfDrZtrJ+ ARPya4R+tGG5n6EGjv3NzTtynhx8vdzXF8zC38jHjKqlocFRzyVABI5PTCFNhK9Z9/moLt6pG qX7Z8rlopstKaL8fIyZ4gkEeVIPyvABY83MTg7mPwTtrz4glfgy8LSGdesRSUfK/xk3suUSGs /fGdtkxYNQ0lRBk8n4e+b/fYoLNNLsooxKLt9XkYbFDFULavPYAabmm8XQi8WNgZfhDskwAyk XE9JKinpRPx7N5AF8A/J3PEKUz3KKwQri6QVUtX7AlUMiTWVY+pA6gCAO0zN9bTf9yJfLOB6K PIN/r+U+jkYXts/yJIiuEj9AqNalQcp1rCdLdFHU3TiWNBOMECqKOwn5MaIE6VE/MN9mSIqYP BpOnX+GFaVeYBIV0obo/p0bNEqm1pOcxWnDuvDvGZPWIEGajuBDyeC++Wz5Fb1aI9WC/jtXKn YQu3z8pzjJJzn8r3wxlSWsMjtDc9w095nSiCcB/t1EG7U/qRqKOJICstwhYJjQUB+SKBwYC9D 8okqr8N8tRBxjwjECmzqMOzVtUixGEXOlHwJwv5BIDOSikqZoXNJuaDJhprJlwpelTDl/d5kt 1lKcaO9LFcS5SZE0SQ0kyOEb/zbxUzuTuzrql1DT3q770SqP0u5JO07YfEO40BVSj5bl60IC5 M45DeEeqwc3/c81jQjuAfj3wfp8oFYCt15oUAQFGxgQcD/mqMyqJv6QTUTKdIQXWGhiCJH2mZ RfQ0nirokH8sfCDhLVkZZHNFFcrwSL7rV3FY8FR/mrQbTXRW2hYlWXz0YaRfTK1Nf/7Ejnntq ZnsXjna2GcTDIeVcbVtCt6yCdYwh1bm1Gt0Z64lvDB98iBfMZ4= Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Using 'imply' does not work here, it still cause the same build failure: arm-linux-gnueabi-ld: drivers/gpu/drm/bridge/sil-sii8620.o: in function `sii8620_remove': sil-sii8620.c:(.text+0x1b8): undefined reference to `extcon_unregister_notifier' arm-linux-gnueabi-ld: drivers/gpu/drm/bridge/sil-sii8620.o: in function `sii8620_probe': sil-sii8620.c:(.text+0x27e8): undefined reference to `extcon_find_edev_by_node' arm-linux-gnueabi-ld: sil-sii8620.c:(.text+0x2870): undefined reference to `extcon_register_notifier' arm-linux-gnueabi-ld: drivers/gpu/drm/bridge/sil-sii8620.o: in function `sii8620_extcon_work': sil-sii8620.c:(.text+0x2908): undefined reference to `extcon_get_state' Now that the framebuffer configuration is cleaned up, we can use the usual 'depends on EXTCON || !EXTCON' trick. Fixes: 7a109673899b ("drm/bridge/sii8620: add Kconfig dependency on extcon") Signed-off-by: Arnd Bergmann Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/bridge/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index aaed2347ace9..29c837625f03 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -90,7 +90,7 @@ config DRM_SIL_SII8620 tristate "Silicon Image SII8620 HDMI/MHL bridge" depends on OF select DRM_KMS_HELPER - imply EXTCON + depends on EXTCON || !EXTCON depends on RC_CORE || !RC_CORE help Silicon Image SII8620 HDMI/MHL bridge chip driver.