Lines Matching defs:target

109  * returns B_BAD_VALUE. It's called by the OS with target, low and high set to
118 * The target mode should be modified to correspond to the mode as it can be made. */
119 status_t 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) /
129 (double)target->timing.h_total *
130 (double)target->timing.v_total
133 want_same_width = target->timing.h_display == target->virtual_width,
134 want_same_height = target->timing.v_display == target->virtual_height;
137 target->virtual_width, target->virtual_height));
140 switch (target->space)
145 if (target->flags & DUALHEAD_BITS)
152 target->flags &= ~(DUALHEAD_BITS | DUALHEAD_CAPABLE);
159 &target->timing.h_display, &target->timing.h_sync_start, &target->timing.h_sync_end, &target->timing.h_total,
160 &target->timing.v_display, &target->timing.v_sync_start, &target->timing.v_sync_end, &target->timing.v_total
169 if ((target->timing.h_display > target->virtual_width) || want_same_width)
170 target->virtual_width = target->timing.h_display;
171 if ((target->timing.v_display > target->virtual_height) || want_same_height)
172 target->virtual_height = target->timing.v_display;
175 result = gx00_general_validate_pic_size (target, &row_bytes, &acc_mode);
183 if ((target->virtual_width < low->virtual_width) ||
184 (target->virtual_width > high->virtual_width))
191 if ((target->timing.h_display < low->timing.h_display) ||
192 (target->timing.h_display > high->timing.h_display) ||
193 (target->timing.h_sync_start < low->timing.h_sync_start) ||
194 (target->timing.h_sync_start > high->timing.h_sync_start) ||
195 (target->timing.h_sync_end < low->timing.h_sync_end) ||
196 (target->timing.h_sync_end > high->timing.h_sync_end) ||
197 (target->timing.h_total < low->timing.h_total) ||
198 (target->timing.h_total > high->timing.h_total))
201 if ((target->timing.h_display < low->timing.h_display) ||
202 (target->timing.h_display > high->timing.h_display))
211 (target->timing.v_display < low->timing.v_display) ||
212 (target->timing.v_display > high->timing.v_display) ||
213 (target->timing.v_sync_start < low->timing.v_sync_start) ||
214 (target->timing.v_sync_start > high->timing.v_sync_start) ||
215 (target->timing.v_sync_end < low->timing.v_sync_end) ||
216 (target->timing.v_sync_end > high->timing.v_sync_end) ||
217 (target->timing.v_total < low->timing.v_total) ||
218 (target->timing.v_total > high->timing.v_total)
222 if ((target->timing.v_display < low->timing.v_display) ||
223 (target->timing.v_display > high->timing.v_display))
231 target->timing.pixel_clock = target_refresh * ((double)target->timing.h_total) * ((double)target->timing.v_total) / 1000.0;
233 /* Now find the nearest valid pixelclock we actually can setup for the target mode,
236 result = gx00_dac_pix_pll_find(*target,&pix_clock_found,&m,&n,&p,0);
237 /* update the target mode */
238 target->timing.pixel_clock = (pix_clock_found * 1000);
241 if ((target->timing.pixel_clock < low->timing.pixel_clock) ||
242 (target->timing.pixel_clock > high->timing.pixel_clock)
246 if ((target->timing.pixel_clock < (low->timing.pixel_clock - 1000)) ||
247 (target->timing.pixel_clock > (high->timing.pixel_clock + 1000)))
259 if ((row_bytes * target->virtual_height) >
262 target->virtual_height =
265 if (target->virtual_height < target->timing.v_display)
271 target->virtual_width, target->virtual_height));
273 if ((target->virtual_height < low->virtual_height) ||
274 (target->virtual_height > high->virtual_height))
281 LOG(1, ("PROPOSEMODE: initial modeflags: $%08x\n", target->flags));
285 target->flags &=
293 target->flags |= (B_PARALLEL_ACCESS | B_8_BIT_DAC | B_DPMS | B_SCROLL);
296 switch (target->space)
325 ((target->space == B_RGB16_LITTLE) || (target->space == B_RGB32_LITTLE)) &&
326 (target->timing.pixel_clock <= (max_vclk * 1000)))
332 switch (target->flags & DUALHEAD_BITS)
337 (row_bytes * (target->virtual_height + vblank_fix))) &&
338 ((uint16)(row_bytes / bpp) >= (target->timing.h_display * 2)))
340 target->flags |= DUALHEAD_CAPABLE;
345 (row_bytes * (target->virtual_height + vblank_fix)))
347 target->flags |= DUALHEAD_CAPABLE;
352 (row_bytes * (target->virtual_height + vblank_fix) * 2))
354 target->flags |= DUALHEAD_CAPABLE;
361 if (!(target->flags & DUALHEAD_CAPABLE))
363 target->flags &= ~DUALHEAD_BITS;
373 ((target->space == B_RGB16_LITTLE) || (target->space == B_RGB32_LITTLE)) &&
374 (target->timing.h_display <= 1024) &&
375 (target->timing.v_display <= 768))
377 target->flags |= TV_CAPABLE;
383 ((target->space == B_RGB16_LITTLE) || (target->space == B_RGB32_LITTLE)) &&
384 (target->timing.h_display <= 1024) &&
385 (target->timing.v_display <= 768))
387 target->flags |= TV_CAPABLE;
393 if ((target->flags & DUALHEAD_CAPABLE) && (target->flags & TV_VIDEO))
396 (target->timing.h_display <= 1024) && /* Hscaling option exists */
397 (target->timing.v_display <= 576)) /* Vscaling option lacks */
399 target->flags |= TV_CAPABLE;
410 target->flags &= ~TV_CAPABLE;
415 if (!(target->flags & TV_CAPABLE))
417 target->flags &= ~TV_BITS;
421 if ((target->flags & TV_BITS) && !si->ps.secondary_head)
423 target->flags |= TV_PRIMARY;
427 target->flags &= ~TV_PRIMARY;
432 target->flags |= B_HARDWARE_CURSOR;
436 target->flags |= B_SUPPORTS_OVERLAYS;
438 LOG(1, ("PROPOSEMODE: validated modeflags: $%08x\n", target->flags));
443 target->timing.flags &= ~(B_BLANK_PEDESTAL | B_TIMING_INTERLACED | B_SYNC_ON_GREEN);
445 target->timing.flags |= B_SYNC_ON_GREEN;
514 /* set target values */