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

Commit 265d09aa authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

drm/radeon: Populate crtc_clock in radeon_atom_get_tv_timings()



crtc_clock is now supposed to be the actual pixel clock corresponding to
the other crtc_ timing values. Populate crtc_clock appropriately in
radeon_atom_get_tv_timings().

This was the only obvious place where we frob with the crtc_ timigns
directly instead of calling drm_mode_set_crtcinfo() which would also
update crtc_clock.

Reviewed-by: default avatar <mario.kleiner.de@gmail.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
parent 0dae35a3
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -1792,7 +1792,8 @@ bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
		if (misc & ATOM_DOUBLE_CLOCK_MODE)
		if (misc & ATOM_DOUBLE_CLOCK_MODE)
			mode->flags |= DRM_MODE_FLAG_DBLSCAN;
			mode->flags |= DRM_MODE_FLAG_DBLSCAN;


		mode->clock = le16_to_cpu(tv_info->aModeTimings[index].usPixelClock) * 10;
		mode->crtc_clock = mode->clock =
			le16_to_cpu(tv_info->aModeTimings[index].usPixelClock) * 10;


		if (index == 1) {
		if (index == 1) {
			/* PAL timings appear to have wrong values for totals */
			/* PAL timings appear to have wrong values for totals */
@@ -1835,7 +1836,8 @@ bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
		if (misc & ATOM_DOUBLE_CLOCK_MODE)
		if (misc & ATOM_DOUBLE_CLOCK_MODE)
			mode->flags |= DRM_MODE_FLAG_DBLSCAN;
			mode->flags |= DRM_MODE_FLAG_DBLSCAN;


		mode->clock = le16_to_cpu(dtd_timings->usPixClk) * 10;
		mode->crtc_clock = mode->clock =
			le16_to_cpu(dtd_timings->usPixClk) * 10;
		break;
		break;
	}
	}
	return true;
	return true;