diff options
Diffstat (limited to 'drivers/gpu/drm/drm_edid.c')
-rw-r--r-- | drivers/gpu/drm/drm_edid.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index f87bf104df7a..9585e531ac6b 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c | |||
@@ -929,13 +929,11 @@ drm_mode_do_interlace_quirk(struct drm_display_mode *mode, | |||
929 | { 1440, 576 }, | 929 | { 1440, 576 }, |
930 | { 2880, 576 }, | 930 | { 2880, 576 }, |
931 | }; | 931 | }; |
932 | static const int n_sizes = | ||
933 | sizeof(cea_interlaced)/sizeof(cea_interlaced[0]); | ||
934 | 932 | ||
935 | if (!(pt->misc & DRM_EDID_PT_INTERLACED)) | 933 | if (!(pt->misc & DRM_EDID_PT_INTERLACED)) |
936 | return; | 934 | return; |
937 | 935 | ||
938 | for (i = 0; i < n_sizes; i++) { | 936 | for (i = 0; i < ARRAY_SIZE(cea_interlaced); i++) { |
939 | if ((mode->hdisplay == cea_interlaced[i].w) && | 937 | if ((mode->hdisplay == cea_interlaced[i].w) && |
940 | (mode->vdisplay == cea_interlaced[i].h / 2)) { | 938 | (mode->vdisplay == cea_interlaced[i].h / 2)) { |
941 | mode->vdisplay *= 2; | 939 | mode->vdisplay *= 2; |
@@ -1375,7 +1373,6 @@ static const struct { | |||
1375 | { 1920, 1440, 60, 0 }, | 1373 | { 1920, 1440, 60, 0 }, |
1376 | { 1920, 1440, 75, 0 }, | 1374 | { 1920, 1440, 75, 0 }, |
1377 | }; | 1375 | }; |
1378 | static const int num_est3_modes = sizeof(est3_modes) / sizeof(est3_modes[0]); | ||
1379 | 1376 | ||
1380 | static int | 1377 | static int |
1381 | drm_est3_modes(struct drm_connector *connector, struct detailed_timing *timing) | 1378 | drm_est3_modes(struct drm_connector *connector, struct detailed_timing *timing) |
@@ -1387,7 +1384,7 @@ drm_est3_modes(struct drm_connector *connector, struct detailed_timing *timing) | |||
1387 | for (i = 0; i < 6; i++) { | 1384 | for (i = 0; i < 6; i++) { |
1388 | for (j = 7; j > 0; j--) { | 1385 | for (j = 7; j > 0; j--) { |
1389 | m = (i * 8) + (7 - j); | 1386 | m = (i * 8) + (7 - j); |
1390 | if (m >= num_est3_modes) | 1387 | if (m >= ARRAY_SIZE(est3_modes)) |
1391 | break; | 1388 | break; |
1392 | if (est[i] & (1 << j)) { | 1389 | if (est[i] & (1 << j)) { |
1393 | mode = drm_mode_find_dmt(connector->dev, | 1390 | mode = drm_mode_find_dmt(connector->dev, |