Skip to content

Commit

Permalink
kms/vc4_hdmi: Refuse 4096x2160@60 hdmi modes
Browse files Browse the repository at this point in the history
These are no reliable without overclocking.
See: #5034

Signed-off-by: Dom Cobley <popcornmix@gmail.com>
  • Loading branch information
popcornmix committed May 17, 2022
1 parent 652a330 commit 1f09a42
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/gpu/drm/vc4/vc4_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1823,6 +1823,11 @@ static int vc4_hdmi_encoder_atomic_check(struct drm_encoder *encoder,
(mode->hsync_end % 2) || (mode->htotal % 2)))
return -EINVAL;

/* 4096x2160@60 is not reliable without overclocking core */
if (mode->hdisplay > 3840 && mode->vdisplay >= 2160 &&
drm_mode_vrefresh(mode) >= 50)
return -EINVAL;

/*
* The 1440p@60 pixel rate is in the same range than the first
* WiFi channel (between 2.4GHz and 2.422GHz with 22MHz
Expand Down Expand Up @@ -1861,6 +1866,10 @@ vc4_hdmi_encoder_mode_valid(struct drm_encoder *encoder,
(mode->hsync_end % 2) || (mode->htotal % 2)))
return MODE_H_ILLEGAL;

if (mode->hdisplay > 3840 && mode->vdisplay >= 2160 &&
drm_mode_vrefresh(mode) >= 50)
return MODE_CLOCK_HIGH;

return vc4_hdmi_encoder_clock_valid(vc4_hdmi, mode->clock * 1000);
}

Expand Down

0 comments on commit 1f09a42

Please sign in to comment.