[PATCH] drm/arm/malidp: fix mode_valid couldn't cull invalid modes issue

Sandor.yu at nxp.com Sandor.yu at nxp.com
Tue Aug 10 02:43:31 UTC 2021


From: Sandor Yu <Sandor.yu at nxp.com>

In function malidp_crtc_mode_valid, mode->crtc_mode = 0 when run
in drm_helper_probe_single_connector_modes.
Invalid video modes are not culled
and all modes move to the connector's modes list.
It is not expected by mode_valid.

Replace mode->crtc_clock with mode->clock to fix the issue.

Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
---
 drivers/gpu/drm/arm/malidp_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/arm/malidp_crtc.c b/drivers/gpu/drm/arm/malidp_crtc.c
index 494075ddbef6..55890334385d 100644
--- a/drivers/gpu/drm/arm/malidp_crtc.c
+++ b/drivers/gpu/drm/arm/malidp_crtc.c
@@ -31,7 +31,7 @@ static enum drm_mode_status malidp_crtc_mode_valid(struct drm_crtc *crtc,
 	 * check that the hardware can drive the required clock rate,
 	 * but skip the check if the clock is meant to be disabled (req_rate = 0)
 	 */
-	long rate, req_rate = mode->crtc_clock * 1000;
+	long rate, req_rate = mode->clock * 1000;
 
 	if (req_rate) {
 		rate = clk_round_rate(hwdev->pxlclk, req_rate);
-- 
2.17.1



More information about the dri-devel mailing list