u32 clock;
u16 refresh; /* in millihertz (for precision) */
- u32 oversample;
+ u8 oversample;
u8 hsync_end;
u16 hblank_start, hblank_end, htotal;
bool progressive : 1, trilevel_sync : 1, component_only : 1;
.name = "NTSC-M",
.clock = 108000,
.refresh = 59940,
- .oversample = TV_OVERSAMPLE_8X,
+ .oversample = 8,
.component_only = 0,
/* 525 Lines, 60 Fields, 15.734KHz line, Sub-Carrier 3.580MHz */
.name = "NTSC-443",
.clock = 108000,
.refresh = 59940,
- .oversample = TV_OVERSAMPLE_8X,
+ .oversample = 8,
.component_only = 0,
/* 525 Lines, 60 Fields, 15.734KHz line, Sub-Carrier 4.43MHz */
.hsync_end = 64, .hblank_end = 124,
.name = "NTSC-J",
.clock = 108000,
.refresh = 59940,
- .oversample = TV_OVERSAMPLE_8X,
+ .oversample = 8,
.component_only = 0,
/* 525 Lines, 60 Fields, 15.734KHz line, Sub-Carrier 3.580MHz */
.name = "PAL-M",
.clock = 108000,
.refresh = 59940,
- .oversample = TV_OVERSAMPLE_8X,
+ .oversample = 8,
.component_only = 0,
/* 525 Lines, 60 Fields, 15.734KHz line, Sub-Carrier 3.580MHz */
.name = "PAL-N",
.clock = 108000,
.refresh = 50000,
- .oversample = TV_OVERSAMPLE_8X,
+ .oversample = 8,
.component_only = 0,
.hsync_end = 64, .hblank_end = 128,
.name = "PAL",
.clock = 108000,
.refresh = 50000,
- .oversample = TV_OVERSAMPLE_8X,
+ .oversample = 8,
.component_only = 0,
.hsync_end = 64, .hblank_end = 142,
.name = "480p",
.clock = 108000,
.refresh = 59940,
- .oversample = TV_OVERSAMPLE_4X,
+ .oversample = 4,
.component_only = 1,
.hsync_end = 64, .hblank_end = 122,
.name = "576p",
.clock = 108000,
.refresh = 50000,
- .oversample = TV_OVERSAMPLE_4X,
+ .oversample = 4,
.component_only = 1,
.hsync_end = 64, .hblank_end = 139,
.name = "720p@60Hz",
.clock = 148500,
.refresh = 60000,
- .oversample = TV_OVERSAMPLE_2X,
+ .oversample = 2,
.component_only = 1,
.hsync_end = 80, .hblank_end = 300,
.name = "720p@50Hz",
.clock = 148500,
.refresh = 50000,
- .oversample = TV_OVERSAMPLE_2X,
+ .oversample = 2,
.component_only = 1,
.hsync_end = 80, .hblank_end = 300,
.name = "1080i@50Hz",
.clock = 148500,
.refresh = 50000,
- .oversample = TV_OVERSAMPLE_2X,
+ .oversample = 2,
.component_only = 1,
.hsync_end = 88, .hblank_end = 235,
.name = "1080i@60Hz",
.clock = 148500,
.refresh = 60000,
- .oversample = TV_OVERSAMPLE_2X,
+ .oversample = 2,
.component_only = 1,
.hsync_end = 88, .hblank_end = 235,
}
tv_ctl |= TV_ENC_PIPE_SEL(intel_crtc->pipe);
- tv_ctl |= tv_mode->oversample;
+
+ switch (tv_mode->oversample) {
+ case 8:
+ tv_ctl |= TV_OVERSAMPLE_8X;
+ break;
+ case 4:
+ tv_ctl |= TV_OVERSAMPLE_4X;
+ break;
+ case 2:
+ tv_ctl |= TV_OVERSAMPLE_2X;
+ break;
+ default:
+ tv_ctl |= TV_OVERSAMPLE_NONE;
+ break;
+ }
if (tv_mode->progressive)
tv_ctl |= TV_PROGRESSIVE;