From patchwork Sun Feb 9 05:04:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13966651 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D0BB9535D8 for ; Sun, 9 Feb 2025 05:06:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077612; cv=none; b=O31viwnwXLzf4Ig8fcsAKAVrNzRVoKRjLyGrEvd3ahkO6WuwolIvIXdweW5OE4CoA+B/NGP6YB8frPAO1F6Wv2dFJ6Vb3tE8NpohazZB50hcbCQFsRTZWRJ/LPrAePYAzHfuLkuE7xLQZPbIK2td2pEwnsvRFwR0JEgnNHSoL2s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077612; c=relaxed/simple; bh=BXA7Q9IpU3LJo5o0YQp3oC/xe/tm2VyAy8ivKO92PBQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hgH6QrwRkNgfmKjByjQKdUjwb4lgpqmVdqkqlMQ0RUVPpXPKMEYM7tZNCF2gfrFH7n/mXXr0s4xKxcGIlns8QOrwCd1+X0pCuT896jV22WJPYxovGiXd2bVaekylLRjgOm2zW8C+fNzw5y9uGLY3Qd6MVIz7yBMg3KrFnMmmuJs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=aSYylMB/; arc=none smtp.client-ip=209.85.167.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="aSYylMB/" Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-543e49a10f5so3613416e87.1 for ; Sat, 08 Feb 2025 21:06:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739077609; x=1739682409; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=yj0BuWh1hjkMiCnQtqM7MPhpgvXgx80zo8kYUYLklb8=; b=aSYylMB/ayzXdDs5w1kWFx8Egop05cq1dPpL03zCKNGZishvNUzHx8NKlk2If3fOTM JmoEVnJFDYClCD7pYWo9rbmJYEezaJ989ZqqxUA9RUl1V4WRXEFF8aYwjUDM1iTdK57R 3mSqJI6cHO9T1RIcoMUvUzWlPsghJGEa17SyKX4U3mxsk+40XQqD6+UeZPK23oyiOpbr PPF7AYbpnoz7UpnIP5pxLegLYjHxfk0deTydLjb4DvnwjggGVdgFW0Vf1sBPXXvVhZk3 GIbMqhgxwEtzWbnCssvReM+WNx7iNS9+ny06qK+5xFZ3b05u5QYd4Wq1WEG4ozDSm6uX sAPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739077609; x=1739682409; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yj0BuWh1hjkMiCnQtqM7MPhpgvXgx80zo8kYUYLklb8=; b=Jfkn6tM67tfAXLeQZO/Q8Gb6MNaBz+6SBUIgZmPYcqnvEUk/hMuli1dT1rXPMPEU0Q XRhNVRNpy5prhOxCti68Ub3vm8MLzNWaRKsUXSBrlmUwqmEzwOIivHwZZ9+Cyb8x3Wvd SvtQ3EfbtmDcswLfHXm2chuhXSWxDSrLHmk4dN8hQW/hqUQ2VVLsHlLSH9iRsXRIsOho zTXO91wcQQzZNB5iyhu6fPQ6GrfqIW79SUVAnR4tW5ojq27nB7ZqYZq9cGcK2k0r/YME XKJcTOtgRuxf6nKoVD2/I8Cd2JbOOL4Tjl6iW0pAiIFQZD0ZyaAZ/yEAj0yaKLA3huq1 qVkg== X-Gm-Message-State: AOJu0YyU95kRNmlV93sq7kNOWQLHcUcpc9Wr8BZK0feyzvrjx9HBLE7L tTBxYenHF3t2wMQGtM/dGYsxiGzMl7vB0NBcVyLwpoKgdp96udlcqNeIpv4YUe6kbEMZm9+gykm N1kc= X-Gm-Gg: ASbGncvKjNgQcfg6m3WUmuwamJImOLGgunQkYj2T/QKG6BPjJISMq5oT2pI/jY1loC2 wrCg+ERAD4zEg9rXiJnRyaBcnoR9XuJtE3p1Cd0sEWcmWoWnXWZuX6x4wtnOvN1d/GefMDhhgOm X+T0oMGTgPP0wLqfK6XZBgX4nOnJvvpIaAhaB0qWgRPI1Prw0eCmylTNloshrXMinz3Zv7K0mrP zaZZOW88hJC6AMkDf4n6A+c5eopGjVHNgsbt0U/ABZt30Y0ndDqQwWw02ZWc7atEoz4u+s9MAzD HU6D03UF8NEmFFvFHv6FXUA= X-Google-Smtp-Source: AGHT+IHlnIFRUHNy4Pv8cos18vLNYdATiWlvlgAGSIQwUUTZUpNqTfhFg+S88Fft5a+ZKQPZyT7Z3g== X-Received: by 2002:a05:6512:2384:b0:53e:23ec:b2e7 with SMTP id 2adb3069b0e04-54414adfaebmr3141413e87.34.1739077608720; Sat, 08 Feb 2025 21:06:48 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54506ef1733sm245576e87.1.2025.02.08.21.06.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Feb 2025 21:06:47 -0800 (PST) From: Dmitry Baryshkov Date: Sun, 09 Feb 2025 07:04:45 +0200 Subject: [PATCH v4 01/16] dt-bindings: display/msm/hdmi: drop obsolete GPIOs from schema Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250209-fd-hdmi-hpd-v4-1-6224568ed87f@linaro.org> References: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> In-Reply-To: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1225; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=BXA7Q9IpU3LJo5o0YQp3oC/xe/tm2VyAy8ivKO92PBQ=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnqDfhD1AdF8cdaEFbZcUVUS48D8BueW7S4NJjP m99fsTsa8mJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ6g34QAKCRCLPIo+Aiko 1UjqB/9FEXBtULbRjjbPI2zjBtvnostnj5+h5M5uFG+qcq1zFtALCl0x1N5gtOoekLyqo4wWRO8 pm+HZ10170lI47GVEPlWbenUymsUQLGvEXx62AaHWZOLQ+peYt3EPJyrGaCRAk+ck635Ewh6olI erz99ab2bo/ggk2quQvQ4jzbw2cCWnm+HxsPjvxw38guV+w1YmqU8jGXfOmn7PgnM235jR/PiEs AydsPxkkK6SYICEpdFWJl2RcHmBqxCAtETjF6I+U3SPBT5NvEm8HeZeXNr2DeLp4fQlYlWSlAii rC2DEgtxa7xXBPhqjINBQTnuKu9LthaXvCgHcbl7D5+CBhzE X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A The commit 68e674b13b17 ("drm/msm/hdmi: drop unused GPIO support") dropped support for obsolete qcom,hdmi-tx-mux-* gpios. They were not used by any of the upstream platforms. Drop them from the bindings too. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/display/msm/hdmi.yaml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/Documentation/devicetree/bindings/display/msm/hdmi.yaml b/Documentation/devicetree/bindings/display/msm/hdmi.yaml index d4a2033afea8d4e4f83c9859f8840d30ae9d53f8..7e6f776a047a00851e3e1e27fec3dabeed5242fd 100644 --- a/Documentation/devicetree/bindings/display/msm/hdmi.yaml +++ b/Documentation/devicetree/bindings/display/msm/hdmi.yaml @@ -66,21 +66,6 @@ properties: maxItems: 1 description: hpd pin - qcom,hdmi-tx-mux-en-gpios: - maxItems: 1 - deprecated: true - description: HDMI mux enable pin - - qcom,hdmi-tx-mux-sel-gpios: - maxItems: 1 - deprecated: true - description: HDMI mux select pin - - qcom,hdmi-tx-mux-lpm-gpios: - maxItems: 1 - deprecated: true - description: HDMI mux lpm pin - '#sound-dai-cells': const: 1 From patchwork Sun Feb 9 05:04:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13966652 Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6408E76034 for ; Sun, 9 Feb 2025 05:06:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077614; cv=none; b=YqeF+YZEoHqTAK/M2LZlsVx0oEjRWqQrcxwFXl6hpzjgM/Zfth0NpEpXc1QtssvTufA4YM/9Iq8KM+2ea698xoPemIQhfASRo9DFoIKF78LkItpi3ITpkr7LAo89tRn3YoeSn4ZOp++5dMhsAaweoJtsxZC06SJEKTHRTahF10s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077614; c=relaxed/simple; bh=NLSCP5E6ORI9H0QuM74oVHUl+a0F/vNbAQWYghqkTiw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kVhyYqm+zR7eEX9S2hD/nSAoIfMry/eq5urtos3izm/WGab7EIQHNe+6/Zz64CsCacwX3hxL/s4rcHTrB2AWN88iMtvOJkDM2yZ+4KM5aOkbmhWWEoba8Q4GLbaLQRVcekHyDlxJHDncy/ibtmt6tti9SHZE2NXhQDdyfBfvfys= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=w0JhIudh; arc=none smtp.client-ip=209.85.167.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="w0JhIudh" Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-543e47e93a3so3687866e87.2 for ; Sat, 08 Feb 2025 21:06:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739077610; x=1739682410; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=nTcdagHfVvJWdpzLDW5hzkEO6YN/7LPqkZiqmOtMZH8=; b=w0JhIudhmULBLKKGr9xFhxltuB1kZTIrqTvMYfwXDtrJzcik+WPA92TTLCiS+vqb9X XMXuD4riEbLT/EH/ZsdydrhH+uFmKx8mKomxyIfAZOhGdqb7pQ91YhlO0FjeXvl9tBri PlwfUXILGrEkNsAAdvBTZEPxtMU1PDgyq8cB1Aabh8GpkvKzCQgfV483qymlVL4Vn5a1 DRSFX72FpMl+Cb3CaDOInb6NNy3d8DrC6efHt3bopcVRQ1w+BpOlBy2tG8wmRYVC5gME NDADXqCpd+6QeULYQfrhT+e4W7fPrRIBcWWqZdK2hrW0WT5AXHXlAzd0xjb3AAnOm6dD icNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739077610; x=1739682410; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nTcdagHfVvJWdpzLDW5hzkEO6YN/7LPqkZiqmOtMZH8=; b=d1vitgk0of1IkrWLcxR5qnZGqC0RDhPKshIC8CiZ6H/tSNN6Sa0+W1mY4ZavtOzYCu zbci3rbb6rJplj2wWsjhZ87RwhJOhG62zpDxDThczZdZ3cqAhfwWSUvggElL7K3v1LJv gZpXOghvJPanlv/hKTEcIyod12VV5PX3Zxf+7f4m/bh7eo9zQvIf6V/zTnfCA/lszTur RfNxRfxlFyYzSg3SHK1I3H/QeGXD5jHauAdi2t4x2/2iF/6lSvYtqwQN3XYIFK/9XJ9R TQdGyTRdIIkNuTTNWShqBmCHadd6yhxf8oTiGscY7aniVj03iXRuYzHpTvT2GF7vjugW 30qw== X-Gm-Message-State: AOJu0YwLexJ3TXBixEm2yVeFQ9LSjM+PKLsR8PH+Ntnh0rkKUWEdxd28 iZY/TTmtjpjObfJICjmc7fAJkvMxOTWKY6XfdUn6bdfP7n9Dt342WOp9ppYgR+KzZj5mVMRBdiX /ZT0= X-Gm-Gg: ASbGnctp/XKeotJQ/SrKLQo/jsICo3EF59gNdeGW72KeM/jrLxdJ8g6/9jTZ801V2nG EoJe7/n+/GrRWPIjEohlzRhval7F/wGI0VYRmydyL8zzI/dAPuaqnynYg52Zvo5bkcmITGoiVsF /rrk3VNzWznjMOYqJ1tKnnXJ6R14TPcvfsdusNK+f3SbKWyrUj8YzIot05lIpHeNsdcYaAn2ut1 EkfaPwmmwWD2aJIeByL4SAngO3cxNiNTuZ9lr1ofRsR1FckIufuCZ9OAwJkQLgEd4Ix7Zdxv0fy E7oOu5LVTWHyXVoFaOdknMo= X-Google-Smtp-Source: AGHT+IEFXe5K8k+ix/TTKVKq9EFeSW9km/qit2DCh/DLsirowioK0KDRuuwtMc/zx6EiGq/Gs8hrxA== X-Received: by 2002:a05:6512:2205:b0:545:576:cbd2 with SMTP id 2adb3069b0e04-54507bfa112mr584003e87.10.1739077610224; Sat, 08 Feb 2025 21:06:50 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54506ef1733sm245576e87.1.2025.02.08.21.06.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Feb 2025 21:06:49 -0800 (PST) From: Dmitry Baryshkov Date: Sun, 09 Feb 2025 07:04:46 +0200 Subject: [PATCH v4 02/16] dt-bindings: display/msm: hdmi: drop hpd-gpios Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250209-fd-hdmi-hpd-v4-2-6224568ed87f@linaro.org> References: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> In-Reply-To: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1438; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=NLSCP5E6ORI9H0QuM74oVHUl+a0F/vNbAQWYghqkTiw=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnqDfhYclpOw8R2du6T24MrpOm7QjiPhE/g7GXP i/M4vlXimmJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ6g34QAKCRCLPIo+Aiko 1bNlCACw8jnIu5ritWEfsFqRqlft4maCais+D8f7xJZLStAU3zaKpA81oDi+4en7jDRNdsZKwTR gggCP29ILVZoZGLRsfYrFUbdVnSjGejPVwCyXS/x4+tby9pkAeheeDOhHxx3F1+XL4FWqUv2sdR RS/kMmNkTQI//eK08wp5ld2x+RDs66f/J21yrExwXeahWL9KacJuD1P1PRPUTIQCzsNw834YPny exHq0VzE1nH4db6YwrCrf4+h1hoz2IIXXh2LAIjesZE1cT2n426Kv5wR96kCUi0Ovzz++zkiiGR uwA7gar7slMJunZwgXtK5+AflEVpxjcM8yBfnXpM4OSqNowq X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Supporting simultaneous check of native HPD and the external GPIO proved to be less stable than just native HPD. Drop the hpd-gpios from the bindings. This is not a breaking change, since the HDMI block has been using both GPIO _and_ internal HPD anyway. In case the native HPD doesn't work users are urged to switch to specifying the hpd-gpios property to the hdmi-connector device. Signed-off-by: Dmitry Baryshkov --- Documentation/devicetree/bindings/display/msm/hdmi.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Documentation/devicetree/bindings/display/msm/hdmi.yaml b/Documentation/devicetree/bindings/display/msm/hdmi.yaml index 7e6f776a047a00851e3e1e27fec3dabeed5242fd..a5ff7045a14be3b8106b3edf0033a8028a684529 100644 --- a/Documentation/devicetree/bindings/display/msm/hdmi.yaml +++ b/Documentation/devicetree/bindings/display/msm/hdmi.yaml @@ -62,10 +62,6 @@ properties: core-vcc-supply: description: phandle to VCC supply regulator - hpd-gpios: - maxItems: 1 - description: hpd pin - '#sound-dai-cells': const: 1 @@ -178,7 +174,6 @@ examples: clocks = <&clk 61>, <&clk 72>, <&clk 98>; - hpd-gpios = <&msmgpio 72 GPIO_ACTIVE_HIGH>; core-vdda-supply = <&pm8921_hdmi_mvs>; hdmi-mux-supply = <&ext_3p3v>; pinctrl-names = "default", "sleep"; From patchwork Sun Feb 9 05:04:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13966653 Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6AEE146A60 for ; Sun, 9 Feb 2025 05:06:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077617; cv=none; b=PCagsNqaO2GTx0/+knASVMdMh+fyVHcvPZoO29zzsc3JE/CgZDoSzyvHIW/PM10uTLemLLfsblNROWaGfgiORbrFjYnuo2wm4xVxY+V7CWAqPAfGLo16wB3xyZYxM5I/ICxNBloifErM6qsg6M8g72i81fX4virXq8Q/AFB0/Nw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077617; c=relaxed/simple; bh=V2+u0bC4oPjC0u3tfxjS0BIJRTLcQO+x+kAXxGzeCl4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DGVa8kah9TSNcmWHercjqUNN7rFLSngvCm/pjRi7z5veoxGTAiaCMTz2SxgLlawsE8UL6aU5KQwPyty+tt9lo3FeyOR8A4ZPImyJfAUBRzWexQ172c7GDPZW4zzQ4X8A3vYdYSVrG3oTpIBXURrm3JO2tiT2KeUH/2DRX6ulLio= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=gELAjhaZ; arc=none smtp.client-ip=209.85.167.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="gELAjhaZ" Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-545064389d3so812020e87.0 for ; Sat, 08 Feb 2025 21:06:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739077613; x=1739682413; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=B1i3ljPbx6n5V5EZfIVWiBHAB9nww5tkVOh9CuEMj1M=; b=gELAjhaZ2YiKFSkDHFiEjeLvW9eXDJ1KGvZbbbEc/X7osJxkhKtAXTKYKwnzIE39y7 VA5wiKSGuhch+CFYn0hFVAsv75zGYoPo/vkadj6eW6JvenizcGMTNeOeo/tomFiFrhea 5NLAKbL11tYoZ8aAg7omNKgAO2TSafSaMcnFOEuXjPcMj0FM7J40qhbZhL2nY2Ug31og CCXVNA0QbkVLDMcRsQBTQqUMP+KcNdLtSCgx7QFKVGdPXtwMDNg0iLCjPml/+rIG7535 RZKr6/DFeIdM0RGbQgfxR6D5yyhRKhZ2DGS5iwASsKvW2zsY2UaFrQ9lwhj/K0nJdVAm BE5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739077613; x=1739682413; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B1i3ljPbx6n5V5EZfIVWiBHAB9nww5tkVOh9CuEMj1M=; b=s6jceLIgT+qnVrrjlQ0oiOgoTy0qlfd323xW5DlL1/26W4y63YTb5BJkYM6AhkSKvq zUkTg9be1UKaSQM8IoQuCk5Jrk0M97QF6JfY0/gOkQYgvh2ySVU7xCNFmjfj/l8/UynT ND/08Y8kPA/LTaoPUWvkt3Tpsio7gkBthRcnsdKfgLiaKTYXtRTSpJ2JOZiw9FtphPdA O+GML1SH4NX09PYiwmSkOzXwVTc6BZeY0VzGlz71H+YarB/QHeo1uYSJ0HgSAm5ds0d3 7TvUB0/XeAxboMj42mqsVDOXsLQZ9tZaUagSzekefNn8jI6YJ7/xQLI1TD7SIH3OJkm9 ikRA== X-Gm-Message-State: AOJu0YyQaOL8CWPjn+Jd78OSyaCmTLWhlTn+04IVDYbbbapYdPMWYz0t 0OI5kLh5qNk9/Baqg6C9EdsLshkQCMQKyR3XCLugbmfUj7FEfUPifnNo2tLmhCW1vcfHjdGraXD 3pLA= X-Gm-Gg: ASbGncsM37yPQKDxnvle77t8tUFCMSglWJyuleNnpDj87/AGMbCgH/GWtGfJ2EVqZZl GU8veApAmRhMY7anCI5/jzp88rE6Jh/sC/im7T4Z3YyFITIHmDcJ2QbBvhktVkvWu2i23bo99UH 0NwZE03/5w1PU+h9vYxS0baqIwkJTuAwucS1Q55x9U06WwgsvtQuFOqn0DNz90RdvsbDhhC0hQV uAl4g2Eul2rs3nwyxFeqaTMWMeUM2yvloevp0WzPwlxVruMcRD2B24adpb1ESdr1lganlojMiq8 5Xmtj5MZFMDg4S/fUq3rvDE= X-Google-Smtp-Source: AGHT+IHhrPXiDJCWG6hpdLlaVYwDxoqtPiYGeBTQzAk5uMXShtQkmyqWTzBa2iy7/Jghy3XHQJdKLg== X-Received: by 2002:a05:6512:6c6:b0:545:a2a:589 with SMTP id 2adb3069b0e04-5450a2a07f5mr166047e87.52.1739077612585; Sat, 08 Feb 2025 21:06:52 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54506ef1733sm245576e87.1.2025.02.08.21.06.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Feb 2025 21:06:51 -0800 (PST) From: Dmitry Baryshkov Date: Sun, 09 Feb 2025 07:04:47 +0200 Subject: [PATCH v4 03/16] drm/msm/hdmi: convert clock and regulator arrays to const arrays Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250209-fd-hdmi-hpd-v4-3-6224568ed87f@linaro.org> References: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> In-Reply-To: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2818; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=V2+u0bC4oPjC0u3tfxjS0BIJRTLcQO+x+kAXxGzeCl4=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnqDfh2U+hzoadQ+a4byMFO75tIEaeUu43yMPSa iC0d4FmLmCJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ6g34QAKCRCLPIo+Aiko 1T1FB/9pRpx/pOBOFh/T4LCyxNxh51SDyyHMf7w5RwtVQUYYvUl6RPPtKbYZX6F7YFIczn7O7M3 1gfOvnRH65inkTaEF2DZBWuCJipdG1GEYIWjC88ltJxAm99olN1LBL7YLMiJzWzhDG8j4cNGDS/ 127blgDqZ452VTRN+ZtNGgTaRGermUVSGfSpF2solm3/zCP8DsgEIGbke6BpZQAE2Gm2VWOYPlS /atMVixdLSgxMBdaayyA9p1ngVbm2hYara+DNebVlfi5L+RDAoBsRKWgydKADOnz/hmZDtW52EC WDo18zCKmEjFb8BKbS/IpcYJMxaCpqA9nUlKPpj4e7vV3SCP X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A As a preparation to the next patches convert 'static const char *' arrays to 'static const char * const', as required by the checkpatch.pl Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 10 +++++----- drivers/gpu/drm/msm/hdmi/hdmi.h | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index 248541ff449204c72cd444458dadb9ae4a0a53d1..9e9900882687fa2ae4a734d5cf10b5bae5af2f87 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -224,17 +224,17 @@ int msm_hdmi_modeset_init(struct hdmi *hdmi, .item ## _names = item ##_names_ ## entry, \ .item ## _cnt = ARRAY_SIZE(item ## _names_ ## entry) -static const char *hpd_reg_names_8960[] = {"core-vdda"}; -static const char *hpd_clk_names_8960[] = {"core", "master_iface", "slave_iface"}; +static const char * const hpd_reg_names_8960[] = {"core-vdda"}; +static const char * const hpd_clk_names_8960[] = {"core", "master_iface", "slave_iface"}; static const struct hdmi_platform_config hdmi_tx_8960_config = { HDMI_CFG(hpd_reg, 8960), HDMI_CFG(hpd_clk, 8960), }; -static const char *pwr_reg_names_8x74[] = {"core-vdda", "core-vcc"}; -static const char *pwr_clk_names_8x74[] = {"extp", "alt_iface"}; -static const char *hpd_clk_names_8x74[] = {"iface", "core", "mdp_core"}; +static const char * const pwr_reg_names_8x74[] = {"core-vdda", "core-vcc"}; +static const char * const pwr_clk_names_8x74[] = {"extp", "alt_iface"}; +static const char * const hpd_clk_names_8x74[] = {"iface", "core", "mdp_core"}; static unsigned long hpd_clk_freq_8x74[] = {0, 19200000, 0}; static const struct hdmi_platform_config hdmi_tx_8974_config = { diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.h b/drivers/gpu/drm/msm/hdmi/hdmi.h index a5f481c39277631b7a19d294b086d6208be26511..381f957b34305494cb4da0b7dccb73b6ac3a1377 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.h +++ b/drivers/gpu/drm/msm/hdmi/hdmi.h @@ -84,20 +84,20 @@ struct hdmi { /* platform config data (ie. from DT, or pdata) */ struct hdmi_platform_config { /* regulators that need to be on for hpd: */ - const char **hpd_reg_names; + const char * const *hpd_reg_names; int hpd_reg_cnt; /* regulators that need to be on for screen pwr: */ - const char **pwr_reg_names; + const char * const *pwr_reg_names; int pwr_reg_cnt; /* clks that need to be on for hpd: */ - const char **hpd_clk_names; + const char * const *hpd_clk_names; const long unsigned *hpd_freq; int hpd_clk_cnt; /* clks that need to be on for screen pwr (ie pixel clk): */ - const char **pwr_clk_names; + const char * const *pwr_clk_names; int pwr_clk_cnt; }; From patchwork Sun Feb 9 05:04:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13966654 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 207D71494A3 for ; Sun, 9 Feb 2025 05:06:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077618; cv=none; b=b16p/gLnOiY/ld9oMlC9ViqcsxEjPEQask3N+ROk/z7ai/t4K0dujvycaiLGOtMAaK4ee22oFQAnqBBZxbZbDI5rQ1susI0cMI0ohvonN4m1pm6ULhGp4uJDpZhparzGxrhlRby73EeUQep0Uw47GrJsssB2FHUU7HT/FiYA/jk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077618; c=relaxed/simple; bh=OUSREmRh8249bUIyNnvM4Q8G4H+YLOauuOGWEq+Beno=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rZPljdP2HAkcUi7HqD9rnd53lDJYY3wqGc/3sfQeipXptyM0aCHuby51uAgDSmb/KN/aAlGqzqr4rI25+PbETqc1X/JXXIDwcglbvZSdVydcaHzkHZqzVItz4HP1CXsdezYpmjEI8QsdDpEjhqJPid6YDIuq3iiXo6vd2al/LkY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=a9wAmLdl; arc=none smtp.client-ip=209.85.167.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="a9wAmLdl" Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-545075ff6d5so596012e87.3 for ; Sat, 08 Feb 2025 21:06:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739077615; x=1739682415; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=1AAeD9frqy9MnpNfuI3r6PeuD8rDrjcizDGW4I0IbQs=; b=a9wAmLdlODoVf7ankI6NPYcgu2dYf4M/Ra2dhuwghfTNKSmzYhrYDEYJ5mj0IHycdJ /S+IWoFEXZyltu3WHC6bPF+PzGNRxTjr+fj74lTK808LrkT2kUrxUglV61zTmoQfrM8N sMA1sjwn0w3iLTpfQU5L7LodFVjz1M/w80NITnAZVIw9FSFh8UIDU+gvw1TeJKtTVWmo MABiee2mdnnvaXblVzdiz2Ey40HGQGX71thQYAWdki8/a5zZq5Vxpe0NYe7yxCwj8OCW W9gfBxTWlMiBOYS3moWkJDP97UCvdt83kfIPYHUfHIH+xUxC50CskSVs7myQgBlRqa/c ehmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739077615; x=1739682415; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1AAeD9frqy9MnpNfuI3r6PeuD8rDrjcizDGW4I0IbQs=; b=g9fDFBa8zdzpmMrxTW0wDS5INihsn3Y9ioUTLcfUlsLi+kSxQdNisBYCmrEGODv5G7 pIACw3lOZza2DEXazw2mVaqVy9SXDSyFKd9UXHBPo29jwxd6HzseHuL4oD+IHMZ6Uf0P nMujVWdqiyBWNWLey6Lk4KSWMLQ25E8zdYgXBtknmfLtWBSn2n2NwWtKF/GnFoD7NLON uve7UX5GCJkVMIR9jIgWmYpn2oGgeKhdH60yArvb2Hzue7KVOrCZJoF9H+nCPnqLwaPg 3kN4acKeHVl6u8V0HYI91RgqTJ9NtEk8K9k4SWDbVWx3VJuW4MSU65SvxgyqB8VFqUJP 82ow== X-Gm-Message-State: AOJu0YxGItyv3zc9xI1USnGy8QKcQ3OK3s6xU0BO+ln7dv9ShbiTXv9u 2X1Qyay3ECthDRgE2T790c02ywRMR4IT53WcRMC6yYezcg3AoX8GxQfVip2McAqH539dmAmeeMo 1aAI= X-Gm-Gg: ASbGnct0CHeoqLefN4fj9kdh2o5Y8LI8zQbjdSef+6VlNrM5T/h0fMvJZZsW/rPRmNo 0+If6f+Px1G3VsGgq5I+6Rw/33kQ7HUhPyG4uz+buy61qTFXnGtZM7DAfOcY/uUa+T7kmTz6zHQ TVs3GTnkSeZEgH+Gev9U/AIGhWTbJRPQOAZWy87B9Vbpep2cEnSHzEgp2r2uOHmoZU8drntkn0o FpShyfEgao7WxGveN6xPnl2Q3usaI270JH0B+lHgw0GhBlnOzmynIOMcHfrQPEKFfUgdAFX5FUn /1CmAt5mLKVtnoqR12cxZMg= X-Google-Smtp-Source: AGHT+IHoMxcCBB3/q2EUvXQ2y3klvPHcidMt7fEpaXFDlyTHpWqmGJ7+95RCxDEc3CZ4CHzL5p6Auw== X-Received: by 2002:ac2:4bc8:0:b0:545:a2f:22b4 with SMTP id 2adb3069b0e04-5450a2f235cmr130427e87.40.1739077615007; Sat, 08 Feb 2025 21:06:55 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54506ef1733sm245576e87.1.2025.02.08.21.06.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Feb 2025 21:06:53 -0800 (PST) From: Dmitry Baryshkov Date: Sun, 09 Feb 2025 07:04:48 +0200 Subject: [PATCH v4 04/16] drm/msm/hdmi: move the alt_iface clock to the hpd list Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250209-fd-hdmi-hpd-v4-4-6224568ed87f@linaro.org> References: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> In-Reply-To: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Jessica Zhang , Konrad Dybcio X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1513; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=OUSREmRh8249bUIyNnvM4Q8G4H+YLOauuOGWEq+Beno=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnqDfhWz/CrQ1d/HHvst2lncBwAPX4lxjbBGU1H wXo139WGVKJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ6g34QAKCRCLPIo+Aiko 1WjnCAChqMBfU9rKnaYHnLee7/bL11OLC8o/zUyr3P+zOgN+/97oXVe4pOVffirjbqRLHATL42F mp3/GOvvSMbiUCMFzWAJdIwnoo04JMqkxdtcRy36uAD9bbe9+CSr2hMFOHieDLRfXNWv5iDxKWm wmFhKpeNgShtGZBC8ZP4br6XUjWwzQIStzZjVME2C6843mvq++Ph++Sq7Nyhui5Bgk5CmQbyOVi fnGsteCUmKIG8klFqtxfqqxy7B06KDXRz4sdRNe0j5XAQsZHOt/ZNrNuYjSx2FztvJEx7qPZy6r nbWC+Z2TjZGdPzCgheIg8736D5bkF2IMNJMkkQwTTCHoCpL4 X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A According to the vendor kernel [1] , the alt_iface clock should be enabled together with the rest of HPD clocks, to make HPD to work properly. [1] https://git.codelinaro.org/clo/la/kernel/msm-3.18/-/commit/e07a5487e521e57f76083c0a6e2f995414ac6d03 Reviewed-by: Jessica Zhang Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index 9e9900882687fa2ae4a734d5cf10b5bae5af2f87..ebf9d8162c6e5759a3780c74354b6c159598750f 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -233,9 +233,9 @@ static const struct hdmi_platform_config hdmi_tx_8960_config = { }; static const char * const pwr_reg_names_8x74[] = {"core-vdda", "core-vcc"}; -static const char * const pwr_clk_names_8x74[] = {"extp", "alt_iface"}; -static const char * const hpd_clk_names_8x74[] = {"iface", "core", "mdp_core"}; -static unsigned long hpd_clk_freq_8x74[] = {0, 19200000, 0}; +static const char * const pwr_clk_names_8x74[] = {"extp"}; +static const char * const hpd_clk_names_8x74[] = {"iface", "core", "mdp_core", "alt_iface"}; +static unsigned long hpd_clk_freq_8x74[] = {0, 19200000, 0, 0}; static const struct hdmi_platform_config hdmi_tx_8974_config = { HDMI_CFG(pwr_reg, 8x74), From patchwork Sun Feb 9 05:04:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13966655 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B806714F123 for ; Sun, 9 Feb 2025 05:06:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077621; cv=none; b=Rj/1lAHHR/fU63t+mWUiLnZGyoqElstGblOusZwdywoEss5JWTVr+R3UzCDrrYTNQkA9cb5pBSW0+vDYITYvdHbTaPsuDS+lZGPnMmPBIOn83WQ7NJTqNvBFP7tlzzDftor7r/chYbU0r7IAlhbzflMGziGDwU05BHU5UtB1wzU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077621; c=relaxed/simple; bh=lyckA7kqwdCOpoWzdS9geiJQOjeKrHmmotNRUjdCT80=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZvhzR7//jPpxJSdgcSMfxNs9InwE5FVeNlVZ5pDHeHWgHteqcN6A5GlxCFpwMT1Snl1b6xHGmNk4oROexzPYXAH+iUhZrb0z9rmsvCFTvSUdQ5RDGIL/zd86TwB6b8zMB/ilAnLwQ0i69ihGSlsi4bFDUerXThTqGslG+QZAg54= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=n5Yp1s2x; arc=none smtp.client-ip=209.85.167.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="n5Yp1s2x" Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-543d8badc30so3776121e87.0 for ; Sat, 08 Feb 2025 21:06:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739077617; x=1739682417; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=x7qjil7rgOn7oZkjNx8dve7sM36ikTyiP8M9F9/koAE=; b=n5Yp1s2xHrkovJ57xbCMrxu/XtTW+TZCOwKW3fkDqPQ+ohywNZBh6wJNEQX7OjIzj0 m2m1GgzBCe/+jbFqAkDCSoaK0YlwbfCJZYl033geksVCLz5V6vKkl+I9u90f+icd/uSx TsFegWyuyn+D41StXFDKCgStv+04R26jAQG2rf+MVjuzeW7UGzWuVecKBfeYwBEd0KgB Uf7LtQWoMxmI8pgHEPxe2wps7dlO6aARoRz9eoEqYCtyP27bEa8FMNRc8I2zVXULnF4P Z2sKDa38hbfE2hWr2YhWPlDBBXGzejL5HYaEmR8sxmiOGIG4b4ZizhPalTCqMg4H+gjc LBqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739077617; x=1739682417; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x7qjil7rgOn7oZkjNx8dve7sM36ikTyiP8M9F9/koAE=; b=wLyJWqyTZaFbLGHDW3le/GM1a8Ulrb6s2qrTBQCvdskKdwbdK6NaT3V12vbjT7aT59 nqKiEpnMoC1I/kHLEmpQitI+HhK2ar9Adj0eH0fO4v8DUUnGoHuSAQATRNrGea7xlKNu yNF4anSUdlrdA6lYVGwg9cqI5N7ENOB/5rqynMqMoalYT8x2L1bxO5maAS4tT6Fspk5Y StEoXCUV0YrX1lP2sLx2anT4npJLBERXSllL32kkJMBfjpyfrmG71FpO4g22/nSdl9Ye DClmLuMtwDA9fFrbKWKwXtkBWmB9/eK27tagLJL6uRLJeoEpndILKXP3eYDXtT2uSJxd hWEg== X-Gm-Message-State: AOJu0YwDmNRsWYvgIo+j7zKv8oWeHE3+il8f8ydtAXvuJld121F5GQla wiivmBfVjtoWflt036nRJ1e0cLlyc9YTwjGroGXoOjuxbtrfT7z7bHK+lX7YiYhSCUONxB0TVpR xl1o= X-Gm-Gg: ASbGncuQmG6fVWwr7WTZ9GuUvENys+/OGz8WVgCY+6V9MyBNoEz5OGvkN5gWEFsKwDG HkADoEGGNHwRx9WnBz8dsXAhCxxRAAxMW3S1jWy2sdhL5bGgfvzHcCzUluQPrH6kkpwaYxvI9PT Yugo9fLY9M8lSlFaubKRqfoJj7V+vPA8mlHBustBwbwppfhfcANeHFHvZ93qNwmrcWaP8S3PEyd jbf9qKeuGW3mrdyZiX77MHdv+MPR/4chGzfBTFuP8wIdNUrFTv2sPptxYkP2id8uyBCi1IiGJbq SiHXE4O+KS+jnNOMc2JxNzI= X-Google-Smtp-Source: AGHT+IEEPtccdcT7Ef99Ozj8sRrzPnEhuDX5DsEvKNMxHN8EYfEuGMpD8u3GrL9fY/zkbjdrM/Gavw== X-Received: by 2002:a05:6512:3ca8:b0:545:61b:c84b with SMTP id 2adb3069b0e04-545061bc89bmr1187558e87.32.1739077617449; Sat, 08 Feb 2025 21:06:57 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54506ef1733sm245576e87.1.2025.02.08.21.06.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Feb 2025 21:06:56 -0800 (PST) From: Dmitry Baryshkov Date: Sun, 09 Feb 2025 07:04:49 +0200 Subject: [PATCH v4 05/16] drm/msm/hdmi: simplify extp clock handling Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250209-fd-hdmi-hpd-v4-5-6224568ed87f@linaro.org> References: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> In-Reply-To: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Jessica Zhang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=6078; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=lyckA7kqwdCOpoWzdS9geiJQOjeKrHmmotNRUjdCT80=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnqDfizFk1uavvJWAFXSYAkhVRCeSV2smGIPdAS xifAYnKnS+JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ6g34gAKCRCLPIo+Aiko 1cQeCACZnTX0v4MU2UK606g1ONwoIjgtOtw2Ht6fyCis/KdSnzhP9NrZKnzvgJm7ZKC9eFbuYPi A7+aSFhNNE3RWmhPwrrKJHbUQXYwxA545Y5FcGjC4Mhz9OFoKrviim6zmyluduG9ZzQTfvcmC5x s1hzibUL1V+mzH/Pc7kV5q1cYjD8ZgQz3M9w2+Ubh8+BikGjJ+2vUYAaqCVNQicCfwtMA5BKprN BIB40PxkKAN2br08i+l/8REMhbhwupsTqJNyco2brXZgy/JYssUbb6NakX8MeHCns2ybGRjqfU3 /n/ny5R6jB1Ko2LHYGOV3uXC6fWgxotUJyqH1fJG+yat7rNV X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A With the extp being the only "power" clock left, remove the surrounding loops and handle the extp clock directly. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 24 ++++-------------------- drivers/gpu/drm/msm/hdmi/hdmi.h | 6 +----- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 33 +++++++++++++-------------------- 3 files changed, 18 insertions(+), 45 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index ebf9d8162c6e5759a3780c74354b6c159598750f..104f9cefa14834d04fb957eb48777e605d1e29a5 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -233,13 +233,11 @@ static const struct hdmi_platform_config hdmi_tx_8960_config = { }; static const char * const pwr_reg_names_8x74[] = {"core-vdda", "core-vcc"}; -static const char * const pwr_clk_names_8x74[] = {"extp"}; static const char * const hpd_clk_names_8x74[] = {"iface", "core", "mdp_core", "alt_iface"}; static unsigned long hpd_clk_freq_8x74[] = {0, 19200000, 0, 0}; static const struct hdmi_platform_config hdmi_tx_8974_config = { HDMI_CFG(pwr_reg, 8x74), - HDMI_CFG(pwr_clk, 8x74), HDMI_CFG(hpd_clk, 8x74), .hpd_freq = hpd_clk_freq_8x74, }; @@ -369,24 +367,10 @@ static int msm_hdmi_dev_probe(struct platform_device *pdev) hdmi->hpd_clks[i] = clk; } - hdmi->pwr_clks = devm_kcalloc(&pdev->dev, - config->pwr_clk_cnt, - sizeof(hdmi->pwr_clks[0]), - GFP_KERNEL); - if (!hdmi->pwr_clks) - return -ENOMEM; - - for (i = 0; i < config->pwr_clk_cnt; i++) { - struct clk *clk; - - clk = msm_clk_get(pdev, config->pwr_clk_names[i]); - if (IS_ERR(clk)) - return dev_err_probe(dev, PTR_ERR(clk), - "failed to get pwr clk: %s\n", - config->pwr_clk_names[i]); - - hdmi->pwr_clks[i] = clk; - } + hdmi->extp_clk = devm_clk_get_optional(&pdev->dev, "extp"); + if (IS_ERR(hdmi->extp_clk)) + return dev_err_probe(dev, PTR_ERR(hdmi->extp_clk), + "failed to get extp clock\n"); hdmi->hpd_gpiod = devm_gpiod_get_optional(&pdev->dev, "hpd", GPIOD_IN); /* This will catch e.g. -EPROBE_DEFER */ diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.h b/drivers/gpu/drm/msm/hdmi/hdmi.h index 381f957b34305494cb4da0b7dccb73b6ac3a1377..3314bb8a09d6bea7e34ad9050970bf43c64d1558 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.h +++ b/drivers/gpu/drm/msm/hdmi/hdmi.h @@ -50,7 +50,7 @@ struct hdmi { struct regulator_bulk_data *hpd_regs; struct regulator_bulk_data *pwr_regs; struct clk **hpd_clks; - struct clk **pwr_clks; + struct clk *extp_clk; struct gpio_desc *hpd_gpiod; @@ -95,10 +95,6 @@ struct hdmi_platform_config { const char * const *hpd_clk_names; const long unsigned *hpd_freq; int hpd_clk_cnt; - - /* clks that need to be on for screen pwr (ie pixel clk): */ - const char * const *pwr_clk_names; - int pwr_clk_cnt; }; struct hdmi_bridge { diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c index c6659e62594558b3c0c25de36aa8c459aa253834..6c5bbd772700b0362f884a737598d7bf419adf9b 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c @@ -19,7 +19,7 @@ static void msm_hdmi_power_on(struct drm_bridge *bridge) struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge); struct hdmi *hdmi = hdmi_bridge->hdmi; const struct hdmi_platform_config *config = hdmi->config; - int i, ret; + int ret; pm_runtime_get_sync(&hdmi->pdev->dev); @@ -27,21 +27,15 @@ static void msm_hdmi_power_on(struct drm_bridge *bridge) if (ret) DRM_DEV_ERROR(dev->dev, "failed to enable pwr regulator: %d\n", ret); - if (config->pwr_clk_cnt > 0) { + if (hdmi->extp_clk) { DBG("pixclock: %lu", hdmi->pixclock); - ret = clk_set_rate(hdmi->pwr_clks[0], hdmi->pixclock); - if (ret) { - DRM_DEV_ERROR(dev->dev, "failed to set pixel clk: %s (%d)\n", - config->pwr_clk_names[0], ret); - } - } + ret = clk_set_rate(hdmi->extp_clk, hdmi->pixclock); + if (ret) + DRM_DEV_ERROR(dev->dev, "failed to set extp clk rate: %d\n", ret); - for (i = 0; i < config->pwr_clk_cnt; i++) { - ret = clk_prepare_enable(hdmi->pwr_clks[i]); - if (ret) { - DRM_DEV_ERROR(dev->dev, "failed to enable pwr clk: %s (%d)\n", - config->pwr_clk_names[i], ret); - } + ret = clk_prepare_enable(hdmi->extp_clk); + if (ret) + DRM_DEV_ERROR(dev->dev, "failed to enable extp clk: %d\n", ret); } } @@ -51,15 +45,15 @@ static void power_off(struct drm_bridge *bridge) struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge); struct hdmi *hdmi = hdmi_bridge->hdmi; const struct hdmi_platform_config *config = hdmi->config; - int i, ret; + int ret; /* TODO do we need to wait for final vblank somewhere before * cutting the clocks? */ mdelay(16 + 4); - for (i = 0; i < config->pwr_clk_cnt; i++) - clk_disable_unprepare(hdmi->pwr_clks[i]); + if (hdmi->extp_clk) + clk_disable_unprepare(hdmi->extp_clk); ret = regulator_bulk_disable(config->pwr_reg_cnt, hdmi->pwr_regs); if (ret) @@ -441,7 +435,6 @@ static enum drm_mode_status msm_hdmi_bridge_tmds_char_rate_valid(const struct dr { struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge); struct hdmi *hdmi = hdmi_bridge->hdmi; - const struct hdmi_platform_config *config = hdmi->config; struct msm_drm_private *priv = bridge->dev->dev_private; struct msm_kms *kms = priv->kms; long actual; @@ -454,8 +447,8 @@ static enum drm_mode_status msm_hdmi_bridge_tmds_char_rate_valid(const struct dr actual = kms->funcs->round_pixclk(kms, tmds_rate, hdmi_bridge->hdmi->encoder); - else if (config->pwr_clk_cnt > 0) - actual = clk_round_rate(hdmi->pwr_clks[0], tmds_rate); + else if (hdmi->extp_clk) + actual = clk_round_rate(hdmi->extp_clk, tmds_rate); else actual = tmds_rate; From patchwork Sun Feb 9 05:04:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13966656 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 040671547EE for ; Sun, 9 Feb 2025 05:07:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077623; cv=none; b=CryImV8APeNMxJ7XnHZJfzO63uK1aJNtTdOdwpM4k8SjF7UkBCU1shm3EkGsfqdssJvKm7kq18MWAUCUyzi6hovxW3feAEPSy8cpKR3/7ttz37CZTMXYFU75RzCMbUa7PILYBz2nhJEYlvI5LJPXgPyjr20UtV/qXF48FD7vhEw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077623; c=relaxed/simple; bh=WW4ls3rpXG1GIIqJFaRsd5YlkFmkvDhOcZwn0x64Row=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=X6ks03R0prmcE53hoamhsUhUCb9Lkt1Bvkp3L+sj8VYAM66BpkETc7MOB/EpnPGathD0eJ0aU9gugwVaVEB2aj3zvdRXJQf3GTuaBy7OuoeaabCRDLVkReFXmB8fJvDF/utmjFigymPNBt2OyCYJuj20qHViHx9RMyr+lJrPwM0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=nKLBodXZ; arc=none smtp.client-ip=209.85.167.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="nKLBodXZ" Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-54508b026d1so258957e87.2 for ; Sat, 08 Feb 2025 21:07:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739077620; x=1739682420; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=MgMGbXHWLKVnTij1NafnBiRAE4dpvWazdfcr2GGjsj0=; b=nKLBodXZIA9THby8zc+M2ajq8kuF1uR37VexjXeE5H1zK6rmOe49sg5Nv9oO3AoAdF xnRFWUBh45NVRzs42ULvqnxWTbQVJNFnG6f75xsHiCRG9zTKNDE1N1ysC5+udGBa+oyZ 7TTxVyhKGUHCJ48XmzMKqqnlUMNAIVZ0RDTije5vvNXMI2mD1neUeO0i9SuW7Wr1riGb CC/6nKDtvNXaLbjtB3UdYcdM7ROzNCpuFuvXe1ghfx4IVVlb3hFrUiRj3Iamd/fVjM97 RpDEK05THX3+tnnz1CKTVUpIG2A9gtfQkObECm5Yj5A1APnBsvau/XDcfvIl3Hc7DGTJ wtOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739077620; x=1739682420; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MgMGbXHWLKVnTij1NafnBiRAE4dpvWazdfcr2GGjsj0=; b=SDDeZ/xn2JvRXe1/nMtNy5Y+jlUuChubJgE2sdlGcsurw196OiVIFOqaDxFc0sx7R2 XNELp+BfSLkuUg2AAxThCMbd8He8x0ufg4wMV+Y0xlOxnT0AFaU+HdwfyYhvZ+om9Qp6 zDLUlD37Y2Cx7SbKtd/PStO570UDQ02FlHmCxQXhe/wpYYqzjRrmXuGXCpnKpIkgPIvt JxUuDIPf1GBUlOCoawooyi/kJuz0Zy+dCP1kikPA75er7rJFa3xloEhvAju5y7LO31Rw ISzPa70EoCCxtYohKg/P3uR1Bmk4msNElKIKEzf5IRaNbiCj/B3UNLO7DY46InrDs+j6 9cMw== X-Gm-Message-State: AOJu0Yx6qHfauHckKnAVz+cltgN8dreuUxWKlS3d7CD79v2KdrmVv6TC ODhxXvGKIX/hxoWU8XoSBhC6nrOVONUbuYH+3aKquyekK28Pepu7MGLf3CmxSNYthPY0RP+uGSf lcqg= X-Gm-Gg: ASbGncskShhsfe9YsfxUuxok3UYD6Sj5fIpRrrkrbb66bITtEJUneMGZcmwNmBmOjaE 5wtcijdW8z9g2Ii8T7vX1a3+OA3OTkgBkFFNWI2lpC0k5+FSZm/nI4VtyZWMgukTtc9r41W2qbb u1AVUYZDwSH556ez85F+oFkB+TQj/1fbrAnx2ikF5zt+6eYdlYz1pY3rClBYcBFiWNXiSpCrxtD HeHYs1ib+opbjzivPiT0z/7sSwXnicmW7mHR5LV1yRKcR7oKiXsXqunYM9Oj4r6gJX1mKIpHdo0 TFZb4682EdFm/Yv9p/Z37lc= X-Google-Smtp-Source: AGHT+IFx+DmPcZu3/NRsEkP+OG1M4uAJloebIpWaEr4zUGH3IBWnTxGpoo5HkK+ek1VL2il6g5ZnVg== X-Received: by 2002:a05:6512:ad5:b0:542:98e9:63a9 with SMTP id 2adb3069b0e04-54414b0b605mr2844776e87.44.1739077619881; Sat, 08 Feb 2025 21:06:59 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54506ef1733sm245576e87.1.2025.02.08.21.06.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Feb 2025 21:06:58 -0800 (PST) From: Dmitry Baryshkov Date: Sun, 09 Feb 2025 07:04:50 +0200 Subject: [PATCH v4 06/16] drm/msm/hdmi: drop clock frequency assignment Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250209-fd-hdmi-hpd-v4-6-6224568ed87f@linaro.org> References: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> In-Reply-To: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Jessica Zhang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2616; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=WW4ls3rpXG1GIIqJFaRsd5YlkFmkvDhOcZwn0x64Row=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnqDfi33wWbfpM6mTVM/ftWIImACMnz11kBEOqC blNTd+M/5+JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ6g34gAKCRCLPIo+Aiko 1dSWB/40THgJWOFA7FwOHcFPelVVnpKYNOhfQuyUuXJy0WLW2cSHshnroZRXNnjokUNm0oly+fA dPJtLOBh52GIUcac13awR+mTeDNkso9fhOR8aONIaah9ZyYwZixqaImkB+Pya9N4Pp8S0FMZEmQ AuQrEaRpREWdNEYbEBavp5mnhNQsYK84xs/boE5VkJUrAn1c4uHVymlQxMc4H6beLXKwVlBrfGi 4E8BJJzCTBIoNOAMJ/HeRM3gNw6N+RfKoG6FD4IrrD9R56rPo/c9ePXfvC7edCfmsBiCOXDC2rM b29yFFfR6iQHceT0T/LBylCiPZIO/Arm1BEWDWfhs7v6DikV X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A The only clock which has frequency being set through hpd_freqs is the "core" aka MDSS_HDMI_CLK clock. It always has the specified frequency, so we can drop corresponding clk_set_rate() call together with the hpd_freq infrastructure. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 2 -- drivers/gpu/drm/msm/hdmi/hdmi.h | 1 - drivers/gpu/drm/msm/hdmi/hdmi_hpd.c | 9 --------- 3 files changed, 12 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index 104f9cefa14834d04fb957eb48777e605d1e29a5..6f09920c58190a9c195de0407e4c2dcc3d58b30f 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -234,12 +234,10 @@ static const struct hdmi_platform_config hdmi_tx_8960_config = { static const char * const pwr_reg_names_8x74[] = {"core-vdda", "core-vcc"}; static const char * const hpd_clk_names_8x74[] = {"iface", "core", "mdp_core", "alt_iface"}; -static unsigned long hpd_clk_freq_8x74[] = {0, 19200000, 0, 0}; static const struct hdmi_platform_config hdmi_tx_8974_config = { HDMI_CFG(pwr_reg, 8x74), HDMI_CFG(hpd_clk, 8x74), - .hpd_freq = hpd_clk_freq_8x74, }; static int msm_hdmi_bind(struct device *dev, struct device *master, void *data) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.h b/drivers/gpu/drm/msm/hdmi/hdmi.h index 3314bb8a09d6bea7e34ad9050970bf43c64d1558..e93d49d9e86936cb6c1f852a958398de2e134ad4 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.h +++ b/drivers/gpu/drm/msm/hdmi/hdmi.h @@ -93,7 +93,6 @@ struct hdmi_platform_config { /* clks that need to be on for hpd: */ const char * const *hpd_clk_names; - const long unsigned *hpd_freq; int hpd_clk_cnt; }; diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c b/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c index 9ce0ffa3541795a076b433566a3cafe156120b15..7ae69b14e953f0ee6deea8a216bfa9d3616b09af 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c @@ -68,15 +68,6 @@ static void enable_hpd_clocks(struct hdmi *hdmi, bool enable) if (enable) { for (i = 0; i < config->hpd_clk_cnt; i++) { - if (config->hpd_freq && config->hpd_freq[i]) { - ret = clk_set_rate(hdmi->hpd_clks[i], - config->hpd_freq[i]); - if (ret) - dev_warn(dev, - "failed to set clk %s (%d)\n", - config->hpd_clk_names[i], ret); - } - ret = clk_prepare_enable(hdmi->hpd_clks[i]); if (ret) { DRM_DEV_ERROR(dev, From patchwork Sun Feb 9 05:04:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13966657 Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 545C21547EE for ; Sun, 9 Feb 2025 05:07:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077626; cv=none; b=rcONqgm9lqm74eDpXGa5AjagReH4SWBtdvWxaiUpmMTYOyi/IFrZGLd4VXwJ1YL/FFUoDwdM3OLBf3FgMJn8iXKhAakKknn6RWojlqrNOxwoAr0fJQ2WH6Dr1Mt/MrcNLw+3prqIR10a2QNakSuhTktqmoDW7pj+HQycUYiOw5U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077626; c=relaxed/simple; bh=cNUywERI8hGQBw9l50SO0xvsuUis2RpMcSyOPQXrk1Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=s0y+xqelf3eDwRjBN5jX4Ca9ey+v17EhZNPkLYzvsao5FIICOR2XSoyZyoXEctOfHUMHa/uEZDLgttAEeAA1cB4CpL05mFlxORJVWNtaXruWojuG3aBfQOjKYMAeeSXEn8WsQ+Pq8u7ZdHg214vuiiC4opS0dGI/DdJG79wWiJE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=PizxI8QS; arc=none smtp.client-ip=209.85.167.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PizxI8QS" Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-540215984f0so3541704e87.1 for ; Sat, 08 Feb 2025 21:07:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739077622; x=1739682422; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=3rGXodl7UY6Xisbn+xeFyyE0+oLCJlfYiSTPpiZkjaU=; b=PizxI8QSY/d7iqZgen1cj8kTffdcLfqskQoCxBfXRCkjhAbCTBZ/LfpsKfStC1H5yq NWjySvrVrHUZ7sQuDGQw3Dohy3SEaZOuVgpnYhcjag1+0qD8mCPdQHtIA97T6B+2JZef +3oM+FxAAKs/vMjfSkbZnx9L77Dzd5CoM+0BOsJhNpT9FrMsFnUHXJvNMZz4CG66ye/F WeqiChTNCmu+ieoEl3Nm33q2ceSp1sqaKsw/6eHAIOcjPfnNtz3Bx15jlkHlK7YsL5ax vpFjB3yXIpfaIjn/4ZmffQDXJGSPH6q/icksABgscWqrfzyE5OMkKfXrwDkn1QZ9qkJa hgfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739077622; x=1739682422; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3rGXodl7UY6Xisbn+xeFyyE0+oLCJlfYiSTPpiZkjaU=; b=Plm+FeFCkXVHQxXikHf3hAUMqJ8YFLNeKPtVMWJFbM8z816gMJmcLfRMjIJJ9X41m3 /SL5syJ6TWqUbT60DNAz2Bag59oVfJFZcs+ZFfRgggEUb2E5AvjHPnFe4ELSNVNsyBEK qbi9ARF6KroUuU5e95miWWH94qrox0XH7PNcQcpDUTIX5SD8aOyX6cGCxpM3xlZd8+Dr vOV8woCvvWWRatydj273XXZYfUPRp21T4FKnp2xPE8JHwDJiiXXFNx6+1szVtTZdsCo3 tTZTCb/D/+/Ymgwl5jnWBc4PeGc+C0/x0hnmqjVWHFbgSR39c3t84W06NuKb/9jddH51 HVSw== X-Gm-Message-State: AOJu0Yy9S0BWXcC0FPE6Ua7KvGj1exJbz0a3xyfpEqGP1Vo53LBk0SEg KbrIhdkbzzuppeFam0ohIuqTytwwV10/VI3uunPox8Xs7OLuFvAOLypqFVxdZkpAQopUYVRp2kG 84nc= X-Gm-Gg: ASbGncuKzy8OpdyFICpziuuVnheK/0wjTpaAjvkz3uS6TmeHtaZj9pNOamEWJjJgp4J 5tgCViLThjD/Ftt/ltKEbpGG0Rvgb7ee4XFzu81oPQUpDXoqPYQ6oifa0Nq95cszjfqGg1h+iH1 4ABtjJbRpvHr82T//rV18vcAjjq9spWFntykFs3hWswlmQYKEb2FQ05/aR0YVWK+Sx5NhE6srhh TLn2K+SNr8hfvx+DBuErueq1sEQuddqEWLhIOsJ9baLrB7gujeoMLaI1r1eibyX4+7jKeFzYvA+ QiufT4+UiSYh8b0wESNazsA= X-Google-Smtp-Source: AGHT+IECHEx5wXU3DMO4GB2MoLvqoEOcXJmE/ykw6Obq3xv/T+mDtoQLue2OeXH2anuyCE0mx+aqFQ== X-Received: by 2002:a05:6512:3288:b0:545:5d:a5c3 with SMTP id 2adb3069b0e04-545005da7eemr1544729e87.4.1739077622154; Sat, 08 Feb 2025 21:07:02 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54506ef1733sm245576e87.1.2025.02.08.21.06.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Feb 2025 21:07:01 -0800 (PST) From: Dmitry Baryshkov Date: Sun, 09 Feb 2025 07:04:51 +0200 Subject: [PATCH v4 07/16] drm/msm/hdmi: switch to clk_bulk API Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250209-fd-hdmi-hpd-v4-7-6224568ed87f@linaro.org> References: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> In-Reply-To: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Jessica Zhang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=4477; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=cNUywERI8hGQBw9l50SO0xvsuUis2RpMcSyOPQXrk1Y=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnqDfirTeg+xg3ns1vJT9Om7aF9A1HlE9Ki2qvq Wcj5oDl6S+JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ6g34gAKCRCLPIo+Aiko 1QwlCACPy8ChP+BZLQp5Xs97+XIJG4ERSgqmkT99waymkQsollnei9VfA03mFzmQJkW2a608nqr L5hf1Hocdm6VaP5m0DmgdQL1SSEIAvYNgKVI0226bwTODULT1WmwqVSbJs91U/BNxmAksLvZ1W9 LCJ+NZR8NcpybuMAHMqSLaM/kOnySq6cz4sxXtHi6bmng0esJFC8qkTZoFxj6g9XbyMOPsm/r3S wuWZgR2/S7Iz8AEjzCQeGT0JegDCja7uP4kSz1sY2mV53hZuFrogOsq9Wdh/Ox9bsjirav/Z+Or 1elUQHYLq/3ap0Jnsb8mgqSKXCqOm3AHtoGGePqGhVqz878w X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A The last platform using legacy clock names for HDMI block (APQ8064) switched to new clock names in 5.16. It's time to stop caring about old DT, drop hand-coded helpers and switch to clk_bulk_* API. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 15 +++++--------- drivers/gpu/drm/msm/hdmi/hdmi.h | 2 +- drivers/gpu/drm/msm/hdmi/hdmi_hpd.c | 39 +++++++++++++------------------------ 3 files changed, 19 insertions(+), 37 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index 6f09920c58190a9c195de0407e4c2dcc3d58b30f..69e337d551799b4d35c8c8c7ecb5c4680b9a9e5f 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -353,17 +353,12 @@ static int msm_hdmi_dev_probe(struct platform_device *pdev) if (!hdmi->hpd_clks) return -ENOMEM; - for (i = 0; i < config->hpd_clk_cnt; i++) { - struct clk *clk; + for (i = 0; i < config->hpd_clk_cnt; i++) + hdmi->hpd_clks[i].id = config->hpd_clk_names[i]; - clk = msm_clk_get(pdev, config->hpd_clk_names[i]); - if (IS_ERR(clk)) - return dev_err_probe(dev, PTR_ERR(clk), - "failed to get hpd clk: %s\n", - config->hpd_clk_names[i]); - - hdmi->hpd_clks[i] = clk; - } + ret = devm_clk_bulk_get(&pdev->dev, config->hpd_clk_cnt, hdmi->hpd_clks); + if (ret) + return ret; hdmi->extp_clk = devm_clk_get_optional(&pdev->dev, "extp"); if (IS_ERR(hdmi->extp_clk)) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.h b/drivers/gpu/drm/msm/hdmi/hdmi.h index e93d49d9e86936cb6c1f852a958398de2e134ad4..3f87535bcf43e20f0618d3016307fe1642d7baf9 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.h +++ b/drivers/gpu/drm/msm/hdmi/hdmi.h @@ -49,7 +49,7 @@ struct hdmi { struct regulator_bulk_data *hpd_regs; struct regulator_bulk_data *pwr_regs; - struct clk **hpd_clks; + struct clk_bulk_data *hpd_clks; struct clk *extp_clk; struct gpio_desc *hpd_gpiod; diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c b/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c index 7ae69b14e953f0ee6deea8a216bfa9d3616b09af..e253c1408dd1c6dcd7e94506f0b8edcfd4a9a159 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c @@ -60,27 +60,6 @@ static void msm_hdmi_phy_reset(struct hdmi *hdmi) } } -static void enable_hpd_clocks(struct hdmi *hdmi, bool enable) -{ - const struct hdmi_platform_config *config = hdmi->config; - struct device *dev = &hdmi->pdev->dev; - int i, ret; - - if (enable) { - for (i = 0; i < config->hpd_clk_cnt; i++) { - ret = clk_prepare_enable(hdmi->hpd_clks[i]); - if (ret) { - DRM_DEV_ERROR(dev, - "failed to enable hpd clk: %s (%d)\n", - config->hpd_clk_names[i], ret); - } - } - } else { - for (i = config->hpd_clk_cnt - 1; i >= 0; i--) - clk_disable_unprepare(hdmi->hpd_clks[i]); - } -} - int msm_hdmi_hpd_enable(struct drm_bridge *bridge) { struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge); @@ -107,7 +86,9 @@ int msm_hdmi_hpd_enable(struct drm_bridge *bridge) gpiod_set_value_cansleep(hdmi->hpd_gpiod, 1); pm_runtime_get_sync(dev); - enable_hpd_clocks(hdmi, true); + ret = clk_bulk_prepare_enable(config->hpd_clk_cnt, hdmi->hpd_clks); + if (ret) + goto fail; msm_hdmi_set_mode(hdmi, false); msm_hdmi_phy_reset(hdmi); @@ -149,7 +130,7 @@ void msm_hdmi_hpd_disable(struct hdmi *hdmi) msm_hdmi_set_mode(hdmi, false); - enable_hpd_clocks(hdmi, false); + clk_bulk_disable_unprepare(config->hpd_clk_cnt, hdmi->hpd_clks); pm_runtime_put(dev); ret = pinctrl_pm_select_sleep_state(dev); @@ -193,14 +174,20 @@ void msm_hdmi_hpd_irq(struct drm_bridge *bridge) static enum drm_connector_status detect_reg(struct hdmi *hdmi) { - uint32_t hpd_int_status; + const struct hdmi_platform_config *config = hdmi->config; + u32 hpd_int_status = 0; + int ret; pm_runtime_get_sync(&hdmi->pdev->dev); - enable_hpd_clocks(hdmi, true); + ret = clk_bulk_prepare_enable(config->hpd_clk_cnt, hdmi->hpd_clks); + if (ret) + goto out; hpd_int_status = hdmi_read(hdmi, REG_HDMI_HPD_INT_STATUS); - enable_hpd_clocks(hdmi, false); + clk_bulk_disable_unprepare(config->hpd_clk_cnt, hdmi->hpd_clks); + +out: pm_runtime_put(&hdmi->pdev->dev); return (hpd_int_status & HDMI_HPD_INT_STATUS_CABLE_DETECTED) ? From patchwork Sun Feb 9 05:04:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13966658 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB25E16D9AF for ; Sun, 9 Feb 2025 05:07:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077628; cv=none; b=U4dKT7RG0XPwCnIzSquy5Qs2UrFoQsZISxSaQZdrhVwoD9STIkMCP8ua+1eW78HgGBDVoMMQUgZlhDHwopg1DFY9o6k4U4ocPbW0c4bu89dmvJghjuQDrJg0YQlkCIqwY+V/ZauorJ5FfvR8Iv57SKSk++SdDVqW0F6eB7yyoYI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077628; c=relaxed/simple; bh=8ggrOHMoONGuV72hshgJDWyRmMWrabWT+tktxkICLQM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=K8E4Q6QOAb/6wxHPikZ/iMzitiHhEKRTOn/rjKGXKbr6Iih0ZxOMjm1KBUP/Cjs9suvJPmOg4Fpfpca9T8BCJG1h2UkHWaMATUJt5siGoFh5joznEQElLX8FtXRTDhVAi0h1NdZqwpN5Me3jtVOC0Qvoq2K+F7A5PXU5hoRAiA4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Q7xvaELA; arc=none smtp.client-ip=209.85.167.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Q7xvaELA" Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-5440d5b30a8so3972287e87.2 for ; Sat, 08 Feb 2025 21:07:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739077625; x=1739682425; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=R0fvdO4R1nURbqAvtpU5cS7Y2T0kdgB8Gv4vtNNxca0=; b=Q7xvaELAby4Q02l8gA5uHh0iUpfnG1Wj/TIbAuSHxsMY5xg26aiG9/dXJ2fLtb+BKe Cz27+Lb/TfhZTebyfXYyq/3K4rAriiK0ThKB4L8h3ZaYhs4PQb2tvoSe1GAe5sywsHga 6SAGDey/rsR1CCm9j33IUqohH7vOek/97zasuopxJTRaQkHJaM8QJ72IaV9/9Wp4/D/9 cOhGESYfuk7IXqZNdSmcVZxpwuxBJF7ZxcMnhDlX3RM/WYdKevMx091s/YPKPSxygcGp 2mNHHa2S4oAjQws06SAUWuneLFJ+luZg5uAg5zkGW2J6Py6SB7X/CgsVEqtXTt8/zcMF SLug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739077625; x=1739682425; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=R0fvdO4R1nURbqAvtpU5cS7Y2T0kdgB8Gv4vtNNxca0=; b=phasIyXFLr0hMQOAYkAxpbNeSnvFc70SF+E4ZVGwlB5MErmzUqGeSodOELNKnbDa/u +HQR1jAGghODCsGqB4eWl5xsDhplSg1Qo+J0s8CIj52qSaNgfMTpuq0EUq3TcfoQTRYF qI13Uxl9RiYUE82BucekSfw5TUSUE2ytx3IsxxhrWO75kDRj2aME1wHPf5UGwqAQCbl+ Ir+HUfgcnuwPwLvMcbWLoWrXDSoUrGtG2Celjl8Jn8kS+h8elJDKdQFi2ByStFh2ewBe fQ+UCbAEtmdpqzLcm2OzSwLjv9NUAn70Y3xZH4Pmwtn23DsBS8A1hbj/+C1SfXWLQZ1p TFFQ== X-Gm-Message-State: AOJu0Yy05wu5fXN5rzKrUBt5CctJj7cFtccT8pSPz/AvR0ROt3aBZA7P 2V3BIz07VmtOvZnhdWlPACVDujv7tumrpJQoXhFw2S0xqZIMUCzkXfuTGTeV7mMyudgTglQV8RW m8Dk= X-Gm-Gg: ASbGnctjI9hzYikYrHnWi69xXJD4/rvQm15jgAXZQ6WlsVeCpvpVpmApVV4lymCReAH x7C2XvlZ6KJzmk7KKfHZTuICWKGp19Nkm0NZjrZwrJ5c6v82LlXkI0WA28MdTuL6ZSvvUHakwAG 3P7LLDxNIqrPWosDvt9hnUNKEcZYEsF+pi1z+WcQ3PMed2SjrlEE0R7ABrqYyOECbDbfZzEQTLC 5Dm5QOFi63kUId5TOlVp7eldP6dpBUoy4/Mn9yhW4nqsq3gV68RCXUSTiw8iFYEl7Db4Dr3oYuu Cnei8m7iiL38aiYBIo7Fyvk= X-Google-Smtp-Source: AGHT+IHvHK9pE/lJ1sbvSikM6yxevJJhOW+toCBmWw7PDK+wzGYcNkAt2K57E9sTUMAV9Ze/PJqhag== X-Received: by 2002:a05:6512:2821:b0:545:6a2:e52 with SMTP id 2adb3069b0e04-54506a20ff4mr841140e87.13.1739077624656; Sat, 08 Feb 2025 21:07:04 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54506ef1733sm245576e87.1.2025.02.08.21.07.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Feb 2025 21:07:03 -0800 (PST) From: Dmitry Baryshkov Date: Sun, 09 Feb 2025 07:04:52 +0200 Subject: [PATCH v4 08/16] drm/msm/hdmi: switch to pm_runtime_resume_and_get() Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250209-fd-hdmi-hpd-v4-8-6224568ed87f@linaro.org> References: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> In-Reply-To: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Jessica Zhang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2832; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=8ggrOHMoONGuV72hshgJDWyRmMWrabWT+tktxkICLQM=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnqDfibvp8G2Mg6U4kntY4TDix+sHhUGkYjpmgS NNb+V0lzKmJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ6g34gAKCRCLPIo+Aiko 1ZOuCACuIdGuV1z9z9UzxMNBCcGvD/1jN1gxNpsw6zo3qtvGjKRkgE29wRh+70PdHygdsSuJJND MQki8GKKIOtm2TMfh+6qLFk75iGLCdaFZeZxBXNCF7DXEBgAgtcHrGCRf8V59wZBCedv3aG+Fjv cXg7zqX6S7kZCGzN1etDHpsvbm9+otPbTE3VJ6zkIpDpBw7N1ufN+sm3I2juhcTvXxEDP1hmjxx o9YPIO/P3wB5ewBaRYJco7WQme9QVlQs3/YzNlYGghVOo21A0xb0tA9h+FqcQDj+rB+MVHq7t+U jSh9lS5oE/Md0BKq6r34Tr65Q/5WqHuA8FJ7DSqmCc1TROtB X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A The pm_runtime_get_sync() function is a bad choise for runtime power management. Switch HDMI driver to pm_runtime_resume_and_get() and add proper error handling, while we are at it. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 2 +- drivers/gpu/drm/msm/hdmi/hdmi_hpd.c | 12 ++++++++++-- drivers/gpu/drm/msm/hdmi/hdmi_phy.c | 6 +++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c index 6c5bbd772700b0362f884a737598d7bf419adf9b..d7d5d3755fb853377aa999e2a830debf54afe984 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c @@ -21,7 +21,7 @@ static void msm_hdmi_power_on(struct drm_bridge *bridge) const struct hdmi_platform_config *config = hdmi->config; int ret; - pm_runtime_get_sync(&hdmi->pdev->dev); + pm_runtime_resume_and_get(&hdmi->pdev->dev); ret = regulator_bulk_enable(config->pwr_reg_cnt, hdmi->pwr_regs); if (ret) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c b/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c index e253c1408dd1c6dcd7e94506f0b8edcfd4a9a159..d77c68914c5f525cf12971c1058b1abc33792b24 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c @@ -85,7 +85,12 @@ int msm_hdmi_hpd_enable(struct drm_bridge *bridge) if (hdmi->hpd_gpiod) gpiod_set_value_cansleep(hdmi->hpd_gpiod, 1); - pm_runtime_get_sync(dev); + ret = pm_runtime_resume_and_get(dev); + if (ret) { + DRM_DEV_ERROR(dev, "runtime resume failed: %d\n", ret); + goto fail; + } + ret = clk_bulk_prepare_enable(config->hpd_clk_cnt, hdmi->hpd_clks); if (ret) goto fail; @@ -178,7 +183,10 @@ static enum drm_connector_status detect_reg(struct hdmi *hdmi) u32 hpd_int_status = 0; int ret; - pm_runtime_get_sync(&hdmi->pdev->dev); + ret = pm_runtime_resume_and_get(&hdmi->pdev->dev); + if (ret) + goto out; + ret = clk_bulk_prepare_enable(config->hpd_clk_cnt, hdmi->hpd_clks); if (ret) goto out; diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy.c index 03120c54ced686dcd2ddfe809dd9c9011f608235..667573f1db7c6bfef6c75828b5c581c147a86d0d 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_phy.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy.c @@ -58,7 +58,11 @@ int msm_hdmi_phy_resource_enable(struct hdmi_phy *phy) struct device *dev = &phy->pdev->dev; int i, ret = 0; - pm_runtime_get_sync(dev); + ret = pm_runtime_resume_and_get(dev); + if (ret) { + DRM_DEV_ERROR(dev, "runtime resume failed: %d\n", ret); + return ret; + } ret = regulator_bulk_enable(cfg->num_regs, phy->regs); if (ret) { From patchwork Sun Feb 9 05:04:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13966659 Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4412D86331 for ; Sun, 9 Feb 2025 05:07:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077631; cv=none; b=bzAL4h6PQ1KW59XPc1/KPAriI6i4hJIfXLRDOgNErZEETrulxInTmzX2r83a7uVV9RrmIY0awP+btuJabJFJpo6cMo4luvLuFWWk3lByR6IaQXKwsyCP0XHHedLfcaXH6oThykJM3MkSnsVzEW29Tq2Os7ayxYEi6SV5Yzzlwp8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077631; c=relaxed/simple; bh=iRrggYdOsfyNRF7mD9CF5dLKTnVLk9gbl2tlKLOnDn8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LiwF89hHQFR36sPWN2KqauyqAvkETeLJ0mnhBE6FIbrEpQF9jIY1rSm//yniDxxsq8E1S9H0G+dEKdV/CBUU0munBinqPxvV7a4PrkAsOxX06lufj1kpGqOGCrJINgp2L6L0NS4K5Bup3LVHI4u7RekZbAOBLxQV+OhV8YZwQPk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=NWp1lagO; arc=none smtp.client-ip=209.85.167.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="NWp1lagO" Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-545064389d3so812111e87.0 for ; Sat, 08 Feb 2025 21:07:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739077627; x=1739682427; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=dPGyQgNZ0aCBKHZLfiK3AEZ4dYrfnGwELgJGxdZANgU=; b=NWp1lagOzJzEIocLjc6k4VYsfHIur/Bl4zZ1FS3pK84/246B9GAKKO9ZTd1xSSHMP9 42xTcaIVK0fHgkhu+VXKUF35mBjolt6BX/ZOKX5rfxZ3mPu+IpJCpHhU4rEstWUemK4e aKFq5k/TPxN0XbqAdPqYbu029ukH6si+pTfD0hOdDTcdEidjkFNFBXfjAioSyQwoqma3 FpNKyTcHWFTuAMyZcIocYPyt1P3ximUPQq1pMN6KKVIYX22hQbIzq13JAym0sYTLm5/H FQ7RybMj+ds84Bxc4FAIyUZC33DJrxAFc2qUplAulzvV68nQTvL9TaQ8tH1Y6aeSbbU3 vtKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739077627; x=1739682427; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dPGyQgNZ0aCBKHZLfiK3AEZ4dYrfnGwELgJGxdZANgU=; b=YlnOaBCZipZbwZOM1gHiLL5dS5vnKTNzcl2bR1hxH06Zf0+vS/a5/jvnzQ0CZs5hVv 1kN38lnIlyCKrLgrauOKOX3P7SKgN9MAcHPAlx3jH5xy5n6qbawfwRhTVoE8g1XHHYza 0xdGi4wMSPit3kZA0Q62O8eXElH28qlMqZB4/e772rS0TQ5UFZTzkDkuIaen1JzwT4Ku epgEVU5NZY3+a5xivM7ttj40V2W06Ucv8osskZbpbtuWb8ATkWE3PAdKfdUSJBjSLxrz YL6JO/P1X7q0SO/WbnS6sVss+EwfT/kNIKtDI+L11d6JjuERTzwjfRQnCk7/I1fEoiaj E9fA== X-Gm-Message-State: AOJu0Yz2IRSu27IN/uiakSCXoMkgG5Wc53AKiF7EEGk7HQU1XsXLFANj 9YKkSebPGWw1Oq/NEutkDNXyCVsvUMfXw2KsyrwIyDmnA3ljwFy8xNeszR43Nb2cEdQA+F1jgZz zUPU= X-Gm-Gg: ASbGncuCDqytxWPHX9TYPdv1lxCo32zj1VZQ54R3ans4bv0jgkiG+PQ4PyVSLDtuFxQ J+dB9prRHi6rjRtXYH5wl4zWVvEcGt9nzl3JWh7HKtXdZHOvm2124S0y3Jb7HP1H9YvOL7n+mrD p1GHouRbjsrLbCVc2awiO+DxUic5ktVBMUB5Py3xi1CbQgjOwIKEUObIp0PL/LP+8MmziaeNpE5 jp1AzGmGVmPA6frThmv0TUPwJ9Ys+9n1ORINVpLxojIAtv4iavWDF/JOXXQasbSDYrhYzu8f0yI 8UBZQAF1mrf5xcjg2DQZr5E= X-Google-Smtp-Source: AGHT+IHOgcR2Z0Kqo6vnivPTHmH/O6i7EBOYINI+rp89KZLNIblSE2CYospkx5vQksFw/e13bAf1pg== X-Received: by 2002:a05:6512:3fc:b0:542:98bb:5674 with SMTP id 2adb3069b0e04-54414ae0732mr2345723e87.33.1739077627095; Sat, 08 Feb 2025 21:07:07 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54506ef1733sm245576e87.1.2025.02.08.21.07.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Feb 2025 21:07:05 -0800 (PST) From: Dmitry Baryshkov Date: Sun, 09 Feb 2025 07:04:53 +0200 Subject: [PATCH v4 09/16] drm/msm/hdmi: add runtime PM calls to DDC transfer function Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250209-fd-hdmi-hpd-v4-9-6224568ed87f@linaro.org> References: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> In-Reply-To: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Jessica Zhang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1630; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=iRrggYdOsfyNRF7mD9CF5dLKTnVLk9gbl2tlKLOnDn8=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnqDfia7EBbrd6GV3tmBxCrKU999OvEGr1JbtMF Mdzz6fu9ISJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ6g34gAKCRCLPIo+Aiko 1QrVB/92GfoPb+KtYU7kLhhmf8FYFyhFLKMmj7oEBLJB/Vecg7K+hhR0Emve+xmn01ZP2Hue125 fGhKF5HYwmbu/ANhmsEmvcebBvFD2gQEoQ4Lwt1jRlMBU1ZFsK/jPKRhArWSRPJvb2h7bvze98Z iSvNIGpCe6hy46XwhA3JyWsuiCmD5Ixjr+qjSYBazwM3NoF4Tub4SccSG9YC6Rm+A5csfhytRvp 3Eo7gCWZfST2ZoSjTu3D0TM8xROiS0KPlCgMCL1RHg8fqk6VX6brvVQaw+ho8zcJ/kSrIzbi3P9 PWmdaxYOgzgmWMYcjBaHqX14VY8iFOCzpKD4as4jMTXz2bWo X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A We must be sure that the HDMI controller is powered on, while performing the DDC transfer. Add corresponding runtime PM calls to msm_hdmi_i2c_xfer(). Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi_i2c.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_i2c.c b/drivers/gpu/drm/msm/hdmi/hdmi_i2c.c index 7aa500d24240ff3ed6694c469eafc4388c982346..ebefea4fb40855745001ed97367d571bde28f413 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_i2c.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_i2c.c @@ -107,11 +107,15 @@ static int msm_hdmi_i2c_xfer(struct i2c_adapter *i2c, if (num == 0) return num; + ret = pm_runtime_resume_and_get(&hdmi->pdev->dev); + if (ret) + return ret; + init_ddc(hdmi_i2c); ret = ddc_clear_irq(hdmi_i2c); if (ret) - return ret; + goto fail; for (i = 0; i < num; i++) { struct i2c_msg *p = &msgs[i]; @@ -169,7 +173,7 @@ static int msm_hdmi_i2c_xfer(struct i2c_adapter *i2c, hdmi_read(hdmi, REG_HDMI_DDC_SW_STATUS), hdmi_read(hdmi, REG_HDMI_DDC_HW_STATUS), hdmi_read(hdmi, REG_HDMI_DDC_INT_CTRL)); - return ret; + goto fail; } ddc_status = hdmi_read(hdmi, REG_HDMI_DDC_SW_STATUS); @@ -202,7 +206,13 @@ static int msm_hdmi_i2c_xfer(struct i2c_adapter *i2c, } } + pm_runtime_put(&hdmi->pdev->dev); + return i; + +fail: + pm_runtime_put(&hdmi->pdev->dev); + return ret; } static u32 msm_hdmi_i2c_func(struct i2c_adapter *adapter) From patchwork Sun Feb 9 05:04:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13966660 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC08318C936 for ; Sun, 9 Feb 2025 05:07:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077633; cv=none; b=MbP5wJpQQMWad6it2f5ERdyoajf8T1cZ0ZrAWX1SY7yO5L7tVnMTDvBZu1f92CQB9j2ePh5e8aB912dkElNxTKZC5Bh6dBl5VTPDRYTg71F+EPlxBx3v/LxTytdt28zQKtYnR3/eBHHD9vBafF9AdYG4V+/7un3wOyLi9MWmZDs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077633; c=relaxed/simple; bh=FbKaceGiAg6TBff1fmSfXG39SERi268oL7jMv4TIAIc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=FIQfY1ijC9+M3bOJGz5F61OsQQIyeieQacjWHJCp005KBwogRonxMIkyvLUG9E4gazx/Xcs+ZXFl4Yoo0Z8H4U6/v0ZucJdO87Z2mIaUwoLGU5Ex5Zd32FSBLba+0D9j49BY/2QvpzDoVSc0jOBGEYO8uQDuiYhtgARYNbIP63M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Nmg/tW1O; arc=none smtp.client-ip=209.85.167.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Nmg/tW1O" Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-54505a75445so940888e87.1 for ; Sat, 08 Feb 2025 21:07:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739077629; x=1739682429; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=J6Gr4uu/kJErVl7WJZNEAVi18tX3meOvk7rKvqbRQDw=; b=Nmg/tW1OjVz4ls3lbpAek0UpcHrd5tlcwGN4rRlrzeLCP5gdPBhFGkSEfY6UANrz58 +til2AzhuWwnMwnQzGmx7y/fRFVYQs7esbVDso+Nv1Y8OoCjwB9nXbXqerKdAbyHnRdr Ymktlo2a2+7FYUtASc1mNRoJJHdBxa9UbuLb59qU6mkyGeC1p1XBz7qrj7t3wkxotKlf RHbMN6ObRV6TqIZVStGvugStN0NQVDREQNgeWkTluIqpce4pEiMYuLWzfFNKX4KCzX7W O+sWIqFO1kOM+Cu4kcxZuOTPFxGpeRQkctJJU/FGRizeKNcBmfUd/89+DzqsW53ODNhS kf/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739077629; x=1739682429; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J6Gr4uu/kJErVl7WJZNEAVi18tX3meOvk7rKvqbRQDw=; b=O44nK17A9v10vCb1+gUXSV8qLe2v1fhzUB4Hg3e0UrU5Y0WxvvAN/JIWqQCxEB0WOj WGpxNta+CcMuqNl0zlir82h3TK5RK8GF+jz/KXNM2+WVjwObIA4A5AL9ttIVA3uvkruk iPUKSmuvjOivmM407xto81Qa0rafeIYX4ODOCj84MtWp1tSOTLetcf3p708GGDYpmYzk 6R8KbEuYMx6+oRimOCCerGvYJvFECuZsXeA9W7XyOVejYmFdV7Iv1XHYO/igTFTwt3Uk 6+ZpbBB04L5TLvvY2zrIXN5xJU3tEOGyxgVRXCpp+Vbxf0fulKeo/VqW3AaYR7IZMEDs Bfvg== X-Gm-Message-State: AOJu0YwUPbVVjZrAGLl3HzikvXE/2H0iypECFQ0XWLMTuaUWyIhppFn/ YHYE6rh5eyWNHDaMY9RA5urPFTdbqYnv91jMbhX+tHDlb1y7UhNjmH2PSFLeBAcVn1KFXiw/2oK YieU= X-Gm-Gg: ASbGncvskQXMxL9Z1X9He83amaQRj5YoEr03nLfOoid/sEq3MVhJ+3+H9vL8cIpXboo gxRLVwHZ/UnHoIIRHERbID188qfZgATKsXq5SEaIYCAs+s3z4Sb9aTgNBiYtlgRJXo7vd+otc+S 5HGSdd/NIPmBEwlGQbqXuaV1FNG1PKW1r9f1CtYkOUPkHxeve4txENri/DsulM/PuHGAFyPv4Ri bJ8nE4zf4Xn8hnVLbY/UO9hx/VJ4QuGLJkt2GZ7L51j044ryvNbpgNN3ppV+mjr9QyGHYNPkrwB H0VcKC2vNaQevjEVCOczY9k= X-Google-Smtp-Source: AGHT+IEMz171/a3noyaNikNrBmsJ647KN8DT8QdriymS4YuVWPZiFxBKdSK++uLEoZfsKV6SZuZqLg== X-Received: by 2002:a05:6512:3d88:b0:544:1201:c0b3 with SMTP id 2adb3069b0e04-54414aae119mr2881240e87.11.1739077629496; Sat, 08 Feb 2025 21:07:09 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54506ef1733sm245576e87.1.2025.02.08.21.07.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Feb 2025 21:07:08 -0800 (PST) From: Dmitry Baryshkov Date: Sun, 09 Feb 2025 07:04:54 +0200 Subject: [PATCH v4 10/16] drm/msm/hdmi: implement proper runtime PM handling Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250209-fd-hdmi-hpd-v4-10-6224568ed87f@linaro.org> References: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> In-Reply-To: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Jessica Zhang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=9382; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=FbKaceGiAg6TBff1fmSfXG39SERi268oL7jMv4TIAIc=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnqDfjekR3ytdRsJ2xgXSruu+wiySdVD2A3OkWc romIolnABOJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ6g34wAKCRCLPIo+Aiko 1XBuB/43scQI8R13SZNUxuwJaZ+IhCr2eB31ophSF7KOoPzKejIQNs5xaV0bXzsvCxandCU2u4N 0w4pwZn2clkCyNLaYCdZQ3r59CpECFNxgtzyvws4Ur0BWqk9uPZf4e4wXTfytrlB6tS8//SKlWv T1eOB9bDsHcqmVDABaFA4uI4askTW1Iu9Aw+ag0GG68vqZctsgy/40llnAOOLTTIQZ6MAjspMWJ ZbyEmfEQzCHkYQVd6fZnOSc/uu1WiVYP5q5grf7ciFTHFAdmpQotKh7am9DIbcq2qo21OEl/K9L Z1pOUTRRVNHjnYxfTa7Mv2yCS+gtyXcGyyxkMXeFAZ/DP1Pu X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A It is completely not obvious, but the so-called 'hpd' clocks and regulators are required for the HDMI host to function properly. Merge pwr and hpd regulators. Use regulators, clocks and pinctrl to implement proper runtime PM callbacks. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 62 +++++++++++++++++++++++++--------- drivers/gpu/drm/msm/hdmi/hdmi.h | 5 --- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 12 ------- drivers/gpu/drm/msm/hdmi/hdmi_hpd.c | 42 +---------------------- 4 files changed, 47 insertions(+), 74 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index 69e337d551799b4d35c8c8c7ecb5c4680b9a9e5f..ded20176aa805db98b0599e617eb6ea9bce122d8 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -224,11 +225,11 @@ int msm_hdmi_modeset_init(struct hdmi *hdmi, .item ## _names = item ##_names_ ## entry, \ .item ## _cnt = ARRAY_SIZE(item ## _names_ ## entry) -static const char * const hpd_reg_names_8960[] = {"core-vdda"}; +static const char * const pwr_reg_names_8960[] = {"core-vdda"}; static const char * const hpd_clk_names_8960[] = {"core", "master_iface", "slave_iface"}; static const struct hdmi_platform_config hdmi_tx_8960_config = { - HDMI_CFG(hpd_reg, 8960), + HDMI_CFG(pwr_reg, 8960), HDMI_CFG(hpd_clk, 8960), }; @@ -318,20 +319,6 @@ static int msm_hdmi_dev_probe(struct platform_device *pdev) if (hdmi->irq < 0) return hdmi->irq; - hdmi->hpd_regs = devm_kcalloc(&pdev->dev, - config->hpd_reg_cnt, - sizeof(hdmi->hpd_regs[0]), - GFP_KERNEL); - if (!hdmi->hpd_regs) - return -ENOMEM; - - for (i = 0; i < config->hpd_reg_cnt; i++) - hdmi->hpd_regs[i].supply = config->hpd_reg_names[i]; - - ret = devm_regulator_bulk_get(&pdev->dev, config->hpd_reg_cnt, hdmi->hpd_regs); - if (ret) - return dev_err_probe(dev, ret, "failed to get hpd regulators\n"); - hdmi->pwr_regs = devm_kcalloc(&pdev->dev, config->pwr_reg_cnt, sizeof(hdmi->pwr_regs[0]), @@ -409,6 +396,48 @@ static void msm_hdmi_dev_remove(struct platform_device *pdev) msm_hdmi_put_phy(hdmi); } +static int msm_hdmi_runtime_suspend(struct device *dev) +{ + struct hdmi *hdmi = dev_get_drvdata(dev); + const struct hdmi_platform_config *config = hdmi->config; + + clk_bulk_disable_unprepare(config->hpd_clk_cnt, hdmi->hpd_clks); + + pinctrl_pm_select_sleep_state(dev); + + regulator_bulk_disable(config->pwr_reg_cnt, hdmi->pwr_regs); + + return 0; +} + +static int msm_hdmi_runtime_resume(struct device *dev) +{ + struct hdmi *hdmi = dev_get_drvdata(dev); + const struct hdmi_platform_config *config = hdmi->config; + int ret; + + ret = regulator_bulk_enable(config->pwr_reg_cnt, hdmi->pwr_regs); + if (ret) + return ret; + + ret = pinctrl_pm_select_default_state(dev); + if (ret) + goto fail; + + ret = clk_bulk_prepare_enable(config->hpd_clk_cnt, hdmi->hpd_clks); + if (ret) + goto fail; + + return 0; + +fail: + pinctrl_pm_select_sleep_state(dev); + + return ret; +} + +DEFINE_RUNTIME_DEV_PM_OPS(msm_hdmi_pm_ops, msm_hdmi_runtime_suspend, msm_hdmi_runtime_resume, NULL); + static const struct of_device_id msm_hdmi_dt_match[] = { { .compatible = "qcom,hdmi-tx-8998", .data = &hdmi_tx_8974_config }, { .compatible = "qcom,hdmi-tx-8996", .data = &hdmi_tx_8974_config }, @@ -426,6 +455,7 @@ static struct platform_driver msm_hdmi_driver = { .driver = { .name = "hdmi_msm", .of_match_table = msm_hdmi_dt_match, + .pm = &msm_hdmi_pm_ops, }, }; diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.h b/drivers/gpu/drm/msm/hdmi/hdmi.h index 3f87535bcf43e20f0618d3016307fe1642d7baf9..7e3c035cf913d713ed63379a843897fad96b23ab 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.h +++ b/drivers/gpu/drm/msm/hdmi/hdmi.h @@ -47,7 +47,6 @@ struct hdmi { void __iomem *qfprom_mmio; phys_addr_t mmio_phy_addr; - struct regulator_bulk_data *hpd_regs; struct regulator_bulk_data *pwr_regs; struct clk_bulk_data *hpd_clks; struct clk *extp_clk; @@ -83,10 +82,6 @@ struct hdmi { /* platform config data (ie. from DT, or pdata) */ struct hdmi_platform_config { - /* regulators that need to be on for hpd: */ - const char * const *hpd_reg_names; - int hpd_reg_cnt; - /* regulators that need to be on for screen pwr: */ const char * const *pwr_reg_names; int pwr_reg_cnt; diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c index d7d5d3755fb853377aa999e2a830debf54afe984..fedcefbf53d1d8d53a4882a545427f5ce6570a76 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c @@ -18,15 +18,10 @@ static void msm_hdmi_power_on(struct drm_bridge *bridge) struct drm_device *dev = bridge->dev; struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge); struct hdmi *hdmi = hdmi_bridge->hdmi; - const struct hdmi_platform_config *config = hdmi->config; int ret; pm_runtime_resume_and_get(&hdmi->pdev->dev); - ret = regulator_bulk_enable(config->pwr_reg_cnt, hdmi->pwr_regs); - if (ret) - DRM_DEV_ERROR(dev->dev, "failed to enable pwr regulator: %d\n", ret); - if (hdmi->extp_clk) { DBG("pixclock: %lu", hdmi->pixclock); ret = clk_set_rate(hdmi->extp_clk, hdmi->pixclock); @@ -41,11 +36,8 @@ static void msm_hdmi_power_on(struct drm_bridge *bridge) static void power_off(struct drm_bridge *bridge) { - struct drm_device *dev = bridge->dev; struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge); struct hdmi *hdmi = hdmi_bridge->hdmi; - const struct hdmi_platform_config *config = hdmi->config; - int ret; /* TODO do we need to wait for final vblank somewhere before * cutting the clocks? @@ -55,10 +47,6 @@ static void power_off(struct drm_bridge *bridge) if (hdmi->extp_clk) clk_disable_unprepare(hdmi->extp_clk); - ret = regulator_bulk_disable(config->pwr_reg_cnt, hdmi->pwr_regs); - if (ret) - DRM_DEV_ERROR(dev->dev, "failed to disable pwr regulator: %d\n", ret); - pm_runtime_put(&hdmi->pdev->dev); } diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c b/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c index d77c68914c5f525cf12971c1058b1abc33792b24..a42ed26a5b7c7d916d543aa2920754347903062a 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c @@ -64,36 +64,17 @@ int msm_hdmi_hpd_enable(struct drm_bridge *bridge) { struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge); struct hdmi *hdmi = hdmi_bridge->hdmi; - const struct hdmi_platform_config *config = hdmi->config; struct device *dev = &hdmi->pdev->dev; uint32_t hpd_ctrl; int ret; unsigned long flags; - ret = regulator_bulk_enable(config->hpd_reg_cnt, hdmi->hpd_regs); - if (ret) { - DRM_DEV_ERROR(dev, "failed to enable hpd regulators: %d\n", ret); - goto fail; - } - - ret = pinctrl_pm_select_default_state(dev); - if (ret) { - DRM_DEV_ERROR(dev, "pinctrl state chg failed: %d\n", ret); - goto fail; - } - if (hdmi->hpd_gpiod) gpiod_set_value_cansleep(hdmi->hpd_gpiod, 1); ret = pm_runtime_resume_and_get(dev); - if (ret) { - DRM_DEV_ERROR(dev, "runtime resume failed: %d\n", ret); - goto fail; - } - - ret = clk_bulk_prepare_enable(config->hpd_clk_cnt, hdmi->hpd_clks); if (ret) - goto fail; + return ret; msm_hdmi_set_mode(hdmi, false); msm_hdmi_phy_reset(hdmi); @@ -119,32 +100,18 @@ int msm_hdmi_hpd_enable(struct drm_bridge *bridge) spin_unlock_irqrestore(&hdmi->reg_lock, flags); return 0; - -fail: - return ret; } void msm_hdmi_hpd_disable(struct hdmi *hdmi) { - const struct hdmi_platform_config *config = hdmi->config; struct device *dev = &hdmi->pdev->dev; - int ret; /* Disable HPD interrupt */ hdmi_write(hdmi, REG_HDMI_HPD_INT_CTRL, 0); msm_hdmi_set_mode(hdmi, false); - clk_bulk_disable_unprepare(config->hpd_clk_cnt, hdmi->hpd_clks); pm_runtime_put(dev); - - ret = pinctrl_pm_select_sleep_state(dev); - if (ret) - dev_warn(dev, "pinctrl state chg failed: %d\n", ret); - - ret = regulator_bulk_disable(config->hpd_reg_cnt, hdmi->hpd_regs); - if (ret) - dev_warn(dev, "failed to disable hpd regulator: %d\n", ret); } void msm_hdmi_hpd_irq(struct drm_bridge *bridge) @@ -179,7 +146,6 @@ void msm_hdmi_hpd_irq(struct drm_bridge *bridge) static enum drm_connector_status detect_reg(struct hdmi *hdmi) { - const struct hdmi_platform_config *config = hdmi->config; u32 hpd_int_status = 0; int ret; @@ -187,14 +153,8 @@ static enum drm_connector_status detect_reg(struct hdmi *hdmi) if (ret) goto out; - ret = clk_bulk_prepare_enable(config->hpd_clk_cnt, hdmi->hpd_clks); - if (ret) - goto out; - hpd_int_status = hdmi_read(hdmi, REG_HDMI_HPD_INT_STATUS); - clk_bulk_disable_unprepare(config->hpd_clk_cnt, hdmi->hpd_clks); - out: pm_runtime_put(&hdmi->pdev->dev); From patchwork Sun Feb 9 05:04:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13966661 Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 02BDB18C008 for ; Sun, 9 Feb 2025 05:07:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077636; cv=none; b=qXbx5UWFM926hxZZmcsbGLOdz4F+oaAxeFAmCyxyyYgMrHrAoT3sVxfLdEDbTKDpvO7WRR6ljMikUpAE24Gfogs+Vl+C0GhJqgOJDfQY/lKzHQef0emMoZPCB5J9uSxO9Vb93c36J6lv2oTzk22ZD1dPGZnlIbedpoDIJJzDQGg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077636; c=relaxed/simple; bh=+WpYll0ay0xnF4O7o5nyBXY9cEIfu8gX+WDGXWRK1Mc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PxoEqBNYHMsnbYZKGwg84JXAUq9ZlhcInlKqHFqEVw1RHKLoqd0RlX7C+tn9tq/gTrUzlECP7InSmJtC080W3qxUh26EdcHeOEL1jJdHL/xk4TGUoESe5+zPPllMODoSOYkaj4O9kr0bsEP/vk6TZ5s1IwsDLdu3odwMLWRN1I0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=jayohbsV; arc=none smtp.client-ip=209.85.167.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="jayohbsV" Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-545054d78edso856402e87.1 for ; Sat, 08 Feb 2025 21:07:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739077632; x=1739682432; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=rImDBJcwLqN/bA8K9yZBJSkxES6sl/gp3TQ1UcsOkUQ=; b=jayohbsVHQCL1OJoTXhTc7Ji7N3Iw3f0Vq1mKaEXtqHbC5B1R2DwfQzJ4KzaI4pII1 TGoEuwqfyBIpWsO36jInLM1OwfgMZl3Vk00f2CSNXLoUfndIbgQ0TTiH50/i2sUGp5ex XZTLJpHUv0KsmpjHjKDcfu2J6W1xsl9+lQdkyt7kix4VTc/cm69E+WIlqRJNHijAdZog FrpOOsu/jolP6kjFp6mGqgcQxZ6Cmo97w10pkOMWGMDFf9aXAlZwT+KG9eIG/mhj7WpG w9Q/xt6mE86+wQ0aWT9nr3tDzdjblrZ+bdIboA35e1vA/eFKDAaH7juL7+UCHPItUa+V C1Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739077632; x=1739682432; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rImDBJcwLqN/bA8K9yZBJSkxES6sl/gp3TQ1UcsOkUQ=; b=rZTvgN/5oz0wFAdEfo2HUeLATDTdyBm5Yqx3E5J8MWUrZhUpSd5nzR3KgfcjZSRMBk qnuX9wKJH5ofR0sEj6Y5rW+LsPt4y9vauOt5hXL7SgM3uxyeckBFuU3cauDr/HTEg8CJ VE4Gh5ewqPPexrltFkSYDwbO1z63k5CWNO/wt3xrAjQ/IfKUsnZqACqTZz6QpSYLSQHP b2jYPx4d2PSjdgZYc5BqQGGzKSuO5Aieu++P//YBFBtP1nbfkMB/7a4PkPUhfWofdKPH NdxSXyCKQgbOy/ejjwfQn90ii9tUZGDC91WJT1bW18Xo4pW3ggAnQF7NZt2TfX1bqpM7 TW8w== X-Gm-Message-State: AOJu0YyKzni+BbvN7U2BxuLLgSYV0AOu9Vq2VhfaHy44AqtpMQ8AW9ha MayE2xLyd1QJMcI0jrDIktgI1Vc/wZGQFErJKeMDF2tPhU2Qm3Tlld4lfT4t7/W48YD4R/6qyFa k2DE= X-Gm-Gg: ASbGncsJu/r+BvgWMjIlgsxeI1RhyOWXE9gGMaiwAox9poFnvmtYWgGgLUrXEG7Ql6f BxiBqrHWS3Y2khZ2Bkdr1eR3aQomOUgZPCdirA2okhAxC+Q2jTC1jQXm6KOGwOs2GQKDyIL3uhp O+bgIlafxVMP2yAmUT7kGwZ+rD9rMO59FClyLwtzEAcFETymV+pX95HViPgGqfU82JUUYi8IQH2 8CouaNRvupvlZmYcoiOc05r9E8CDH5bsp/4HW/Kr+KIdbo/eXdO1gyvFniYHzoiaJFNt11YmwpL MV+hzDBzVAHC1MvRZSpDyGg= X-Google-Smtp-Source: AGHT+IE2QJZGzfLvREQjZ2Yj5CakhCNV2ut93H8ain0VcaXqhSAifxC/qDGCZKxvSJtMnQOIOHh9hQ== X-Received: by 2002:a19:8c55:0:b0:545:441:52d4 with SMTP id 2adb3069b0e04-5450441553dmr1026473e87.26.1739077631945; Sat, 08 Feb 2025 21:07:11 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54506ef1733sm245576e87.1.2025.02.08.21.07.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Feb 2025 21:07:10 -0800 (PST) From: Dmitry Baryshkov Date: Sun, 09 Feb 2025 07:04:55 +0200 Subject: [PATCH v4 11/16] drm/msm/hdmi: rename hpd_clks to pwr_clks Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250209-fd-hdmi-hpd-v4-11-6224568ed87f@linaro.org> References: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> In-Reply-To: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Jessica Zhang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=4084; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=+WpYll0ay0xnF4O7o5nyBXY9cEIfu8gX+WDGXWRK1Mc=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnqDfjf8OBc8uSGwCTBq4PbhEA1GDOaqya+TI2F VrQN8it+xKJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ6g34wAKCRCLPIo+Aiko 1WmrCACsjaJLkXpv4v5MNIIXG7ds98d+aS/Ra33MbEb/9rTGuEBP8CIdMTldJfwvQfHRoNnJCMI A/j+3tq2UuhxUrLtxzo9NC2I0hI2BTZ55dOQPgn1ou3bqJiXzwaJ37XA9+vu4hAkpZ6L33xB6DE A119TuMSildDZgGfpg6fmxNmZHOIEa6cg1COY+UcpNKOp/QlQU01BMCzifnmBW441EgV+yPufpL AMB2jTVSlke2qeSPU1QkNyhgnOG5X9RIMGQXfOiXhJ/CKUNiUXFLUITYNiVMdjYof8nnLs5xhOf 4P/QTx1Hq89+lFKvj0L9A3arcHDUkAmQQrlf5dcdJSnr+LWB X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A As these clocks are now used in the runtime PM callbacks, they have no connection to 'HPD'. Rename corresponding fields to follow clocks purpose, to power up the HDMI controller. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 26 +++++++++++++------------- drivers/gpu/drm/msm/hdmi/hdmi.h | 6 +++--- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index ded20176aa805db98b0599e617eb6ea9bce122d8..8e6e3e6a04bd2d86bcbd23c110f3533f56c17887 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -226,19 +226,19 @@ int msm_hdmi_modeset_init(struct hdmi *hdmi, .item ## _cnt = ARRAY_SIZE(item ## _names_ ## entry) static const char * const pwr_reg_names_8960[] = {"core-vdda"}; -static const char * const hpd_clk_names_8960[] = {"core", "master_iface", "slave_iface"}; +static const char * const pwr_clk_names_8960[] = {"core", "master_iface", "slave_iface"}; static const struct hdmi_platform_config hdmi_tx_8960_config = { HDMI_CFG(pwr_reg, 8960), - HDMI_CFG(hpd_clk, 8960), + HDMI_CFG(pwr_clk, 8960), }; static const char * const pwr_reg_names_8x74[] = {"core-vdda", "core-vcc"}; -static const char * const hpd_clk_names_8x74[] = {"iface", "core", "mdp_core", "alt_iface"}; +static const char * const pwr_clk_names_8x74[] = {"iface", "core", "mdp_core", "alt_iface"}; static const struct hdmi_platform_config hdmi_tx_8974_config = { HDMI_CFG(pwr_reg, 8x74), - HDMI_CFG(hpd_clk, 8x74), + HDMI_CFG(pwr_clk, 8x74), }; static int msm_hdmi_bind(struct device *dev, struct device *master, void *data) @@ -333,17 +333,17 @@ static int msm_hdmi_dev_probe(struct platform_device *pdev) if (ret) return dev_err_probe(dev, ret, "failed to get pwr regulators\n"); - hdmi->hpd_clks = devm_kcalloc(&pdev->dev, - config->hpd_clk_cnt, - sizeof(hdmi->hpd_clks[0]), + hdmi->pwr_clks = devm_kcalloc(&pdev->dev, + config->pwr_clk_cnt, + sizeof(hdmi->pwr_clks[0]), GFP_KERNEL); - if (!hdmi->hpd_clks) + if (!hdmi->pwr_clks) return -ENOMEM; - for (i = 0; i < config->hpd_clk_cnt; i++) - hdmi->hpd_clks[i].id = config->hpd_clk_names[i]; + for (i = 0; i < config->pwr_clk_cnt; i++) + hdmi->pwr_clks[i].id = config->pwr_clk_names[i]; - ret = devm_clk_bulk_get(&pdev->dev, config->hpd_clk_cnt, hdmi->hpd_clks); + ret = devm_clk_bulk_get(&pdev->dev, config->pwr_clk_cnt, hdmi->pwr_clks); if (ret) return ret; @@ -401,7 +401,7 @@ static int msm_hdmi_runtime_suspend(struct device *dev) struct hdmi *hdmi = dev_get_drvdata(dev); const struct hdmi_platform_config *config = hdmi->config; - clk_bulk_disable_unprepare(config->hpd_clk_cnt, hdmi->hpd_clks); + clk_bulk_disable_unprepare(config->pwr_clk_cnt, hdmi->pwr_clks); pinctrl_pm_select_sleep_state(dev); @@ -424,7 +424,7 @@ static int msm_hdmi_runtime_resume(struct device *dev) if (ret) goto fail; - ret = clk_bulk_prepare_enable(config->hpd_clk_cnt, hdmi->hpd_clks); + ret = clk_bulk_prepare_enable(config->pwr_clk_cnt, hdmi->pwr_clks); if (ret) goto fail; diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.h b/drivers/gpu/drm/msm/hdmi/hdmi.h index 7e3c035cf913d713ed63379a843897fad96b23ab..a28437beb1574553c1dc00a0c693b390389353e0 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.h +++ b/drivers/gpu/drm/msm/hdmi/hdmi.h @@ -48,7 +48,7 @@ struct hdmi { phys_addr_t mmio_phy_addr; struct regulator_bulk_data *pwr_regs; - struct clk_bulk_data *hpd_clks; + struct clk_bulk_data *pwr_clks; struct clk *extp_clk; struct gpio_desc *hpd_gpiod; @@ -87,8 +87,8 @@ struct hdmi_platform_config { int pwr_reg_cnt; /* clks that need to be on for hpd: */ - const char * const *hpd_clk_names; - int hpd_clk_cnt; + const char * const *pwr_clk_names; + int pwr_clk_cnt; }; struct hdmi_bridge { From patchwork Sun Feb 9 05:04:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13966662 Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4441A1991CA for ; Sun, 9 Feb 2025 05:07:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077638; cv=none; b=p9rycI0RqZmUZ7wYwDwA4B1IULKsTRkfMtByduVePjPYSGFAdlfzHFVPnUykS3ZcDAF9ge5jI7FT/DCwwiRojj3kmvUEbA+6ly4vVaNEZ5Nqr/MewKzC4jQ4Mc3SE3ayjn56jTNe389XKfF5QlP4jH8E7r1SuvxAMYX3FIRzE2o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077638; c=relaxed/simple; bh=7KB7IcHxi0VqX9I5ufq901Xoeq2I7R2imjBgnmx5DoY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CyupzsyeAsdEElM/1eU4ng1aMfNo3vdpGQvmLIe8dNGWXVC6XhSnKlx92NaRAGu5NhQ2jWuVeGzcjMOf3ZM3IYgCH3FZfZUJtFSaNgjpIHP1+IfBHMJZWNKSu9Xk4r9DKjQSFAeHDneGsvJ20dIIUVH+sXilbEsCDmZNdZ5OdLo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=FThBDY1U; arc=none smtp.client-ip=209.85.167.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="FThBDY1U" Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-54504f29000so935769e87.1 for ; Sat, 08 Feb 2025 21:07:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739077634; x=1739682434; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=hlPHSmm8yEMkPCpLMXSlS5GXe/d+EX9J4C1uXL4gVw4=; b=FThBDY1UlKtblGbTSXV9L2F63W7zW2GJ4SilXFOZp6rmJj/D9VBpA8mP2f6aF37XsH t9zvGG4ADp+7v62hTkGple1B6ipxeHrR+hhOp8RQDcTFZZ2rl7mEYuOKEoADOxWG9V0L XfyvM0o0t1wD8E8bQF1Jxrpct8Gke/T15VmEYk+uXwX+xdAXoww7py8zObuB9Bsa6F69 G4dYFAdBSJpCwgZQVSs+X6Y85MFGSrLyTd1Z5fENB/SmTamNdjLzjeO6JqZ4FSFTIYRq /t0DYQ+OUsdiPHOGOnx/aOnnNYRAPHUO7MF4qSOlJEIyEhrL9dlYTlkHjHfrC1XDPZvn Hifg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739077634; x=1739682434; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hlPHSmm8yEMkPCpLMXSlS5GXe/d+EX9J4C1uXL4gVw4=; b=O/AT1bTJwizFmeiOxNbZs23BrnFDF2vTFDSp4SF4S1os2qAeJY+7xrVoeWXnJgbfI9 lKeB+fmmNb2UfU9acgGB8GTdjOZbz/QkIX7PfP/ylCxxZG5lGRa4zyByDu+h9lLhcQoV +wfNhaLHTZ8LAbNJCqYcOtq/wSvjMJfwXU8fCkAnStgTmFSmP9BOuJdUqcZ/uRAH3ODz Z2Q0uMFsXCbYBAenDHg4WXXQP2G9EU/fJuMOls0xiUAnYl7dbOTliR14G+uBuD7APguM grkCTBVG8AEp0L/GnB9CNYsJLZQEE1aSwvLxF24irENdVvcXEih+hBlN6IFe3s+0J9nA TZJQ== X-Gm-Message-State: AOJu0Yxp+vMEQPi2NevdLzGURmunsI31PLneLcKfFuBYPQbIW8AiZW9q CVX2w32u41a/hO08qfC6e/6Ji5zuUd4XPVoHSuFd81qKRhtzi0rHPU/bTo08Iuz8SFHh6mHjtqK tgCs= X-Gm-Gg: ASbGnct19VUkTnyc6iaqXOFXRBbJ5BlZmLHpbwDpcO6e+CwE1UU21OAjIr2RDb8rOpm C6M3kWWfPI9V34ToT7Xb30Qaw56zdhrgqtsGNuY5LLCJwM4ra4TvPKVSB7FHOnkI6qm10C6ulvn vP6UI9zfaoAoBUehls+tnHW0gs28haWjmEnYok9psvGYNzh80sya8048l6mhWcCVoum7cRcfSvI k/BRJmk/B7ZPT9fjd4tfaN7UiErM+uhKtXw577f9nj6HO/bU1esbttRcWxgbljpUiozdozmAB/y f0jYOSrOCJcIncSw4R+Z0/A= X-Google-Smtp-Source: AGHT+IEd6dicvlKdQV2rRsUxtxE28CChSKCpQgVen389uSlji8/jD6oj/iczUy7fpLXBwrzv/IwjKQ== X-Received: by 2002:a05:6512:2399:b0:544:ee5:87b0 with SMTP id 2adb3069b0e04-54414a96604mr3354167e87.3.1739077634302; Sat, 08 Feb 2025 21:07:14 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54506ef1733sm245576e87.1.2025.02.08.21.07.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Feb 2025 21:07:13 -0800 (PST) From: Dmitry Baryshkov Date: Sun, 09 Feb 2025 07:04:56 +0200 Subject: [PATCH v4 12/16] drm/msm/hdmi: expand the HDMI_CFG macro Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250209-fd-hdmi-hpd-v4-12-6224568ed87f@linaro.org> References: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> In-Reply-To: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Jessica Zhang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2467; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=7KB7IcHxi0VqX9I5ufq901Xoeq2I7R2imjBgnmx5DoY=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnqDfjFlNku8IROPqumZ4E4rIS6xVD6X6WWajZV tgiLp+pqdCJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ6g34wAKCRCLPIo+Aiko 1XtACACmQHPvaloVCRw6WqW1+yRfCCOJWikCAcXTkM4JJ5bJUFfsy1jAtNccjkUo3nJxp/p+GNL Y9hsOLA5Pc2IUQ7X+8EaioPypvW6QelbfocUaIB7nlut86mqKsx7Bk8mB+xRWBgCyUTiUH+i9Gs QzYz9wWCSdM+ZyY6WFc+RD6QNPD+NHQ+eYtbfWr7BLYyH4yZfnYGi6tpnj76ocxpFo1AVHEYPhd B416qy+4Kmw0nFo4RtXec2GOy8UlCuL3msGn0w4yUxM4cVWTN1G+WIbBlql5toxz5913vWTjOMM 2EEO4x9dTVVWOZShs1WwynUZ5ECsFQruxJivyWRpz/iJo2dn X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Expand the HDMI_CFG() macro in HDMI config description. It has no added value other than hiding some boilerplate declarations. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 16 ++++++++-------- drivers/gpu/drm/msm/hdmi/hdmi.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index 8e6e3e6a04bd2d86bcbd23c110f3533f56c17887..3d10fe6f8545198365a047b2f5652081703101aa 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -221,24 +221,24 @@ int msm_hdmi_modeset_init(struct hdmi *hdmi, * The hdmi device: */ -#define HDMI_CFG(item, entry) \ - .item ## _names = item ##_names_ ## entry, \ - .item ## _cnt = ARRAY_SIZE(item ## _names_ ## entry) - static const char * const pwr_reg_names_8960[] = {"core-vdda"}; static const char * const pwr_clk_names_8960[] = {"core", "master_iface", "slave_iface"}; static const struct hdmi_platform_config hdmi_tx_8960_config = { - HDMI_CFG(pwr_reg, 8960), - HDMI_CFG(pwr_clk, 8960), + .pwr_reg_names = pwr_reg_names_8960, + .pwr_reg_cnt = ARRAY_SIZE(pwr_reg_names_8960), + .pwr_clk_names = pwr_clk_names_8960, + .pwr_clk_cnt = ARRAY_SIZE(pwr_clk_names_8960), }; static const char * const pwr_reg_names_8x74[] = {"core-vdda", "core-vcc"}; static const char * const pwr_clk_names_8x74[] = {"iface", "core", "mdp_core", "alt_iface"}; static const struct hdmi_platform_config hdmi_tx_8974_config = { - HDMI_CFG(pwr_reg, 8x74), - HDMI_CFG(pwr_clk, 8x74), + .pwr_reg_names = pwr_reg_names_8x74, + .pwr_reg_cnt = ARRAY_SIZE(pwr_reg_names_8x74), + .pwr_clk_names = pwr_clk_names_8x74, + .pwr_clk_cnt = ARRAY_SIZE(pwr_clk_names_8x74), }; static int msm_hdmi_bind(struct device *dev, struct device *master, void *data) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.h b/drivers/gpu/drm/msm/hdmi/hdmi.h index a28437beb1574553c1dc00a0c693b390389353e0..fb64652162b6c5e6e2fe3357b89c40e2a28aa47e 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.h +++ b/drivers/gpu/drm/msm/hdmi/hdmi.h @@ -86,7 +86,7 @@ struct hdmi_platform_config { const char * const *pwr_reg_names; int pwr_reg_cnt; - /* clks that need to be on for hpd: */ + /* clks that need to be on: */ const char * const *pwr_clk_names; int pwr_clk_cnt; }; From patchwork Sun Feb 9 05:04:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13966663 Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6C241A315E for ; Sun, 9 Feb 2025 05:07:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077640; cv=none; b=oRjJeV+KNbzJ76yKouZ1il6sOJTKJ81cTGAka36RFdOZ8WqRMzPlj7qIq4msv3gR70vftxkxuVDo+BgRZSew6Y/zqbrrGR5NboAgo9nx23i0j1TN/0SZstezhQyCONvNOC7qWwYqGuy6plzi7aed3+kZwHRdEw2DGELE8t5nfq4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077640; c=relaxed/simple; bh=bHZ+8WYzHrJJ+NgSrs9nDogjdV+FFAB38y+PAaB4SrI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=il7dunjal0/ZpzofkhDqscr3WiPTlRAbVjGjx4b/t0RiGus836yD69kIl/WLU0nCflZaeX9Z1P7l+ZitrilMFhZ2iGCFzn86pf/rMhdbHXoB1fJeuylklA2Hz5+IHcu8wSRCRd/IWwBLm700pb75b0SuUhiQXt9EWIMm304s+Ik= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=O9mUo8Yt; arc=none smtp.client-ip=209.85.167.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="O9mUo8Yt" Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-5450475df18so1029943e87.2 for ; Sat, 08 Feb 2025 21:07:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739077637; x=1739682437; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=wQN0+9Nxsmop3hssFFkRG5gm+YC2hGLzkxVXuFrHYbk=; b=O9mUo8YtLvaQ8oUFOnZuFfyueJjgycDmaeA/Q4mFeAL0ldukJNJ1hs+fYa4QbIhD2k /iz0+0eA+thQPCfq+Lj7Bfpr7mee1w4SXMsJW6wUtplHArR8jlD7ytckmB3RJDke1IGF a30vLy2Ww5b/3fcvwXgfahh9O3nJC18zGJpmnyNFciMaHHNj7pbX21t/I3KNy54kVLmB BeyouoJx8puFJO1Ggj08vtW1xnliWfVYCsylUQ7TV1ay9K0+G3Qu/HMTxAHTFw29bfcJ SPypxHh8zs21MNo7dRO37QSlz6uCahVUqwFkv5P45oeuAp79E1WCAKcd2STtHorpbM73 p+nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739077637; x=1739682437; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wQN0+9Nxsmop3hssFFkRG5gm+YC2hGLzkxVXuFrHYbk=; b=b5Xb/KHoE2JzjyQ/KLGvMbSjHRBmP2TH9x6VELdJF4FDC2dckTIsAAfBCGO1dTov98 vH2r1Y8LH52wZdXqze9duq3U1Lu7T1TurmJtwuTmGOP/WDSn++q8OZQ/gqYTfdhDaaq0 CCobfr50cFXql7dCRubq9FRHrdoX4149C64arLEiKPlfkSy+6FfsTyLN2ecRVpDm1L6a yR9IfhyBiH1DKJDo1u1wAL6Ypjgndmg3D1SUn6LYhMRActLDglLE/At8JlYvcwwoyHWA aC4zhmglEp6bIa44kiu+FXxJF3BGFQMJBQeADECTOGmyv3KUDpP0dxfLcDyQ5WKlsVZK u9EQ== X-Gm-Message-State: AOJu0YzZTzN7YD5nMZWiChcUcuxTxS0olIr7wnX6OTtolfmOy/3W0FL5 WSBS4CRJrv4n/hVDiFhdnTUlCx4bbn9KMzEDdapWDcUFrnnYioTUoqIKIX4PPX0PUnG23QQnXvl RiEc= X-Gm-Gg: ASbGncsbagffLE53z1m9AT3FDLfSXOejuNCvnnYaHxFuOpg+zDk035ujpWixIvhzxZE MD5XgR5mDtwYlDDfyHW2dr7Al30uJQCo3VcDRWYbEi0c4hn3YIAc/El/SvqtYjBcovYuiCWemVB X2R34wPP71+URFYMOgQvHIyuk35F1mf5U0Q5WeCRx5EwaHpHJDsKelBvdOEDI8TNqg9AsL9nKUX EO1Td9z7CPyEKqihLdb5qUdJ5j2S7juZ+LMGZO/AJZyb8BzBUUT5osj247D6ZefToqizu/JwM0S Oq+GIF6HyZrjHmNMZs6/zfo= X-Google-Smtp-Source: AGHT+IGp/15rtM4WUZVM/z/LrVJYA8lGK9lfX+FXcNamZzHbk22gzs/jyxYxDerRvXrH1oHxGPPxwg== X-Received: by 2002:a05:6512:a8b:b0:545:ba7:26f5 with SMTP id 2adb3069b0e04-5450ba727f9mr21247e87.46.1739077636734; Sat, 08 Feb 2025 21:07:16 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54506ef1733sm245576e87.1.2025.02.08.21.07.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Feb 2025 21:07:15 -0800 (PST) From: Dmitry Baryshkov Date: Sun, 09 Feb 2025 07:04:57 +0200 Subject: [PATCH v4 13/16] drm/msm/hdmi: drop hpd-gpios support Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250209-fd-hdmi-hpd-v4-13-6224568ed87f@linaro.org> References: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> In-Reply-To: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Jessica Zhang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=4525; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=bHZ+8WYzHrJJ+NgSrs9nDogjdV+FFAB38y+PAaB4SrI=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnqDfjEbNj1xGsfjY7qcPtcbZDe1Jbntpt8hWtV hNun8j5xyGJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ6g34wAKCRCLPIo+Aiko 1YBbB/45QpIZuxWXosnWOeO5OFPRAW5AOBQIRXJZ52Pls3macQD9qAauDoCLtSI0iEPZ1daMbp3 1OVi92DXGwz97C4/PmsoKMPx5BQwNffqYcI7dNWDKqHloG4VlYE0s1SJa4iuK3MuKTFo8E2mpsS 1YBn+MHA2vVYBmeRywRkL66hJ8cwM1mnj1198W5nPfmHnEmeaVBnu06JNzphQuZ8m1eoMBHKh8A wyqYM8UFd4zJAflGWp6pGBDvF4W4ksxmxT1PPjRRZ1koPeK8qsOyu+t1pjZtswtWuw7Z5jc8GkY P6r9iHbbQoTA+vCKc9bqisiHcxZc8wU3qXxNJYpWV6VRdLN5 X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Supporting simultaneous check of native HPD and the external GPIO proved to be less stable than just native HPD. Drop the hpd-gpios support, leaving just the native HPD support. In case the native HPD doesn't work the user is urged to switch to specifying the HPD property to the hdmi-connector device. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 14 +++------- drivers/gpu/drm/msm/hdmi/hdmi.h | 2 -- drivers/gpu/drm/msm/hdmi/hdmi_hpd.c | 52 +++---------------------------------- 3 files changed, 6 insertions(+), 62 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index 3d10fe6f8545198365a047b2f5652081703101aa..abe2c9e1df550a36914ed19f51e7b86e5d3d24c0 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -352,17 +352,9 @@ static int msm_hdmi_dev_probe(struct platform_device *pdev) return dev_err_probe(dev, PTR_ERR(hdmi->extp_clk), "failed to get extp clock\n"); - hdmi->hpd_gpiod = devm_gpiod_get_optional(&pdev->dev, "hpd", GPIOD_IN); - /* This will catch e.g. -EPROBE_DEFER */ - if (IS_ERR(hdmi->hpd_gpiod)) - return dev_err_probe(dev, PTR_ERR(hdmi->hpd_gpiod), - "failed to get hpd gpio\n"); - - if (!hdmi->hpd_gpiod) - DBG("failed to get HPD gpio"); - - if (hdmi->hpd_gpiod) - gpiod_set_consumer_name(hdmi->hpd_gpiod, "HDMI_HPD"); + if (of_find_property(dev->of_node, "hpd-gpios", NULL) || + of_find_property(dev->of_node, "hpd-gpio", NULL)) + dev_warn(dev, "hpd-gpios is not supported anymore, please migrate to the hdmi-connector\n"); ret = msm_hdmi_get_phy(hdmi); if (ret) { diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.h b/drivers/gpu/drm/msm/hdmi/hdmi.h index fb64652162b6c5e6e2fe3357b89c40e2a28aa47e..a40d69ae328ced8b9f7411cf809a3fa8641dca33 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.h +++ b/drivers/gpu/drm/msm/hdmi/hdmi.h @@ -51,8 +51,6 @@ struct hdmi { struct clk_bulk_data *pwr_clks; struct clk *extp_clk; - struct gpio_desc *hpd_gpiod; - struct hdmi_phy *phy; struct device *phy_dev; diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c b/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c index a42ed26a5b7c7d916d543aa2920754347903062a..d63f0fd96f0c00bbe07a13f8ead26f05a5133084 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c @@ -69,9 +69,6 @@ int msm_hdmi_hpd_enable(struct drm_bridge *bridge) int ret; unsigned long flags; - if (hdmi->hpd_gpiod) - gpiod_set_value_cansleep(hdmi->hpd_gpiod, 1); - ret = pm_runtime_resume_and_get(dev); if (ret) return ret; @@ -144,8 +141,10 @@ void msm_hdmi_hpd_irq(struct drm_bridge *bridge) } } -static enum drm_connector_status detect_reg(struct hdmi *hdmi) +enum drm_connector_status msm_hdmi_bridge_detect(struct drm_bridge *bridge) { + struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge); + struct hdmi *hdmi = hdmi_bridge->hdmi; u32 hpd_int_status = 0; int ret; @@ -161,48 +160,3 @@ static enum drm_connector_status detect_reg(struct hdmi *hdmi) return (hpd_int_status & HDMI_HPD_INT_STATUS_CABLE_DETECTED) ? connector_status_connected : connector_status_disconnected; } - -#define HPD_GPIO_INDEX 2 -static enum drm_connector_status detect_gpio(struct hdmi *hdmi) -{ - return gpiod_get_value(hdmi->hpd_gpiod) ? - connector_status_connected : - connector_status_disconnected; -} - -enum drm_connector_status msm_hdmi_bridge_detect( - struct drm_bridge *bridge) -{ - struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge); - struct hdmi *hdmi = hdmi_bridge->hdmi; - enum drm_connector_status stat_gpio, stat_reg; - int retry = 20; - - /* - * some platforms may not have hpd gpio. Rely only on the status - * provided by REG_HDMI_HPD_INT_STATUS in this case. - */ - if (!hdmi->hpd_gpiod) - return detect_reg(hdmi); - - do { - stat_gpio = detect_gpio(hdmi); - stat_reg = detect_reg(hdmi); - - if (stat_gpio == stat_reg) - break; - - mdelay(10); - } while (--retry); - - /* the status we get from reading gpio seems to be more reliable, - * so trust that one the most if we didn't manage to get hdmi and - * gpio status to agree: - */ - if (stat_gpio != stat_reg) { - DBG("HDMI_HPD_INT_STATUS tells us: %d", stat_reg); - DBG("hpd gpio tells us: %d", stat_gpio); - } - - return stat_gpio; -} From patchwork Sun Feb 9 05:04:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13966664 Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C78813B7B3 for ; Sun, 9 Feb 2025 05:07:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077643; cv=none; b=kW/h1QsPPp3vX5KyGq1EZ+FmXhldYAIoeQmHy1RtLKsC4atyRx9QjDGG/54r19KXGRRENuA4afqNRggQ4pYJK4iOVP48RofeNSkhcaZG7hSo0rGZi2Acv/TwGG8vjxFixfw45ZsWOmiHJIymMUt+7xWdfHN9ssIXHeBCeilsQzE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077643; c=relaxed/simple; bh=CPzYHspMawaj1ZhasAtWHWKW8kSrzV7QWMnVrxr5HkQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kdPUceCxbLm6N1yDcV1DWm8wFYrAoEjmikoT6/0qmOD0eKcb887NMqUwGwwwy/aKTy6iK+cCsUp0nOCZsr3pIke1NstIhnXbjtlg3cfUKyk6uDlBAsEvs7NOfQWn6d5R8QnWc6RsLzwdYfOs9uRd5UzESorpNQeROkmvZfc34WU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=E6WCK13z; arc=none smtp.client-ip=209.85.167.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="E6WCK13z" Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-54509f46614so199832e87.0 for ; Sat, 08 Feb 2025 21:07:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739077639; x=1739682439; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=RsjApZDAdahQIG0TxYhGE+9LrTC+9WrAVuHPpJuw1/8=; b=E6WCK13zsWInNrb3Ly3YGJCKWMjwOQOFZ4YXjoDK26iq1EWflYENaGOd55dgEoVpcW c+IOQmreZVHzFeqVBiJa3KmCHLiCp+kMRhsSG3I2xe64ZzOT3A45oztHWyqtGG8dx5RN JNp2sIZa2qHFgmh3UDpdRSgPghnSSb0bKk47vCJ3lptlOXKn4qXtdWcXXXvl89E1HT0Y eOjLfhSBEHuqqQuI4Si2lOWKfQGKkShY1O1OTgbwQ9GREfRVomIVHkw4s/FqsRequ1c7 A/+xgKJfZDbNdopbl2Lg+QgP+ZQ+PJZNqlM2LmzzaPFNwyXR+nd0b/xOAwZkllm8g9KS /Deg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739077639; x=1739682439; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RsjApZDAdahQIG0TxYhGE+9LrTC+9WrAVuHPpJuw1/8=; b=XY9jCXw2CpVWVSRYHhZy0KI/MS8uhuW4s0L+vJfdKbrq5+8QIv+AZnifvb3rY+M2hM uCpBecPL/jEkAgsuLR5NXv9yeujX3t4qq2R9GJWTt8bTX6lEuegDrLgJRWyzBS558p2/ DtpYotcx5AKNngLGJCH7ZeJWDHBH/A5hsUV7SQja+C4TWpt87DPBo5qVH/zjLzp+ORAx Qix2psbSVfmLAHT8zk6C3dDaPN8ln+vtE/VlaY9N6N4RC+Ub2C4OwYH44B+cuJOwqT8f X/LiUyzr6fhSSkAfXVgrIAIfQqSUvf0R294gPjm7tsqR0V8v5tBoUlHopfSwxCqLHbIb 41cw== X-Gm-Message-State: AOJu0YyBQ6h0sWmVriK8Zy13eXpXbKuNlvP6RTUl8wRPgpVu1cqKeTWa 8kxbB40rlFXDc49+toQnXa/PoK94Uy3SUlteRE1ebZzIquuZ2Lx/oYEDgrtnoCTG97g3WB577ht ozlg= X-Gm-Gg: ASbGncucvMAYNBwco3Xq3WrTkKU+5vP88iWvZrHN2JFQxavXSZZ24ubw8sTCm+3R0s+ mTuXcJbAet2Sv0HQ1D2N6NwAUbV4swILzRQyX+DcrcyDHlecH79BwqXsDBWtk5kfKVqqvTFLQQu cqsg7XwDkqUdfimG3liim0LK24cNobKKMhmh5/2bablVI955H8pJvyHugpih9OWC82/23OZ5CPw sru/doxmkR9nvuNncriTdP2w+brSc34/Xdn6tZRe8EuIxlCAoRWnYTb2WaaL3esFyI4jLm2/adk 2sprlYPXgtB0U3oORcY4+Y4= X-Google-Smtp-Source: AGHT+IEUV6vDEmH6QH2VbLdRGrQZS/nO/l7LtZmxle0OOHyaPvHgIitk9/cYbQnjmRzYjEvCgZ4FQA== X-Received: by 2002:a05:6512:2115:b0:542:2e04:edd1 with SMTP id 2adb3069b0e04-54414b01bb7mr2258617e87.42.1739077639078; Sat, 08 Feb 2025 21:07:19 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54506ef1733sm245576e87.1.2025.02.08.21.07.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Feb 2025 21:07:17 -0800 (PST) From: Dmitry Baryshkov Date: Sun, 09 Feb 2025 07:04:58 +0200 Subject: [PATCH v4 14/16] drm/msm/hdmi: ensure that HDMI is up if HPD is requested Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250209-fd-hdmi-hpd-v4-14-6224568ed87f@linaro.org> References: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> In-Reply-To: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Jessica Zhang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=4128; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=CPzYHspMawaj1ZhasAtWHWKW8kSrzV7QWMnVrxr5HkQ=; b=owGbwMvMwMXYbdNlx6SpcZXxtFoSQ/oK88eSHpk7Ql93ub9mUjtem3PTN2W+9P4EDjuxyxEqX +bYhPR0MhqzMDByMciKKbL4FLRMjdmUHPZhx9R6mEGsTCBTGLg4BWAiE9aw/4/PtS84291Soe+z JvviPv2qby0/Luqc3hj7+L+VeHOBcv5UN74TNmd4Ph17GM6u+CFPYnLEgZg/UjkMvnJ7A9hOGPX s45B8KNFVy6krcLj4W57jyeCTj3osVZddLD+VfDJWfJrUs0sXDi6R+1npeb+Iq/zNv9jS69Uboy L2SRuFL1TbzDlz5WbWe6KmWytnnAg/XiB0sMTq8Fd+hy2vd6w+ezfPVb3CIr3/q/3HFsMvPmFxf CWsUyfd1ci4sbnLvq1LRzP6oFa6we1rWfcumWcHnQz7H5L0U108tny3hNXPvVt9FwSU8LZM2m3X oCJbUKbPv630nPPjnsttZ9MsXj0qCPihJ852Zu2sRn45AA== X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A The HDMI block needs to be enabled to properly generate HPD events. Make sure it is not turned off in the disable paths if HPD delivery is enabled. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 1 + drivers/gpu/drm/msm/hdmi/hdmi.h | 2 ++ drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 8 +++++++- drivers/gpu/drm/msm/hdmi/hdmi_hpd.c | 9 ++++++++- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index abe2c9e1df550a36914ed19f51e7b86e5d3d24c0..b0292750265082c47093ed5cf50bbcba9e67c955 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -293,6 +293,7 @@ static int msm_hdmi_dev_probe(struct platform_device *pdev) hdmi->pdev = pdev; hdmi->config = config; spin_lock_init(&hdmi->reg_lock); + mutex_init(&hdmi->state_mutex); ret = drm_of_find_panel_or_bridge(pdev->dev.of_node, 1, 0, NULL, &hdmi->next_bridge); if (ret && ret != -ENODEV) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.h b/drivers/gpu/drm/msm/hdmi/hdmi.h index a40d69ae328ced8b9f7411cf809a3fa8641dca33..39adc8929bd601d4846f75b35c087de93c3df6be 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.h +++ b/drivers/gpu/drm/msm/hdmi/hdmi.h @@ -41,6 +41,8 @@ struct hdmi { /* video state: */ bool power_on; + bool hpd_enabled; + struct mutex state_mutex; /* protects two booleans */ unsigned long int pixclock; void __iomem *mmio; diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c index fedcefbf53d1d8d53a4882a545427f5ce6570a76..f97f8b104f93bcca20e5f81f928d9b23c14fbe28 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c @@ -303,6 +303,7 @@ static void msm_hdmi_bridge_atomic_pre_enable(struct drm_bridge *bridge, msm_hdmi_set_timings(hdmi, &crtc_state->adjusted_mode); + mutex_lock(&hdmi->state_mutex); if (!hdmi->power_on) { msm_hdmi_phy_resource_enable(phy); msm_hdmi_power_on(bridge); @@ -310,6 +311,7 @@ static void msm_hdmi_bridge_atomic_pre_enable(struct drm_bridge *bridge, if (connector->display_info.is_hdmi) msm_hdmi_audio_update(hdmi); } + mutex_unlock(&hdmi->state_mutex); drm_atomic_helper_connector_hdmi_update_infoframes(connector, state); @@ -332,7 +334,10 @@ static void msm_hdmi_bridge_atomic_post_disable(struct drm_bridge *bridge, msm_hdmi_hdcp_off(hdmi->hdcp_ctrl); DBG("power down"); - msm_hdmi_set_mode(hdmi, false); + + /* Keep the HDMI enabled if the HPD is enabled */ + mutex_lock(&hdmi->state_mutex); + msm_hdmi_set_mode(hdmi, hdmi->hpd_enabled); msm_hdmi_phy_powerdown(phy); @@ -343,6 +348,7 @@ static void msm_hdmi_bridge_atomic_post_disable(struct drm_bridge *bridge, msm_hdmi_audio_update(hdmi); msm_hdmi_phy_resource_disable(phy); } + mutex_unlock(&hdmi->state_mutex); } static void msm_hdmi_set_timings(struct hdmi *hdmi, diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c b/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c index d63f0fd96f0c00bbe07a13f8ead26f05a5133084..7726de95be4891e4a821ec4e056482263f23ac05 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c @@ -73,10 +73,14 @@ int msm_hdmi_hpd_enable(struct drm_bridge *bridge) if (ret) return ret; + mutex_lock(&hdmi->state_mutex); msm_hdmi_set_mode(hdmi, false); msm_hdmi_phy_reset(hdmi); msm_hdmi_set_mode(hdmi, true); + hdmi->hpd_enabled = true; + mutex_unlock(&hdmi->state_mutex); + hdmi_write(hdmi, REG_HDMI_USEC_REFTIMER, 0x0001001b); /* enable HPD events: */ @@ -106,7 +110,10 @@ void msm_hdmi_hpd_disable(struct hdmi *hdmi) /* Disable HPD interrupt */ hdmi_write(hdmi, REG_HDMI_HPD_INT_CTRL, 0); - msm_hdmi_set_mode(hdmi, false); + mutex_lock(&hdmi->state_mutex); + hdmi->hpd_enabled = false; + msm_hdmi_set_mode(hdmi, hdmi->power_on); + mutex_unlock(&hdmi->state_mutex); pm_runtime_put(dev); } From patchwork Sun Feb 9 05:04:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13966665 Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8607F1B0430 for ; Sun, 9 Feb 2025 05:07:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077645; cv=none; b=XdnrkyaeTxQEt7gbjiOadfHk2z22GUFVQ0uoj6mqSqTHb4Xorc6U205OogW/t6jDANqm1pMWTvoKq13DEak+GzJW7GN016xjmjajriVbOiX8lAuLQpPDeUaicxJDjvWG92KN9pP7Z5QqeV0nRtPONEdUyd3yDhpMXPCZA+gOzUk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077645; c=relaxed/simple; bh=vYpQX4Can/9pA++xmzUVsvBmfqVytun4ULSAJD2bgJ8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qx+avhPZkKQts+Sz9/kxsB8YJiE82xG2yiT5RoDtLSLRV/JcRbNA4kgcuq0sL/JcVOKXftXSBfLj4S3tnjYT9zOmdJsS0ANiDk95T182X6s6Vy6twjdtk+nUd4MDN0foTb28Qcoury9B6jEUwlgsfU9wL7uJnI6hT27vEKQXZdY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=hNqj4OJ3; arc=none smtp.client-ip=209.85.167.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hNqj4OJ3" Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-5450475df18so1029979e87.2 for ; Sat, 08 Feb 2025 21:07:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739077641; x=1739682441; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=1xZToT8Ipw+PUjO7BMQGdecD6LauDPp0cZ9YFUj8vWA=; b=hNqj4OJ3G12BF9zobvSAtCihvt29ip78/FYWd6KLvBCx8k6Q+yK0fwV0Jx2ytrL9OR B7nGfe6hP3KIiNhwRr8k2YN9A/M5aPnSUVdyzBAIYsbdADk1TR1wOKQCbk5OByEdZOcV kCiR1Ln3aejJGvBQESb5WUK1Skd4d3BX56tOTtICBv80dYmkwrXUmMRX0i3s5KC15fb7 jfhjN07OCTUy8TvOwo6E8AmbfA4HBnY59nN7/Q5oofY03/vvHkLpDJU3El9y08EECEaQ TIX3yCsXcx7Kh30TfXLX7f4dHDvR24KJag1eP8iM9h2lg/sLS/gzagtQpfanOH5v1NXm O/tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739077641; x=1739682441; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1xZToT8Ipw+PUjO7BMQGdecD6LauDPp0cZ9YFUj8vWA=; b=EeiO9CmdcnnrQMcFfCYm6oPPJQQAMHrcQk7NZkZZTGPX16kb6LukGZijylrmcyXv7V xHc0RWxT5XSR2NdF9pgdFvPrOzalOVE/CKsoiZZnVcqp+07NVcAmeI+58cZV4sAO13MB 3EmX3fjl7XpbXY5+WMT/fcIvzuSlHkyYbbUjPId0CLmvgCLaR8N5f39wPDpJq4UYhVAv u/v8dutPv/EKKMu+SE7qppxKuklFCMMUPssAH9QpaNMP9gk+gelHA5ETVw14SBLRfXnV z/x4/ttQYtAMyR8Bkq/iE1yp94rZogIL2+9rV2kbgy2eM7t1Y8/UZ4MHyNbTm3Dbb/cY 4GAQ== X-Gm-Message-State: AOJu0YzeHX7F0cIl2MXLgBX9+UbjiUc17mH5+Jyza5H8JoCv34NLu+d8 vM/xRreCTYWtDknYuONQV7osAEIQ5PTRiX3M0+9YbQfR+ITz/X3o3Wfh9NXour5Pth56xfQpIXs rqZI= X-Gm-Gg: ASbGncsAWPDMxeBc6I2I/YV63fcTEnLnWOOIZeP1pu3tPEchANxE4FvcHBoxJX0Eyrz 9rWenEDlWjCJwdX2h7tQ1Txljvo2V3GnWUhMUnqNHlYrDSENVG3p4UGWMDtgmIbOD6iujUvBqy9 I+LOTA9SB7JtzuKQKh/c9KKK1BBL9QP+fOIwDZRAQXm0NzQhCZlyCqHUunSdxwpnkUpzbXAFczS Ttp02LyrlTXNtbx/Q3BvU0ngWXpx2kJIDm9XkVTVSLvTkDnTamU2NYlnG+PEc05heR968ZSExGe CD2ILzvmzFIuT8HwpqFL3+o= X-Google-Smtp-Source: AGHT+IGUIoNub6sm47xBPrwhQD2mG90ISalcUTKePpFjzxx94Lo1dp3HQT4XawwCjUCjbA6kpfg6Qg== X-Received: by 2002:a05:6512:ba1:b0:53e:df2b:df25 with SMTP id 2adb3069b0e04-54414ab6943mr3253079e87.16.1739077641516; Sat, 08 Feb 2025 21:07:21 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54506ef1733sm245576e87.1.2025.02.08.21.07.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Feb 2025 21:07:20 -0800 (PST) From: Dmitry Baryshkov Date: Sun, 09 Feb 2025 07:04:59 +0200 Subject: [PATCH v4 15/16] drm/msm/hdmi: wire in hpd_enable/hpd_disable bridge ops Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250209-fd-hdmi-hpd-v4-15-6224568ed87f@linaro.org> References: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> In-Reply-To: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Jessica Zhang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=4317; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=vYpQX4Can/9pA++xmzUVsvBmfqVytun4ULSAJD2bgJ8=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnqDfktyJ/HyMNRFnPtswfbXaSvIUEhqYROBJ0T mK3ItZNpo6JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ6g35AAKCRCLPIo+Aiko 1Wo4B/9wEko2KqapmTdzdtrGI05PnVyOMHtGr6U0m5DtWqAvsXy8q8aLx+EPLrXuh4d6/X6pN9w BKvU+doQVrevh7GR54HOPGdIdY6o6aThjw6JItlIZOzHnZcfcLtiCrbvACurjF6ttN8ZcdISSbc PLsmnqzXx72u2bvsrnW2pUDgummi4+lKGGICyAM6i9gCJ9ru1ZTxBaxlhpwULRe9YMX+IK3Kj0c Ctb4StyJljvtFV0bij01C6835twtirGRYCnhvwKfLVz05XHsUB9hTizzRFTWKi9IOzwlZABi5bS IDep805qclyL8OJE8++hZ5W0HyuOUtMlAX37Sya3F2PLjEB9 X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A The HDMI driver already has msm_hdmi_hpd_enable() and msm_hdmi_hpd_disable() functions. Wire them into the msm_hdmi_bridge_funcs, so that HPD can be enabled and disabled dynamically rather than always having HPD events generation enabled. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi.c | 9 --------- drivers/gpu/drm/msm/hdmi/hdmi.h | 4 ++-- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 2 ++ drivers/gpu/drm/msm/hdmi/hdmi_hpd.c | 12 ++++++------ 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index b0292750265082c47093ed5cf50bbcba9e67c955..f1898d8eed6fa46c47c9b632a90daeabe74f4359 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -200,12 +200,6 @@ int msm_hdmi_modeset_init(struct hdmi *hdmi, goto fail; } - ret = msm_hdmi_hpd_enable(hdmi->bridge); - if (ret < 0) { - DRM_DEV_ERROR(&hdmi->pdev->dev, "failed to enable HPD: %d\n", ret); - goto fail; - } - return 0; fail: @@ -261,9 +255,6 @@ static void msm_hdmi_unbind(struct device *dev, struct device *master, struct msm_drm_private *priv = dev_get_drvdata(master); if (priv->hdmi) { - if (priv->hdmi->bridge) - msm_hdmi_hpd_disable(priv->hdmi); - msm_hdmi_destroy(priv->hdmi); priv->hdmi = NULL; } diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.h b/drivers/gpu/drm/msm/hdmi/hdmi.h index 39adc8929bd601d4846f75b35c087de93c3df6be..679a2dab762c1333153c97709c99db8cc5a76d1a 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.h +++ b/drivers/gpu/drm/msm/hdmi/hdmi.h @@ -214,8 +214,8 @@ int msm_hdmi_bridge_init(struct hdmi *hdmi); void msm_hdmi_hpd_irq(struct drm_bridge *bridge); enum drm_connector_status msm_hdmi_bridge_detect( struct drm_bridge *bridge); -int msm_hdmi_hpd_enable(struct drm_bridge *bridge); -void msm_hdmi_hpd_disable(struct hdmi *hdmi); +void msm_hdmi_hpd_enable(struct drm_bridge *bridge); +void msm_hdmi_hpd_disable(struct drm_bridge *bridge); /* * i2c adapter for ddc: diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c index f97f8b104f93bcca20e5f81f928d9b23c14fbe28..4de0f9b870a426bca825469195b1e3fac7729445 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c @@ -462,6 +462,8 @@ static const struct drm_bridge_funcs msm_hdmi_bridge_funcs = { .atomic_post_disable = msm_hdmi_bridge_atomic_post_disable, .edid_read = msm_hdmi_bridge_edid_read, .detect = msm_hdmi_bridge_detect, + .hpd_enable = msm_hdmi_hpd_enable, + .hpd_disable = msm_hdmi_hpd_disable, .hdmi_tmds_char_rate_valid = msm_hdmi_bridge_tmds_char_rate_valid, .hdmi_clear_infoframe = msm_hdmi_bridge_clear_infoframe, .hdmi_write_infoframe = msm_hdmi_bridge_write_infoframe, diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c b/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c index 7726de95be4891e4a821ec4e056482263f23ac05..bd17f63546dd2e3d3484aa9d46bae87274001a82 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_hpd.c @@ -60,7 +60,7 @@ static void msm_hdmi_phy_reset(struct hdmi *hdmi) } } -int msm_hdmi_hpd_enable(struct drm_bridge *bridge) +void msm_hdmi_hpd_enable(struct drm_bridge *bridge) { struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge); struct hdmi *hdmi = hdmi_bridge->hdmi; @@ -70,8 +70,8 @@ int msm_hdmi_hpd_enable(struct drm_bridge *bridge) unsigned long flags; ret = pm_runtime_resume_and_get(dev); - if (ret) - return ret; + if (WARN_ON(ret)) + return; mutex_lock(&hdmi->state_mutex); msm_hdmi_set_mode(hdmi, false); @@ -99,12 +99,12 @@ int msm_hdmi_hpd_enable(struct drm_bridge *bridge) hdmi_write(hdmi, REG_HDMI_HPD_CTRL, HDMI_HPD_CTRL_ENABLE | hpd_ctrl); spin_unlock_irqrestore(&hdmi->reg_lock, flags); - - return 0; } -void msm_hdmi_hpd_disable(struct hdmi *hdmi) +void msm_hdmi_hpd_disable(struct drm_bridge *bridge) { + struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge); + struct hdmi *hdmi = hdmi_bridge->hdmi; struct device *dev = &hdmi->pdev->dev; /* Disable HPD interrupt */ From patchwork Sun Feb 9 05:05:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13966666 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07CD51474B8 for ; Sun, 9 Feb 2025 05:07:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077648; cv=none; b=VIrJfvNgrSTg14zOWcslg0cH9AOv9Qt29JOSVD92DpsBo8376uqzoEEntk5ENG+tFX+Dw8/XdoLKYLw792oyHHUW2TuKtz3D74Z9EaC2hXu1PC+TZMryuTRNcnH+Q2/6g9fmepfDcK4QJOUYsZMbv40gYisknABxqXkv3XbUjwE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739077648; c=relaxed/simple; bh=rBkvGR/qHrfxPlnsg0QzXfiNTIC9RTO2ROzJ5dKz7zg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=t2FEcpEP8UQrQlWxFHXrrdSK/n5DmdXIfoYYoqrYnUsCisvNAY+FXHw1W2RO35VeuUeiuhW05oFEQ/+Fznz4alN71bTl45UIght0CE2UCd7GeHwFfi73/FZcWFcI059P1BbnbAE36KQ24wi789xTP1qPtDigZbZnoxBviI62hlQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=aPzqkLMW; arc=none smtp.client-ip=209.85.167.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="aPzqkLMW" Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-54505191cdcso894896e87.2 for ; Sat, 08 Feb 2025 21:07:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739077644; x=1739682444; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=EfNMfzUAvdO5axXrtOPa21BH0I19Ed6M3V+EZ2kcNQY=; b=aPzqkLMWbFX+7NFvOmEk2laOqFOFfeDjqCedQUpe2La/Ysrc9V08RAhrJ8NY22NYbV lgUrp8qss3uZjh2Pqgk+Oni9M7/s6l52Yji1bRmkgP/vTYUtbUJrNl/oPaL+nKlv1Iut 1S92mWsas8hjc2FZpstSHE+iBzKXQiD1WrySs5pavDGsnH0ThULdY76s34TNG9bJzPNd pU1rs0KhY2CTNTVnQMi4kfOcVKk3cY3/niA8QB0s8lRXxoT/5Ug+NXJ08QzWDgDnRJFU zsTUeJqjIic7OxzKq5KdvHwE+7vye+DU4K02KbGZsKopWZuituIy/8fK/fdei9NNR1PO Tuhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739077644; x=1739682444; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EfNMfzUAvdO5axXrtOPa21BH0I19Ed6M3V+EZ2kcNQY=; b=d00U5VnG6AEx4P13ZfWZUDQKp8vBz9RZb5dGFbAkIMUHq1CukJZbYS+7xPVCEWowsi 9vOHUAQW27BhIO0ZKbG5Sy64FLULwe0hGNNAua5cvR60tRbcJstE7NTZOn6Nvd5QYEBI cUHVZH+F/VfS11/FrhDN5FE8k6XWP7wj3qenYpr4TwBvAJhOw0ZVpywd0XH7C1hljhMg nGzsegbtUzfdUd1Z08U3g+xmCAwlFfqy6MElmFexrKqEcoCLwMXxjQoWaijvs2AIzOg+ 64vAjK05p9YrUS1Jbqr7emX3ytjfNvw8hYvjVBIKTUSxpObMwFpY/Hm6FbSsaE9gT4rr Niog== X-Gm-Message-State: AOJu0YwNxKHsZJvFF6rvH2Wg8NcSGVvuCAwHZFvyzCK0QLD8q9d3XgeD GL5OVcGUkCRGhdXTJbJi7nB+lor/DW0MVqwhnR76ByJOhSSxwasTx+Yn8Kel4JzbM1Qnmu8j5Ka JprI= X-Gm-Gg: ASbGncuQtvTNcuRBB+/puHs/oPoeI2HlRgsK80UPHYRH6nzDATgnAttQpL5Gqb/173o BVB6iFeQpSGz8xZ1Ny7BiQxYqus6eeUu6k/Vlz47p0xx9WJ7MtX4rUAuH0oWG9YhJGUoMw5+k1C GPRfWVJYf47tkVCUNgVdLZD1UNohV4KzC1MYHTOql9gCHTVmgikZCBo8Nqg5p5oXZd13CHstc7O JPigu+l8AKE6QuRyumZ1vAz4pcwasTVaB5kzF4m+c740nRbegbKs88yMsnHGfykGBvR6br4pL5j G+hkgFbrbvqbOKSna+9hJKY= X-Google-Smtp-Source: AGHT+IEAJIpGx/KtWJ3FoMRxqCJZCMQixEialyC+rYX1C/PQUXahOHBcURaFNniiUGHQYiTxLHEVSg== X-Received: by 2002:ac2:568e:0:b0:543:e4a3:7c3d with SMTP id 2adb3069b0e04-54414aa8782mr2874988e87.29.1739077643911; Sat, 08 Feb 2025 21:07:23 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54506ef1733sm245576e87.1.2025.02.08.21.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Feb 2025 21:07:22 -0800 (PST) From: Dmitry Baryshkov Date: Sun, 09 Feb 2025 07:05:00 +0200 Subject: [PATCH v4 16/16] ARM: dts: qcom: apq8064-ifc6410: drop HDMI HPD GPIO Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250209-fd-hdmi-hpd-v4-16-6224568ed87f@linaro.org> References: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> In-Reply-To: <20250209-fd-hdmi-hpd-v4-0-6224568ed87f@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=806; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=rBkvGR/qHrfxPlnsg0QzXfiNTIC9RTO2ROzJ5dKz7zg=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnqDfkPKZGcgzKdMYQrmr8xg29SeVv5ZTbQNhMP Xm71FFkyTSJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ6g35AAKCRCLPIo+Aiko 1UN1B/9p99p14mAy2cJWH8bo5AHu/xitIDMYADBNYVdsUQXslx1MuCaXPHSz/9EQQ9j45ItPAmv EzCEf17MZ//D1/qHLqCjloL9Ltx37KTjBGPz1FUsmmbU8crIut7dokT0vvrXN6tGLdefXI/Hxuc awkE7CsVIlujLKcvm1MIvFQt1sbsJ9STP7ppIKasGV7yZiTxpCfT5SglZtHAbrupQBqNjuOhnWd 3K8IniuWpKDQQBT71UqooHwEvF5Y9+OSbX8IlfDHj0Wp18urN40IFGX3Er+qj4JGg0EX+RWVWF7 5mfvkADq0u6kX/boHk9kXmppgY4vT3pNzviaOXQ+R8XuVeKu X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A There is no need to specify separate HPD gpio for the HDMI block. Use built-in HPD in order to detect if the monitor is plugged or not. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio --- arch/arm/boot/dts/qcom/qcom-apq8064-ifc6410.dts | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/boot/dts/qcom/qcom-apq8064-ifc6410.dts b/arch/arm/boot/dts/qcom/qcom-apq8064-ifc6410.dts index b3ff8010b14985c55c580e0083a5c8ea23c03962..717bfd74edb75b278eaf5ab37954fcede1f7ffb0 100644 --- a/arch/arm/boot/dts/qcom/qcom-apq8064-ifc6410.dts +++ b/arch/arm/boot/dts/qcom/qcom-apq8064-ifc6410.dts @@ -138,7 +138,6 @@ &gsbi7_serial { &hdmi { core-vdda-supply = <&pm8921_hdmi_switch>; - hpd-gpios = <&tlmm_pinmux 72 GPIO_ACTIVE_HIGH>; status = "okay"; };