mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
drm/rockchip: dw-dp: Support dp show uboot logo
When dp show uboot logo, It need skip the init process of dp controller and set the phy status as power on. Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com> Change-Id: I7dc3a00c1e71f92648cbb49ca527eb2a9f9026ac
This commit is contained in:
@@ -285,6 +285,8 @@ struct dw_dp {
|
|||||||
struct drm_property *color_format_property;
|
struct drm_property *color_format_property;
|
||||||
struct drm_property *color_depth_capacity;
|
struct drm_property *color_depth_capacity;
|
||||||
struct drm_property *color_format_capacity;
|
struct drm_property *color_format_capacity;
|
||||||
|
|
||||||
|
struct rockchip_drm_sub_dev sub_dev;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dw_dp_state {
|
struct dw_dp_state {
|
||||||
@@ -1718,12 +1720,6 @@ static void dw_dp_hpd_init(struct dw_dp *dp)
|
|||||||
|
|
||||||
static void dw_dp_aux_init(struct dw_dp *dp)
|
static void dw_dp_aux_init(struct dw_dp *dp)
|
||||||
{
|
{
|
||||||
regmap_update_bits(dp->regmap, DPTX_SOFT_RESET_CTRL, AUX_RESET,
|
|
||||||
FIELD_PREP(AUX_RESET, 1));
|
|
||||||
usleep_range(10, 20);
|
|
||||||
regmap_update_bits(dp->regmap, DPTX_SOFT_RESET_CTRL, AUX_RESET,
|
|
||||||
FIELD_PREP(AUX_RESET, 0));
|
|
||||||
|
|
||||||
regmap_update_bits(dp->regmap, DPTX_GENERAL_INTERRUPT_ENABLE,
|
regmap_update_bits(dp->regmap, DPTX_GENERAL_INTERRUPT_ENABLE,
|
||||||
AUX_REPLY_EVENT_EN,
|
AUX_REPLY_EVENT_EN,
|
||||||
FIELD_PREP(AUX_REPLY_EVENT_EN, 1));
|
FIELD_PREP(AUX_REPLY_EVENT_EN, 1));
|
||||||
@@ -1731,18 +1727,6 @@ static void dw_dp_aux_init(struct dw_dp *dp)
|
|||||||
|
|
||||||
static void dw_dp_init(struct dw_dp *dp)
|
static void dw_dp_init(struct dw_dp *dp)
|
||||||
{
|
{
|
||||||
regmap_update_bits(dp->regmap, DPTX_SOFT_RESET_CTRL, CONTROLLER_RESET,
|
|
||||||
FIELD_PREP(CONTROLLER_RESET, 1));
|
|
||||||
usleep_range(10, 20);
|
|
||||||
regmap_update_bits(dp->regmap, DPTX_SOFT_RESET_CTRL, CONTROLLER_RESET,
|
|
||||||
FIELD_PREP(CONTROLLER_RESET, 0));
|
|
||||||
|
|
||||||
regmap_update_bits(dp->regmap, DPTX_SOFT_RESET_CTRL, PHY_SOFT_RESET,
|
|
||||||
FIELD_PREP(PHY_SOFT_RESET, 1));
|
|
||||||
usleep_range(10, 20);
|
|
||||||
regmap_update_bits(dp->regmap, DPTX_SOFT_RESET_CTRL, PHY_SOFT_RESET,
|
|
||||||
FIELD_PREP(PHY_SOFT_RESET, 0));
|
|
||||||
|
|
||||||
regmap_update_bits(dp->regmap, DPTX_CCTL, DEFAULT_FAST_LINK_TRAIN_EN,
|
regmap_update_bits(dp->regmap, DPTX_CCTL, DEFAULT_FAST_LINK_TRAIN_EN,
|
||||||
FIELD_PREP(DEFAULT_FAST_LINK_TRAIN_EN, 0));
|
FIELD_PREP(DEFAULT_FAST_LINK_TRAIN_EN, 0));
|
||||||
|
|
||||||
@@ -1943,6 +1927,16 @@ static int dw_dp_bridge_mode_valid(struct drm_bridge *bridge,
|
|||||||
return MODE_OK;
|
return MODE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void dw_dp_loader_protect(struct drm_encoder *encoder, bool on)
|
||||||
|
{
|
||||||
|
struct dw_dp *dp = encoder_to_dp(encoder);
|
||||||
|
|
||||||
|
if (on)
|
||||||
|
phy_power_on(dp->phy);
|
||||||
|
else
|
||||||
|
phy_power_off(dp->phy);
|
||||||
|
}
|
||||||
|
|
||||||
static int dw_dp_bridge_attach(struct drm_bridge *bridge,
|
static int dw_dp_bridge_attach(struct drm_bridge *bridge,
|
||||||
enum drm_bridge_attach_flags flags)
|
enum drm_bridge_attach_flags flags)
|
||||||
{
|
{
|
||||||
@@ -1974,6 +1968,11 @@ static int dw_dp_bridge_attach(struct drm_bridge *bridge,
|
|||||||
|
|
||||||
drm_connector_attach_encoder(connector, bridge->encoder);
|
drm_connector_attach_encoder(connector, bridge->encoder);
|
||||||
|
|
||||||
|
dp->sub_dev.connector = connector;
|
||||||
|
dp->sub_dev.of_node = dp->dev->of_node;
|
||||||
|
dp->sub_dev.loader_protect = dw_dp_loader_protect;
|
||||||
|
rockchip_drm_register_sub_dev(&dp->sub_dev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2853,11 +2852,8 @@ static int __maybe_unused dw_dp_runtime_resume(struct device *dev)
|
|||||||
clk_prepare_enable(dp->apb_clk);
|
clk_prepare_enable(dp->apb_clk);
|
||||||
clk_prepare_enable(dp->aux_clk);
|
clk_prepare_enable(dp->aux_clk);
|
||||||
|
|
||||||
reset_control_assert(dp->rstc);
|
|
||||||
udelay(10);
|
|
||||||
reset_control_deassert(dp->rstc);
|
|
||||||
|
|
||||||
dw_dp_init(dp);
|
dw_dp_init(dp);
|
||||||
|
|
||||||
enable_irq(dp->irq);
|
enable_irq(dp->irq);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user