]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/msm: populate intf_audio_select() base on hardware capability
authorKuogee Hsieh <quic_khsieh@quicinc.com>
Mon, 14 Feb 2022 21:46:54 +0000 (13:46 -0800)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 18 Feb 2022 17:15:11 +0000 (20:15 +0300)
intf_audio_select() callback function use to configure
HDMI_DP_CORE_SELECT to decide audio output routes to HDMI or DP
interface. HDMI is obsoleted at newer chipset. To keep supporting
legacy hdmi application, intf_audio_select call back function have
to be populated base on hardware chip capability where legacy
chipsets have has_audio_select flag set to true.

Changes in V2:
-- remove has_audio_select flag
-- add BIT(DPU_MDP_AUDIO_SELECT) into dpu_mdp_cfg

Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/1644875214-12944-1-git-send-email-quic_khsieh@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c

index 2b662da3125519087dbeebaf73d77c2eaaf0ca1b..d3151ac4ca881c73f2db335e710b145f8ce75ae0 100644 (file)
@@ -313,7 +313,7 @@ static const struct dpu_mdp_cfg sdm845_mdp[] = {
        {
        .name = "top_0", .id = MDP_TOP,
        .base = 0x0, .len = 0x45C,
-       .features = 0,
+       .features = BIT(DPU_MDP_AUDIO_SELECT),
        .highest_bank_bit = 0x2,
        .clk_ctrls[DPU_CLK_CTRL_VIG0] = {
                        .reg_off = 0x2AC, .bit_off = 0},
index 736f52c742fb55445343863af159e1eb398181ac..c67a8e63171f29fb52bb6d4eca285c9802b447b9 100644 (file)
@@ -87,6 +87,7 @@ enum {
        DPU_MDP_BWC,
        DPU_MDP_UBWC_1_0,
        DPU_MDP_UBWC_1_5,
+       DPU_MDP_AUDIO_SELECT,
        DPU_MDP_MAX
 };
 
index 282e3c6c6d48da094e6f83ac684739e9a2d08bdc..ab3ef162b66682836e93bb8c31e3b4b084e9fb21 100644 (file)
@@ -268,7 +268,9 @@ static void _setup_mdp_ops(struct dpu_hw_mdp_ops *ops,
        ops->get_danger_status = dpu_hw_get_danger_status;
        ops->setup_vsync_source = dpu_hw_setup_vsync_source;
        ops->get_safe_status = dpu_hw_get_safe_status;
-       ops->intf_audio_select = dpu_hw_intf_audio_select;
+
+       if (cap & BIT(DPU_MDP_AUDIO_SELECT))
+               ops->intf_audio_select = dpu_hw_intf_audio_select;
 }
 
 static const struct dpu_mdp_cfg *_top_offset(enum dpu_mdp mdp,