From patchwork Fri Aug 23 07:34:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 172092 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp279327ily; Fri, 23 Aug 2019 00:34:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAYnUfPJb8sKPj+CeFXCDgxckNr2pyVssPWpZQbCXVVY/jxFVZ2nedLXETQn9Z4pTwuiFi X-Received: by 2002:a63:8f55:: with SMTP id r21mr2749463pgn.318.1566545697756; Fri, 23 Aug 2019 00:34:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566545697; cv=none; d=google.com; s=arc-20160816; b=vqzL1masquBH7d82hCgLKAgApB2MSkLHL7Ru0bwivR8A5MBK5bI8Lq4m40gqnuj9nS Hlu/VD0H4jLOmvLrykzWujKL5ON9J94MISAjuXqAD8qM4MQk5OhOCZRaQIi+f3ZkoYln 3/8yRpIKYGpaMr9voFQxn6rtUVa6u12q3ZbpZGOKyRmEf2+dVvwUWGVRFKQsQ4hgFyw+ u3+88wXUWRaKZFaggr9B8QnPDUu4N24E5PjAMSZZEjjODnAQ45moqGsp9qP4SFC51SwE td936Ra/CmxZRaWAvW/CEPbCHu/bW7v6aAM3z6qLHuo5JvsVCdg4oK5XzyIvu75jdfzH v73w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=aLw4CRSPJ3WKrmTX2TV02F/5DZkmqEb7ZJ94kU2yaI8=; b=Sa0i2CSTG7BHVJc6v0MXvowt/UDXSYoG+qwKbzrRi7B6ZMajMC4wKftVKewKOjfW0T Kt41STAPimqF3Bh3mjBetupyxalJ1/mYL9rbPV9dzDajqy4UQnGsWbg2HMSk/ogbA9X1 HLWq7Um3wDfbUhIbLMNwBYlJVJXsUp2G8/fsbo27N3kxtLu69pQHSHZwBE1K0U4gIjXV Fn+XB/+2vDOnc4m6Cpa0JAvZk83fgvHtrOeQKIElGlqht+BomnQprMZKpQ9nMlc58ZTb 1D5sW0dOpky2H01BrGQdT0n3q0VwuY58xzJtoXRCDoRR4ZiY94/MPqyYwmqYTA0ul2J6 g9nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mphS1O4s; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1si1600733pjn.77.2019.08.23.00.34.57; Fri, 23 Aug 2019 00:34:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mphS1O4s; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390303AbfHWHe4 (ORCPT + 16 others); Fri, 23 Aug 2019 03:34:56 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:46341 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388420AbfHWHe4 (ORCPT ); Fri, 23 Aug 2019 03:34:56 -0400 Received: by mail-lf1-f68.google.com with SMTP id n19so6402956lfe.13 for ; Fri, 23 Aug 2019 00:34:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=aLw4CRSPJ3WKrmTX2TV02F/5DZkmqEb7ZJ94kU2yaI8=; b=mphS1O4ssdOoGeOzJ5pPlICCD+JVCVu7mO1MYI2hIn4o48+vvTMUX6lt5XrggcYA32 3In3CIS0bcTGBJwH+b1sZUdhF/nQD37bGMatfAZpEdoazdQHOLooCOCJ1pWPa3JpUSFp s/s1cqjf5sVKoYN7NiOpW2LyVU6l4EtZ5sdFNNiKvnc0dy8TNTNdKsG/aH+lB5k1Jsi1 sdntV9G3GRZAv74A3j7jm4q0qvTQN+sTzDNn8VmGxd9kJmr5KxouK+7IDh1pQSWaobo8 vYI0wikqg9vW9Iv6zET6CYfA6LUFuA3q6HYz41laNEhEJRUKglRPTb7n9qTylzzu8y4k 11bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=aLw4CRSPJ3WKrmTX2TV02F/5DZkmqEb7ZJ94kU2yaI8=; b=YhaylM7kMIZvCeUDSk5szqC897LiI6AManADJ1XuT7RzD6/R5TdcXNOdNoJPhlVnXG St/dcEIw6Ko8CL8/f4eMffgiS/WF0AJzLJiLGUlK4KPlcyo7fg2+15J81w+d/nbb5Vfg M9poQ9+HunFu1xmN3pc76cYEko0NSqDQf+SKUKK8vSdQr/WMNIDA0DMxdxQQ3wbfgna8 m7385GHhEFl2Mio3L0XuWcPTT7g8BvHXYyDfy8rlkqGcOOvBOVI1DGaMBmJ4xM2MyXMk hA4ijRslFvF14VdLbG7vmbWigoagxdWLGNsDYLZmQNYaRAMM8VOMm6VHpImo4VweEhfe OK+Q== X-Gm-Message-State: APjAAAU1UTng328BJt/vcPNyDgutMI4bvK3wfOideGboOIt3tJEuF+B1 CEKgvZQ7ILGAUwJpZWmEtJdSzw== X-Received: by 2002:a19:5217:: with SMTP id m23mr1846635lfb.124.1566545694604; Fri, 23 Aug 2019 00:34:54 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id n7sm483780ljh.2.2019.08.23.00.34.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2019 00:34:53 -0700 (PDT) From: Linus Walleij To: Rob Clark , Sean Paul , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, Linus Walleij , Brian Masney Subject: [PATCH 1/6 v2] drm/msm/mdp4: Drop unused GPIO include Date: Fri, 23 Aug 2019 09:34:43 +0200 Message-Id: <20190823073448.8385-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This file is not using any symbols from so just drop this include. Cc: Rob Clark Cc: Sean Paul Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Reviewed-by: Brian Masney Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Rebased on v5.3-rc1 - Collected review tag --- drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c | 2 -- 1 file changed, 2 deletions(-) -- 2.21.0 diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c index ecef4f5b9f26..9262ed2dc8c3 100644 --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c @@ -5,8 +5,6 @@ * Author: Vinay Simha */ -#include - #include "mdp4_kms.h" struct mdp4_lvds_connector { From patchwork Fri Aug 23 07:34:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 172093 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp279349ily; Fri, 23 Aug 2019 00:34:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyvK1qaWHtbzed2HFQ5b63eN8yIRQeLdNuOwbhSc3Tp4ON4jSCRJE4kvIKkbqLZmlSBI0T1 X-Received: by 2002:a17:902:e83:: with SMTP id 3mr2164020plx.287.1566545699123; Fri, 23 Aug 2019 00:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566545699; cv=none; d=google.com; s=arc-20160816; b=iogzNKHdkVMtj0QtYLER52YXhzZ5yxG6rt/omUyDeQN9L05yWY6h9K1Pg4HFuzPdUD I90tqlwtOL+P9PhUUP+JJRNRyfwQDgzsrzwCqGrAYf9wxgjG3HKp+gvu5tSb9RysYNFj O/bAyu2vdzv5mtjnrgX+1xwlRZ4et/Q7gp4qKFtSDgMajCDwc4U0H8KkrJSgxgsXp8pf P/Md8zgqrS6iTskouSgN1jH2TdYhgSnkohC9tvAaCARqvzC7z3sO+k3A+SZ12wXyl/bH mTF/K88XkIP81xo2TaZ1sieamZXLuFDHD+1PP5gY0I5xBdIJovqrSix28k58/nI2fSni 8y8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tWhyqZI+RyxZp+FLk4Dgae8z/RXq1pkybZ7Bwrb+ZCM=; b=tvWGiY4PxroX6PbCUhhxVhO6IosMTAVvrHELW0nSczFkHmWPw4+c+LLMghkFTXTknx VNXq+tRfDY08G9lPAAa63I3DWfxB14oy7kCi1q5Rqb/4IMsgOnw9S9alNwXPz5hjYYIV v4ObmNrxyKEOHup4ewLQ+HPCBayn7ZGJMVXfHvuV9uknXbcRR1eI0zcLbYNacP/RQjGa xZ8pEgIZSC4TIWADn1IT8TaA7xYOCdH1xZ7OfNDRRX+3Bo9I2Lcct881zvda4zgOSv15 PENx/J0rYR1B8/V0qmqS98dKtV+iND4BXnEfTmx6f7gxD5P8PdzXzOcFTc+can609Jrs mh2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iZWqkN2x; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1si1600733pjn.77.2019.08.23.00.34.58; Fri, 23 Aug 2019 00:34:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iZWqkN2x; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390331AbfHWHe6 (ORCPT + 16 others); Fri, 23 Aug 2019 03:34:58 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:41511 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388420AbfHWHe6 (ORCPT ); Fri, 23 Aug 2019 03:34:58 -0400 Received: by mail-lj1-f194.google.com with SMTP id m24so7931984ljg.8 for ; Fri, 23 Aug 2019 00:34:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tWhyqZI+RyxZp+FLk4Dgae8z/RXq1pkybZ7Bwrb+ZCM=; b=iZWqkN2xUIjsY5VbuNfnpVbnLrR2fvQe/6iNNcrdauqIWg8r7Lk9WFj1khRph5byLA 6RwOND0kiZNLX9/QXicq6PnTD0NyE7i2/icCnxLNy9dEW/MBWvqtrsMUWqYAXDaau8Ee McR3meUDHDe+NB+ZypD2E0zMsvAH2BYeZRjT86W6EtOyasq0OyPz1Hzj0u8s/2flH8gb TYakAXyFno2/OQgZMgVPPaNaDw+db76oJBcTJC9J+Q5lF88aKm6W0dktNQ4AtSgeeaZH IdMwt0tQzKHa7611JHWfdn40qS8MRaCeVqMtrDxRolM1hawqxFWbc6MT7SiIp+a9Srnx 7Rzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tWhyqZI+RyxZp+FLk4Dgae8z/RXq1pkybZ7Bwrb+ZCM=; b=r5jvnQywEx6c7GyN5w3oqXTl6hABl3aCx6yirYINNFMEqIyzeltSQBs2pS9RqPD38u ibYGrN53QDGYnXgqN1Z4rYxEGtcjWh4dJ0E9h4HnjJUmz58SGkifsf+JJBo7DsNBJHMm 4zqnio8Jf0vpQHT6zw+0jFdTL3ZpCtRp8XeUH2QwHCzJM4efeKEDiGi35P5p2S/2q6zn L4PjdjHJZuUXYCSLBqTXgUQZtldGZxdkEJKnIqjHXJXnvSySS1gGOSITusHFehl6W0Gj D0ZfCnFUO+zgOzwViMY9HYrH5WcrXOef96F6YbamCQ2ICm7gnOOOzyW+EjmpmbWwcsNW dCjw== X-Gm-Message-State: APjAAAVXmex7kdNnbxDC4qIyMJpc9mpIeAIey9/iwN3pdkuFo+fiqHsE lpPXqmt1/D9FY8TSTFxFb09A+w== X-Received: by 2002:a2e:914c:: with SMTP id q12mr2052131ljg.34.1566545696789; Fri, 23 Aug 2019 00:34:56 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id n7sm483780ljh.2.2019.08.23.00.34.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2019 00:34:55 -0700 (PDT) From: Linus Walleij To: Rob Clark , Sean Paul , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, Linus Walleij , Brian Masney Subject: [PATCH 2/6 v2] drm/msm/dsi: Drop unused GPIO includes Date: Fri, 23 Aug 2019 09:34:44 +0200 Message-Id: <20190823073448.8385-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190823073448.8385-1-linus.walleij@linaro.org> References: <20190823073448.8385-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This DSI driver uses the new descriptor API so these old GPIO API includes are surplus. Cc: Rob Clark Cc: Sean Paul Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Reviewed-by: Brian Masney Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Rebased on v5.3-rc1 - Collected review tag --- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 -- 1 file changed, 2 deletions(-) -- 2.21.0 diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index aa35d18ab43c..4b6f62138390 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -6,11 +6,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include From patchwork Fri Aug 23 07:34:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 172094 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp279395ily; Fri, 23 Aug 2019 00:35:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxukDKbOwvQ7D+Ib0T7o35YUP+h1yGm8cXuJBNAHx/ah8AvIbysUHJbW9ncFug3mz0E2fG X-Received: by 2002:a17:902:b687:: with SMTP id c7mr3268197pls.128.1566545701577; Fri, 23 Aug 2019 00:35:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566545701; cv=none; d=google.com; s=arc-20160816; b=JI/TDfiVBxsV+lXaYETGnUh2zNaR2DtyMKpM7xbDDGG1kKuvQFBiDXm+dzBkRt+xfo tof6+QgBI/ANbZKiZGPxlyWVqB45vTqMRSpqKtwzofFIefV64E9hQNDoWhnroHJ93grf Mv6Wa3WBXdxZiJEfy3ql5cUxkiCWB/Ya7xRGu68v0VVnPhx+rp4ox+l9hgc51C0qMTxV fMObYt1nkwpR/xskgBfN8s1I+rO/zun+ut0s+YtpuWYe7BDldChCgZRrJn455bVOo3Pv k7yLU7bIkR4U4RiA19pTgVIflpTJzNdjPG4zsA14PVfY8T0RqsJqSRRhiesMBpV8ahuZ 7sRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+rL/k87007QFrN6e8/rQoCbxlA21xVkhbLU9RX3RGko=; b=qVEh+eh9PjVU4yMBZy56/mSO3mvH70lplDnIWcsRqw94Q2xZXJHNOcOF5Fo+IG+Tu1 Mq9S+83ozrmlcZkkaExF5jr5+hX2mSXOxOx8wJcgKzb5LfvpFUx94NHTez7RKMaYlAkq j+iJmjCvNXM/wGgBHLE04+/ZP9L7pOMqNKzSelklS90UmrJvmzBAsjWPQKOhSrdToZF0 vvYULr37QGVmF+LZw0fAr4eVQCM6IDeLPGSxYJXhRwLeJ/RSjEZ2Q72orNpK4DxcNEhq VAuOdRiAo6zJgSpdqEEuazs+oI/A93vU/Epkj7ifnc4oPPlViaJMXdrxvHaCyeVyt81C RwDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="kWDp/eQt"; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1si1600733pjn.77.2019.08.23.00.35.01; Fri, 23 Aug 2019 00:35:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="kWDp/eQt"; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390392AbfHWHfB (ORCPT + 16 others); Fri, 23 Aug 2019 03:35:01 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:45153 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388420AbfHWHfA (ORCPT ); Fri, 23 Aug 2019 03:35:00 -0400 Received: by mail-lj1-f196.google.com with SMTP id l1so7920435lji.12 for ; Fri, 23 Aug 2019 00:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+rL/k87007QFrN6e8/rQoCbxlA21xVkhbLU9RX3RGko=; b=kWDp/eQtFpkwvLB6mBWwZMB+kZWqs4saJHbExwKbSt/Iqnpg7B5CI5goPDzEnqhX17 kdOslO6f4BYjB4EkEK5l+Jl1Tk1wpgHzojh5Fxdxjrqa66AJHSVlYN/M23vcQfr3ByyY ya6SAhLe0ZU8zwqxfJW3sN/dfcgxXnFA3InNoY2r7TOKXz6u01JY/RzR5tRo9QonYwUZ 0dP/Eaij55d+j9YKiF6cZxLuyYcDpDTXHtbYUp+4iX/JDNqkrfpx5PvG/e2IQQkhVN+z BfzVleLdfYSycw7GVmo2G3XAcSEhY6AO46nKZD5ND/ITl6v9bFSA8nbS5fDDnSUoGwfM qW1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+rL/k87007QFrN6e8/rQoCbxlA21xVkhbLU9RX3RGko=; b=CutK7L7/s3f7R9lnuJDSYvmsCcnJHw2yv0ArAQ19IF9oTOtPk0GlCjBBzjaTpL99Eu hF+dcZ3V/H1wkIkk5KtuzFrZOmpVobDy5G7bJH3LbZ4LWu6kV/px7uhsfZ2r3YRbsqG6 ciI2tGk+js75Os/5yHL8GAfUARpgRNdVI6ThpmWy0EgO3+/J+543K+hncZkS0c3WMNia S7hAPnGqarUjq70TZsEP2xGHeQ3oL/nzv7IymBWHzvn2P8gnA57FpkDl5GPvLy4zp/nE clfnJPoZTX3s2b8nTgMeoBTpIgh1cjUQd7f/mOuOVZWOHHOZHcHuhOTpCW1rFj9uekwR YvZA== X-Gm-Message-State: APjAAAU6PT02QPzlcdEc4uwhYqsZW4UShQdJSjeenPSQMyPrzoFPdkKH 3baNCna/N3P1I3QbgwgXL9iRWQ== X-Received: by 2002:a2e:93cc:: with SMTP id p12mr2056927ljh.11.1566545698976; Fri, 23 Aug 2019 00:34:58 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id n7sm483780ljh.2.2019.08.23.00.34.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2019 00:34:57 -0700 (PDT) From: Linus Walleij To: Rob Clark , Sean Paul , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, Linus Walleij , Brian Masney Subject: [PATCH 3/6 v2] drm/msm/dpu: Drop unused GPIO code Date: Fri, 23 Aug 2019 09:34:45 +0200 Message-Id: <20190823073448.8385-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190823073448.8385-1-linus.walleij@linaro.org> References: <20190823073448.8385-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The DPU has some kind of idea that it wants to be able to bring up power using GPIO lines. The struct dss_gpio is however completely unused and should this be done, it should be done using the GPIO descriptor framework rather than this API which relies on the global GPIO numberspace. Delete this code before anyone hurt themselves. The inclusion of was abused to get some OF and IRQ headers implicitly included into the DPU utilities, make these includes explicit and push them down into the actual implementation. Cc: Rob Clark Cc: Sean Paul Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Reviewed-by: Brian Masney Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Rebased on v5.3-rc1 - Collected review tag --- drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.c | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.h | 9 --------- drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 4 ++++ 3 files changed, 5 insertions(+), 9 deletions(-) -- 2.21.0 diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.c index 71b6987bff1e..27fbeb504362 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.c @@ -7,6 +7,7 @@ #include #include #include +#include #include diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.h index 09083e9f06bb..e6b5c772fa3b 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.h @@ -5,7 +5,6 @@ #ifndef __DPU_IO_UTIL_H__ #define __DPU_IO_UTIL_H__ -#include #include #include @@ -14,12 +13,6 @@ #define DEV_WARN(fmt, args...) pr_warn(fmt, ##args) #define DEV_ERR(fmt, args...) pr_err(fmt, ##args) -struct dss_gpio { - unsigned int gpio; - unsigned int value; - char gpio_name[32]; -}; - enum dss_clk_type { DSS_CLK_AHB, /* no set rate. rate controlled through rpm */ DSS_CLK_PCLK, @@ -34,8 +27,6 @@ struct dss_clk { }; struct dss_module_power { - unsigned int num_gpio; - struct dss_gpio *gpio_config; unsigned int num_clk; struct dss_clk *clk_config; }; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c index 986915bbbc02..c977baddfffd 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c @@ -3,6 +3,10 @@ * Copyright (c) 2018, The Linux Foundation */ +#include +#include +#include +#include #include "dpu_kms.h" #include From patchwork Fri Aug 23 07:34:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 172095 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp279451ily; Fri, 23 Aug 2019 00:35:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKnOhdd9oC4uKcempCCdAZp0FuJ29vvE7lA4gBs8oJWIAPwjq7wqSWomY1Q2Y3nnWBgD9i X-Received: by 2002:aa7:9882:: with SMTP id r2mr3711503pfl.146.1566545704788; Fri, 23 Aug 2019 00:35:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566545704; cv=none; d=google.com; s=arc-20160816; b=0vg6Dk4QeWRXEkGgs0h8m4H1Owo6iUxELnNTi+OoDmYGwhxJKezDC1tAD8q7CbGerw ELtB0TLQGb6vOrbBFgFEInXSUngebheBcDuaOpdsvLRnoeOcDBxSPzs1lLDDqVVafUp3 qjCSeG6HQVMd3vyLGORwyaZIjdhsdbF5N0lEw+u9z6aAAVrQFyMbvXLxUDk4GS1ymGgy mAysLxJ1KFSqxxHwxUjtJASp48O70c9sbfLNaE17zgcAtMa1A8jTEHFirkHxy+SbypME bt4h1tuHV3q3VhW0Qz7C+r0hFvqtCVM2S3qMnJQUZWw/oGGGeYFNeLPgEglmBbiNZ9Sp BHjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=U4JjuaJiqXMB2o4Ei0Z8NiWiXfcICpnx2WAq5seW+dw=; b=P256ePSqPw2a0xTSt5SnuzqAQxj0QDuPs9W/ecMkZ07/d8Grpg486cpOAXrvI2BjCe ngAtesrEmSXlTxFoadf7XBYzsU3tN2dg2x/NO0KuhkEYc7LCVYWDOaoIJ/KoonG8UFKE lWMqix0SypjQzXFDNwd56sGnlDnN6uGVKCwAAJVPSktJcwyKJIlwW0lNS4dVs9g82paF K4kT8eNOPZd3A3c/pC9rK85FU/ygXl6xl6ZMVBqbbymuVZe98ECy31hcU+2eT30tZoL7 VlDDt6mNyyVEKPAUc3YHQwM2x1nrfcWA8ueAAJsuviQPDw/Aiz4VR/35XLPjKaBLmvTV ltGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=beKwdrHH; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1si1600733pjn.77.2019.08.23.00.35.04; Fri, 23 Aug 2019 00:35:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=beKwdrHH; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390471AbfHWHfE (ORCPT + 16 others); Fri, 23 Aug 2019 03:35:04 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:35003 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388420AbfHWHfD (ORCPT ); Fri, 23 Aug 2019 03:35:03 -0400 Received: by mail-lj1-f193.google.com with SMTP id l14so7974475lje.2 for ; Fri, 23 Aug 2019 00:35:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=U4JjuaJiqXMB2o4Ei0Z8NiWiXfcICpnx2WAq5seW+dw=; b=beKwdrHHjuxuM0+kjruLKtl6q5NuVehPNcKCcVIjm80K0ZHnbd4x/gqtWXZv7zRPPe Ih2kNUo2fRTf+xw1lCPan3iXcUNi0TPr6bkXJHWyKxYfep4Yw5uw6HitrSBtNL/4voHp LFG3HGCk1lDI7uU605QCiQIpAxS1kRUSkQo5RICVVSfPKa3bgJBp3DqRbxLYOK6xQ3yS WvnPnt+pZgJKHa7t+KSFPJ6FOBCCDrRIIFLmdgZPxZu2kinYsyqBxbm+omEVcgGtogHt H1QzPhjyPeDFksPwhZUu0fpAhy+OkPhcW8Ztl7OaW99MgPfFCHADyoIdDQneceDcqwCW 7a3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=U4JjuaJiqXMB2o4Ei0Z8NiWiXfcICpnx2WAq5seW+dw=; b=PAcaNzizRKhwlzk3eSewMV8oenowdFDZWFfH8ZHDK3xy7AF8EDyQfkieZFgJCDjsno HYq+1JLTAty2ius909Oks9XB8g+gOlEGh7r465rSLtahy1S4aUB4mStgX4gizY/uQRvd vGnGMNkA30w5jAGx1GAYuc0Zx6pQpSNS3mHp4mWFYW312ap1thLE0MMo4VpFpuOsRdx4 /g0eB08iHk5rt5DH/eY/aW8wy8iUiUxGheAo9L8xuAU6ykRiaNNPFy+fFvkgZUCgefjB /kMHybUo37yOoQVhel7hBoND+px9caGifn35hBZrALGYBP3HWz8dQyrsRHAgzguq2mn2 hu4A== X-Gm-Message-State: APjAAAUiba58oW1SR3+02bH2ym7Nuvhfo7/ZK5EtVkEm8mxWd/ZUMQn8 QY3oi0Eo/E+z79Uxx89+t1yJQw== X-Received: by 2002:a2e:8651:: with SMTP id i17mr2102549ljj.136.1566545700968; Fri, 23 Aug 2019 00:35:00 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id n7sm483780ljh.2.2019.08.23.00.34.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2019 00:34:59 -0700 (PDT) From: Linus Walleij To: Rob Clark , Sean Paul , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, Linus Walleij , Brian Masney Subject: [PATCH 4/6 v2] drm/msm/hdmi: Convert to use GPIO descriptors Date: Fri, 23 Aug 2019 09:34:46 +0200 Message-Id: <20190823073448.8385-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190823073448.8385-1-linus.walleij@linaro.org> References: <20190823073448.8385-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This switches the MSM HDMI code to use GPIO descriptors. Normally we would fetch the GPIOs from the device with the flags GPIOD_IN or GPIOD_OUT_[LOW|HIGH] to set up the lines immediately, but since the code seems eager to actively drive the lines high/low when turning HDMI on and off, we just fetch the GPIOs as-is and keep the code explicitly driving them. The old code would try legacy bindings (GPIOs without any "-gpios" suffix) but this has been moved to the gpiolib as a quirk by the previous patch. Cc: Rob Clark Cc: Sean Paul Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Reviewed-by: Brian Masney Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Rebased on v5.3-rc1 - Collected review tag --- drivers/gpu/drm/msm/hdmi/hdmi.c | 66 +++++++++++------------ drivers/gpu/drm/msm/hdmi/hdmi.h | 4 +- drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 42 +++++---------- 3 files changed, 45 insertions(+), 67 deletions(-) -- 2.21.0 diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index 0e4217be3f00..355afb936401 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -425,38 +425,6 @@ static const struct { { "qcom,hdmi-tx-mux-lpm", true, 1, "HDMI_MUX_LPM" }, }; -static int msm_hdmi_get_gpio(struct device_node *of_node, const char *name) -{ - int gpio; - - /* try with the gpio names as in the table (downstream bindings) */ - gpio = of_get_named_gpio(of_node, name, 0); - if (gpio < 0) { - char name2[32]; - - /* try with the gpio names as in the upstream bindings */ - snprintf(name2, sizeof(name2), "%s-gpios", name); - gpio = of_get_named_gpio(of_node, name2, 0); - if (gpio < 0) { - char name3[32]; - - /* - * try again after stripping out the "qcom,hdmi-tx" - * prefix. This is mainly to match "hpd-gpios" used - * in the upstream bindings - */ - if (sscanf(name2, "qcom,hdmi-tx-%s", name3)) - gpio = of_get_named_gpio(of_node, name3, 0); - } - - if (gpio < 0) { - DBG("failed to get gpio: %s (%d)", name, gpio); - gpio = -1; - } - } - return gpio; -} - /* * HDMI audio codec callbacks */ @@ -582,11 +550,39 @@ static int msm_hdmi_bind(struct device *dev, struct device *master, void *data) hdmi_cfg->qfprom_mmio_name = "qfprom_physical"; for (i = 0; i < HDMI_MAX_NUM_GPIO; i++) { - hdmi_cfg->gpios[i].num = msm_hdmi_get_gpio(of_node, - msm_hdmi_gpio_pdata[i].name); + const char *name = msm_hdmi_gpio_pdata[i].name; + struct gpio_desc *gpiod; + + /* + * We are fetching the GPIO lines "as is" since the connector + * code is enabling and disabling the lines. Until that point + * the power-on default value will be kept. + */ + gpiod = devm_gpiod_get_optional(dev, name, GPIOD_ASIS); + /* This will catch e.g. -PROBE_DEFER */ + if (IS_ERR(gpiod)) + return PTR_ERR(gpiod); + if (!gpiod) { + /* Try a second time, stripping down the name */ + char name3[32]; + + /* + * Try again after stripping out the "qcom,hdmi-tx" + * prefix. This is mainly to match "hpd-gpios" used + * in the upstream bindings. + */ + if (sscanf(name, "qcom,hdmi-tx-%s", name3)) + gpiod = devm_gpiod_get_optional(dev, name3, GPIOD_ASIS); + if (IS_ERR(gpiod)) + return PTR_ERR(gpiod); + if (!gpiod) + DBG("failed to get gpio: %s", name); + } + hdmi_cfg->gpios[i].gpiod = gpiod; + if (gpiod) + gpiod_set_consumer_name(gpiod, msm_hdmi_gpio_pdata[i].label); hdmi_cfg->gpios[i].output = msm_hdmi_gpio_pdata[i].output; hdmi_cfg->gpios[i].value = msm_hdmi_gpio_pdata[i].value; - hdmi_cfg->gpios[i].label = msm_hdmi_gpio_pdata[i].label; } dev->platform_data = hdmi_cfg; diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.h b/drivers/gpu/drm/msm/hdmi/hdmi.h index 982865866a29..bdac452b00fb 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.h +++ b/drivers/gpu/drm/msm/hdmi/hdmi.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include "msm_drv.h" @@ -22,10 +23,9 @@ struct hdmi_phy; struct hdmi_platform_config; struct hdmi_gpio_data { - int num; + struct gpio_desc *gpiod; bool output; int value; - const char *label; }; struct hdmi_audio { diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c index 07b4cb877d82..d0575d4f747d 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c @@ -4,7 +4,7 @@ * Author: Rob Clark */ -#include +#include #include #include "msm_kms.h" @@ -68,30 +68,21 @@ static void msm_hdmi_phy_reset(struct hdmi *hdmi) static int gpio_config(struct hdmi *hdmi, bool on) { - struct device *dev = &hdmi->pdev->dev; const struct hdmi_platform_config *config = hdmi->config; - int ret, i; + int i; if (on) { for (i = 0; i < HDMI_MAX_NUM_GPIO; i++) { struct hdmi_gpio_data gpio = config->gpios[i]; - if (gpio.num != -1) { - ret = gpio_request(gpio.num, gpio.label); - if (ret) { - DRM_DEV_ERROR(dev, - "'%s'(%d) gpio_request failed: %d\n", - gpio.label, gpio.num, ret); - goto err; - } - + if (gpio.gpiod) { if (gpio.output) { - gpio_direction_output(gpio.num, - gpio.value); + gpiod_direction_output(gpio.gpiod, + gpio.value); } else { - gpio_direction_input(gpio.num); - gpio_set_value_cansleep(gpio.num, - gpio.value); + gpiod_direction_input(gpio.gpiod); + gpiod_set_value_cansleep(gpio.gpiod, + gpio.value); } } } @@ -101,29 +92,20 @@ static int gpio_config(struct hdmi *hdmi, bool on) for (i = 0; i < HDMI_MAX_NUM_GPIO; i++) { struct hdmi_gpio_data gpio = config->gpios[i]; - if (gpio.num == -1) + if (!gpio.gpiod) continue; if (gpio.output) { int value = gpio.value ? 0 : 1; - gpio_set_value_cansleep(gpio.num, value); + gpiod_set_value_cansleep(gpio.gpiod, value); } - - gpio_free(gpio.num); }; DBG("gpio off"); } return 0; -err: - while (i--) { - if (config->gpios[i].num != -1) - gpio_free(config->gpios[i].num); - } - - return ret; } static void enable_hpd_clocks(struct hdmi *hdmi, bool enable) @@ -311,7 +293,7 @@ static enum drm_connector_status detect_gpio(struct hdmi *hdmi) const struct hdmi_platform_config *config = hdmi->config; struct hdmi_gpio_data hpd_gpio = config->gpios[HPD_GPIO_INDEX]; - return gpio_get_value(hpd_gpio.num) ? + return gpiod_get_value(hpd_gpio.gpiod) ? connector_status_connected : connector_status_disconnected; } @@ -330,7 +312,7 @@ static enum drm_connector_status hdmi_connector_detect( * some platforms may not have hpd gpio. Rely only on the status * provided by REG_HDMI_HPD_INT_STATUS in this case. */ - if (hpd_gpio.num == -1) + if (!hpd_gpio.gpiod) return detect_reg(hdmi); do { From patchwork Fri Aug 23 07:34:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 172096 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp279478ily; Fri, 23 Aug 2019 00:35:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3WVG3iScour1V5BLom0NT52encwg8v8UvtZiU39ycTIGCLsZ3AM2FO4vSpugek6a0sPnm X-Received: by 2002:aa7:8dcc:: with SMTP id j12mr3635755pfr.137.1566545706803; Fri, 23 Aug 2019 00:35:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566545706; cv=none; d=google.com; s=arc-20160816; b=DevcpL3ecwku1gLf1KkxCvakOv7F4D92vBDOMQ9AastUcd/9i+Z8HQg+Q9FOJFVGQW wjpbdvcFEcO21WO+WzFnBNUW0BzhBI26+3BoKba5JbHz9dObC8LYXrYHDJG3a4tNHZXR nSVCsdE66TUVTdS4vX6IwvQIJMgmgkGE92W228LbrmkOraicYXONOuqmlNB7Gi4G1qFF PKkz5dBEbBhmL7KzRAm6jCMmyiHv9xb5A0SivTx3R7KxqWPpQvkRsJudikE+zS9lqxOW VfMQVQSzLvZrFpBCpAgWCb1K5dQv1yG/x60U5cgy1r9XlBydCyKTIu6cEV2qxXERHTEz fjgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rZiXvXuEAB80JH4Izjr6bAOct54iEzBQ2GtzAaQY3rk=; b=JJ72Ueyuv/pTsBVs4ohUR11zCITkqv8OQJvi283PMLKCLaHA/5TcZ6mWzbJVDGBdpt n4DRxu/QtHrdIkqGBWmrectCtTpSVIJ5Q4osFf1eFD/dD+tX7HeCKjTDIImaoR2xXdk4 6JZjMej4SB5UhVDl/Q3XtiDgGVVCaPnpGmAa6/t7QPGHOxV5ha8BXYJrfVbICAjc2+xy fUzEXRyr3vcJnxF2f7B0XjsNbw7VjqAv/kwEcBLLfYH7XQ3RQ3rocbb6hOv20e6VXBZh Wzq4ypNd8XRrsiZXv9Erf/ODCc4SMDlHz2SDcgDZOiH6gAoyM1WMHZ5ed2dga7qAaW31 EyFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fhuZt4Uc; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1si1600733pjn.77.2019.08.23.00.35.06; Fri, 23 Aug 2019 00:35:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fhuZt4Uc; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388420AbfHWHfG (ORCPT + 16 others); Fri, 23 Aug 2019 03:35:06 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:33728 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389265AbfHWHfG (ORCPT ); Fri, 23 Aug 2019 03:35:06 -0400 Received: by mail-lj1-f194.google.com with SMTP id z17so7988355ljz.0 for ; Fri, 23 Aug 2019 00:35:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rZiXvXuEAB80JH4Izjr6bAOct54iEzBQ2GtzAaQY3rk=; b=fhuZt4UcPw1bSfjxRqNz+x/5kXt33QMeN67+VvZhvbEOmTSj1Faeyii4zpBlIx/md9 4L90S3OBpsHUIUNG9LSJBM3fblGBV7uBek3dfGMIliNHM/XhtxwY4AqBYwHPTpt9usvm SncGQV2uykuVT03rhAhf8/B1k2Cs6Nge2fe1y1nQleSrxGYuC15a1cx33H7egG2Q1jfh e7hjwSwNZCJvcHJurOOQ92cC+WdTdDS0sx74wzf0KLsmkMBe4Qg3+n0R311jRcdj62ft aD6+jr6mc2uvK87tmDE5tJ+/GScdSTn4cAgL+S3PPol/ThWHRH5IWlzWkDC+IRXTUPrL H6jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rZiXvXuEAB80JH4Izjr6bAOct54iEzBQ2GtzAaQY3rk=; b=KwCVjJ1q2mi+iqElVgJPLXNIkw/86ML9hllKj6+5DVj91gaIgVac7pUAMeo3Ra+NRr 2nqr9zzqITfLUCp7zDc9+oVXxOdHNmW+QROOJo0FV/IcbnUMgIyBy9pdrBPl6L/IoFr9 rHKyshRucWMPMfP5oUdlJwYq3CDE5sz63Ic5OABL4nVBKyGycp1T76PVRU7EwngKw7+a 5KIfpfFUw9qCx1VSdOWuOVyu8dkTXBRaSaYkgpQPZGybv18hFeiCakZ6y8hzEoVifNSH xskV2fg943DCerox7M9TnFx9SWOUGfSeiXlRTP/1EH+BBYSBzEN3NgE6MUZLgUG8rxJT DZyw== X-Gm-Message-State: APjAAAXgA56xIENBu8Nl7qj2rK38T6PpFpjdy5ySAL46Whs0ONfEwqaD 3FTapv/ZyviqCkwcXwNzv3cY1g== X-Received: by 2002:a2e:8559:: with SMTP id u25mr1987921ljj.224.1566545703187; Fri, 23 Aug 2019 00:35:03 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id n7sm483780ljh.2.2019.08.23.00.35.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2019 00:35:02 -0700 (PDT) From: Linus Walleij To: Rob Clark , Sean Paul , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, Linus Walleij , Brian Masney Subject: [PATCH 5/6 v2] drm/msm/hdmi: Bring up HDMI connector OFF Date: Fri, 23 Aug 2019 09:34:47 +0200 Message-Id: <20190823073448.8385-5-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190823073448.8385-1-linus.walleij@linaro.org> References: <20190823073448.8385-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org There is elaborate code in the HDMI connector handling to leave the connector in the state it was at power-on and only touch the GPIOs when the connector .enable() and .disable() callbacks are called. I don't think this is what we normally want, initialize the connector as OFF (possibly saving power?) using the appropriate GPIO descriptor flags. It will still be switched on/off in the enable()/disable() connector callback as before, but we can drop some strange surplus code. Cc: Rob Clark Cc: Sean Paul Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Reviewed-by: Brian Masney Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Rebased on v5.3-rc1 - Collected review tag --- drivers/gpu/drm/msm/hdmi/hdmi.c | 19 ++++++++++++----- drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 25 ++++++----------------- 2 files changed, 20 insertions(+), 24 deletions(-) -- 2.21.0 diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index 355afb936401..5739eec65659 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -552,13 +552,22 @@ static int msm_hdmi_bind(struct device *dev, struct device *master, void *data) for (i = 0; i < HDMI_MAX_NUM_GPIO; i++) { const char *name = msm_hdmi_gpio_pdata[i].name; struct gpio_desc *gpiod; + enum gpiod_flags flags; /* - * We are fetching the GPIO lines "as is" since the connector - * code is enabling and disabling the lines. Until that point - * the power-on default value will be kept. + * Notice the inverse set up here: we initialize the connector + * to OFF state. */ - gpiod = devm_gpiod_get_optional(dev, name, GPIOD_ASIS); + if (msm_hdmi_gpio_pdata[i].output) { + if (msm_hdmi_gpio_pdata[i].value) + flags = GPIOD_OUT_LOW; + else + flags = GPIOD_OUT_HIGH; + } else { + flags = GPIOD_IN; + } + + gpiod = devm_gpiod_get_optional(dev, name, flags); /* This will catch e.g. -PROBE_DEFER */ if (IS_ERR(gpiod)) return PTR_ERR(gpiod); @@ -572,7 +581,7 @@ static int msm_hdmi_bind(struct device *dev, struct device *master, void *data) * in the upstream bindings. */ if (sscanf(name, "qcom,hdmi-tx-%s", name3)) - gpiod = devm_gpiod_get_optional(dev, name3, GPIOD_ASIS); + gpiod = devm_gpiod_get_optional(dev, name3, flags); if (IS_ERR(gpiod)) return PTR_ERR(gpiod); if (!gpiod) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c index d0575d4f747d..f006682935e9 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c @@ -75,16 +75,9 @@ static int gpio_config(struct hdmi *hdmi, bool on) for (i = 0; i < HDMI_MAX_NUM_GPIO; i++) { struct hdmi_gpio_data gpio = config->gpios[i]; - if (gpio.gpiod) { - if (gpio.output) { - gpiod_direction_output(gpio.gpiod, - gpio.value); - } else { - gpiod_direction_input(gpio.gpiod); - gpiod_set_value_cansleep(gpio.gpiod, - gpio.value); - } - } + /* The value indicates the value for turning things on */ + if (gpio.gpiod) + gpiod_set_value_cansleep(gpio.gpiod, gpio.value); } DBG("gpio on"); @@ -92,16 +85,10 @@ static int gpio_config(struct hdmi *hdmi, bool on) for (i = 0; i < HDMI_MAX_NUM_GPIO; i++) { struct hdmi_gpio_data gpio = config->gpios[i]; - if (!gpio.gpiod) - continue; - - if (gpio.output) { - int value = gpio.value ? 0 : 1; - - gpiod_set_value_cansleep(gpio.gpiod, value); - } + /* The inverse value turns stuff off */ + if (gpio.gpiod && gpio.output) + gpiod_set_value_cansleep(gpio.gpiod, !gpio.value); }; - DBG("gpio off"); } From patchwork Fri Aug 23 07:34:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 172097 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp279505ily; Fri, 23 Aug 2019 00:35:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/N8Y01Ga1atHK8t6F9MvfYaRi5KwN+ZEc9GoaWao8TEpPy+CszXi3v57FOMTq0kv20RIt X-Received: by 2002:a17:90a:23d0:: with SMTP id g74mr3866064pje.115.1566545708298; Fri, 23 Aug 2019 00:35:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566545708; cv=none; d=google.com; s=arc-20160816; b=pgRaz+dso9tp6bdgEL9hBvuWhXfo+bRVWV4eqCiZX3AMhC7mKMX7OMeSnxZ2Bs5mfC ngf5e81Gt136pgiGviRzfc7WboGPFu2Bnn4aoHE/1hXQ0yytUy8v4I/GxfyYR1W0TQy8 4+AWh+uQGuzQf3VFLC5lt5kpy1vJPyWyb8gLH2twrha+2w54ncRt31+eU1PoscXmz8Np sAYW7jpsJ5oWf8lFd8pJTNmt9TMF3un4EpmW4ksxk6uIMNPRHi19pUjs5yeapPhht/jV e9UmortBhp/QnbUa9iHFM0MBVefhSDPPQD0CORtIiB6Ig8+7R6M+/VzpylwXuGtxnguM /c7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uviA742n/WPhqJ2p0ywgQN7PPZdj9n55wlPOzt1ahOA=; b=amFJ8MK5zGbuQCOfLSpT69ofYvcxjeb3e4pLB6zyrMbzd1St+NI7O4b7FnvxqN3Yy8 GGe5kFeN7OBkTtZ8eY65YTEyp3yQFD1U2r+C7n0FeLDFPWi2dqxh7pBnABOfOluzM9up Ing+MxzQ2/E+/1YjZQne2BCRWzNqc4PXLVHAr/9uZQo/Aw5B4FhkFb/VNjQMaVbJejAM kFqfdur7epzOGzwMWVe5mitD3ZNtAHxoUOtSzeDTaE7OlYt4OS/pSmNl0Z/cQb1z5SwO cslDXxC+N0vG1l9j1BG9SdewIeY8H94Gc/uScjbUBr5bmZ34VhpMN1dBcT5dS0g+DXli 1R3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vGNGwRJ1; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1si1600733pjn.77.2019.08.23.00.35.08; Fri, 23 Aug 2019 00:35:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vGNGwRJ1; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389265AbfHWHfH (ORCPT + 16 others); Fri, 23 Aug 2019 03:35:07 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:46469 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390510AbfHWHfH (ORCPT ); Fri, 23 Aug 2019 03:35:07 -0400 Received: by mail-lj1-f194.google.com with SMTP id f9so7905441ljc.13 for ; Fri, 23 Aug 2019 00:35:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uviA742n/WPhqJ2p0ywgQN7PPZdj9n55wlPOzt1ahOA=; b=vGNGwRJ14+9wFedjL20SfmCe4wJvbQoWtTcO0L60xQzXzjgz6N/j8BHqmm7yFoiQbA h7Hk6VMXUYx+uzZzlu2ZJcg/0GLqKJ2V/hX9O5aazLv4Z6GJjhnBWTXscRFAnQwYmWfH DWQ0+vRsCvg9h+5GZ/a7tHNR4k/U1cRuG9aAGSHcsqdVD6T2o5JGrkQKgMLPT+Va8bl2 /qEXDHuFBYDNizFUWJBo1tYImdjPurPttnpbGJGgSXUWMROn/mfZmYXhxRYE2Q2jg0rA OO1dsFj8upDGOig99MjUcfwhYvKn4DM26rRHM1tI7M5ZFUMaDNJb3bF3retesGRRtZGN fqsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uviA742n/WPhqJ2p0ywgQN7PPZdj9n55wlPOzt1ahOA=; b=p1QO2+MDiWWfRfkhTxXFKO0ERFDolMSpwWxautQzfvAHvSVoGmFvuP58fqLznEcUhO JxylvQ3pDEjfg6LJwrQ49TNxf7EyHwGgOS3KEMwBEcewvWX/NZfXVc/gfqkS4rOp7XqP 9HL5ArXOtDAsNMuSU3B90FZl1Pp3cg/TwsQIbfoTPvC9wcFJUMM+YtmGsuY1a4YloJrI oBDou4m72iQprBRvRsaZmiSTBe1jI3FueBV1NG5Twl1TknssZV2PEHejB4RNZqVScAYX ZS9dNz9iOldk8rf0PWKq26p3SUYvNje+D9SVZJKM8xdq1YvZDT6SbMu3ahILXMT251AD BPog== X-Gm-Message-State: APjAAAUT/YF6bIk/vZohEVkPN0YLdM7QuFLAYqLrAl9YCjB2pqfL9XbR 6aSrUS0pYmYdLWjzd6o7zynKmA== X-Received: by 2002:a2e:9252:: with SMTP id v18mr1988085ljg.93.1566545705417; Fri, 23 Aug 2019 00:35:05 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id n7sm483780ljh.2.2019.08.23.00.35.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2019 00:35:04 -0700 (PDT) From: Linus Walleij To: Rob Clark , Sean Paul , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, Linus Walleij , Brian Masney Subject: [PATCH 6/6 v2] drm/msm/hdmi: Do not initialize HPD line value Date: Fri, 23 Aug 2019 09:34:48 +0200 Message-Id: <20190823073448.8385-6-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190823073448.8385-1-linus.walleij@linaro.org> References: <20190823073448.8385-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org After untangling the MSM HDMI GPIO code we see that the code is deliberately setting the output value of the HPD (hot plug detect) line to high, even though it is being used as input which is of course the only viable use of a HPD pin. This seems dubious: GPIO lines set up as input will have high impedance (tristate) and the typical electronic construction involves this line being used with a pull-down resistor around 10KOhm to keep it low (this is sometimes part of a levelshifter component) and then an inserted connector will pull it up to VDD and this asserts the HPD signal, as can be seen from the code reading the HPD GPIO. Stop try driving a value to the HPD input GPIO. Cc: Rob Clark Cc: Sean Paul Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Reviewed-by: Brian Masney Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Rebased on v5.3-rc1 - Collected review tag --- drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.21.0 diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c index f006682935e9..bb1c49e3c9dd 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c @@ -76,7 +76,7 @@ static int gpio_config(struct hdmi *hdmi, bool on) struct hdmi_gpio_data gpio = config->gpios[i]; /* The value indicates the value for turning things on */ - if (gpio.gpiod) + if (gpio.gpiod && gpio.output) gpiod_set_value_cansleep(gpio.gpiod, gpio.value); }