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.

phy: rockchip: samsung-hdptx: Add high color depth management

Add support for 8-bit, 10-bit, 12-bit and 16-bit color depth setup.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Dmitry Baryshkov <dmtiry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20250318-phy-sam-hdptx-bpc-v6-14-8cb1678e7663@collabora.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Cristian Ciocaltea and committed by
Vinod Koul
9d0ec51d 45b14bdc

+22 -1
+22 -1
drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
··· 1028 1028 regmap_update_bits(hdptx->regmap, CMN_REG(0086), PLL_PCG_POSTDIV_SEL_MASK, 1029 1029 FIELD_PREP(PLL_PCG_POSTDIV_SEL_MASK, cfg->pms_sdiv)); 1030 1030 1031 + regmap_update_bits(hdptx->regmap, CMN_REG(0086), PLL_PCG_CLK_SEL_MASK, 1032 + FIELD_PREP(PLL_PCG_CLK_SEL_MASK, (hdptx->hdmi_cfg.bpc - 8) >> 1)); 1033 + 1031 1034 regmap_update_bits(hdptx->regmap, CMN_REG(0086), PLL_PCG_CLK_EN_MASK, 1032 1035 FIELD_PREP(PLL_PCG_CLK_EN_MASK, 0x1)); 1033 1036 ··· 1430 1427 hdptx->hdmi_cfg.tmds_char_rate *= 100; 1431 1428 } 1432 1429 1433 - dev_dbg(hdptx->dev, "%s rate=%llu\n", __func__, hdptx->hdmi_cfg.tmds_char_rate); 1430 + dev_dbg(hdptx->dev, "%s rate=%llu bpc=%u\n", __func__, 1431 + hdptx->hdmi_cfg.tmds_char_rate, hdptx->hdmi_cfg.bpc); 1434 1432 } 1435 1433 1436 1434 ret = rk_hdptx_phy_consumer_get(hdptx); ··· 1495 1491 if (i == ARRAY_SIZE(ropll_tmds_cfg) && 1496 1492 !rk_hdptx_phy_clk_pll_calc(hdmi->tmds_char_rate, NULL)) 1497 1493 return -EINVAL; 1494 + 1495 + if (!hdmi->bpc) 1496 + hdmi->bpc = 8; 1497 + 1498 + switch (hdmi->bpc) { 1499 + case 8: 1500 + case 10: 1501 + case 12: 1502 + case 16: 1503 + break; 1504 + default: 1505 + return -EINVAL; 1506 + }; 1498 1507 1499 1508 return 0; 1500 1509 } ··· 1781 1764 hdptx->hdmi_cfg = opts->hdmi; 1782 1765 hdptx->restrict_rate_change = true; 1783 1766 } 1767 + 1768 + dev_dbg(hdptx->dev, "%s rate=%llu bpc=%u\n", __func__, 1769 + hdptx->hdmi_cfg.tmds_char_rate, hdptx->hdmi_cfg.bpc); 1784 1770 return ret; 1785 1771 } 1786 1772 ··· 1992 1972 return -ENOMEM; 1993 1973 1994 1974 hdptx->dev = dev; 1975 + hdptx->hdmi_cfg.bpc = 8; 1995 1976 1996 1977 regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); 1997 1978 if (IS_ERR(regs))