From patchwork Sat Jun 29 12:59:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 11024001 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 614C51398 for ; Sat, 29 Jun 2019 13:02:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 52C6A2838F for ; Sat, 29 Jun 2019 13:02:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46E26287CE; Sat, 29 Jun 2019 13:02:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D23262838F for ; Sat, 29 Jun 2019 13:02:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=6m7M4azQsynmK+y5bkBSUUJQbsR4eVcY5//ZiVOk97s=; b=bk2bmTwzTbxdHW PnQHkn09woZvVXaCu11TZ/KMEmezhcOQwuFZPa8i8Hb/qPc53pheqIwIwZyV8gq6CukxhFMnO0NqS YZHAR12gdUsU5rk94QXuQ1ynvVSeY+QetE5skGCZDRGakuosKSQyG9SN376MQmeCsqXkS7sP48ACL lkTm1g81damSQeH1KnbIdxflCnKtAMqibdd+jJIeEFRlgwKQGVUlAdgxE4yJgMJYw4vGIss5CJpkJ bky+a8NEuXts5TSBCht9NvauFZqvP5HjQwMJ2RHZqc45AJcOo0o93pBsTUL8pyxMbWtHg1ossaqxJ yQF7ZUUqgdZKbD/TlWeA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hhCze-0004to-4g; Sat, 29 Jun 2019 13:02:14 +0000 Received: from mail-lf1-x142.google.com ([2a00:1450:4864:20::142]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hhCzL-0004gR-Km for linux-arm-kernel@lists.infradead.org; Sat, 29 Jun 2019 13:01:59 +0000 Received: by mail-lf1-x142.google.com with SMTP id x144so5755902lfa.9 for ; Sat, 29 Jun 2019 06:01:54 -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=DbpuIcCBG2OY5e1NmpBE7wz6kAerHOIPdrXSJOYlBOk=; b=efVnvG6gsnh3l0XcsGPL7A1HnlxKgumwKIBMGtiqOMwHhdusEpWZaOWf+MqEF7BL5W WqbtG12LDpX6unXqMqDWTdVfM4zRrQmh4gqLzTx89lJEYR79woEb8W89uVlvW7MlFHEL Zp08PLKv6Na6vEgUdeNTUl5SJw8p7T4ZPUq94KcIME4V87xJpVQbKIHwoCK6jGRKWDu3 Ngbb1bNlSk8+QAUVLVkhjTR0J8X3cz7gs99b/MC0wyJ4D28Wm9EDPnT2vEzHjH3XqEc/ mhWNLYEUuhbeHtzFK/maFVDyz7mEP4hs1UZ+jfHb6VE7oiGbwu1a/LhUoF08NL8U/zFo qWJA== 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=DbpuIcCBG2OY5e1NmpBE7wz6kAerHOIPdrXSJOYlBOk=; b=X3ABOZFXMZ894gjKWOlRzcKxzjd8HGzU1z2HSduGFPakwXWQlKAQ/Eo7ZjRXGu/ebC uo2SnecgqXszLvb4aYLvOLTKa28uHMs6BtDUaEKpjOu7WX0motFH7GVTUcsJUky6md+q T+4Wqbtmb5wSvAUFwnYzR4v3FIJ+iUTNwtwbzbwp1tzVfRmeA4T0Q3KRFHU72dGR0BE+ Qi8WZ2nTqoY0lcI18nBwJW9YoywcefDjACnLLaJz1utLoCQUavU4pYMa7uJA8wQUQdpV 9x2g1JTM7UXvO1/7bhFhyazyYrKqukB620EoL2K5/X/3IcadwStVWT03v71OSJ5lx9ZA bXnw== X-Gm-Message-State: APjAAAVzAu4ZyD/z3FQpFRFO+0CR8n2U4PeoVeKMQQpCdVGs3NwBdtJZ wvWWEGej+luCuhM+iOLE6LKJlA== X-Google-Smtp-Source: APXvYqwOS0pDKXe1RTOO0fPQa8iQngPginDmqxsbSy4gahwb7Y9qnEGHUp2+11mR/5U04XqewQh3gw== X-Received: by 2002:ac2:5636:: with SMTP id b22mr4172787lff.2.1561813313145; Sat, 29 Jun 2019 06:01:53 -0700 (PDT) Received: from localhost.localdomain (c-22cd225c.014-348-6c756e10.bbcust.telenor.se. [92.34.205.34]) by smtp.gmail.com with ESMTPSA id v2sm1354500lfi.52.2019.06.29.06.01.51 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 29 Jun 2019 06:01:51 -0700 (PDT) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , Sean Paul Subject: [PATCH 1/7] drm/msm/mdp4: Drop unused GPIO include Date: Sat, 29 Jun 2019 14:59:27 +0200 Message-Id: <20190629125933.679-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190629_060155_690162_76AD7536 X-CRM114-Status: UNSURE ( 8.86 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, Linus Walleij , freedreno@lists.freedesktop.org, Rob Clark , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Linus Walleij Reviewed-by: Brian Masney --- drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c | 2 -- 1 file changed, 2 deletions(-) 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 5368e621999c..753579914d0c 100644 --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c @@ -16,8 +16,6 @@ * this program. If not, see . */ -#include - #include "mdp4_kms.h" struct mdp4_lvds_connector { From patchwork Sat Jun 29 12:59:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 11023991 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F319C174A for ; Sat, 29 Jun 2019 13:02:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E36142838F for ; Sat, 29 Jun 2019 13:02:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D7344287CE; Sat, 29 Jun 2019 13:02:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8A37D287CD for ; Sat, 29 Jun 2019 13:02:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2/SFEevH1LrryxKqS0X2wJRJo0UU34YSZ7K0nHWWJr8=; b=QuYkHLnDfnD+Jl W7M6jBJRzymioe1p+NUsGJ7cq91uPlpfWfMjlaXsnT1YOca3wN77PIosNFAI0M7h8Gc4AO6ArVZQI EtR718lRWvMC8DOmaSZVDA2sea9xMFaMTtwFm2ngNo2mdIJBxF39FYcJZd3XzO6EvVMDfL8SBfaXC F8cCackNqgNQX09tQLUVXGc/0xqrv03ITTfeuaUO1zNUyO5g6YFA+W3nKJ++C40AI1AREN2E4+RIj l+yQgBgvEtnFrAuWAsDVkFN9hs5BvmmdySwHenXenzT4+tFnJX5EmmRG84/UwE073lU3hvu4nkEDx QfUgCGNrV2ORw1fk3qHg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hhCzR-0004hk-QO; Sat, 29 Jun 2019 13:02:01 +0000 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hhCzN-0004gv-Rb for linux-arm-kernel@lists.infradead.org; Sat, 29 Jun 2019 13:01:59 +0000 Received: by mail-lf1-x144.google.com with SMTP id a25so5773698lfg.2 for ; Sat, 29 Jun 2019 06:01: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=AJIo1pqQ+aFujHuHdql1oLAKsZ6dcOAKCD+S+KrStQg=; b=zQR54iAbGadX7yH6kb/W+A9Ev+FFwoc/g484x0VCE13ChTt4OVnLxuK03gAMFIhnUl a2s9RA8N93ziUXqxC4ZQbtiqRFq5+YrhUohrwTtL4UjNSSpUwjpJVTsnP5ztF+7mGcoD MaLZSwY/+wrc+Mrx1HIJcScmiCGvWqe6rIh6byJLfnq4HXzuuJHQwbH2tIrOgDiQcz99 WHgvK5QzlgPMcFkkbQyB3iRjkDA2stc0/LSp4lugHsNtNHuQ4txm7SxP3GBg7pAGpzfw p4YL7ENLxHbwJB3rq3EQNAMUYHxs7zQQYNqFGvNcxySTPkzYoXSaECdplNiqhLg377rK dzeg== 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=AJIo1pqQ+aFujHuHdql1oLAKsZ6dcOAKCD+S+KrStQg=; b=LcvhTJEnJ1fMHaUCqfr/zfs59b7TmOqM3AHyhFaxotUe7Jt0DrGUgl3D0GA2rK00vU C+BltRdyXawirKtRUXXgT4iNXHJHyNmYpzda0bFhAkfIRq5wD8BH/qUq681d1Bn5gHVv qOzbwnfH1GC4yZtBuR6tjLmamAlMzGiMgcR/bpdzMebDF0gIKoYzqQbeYrBs2+n2fuWv F5nmfYJ/4nc6CSnquAFUtnxp5g23frXZo7Gb0Kd12JwQCkSOBrV4KkVtzoTvMxvjVyG1 0f/zVwJ/sLULY9sfQNDCl9acpNHzDqSVO75EyCgUO61JjistTptLEryk2+EHjdyQEGQZ 3Eng== X-Gm-Message-State: APjAAAUF2sXwj/BZbNJ9LsmiKO5XPBypECwbEA6l8Dch8RdrzXYCR326 +4MHw0+ujsaPcKO8abm55qNi/g== X-Google-Smtp-Source: APXvYqxvXt6L2Ml1QCW1/zH7Sv4F1tQcoxTHgqupuETmPxNbTlWyt0OHygO+Xy9Hh1ch7/orM4lZPw== X-Received: by 2002:ac2:4c29:: with SMTP id u9mr7457510lfq.100.1561813316205; Sat, 29 Jun 2019 06:01:56 -0700 (PDT) Received: from localhost.localdomain (c-22cd225c.014-348-6c756e10.bbcust.telenor.se. [92.34.205.34]) by smtp.gmail.com with ESMTPSA id v2sm1354500lfi.52.2019.06.29.06.01.54 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 29 Jun 2019 06:01:55 -0700 (PDT) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , Sean Paul Subject: [PATCH 2/7] drm/msm/dsi: Drop unused GPIO includes Date: Sat, 29 Jun 2019 14:59:28 +0200 Message-Id: <20190629125933.679-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190629125933.679-1-linus.walleij@linaro.org> References: <20190629125933.679-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190629_060157_890279_B1A7D9B9 X-CRM114-Status: GOOD ( 10.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, Linus Walleij , freedreno@lists.freedesktop.org, Rob Clark , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Linus Walleij --- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 610183db1daf..d44bad13cbaf 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -14,11 +14,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include From patchwork Sat Jun 29 12:59:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 11023999 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C2B661398 for ; Sat, 29 Jun 2019 13:02:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B32522838F for ; Sat, 29 Jun 2019 13:02:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6F6B287CE; Sat, 29 Jun 2019 13:02:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4FE072838F for ; Sat, 29 Jun 2019 13:02:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9vXConflJKt262yE99H1njpt9cTet5mxIrw/SQmeBZw=; b=CNoqkHoNnZSbHU Diz4crBYvhh/TedjJMGlNoowgco6uBhGV0EXsujAlWsSAWPCCaw/F+qrq4j7zFC+gebspqEQzGQnI XNIzZ6oTuzFG7xok/Q2OBMuQnXjpLQxoABXxaubwnDY5/BtjErz/4tarLSJEnQi+B/bCgKTvaqcif kv2StguNPomDyVDiKorx0slb4DlHLzOugS0RTkj9ZyC/n5ptQ3F0V0uwn2UEYw3j515FGVlgoAqm5 DHs6FYee84lqsOjSAj6uPq1l3E8hDGoqJ+TftUFBEHPeJQldL/1PzW9SBtAUQbArycXg4AgbgaJN+ U1v9/NX3ck/imL3TECNg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hhCzs-00056n-JS; Sat, 29 Jun 2019 13:02:28 +0000 Received: from mail-lf1-x143.google.com ([2a00:1450:4864:20::143]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hhCzQ-0004hi-LF for linux-arm-kernel@lists.infradead.org; Sat, 29 Jun 2019 13:02:02 +0000 Received: by mail-lf1-x143.google.com with SMTP id y17so5790547lfe.0 for ; Sat, 29 Jun 2019 06:02:00 -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=Ji8jAojLPl8vD+gcsy1dZ2LAcjvPmFSVJ5glNsjtSak=; b=nAjmGaNaoXOfVZnFCs0LUWx0cgkIpWqrZKexDYARBy6576kyG3UYP+U3tLv6Z7mbun 3mza7Rr4HNinHrz/Z+ZS8QeQeD2ig1Wuy5eIgVPImRlRcCxR6UE3d6lvjrMrektszXS+ 0CG3ahmSPlVFxu3mFx0uVQqdq4jNPLcFg8BC+yVu43Um7D3UMfNOpakEUcEVn6MuC8Ry X4Gx9ihORnId7aLMGMVG+MYoXUZ7qMgU1CSiYsMEXSOfdUiBe/5UWIg8MwtVDMvToc9k 2kG/2Li5Bv+dVCPKpJYsQ5s5V65k/L9JNU0oyZMgdR84ds/6gyw5txkGZP6EpXJbSn72 8DlA== 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=Ji8jAojLPl8vD+gcsy1dZ2LAcjvPmFSVJ5glNsjtSak=; b=rL08BhgqVK+LpfI2iKbjPSz+UHvrwJyW+5A1Q/Ew32oFThj62ImGpvKBQALs1+ZBOA rU0HKSINP22W+8RZu2JMOBNirtV/heqhRUbkkr0leJSbdkQ5gR8eSrU92J175I683MfH 33MD+usWluTGivn4WENJcZ4M1Cr2Dkh9FvLr8bkt61wTPClmk4GTzS4jvFKHUll7/oif OhH2o/G11cRDYKFpTJZIRMVWLyhzh2w9z/YPj67WiHR2R7q8Dnmi8dztimPTgYG2KzpD K+IcZFHCm3scyNWNiC6fWXlmmX2r4rbs9N7Yq63voVIrTD0qktogn5Hqh9HzcB7Ch1VB nMNQ== X-Gm-Message-State: APjAAAXb9YNRODbnefWwopKz+YtbOrlp0ol7NuEsHCUvuL8QvHcpN4L1 Hb2Y9jA+OW6XQOcPszGYgw6l2Q== X-Google-Smtp-Source: APXvYqw4JVg2KbWLoxvVW9U6jPqYrcYh2H4AXq4ph9NDkiYzD2Bg7mSbg0zvS+exFIzcUH3D8CLeKg== X-Received: by 2002:a19:f601:: with SMTP id x1mr7523920lfe.182.1561813318996; Sat, 29 Jun 2019 06:01:58 -0700 (PDT) Received: from localhost.localdomain (c-22cd225c.014-348-6c756e10.bbcust.telenor.se. [92.34.205.34]) by smtp.gmail.com with ESMTPSA id v2sm1354500lfi.52.2019.06.29.06.01.57 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 29 Jun 2019 06:01:57 -0700 (PDT) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , Sean Paul Subject: [PATCH 3/7] drm/msm/dpu: Drop unused GPIO code Date: Sat, 29 Jun 2019 14:59:29 +0200 Message-Id: <20190629125933.679-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190629125933.679-1-linus.walleij@linaro.org> References: <20190629125933.679-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190629_060200_709027_A557B236 X-CRM114-Status: GOOD ( 13.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, Linus Walleij , freedreno@lists.freedesktop.org, Rob Clark , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Linus Walleij --- 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(-) 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 78833c2c27f8..78f04147839f 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.c @@ -15,6 +15,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 bc07381d7429..a0498c7bd677 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.h @@ -13,7 +13,6 @@ #ifndef __DPU_IO_UTIL_H__ #define __DPU_IO_UTIL_H__ -#include #include #include @@ -22,12 +21,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, @@ -42,8 +35,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 7316b4ab1b85..9baabadc62bb 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" #define to_dpu_mdss(x) container_of(x, struct dpu_mdss, base) From patchwork Sat Jun 29 12:59:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 11024003 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 48A7B13BD for ; Sat, 29 Jun 2019 13:02:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35B962838F for ; Sat, 29 Jun 2019 13:02:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 26AE0287CE; Sat, 29 Jun 2019 13:02:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AD1E72838F for ; Sat, 29 Jun 2019 13:02:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XsP6SP6JBgB3XuBirm7Z8wqN5+jJhTIgRc5aT6GOy58=; b=UHW1ay0JOd+j9J phUS9GCa/xFH4SDoBvDWoCFxzo7rZb6WIldCclEw2B4japvjTCSp+LbykTMEnxDtiiGTKyL1Ryh70 UXq4hFavxYiVjAOvK3rpiT8NEvuiJEwyq9jwRRu+o+HUbaXc58vONYRypmyLNmPJUnoML1LI0/FeY 5aGlLCJlHhUD887QKR9k3kAKAgqkKgSriABZcdTWi3YBDR59JjMG1+x+WQeEkZirmQ3AiVES84wkT ljqGY/bSXWj9/AUy78h6dskBSETIO+XRdMGyyzqYAY5jlSn5XBPbDLpa2QCxgx8wKdvhYY1IiO3v5 WCDltfBd9E6HLyh1fnjA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hhD07-0005KK-R8; Sat, 29 Jun 2019 13:02:43 +0000 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hhCzT-0004j5-7u for linux-arm-kernel@lists.infradead.org; Sat, 29 Jun 2019 13:02:04 +0000 Received: by mail-lj1-x241.google.com with SMTP id t28so8594409lje.9 for ; Sat, 29 Jun 2019 06:02:02 -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=lniFIm91gCkBVo8OT7Qc6rB8XEZiKvYZhCGqRwQxgRg=; b=R/OUJdhNfZGHaJoOsvmC50TZU4KNiySqOFuqTZkhUMlRuF2aiKO7gw52YdVXItSgcn yULpt7pmN8Q0FFQWwWXuiz9aPOeB3pvaPkb6xxb4hn467Tb4aGWSL9SCavDLu8IkKmmy qrTeh6vZQGGT0xcFf5zz72dp/fegF92Xn8K1lsaMp74Y52ZV+yXlor4P8xA3LvmbAVRg tyhC8dkj7Wq74VCB6f5GSAxCnIBTYFRJrgHvcNYjkbMf39LLwokl+2KRAWR7rROFUhJW 510SqwEGSIvRO7vwvVY/+PCm/RmKugHh6Jbbn1ODQskyPdvHfCTEPIlI0+NbNPr/JqAa NqSA== 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=lniFIm91gCkBVo8OT7Qc6rB8XEZiKvYZhCGqRwQxgRg=; b=toKn69zUT1X/OhcFG8hpmLrxXEdrknq4AhS1pVwwO99x/EbTLvVi2hY6lKMakxUIaf JNHW1yiKrV7mZRXh1DGE999WWmsasVVOty41TY9CPLFpCHm5oKrgoiM3kG80k0/yU9Qw k8TMp/KCUUnfDXrc5SGzysjL4FKXdt6qlPviFsfbSi2QVLgigC/DNzlS6A/9NP5PmYWV 0XCKuwBllP2cdGzTeZa75aywxgHc6QeNCuWeGp8oKx7sEPyPW+4jsI7tzxuh5AVK4l7T pYDUe2Z/rP76j43cH3qKL+EhxqurKGfRcoaL+/SUogRoRcV2ylNS1G4AZAP5yelFnVKU nkEg== X-Gm-Message-State: APjAAAX9GEGLHIPzn+xMtGNXTq9qu10KsBOhqXSGT7DqjhpwtGy0nM3A K1ORgRzqKgYbo+ee1p7LHqh3/g== X-Google-Smtp-Source: APXvYqwVGU+xg50XiekYht3IIxEqFHM099dgUifn3T0K/F2g1KQaP1T9fAtfYeTQ4lNEuy0h1An6cA== X-Received: by 2002:a2e:8744:: with SMTP id q4mr8768966ljj.77.1561813321447; Sat, 29 Jun 2019 06:02:01 -0700 (PDT) Received: from localhost.localdomain (c-22cd225c.014-348-6c756e10.bbcust.telenor.se. [92.34.205.34]) by smtp.gmail.com with ESMTPSA id v2sm1354500lfi.52.2019.06.29.06.02.00 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 29 Jun 2019 06:02:00 -0700 (PDT) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , Sean Paul Subject: [PATCH 4/7] gpio: of: Support some legacy Qualcomm HDMI bindings Date: Sat, 29 Jun 2019 14:59:30 +0200 Message-Id: <20190629125933.679-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190629125933.679-1-linus.walleij@linaro.org> References: <20190629125933.679-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190629_060203_312151_691EF3F4 X-CRM114-Status: GOOD ( 13.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, Linus Walleij , freedreno@lists.freedesktop.org, Rob Clark , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Insteaf of the MSM DRM code going around and inspecting the device tree nodes by itself to find "qcom,misc" GPIO phandles, we add a quirk to the core so that if "qcom,misc-gpios" and "qcom,misc-gpio" isn't found, we try to find just "qcom,misc" as a last resort. Provide an explicit whitelist for those GPIOs. Cc: Rob Clark Cc: Sean Paul Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Linus Walleij --- Rob/Sean: if the approach is overall OK I will merge this one patch already for v5.3 so the rest can be queued for v5.4 later. --- drivers/gpio/gpiolib-of.c | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index aec7bd86ae7e..c927eaf6c88f 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -286,6 +286,45 @@ static struct gpio_desc *of_find_regulator_gpio(struct device *dev, const char * return desc; } +/* + * Some non-standard Qualcomm HDMI GPIOs need to be supported as they exist + * in random old device trees out there. + */ +static struct gpio_desc *of_find_hdmi_gpio(struct device *dev, + const char *con_id, + enum of_gpio_flags *of_flags) +{ + /* + * These are the connection IDs we accept as legacy GPIO phandles. + * If we get here, the same prefix ending with "-gpio" and "-gpios" + * has already been tried so now we finally try with no suffix. + */ + const char *whitelist[] = { + "qcom,hdmi-tx-ddc-clk", + "qcom,hdmi-tx-ddc-data", + "qcom,hdmi-tx-hpd", + "qcom,hdmi-tx-mux-en", + "qcom,hdmi-tx-mux-sel", + "qcom,hdmi-tx-mux-lpm", + }; + struct device_node *np = dev->of_node; + struct gpio_desc *desc; + int i; + + if (!IS_ENABLED(CONFIG_DRM_MSM)) + return ERR_PTR(-ENOENT); + + if (!con_id) + return ERR_PTR(-ENOENT); + + i = match_string(whitelist, ARRAY_SIZE(whitelist), con_id); + if (i < 0) + return ERR_PTR(-ENOENT); + + desc = of_get_named_gpiod_flags(np, con_id, 0, of_flags); + return desc; +} + struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id, unsigned int idx, unsigned long *flags) { @@ -330,6 +369,10 @@ struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id, if (IS_ERR(desc) && PTR_ERR(desc) != -EPROBE_DEFER) desc = of_find_regulator_gpio(dev, con_id, &of_flags); + /* Special handling for HDMI GPIOs if used */ + if (IS_ERR(desc) && PTR_ERR(desc) != -EPROBE_DEFER) + desc = of_find_hdmi_gpio(dev, con_id, &of_flags); + if (IS_ERR(desc)) return desc; From patchwork Sat Jun 29 12:59:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 11024005 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C5D3213BD for ; Sat, 29 Jun 2019 13:03:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5E3E2838F for ; Sat, 29 Jun 2019 13:03:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA0F8287CE; Sat, 29 Jun 2019 13:03:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 13E702838F for ; Sat, 29 Jun 2019 13:03:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iap4V/UXrxRRRtD3evNchYJ3GEP0qSg/kWopBgbMkUk=; b=M1szTnd/pVIt18 KBgPzOdSlrkXQkw6W01qsRo3yrBwcCIQ8Ak5JM7BjkJh8h0ebsM8vghHq0F7QWcwpcjWRIAg1pL9i QisARjAvg3/JgDKXQmsdEuTFPI5Dc69FjIqCYr1HFwgZ1AgSu3nXdkv/ZMzfkOngyyZlTUX7qnzYJ JvoShj8I2V8o1YoFtEPs1LjlhQkZIX59ojM9L6mc8DOv8N7loH8M1iC67b+VENjNkMidnBd3M0O+b MeZ3Gg3SxgQ/bErSpijtpldhEGbMuX7ZFV1iJWvGTyOf/ZfVC/HPJirWfLoS6o1jA945f91NNbPUy G4fmcKT4aFf1x0k3t1ZQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hhD0S-0005Xn-5x; Sat, 29 Jun 2019 13:03:04 +0000 Received: from mail-lf1-x141.google.com ([2a00:1450:4864:20::141]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hhCzV-0004ln-Km for linux-arm-kernel@lists.infradead.org; Sat, 29 Jun 2019 13:02:08 +0000 Received: by mail-lf1-x141.google.com with SMTP id a25so5773841lfg.2 for ; Sat, 29 Jun 2019 06:02:05 -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=2KRTAU6ehPX/xpH0HKMaZdgcL0pE06VvF+Cz0lSkdGM=; b=oIll79elm1tF0VCcLp+Ng7l/OtHRjW3+0tBcilR4GYUeAnu3R6/Tedhi0bc9XsRg6T +qRPVUxXAmDbf3sj21K2PQ3L7OjFaGPFZIMphP/X/UfJfX+2WL59aqU6pJOg2OssIe8x 3piXFJldqvugqPHWGtZv/T1hV7YJQUruoE+3Pj5dJeN4Ae1/hZP6n0ZesOEa/5MS9Mzi qzOKI21XULgKL/ldq3TNUGorYUQ34j0w6zB94iDk/jKaqce80x2goGU/wAlbsamJwz+R 28p9Mw/Ie9Bd2PrC0yCh1J/VeWnbNfZtT22ymuou/9SV2PvPo1k7TGBExHXNTzbRRVml txtg== 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=2KRTAU6ehPX/xpH0HKMaZdgcL0pE06VvF+Cz0lSkdGM=; b=lEaIRKIR/DBxldPYyZBLZ+97GZU0bLh1qgNSiKRd20WJ7zq1GzzSmcflBvq0//TRNi F93manYT9Nfdm6ax/f6GSK0+ui586B0WXnWD1Utr8P2854AuEaqQ7BqKTZqiH1eTh/HQ fdHyYHWOL1lD3l5Nat2cvcgr+2cC7xekJHhIkWro6308CVvwEMQTeribvLBZsRdR3Wz0 AqoODmkkpM49R0Vndi/paKExe1rGLQkbN1IhEkgYu9AIq/aln2/RnTMdK+qpNE1SEGyQ X5i0U8IhD4iwjbOzdupDiyJbK6SHplsvEfV2tPAvj59G61a5mvQFUTH6SYaP/7BzukyY BlBA== X-Gm-Message-State: APjAAAUKuJoMonksZzlSByeYZeDXa+BFzcNKb1jGBpFUcIVnQ5mst+Nc zM75IzRD1be1wAB7dX5tvPJwQw== X-Google-Smtp-Source: APXvYqyisZIfrxWe3N5Szh1GWTfKSxX3a3LffxrfYVO394S3qG3CuHcrkb/6yrrtWRGEB7o6fAik4A== X-Received: by 2002:a05:6512:30a:: with SMTP id t10mr7348435lfp.22.1561813323803; Sat, 29 Jun 2019 06:02:03 -0700 (PDT) Received: from localhost.localdomain (c-22cd225c.014-348-6c756e10.bbcust.telenor.se. [92.34.205.34]) by smtp.gmail.com with ESMTPSA id v2sm1354500lfi.52.2019.06.29.06.02.02 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 29 Jun 2019 06:02:02 -0700 (PDT) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , Sean Paul Subject: [PATCH 5/7] drm/msm/hdmi: Convert to use GPIO descriptors Date: Sat, 29 Jun 2019 14:59:31 +0200 Message-Id: <20190629125933.679-5-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190629125933.679-1-linus.walleij@linaro.org> References: <20190629125933.679-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190629_060205_798153_1CB09721 X-CRM114-Status: GOOD ( 23.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, Linus Walleij , freedreno@lists.freedesktop.org, Rob Clark , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Linus Walleij --- 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(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index e247d6942a49..c8e8268c76e2 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -436,38 +436,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 */ @@ -593,11 +561,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 5c5df6ab2a57..3ef956e8de71 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.h +++ b/drivers/gpu/drm/msm/hdmi/hdmi.h @@ -22,6 +22,7 @@ #include #include #include +#include #include #include "msm_drv.h" @@ -33,10 +34,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 a6eeab2c4dc3..c4e9f6d7960f 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c @@ -15,7 +15,7 @@ * this program. If not, see . */ -#include +#include #include #include "msm_kms.h" @@ -79,30 +79,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); } } } @@ -112,29 +103,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) @@ -322,7 +304,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; } @@ -341,7 +323,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 Sat Jun 29 12:59:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 11024007 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D39341398 for ; Sat, 29 Jun 2019 13:03:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2DEA2838F for ; Sat, 29 Jun 2019 13:03:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B62FB287CE; Sat, 29 Jun 2019 13:03:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4EE5A2838F for ; Sat, 29 Jun 2019 13:03:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xMoSb4MHihf0POo7p/Q4aBZDQF8uVu7UuHq1Yhu7z14=; b=B2OfZn4EpWxCrH 1PNXZCsEqIAfD1cVnJz9joJarHQdibIOri8uwOgUCifkLW+pa7KrwnaGqD4Spb52PbLZ+gh4EOJsJ 6tVR9OYQk0IxjEKe/VaoLxDJoC7SEwYexqZM0yKtPgWTQmpMgeZuVitm2tihJTdZej6Y2R+P7DXLR 21zqRICPNh8WPk1KcOLxhABPwFU1Z/SOsEKdre2H+dRxS7hTG8Ve3IrSGHcpXoXfsj1Qb5foAoTQC 4pTqZ9p1Y3LN6lIKa2yMi1K8Mt17BTtJlb39DAAUWoR5A+/ef73pCbAgkJOh/5eFyqhQKc1SI0hCc w587RTxoWMkD1cWuWiVQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hhD0c-0005jH-BQ; Sat, 29 Jun 2019 13:03:14 +0000 Received: from mail-lf1-x142.google.com ([2a00:1450:4864:20::142]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hhCzX-0004oz-RE for linux-arm-kernel@lists.infradead.org; Sat, 29 Jun 2019 13:02:11 +0000 Received: by mail-lf1-x142.google.com with SMTP id x144so5756232lfa.9 for ; Sat, 29 Jun 2019 06:02:07 -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=Bx02aBFfPRkMhKf40AS7qTzkWiU4y0/D0eEn128oWGQ=; b=HMJwmwK/OCpaYq/6HMbWpbRyQvbyRKO/I7HCpmQY60NBAA5MO22b/vxuEsNGmfSrQj fcBHaXH3QcaXBjlvZSLYDun/FB+rgDgBWoWalJEfqrFx7clYu5kbrkkBKrjVtZmMKlq8 WC2B7LrGWBnyBnj7Drd4FPlumQkqf0Z7A5isRfAnVg65WJG+CsFsYRjJAAhuTNd2aVA7 66LsDK1Qqc8JeCr6xmMPRc8LdBJYZN0YWR33m6YI2cjRuLFu5zKVU7UmtADnzzy1MTh6 dKR1eH+dSyDQqLMlaA0pDm4XeS752CpzhfPClsdCtntV/lFNVKMEnL93gCLgI+lOthEm bLVg== 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=Bx02aBFfPRkMhKf40AS7qTzkWiU4y0/D0eEn128oWGQ=; b=pWLHBPd0c7PyQz5a2gTkNWSKeIo8rS9gP3TZOf5anzQ4Lk1Ey/ma5X5/65zHtNbdRL vbRX87AgOpvYdhdYMEFrU9neGYfH9YR+HKuUgcwrbael6mfZu6xcmJbAXOmqnU7s77cQ t1ksZw7sm8w8cZQ9SxNJHFdCLvaadO/9R1lIWYJ6+ACSkY6bGKrOFk0AzzvF/lrHjkLx /fai3QpkQDwMM5aWGEMzJthfadUXvAkKd6lIXFZJ3c5HqHXILu63ii+3TYqjhTQogHWf Zqmdu7A1947dj3FxsRwUbDgvcaXDtZHNUEO8WmTFtGy9kC0R8xvgMDRieNIJzNFKayXW DRJg== X-Gm-Message-State: APjAAAWDiKkePhsSxHfmmia9e9uBHfWhsvjrdahctwqwOxxg5ck8J9u2 sYV3OKVwpikAJGK2Y86pQ2Tt3w== X-Google-Smtp-Source: APXvYqxTzIJVpddQHAmhA5Fk+i0uPHGclgtAxJMzxPUjiAnCGI/TQWmRQfr+sLmOyHXNV5a5lmrefQ== X-Received: by 2002:a19:cc45:: with SMTP id c66mr7446160lfg.171.1561813326303; Sat, 29 Jun 2019 06:02:06 -0700 (PDT) Received: from localhost.localdomain (c-22cd225c.014-348-6c756e10.bbcust.telenor.se. [92.34.205.34]) by smtp.gmail.com with ESMTPSA id v2sm1354500lfi.52.2019.06.29.06.02.04 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 29 Jun 2019 06:02:05 -0700 (PDT) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , Sean Paul Subject: [PATCH 6/7] RFT: drm/msm/hdmi: Bring up HDMI connector OFF Date: Sat, 29 Jun 2019 14:59:32 +0200 Message-Id: <20190629125933.679-6-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190629125933.679-1-linus.walleij@linaro.org> References: <20190629125933.679-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190629_060207_989001_F5B8C1D0 X-CRM114-Status: GOOD ( 17.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, Linus Walleij , freedreno@lists.freedesktop.org, Rob Clark , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Linus Walleij --- drivers/gpu/drm/msm/hdmi/hdmi.c | 19 ++++++++++++----- drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 25 ++++++----------------- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index c8e8268c76e2..7d87f8821d2f 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -563,13 +563,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); @@ -583,7 +592,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 c4e9f6d7960f..89c64cc85027 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c @@ -86,16 +86,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"); @@ -103,16 +96,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 Sat Jun 29 12:59:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 11024009 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 245B31398 for ; Sat, 29 Jun 2019 13:03:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 154692838F for ; Sat, 29 Jun 2019 13:03:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 094DD287CE; Sat, 29 Jun 2019 13:03:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5F8422838F for ; Sat, 29 Jun 2019 13:03:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SAzUdhWUIV7fYeXzfqmmQwz/cqGIftvjsADmef14cS4=; b=Frn3tUdrD8SASg Zkp5XSyK5puaJSx+U4KGhUu+ZTNg2QzFOxKAKHRb19AF8agUvcKqDx67YGxFxKdKEnRl5U0dxKknf xl1dDJdnA616MkNFD8bhTX5sPdnTdfvSVGne9wKaci/vidx6GJu5GDFhE+wWZTCuYxjShKypsgV1J QZJgL4+qsQIe8iiGzwVft7fm4FzVjhS1Gk7REeXRDXD151cwtQKXx83tEYaKEM6+ehZB3iKe5jBkX /IvkWHXWNb9lOaawVWhyG1eBkFIfs+SH/hx8HapbGYjysn1CVS1E4xiJy0YmTr42kFyOpoOuVJEGn qqjFwRoTyspBpKIRG8Gg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hhD0n-0005vd-OS; Sat, 29 Jun 2019 13:03:25 +0000 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hhCza-0004qo-93 for linux-arm-kernel@lists.infradead.org; Sat, 29 Jun 2019 13:02:12 +0000 Received: by mail-lf1-x144.google.com with SMTP id u10so5716819lfm.12 for ; Sat, 29 Jun 2019 06:02:09 -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=gUhHBzqpeqf9laCyRDqe0YTreYPsBAWIdDU1MBCLr1k=; b=BYavBGMBtik6r+A9tFdwUyOfHqHK+Yl4c7/OJSbz75XF2NUDjc4Jw7+6wvc3ssAnDF 9sq25tD60Ch3GCG0hM/5PRkqSgHcW/LYOm35ZiNdaPczwua7xlkaQTtJrqZOM9Tpv2HK ZvXChwFa1/VVDUg/f4Nyh3tUquPVnrg2zNpac70vRhAUi7CZ8hpGVSeRuy+q36Hhso+h Ks17fIaZ1Z+66/HbPp9dwbic5x4vw3gyVfV98DTntLs57UNkVYUKwuust+xKTjaLKoct 7zQUCFkufCWR85bg3HzsRWlJ42Nostw2IEcGdvH3kk5vn0kj3ZdmlMrn0Ij8qrwefETN THcA== 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=gUhHBzqpeqf9laCyRDqe0YTreYPsBAWIdDU1MBCLr1k=; b=l8OjbFv2EIzFcegmme0lfISSpJk74Xl38XDW84nuia6r968kmydrpCrKPT91Z2zuxD wp0X6Zv91fNR7DunXw1pgrNSHxcGVthD0xc/1WK064MWhF/EdG9ZCSsxgkw0Yu2IYCVZ tL5qi8J96A++zniQBH4mK9CXIJasxDNBd+4nWGcXxFIJQAIvN3qmah7yHZvcrmaWRqvj BWxbROD9I1QEY2s+FIPi9W/hP8h9QQaDCLYcajymfQNldWUd9IgydtGiuO/XBNOuQJQq 1QNeM0eFCxuMl3X1vFjM+XISbQ6txBsNZV5fXDgGLOG9cQ/TB2WYXveXzslyU0luaKE8 +vPw== X-Gm-Message-State: APjAAAWm7YHG5DQOiPu2WAOlDNmowYMmjHW8YziiiDm5O7+ugwYU7xKc hvoaPf1cX/L07CDcqXNX80uyVQ== X-Google-Smtp-Source: APXvYqwiKTo2KmlXB88B2iDxqXfGg+cPGIjxT3oac4t0Fb8IeqR1+G3z9dw+lnnW3Vr5Kl66Lss03g== X-Received: by 2002:ac2:4891:: with SMTP id x17mr7657045lfc.60.1561813328311; Sat, 29 Jun 2019 06:02:08 -0700 (PDT) Received: from localhost.localdomain (c-22cd225c.014-348-6c756e10.bbcust.telenor.se. [92.34.205.34]) by smtp.gmail.com with ESMTPSA id v2sm1354500lfi.52.2019.06.29.06.02.07 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 29 Jun 2019 06:02:07 -0700 (PDT) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , Sean Paul Subject: [PATCH 7/7] RFT: drm/msm/hdmi: Do not initialize HPD line value Date: Sat, 29 Jun 2019 14:59:33 +0200 Message-Id: <20190629125933.679-7-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190629125933.679-1-linus.walleij@linaro.org> References: <20190629125933.679-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190629_060210_502421_7C9BFDC3 X-CRM114-Status: GOOD ( 15.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, Linus Walleij , freedreno@lists.freedesktop.org, Rob Clark , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Linus Walleij --- drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c index 89c64cc85027..ecbcd8638b66 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c @@ -87,7 +87,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); }