Lines Matching +full:clock +full:- +full:skip

1 // SPDX-License-Identifier: GPL-2.0-only
27 /* skip to first section */ in find_section()
28 index += bdb->header_size; in find_section()
29 total = bdb->bdb_size; in find_section()
55 dev_priv->edp.bpp = 18; in parse_edp()
57 if (dev_priv->edp.support) { in parse_edp()
59 dev_priv->edp.bpp); in parse_edp()
64 panel_type = dev_priv->panel_type; in parse_edp()
65 switch ((edp->color_depth >> (panel_type * 2)) & 3) { in parse_edp()
67 dev_priv->edp.bpp = 18; in parse_edp()
70 dev_priv->edp.bpp = 24; in parse_edp()
73 dev_priv->edp.bpp = 30; in parse_edp()
78 edp_pps = &edp->power_seqs[panel_type]; in parse_edp()
79 edp_link_params = &edp->link_params[panel_type]; in parse_edp()
81 dev_priv->edp.pps = *edp_pps; in parse_edp()
84 dev_priv->edp.pps.t1_t3, dev_priv->edp.pps.t8, in parse_edp()
85 dev_priv->edp.pps.t9, dev_priv->edp.pps.t10, in parse_edp()
86 dev_priv->edp.pps.t11_t12); in parse_edp()
88 dev_priv->edp.rate = edp_link_params->rate ? DP_LINK_BW_2_7 : in parse_edp()
90 switch (edp_link_params->lanes) { in parse_edp()
92 dev_priv->edp.lanes = 1; in parse_edp()
95 dev_priv->edp.lanes = 2; in parse_edp()
99 dev_priv->edp.lanes = 4; in parse_edp()
103 dev_priv->edp.lanes, dev_priv->edp.rate, dev_priv->edp.bpp); in parse_edp()
105 switch (edp_link_params->preemphasis) { in parse_edp()
107 dev_priv->edp.preemphasis = DP_TRAIN_PRE_EMPH_LEVEL_0; in parse_edp()
110 dev_priv->edp.preemphasis = DP_TRAIN_PRE_EMPH_LEVEL_1; in parse_edp()
113 dev_priv->edp.preemphasis = DP_TRAIN_PRE_EMPH_LEVEL_2; in parse_edp()
116 dev_priv->edp.preemphasis = DP_TRAIN_PRE_EMPH_LEVEL_3; in parse_edp()
119 switch (edp_link_params->vswing) { in parse_edp()
121 dev_priv->edp.vswing = DP_TRAIN_VOLTAGE_SWING_LEVEL_0; in parse_edp()
124 dev_priv->edp.vswing = DP_TRAIN_VOLTAGE_SWING_LEVEL_1; in parse_edp()
127 dev_priv->edp.vswing = DP_TRAIN_VOLTAGE_SWING_LEVEL_2; in parse_edp()
130 dev_priv->edp.vswing = DP_TRAIN_VOLTAGE_SWING_LEVEL_3; in parse_edp()
134 dev_priv->edp.vswing, dev_priv->edp.preemphasis); in parse_edp()
142 block_ptr = (u16 *)((char *)p - 2); in get_blocksize()
150 panel_fixed_mode->hdisplay = (dvo_timing->hactive_hi << 8) | in fill_detail_timing_data()
151 dvo_timing->hactive_lo; in fill_detail_timing_data()
152 panel_fixed_mode->hsync_start = panel_fixed_mode->hdisplay + in fill_detail_timing_data()
153 ((dvo_timing->hsync_off_hi << 8) | dvo_timing->hsync_off_lo); in fill_detail_timing_data()
154 panel_fixed_mode->hsync_end = panel_fixed_mode->hsync_start + in fill_detail_timing_data()
155 dvo_timing->hsync_pulse_width; in fill_detail_timing_data()
156 panel_fixed_mode->htotal = panel_fixed_mode->hdisplay + in fill_detail_timing_data()
157 ((dvo_timing->hblank_hi << 8) | dvo_timing->hblank_lo); in fill_detail_timing_data()
159 panel_fixed_mode->vdisplay = (dvo_timing->vactive_hi << 8) | in fill_detail_timing_data()
160 dvo_timing->vactive_lo; in fill_detail_timing_data()
161 panel_fixed_mode->vsync_start = panel_fixed_mode->vdisplay + in fill_detail_timing_data()
162 dvo_timing->vsync_off; in fill_detail_timing_data()
163 panel_fixed_mode->vsync_end = panel_fixed_mode->vsync_start + in fill_detail_timing_data()
164 dvo_timing->vsync_pulse_width; in fill_detail_timing_data()
165 panel_fixed_mode->vtotal = panel_fixed_mode->vdisplay + in fill_detail_timing_data()
166 ((dvo_timing->vblank_hi << 8) | dvo_timing->vblank_lo); in fill_detail_timing_data()
167 panel_fixed_mode->clock = dvo_timing->clock * 10; in fill_detail_timing_data()
168 panel_fixed_mode->type = DRM_MODE_TYPE_PREFERRED; in fill_detail_timing_data()
170 if (dvo_timing->hsync_positive) in fill_detail_timing_data()
171 panel_fixed_mode->flags |= DRM_MODE_FLAG_PHSYNC; in fill_detail_timing_data()
173 panel_fixed_mode->flags |= DRM_MODE_FLAG_NHSYNC; in fill_detail_timing_data()
175 if (dvo_timing->vsync_positive) in fill_detail_timing_data()
176 panel_fixed_mode->flags |= DRM_MODE_FLAG_PVSYNC; in fill_detail_timing_data()
178 panel_fixed_mode->flags |= DRM_MODE_FLAG_NVSYNC; in fill_detail_timing_data()
181 if (panel_fixed_mode->hsync_end > panel_fixed_mode->htotal) in fill_detail_timing_data()
182 panel_fixed_mode->htotal = panel_fixed_mode->hsync_end + 1; in fill_detail_timing_data()
183 if (panel_fixed_mode->vsync_end > panel_fixed_mode->vtotal) in fill_detail_timing_data()
184 panel_fixed_mode->vtotal = panel_fixed_mode->vsync_end + 1; in fill_detail_timing_data()
199 dev_priv->lvds_bl = NULL; in parse_backlight_data()
202 p_type = lvds_opts->panel_type; in parse_backlight_data()
211 dev_err(dev_priv->dev.dev, "out of memory for backlight data\n"); in parse_backlight_data()
214 dev_priv->lvds_bl = lvds_bl; in parse_backlight_data()
228 dev_priv->lvds_dither = 0; in parse_lfp_panel_data()
229 dev_priv->lvds_vbt = 0; in parse_lfp_panel_data()
235 dev_priv->lvds_dither = lvds_options->pixel_dither; in parse_lfp_panel_data()
236 dev_priv->panel_type = lvds_options->panel_type; in parse_lfp_panel_data()
238 if (lvds_options->panel_type == 0xff) in parse_lfp_panel_data()
246 entry = &lvds_lfp_data->data[lvds_options->panel_type]; in parse_lfp_panel_data()
247 dvo_timing = &entry->dvo_timing; in parse_lfp_panel_data()
252 dev_err(dev_priv->dev.dev, "out of memory for fixed panel mode\n"); in parse_lfp_panel_data()
256 dev_priv->lvds_vbt = 1; in parse_lfp_panel_data()
259 if (panel_fixed_mode->htotal > 0 && panel_fixed_mode->vtotal > 0) { in parse_lfp_panel_data()
260 dev_priv->lfp_lvds_vbt_mode = panel_fixed_mode; in parse_lfp_panel_data()
263 dev_dbg(dev_priv->dev.dev, "ignoring invalid LVDS VBT\n"); in parse_lfp_panel_data()
264 dev_priv->lvds_vbt = 0; in parse_lfp_panel_data()
278 dev_priv->sdvo_lvds_vbt_mode = NULL; in parse_sdvo_panel_data()
294 dvo_timing + sdvo_lvds_options->panel_type); in parse_sdvo_panel_data()
296 dev_priv->sdvo_lvds_vbt_mode = panel_fixed_mode; in parse_sdvo_panel_data()
307 dev_priv->int_tv_support = 1; in parse_general_features()
308 dev_priv->int_crt_support = 1; in parse_general_features()
312 dev_priv->int_tv_support = general->int_tv_support; in parse_general_features()
313 dev_priv->int_crt_support = general->int_crt_support; in parse_general_features()
314 dev_priv->lvds_use_ssc = general->enable_ssc; in parse_general_features()
316 if (dev_priv->lvds_use_ssc) { in parse_general_features()
317 dev_priv->lvds_ssc_freq in parse_general_features()
318 = general->ssc_freq ? 100 : 96; in parse_general_features()
340 * is different with sizeof(struct child_device_config), skip the in parse_sdvo_device_mapping()
343 if (p_defs->child_dev_size != sizeof(*p_child)) { in parse_sdvo_device_mapping()
351 child_device_num = (block_size - sizeof(*p_defs)) / in parse_sdvo_device_mapping()
355 p_child = &(p_defs->devices[i]); in parse_sdvo_device_mapping()
356 if (!p_child->device_type) { in parse_sdvo_device_mapping()
357 /* skip the device block if device type is invalid */ in parse_sdvo_device_mapping()
360 if (p_child->target_addr != TARGET_ADDR1 && in parse_sdvo_device_mapping()
361 p_child->target_addr != TARGET_ADDR2) { in parse_sdvo_device_mapping()
364 * it is not a SDVO device. Skip it. in parse_sdvo_device_mapping()
368 if (p_child->dvo_port != DEVICE_PORT_DVOB && in parse_sdvo_device_mapping()
369 p_child->dvo_port != DEVICE_PORT_DVOC) { in parse_sdvo_device_mapping()
370 /* skip the incorrect SDVO port */ in parse_sdvo_device_mapping()
371 DRM_DEBUG_KMS("Incorrect SDVO port. Skip it\n"); in parse_sdvo_device_mapping()
376 p_child->target_addr, in parse_sdvo_device_mapping()
377 (p_child->dvo_port == DEVICE_PORT_DVOB) ? in parse_sdvo_device_mapping()
379 p_mapping = &(dev_priv->sdvo_mappings[p_child->dvo_port - 1]); in parse_sdvo_device_mapping()
380 if (!p_mapping->initialized) { in parse_sdvo_device_mapping()
381 p_mapping->dvo_port = p_child->dvo_port; in parse_sdvo_device_mapping()
382 p_mapping->target_addr = p_child->target_addr; in parse_sdvo_device_mapping()
383 p_mapping->dvo_wiring = p_child->dvo_wiring; in parse_sdvo_device_mapping()
384 p_mapping->ddc_pin = p_child->ddc_pin; in parse_sdvo_device_mapping()
385 p_mapping->i2c_pin = p_child->i2c_pin; in parse_sdvo_device_mapping()
386 p_mapping->initialized = 1; in parse_sdvo_device_mapping()
388 p_mapping->dvo_port, in parse_sdvo_device_mapping()
389 p_mapping->target_addr, in parse_sdvo_device_mapping()
390 p_mapping->dvo_wiring, in parse_sdvo_device_mapping()
391 p_mapping->ddc_pin, in parse_sdvo_device_mapping()
392 p_mapping->i2c_pin); in parse_sdvo_device_mapping()
397 if (p_child->target2_addr) { in parse_sdvo_device_mapping()
424 if (driver->lvds_config == BDB_DRIVER_FEATURE_EDP) in parse_driver_features()
425 dev_priv->edp.support = 1; in parse_driver_features()
427 dev_priv->lvds_enabled_in_vbt = driver->lvds_config != 0; in parse_driver_features()
428 DRM_DEBUG_KMS("LVDS VBT config bits: 0x%x\n", driver->lvds_config); in parse_driver_features()
431 if (driver->primary_lfp_id) in parse_driver_features()
432 dev_priv->dplla_96mhz = true; in parse_driver_features()
434 dev_priv->dplla_96mhz = false; in parse_driver_features()
453 * is different with sizeof(struct child_device_config), skip the in parse_device_mapping()
456 if (p_defs->child_dev_size != sizeof(*p_child)) { in parse_device_mapping()
464 child_device_num = (block_size - sizeof(*p_defs)) / in parse_device_mapping()
469 p_child = &(p_defs->devices[i]); in parse_device_mapping()
470 if (!p_child->device_type) { in parse_device_mapping()
471 /* skip the device block if device type is invalid */ in parse_device_mapping()
480 dev_priv->child_dev = kcalloc(count, sizeof(*p_child), GFP_KERNEL); in parse_device_mapping()
481 if (!dev_priv->child_dev) { in parse_device_mapping()
486 dev_priv->child_dev_num = count; in parse_device_mapping()
489 p_child = &(p_defs->devices[i]); in parse_device_mapping()
490 if (!p_child->device_type) { in parse_device_mapping()
491 /* skip the device block if device type is invalid */ in parse_device_mapping()
494 child_dev_ptr = dev_priv->child_dev + count; in parse_device_mapping()
504 * psb_intel_init_bios - initialize VBIOS settings & find VBT
520 struct pci_dev *pdev = to_pci_dev(dev->dev); in psb_intel_init_bios()
528 dev_priv->panel_type = 0xff; in psb_intel_init_bios()
531 if (dev_priv->opregion.vbt) { in psb_intel_init_bios()
532 struct vbt_header *vbt = dev_priv->opregion.vbt; in psb_intel_init_bios()
533 if (memcmp(vbt->signature, "$VBT", 4) == 0) { in psb_intel_init_bios()
535 vbt->signature); in psb_intel_init_bios()
536 bdb = (struct bdb_header *)((char *)vbt + vbt->bdb_offset); in psb_intel_init_bios()
538 dev_priv->opregion.vbt = NULL; in psb_intel_init_bios()
544 return -1; in psb_intel_init_bios()
555 dev_err(dev->dev, "VBT signature missing\n"); in psb_intel_init_bios()
557 return -1; in psb_intel_init_bios()
559 bdb = (struct bdb_header *)(bios + i + vbt->bdb_offset); in psb_intel_init_bios()
585 kfree(dev_priv->sdvo_lvds_vbt_mode); in psb_intel_destroy_bios()
586 kfree(dev_priv->lfp_lvds_vbt_mode); in psb_intel_destroy_bios()
587 kfree(dev_priv->lvds_bl); in psb_intel_destroy_bios()