Message ID | 20230125-tfp410_i2c-v1-4-66a4d4e390b7@criticallink.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp488683wrn; Wed, 25 Jan 2023 13:14:52 -0800 (PST) X-Google-Smtp-Source: AMrXdXuI/0XlDd+MLZc0Uvw0ZG5IvQRwz4kEyouCWb31RTgajctwNLr66qPPpRidMNmiUa0gXLS7 X-Received: by 2002:a05:6a20:7d98:b0:ad:3ada:c712 with SMTP id v24-20020a056a207d9800b000ad3adac712mr43735417pzj.14.1674681292502; Wed, 25 Jan 2023 13:14:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674681292; cv=none; d=google.com; s=arc-20160816; b=OkgJtgq62QcEZDKv2smdnTE22dpMsjxfd0iUgOfIWgU9L9Cv75wrQovzq9LYFWyF5d cjQv2GGhVcOyIUck0FLx8zCQPZjm1H3+fByhezri9vZDD7IIplfIAtf9MOjVdS1fc0zB kecsov6z/qDEjtK/nu6Nyum6fhRpi4iC8l9gc74nlfW+aJ7OdUuHSvnzvvafC5M8KEec lCLjGNO/HUlY4o8IUDwHp7Z4jkcvXYPNKThFrL479y0gIUzO2ipntaLh2yN9Gz2ZHFeh MsJ1cmvtfkeK6EyJwP5PvXW50RBtVu+vfklpWSbmcONwjEAjMHcuU+qkWs3bY8fgj3Bu PxCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=9RJJ/n41zzX+saTp2LNncjY8Fypt3NmL9yEutFB4n1s=; b=XBOFSDIhVCwgwwMS6s15vbO1aXYEru+6Q9uqS/BXsEAT4Gkh5sjucvQ5QAHA+ZvW6d XmYeShjBtqLmAk9bmfrWvACkq6ZHHCp/QOcB7jirN0Q+Zqc4qmZsv1aVEVqCl5oFkW6Q fITriOeR6HTP9Ci9fuF+H/M7mbfDCcvd0ocdGeAT5eBaHOjmrnsF5o3gX3qBSnnaI/Dd pmajMmg83naT4OSElvDTr4xxqaLjN2m4eZEPLf6SP+cKItlvgWq7e7F4tLm7przQLecH lP2+IyE8nsBJd0f8SPyPeHOX74VecwNv12l6nn5c/oo+ABmBT5196t3Ppxoqvl36lV3a xvuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@criticallink.com header.s=google header.b="WOHm/saI"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=criticallink.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s4-20020a63b404000000b004779bfce4ccsi6985147pgf.452.2023.01.25.13.14.39; Wed, 25 Jan 2023 13:14:52 -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=@criticallink.com header.s=google header.b="WOHm/saI"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=criticallink.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236373AbjAYVLC (ORCPT <rfc822;lekhanya01809@gmail.com> + 99 others); Wed, 25 Jan 2023 16:11:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234913AbjAYVK3 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 25 Jan 2023 16:10:29 -0500 Received: from mail-vs1-xe29.google.com (mail-vs1-xe29.google.com [IPv6:2607:f8b0:4864:20::e29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38B9A5AA63 for <linux-kernel@vger.kernel.org>; Wed, 25 Jan 2023 13:09:33 -0800 (PST) Received: by mail-vs1-xe29.google.com with SMTP id l125so6119vsc.2 for <linux-kernel@vger.kernel.org>; Wed, 25 Jan 2023 13:09:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=criticallink.com; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=9RJJ/n41zzX+saTp2LNncjY8Fypt3NmL9yEutFB4n1s=; b=WOHm/saIG3Dr4q+24Z7G6SYdxWckEwYZ2OiPVUiQlFDjk9J/GGH5G2lPCp9nPBdUM6 NKLPG74xTyEwESMRZGQkeobMfCP0xvhk5dxc/hF9opSrydqXNm+bgs4xusEtsuqt6ZTj erM0lCjFlt1FjkKoN2A0doFteQq1lyRdmHVl5KpF63lOurZ1mSrCtIHL8WCuWLQTVOdQ f57HcEWpr7rvKo71D5asNmYTOkr2yKFiuCioq2hGejao5f7Z1Lr2hfTb0FQGrA4rgB2Z r62S/gRt3R3/7qHDmBiWTdJj+fteUohtw1NfX3myqFn9sBC4hrsY1vkKe36xcZhRDijK IetA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9RJJ/n41zzX+saTp2LNncjY8Fypt3NmL9yEutFB4n1s=; b=Ew4uLz7s8e7Rs5OMXH3SU3D2SKaejE3PcMf811tupYXXrJYouhJJdREeLGn378mm3S jQ36Hewvy5uEg+eIo5K3kryaulqDa7dNCbx8FHvoxAzbcS2csqjm0VJ/23qhzqQBHeue eMFZhuUn+C9yIigM4hKhPx60dQOAuJkK/RKbOz8Q7o/zRRn7f9XluLsgQhjgiTA8KuHA OqUtIS6LF1idngyZbXh1ToxTp8/G1ZHpYO9Bv0DwIYmZa9bL4i+6kRC3O0v/seyzLB/H FL+5yvnaac0rKYXipcvd8OvLYzQcGrqoevRZTr+hCWZyFQMTi8Jq1G5YYu7e9cj08ute MAAg== X-Gm-Message-State: AO0yUKW0bqNmAfVEMijeW2L2h2ARvsFTBFFZrSa7mMHTnBc1vE3e4jMZ CdrDgvjebDPlCKQXcORBfAg27Q== X-Received: by 2002:a67:7284:0:b0:3e9:93fa:140c with SMTP id n126-20020a677284000000b003e993fa140cmr1644589vsc.9.1674680962198; Wed, 25 Jan 2023 13:09:22 -0800 (PST) Received: from [127.0.1.1] (static-72-90-70-109.syrcny.fios.verizon.net. [72.90.70.109]) by smtp.gmail.com with ESMTPSA id q196-20020a3743cd000000b0070736988c10sm4177090qka.110.2023.01.25.13.09.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 13:09:21 -0800 (PST) From: Jonathan Cormier <jcormier@criticallink.com> Date: Wed, 25 Jan 2023 16:09:12 -0500 Subject: [PATCH 4/4] DRM: BRIDGE: TFP410: If connected, use I2C for polled HPD status. MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230125-tfp410_i2c-v1-4-66a4d4e390b7@criticallink.com> References: <20230125-tfp410_i2c-v1-0-66a4d4e390b7@criticallink.com> In-Reply-To: <20230125-tfp410_i2c-v1-0-66a4d4e390b7@criticallink.com> To: Andrzej Hajda <andrzej.hajda@intel.com>, Neil Armstrong <neil.armstrong@linaro.org>, Robert Foss <robert.foss@linaro.org>, Laurent Pinchart <Laurent.pinchart@ideasonboard.com>, Jonas Karlman <jonas@kwiboo.se>, Jernej Skrabec <jernej.skrabec@gmail.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Tomi Valkeinen <tomi.valkeinen@ti.com>, Jyri Sarha <jsarha@ti.com> Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Williamson <michael.williamson@criticallink.com>, Bob Duke <bduke@criticallink.com>, Jonathan Cormier <jcormier@criticallink.com> X-Mailer: b4 0.11.3-dev-d001f X-Developer-Signature: v=1; a=openpgp-sha256; l=1533; i=jcormier@criticallink.com; h=from:subject:message-id; bh=dbb6ec7CfpiriM2pWdSl9OaXPVL9sCebyFiqEYEERQk=; b=owEBbQKS/ZANAwAKAdzX/S4LNuuqAcsmYgBj0Zp8UY3oOfu1sE+y2VZfLN0nj6Zb8gpmkZWoxYPV wM1zUW2JAjMEAAEKAB0WIQT/MozqCeZtYxNnVN/c1/0uCzbrqgUCY9GafAAKCRDc1/0uCzbrqly9EA CPJlnlwhTnKovCKXXIx14LdNjTl14R/C5jZyKgskM3kkTsxuPRLUWuniHgeDEO7fhbZx3FwtW1QUp/ Zn9RnwRza3ZKJEyHv0elltxnjisj/WTR0Z3NGL2xHIQXP8MxyGFBYtvJZoQHQ3rpmu9bOkhCIvD+fG 7MenhcEfyBVbKBnIiK7AraSXgAMBWt5lGo6o8ZBbVHBVgol/iU5lkMs4Od1hCEmfWDyiGAbvvQnCGc XSo2TauNuwCKaDxFtgPUmxx9OEN5ng5G72LWN9H3o32YN7zWBHJsArkqExSVXGMn/BlK/rsjzKIwg5 BQp91qTt4vHztKSR7ekaU6ikv8dQ8kG6f39xSrLXYOxt3IXaIauH6JtqkjeqnsaqxUDi3fR8sVjIW4 6CU4mgt8wLdSt6qR7kSYMmqg6BDRRrKjvNd5HvlG1AYTs/aIXXxos80/58TJ+n/PqtROGGKAEPDDli oYJ6lkB/1H7pHV9ZfrvCTz9Ws4egquII/R3G7FOyp+kEMFTZQy7jIPfvmXHSdIIo8XSf8fg9pOz8IG j4k9CKHz3e699zCre/Yi7JazXyKpcJ3nedEX6XbrDIgXwqx7jShjt0rl2A/sdXuOQSR7Lfg1Ckqqmd X3/+eF32C7gtCmaP6ZLHcb0F93Y//74lDL+IYvGiTXMqEz+qFfntvOV1Q+Xw== X-Developer-Key: i=jcormier@criticallink.com; a=openpgp; fpr=FF328CEA09E66D63136754DFDCD7FD2E0B36EBAA X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756030611225933221?= X-GMAIL-MSGID: =?utf-8?q?1756030611225933221?= |
Series |
DRM: BRIDGE: TFP410: Add i2c support
|
|
Commit Message
Jonathan Cormier
Jan. 25, 2023, 9:09 p.m. UTC
From: Michael Williamson <michael.williamson@criticallink.com> If the I2C bus is connected on the TFP410, then use the register status bit to determine connection state. This is needed, in particular, for polling the state when the Hot Plug detect is not connected to a controlling CPU via GPIO/IRQ lane. Signed-off-by: Michael Williamson <michael.williamson@criticallink.com> Signed-off-by: Jonathan Cormier <jcormier@criticallink.com> --- drivers/gpu/drm/bridge/ti-tfp410.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
Comments
Hi Jonathan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on 93f875a8526a291005e7f38478079526c843cbec] url: https://github.com/intel-lab-lkp/linux/commits/Jonathan-Cormier/dt-bindings-display-bridge-tfp410-Add-tfp410-i2c-example/20230128-183627 base: 93f875a8526a291005e7f38478079526c843cbec patch link: https://lore.kernel.org/r/20230125-tfp410_i2c-v1-4-66a4d4e390b7%40criticallink.com patch subject: [PATCH 4/4] DRM: BRIDGE: TFP410: If connected, use I2C for polled HPD status. config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230129/202301290252.zgcWeegX-lkp@intel.com/config) compiler: gcc-11 (Debian 11.3.0-8) 11.3.0 reproduce (this is a W=1 build): # https://github.com/intel-lab-lkp/linux/commit/c4659fa4c02b62087c095ca99978e5eac8b490de git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Jonathan-Cormier/dt-bindings-display-bridge-tfp410-Add-tfp410-i2c-example/20230128-183627 git checkout c4659fa4c02b62087c095ca99978e5eac8b490de # save the config file mkdir build_dir && cp config build_dir/.config make W=1 O=build_dir ARCH=x86_64 olddefconfig make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All warnings (new ones prefixed by >>): drivers/gpu/drm/bridge/ti-tfp410.c: In function 'tfp410_connector_detect': >> drivers/gpu/drm/bridge/ti-tfp410.c:111:13: warning: unused variable 'val' [-Wunused-variable] 111 | u32 val; | ^~~ vim +/val +111 drivers/gpu/drm/bridge/ti-tfp410.c 106 107 static enum drm_connector_status 108 tfp410_connector_detect(struct drm_connector *connector, bool force) 109 { 110 struct tfp410 *dvi = drm_connector_to_tfp410(connector); > 111 u32 val; 112 unsigned int ret; 113 114 if (dvi->i2c) { 115 ret = regmap_test_bits(dvi->regmap, TFP410_REG_CTL_2_MODE, TFP410_BIT_HTPLG); 116 if (ret < 0) 117 dev_err(dvi->dev, "%s failed to read HTPLG bit : %d\n", __func__, ret); 118 else 119 return ret ? connector_status_connected : connector_status_disconnected; 120 } 121 122 return drm_bridge_detect(dvi->next_bridge); 123 } 124
Hi Jonathan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on 93f875a8526a291005e7f38478079526c843cbec] url: https://github.com/intel-lab-lkp/linux/commits/Jonathan-Cormier/dt-bindings-display-bridge-tfp410-Add-tfp410-i2c-example/20230128-183627 base: 93f875a8526a291005e7f38478079526c843cbec patch link: https://lore.kernel.org/r/20230125-tfp410_i2c-v1-4-66a4d4e390b7%40criticallink.com patch subject: [PATCH 4/4] DRM: BRIDGE: TFP410: If connected, use I2C for polled HPD status. config: i386-randconfig-a006 (https://download.01.org/0day-ci/archive/20230129/202301290803.ouS19eab-lkp@intel.com/config) compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/c4659fa4c02b62087c095ca99978e5eac8b490de git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Jonathan-Cormier/dt-bindings-display-bridge-tfp410-Add-tfp410-i2c-example/20230128-183627 git checkout c4659fa4c02b62087c095ca99978e5eac8b490de # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/bridge/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All warnings (new ones prefixed by >>): >> drivers/gpu/drm/bridge/ti-tfp410.c:111:6: warning: unused variable 'val' [-Wunused-variable] u32 val; ^ 1 warning generated. vim +/val +111 drivers/gpu/drm/bridge/ti-tfp410.c 106 107 static enum drm_connector_status 108 tfp410_connector_detect(struct drm_connector *connector, bool force) 109 { 110 struct tfp410 *dvi = drm_connector_to_tfp410(connector); > 111 u32 val; 112 unsigned int ret; 113 114 if (dvi->i2c) { 115 ret = regmap_test_bits(dvi->regmap, TFP410_REG_CTL_2_MODE, TFP410_BIT_HTPLG); 116 if (ret < 0) 117 dev_err(dvi->dev, "%s failed to read HTPLG bit : %d\n", __func__, ret); 118 else 119 return ret ? connector_status_connected : connector_status_disconnected; 120 } 121 122 return drm_bridge_detect(dvi->next_bridge); 123 } 124
On Sat, Jan 28, 2023 at 7:47 PM kernel test robot <lkp@intel.com> wrote: > > Hi Jonathan, > > Thank you for the patch! Perhaps something to improve: Good bot. > > [auto build test WARNING on 93f875a8526a291005e7f38478079526c843cbec] > > url: https://github.com/intel-lab-lkp/linux/commits/Jonathan-Cormier/dt-bindings-display-bridge-tfp410-Add-tfp410-i2c-example/20230128-183627 > base: 93f875a8526a291005e7f38478079526c843cbec > patch link: https://lore.kernel.org/r/20230125-tfp410_i2c-v1-4-66a4d4e390b7%40criticallink.com > patch subject: [PATCH 4/4] DRM: BRIDGE: TFP410: If connected, use I2C for polled HPD status. > config: i386-randconfig-a006 (https://download.01.org/0day-ci/archive/20230129/202301290803.ouS19eab-lkp@intel.com/config) > compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://github.com/intel-lab-lkp/linux/commit/c4659fa4c02b62087c095ca99978e5eac8b490de > git remote add linux-review https://github.com/intel-lab-lkp/linux > git fetch --no-tags linux-review Jonathan-Cormier/dt-bindings-display-bridge-tfp410-Add-tfp410-i2c-example/20230128-183627 > git checkout c4659fa4c02b62087c095ca99978e5eac8b490de > # save the config file > mkdir build_dir && cp config build_dir/.config > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/bridge/ > > If you fix the issue, kindly add following tag where applicable > | Reported-by: kernel test robot <lkp@intel.com> > > All warnings (new ones prefixed by >>): > > >> drivers/gpu/drm/bridge/ti-tfp410.c:111:6: warning: unused variable 'val' [-Wunused-variable] > u32 val; > ^ > 1 warning generated. This has already been fixed in V2 of the patch series. > > > vim +/val +111 drivers/gpu/drm/bridge/ti-tfp410.c > > 106 > 107 static enum drm_connector_status > 108 tfp410_connector_detect(struct drm_connector *connector, bool force) > 109 { > 110 struct tfp410 *dvi = drm_connector_to_tfp410(connector); > > 111 u32 val; > 112 unsigned int ret; > 113 > 114 if (dvi->i2c) { > 115 ret = regmap_test_bits(dvi->regmap, TFP410_REG_CTL_2_MODE, TFP410_BIT_HTPLG); > 116 if (ret < 0) > 117 dev_err(dvi->dev, "%s failed to read HTPLG bit : %d\n", __func__, ret); > 118 else > 119 return ret ? connector_status_connected : connector_status_disconnected; > 120 } > 121 > 122 return drm_bridge_detect(dvi->next_bridge); > 123 } > 124 > > -- > 0-DAY CI Kernel Test Service > https://github.com/intel/lkp-tests
diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c index 837e1f81a0ff..ac216eaec3c8 100644 --- a/drivers/gpu/drm/bridge/ti-tfp410.c +++ b/drivers/gpu/drm/bridge/ti-tfp410.c @@ -28,6 +28,9 @@ #define TFP410_BIT_BSEL BIT(2) #define TFP410_BIT_DSEL BIT(3) +#define TFP410_REG_CTL_2_MODE 0x09 +#define TFP410_BIT_HTPLG BIT(1) + static const struct regmap_config tfp410_regmap_config = { .reg_bits = 8, .val_bits = 8, @@ -105,6 +108,16 @@ static enum drm_connector_status tfp410_connector_detect(struct drm_connector *connector, bool force) { struct tfp410 *dvi = drm_connector_to_tfp410(connector); + u32 val; + unsigned int ret; + + if (dvi->i2c) { + ret = regmap_test_bits(dvi->regmap, TFP410_REG_CTL_2_MODE, TFP410_BIT_HTPLG); + if (ret < 0) + dev_err(dvi->dev, "%s failed to read HTPLG bit : %d\n", __func__, ret); + else + return ret ? connector_status_connected : connector_status_disconnected; + } return drm_bridge_detect(dvi->next_bridge); }