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

Commit 68b61a7f authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie
Browse files

drm/radeon/kms/combios: match lvds panel info parsing to ddx



Should work better on some panels.

Signed-off-by: default avatarAlex Deucher <alexdeucher@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 1ff26a36
Loading
Loading
Loading
Loading
+14 −12
Original line number Original line Diff line number Diff line
@@ -1113,18 +1113,20 @@ struct radeon_encoder_lvds *radeon_combios_get_lvds_info(struct radeon_encoder
				break;
				break;


			if ((RBIOS16(tmp) == lvds->native_mode.hdisplay) &&
			if ((RBIOS16(tmp) == lvds->native_mode.hdisplay) &&
			    (RBIOS16(tmp + 2) ==
			    (RBIOS16(tmp + 2) == lvds->native_mode.vdisplay)) {
			     lvds->native_mode.vdisplay)) {
				lvds->native_mode.htotal = lvds->native_mode.hdisplay +
				lvds->native_mode.htotal = RBIOS16(tmp + 17) * 8;
					(RBIOS16(tmp + 17) - RBIOS16(tmp + 19)) * 8;
				lvds->native_mode.hsync_start = RBIOS16(tmp + 21) * 8;
				lvds->native_mode.hsync_start = lvds->native_mode.hdisplay +
				lvds->native_mode.hsync_end = (RBIOS8(tmp + 23) +
					(RBIOS16(tmp + 21) - RBIOS16(tmp + 19) - 1) * 8;
							       RBIOS16(tmp + 21)) * 8;
				lvds->native_mode.hsync_end = lvds->native_mode.hsync_start +

					(RBIOS8(tmp + 23) * 8);
				lvds->native_mode.vtotal = RBIOS16(tmp + 24);

				lvds->native_mode.vsync_start = RBIOS16(tmp + 28) & 0x7ff;
				lvds->native_mode.vtotal = lvds->native_mode.vdisplay +
				lvds->native_mode.vsync_end =
					(RBIOS16(tmp + 24) - RBIOS16(tmp + 26));
					((RBIOS16(tmp + 28) & 0xf800) >> 11) +
				lvds->native_mode.vsync_start = lvds->native_mode.vdisplay +
					(RBIOS16(tmp + 28) & 0x7ff);
					((RBIOS16(tmp + 28) & 0x7ff) - RBIOS16(tmp + 26));
				lvds->native_mode.vsync_end = lvds->native_mode.vsync_start +
					((RBIOS16(tmp + 28) & 0xf800) >> 11);


				lvds->native_mode.clock = RBIOS16(tmp + 9) * 10;
				lvds->native_mode.clock = RBIOS16(tmp + 9) * 10;
				lvds->native_mode.flags = 0;
				lvds->native_mode.flags = 0;