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: 168146 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp721722ilk; Sat, 29 Jun 2019 06:01:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqzB9Mo604mOHcf1uarc1HcTWEbqkWj1eSXzh16wyChlp4Q6+4kfs/SwCDJ21PyPoz4G1uM9 X-Received: by 2002:a63:2bc8:: with SMTP id r191mr13966538pgr.398.1561813316760; Sat, 29 Jun 2019 06:01:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561813316; cv=none; d=google.com; s=arc-20160816; b=wosLodF8rSHcB0MjmLx58jXYBrK7zD96Rb0QbZ81Y2gTIMDkTI00PnpcVVTlapxDuo NES4BHJz860JamYyFkYlBzPc6pjB1npc7gHlqhzfwohszXIwsIbLxhNhlpoW8v/fprMk OMADihtAABfcv3Y7aF4AtV1lZqun24G1/FO5MbIBQZ2ja+gkbkQCA5u3p9aSu/pgmJ4H JiFoAY/8hgpRgE+re8BhWMmRLmZ0pUiLWN56GR98hYcucvWCi0SnMo7jDAh0y01ASqjx hbJcSb+xfsysi/0wcHkDWo874tFb7TH3OVielmFc7SVmWSag6P/ydFvu+sjVFCUToRXj fkbw== 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=DbpuIcCBG2OY5e1NmpBE7wz6kAerHOIPdrXSJOYlBOk=; b=0BcBOS3CYoEQ7UdxCHtD0JMam01tQQ65FDu3fBgEvI8nBJ2vj2wu5NAceGwAnGRtnK 3ay1l3y7FBLvI04Lw+MY+aspimBoVGSbT6+Es8UOXOgO2ED+YPHAn5+qS8sCykMS12Vj b+hzuRCVqUdaFtJ3PXZhkt+6GL+ZAp3A7+7Vt84d+Y7iMzIRJZiLlT8xWJv1UEMbgZqq V7+NINkH3i6CisNsehRz5anUmxj6OOmP90CoafbWANm72F93EyCuUU18Pc0cBd2yIdHY XrsJkblP/dEcfH7R0YZZTyqjciYtm1gZPOqtEMoaurylmXIx/6pJQnpjO9+ELBIBjC8p jmAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=efVnvG6g; 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 j16si4972636pff.262.2019.06.29.06.01.56; Sat, 29 Jun 2019 06:01:56 -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=efVnvG6g; 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 S1726723AbfF2NBz (ORCPT + 15 others); Sat, 29 Jun 2019 09:01:55 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:36656 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726716AbfF2NBz (ORCPT ); Sat, 29 Jun 2019 09:01:55 -0400 Received: by mail-lf1-f67.google.com with SMTP id q26so5787556lfc.3 for ; Sat, 29 Jun 2019 06:01:53 -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=V5utg/8rqKXKQxLeQ9NCKLYXIq/AsWzsh90MFyXLktCgEWCOGymIIvS44Zbpovydmf Xvx3A79Q3Pb1QMRB7Fj0iuFZ79gqswxMB3T8Q7rPTFOV/VfG7C+nw1duNTlNLVo2FHlG WMK36ePTXsrPAdWuX+1UBLdmDnoUyAJeL8pW7oHtHSKW3H6HxKltoxqHSp6EvOy3e7rB kWgsZldTOJQPdrmZx0yWIjITE/66Wr4onbGVsxXFkZMPGqKCe2HxFs+S1yAbHEJ7XjoE HVAYtuI4REcQBOHy+bkjGQ0QouYzis65qpUEKV3+TrCevwGV4lFzE3RjKXgs4Hgm5bDP gh5w== X-Gm-Message-State: APjAAAU1aUWtMURsKyk27wmeX9OtU37ysuR05baSTMHXZXZGR4jUnopR BrKaACox0Pmwdk/LZel5lFM5eA== 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 Cc: linux-arm-kernel@lists.infradead.org, Linus Walleij , Rob Clark , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org 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 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 Signed-off-by: Linus Walleij --- drivers/gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c | 2 -- 1 file changed, 2 deletions(-) -- 2.20.1 Reviewed-by: Brian Masney 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: 168147 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp721768ilk; Sat, 29 Jun 2019 06:01:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzrN3T/v9xrsV0f0WQLjPfBZ8MheTj7aHqMNKp6+e9oR/5RUnJhbFILdSgDneZcE5RCrfax X-Received: by 2002:a63:480e:: with SMTP id v14mr14127282pga.182.1561813318702; Sat, 29 Jun 2019 06:01:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561813318; cv=none; d=google.com; s=arc-20160816; b=XKfuvfIkQf1uXWUTxiRv+vrIykzqx85Pd7u61GZgkt9J1MgT9eQxsHiRdttELSbZ9r 9Nyf+0VTZurtHjHSpZ1WZeTzeyoYNDsuFIOXxWrMXpAcOSAoR5cMthLJd5Wk3kOyg6Ym Gd0D5H+l3sggGZ3Sf4NCoXBX4Uu5IBtp/RkNAWkGUQz2eKdZkkjrYvyy8eZEHXxDdthf QJjp2961VT/PRXSW3v6MZhV8Rz3N9l1IQmCeNpZFQuD18MHBnRQC4XNV4mE/jUteeoCE FGvSBFfBRaMMC3pBq5g+fvRgUAWE0cqhRSLKDS2F3OYlx4IO4guftJPRTdNVEEWgbVSw hasw== 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=AJIo1pqQ+aFujHuHdql1oLAKsZ6dcOAKCD+S+KrStQg=; b=X4QdQdqFp7RlmoPNpbNWB6Bg2+HVlCzxE6iIChTJPe0BxnC+fyO7SvkujMKVUnHUFV wfCH3hnXo4aWUb1SEFVakOzne74iZXwDPGCFRGFr/fmMS80REDjBVubVPAnt0NZ5+u2c duMxv5t6IICdRDpM30GJEMjKxiwU8RFdoGBXaL3PCr1BrcxZz8fJ661Q6eO/8JxRlN0o Rbdkb5bofXTrZCRZ8QgAQHdGfEoj2ycqVHGKVu+Uxn1Mz9HyoKwNZ8n0N/pSj08RlOjL JSlOUOEvImHI6h5QjVdeUP6Znv6jxxjjH0baassQl/WQYOmfeLiBOhyGhhqo+l8+HiqE x7Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zQR54iAb; 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 j16si4972636pff.262.2019.06.29.06.01.58; Sat, 29 Jun 2019 06:01:58 -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=zQR54iAb; 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 S1726754AbfF2NB6 (ORCPT + 15 others); Sat, 29 Jun 2019 09:01:58 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:43742 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726716AbfF2NB5 (ORCPT ); Sat, 29 Jun 2019 09:01:57 -0400 Received: by mail-lf1-f65.google.com with SMTP id j29so5732554lfk.10 for ; Sat, 29 Jun 2019 06:01:56 -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=aFRn795NZ6rDzAcmM1tWQ/BXllw1diAHBwypJanLMuEfQy7p0CnyE7JmnjC5LXSO0k aLn8k5rS3SHJIG8uVY29dKqDbgJbWwmcU50icM9TEHJO6GQq883iHVTuJWWQojMGZrXc KTfIVBK9AXF5MDaabBVANbtlfxryIrdfeugHdJRL3+3bKzUUrLS8S9VBZGKNG0zLW0AH VA+iAqhgSE+wlxxq656SfM8eS0kQYuJIVR7NcACMijiopuhylwM+IY9NtD7RdVfSlEW0 G5/KdwjSVyAnoLtNqkNx4BIUj905G71qHZ/02qngPumHMA/airF1RKtkxL0NBwo+mvR2 ji3A== X-Gm-Message-State: APjAAAVucdZuVNnBmRBW3BbTJ6LXmnoFBoqLUIFV5t4wsz1FPgEiVPhz uxOvLLRA5qYIEzYacbDA+57RLDiIiM7wiA== 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 Cc: linux-arm-kernel@lists.infradead.org, Linus Walleij , Rob Clark , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org 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 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 Signed-off-by: Linus Walleij --- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 -- 1 file changed, 2 deletions(-) -- 2.20.1 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: 168148 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp721841ilk; Sat, 29 Jun 2019 06:02:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxOty7AlAIwiGJwzFWiumteMYkYnLVMOv+veMXbgcJ503+GmbEETpq+9RMY5iEeoJLtxqpJ X-Received: by 2002:a17:90a:bc0c:: with SMTP id w12mr18287249pjr.111.1561813322248; Sat, 29 Jun 2019 06:02:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561813322; cv=none; d=google.com; s=arc-20160816; b=BrvoXYD8exzR/qzaOAYXRCq5gVRwGeH88Qf4yBKAYKA4vr/xJBfi0hff6IqysFqFMG lZiGSEqGh1d2j+nAQ6Qki6pXdsHLuoWINmFzivL1on7vVBS12Clyd+2EK08Mbt/OIlvX LXQkyv+wT4BNNIQrW2QDpj5OyuRzf+BSbgG7VGWl9kU6//P7JYPWsapjTJM/L5VlqpKk XyImN24sI6iRlQd8j6nzwCQA2sxUYHi5LBXG0wdPbCJvsKraTf13EwoLguq9zRRtqnOO O/ATxTYG2VElqVuojGVhe1XLlSLgdHgiOXuTs5dwz6iWVQvMH1LposYy91e2XiBvBtwq RLig== 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=Ji8jAojLPl8vD+gcsy1dZ2LAcjvPmFSVJ5glNsjtSak=; b=UNBy1Sq8nPTFJBiH47TTwcyrYJB4JyFBkfLsYSN/UR2ZNYZRrh5zJwKJCjZBysUrRQ iMg3+okDBfLi3qIrifW4Ud231qsdSgy/h5EwJ072vpVpzw0sRqzN/EbGCtpgHPRVIJTp KhxnQE8nLMNGH0mmWa5hPEWwv8SocsjaDHG3vOmlWT2It+oawvvY4wn14Rju8InUajKP eIvEcnVhHS7TPX0xesIor5SR+WxFyLzi69XzKeQWSqa1JevO7JOkarsWBeL6F7rXzfMd ovA86fdb2ufwN4utxxBOt1Kd62wYgKF+gwGmaJSZP3evhJZL5ChV6UZnuxsL0DHo58T4 wdgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nAjmGaNa; 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 j16si4972636pff.262.2019.06.29.06.02.01; Sat, 29 Jun 2019 06:02:02 -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=nAjmGaNa; 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 S1726801AbfF2NCB (ORCPT + 15 others); Sat, 29 Jun 2019 09:02:01 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:46556 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726716AbfF2NCB (ORCPT ); Sat, 29 Jun 2019 09:02:01 -0400 Received: by mail-lf1-f68.google.com with SMTP id z15so5729277lfh.13 for ; Sat, 29 Jun 2019 06:01: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=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=l9jc3XcKpbNvBcbuuHxQG2PHW1Jq3YoW/lDL+awbBATZ4c5dkGjcvAAkh5eaDcxqGi KPM1jL/+mXNNzR9/PGxkJLOWgzi07UM+ANuMimoEtqyrq1fy4LBbAxEA8oMvUG5EEOnH RfpN2qnAPYky1TfKXPI1QLWburCqRNEEzkMw2jAXPHJtqAODudA+59aI0gIvZKqQ9WxB p2i+dnUwDBqkf6kAB8wzkgi1LizHLOHfWnPbfhZO80r/P53D7DBbQBBGf2VyS0vwMzlr CAAHhs9F9mUeSodxah9V8/vH7ANelLwQUMhtxpFKcuLBtY7kwswrD+3ifbQGV9ftU6gz 01Eg== X-Gm-Message-State: APjAAAULfB14GRFQSmfPfBjPpvsrV9mCVYO6eOQ5gMh2UUJnRlfbVqVc deZszVdpckXDysczRBOjk6LlYw== 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 Cc: linux-arm-kernel@lists.infradead.org, Linus Walleij , Rob Clark , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org 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 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 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(-) -- 2.20.1 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: 168149 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp721897ilk; Sat, 29 Jun 2019 06:02:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqxzyg4YSbzSqmBzyd6lzg2JUOP9sPlGkk5LQ3sd5v2Q1Un+Uk1lH1xsqO/pi0YJaCDaJgjq X-Received: by 2002:a17:902:1e6:: with SMTP id b93mr17527222plb.295.1561813324129; Sat, 29 Jun 2019 06:02:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561813324; cv=none; d=google.com; s=arc-20160816; b=c3dgIHelnt4oGKyACS92EqNpS+HMDIjjGNJzakDCWgJ1J1P87VZ3g6uT4m2ds5KF63 kKaNMRn1PpKniMeC8AuH5oBUZ8r2GsEt1SXcwjuVU+FjrLuO8x01N7VrsJ6G7bvEhupI xUE2pnDPRTCG64JGZJ+0lVLRNYkwovaPEHzEsltA7reu0cCG29iWqmSD0AzWJtBNyHbg r47K7cL6ziSgCk5nby+XMOdq25HyhA8h0Lvr4Vti/lCTiycos/G4swQauJM+1EREAHyv cTilIo9x/YvhTBPL+6wSTBz9gsDzTLU0qxSVxsAj1Ipnfm7PlTjuqOx2lvjL3VVJBCPc aHoQ== 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=lniFIm91gCkBVo8OT7Qc6rB8XEZiKvYZhCGqRwQxgRg=; b=mtjBkAqonBnlamd+7NxX2aU609oLBo/NHt1i0r+lp8eDZx7I/XqUuoNcnKoNtTaHzt rRmgTClKB1Cn/NmKywpB9SlT2RRaoENIX/KsViP4MiSg2LVjfOtf/ItMdedI90Gs0u98 UxC4U+N8/VdJ3mTzsXshghJIIq2SvoE78z6rtVnS3+u2cK2oZp9udMa2nLXl6io1U4bX GXVV9kCOlVYf1q0zcvLOAhjmxHtWJ6GdNyf3jqmyP9haSE/DTS4EkFqaa4o3QIAyW9UQ 5ScJHkzT2bO5iAR819Dy49x/D12FW6kuItcHR5FzAbX2bnBcGmQ9hPRWjls08a3jT2CF XJvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="R/OUJdhN"; 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 j16si4972636pff.262.2019.06.29.06.02.03; Sat, 29 Jun 2019 06:02: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="R/OUJdhN"; 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 S1726817AbfF2NCD (ORCPT + 15 others); Sat, 29 Jun 2019 09:02:03 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:35514 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726716AbfF2NCD (ORCPT ); Sat, 29 Jun 2019 09:02:03 -0400 Received: by mail-lj1-f194.google.com with SMTP id x25so8639985ljh.2 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=nPztyCtpIs3x7LU6dfs3NnlcTetSiGTINrnb0Q+VZPyUAmH/EB8sxZ99z0czHROeaq vr6l6P3YHyJEXt/KESYQCeRNM/e7YkAgV2b++cZ4ma88BCwvUhh+t48FC1ITUEZbVT// IIv5NuffXLKN+pRRMckMfmUwb+7yBaat79tXI9+ZsnZOGAYmfsV1kQ18Ra0J8uYQnZIb Tc2SCLXAC2Aj6vZ/PZQHlzml5q15GBtNFpBCIjaNZuC2OZgC7H/dj1Kwvat44uoW5s90 Ns/hFYaV0JbyMYRLLNZ646F1Jtq0PmnNIntBgo1JnZtvt4nN9qu7bXGDhdnheOJft5Cx mwXg== X-Gm-Message-State: APjAAAURC8dVNJrn/AWnhs/mbLe6WN2EXKxtjEdAatBunZZHb5USTFvZ 49PDmUJn+OQEXfZoiWmpruNEeg== 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 Cc: linux-arm-kernel@lists.infradead.org, Linus Walleij , Rob Clark , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org 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 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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(+) -- 2.20.1 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: 168151 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp721965ilk; Sat, 29 Jun 2019 06:02:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqx1wxy3TfVnSkE5Bc8v/v+nCDyhmmsP5UVEquhK8KN+77oJFlCGT6LS9DjgnTSUQCW504pP X-Received: by 2002:a17:902:b591:: with SMTP id a17mr17028653pls.96.1561813327561; Sat, 29 Jun 2019 06:02:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561813327; cv=none; d=google.com; s=arc-20160816; b=EAUl4yCwATxBk3073K7NC2tcpTX9SOgyFbCJp9LOZeXKN5oXm9nFXImTlSWB9lH0dG Zt9xUk72iSc4TBTDK1QBZbRJxTpJb452eYlL7xol6yQiJQEQUh+EOwQON5/vI+DP7vSx 2t/5Ew8qzFf3yWGypkg5oPHFUJKZ1hOnKDbwRL0+4gsgu6GR3bdPINyCMEC3iDEipaix BuhHfRoWmixT/16xmZ926/WD9oQERgwy7Gkm3abnfOLdzqP0uCV4uKr6yjt5Qc8yRTTH 7eldhUFa85dHwDmxwNgot6LgcGREFjx8frWlCyykiUg/eGBmQYfH5/sgBUOJEvb/yPsQ CAog== 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=2KRTAU6ehPX/xpH0HKMaZdgcL0pE06VvF+Cz0lSkdGM=; b=r6Bew1DiAmQYpR71bZoNTGFLhNo/w3+Kn7CdbrvcdmPOO6AFZIudqk2xjao9GVJhFO Ksp2MoZzGtKZh/G5N1wj8KsTde2F0rsii8fbotFtPZEbQ614GqWiD7prOpgjuN6WfNfh b7vnqA/BwHxS1BOHssJNQQ60ZmntpeSag5SWuogJMzGEiaceYWL0P44U0XMf0cKZeJ6U w+XoGq0tWFnsWiiHbncCHPIqdy26cHDsjR8t/AwKkGOYdOnHnQusKjtfNss5R07xVKoF Xoni+gFvvfmIWZg3cCJb3pxfCc6LLJU3TnHrnpNGBO8CTB/pXwKNteG2hoOK2BJnN7TC 8jrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oIll79el; 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 j16si4972636pff.262.2019.06.29.06.02.07; Sat, 29 Jun 2019 06:02:07 -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=oIll79el; 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 S1726819AbfF2NCH (ORCPT + 15 others); Sat, 29 Jun 2019 09:02:07 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:46560 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726716AbfF2NCG (ORCPT ); Sat, 29 Jun 2019 09:02:06 -0400 Received: by mail-lf1-f68.google.com with SMTP id z15so5729369lfh.13 for ; Sat, 29 Jun 2019 06:02:04 -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=SfVVkxMDske7MsLH1aKHBphLotSHQDBbASOGvUS8mfAjp76Z+kE3JWWckO41qFD0Y0 pkKWC08DXYyFuUgR/hfKXc3d8nknrGA3U7Nazbh2UW+XmMPVNY3nLYp9MTe2GlIbJGxD hTuGoY0U1W3VPGFvv47ar6D737io5TCuTgJ4lQkJFmHkAUVVIAIWJnmZ9t4RQlTImU2o 7XSXstscjoq5Oj2huUbYEweY9R/SLxd51o0GiL6GlvQXY+/vVrUwQa4qvkSdUeUpXjj8 0b0x5JsloIrJ/PFL3uK92ifpEjTQstdw2a+zqKrfLNOKQnBleLMZ2x1kh5aLmkqHm4MR Z4Qg== X-Gm-Message-State: APjAAAUhKXrDVPY9Z+Cy8Uh+uk6hYN6D/qEZDWjXkPRgqIcMyCpWu5F8 HpIR683suuvGaeLntpAnMryS6A== 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 Cc: linux-arm-kernel@lists.infradead.org, Linus Walleij , Rob Clark , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org 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 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 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(-) -- 2.20.1 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: 168150 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp722007ilk; Sat, 29 Jun 2019 06:02:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqx4n+egg+bniA5mD6YO2zE6gyk5/2ZEO6xud6oiH0hYG3Azdax0WJIf/IeN+etLjYLC8QqC X-Received: by 2002:a63:2259:: with SMTP id t25mr13382664pgm.298.1561813329540; Sat, 29 Jun 2019 06:02:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561813329; cv=none; d=google.com; s=arc-20160816; b=J7EdnhO1WdYPN53qnDG9nSNau8lE8lffXVJ/4aFHlJ7vop0ZzfOg3dCL81+dmxJ5Gw Eubs246eVwqltF0F4YfUjdRsECG3D2Jh45avi4keLtgyPvgtnFSD0XFIfYffk1fg3iuq CSPHuRa/zP2qyq20LyGi5ty85WZp6YdL57Y5tIWj8ARRjoD3AWEqs1Md7VpdbVd/87Jd fLhoJE8QRqPM7Zi4Coeulx0boH5yQ7gsFz/9ksqYKdJqskAXEvnkHXSkmlgqpjydEbHU fiEW7Hz2fCYpDNG1ETleSBr5KyfM4IsMu72m+ftAt41byElhSJd/KFOWCKLOyXfannUU 9Wsg== 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=Bx02aBFfPRkMhKf40AS7qTzkWiU4y0/D0eEn128oWGQ=; b=A4HFhuRI1YPI3NekbLeOergbGrIyPxpc3NRVdsMXTyPi4PLOrMzpuyY7ma3iRDtd0V 16w4jwWyG/hqEdLSL8EM+BSF16IWbu3lefTkKISBf5fIaTscyfrp0qSaPzhn7pmZJ6vb RZ8F/7vCL3xfMX4Op2M6/8OjHe+K5BIR2/ngavtaoC37eMYEk+8VJyPTbUfN72yozWTC 6NbADYoCkW4i6Jn0r/WQ46W7qkOkIa5zTe0DycGEE7M/4VmSDnsR0huk8i9eoK/UH1tk rDiZzu4PG5e2GsGODewZASWJcCV/rF0BrmGWnqRDgVxdRKojcuYmMHuZB8zD0pbKP/pr Q2WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="HMJwmwK/"; 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 j16si4972636pff.262.2019.06.29.06.02.09; Sat, 29 Jun 2019 06:02:09 -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="HMJwmwK/"; 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 S1726837AbfF2NCJ (ORCPT + 15 others); Sat, 29 Jun 2019 09:02:09 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:36672 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726716AbfF2NCI (ORCPT ); Sat, 29 Jun 2019 09:02:08 -0400 Received: by mail-lf1-f68.google.com with SMTP id q26so5787841lfc.3 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=aSnKAjAugyZHQmm+A82PlMqVxPMQIWVV/LQko1oUjZcfs3KfpKJP1owuxoAN1HEta6 s+Tbh9wiaezsvBMMOe0mGqS94/ECeV85eLqNhGEWvJKCZTHPiXY5ziyU7jfhS5T6JWvz V7p2ZTYHNzCGu+AHQML2qKtyPoYHG0BtWATezVUe7NNkb4rU4JaDV5rWlr2WQMz8jCfE uk5hpi7zolZ9XSMXp1HKKv2iAI7EPDgJu4WeIaHpAHLV9uIoKQwJKauYvpDPV/gLtdlm MresdP5/YvlVuwVkIKVJ5cMQrnZmhfYbQuAfHCobSCg8vJ8DhNtfCpHQha6OqhAAv+uJ djNQ== X-Gm-Message-State: APjAAAWMivU0w0ly8kfnnyKuAzz2+u1BN7IZeVJOvbWSVeA8g+t43V5K 2SeQ1WAZDidpAL+AOK7XKtGtlw== 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 Cc: linux-arm-kernel@lists.infradead.org, Linus Walleij , Rob Clark , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org 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 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 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(-) -- 2.20.1 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: 168152 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp722053ilk; Sat, 29 Jun 2019 06:02:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzShUnknQ9AmVEVjD6rsIPr3LdEkPn4IH392faj4f4otid9go8k8ZL+8tIYN7M8wI1qW9a5 X-Received: by 2002:a17:902:e011:: with SMTP id ca17mr17941745plb.328.1561813331210; Sat, 29 Jun 2019 06:02:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561813331; cv=none; d=google.com; s=arc-20160816; b=mnQSSEn27Lqv6xk/ME85JlclI1OZ1LjjkYlBWUWCmxwWP3m5wtH9wVXqTvFnA0GMb7 kCA2vfw3uUN5l/YPw6NQL9Ltp8fH/piLoPD/25Xnysk31ew6BeWEWMc/FEuSIgJI9Tfe J5hHzyaPNZhJXcGyH7hX/zWe8CKFtkrqJp1aW6+7bzPtTx1lyiWuS8L54DqHn3EwMPwv Ug1+XALG3vY1tsMSxbRf2ARJ4+NQyVd6q00J/VEot+dcIfSLjBj7V9uTA0zIIegcSiIR awSoMfILj1KBn5ADKzTAa8XyUAX45wtcDFt5bmIPBQwod06xiAR3e7xYyCsInhgtpqWc q9Hw== 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=gUhHBzqpeqf9laCyRDqe0YTreYPsBAWIdDU1MBCLr1k=; b=l0he1movzHNypti+RG9e2bRvK6jjfCv6lnAuQu1TlCAX9fesS5qb1sNG9ngad16aw7 VodPzFnXmTX9CNvHFTF/u6TBaFXt9pvLHQ1i9BjjYwdz0ye7woj0wFROorsQmeWl5hbU 70atLgB4UTlwLjcSxs6U0DOUDjxkIHILhAdI/nJYT/UwJvBaMu/Bh/5EydPbIQaUrlZ3 eyR5Qqlul9Oi9/txAwnuZ2aRU5YQ+DbXCH3d9NWDSwxWCwXcPa5XpCQcw/+dCnz/O5QV Ja/zTi6IrH585XNYToTgINtgUEWMocEUfcm9XctZJZTRtEVL7QsqWAFSDi8cWWXhy+r7 hphA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BYavBGMB; 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 j16si4972636pff.262.2019.06.29.06.02.10; Sat, 29 Jun 2019 06:02:11 -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=BYavBGMB; 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 S1726828AbfF2NCK (ORCPT + 15 others); Sat, 29 Jun 2019 09:02:10 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:44820 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726716AbfF2NCK (ORCPT ); Sat, 29 Jun 2019 09:02:10 -0400 Received: by mail-lf1-f67.google.com with SMTP id r15so5731068lfm.11 for ; Sat, 29 Jun 2019 06:02:08 -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=VV0oUPx/AZC26+xD4NYEu9FL2n2WmaWzXQF1LgeofbxRNYALPhHINNHoF4r7Lz4VWq FJ202iCN7cyUsQB6KiLtJY2vy4+1wQL42I3A4xeploC22fRSrAzRP4+Fwpum1vJAXuP5 9rHC+RCqWxPo6aj98Pw6M1i/PIc1KYl/W336MnL+8X15uNheElQAo+OIi2PlCUyFRnYN brssdz3a7Hw7PwojJ16FG23aMQ9QX5sZ1fTQG0lwjWB7xAD5w+ZGnpjX2lddmH7Cyx1f RwXEt4eTNgt596ZWgCqpeMXXWA3HUQLIP5ayhK/qbZMNXrEyp451sT6ogZTR1KOSetku Xecg== X-Gm-Message-State: APjAAAX4AGRLe7/xi6eU6Soxnixr2/niO5reTn6OhLAB3bojsDMsMuzb tGSgPcOUd/fV5aLBJOJTGsz7Yw== 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 Cc: linux-arm-kernel@lists.infradead.org, Linus Walleij , Rob Clark , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org 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 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 Signed-off-by: Linus Walleij --- drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 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); }