From patchwork Fri Nov 8 00:21:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 842167 Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (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 04CD415B980 for ; Fri, 8 Nov 2024 00:22:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731025329; cv=none; b=K8LYkNYNS2eHBdxLhfzeVgOy5Lkev5V3/IkAIC//5iY1MiiNoGmEtNUkF8vCgPn/xIv/jgHPDUkPSAms5j4UJTuf81DOYj9JTBuL+SmggW7fpo4HZxoa0nCbNCbWTxj91MDnoiqaFdB01wRtLU1iTqf/iKMmZx65OgdSKPKrmz8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731025329; c=relaxed/simple; bh=SceYz9X9ESeUh0RpHgvPBbmsjglzf1byNf8UClINDmY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pzPZRQ0foJeiso7GQsgY7+XioZRzT/tO5jQyAsYPwHtgdPBYeWoS22lHstheh7eg0CwTqdnIW0zjB0Rk/cQcBWActiGm0ogt+Wcddc8v3JRUN/8H+em79StCpHp2eHIic3+M/tmOU0OoOIn9I6AQH+UEJ9TLKHA1cjFPlG3vNag= 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=PZPsL2ig; arc=none smtp.client-ip=209.85.208.171 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="PZPsL2ig" Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2fb56cb61baso12621471fa.1 for ; Thu, 07 Nov 2024 16:22:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1731025325; x=1731630125; 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=k+Tcdow0zD4/30pc+/ir8ZwvJBZ3vcNLxhfEFFEtWtc=; b=PZPsL2igeVNuzZq2fiv4Kvmd889Lkwg9jH624b47NeEEbjnSAVRqDJ+bbaJ3pv+8HT boWfQRfXS0PU5m1VrDWloBTfqwK4/C9z3PccuhQfGol85NKTfpVEzj9iNIVQ6Sjms8uw 3pUJdiENCyJbLj6OC6vgXbca2B28Rcpi82UOMgKlj0/BP65hpqR8/GTku7klmKBW0Vss 157Ibgzhv4f15BpSeVsJEHdSuWoQCMIIfCK3Mgcwadg1zegGRNXAoP8qnXPyXTpOlYKg HeN4rnZepNoc7NKi6jH4TmCMOOIeUtygFF7rM6E8S9VId+DN9m4I+wdRvqU0+pNJxUrN dqeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731025325; x=1731630125; 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=k+Tcdow0zD4/30pc+/ir8ZwvJBZ3vcNLxhfEFFEtWtc=; b=D+6pBJffzAbxuKBetfzd7n40XrdOQcoZYctGPGoWTfVauIAOeKWORjHsWry1zTOEb5 Qw5RkzS6LBOGWhRzidaFM6Lcv3M7CRn92KasIig0UgAvQQbZTug4+nXbVUbt8xUPNKUG 2hMYvk87fGUmm4t3I72OhyaPBFysy2rYH0Rm+v4E93JTy3NF9JFJNJWmDyNQyFTk9h/s gbSqHNfShZGSdausO3gUkntBLavEXr7Xte+0eg2TakmmKWVlUx2qGFCYCD5Xj/cBPVTU EXb735jUwXIVaWdX17me5Gdv2l8i+GdSl2XInzCiVMnMIpDxlgpCDMjzFVwL7x+Mgkxb Q7Ig== X-Forwarded-Encrypted: i=1; AJvYcCUVaONDYNLy4LCWlX29kj/TOnKvJ7knYm8/LfMWJUKGfcqL8ON4uaUO2bcYznjPBpZhOFQvra8D6jSGLrK9@vger.kernel.org X-Gm-Message-State: AOJu0YwC5+bOrhsfuZ9MQg3A8O20TbbLIcb848LLZALjkpg6OqokZHlT oqKBRSCy/pNI5A4kFcExqBwsltzmpZoPQIgHJe+yk0owtxtd6CrfL4pAW0bFH68= X-Google-Smtp-Source: AGHT+IE5nVLgmECo0GflJVzUjKHDFmESQ9ctk54DBo6OpIxRts4k62fUKMbru4M/1fR8ZKF1aHGjdA== X-Received: by 2002:a2e:a594:0:b0:2fb:6229:c597 with SMTP id 38308e7fff4ca-2ff201e6df5mr4313761fa.4.1731025325025; Thu, 07 Nov 2024 16:22:05 -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.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2024 16:22:03 -0800 (PST) From: Dmitry Baryshkov Date: Fri, 08 Nov 2024 02:21:41 +0200 Subject: [PATCH 10/14] drm/msm/dp: drop obsolete audio headers access through catalog Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241108-fd-dp-audio-fixup-v1-10-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=5661; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=SceYz9X9ESeUh0RpHgvPBbmsjglzf1byNf8UClINDmY=; b=owGbwMvMwMXYbdNlx6SpcZXxtFoSQ7pu5IQkNtPrHV6Lq9fOumDEUPQm/tiq5UcDd0+7/+OXy 898zkLXTkZjFgZGLgZZMUUWn4KWqTGbksM+7JhaDzOIlQlkCgMXpwBMREOQg6FdwfzTgYVrLDuj r23/kObad5lhu1XzRZUMoe0Wvy1LLH6rXau9e6tpK+M0xeU9XZpTz+f1K3pe4Yy8v3EV53efE28 TDeNFj0r7L12tzjORh7HKqP9TSboFyy2vJQabDI6EnOiuOiEly8Kom6mw67yeI5/2Eh3un3NE64 y835p7r/mkPC1m4b81mb6ngyS2bgrmeWr4+HXrwk5ntfpkZZadnyTv66v571HkX1Jic/Sf82qfw C/OfSaGbQZMB7ayqAhtK7JIktkkLWSc58ckXe0j0BwvGvD3xuaSQ+lKR9597WdOXfBrbex7qS0/ 5EqDL+3OELF+ZnP2/wM/9oA69ovsGb++p/K1rOlMvaUGAA== X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Drop obsolete functions to access audio packet headers. The dp_audio.c now writes them using msm_dp_write_link() directly. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_audio.c | 2 - drivers/gpu/drm/msm/dp/dp_catalog.c | 76 ------------------------------------- drivers/gpu/drm/msm/dp/dp_catalog.h | 24 ------------ 3 files changed, 102 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_audio.c b/drivers/gpu/drm/msm/dp/dp_audio.c index 481fb266fffbec5dd96422f4fb7af8af36acb634..63bdd57948401451426364796e608643c1ebfebe 100644 --- a/drivers/gpu/drm/msm/dp/dp_audio.c +++ b/drivers/gpu/drm/msm/dp/dp_audio.c @@ -405,8 +405,6 @@ struct msm_dp_audio *msm_dp_audio_get(struct platform_device *pdev, msm_dp_audio = &audio->msm_dp_audio; - msm_dp_catalog_audio_init(catalog); - return msm_dp_audio; error: return ERR_PTR(rc); diff --git a/drivers/gpu/drm/msm/dp/dp_catalog.c b/drivers/gpu/drm/msm/dp/dp_catalog.c index 9c12484589dc38951a3f1cb4bb33eb9aa5822d87..5071c86fd219cb1c933b32104a396982c5cc8ace 100644 --- a/drivers/gpu/drm/msm/dp/dp_catalog.c +++ b/drivers/gpu/drm/msm/dp/dp_catalog.c @@ -62,7 +62,6 @@ struct msm_dp_catalog_private { struct device *dev; struct drm_device *drm_dev; - u32 (*audio_map)[DP_AUDIO_SDP_HEADER_MAX]; struct msm_dp_catalog msm_dp_catalog; }; @@ -300,40 +299,6 @@ struct msm_dp_catalog *msm_dp_catalog_get(struct device *dev) return &catalog->msm_dp_catalog; } -u32 msm_dp_catalog_audio_get_header(struct msm_dp_catalog *msm_dp_catalog, - enum msm_dp_catalog_audio_sdp_type sdp, - enum msm_dp_catalog_audio_header_type header) -{ - struct msm_dp_catalog_private *catalog; - u32 (*sdp_map)[DP_AUDIO_SDP_HEADER_MAX]; - - catalog = container_of(msm_dp_catalog, - struct msm_dp_catalog_private, msm_dp_catalog); - - sdp_map = catalog->audio_map; - - return msm_dp_read_link(msm_dp_catalog, sdp_map[sdp][header]); -} - -void msm_dp_catalog_audio_set_header(struct msm_dp_catalog *msm_dp_catalog, - enum msm_dp_catalog_audio_sdp_type sdp, - enum msm_dp_catalog_audio_header_type header, - u32 data) -{ - struct msm_dp_catalog_private *catalog; - u32 (*sdp_map)[DP_AUDIO_SDP_HEADER_MAX]; - - if (!msm_dp_catalog) - return; - - catalog = container_of(msm_dp_catalog, - struct msm_dp_catalog_private, msm_dp_catalog); - - sdp_map = catalog->audio_map; - - msm_dp_write_link(msm_dp_catalog, sdp_map[sdp][header], data); -} - void msm_dp_catalog_audio_config_acr(struct msm_dp_catalog *msm_dp_catalog, u32 select) { struct msm_dp_catalog_private *catalog; @@ -417,47 +382,6 @@ void msm_dp_catalog_audio_config_sdp(struct msm_dp_catalog *msm_dp_catalog) msm_dp_write_link(msm_dp_catalog, MMSS_DP_SDP_CFG2, sdp_cfg2); } -void msm_dp_catalog_audio_init(struct msm_dp_catalog *msm_dp_catalog) -{ - struct msm_dp_catalog_private *catalog; - - static u32 sdp_map[][DP_AUDIO_SDP_HEADER_MAX] = { - { - MMSS_DP_AUDIO_STREAM_0, - MMSS_DP_AUDIO_STREAM_1, - MMSS_DP_AUDIO_STREAM_1, - }, - { - MMSS_DP_AUDIO_TIMESTAMP_0, - MMSS_DP_AUDIO_TIMESTAMP_1, - MMSS_DP_AUDIO_TIMESTAMP_1, - }, - { - MMSS_DP_AUDIO_INFOFRAME_0, - MMSS_DP_AUDIO_INFOFRAME_1, - MMSS_DP_AUDIO_INFOFRAME_1, - }, - { - MMSS_DP_AUDIO_COPYMANAGEMENT_0, - MMSS_DP_AUDIO_COPYMANAGEMENT_1, - MMSS_DP_AUDIO_COPYMANAGEMENT_1, - }, - { - MMSS_DP_AUDIO_ISRC_0, - MMSS_DP_AUDIO_ISRC_1, - MMSS_DP_AUDIO_ISRC_1, - }, - }; - - if (!msm_dp_catalog) - return; - - catalog = container_of(msm_dp_catalog, - struct msm_dp_catalog_private, msm_dp_catalog); - - catalog->audio_map = sdp_map; -} - void msm_dp_catalog_audio_sfe_level(struct msm_dp_catalog *msm_dp_catalog, u32 safe_to_exit_level) { struct msm_dp_catalog_private *catalog; diff --git a/drivers/gpu/drm/msm/dp/dp_catalog.h b/drivers/gpu/drm/msm/dp/dp_catalog.h index 8b63f53e960092666f08b95f556aefe210f4a1e0..24f1cf4ed5150c4e0e80880588641a01bb6a1596 100644 --- a/drivers/gpu/drm/msm/dp/dp_catalog.h +++ b/drivers/gpu/drm/msm/dp/dp_catalog.h @@ -31,22 +31,6 @@ #define DP_HW_VERSION_1_0 0x10000000 #define DP_HW_VERSION_1_2 0x10020000 -enum msm_dp_catalog_audio_sdp_type { - DP_AUDIO_SDP_STREAM, - DP_AUDIO_SDP_TIMESTAMP, - DP_AUDIO_SDP_INFOFRAME, - DP_AUDIO_SDP_COPYMANAGEMENT, - DP_AUDIO_SDP_ISRC, - DP_AUDIO_SDP_MAX, -}; - -enum msm_dp_catalog_audio_header_type { - DP_AUDIO_SDP_HEADER_1, - DP_AUDIO_SDP_HEADER_2, - DP_AUDIO_SDP_HEADER_3, - DP_AUDIO_SDP_HEADER_MAX, -}; - struct msm_dp_catalog { bool wide_bus_en; @@ -151,17 +135,9 @@ u32 msm_dp_catalog_ctrl_read_psr_interrupt_status(struct msm_dp_catalog *msm_dp_ struct msm_dp_catalog *msm_dp_catalog_get(struct device *dev); /* DP Audio APIs */ -u32 msm_dp_catalog_audio_get_header(struct msm_dp_catalog *msm_dp_catalog, - enum msm_dp_catalog_audio_sdp_type sdp, - enum msm_dp_catalog_audio_header_type header); -void msm_dp_catalog_audio_set_header(struct msm_dp_catalog *msm_dp_catalog, - enum msm_dp_catalog_audio_sdp_type sdp, - enum msm_dp_catalog_audio_header_type header, - u32 data); void msm_dp_catalog_audio_config_acr(struct msm_dp_catalog *catalog, u32 select); void msm_dp_catalog_audio_enable(struct msm_dp_catalog *catalog, bool enable); void msm_dp_catalog_audio_config_sdp(struct msm_dp_catalog *catalog); -void msm_dp_catalog_audio_init(struct msm_dp_catalog *catalog); void msm_dp_catalog_audio_sfe_level(struct msm_dp_catalog *catalog, u32 safe_to_exit_level); #endif /* _DP_CATALOG_H_ */