From nobody Sun Nov 24 06:06:12 2024 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 A9BD4CA64 for ; Fri, 8 Nov 2024 00:22:14 +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=1731025336; cv=none; b=NdbE1K9z/RM4sxGfrI2h2bSmrCHUzMKU32jxSU9ctLUlCPEwj9gzZKvmg4zRRueWGRbzeay5e10wGFIKRyycIoJ8oVY25D8uPgYetI2rXcV5DoqYR+zgBbp6E4fQn9yXSbAmvMgboX9XbAPScX5LlOHRVedM+LOugbfsSd8Da9M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731025336; c=relaxed/simple; bh=+MBwJhJ+kWsOd4zG8stBduLkJa3ofaC7qfvHFVuut/U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=c1prFODxkLl3U/IQgVkXFKA0jmYvR0J2MEWXjUbR+0jlEHPoRncp5bAYMjq5fpk95VEX0N+MLzKg+NdR0sQt9y/kNhGSWHdb9CNLib3KD9yayIIeIhkOoIUDY3Nf7u7INZKbN/GnIton+KDfYPflbfuMET/usLjewX6DOEPPzX8= 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=x3lKpOtM; 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="x3lKpOtM" Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-539f0f9ee49so1700750e87.1 for ; Thu, 07 Nov 2024 16:22:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1731025333; x=1731630133; 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=H3tHYib9bOsjsCSxYQbmNPxmjHFq56TfU4OCDc5PW2A=; b=x3lKpOtMquBlIE2d0717z+Ef4w6vKw7ci1Hlgpj1uLzXxKyjTWK0hicKSWQ43Yxa7k 8luV9I2rRbxywkJ1LAujS+GWm6Z0gdFd2O9KCcPJPwzXR23iky1A+OSOS3w7VDXLIfpb uUkXIRwL4Ssn84TsAoq2I5BBCJfdyD8gEITXHuaM/xiyb/eluTxFeHzrcBILQPHyDLtE q61emIQwQJ0ADy5+a6hQUVHlqKI8StPq9lVjqDalDBCnkSueUy4pFIvc9SSBwthCayCo TN/mm9tHdX4BkO1u5xhL1hYGKRj1nkTlJ23GdoezaghdmRHtgVE52ExTp2R2ZEAVNxPR K8/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731025333; x=1731630133; 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=H3tHYib9bOsjsCSxYQbmNPxmjHFq56TfU4OCDc5PW2A=; b=c8hVcxSO1Kyy5CCeH9TzZMSCVRdSdWOI+gy3Hqv45L8yYBAO4e/rBn3xLWVt0iDejd bQ6SdOtkHn0nPHbtNtiiN5OGJgmR5QNsh3cRPDy0w0sW63qAO8d6OR2s6OHqAGx+ajwp /OfYwQehOpZkcRd9hCv2yy3rUeExDKv98uGb5vd6wFxwUIkP3PNfmoqk8QPyUHj9cngB Y3C3USU8VudmI4OkjOuaijV1b7vuaocC5JZrTMFMJOeBnlVE3d4gHkJ3C50UIE+7kP1j Ecj/Tg5HMsU4Bcto5/z7alfZvVPdC3k76DjH28CqO0Ny24Rx9JPm6o9Wb0jAI2ELYxVc n9lw== X-Forwarded-Encrypted: i=1; AJvYcCUst7xvcFUlxNP/xaY2KgosNnxjGm1wnZ1EOQ26+gXmXmFxvY63tENRWNaODgiuc1FkQPfWnRb/+ZYjIvU=@vger.kernel.org X-Gm-Message-State: AOJu0YzcmVJL5tSCRG7Qm7aK2SkT0fzkipgxFaK3t0u+sUNTQI2Ftt3N OY+Nu7GYa8dZ+dD8KNvz9xMQX1N6qySrR4UuQygAerwsdiEb+c9Uc7Q1mVkOOKU= X-Google-Smtp-Source: AGHT+IH7NpwR+EtpupNJY1T4XFQnZfGFyrAFdQKX3vDkAZgHm3HUYKz++E/GmQxGdczzNngFriYsnQ== X-Received: by 2002:a05:651c:1589:b0:2fb:5bb8:7c24 with SMTP id 38308e7fff4ca-2ff20152825mr3776181fa.8.1731025332771; Thu, 07 Nov 2024 16:22:12 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2ff17900a63sm4195191fa.47.2024.11.07.16.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2024 16:22:11 -0800 (PST) From: Dmitry Baryshkov Date: Fri, 08 Nov 2024 02:21:44 +0200 Subject: [PATCH 13/14] drm/msm/dp: drop struct msm_dp_panel_in 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: quoted-printable Message-Id: <20241108-fd-dp-audio-fixup-v1-13-40c8eeb60cf5@linaro.org> References: <20241108-fd-dp-audio-fixup-v1-0-40c8eeb60cf5@linaro.org> In-Reply-To: <20241108-fd-dp-audio-fixup-v1-0-40c8eeb60cf5@linaro.org> To: Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Paloma Arellano Cc: Douglas Anderson , Stephen Boyd , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Dmitry Baryshkov X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3781; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=+MBwJhJ+kWsOd4zG8stBduLkJa3ofaC7qfvHFVuut/U=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnLVmQ9emA0NkGmbuBJO5bIw1pGCdfRbWpJGcGv U6PeakRvW2JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZy1ZkAAKCRCLPIo+Aiko 1YmnB/49tkHi3iF28qy6bExEcNimP6jsHsacWo0NUj1XuyiFiP3oYDLQGvFLZu6s2PVL23RU5JE 9JsdhEpt5pG7SZ6KjqSq7PmnFiVVxp36o1q3JISx2UBwZrYrASwGaxkOp0Hq/neGeAulv0kxuVw zAgk0d2PPqsxnPfELVHoUGbjIzYapnTA9JdRxtTAziRCJax6tem27cmRrL6X719xDSc+Lzx3R/1 ixy49WLJ5DcCfUvEyfIvFeiyUnY5j7JugfHm/R4mHFOsRn3Pb277Ew+mUhvl7XEOxZa5WcsA+un 4ltybwYS/VxOvjhtMxdGtM4/9ClixltO+HR2cIos04m2fnnk X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A All other submodules pass arguments directly. Drop struct msm_dp_panel_in that is used to wrap dp_panel's submodule args and pass all data to msm_dp_panel_get() directly. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_display.c | 9 +-------- drivers/gpu/drm/msm/dp/dp_panel.c | 15 ++++++++------- drivers/gpu/drm/msm/dp/dp_panel.h | 10 ++-------- 3 files changed, 11 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/d= p_display.c index 72a46e9e319486bc4ec1f5c842d733bd55ce0a67..8f8fa0cb8af67383ecfce026ee8= 840f70b82e6da 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -722,9 +722,6 @@ static int msm_dp_init_sub_modules(struct msm_dp_displa= y_private *dp) { int rc =3D 0; struct device *dev =3D &dp->msm_dp_display.pdev->dev; - struct msm_dp_panel_in panel_in =3D { - .dev =3D dev, - }; struct phy *phy; =20 phy =3D devm_phy_get(dev, "dp"); @@ -765,11 +762,7 @@ static int msm_dp_init_sub_modules(struct msm_dp_displ= ay_private *dp) goto error_link; } =20 - panel_in.aux =3D dp->aux; - panel_in.catalog =3D dp->catalog; - panel_in.link =3D dp->link; - - dp->panel =3D msm_dp_panel_get(&panel_in); + dp->panel =3D msm_dp_panel_get(dev, dp->aux, dp->link, dp->catalog); if (IS_ERR(dp->panel)) { rc =3D PTR_ERR(dp->panel); DRM_ERROR("failed to initialize panel, rc =3D %d\n", rc); diff --git a/drivers/gpu/drm/msm/dp/dp_panel.c b/drivers/gpu/drm/msm/dp/dp_= panel.c index 58045d9a52e9a4d39362c3de623fa34acd5784ec..6e6dc3169e9c2f84273e5991006= 02583550f521c 100644 --- a/drivers/gpu/drm/msm/dp/dp_panel.c +++ b/drivers/gpu/drm/msm/dp/dp_panel.c @@ -549,25 +549,26 @@ static int msm_dp_panel_parse_dt(struct msm_dp_panel = *msm_dp_panel) return 0; } =20 -struct msm_dp_panel *msm_dp_panel_get(struct msm_dp_panel_in *in) +struct msm_dp_panel *msm_dp_panel_get(struct device *dev, struct drm_dp_au= x *aux, + struct msm_dp_link *link, struct msm_dp_catalog *catalog) { struct msm_dp_panel_private *panel; struct msm_dp_panel *msm_dp_panel; int ret; =20 - if (!in->dev || !in->catalog || !in->aux || !in->link) { + if (!dev || !catalog || !aux || !link) { DRM_ERROR("invalid input\n"); return ERR_PTR(-EINVAL); } =20 - panel =3D devm_kzalloc(in->dev, sizeof(*panel), GFP_KERNEL); + panel =3D devm_kzalloc(dev, sizeof(*panel), GFP_KERNEL); if (!panel) return ERR_PTR(-ENOMEM); =20 - panel->dev =3D in->dev; - panel->aux =3D in->aux; - panel->catalog =3D in->catalog; - panel->link =3D in->link; + panel->dev =3D dev; + panel->aux =3D aux; + panel->catalog =3D catalog; + panel->link =3D link; =20 msm_dp_panel =3D &panel->msm_dp_panel; msm_dp_panel->max_bw_code =3D DP_LINK_BW_8_1; diff --git a/drivers/gpu/drm/msm/dp/dp_panel.h b/drivers/gpu/drm/msm/dp/dp_= panel.h index 332ac79594e71157e2b087dc5268c50a87993d83..482ead77e7c01e6d611dbdce37f= 82a8dfbc4e3e4 100644 --- a/drivers/gpu/drm/msm/dp/dp_panel.h +++ b/drivers/gpu/drm/msm/dp/dp_panel.h @@ -21,13 +21,6 @@ struct msm_dp_display_mode { bool out_fmt_is_yuv_420; }; =20 -struct msm_dp_panel_in { - struct device *dev; - struct drm_dp_aux *aux; - struct msm_dp_link *link; - struct msm_dp_catalog *catalog; -}; - struct msm_dp_panel_psr { u8 version; u8 capabilities; @@ -93,6 +86,7 @@ static inline bool is_lane_count_valid(u32 lane_count) lane_count =3D=3D 4); } =20 -struct msm_dp_panel *msm_dp_panel_get(struct msm_dp_panel_in *in); +struct msm_dp_panel *msm_dp_panel_get(struct device *dev, struct drm_dp_au= x *aux, + struct msm_dp_link *link, struct msm_dp_catalog *catalog); void msm_dp_panel_put(struct msm_dp_panel *msm_dp_panel); #endif /* _DP_PANEL_H_ */ --=20 2.39.5