Lines Matching refs:target

174 			LOG(4, ("Haiku: tunnel access target=swap, command=get, value=%u\n", mode->timing.flags));
178 LOG(4, ("Haiku: tunnel access target=swap, command=set, value=%u\n", mode->timing.flags));
186 LOG(4, ("Haiku: tunnel access target=usepanel, command=%s, value=%u\n",
193 LOG(4, ("Haiku: tunnel access target=tvstandard, command=%s, value=%u\n",
200 LOG(4, ("Haiku: unhandled tunnel access target=$%x, command=%u, value=%u\n",
216 * returns B_BAD_VALUE. It's called by the OS with target, low and high set to
225 * The target mode should be modified to correspond to the mode as it can be made. */
227 PROPOSE_DISPLAY_MODE(display_mode *target, const display_mode *low, const display_mode *high)
235 double target_refresh = ((double)target->timing.pixel_clock * 1000.0)
236 / ((double)target->timing.h_total * (double)target->timing.v_total);
237 bool want_same_width = target->timing.h_display == target->virtual_width;
238 bool want_same_height = target->timing.v_display == target->virtual_height;
241 result = Haiku_CheckMultiMonTunnel(target, low, high, &isTunneled);
255 // check how many heads are needed by target mode
256 Haiku_DetectTranslateMultiMode(target);
260 target->virtual_width, target->virtual_height));
263 result = head1_validate_timing(&target->timing.h_display,
264 &target->timing.h_sync_start, &target->timing.h_sync_end,
265 &target->timing.h_total, &target->timing.v_display,
266 &target->timing.v_sync_start, &target->timing.v_sync_end,
267 &target->timing.v_total);
275 || !(BT_check_tvmode(*target) && (target->flags & TV_BITS))) {
280 target_aspect = (target->timing.h_display / ((float)target->timing.v_display));
327 if ((target->timing.h_display - 2) > si->ps.crtc1_screen.timing.h_display
328 || target->timing.v_display > si->ps.crtc1_screen.timing.v_display) {
334 if ((target->timing.h_display - 2) > si->ps.crtc2_screen.timing.h_display
335 || target->timing.v_display > si->ps.crtc2_screen.timing.v_display) {
343 if (target->timing.h_display > target->virtual_width || want_same_width)
344 target->virtual_width = target->timing.h_display;
345 if (target->timing.v_display > target->virtual_height || want_same_height)
346 target->virtual_height = target->timing.v_display;
349 result = nv_general_validate_pic_size(target, &row_bytes, &acc_mode);
356 if (target->virtual_width < low->virtual_width
357 || target->virtual_width > high->virtual_width) {
363 if (target->timing.h_display < low->timing.h_display
364 || target->timing.h_display > high->timing.h_display
365 || target->timing.h_sync_start < low->timing.h_sync_start
366 || target->timing.h_sync_start > high->timing.h_sync_start
367 || target->timing.h_sync_end < low->timing.h_sync_end
368 || target->timing.h_sync_end > high->timing.h_sync_end
369 || target->timing.h_total < low->timing.h_total
370 || target->timing.h_total > high->timing.h_total) {
372 if (target->timing.h_display < low->timing.h_display
373 || target->timing.h_display > high->timing.h_display)
380 if (target->timing.v_display < low->timing.v_display
381 || target->timing.v_display > high->timing.v_display
382 || target->timing.v_sync_start < low->timing.v_sync_start
383 || target->timing.v_sync_start > high->timing.v_sync_start
384 || target->timing.v_sync_end < low->timing.v_sync_end
385 || target->timing.v_sync_end > high->timing.v_sync_end
386 || target->timing.v_total < low->timing.v_total
387 || target->timing.v_total > high->timing.v_total) {
389 if (target->timing.v_display < low->timing.v_display
390 || target->timing.v_display > high->timing.v_display)
397 target->timing.pixel_clock = target_refresh * ((double)target->timing.h_total)
398 * ((double)target->timing.v_total) / 1000.0;
400 /* Now find the nearest valid pixelclock we actually can setup for the target mode,
403 result = head1_pix_pll_find(*target, &pix_clock_found, &m, &n, &p, 0);
404 /* update the target mode */
405 target->timing.pixel_clock = pix_clock_found * 1000;
408 if (target->timing.pixel_clock < low->timing.pixel_clock
409 || target->timing.pixel_clock > high->timing.pixel_clock) {
411 if (target->timing.pixel_clock < low->timing.pixel_clock - 1000
412 || target->timing.pixel_clock > high->timing.pixel_clock + 1000)
431 if (row_bytes * target->virtual_height > si->ps.memory_size - mem_reservation) {
432 target->virtual_height = (si->ps.memory_size - mem_reservation) / row_bytes;
434 if (target->virtual_height < target->timing.v_display) {
440 target->virtual_width, target->virtual_height));
442 if (target->virtual_height < low->virtual_height
443 || target->virtual_height > high->virtual_height) {
449 LOG(1, ("PROPOSEMODE: initial modeflags: $%08x\n", target->flags));
453 target->flags &=
461 target->flags |= (B_PARALLEL_ACCESS | B_8_BIT_DAC | B_DPMS | B_SCROLL);
464 switch (target->space) {
491 if (si->ps.secondary_head && target->timing.pixel_clock <= (max_vclk * 1000)) {
492 switch (target->flags & DUALHEAD_BITS) {
496 >= row_bytes * target->virtual_height
497 && (uint16)(row_bytes / bpp) >= target->timing.h_display * 2)
498 target->flags |= DUALHEAD_CAPABLE;
502 >= row_bytes * target->virtual_height)
503 target->flags |= DUALHEAD_CAPABLE;
507 >= row_bytes * target->virtual_height * 2)
508 target->flags |= DUALHEAD_CAPABLE;
514 if (!(target->flags & DUALHEAD_CAPABLE))
515 target->flags &= ~DUALHEAD_BITS;
518 if (si->ps.tvout && BT_check_tvmode(*target))
519 target->flags |= TV_CAPABLE;
522 if (!(target->flags & TV_CAPABLE))
523 target->flags &= ~TV_BITS;
526 if (target->flags & TV_BITS) {
528 target->flags |= TV_PRIMARY;
529 else if ((target->flags & DUALHEAD_BITS) == DUALHEAD_OFF)
530 target->flags |= TV_PRIMARY;
532 target->flags &= ~TV_PRIMARY;
536 target->flags |= B_HARDWARE_CURSOR;
540 target->flags |= B_SUPPORTS_OVERLAYS;
542 LOG(1, ("PROPOSEMODE: validated modeflags: $%08x\n", target->flags));
546 target->timing.flags &= ~(B_BLANK_PEDESTAL | B_TIMING_INTERLACED | B_SYNC_ON_GREEN);
600 /* set target values */