drm/bridge: analogix_dp: Add &analogix_dp_plat_data.disable_psr to check whether to disable PSR

First of all, since the PSR feature can help to reduce the power
consumption, the Source device, which can support PSR function,
should enable PSR if the PSR capability of Sink device is detected
rather than depending on the user to add 'support-psr' DTS property
manually.

Different platforms that use the same Analogix DP bridge driver may
have different methods for parsing the PSR capability. Therefore, add
a new flag &analogix_dp_plat_data.disable_psr to disable PSR forcely,
which set in the platform side, should be more reasonable.

If the user truly does not want to enable PSR function or the Panel
has something wrong with it, the property 'rockchip,disable-psr' will
be helpful.

Fixes: 9622f2d0f1 ("drm/bridge: analogix_dp: disable PSR feature by default")
Change-Id: Id2fce34857df80de5a1ec97f342709a6e2840ed4
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
This commit is contained in:
Damon Ding
2025-07-16 14:22:21 +08:00
committed by Tao Huang
parent 9f86a7a402
commit 303b0de1b8
3 changed files with 4 additions and 1 deletions

View File

@@ -191,7 +191,7 @@ static bool analogix_dp_detect_sink_psr(struct analogix_dp_device *dp)
unsigned char psr_version;
int ret;
if (!device_property_read_bool(dp->dev, "support-psr"))
if (dp->plat_data->disable_psr)
return 0;
ret = drm_dp_dpcd_readb(&dp->aux, DP_PSR_SUPPORT, &psr_version);

View File

@@ -733,6 +733,7 @@ static int rockchip_dp_probe(struct platform_device *pdev)
dp->plat_data.convert_to_origin_mode = drm_mode_convert_to_origin_mode;
dp->plat_data.skip_connector = rockchip_dp_skip_connector(bridge);
dp->plat_data.bridge = bridge;
dp->plat_data.disable_psr = device_property_read_bool(dp->dev, "rockchip,disable-psr");
ret = rockchip_dp_of_probe(dp);
if (ret < 0)

View File

@@ -53,6 +53,8 @@ struct analogix_dp_plat_data {
bool dual_connector_split;
bool left_display;
bool disable_psr;
u8 max_bpc;
struct analogix_dp_device *left;