Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/msm/dp: Removed fixed nvid "support"

The "desc" member of struct dp_panel is zero-initialized during
allocation and never assigned, resulting in dp_ctrl_use_fixed_nvid()
never returning true. This returned boolean value is passed around but
never acted upon.

Perform constant propagation and remove the traces of "fixed nvid".

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/585344/
Link: https://lore.kernel.org/r/20240328-msm-dp-cleanup-v2-2-a5aed9798d32@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

authored by

Bjorn Andersson and committed by
Dmitry Baryshkov
3306a13a 3b76287c

+3 -19
+1 -1
drivers/gpu/drm/msm/dp/dp_catalog.c
··· 470 470 471 471 void dp_catalog_ctrl_config_msa(struct dp_catalog *dp_catalog, 472 472 u32 rate, u32 stream_rate_khz, 473 - bool fixed_nvid, bool is_ycbcr_420) 473 + bool is_ycbcr_420) 474 474 { 475 475 u32 pixel_m, pixel_n; 476 476 u32 mvid, nvid, pixel_div = 0, dispcc_input_rate;
+1 -1
drivers/gpu/drm/msm/dp/dp_catalog.h
··· 100 100 void dp_catalog_setup_peripheral_flush(struct dp_catalog *dp_catalog); 101 101 void dp_catalog_ctrl_config_misc(struct dp_catalog *dp_catalog, u32 cc, u32 tb); 102 102 void dp_catalog_ctrl_config_msa(struct dp_catalog *dp_catalog, u32 rate, 103 - u32 stream_rate_khz, bool fixed_nvid, bool is_ycbcr_420); 103 + u32 stream_rate_khz, bool is_ycbcr_420); 104 104 int dp_catalog_ctrl_set_pattern_state_bit(struct dp_catalog *dp_catalog, u32 pattern); 105 105 u32 dp_catalog_hw_revision(const struct dp_catalog *dp_catalog); 106 106 void dp_catalog_ctrl_reset(struct dp_catalog *dp_catalog);
+1 -16
drivers/gpu/drm/msm/dp/dp_ctrl.c
··· 1566 1566 phy, phy->init_count, phy->power_count); 1567 1567 } 1568 1568 1569 - static bool dp_ctrl_use_fixed_nvid(struct dp_ctrl_private *ctrl) 1570 - { 1571 - const u8 *dpcd = ctrl->panel->dpcd; 1572 - 1573 - /* 1574 - * For better interop experience, used a fixed NVID=0x8000 1575 - * whenever connected to a VGA dongle downstream. 1576 - */ 1577 - if (drm_dp_is_branch(dpcd)) 1578 - return (drm_dp_has_quirk(&ctrl->panel->desc, 1579 - DP_DPCD_QUIRK_CONSTANT_N)); 1580 - 1581 - return false; 1582 - } 1583 - 1584 1569 static int dp_ctrl_reinitialize_mainlink(struct dp_ctrl_private *ctrl) 1585 1570 { 1586 1571 struct phy *phy = ctrl->phy; ··· 2007 2022 2008 2023 dp_catalog_ctrl_config_msa(ctrl->catalog, 2009 2024 ctrl->link->link_params.rate, 2010 - pixel_rate_orig, dp_ctrl_use_fixed_nvid(ctrl), 2025 + pixel_rate_orig, 2011 2026 ctrl->panel->dp_mode.out_fmt_is_yuv_420); 2012 2027 2013 2028 dp_ctrl_setup_tr_unit(ctrl);
-1
drivers/gpu/drm/msm/dp/dp_panel.h
··· 40 40 u8 downstream_ports[DP_MAX_DOWNSTREAM_PORTS]; 41 41 42 42 struct dp_link_info link_info; 43 - struct drm_dp_desc desc; 44 43 struct edid *edid; 45 44 struct drm_connector *connector; 46 45 struct dp_display_mode dp_mode;