From patchwork Mon Jan 15 16:14:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 124542 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp718852lje; Mon, 15 Jan 2018 08:14:47 -0800 (PST) X-Google-Smtp-Source: ACJfBotmjvREf0Rjus5sDmNcv6a5GIRkq3lrUTO+Z585S8em1Qhwtxhf2DLkPswfIDXakJyF5W2f X-Received: by 10.101.71.130 with SMTP id e2mr3206522pgs.396.1516032887306; Mon, 15 Jan 2018 08:14:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516032887; cv=none; d=google.com; s=arc-20160816; b=Nd4WK62Sg1wzl8YpVlAFd/4Zeg9ExDG1cOSyJnAw6uDruGnbSa8jQBQsJvSGW0KchR 8AWaWXfGqLDt4LIvRR+u8KImZyi2VixBmrfTyt72U1oCleLVc4Hr6R1ddOp+MdjUalee 7mzmZcJvLHOXjCXpL2R86bPjh4m5suycwkKzrf7XfE9ENpKU+3rgeRuXFVt/a/4YWNYA Yx/2ShY9DPWCxUQl8DJShWBRV5NHh9PlwyGZlO6ArC0B5BOMS0smQ0GU6HFLRh1oxsVZ x2QM3h9psweXQ+zj5S4tXFBSHvkf5XYTTwl1uwkOfQBsgfHyeSiPuklCG2lIYOHID7dg he6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=C5QcV9zPFkvOteDWePU8m9fvsxbExa6vXCKB1jVoJ4M=; b=LBbMd9KmMt9u2PzzzjBBY4CbpqKRLrbVsdaPH0UtdGxbpcBInuEHqg1k66fsIPfy4S 2WsMjThaCbFLVGCYyz+BTTMfclA6A2yooWfbV1kpwcM30/UFWTOfr/LZXzAaIUTUJwaW vL2PPqmw+5/37j8jGvnfXMJaf7se6A4boQlZo5Mm1vZ0R8j+l6qAtgeK40xoq6m7OWQL N+U1thXAqrXuzRxYIHiJ6uRkfcuobbs2HG0JH61U8pm6uVtpbNFDC348SdtB62q+aj41 RM+APRLiGyJkZ1yY1LgyJyeY07k90afM5UealILHJiRDTqC45G8kJdHLpU4E+lLTEU08 FX7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-fbdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-fbdev-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d18si2387pgo.43.2018.01.15.08.14.47; Mon, 15 Jan 2018 08:14:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-fbdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-fbdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-fbdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754011AbeAOQOq (ORCPT + 2 others); Mon, 15 Jan 2018 11:14:46 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:61321 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753957AbeAOQOp (ORCPT ); Mon, 15 Jan 2018 11:14:45 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0MH3Pq-1eg5DH0FWs-00DqSK; Mon, 15 Jan 2018 17:14:33 +0100 From: Arnd Bergmann To: Rob Clark Cc: Jordan Crouse , Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-i2c@vger.kernel.org, Wolfram Sang , Srinivas Kandagatla , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] fbdev: don't select I2C directly Date: Mon, 15 Jan 2018 17:14:04 +0100 Message-Id: <20180115161431.803248-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:+akeorEEwpjvqcs8tCDMnShPHqUyAlD5s+xnfHiUFLG/H0dDByg 9bRICAj4DA3i+iOCuYvdykjGfBJmCp/LNytihU9ucE/1+x9denalWWIVP4qN9FuvnCB5BnS FNBB7oE7JQAOErBkkZthZqXpVLXVp0rhzqQQcUcT2Ss+N9NZ0gHQt2TYBWDqxm2TGH3llDt uzRpDacqMH11HTvne91KQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:ojaFah+BtKs=:mVgKCE8UTTZJuOgtCUySV+ AIG/xecRLh+si6WYkputSP7MVoDkmJrFA3RTLbtIgUIslUCgALjS7L8oU1VmsAckIEgDwXWmH 05BHj7zpG3FpXzwFao4YDURZZSsba5Sq0MAA3qRoNA2nvAwsSZi74cxjpHwlsnxJWcHXWprQk HRh6ReqfFYBGfeVZNapRjuOGW6BPxfHtwmGT3hdCZgrMqJZeSSlOuHCkC3q+HASkrr8DDlnSu sDKOk3OO8AMLRoHH9zEs6Ayyq5P8TiUl69uihz88dvX/6C+j9GpZiM22Qjq5zbMIwrDa/yVQh wFF1x93tox5eFljk2Cs4LCQwqzKMnvdfdSi6XzhVWFPxb1arpSBmUJ4vHTvygnb4rqeqeYIm+ /VkClk5AoklsjoUfxh4g3TUlAoII7n4QZjZgyASjWlbbGPm54UeuOzsv6fuNKjdQQNiyD03N4 oENIoXKnhDS37Ve8MLHLTAet4G1tmFLdih+jreKrcT50ow3KKb5+euueX/ilP2t8lZqDRdySI 6MXgvlazM1ZKRT/5upBPiyMzrkwX7+puClgzXzaLErNrg1A63pdji8sCnSEafItxVftL2H4GH XeaCIiPg8KNfw7vxS9lTkze8/ykUPSctH+uXD51rj+acSNn1wV1tIhmlYpN2js6F1Ys1ePBHI ML+m2VvoQ7gukzKImPYrUassOw3e/KOofC0hnuMefPiBstCL2UDzDnXAj3w9ae8XmWKVehB4M W4HONzYNnEXcnIGQ2hyVPJXMrOYTvb8gmPQlDg== Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Using a Kconfig 'select' statement for a user-visible symbol that other drivers depend on often causes circular dependencies. A new one showed up when I wanted to add an NVMEM dependency to the DRM_MSM driver: drivers/i2c/Kconfig:7:error: recursive dependency detected! drivers/i2c/Kconfig:7: symbol I2C is selected by FB_DDC drivers/video/fbdev/Kconfig:63: symbol FB_DDC is selected by FB_CYBER2000_DDC drivers/video/fbdev/Kconfig:390: symbol FB_CYBER2000_DDC depends on FB_CYBER2000 drivers/video/fbdev/Kconfig:378: symbol FB_CYBER2000 depends on FB drivers/video/fbdev/Kconfig:5: symbol FB is selected by DRM_KMS_FB_HELPER drivers/gpu/drm/Kconfig:77: symbol DRM_KMS_FB_HELPER depends on DRM_KMS_HELPER drivers/gpu/drm/Kconfig:71: symbol DRM_KMS_HELPER is selected by DRM_MSM drivers/gpu/drm/msm/Kconfig:2: symbol DRM_MSM depends on NVMEM drivers/nvmem/Kconfig:1: symbol NVMEM is selected by EEPROM_AT24 drivers/misc/eeprom/Kconfig:3: symbol EEPROM_AT24 depends on I2C Here, the problem is that many fbdev drivers have an i2c based interface and just 'select i2c' for that, while we also select the framebuffer subsystem indirectly from a DRM driver that now depends on i2c. This does away with the 'select' statement and instead uses 'depends on', like almost all I2C users. Signed-off-by: Arnd Bergmann --- drivers/video/fbdev/Kconfig | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 6962b4583fd7..892eb1863100 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -64,7 +64,6 @@ config FB_DDC tristate depends on FB select I2C_ALGOBIT - select I2C default n config FB_BOOT_VESA_SUPPORT @@ -390,6 +389,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 @@ -634,7 +634,7 @@ config FB_BF537_LQ035 config FB_BFIN_7393 tristate "Blackfin ADV7393 Video encoder" depends on FB && BLACKFIN - select I2C + depends on I2C select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT @@ -1026,6 +1026,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 @@ -1073,6 +1074,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 @@ -1102,6 +1104,7 @@ config FB_RIVA_BACKLIGHT config FB_I740 tristate "Intel740 support" depends on FB && PCI + depends on I2C select FB_MODE_HELPERS select FB_CFB_FILLRECT select FB_CFB_COPYAREA @@ -1155,6 +1158,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 @@ -1206,6 +1210,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 @@ -1285,6 +1290,7 @@ config FB_MATROX_G config FB_MATROX_I2C tristate "Matrox I2C support" depends on FB_MATROX + depends on I2C select FB_DDC ---help--- This drivers creates I2C buses which are needed for accessing the @@ -1350,6 +1356,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 @@ -1460,6 +1467,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 @@ -1485,6 +1493,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 @@ -1629,6 +1638,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 @@ -1669,6 +1679,7 @@ config FB_VT8623 config FB_TRIDENT tristate "Trident/CyberXXX/CyberBlade support" depends on FB && PCI + depends on I2C select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT @@ -2299,8 +2310,8 @@ endchoice config FB_MB862XX_I2C bool "Support I2C bus on MB862XX GDC" - depends on FB_MB862XX && I2C - depends on FB_MB862XX=m || I2C=y + depends on FB_MB862XX + depends on I2C=y || I2C=FB_MB862XX default y help Selecting this option adds Coral-P(A)/Lime GDC I2C bus adapter From patchwork Mon Jan 15 16:14:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 124543 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp718943lje; Mon, 15 Jan 2018 08:15:04 -0800 (PST) X-Google-Smtp-Source: ACJfBovEQP7Ec9BShqV+ExeuWS5jRKvsIQfgsNarFJTBtidUwWvFO+vLC+lCaLR4aXo2insXkY1T X-Received: by 10.98.64.208 with SMTP id f77mr1698421pfd.157.1516032904046; Mon, 15 Jan 2018 08:15:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516032904; cv=none; d=google.com; s=arc-20160816; b=GIz8PPwaFAVKty//R3Ab9wchdisk0ACqun3SZANncy+/CYm+dDB5EY3DDfjDPzptmy jOF5IzmdGTPd4tlAC4JdEMyNO9nbS5MLmTw75B/XUbjYhe1w2ocfR53nMpygZwvAnuG/ eojeso01jAeCjAKS8IIv5a8jhOaUPMWkjH6Z5AUowbwhHFSzAmHbpNZLGo8/6dMbiC5H HxVRYOStJ0uZV9mIt3k6CWNEjJnfzhODQ8/a1EqOM4cBub43U12uc8ljYABYy6jO3ni3 fNbi0i26XNQ8bUDfHC8TPKAXpAQKioohRnjnk+9W7fL1G0VXjntNdK+Mnq7yPsdkyhu1 8BKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=/c2/gmaBnggL94tbvrtaVJtyAduUXYOESM0FykXgwtU=; b=HzqyjOtJqYlq3k3QC4K/dBZcxfHJY8AZmCGN+aiJV8nX8Uk3NpH5bSZ5TdBAMKdW02 JoQ9Yt/0pw5eLzRmqbJg6SKlnglxpRG7zVqyHuQGWumwpHqSrPG/rlg8dCnCjfX6+ZQe P/9lD2H/Y4kyBEyBXkSfjgidpg64hJHGDp/JcidlRMvjRRdT9XrKLSMSL/bNfJYNYQ1r P8eOiF3Mpkbe9IyUMn2UWNm6jeW6lOY6gp1COQdM7KwW0fsgeefEQT9mhCfy90R7hxVc BtGGInuMENyD94aF9hD/QNs+EHCHaimuSySb2GfXR2Y0H3/uJhK9cpxOdZJaCBaxKsLP jaWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-fbdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-fbdev-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s82si11827397pfg.317.2018.01.15.08.15.03; Mon, 15 Jan 2018 08:15:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-fbdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-fbdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-fbdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755983AbeAOQPB (ORCPT + 2 others); Mon, 15 Jan 2018 11:15:01 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:61651 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753957AbeAOQO7 (ORCPT ); Mon, 15 Jan 2018 11:14:59 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0Lxbix-1evYh31FJj-017B6L; Mon, 15 Jan 2018 17:14:46 +0100 From: Arnd Bergmann To: Rob Clark Cc: Jordan Crouse , Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-i2c@vger.kernel.org, Wolfram Sang , Srinivas Kandagatla , Arnd Bergmann , David Airlie , Bjorn Andersson , Archit Taneja , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] drm/msm/adreno: fix nvmem related link error Date: Mon, 15 Jan 2018 17:14:05 +0100 Message-Id: <20180115161431.803248-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180115161431.803248-1-arnd@arndb.de> References: <20180115161431.803248-1-arnd@arndb.de> X-Provags-ID: V03:K0:ZtPKQ2aEagfeH9NZgUE456Rh+11KhQNqTu2obIzgc3DltfGZWyI sceVtweX9bl7Mn34CwCJm+jL6D6ByroMo6uHNKR5jsBwfY1WloPrEPwhhbaMrdg+ZgmJnwa FLgkTZOpJs7pF5bWW7z8HK0P1OGwdXYqUBoBYU4xzN6vxScGOc31oHHcVT/8cbYTi8WJ91n tAWmnl/I9qUac+Fm7Ldrw== X-UI-Out-Filterresults: notjunk:1; V01:K0:2s0AXqFgJyA=:nbdVquWCb3ua8U1qYOZOKv HFhaOkpIlNDKMOOVZqTi/4hInRji5KPTmgnQlNT2VMsSNXpujdC9K4GdxXWdq1j/Vu84D6O60 s3hia376HRMeyZDV19p4og9uSEYlf+3OfJGUiuMDzSXiM1k/S6eGSuJ1pvezMmfURR6CRV6ys M4QY8QrTwWISlSBBo6yXG1Tlr3ymIl+zwpXicAK99cV/cJUDjeOWfF4+B714bM7SPI0EVRH4t sHhj3/iw8zBv1NvP/bjMvQ9CFYotBTGQWquXsZqYvGC3jzRFLIZt4mo9KSh3er/wdZUhTVbfQ rTuq7GF/XEUO27DWVTIcw5jQuu41RgLPizIAa+nKsHAFugLE4dOhBk8tnmm1cbwK4+J1bXPbz szWaCS7hehkGGLLI4F5YnOYtDb1ke5C7wrlqmEX3xgkXVm8zPCpGf6+1BywEdCo5CGg/FDB29 PJYAJelSa0pMxg6YN+xGnh2TP+xdD0vOO8I7AaV173mpTjZCMWohqvESWOENYOVcel2azWH0e l3uPs46innJAsyLRhfaj/JUo0bxg+plJkcTyMX9B+PSbvWvkXL3j21tlz65xB/Zpczg2miBRh OM7FnDIZtxRrYM0YMWAuxjoRCfNgJF0h5kf1RIRJj8W0UGuwk2SlnqXR3zBUUnES2prhbfkd1 Cr4Ms2Zzo7V8pRDxR/7w16sw6Qe52k65zOyeP0tcKzXlzhJddAI+0D/5mVeRIgA3Rr+Lj1Xjk SJloqyAcWn85A2Iua6bIrVc6WQH8piI+Sv6h5g== Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org When NVMEM is configured as a loadable module, and adreno is built-in, we get a link failure: drivers/gpu/drm/msm/adreno/a5xx_gpu.o: In function `a5xx_gpu_init': a5xx_gpu.c:(.text+0x15cc): undefined reference to `nvmem_cell_get' a5xx_gpu.c:(.text+0x15da): undefined reference to `nvmem_cell_read' a5xx_gpu.c:(.text+0x15e4): undefined reference to `nvmem_cell_put' This adds a Kconfig dependency to enforce valid configurations, when NVMEM is a loadable module, adreno now has to also be one. The code seems to deal fine with nvmem being completely disabled, it will just not set the right speed bin then, so we don't need a hard dependency. Fixes: f56d9df656c4 ("drm/msm/adreno: Read the speed bins for a5xx targets") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/msm/Kconfig | 1 + 1 file changed, 1 insertion(+) -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig index 99d39b2aefa6..74fb1c816da9 100644 --- a/drivers/gpu/drm/msm/Kconfig +++ b/drivers/gpu/drm/msm/Kconfig @@ -4,6 +4,7 @@ config DRM_MSM depends on DRM depends on ARCH_QCOM || (ARM && COMPILE_TEST) depends on OF && COMMON_CLK + depends on NVMEM || !NVMEM depends on MMU select QCOM_MDT_LOADER if ARCH_QCOM select REGULATOR