Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp684566lqh; Fri, 31 May 2024 13:08:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUbKVErcB89oB/fhQMa9xWoqNj7TFCnQG/aP3XW6VaNDO1i1m+jSMzwSWihNOuWGOD095w31z3KtIO4hnMyh+t0dDaTUyKnL+xRGtX9BA== X-Google-Smtp-Source: AGHT+IF0hhrjFRTeahGaBEeplkhwgoX4U9x8Tem8/Dj2VBgjesUECBJlw9S2AjR4La/5m/5ggOOi X-Received: by 2002:ad4:5aaf:0:b0:6ae:d305:15bf with SMTP id 6a1803df08f44-6aed30515e7mr30197256d6.5.1717186130807; Fri, 31 May 2024 13:08:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717186130; cv=pass; d=google.com; s=arc-20160816; b=Wk7KBU8gMxbe0ygCwDH4UrBo/7lU1FlNUallPiD0aJJn4X2V0Off/uDA3fcir4Ii+k tuy47JQLBDpoXK/5God9mcoBzSAUAl0p5ibN0g/H6M++/kmuOllnSqFfUqgsFxaoi07I fhJIuikaO16Qm+rKgE2VhNTaQzm5lmlFuBqXTGM3BuiBBDmDJB4yBFlprbe64FuzcriC /eTtZY1yo/KT4+glM0Rsb6oiDXtSTtfJPeAjP8ibwlViUZYH5Qd1RuIe3s23T2Gu6nry GGARcU7cUV8k+uK21LTe5T+qeu60Tzg9Xa3RUyrwwlzD+iHHL/JRmj9ymD8u7xitLPCP 6zaQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=KcofRFte0GyR0msF9Wv8UBxmndCayJNvBiLxyEUuupA=; fh=ktcLcHNmCtgw/atMs3Sx16uoOeFl4Ekcm+2HUkwHtQo=; b=cWgyrx+IkGkDP/OOu2aE1rSqse2uHgDVKEfXGrvx56dAW9HoHCQjTFd0Kv8ngOu8OP vSZhZ+pnTwr6rzoCEmsWmf8z5jzBDT0izvH3z0ymqtz4gJS8D/QjYiDQFM/lyiRbjU8u 3NGCwAU8KFABKiDrf5ebLnNuNUobR086vsjEomEpcowjQGmjM4afKfMvzGM8KduQDBh6 oZuuaPUJ4dfTWlnSfjBS/F7M2PRbeD6MeZrJpiq0iqg67eBf7w3yZElj2efewUbfDG0D kjoAwYndWzZZRVI1OJguwWD4/zjT4i2/E9HHlQuvxN834bJJTTh1xxNCUqGOyIT8yuMC fhew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f3hjcWYg; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-197418-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197418-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4a741790si27687296d6.127.2024.05.31.13.08.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 13:08:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197418-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f3hjcWYg; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-197418-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197418-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 85D9A1C22E93 for ; Fri, 31 May 2024 20:07:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C73F017DE17; Fri, 31 May 2024 20:07:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="f3hjcWYg" Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) (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 0B4EBEAE7 for ; Fri, 31 May 2024 20:07:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717186053; cv=none; b=GuXm8yUDVgGAoDsenOYFfEfbxkYsT2RvMLv5rFw1qecCuzdJpg/CwjC5Qlde/wW4P5vHqbGDIOSVG8EmhHmu6pDxvw350I2LgdfVMwwVyzLTKIhW77zZtO5qqUFB1SCdp57GGugd1h178yWvNrYqAN7rZzMfNbuzi5iKSIrGzVg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717186053; c=relaxed/simple; bh=36zFVcTmlsZC5jCJ+t9fJ702goiQM4w/FVsM7AmEFY0=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=nam/Tx0WHHiEroRIuCdGkXSWSLqrPHUGzuQW42ZD384D1F9F2qFrzs74McS0/G/mDSSa+/Vy/21G7sDpAgHp4SmH7lKWB32f8K7Y6yMiePG14kOC296cqaGHEV9pKB/9EpQZmb9DBcGxPsl3aZP+aM+DiqtxdQtd+ZxKX32NI14= 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=f3hjcWYg; arc=none smtp.client-ip=209.85.208.180 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 Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-2e95abc7259so26997721fa.3 for ; Fri, 31 May 2024 13:07:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717186050; x=1717790850; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=KcofRFte0GyR0msF9Wv8UBxmndCayJNvBiLxyEUuupA=; b=f3hjcWYgd5TtUmTSpvRAv0j+k0P3nSXos08jcmL6UcDq2LlR+2BputaXZqycUF4Dv1 ZSEKYs14QKtBwL7CPTuBlBi5/lZiR0MxKMr5rg+qpUxpqhdgcnLm3Vr6SHc9cKDNMfUT 8F3PjqR+QvEdkgwcpisyWyQBx2fJjG+QzBZkX4NgYNCO4hmQJA5N7ZdPzAkXy+FoP3n5 4q00k0eIpSQgRQJ49etTUEIvP9QdjldJZAOAZDyRZpsT7VDmwdrPHsEf2VK0j2BaNqYb uVtW1yJRKMEi90xxcxCF4e245saEYyDoBqhgkQ6aXS3NbYPMIxjUimwW8u9diYLz6jf0 1MLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717186050; x=1717790850; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KcofRFte0GyR0msF9Wv8UBxmndCayJNvBiLxyEUuupA=; b=Ci8iDG17oM+6+db23rRa3vU8aoyFjSKTm4pgS8sNC8M0KHsoNvHP0gM++P2/qQDtFO Npl23pToVWhw0HLHln+0QtUraOFR9bZw3f7H9io0zyzjLbp0qGXL4ehuKAPdINwrF1Nh 3Hn/AJzXyBemHtj2lv50CxlWk1J94rsDy1IT9+u9gczanZ0Ol/9rA8tEwd0nNfbVn3ii o/VcTHbGmTxCkebkQrkIoibnCoMBMw6X1nq+db8J4bYrll96GDXd0Jf4bZNcr5FH8WWH LCjDWYuxVal/sNa+CihecuT/1bXcrVZbTznW6hbdYypKQwBL6D0kAa8kr/uV0HDvsg7y uVgA== X-Forwarded-Encrypted: i=1; AJvYcCVnxeU1fPBHmcycOBR65Vt0LFKKr7DW7Kp/02Xc15RtgK7VwXwlSA6XwPluczQKtwbWjygahV2DgYVlMLBhyYfn28xud2mNW27E6V+5 X-Gm-Message-State: AOJu0Yz3a/ttFZCD/4vTJ0PZXUCfb2Dgzc28iLNuWdA+/cqPGOKyN65u 1uu05AHpLmHI9JnzVoW5fNAyhINo9oSUjWSVblXRNRdkyvtuDwlZ72nK7DZT9xM= X-Received: by 2002:a2e:a99b:0:b0:2e9:714d:6d1 with SMTP id 38308e7fff4ca-2ea951b6206mr26740331fa.39.1717186050193; Fri, 31 May 2024 13:07:30 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2ea91cf0b83sm4022111fa.116.2024.05.31.13.07.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 13:07:29 -0700 (PDT) From: Dmitry Baryshkov Subject: [PATCH v4 0/9] drm/msm: make use of the HDMI connector infrastructure Date: Fri, 31 May 2024 23:07:23 +0300 Message-Id: <20240531-bridge-hdmi-connector-v4-0-5110f7943622@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAPstWmYC/3XNQQ6CMBAF0KuQrq2ZdqCAK+9hXAAdYBJtTTFEQ 7i7hcSoMSz/z/w3kxgoMA3ikEwi0MgDexdDuktE01euI8k2ZqFBp4CQyzqwjW1vrywb7xw1dx9 kTphnKRmjLIi4vQVq+bG6p3PMPQ/x7Lm+GdXSvsViQxyVBFlCbUrMMtAGjhd2VfB7HzqxkKP+Z sotRkdGYQE1VUiU/zP4YTKELQYjUymritSaoiX8YeZ5fgG44zdzSQEAAA== To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3783; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=36zFVcTmlsZC5jCJ+t9fJ702goiQM4w/FVsM7AmEFY0=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmWi3/3K7+5ZMvVMAb3zLYeRysohwEcabaQF9Xs ovhcEFZaISJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZlot/wAKCRCLPIo+Aiko 1WrmB/48O8bX4lGayq8oD3NfGpi6hk9SyyeZP2nZnh4CdCHH215baV0j9LxTHghDjvleUbiXSSX umPwH5d491BS6tAztUEvsxca6o6ZUGHxS833GqbmkC97J4N/siAtqUWU1gthvdcG+Lw/yKt8IVi 6lzKrmoZKccfAOfM6DGrtvAzMw/DqWynirCMpHzhxzUi5QZ7PpV1K1QPT+2kI27RkM+1qzQy0QG /XfddlXrESBsReDVUxQn093G0Pq3fR1IIonqFdfawNm/LKG/K4dVEWYifYUoH3+Z8l6mryvaLSM 9gIiL2uCrGjvfNYvxBTLaajOMxdbao/vWGYHlttI+b+QYSqH X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A This patchset sits on top Maxime's HDMI connector patchset ([1]). Currently this is an RFC exploring the interface between HDMI bridges and HDMI connector code. This has been lightly verified on the Qualcomm DB820c, which has native HDMI output. If this approach is considered to be acceptable, I'll finish MSM HDMI bridge conversion (reworking the Audio Infoframe code). Other bridges can follow the same approach (we have lt9611 / lt9611uxc / adv7511 on Qualcomm hardware). [1] https://patchwork.freedesktop.org/series/122421/ Signed-off-by: Dmitry Baryshkov --- Changes in v4: - Reworked drm_bridge_connector functions to remove ternary operators and to reduce indentation level (Maxime) - Added hdmi_ prefix to all HDMI-related drm_bridge_funcs calls (Maxime) - Made vendor and product mandatory to the HDMI bridges (Maxime) - Documented that max_bpc can be 8, 10 or 12 (Maxime) - Changed hdmi->pixclock to be set using tmds_char_rate instead of calculating that manually (Maxime) - Changed mode_valid to use helper function instead of manually doing mode->clock * 1000 - Removed hdmi_mode in favour of connector->display_info.is_hdmi - Link to v3: https://lore.kernel.org/r/20240530-bridge-hdmi-connector-v3-0-a1d184d68fe3@linaro.org Changes in v3: - Rebased on top of the merged HDMI connector patchset. - Changed drm_bridge_connector to use drmm_connector_init() (Maxime) - Added a check that write_infoframe callback is present if BRIDGE_OP_HDMI is set. - Moved drm_atomic_helper_connector_hdmi_check() call from drm_bridge_connector to the HDMI bridge driver to remove dependency from drm_kms_helpers on the optional HDMI state helpers. - Converted Audio InfoFrame handling code. - Added support for HDMI Vendor Specific and SPD InfoFrames. - Link to v2: https://lore.kernel.org/r/20240309-bridge-hdmi-connector-v2-0-1380bea3ee70@linaro.org Changes in v2: - Dropped drm_connector_hdmi_setup(). Instead added drm_connector_hdmi_init() to be used by drm_bridge_connector. - Changed the drm_bridge_connector to act as a proxy for the HDMI connector infrastructure. This removes most of the logic from the bridge drivers. - Link to v1: https://lore.kernel.org/r/20240308-bridge-hdmi-connector-v1-0-90b693550260@linaro.org --- Dmitry Baryshkov (9): drm/connector: hdmi: accept NULL for Audio Infoframe drm/bridge-connector: switch to using drmm allocations drm/bridge-connector: implement glue code for HDMI connector drm/msm/hdmi: switch to atomic bridge callbacks drm/msm/hdmi: turn mode_set into atomic_enable drm/msm/hdmi: make use of the drm_connector_hdmi framework drm/msm/hdmi: get rid of hdmi_mode drm/msm/hdmi: update HDMI_GEN_PKT_CTRL_GENERIC0_UPDATE definition drm/msm/hdmi: also send the SPD and HDMI Vendor Specific InfoFrames drivers/gpu/drm/display/drm_hdmi_state_helper.c | 14 +- drivers/gpu/drm/drm_bridge_connector.c | 109 +++++++-- drivers/gpu/drm/drm_debugfs.c | 2 + drivers/gpu/drm/msm/Kconfig | 2 + drivers/gpu/drm/msm/hdmi/hdmi.c | 46 +--- drivers/gpu/drm/msm/hdmi/hdmi.h | 18 +- drivers/gpu/drm/msm/hdmi/hdmi_audio.c | 74 ++---- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 310 +++++++++++++++++++----- drivers/gpu/drm/msm/registers/display/hdmi.xml | 2 +- include/drm/drm_bridge.h | 83 +++++++ 10 files changed, 472 insertions(+), 188 deletions(-) --- base-commit: 80100af925a09ff99fcd6604a5fd8101dd0d17fd change-id: 20240307-bridge-hdmi-connector-7e3754e661d0 Best regards, -- Dmitry Baryshkov