Lines Matching defs:target

108  * returns B_BAD_VALUE. It's called by the OS with target, low and high set to
117 * The target mode should be modified to correspond to the mode as it can be made. */
119 PROPOSE_DISPLAY_MODE(display_mode *target, const display_mode *low, const display_mode *high)
127 double target_refresh = ((double)target->timing.pixel_clock * 1000.0)
128 / ((double)target->timing.h_total * (double)target->timing.v_total);
129 bool want_same_width = target->timing.h_display == target->virtual_width;
130 bool want_same_height = target->timing.v_display == target->virtual_height;
133 target->virtual_width, target->virtual_height));
136 result = head1_validate_timing(&target->timing.h_display,
137 &target->timing.h_sync_start, &target->timing.h_sync_end,
138 &target->timing.h_total, &target->timing.v_display,
139 &target->timing.v_sync_start, &target->timing.v_sync_end,
140 &target->timing.v_total);
148 || !(BT_check_tvmode(*target) && (target->flags & TV_BITS))) {
153 target_aspect = (target->timing.h_display / ((float)target->timing.v_display));
197 if ((target->timing.h_display - 2) > si->ps.crtc1_screen.timing.h_display
198 || target->timing.v_display > si->ps.crtc1_screen.timing.v_display) {
204 if ((target->timing.h_display - 2) > si->ps.crtc2_screen.timing.h_display
205 || target->timing.v_display > si->ps.crtc2_screen.timing.v_display) {
212 if (target->timing.h_display > target->virtual_width || want_same_width)
213 target->virtual_width = target->timing.h_display;
214 if (target->timing.v_display > target->virtual_height || want_same_height)
215 target->virtual_height = target->timing.v_display;
218 result = nv_general_validate_pic_size(target, &row_bytes, &acc_mode);
225 if (target->virtual_width < low->virtual_width
226 || target->virtual_width > high->virtual_width) {
232 if (target->timing.h_display < low->timing.h_display
233 || target->timing.h_display > high->timing.h_display
234 || target->timing.h_sync_start < low->timing.h_sync_start
235 || target->timing.h_sync_start > high->timing.h_sync_start
236 || target->timing.h_sync_end < low->timing.h_sync_end
237 || target->timing.h_sync_end > high->timing.h_sync_end
238 || target->timing.h_total < low->timing.h_total
239 || target->timing.h_total > high->timing.h_total) {
241 if (target->timing.h_display < low->timing.h_display
242 || target->timing.h_display > high->timing.h_display)
249 if (target->timing.v_display < low->timing.v_display
250 || target->timing.v_display > high->timing.v_display
251 || target->timing.v_sync_start < low->timing.v_sync_start
252 || target->timing.v_sync_start > high->timing.v_sync_start
253 || target->timing.v_sync_end < low->timing.v_sync_end
254 || target->timing.v_sync_end > high->timing.v_sync_end
255 || target->timing.v_total < low->timing.v_total
256 || target->timing.v_total > high->timing.v_total) {
258 if (target->timing.v_display < low->timing.v_display
259 || target->timing.v_display > high->timing.v_display)
266 target->timing.pixel_clock = target_refresh * ((double)target->timing.h_total)
267 * ((double)target->timing.v_total) / 1000.0;
269 /* Now find the nearest valid pixelclock we actually can setup for the target mode,
272 result = head1_pix_pll_find(*target, &pix_clock_found, &m, &n, &p, 0);
273 /* update the target mode */
274 target->timing.pixel_clock = pix_clock_found * 1000;
277 if (target->timing.pixel_clock < low->timing.pixel_clock
278 || target->timing.pixel_clock > high->timing.pixel_clock) {
280 if (target->timing.pixel_clock < low->timing.pixel_clock - 1000
281 || target->timing.pixel_clock > high->timing.pixel_clock + 1000)
300 if (row_bytes * target->virtual_height > si->ps.memory_size - mem_reservation) {
301 target->virtual_height = (si->ps.memory_size - mem_reservation) / row_bytes;
303 if (target->virtual_height < target->timing.v_display) {
309 target->virtual_width, target->virtual_height));
311 if (target->virtual_height < low->virtual_height
312 || target->virtual_height > high->virtual_height) {
318 LOG(1, ("PROPOSEMODE: initial modeflags: $%08x\n", target->flags));
322 target->flags &=
330 target->flags |= (B_PARALLEL_ACCESS | B_8_BIT_DAC | B_DPMS | B_SCROLL);
333 switch (target->space) {
360 if (si->ps.secondary_head && target->timing.pixel_clock <= (max_vclk * 1000)) {
361 switch (target->flags & DUALHEAD_BITS) {
365 >= row_bytes * target->virtual_height
366 && (uint16)(row_bytes / bpp) >= target->timing.h_display * 2)
367 target->flags |= DUALHEAD_CAPABLE;
371 >= row_bytes * target->virtual_height)
372 target->flags |= DUALHEAD_CAPABLE;
376 >= row_bytes * target->virtual_height * 2)
377 target->flags |= DUALHEAD_CAPABLE;
383 if (!(target->flags & DUALHEAD_CAPABLE))
384 target->flags &= ~DUALHEAD_BITS;
387 if (si->ps.tvout && BT_check_tvmode(*target))
388 target->flags |= TV_CAPABLE;
391 if (!(target->flags & TV_CAPABLE))
392 target->flags &= ~TV_BITS;
395 if (target->flags & TV_BITS) {
397 target->flags |= TV_PRIMARY;
398 else if ((target->flags & DUALHEAD_BITS) == DUALHEAD_OFF)
399 target->flags |= TV_PRIMARY;
401 target->flags &= ~TV_PRIMARY;
405 target->flags |= B_HARDWARE_CURSOR;
409 target->flags |= B_SUPPORTS_OVERLAYS;
411 LOG(1, ("PROPOSEMODE: validated modeflags: $%08x\n", target->flags));
415 target->timing.flags &= ~(B_BLANK_PEDESTAL | B_TIMING_INTERLACED | B_SYNC_ON_GREEN);
489 /* set target values */