Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb1fbf8e authored by Michel Dänzer's avatar Michel Dänzer Committed by Dave Airlie
Browse files

drm/radeon/kms: Only add common modes which fit in both panel dimensions.

parent 70ba2a37
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -207,8 +207,10 @@ static void radeon_add_common_modes(struct drm_encoder *encoder, struct drm_conn

	for (i = 0; i < 17; i++) {
		if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) {
			if (common_modes[i].w >= native_mode->panel_xres &&
			    common_modes[i].h >= native_mode->panel_yres)
			if (common_modes[i].w > native_mode->panel_xres ||
			    common_modes[i].h > native_mode->panel_yres ||
			    (common_modes[i].w == native_mode->panel_xres &&
			     common_modes[i].h == native_mode->panel_yres))
				continue;
		}
		if (common_modes[i].w < 320 || common_modes[i].h < 200)