Loading drivers/gpu/drm/msm/dp/dp_display.c +8 −3 Original line number Diff line number Diff line /* * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -1948,6 +1948,7 @@ static enum drm_mode_status dp_display_validate_mode( int hdis, vdis, vref, ar, _hdis, _vdis, _vref, _ar, rate; struct dp_display_mode dp_mode; bool dsc_en; u32 pclk_khz; if (!dp_display || !mode || !panel) { pr_err("invalid params\n"); Loading Loading @@ -1986,8 +1987,12 @@ static enum drm_mode_status dp_display_validate_mode( goto end; } if (mode->clock > dp_display->max_pclk_khz) { DP_MST_DEBUG("clk:%d, max:%d\n", mode->clock, pclk_khz = dp_mode.timing.widebus_en ? (dp_mode.timing.pixel_clk_khz >> 1) : (dp_mode.timing.pixel_clk_khz); if (pclk_khz > dp_display->max_pclk_khz) { DP_MST_DEBUG("clk:%d, max:%d\n", pclk_khz, dp_display->max_pclk_khz); goto end; } Loading drivers/gpu/drm/msm/dp/dp_drm.c +11 −4 Original line number Diff line number Diff line Loading @@ -367,8 +367,6 @@ int dp_connector_get_mode_info(struct drm_connector *connector, struct msm_mode_info *mode_info, u32 max_mixer_width, void *display) { const u32 dual_lm = 2; const u32 single_lm = 1; const u32 single_intf = 1; const u32 no_enc = 0; struct msm_display_topology *topology; Loading @@ -376,6 +374,8 @@ int dp_connector_get_mode_info(struct drm_connector *connector, struct dp_panel *dp_panel; struct dp_display_mode dp_mode; struct dp_display *dp_disp = display; struct msm_drm_private *priv; int rc = 0; if (!drm_mode || !mode_info || !max_mixer_width || !connector || !display) { Loading @@ -387,10 +387,17 @@ int dp_connector_get_mode_info(struct drm_connector *connector, sde_conn = to_sde_connector(connector); dp_panel = sde_conn->drv_panel; priv = connector->dev->dev_private; topology = &mode_info->topology; topology->num_lm = (max_mixer_width < drm_mode->hdisplay) ? dual_lm : single_lm; rc = msm_get_mixer_count(priv, drm_mode, max_mixer_width, &topology->num_lm); if (rc) { pr_err("error getting mixer count, rc:%d\n", rc); return rc; } topology->num_enc = no_enc; topology->num_intf = single_intf; Loading drivers/gpu/drm/msm/dp/dp_panel.c +0 −1 Original line number Diff line number Diff line Loading @@ -1813,7 +1813,6 @@ static void dp_panel_decode_dsc_dpcd(struct dp_panel *dp_panel) } dp_panel->fec_en = dp_panel->dsc_en; dp_panel->widebus_en = dp_panel->dsc_en; /* fec_overhead = 1.00 / 0.97582 */ if (dp_panel->fec_en) Loading drivers/gpu/drm/msm/msm_drv.c +27 −0 Original line number Diff line number Diff line Loading @@ -1978,6 +1978,33 @@ msm_gem_smmu_address_space_get(struct drm_device *dev, return funcs->get_address_space(priv->kms, domain); } int msm_get_mixer_count(struct msm_drm_private *priv, const struct drm_display_mode *mode, u32 max_mixer_width, u32 *num_lm) { struct msm_kms *kms; const struct msm_kms_funcs *funcs; if (!priv) { DRM_ERROR("invalid drm private struct"); return -EINVAL; } kms = priv->kms; if (!kms) { DRM_ERROR("invalid msm kms struct"); return -EINVAL; } funcs = kms->funcs; if (!funcs || !funcs->get_mixer_count) { DRM_ERROR("invlaid function pointers"); return -EINVAL; } return funcs->get_mixer_count(priv->kms, mode, max_mixer_width, num_lm); } /* * We don't know what's the best binding to link the gpu with the drm device. * Fow now, we just hunt for all the possible gpus that we support, and add them Loading drivers/gpu/drm/msm/msm_drv.h +3 −0 Original line number Diff line number Diff line Loading @@ -986,4 +986,7 @@ static inline unsigned long timeout_to_jiffies(const ktime_t *timeout) return remaining_jiffies; } int msm_get_mixer_count(struct msm_drm_private *priv, const struct drm_display_mode *mode, u32 max_mixer_width, u32 *num_lm); #endif /* __MSM_DRV_H__ */ Loading
drivers/gpu/drm/msm/dp/dp_display.c +8 −3 Original line number Diff line number Diff line /* * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -1948,6 +1948,7 @@ static enum drm_mode_status dp_display_validate_mode( int hdis, vdis, vref, ar, _hdis, _vdis, _vref, _ar, rate; struct dp_display_mode dp_mode; bool dsc_en; u32 pclk_khz; if (!dp_display || !mode || !panel) { pr_err("invalid params\n"); Loading Loading @@ -1986,8 +1987,12 @@ static enum drm_mode_status dp_display_validate_mode( goto end; } if (mode->clock > dp_display->max_pclk_khz) { DP_MST_DEBUG("clk:%d, max:%d\n", mode->clock, pclk_khz = dp_mode.timing.widebus_en ? (dp_mode.timing.pixel_clk_khz >> 1) : (dp_mode.timing.pixel_clk_khz); if (pclk_khz > dp_display->max_pclk_khz) { DP_MST_DEBUG("clk:%d, max:%d\n", pclk_khz, dp_display->max_pclk_khz); goto end; } Loading
drivers/gpu/drm/msm/dp/dp_drm.c +11 −4 Original line number Diff line number Diff line Loading @@ -367,8 +367,6 @@ int dp_connector_get_mode_info(struct drm_connector *connector, struct msm_mode_info *mode_info, u32 max_mixer_width, void *display) { const u32 dual_lm = 2; const u32 single_lm = 1; const u32 single_intf = 1; const u32 no_enc = 0; struct msm_display_topology *topology; Loading @@ -376,6 +374,8 @@ int dp_connector_get_mode_info(struct drm_connector *connector, struct dp_panel *dp_panel; struct dp_display_mode dp_mode; struct dp_display *dp_disp = display; struct msm_drm_private *priv; int rc = 0; if (!drm_mode || !mode_info || !max_mixer_width || !connector || !display) { Loading @@ -387,10 +387,17 @@ int dp_connector_get_mode_info(struct drm_connector *connector, sde_conn = to_sde_connector(connector); dp_panel = sde_conn->drv_panel; priv = connector->dev->dev_private; topology = &mode_info->topology; topology->num_lm = (max_mixer_width < drm_mode->hdisplay) ? dual_lm : single_lm; rc = msm_get_mixer_count(priv, drm_mode, max_mixer_width, &topology->num_lm); if (rc) { pr_err("error getting mixer count, rc:%d\n", rc); return rc; } topology->num_enc = no_enc; topology->num_intf = single_intf; Loading
drivers/gpu/drm/msm/dp/dp_panel.c +0 −1 Original line number Diff line number Diff line Loading @@ -1813,7 +1813,6 @@ static void dp_panel_decode_dsc_dpcd(struct dp_panel *dp_panel) } dp_panel->fec_en = dp_panel->dsc_en; dp_panel->widebus_en = dp_panel->dsc_en; /* fec_overhead = 1.00 / 0.97582 */ if (dp_panel->fec_en) Loading
drivers/gpu/drm/msm/msm_drv.c +27 −0 Original line number Diff line number Diff line Loading @@ -1978,6 +1978,33 @@ msm_gem_smmu_address_space_get(struct drm_device *dev, return funcs->get_address_space(priv->kms, domain); } int msm_get_mixer_count(struct msm_drm_private *priv, const struct drm_display_mode *mode, u32 max_mixer_width, u32 *num_lm) { struct msm_kms *kms; const struct msm_kms_funcs *funcs; if (!priv) { DRM_ERROR("invalid drm private struct"); return -EINVAL; } kms = priv->kms; if (!kms) { DRM_ERROR("invalid msm kms struct"); return -EINVAL; } funcs = kms->funcs; if (!funcs || !funcs->get_mixer_count) { DRM_ERROR("invlaid function pointers"); return -EINVAL; } return funcs->get_mixer_count(priv->kms, mode, max_mixer_width, num_lm); } /* * We don't know what's the best binding to link the gpu with the drm device. * Fow now, we just hunt for all the possible gpus that we support, and add them Loading
drivers/gpu/drm/msm/msm_drv.h +3 −0 Original line number Diff line number Diff line Loading @@ -986,4 +986,7 @@ static inline unsigned long timeout_to_jiffies(const ktime_t *timeout) return remaining_jiffies; } int msm_get_mixer_count(struct msm_drm_private *priv, const struct drm_display_mode *mode, u32 max_mixer_width, u32 *num_lm); #endif /* __MSM_DRV_H__ */