Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915: Organize VBT stuff inside drm_i915_private

drm_i915_private is getting bigger and bigger when adding new vbt stuff.
So, the better way of getting drm_i915_private organized is to create
a special structure for vbt stuff.

v2: Basically conflicts fixes

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

authored by

Rodrigo Vivi and committed by
Daniel Vetter
41aa3448 09ede541

+119 -112
+4 -4
drivers/gpu/drm/i915/i915_dma.c
··· 1742 1742 * free the memory space allocated for the child device 1743 1743 * config parsed from VBT 1744 1744 */ 1745 - if (dev_priv->child_dev && dev_priv->child_dev_num) { 1746 - kfree(dev_priv->child_dev); 1747 - dev_priv->child_dev = NULL; 1748 - dev_priv->child_dev_num = 0; 1745 + if (dev_priv->vbt.child_dev && dev_priv->vbt.child_dev_num) { 1746 + kfree(dev_priv->vbt.child_dev); 1747 + dev_priv->vbt.child_dev = NULL; 1748 + dev_priv->vbt.child_dev_num = 0; 1749 1749 } 1750 1750 1751 1751 vga_switcheroo_unregister_client(dev->pdev);
+32 -25
drivers/gpu/drm/i915/i915_drv.h
··· 891 891 MODESET_SUSPENDED, 892 892 }; 893 893 894 + struct intel_vbt_data { 895 + struct drm_display_mode *lfp_lvds_vbt_mode; /* if any */ 896 + struct drm_display_mode *sdvo_lvds_vbt_mode; /* if any */ 897 + 898 + /* Feature bits */ 899 + unsigned int int_tv_support:1; 900 + unsigned int lvds_dither:1; 901 + unsigned int lvds_vbt:1; 902 + unsigned int int_crt_support:1; 903 + unsigned int lvds_use_ssc:1; 904 + unsigned int display_clock_mode:1; 905 + unsigned int fdi_rx_polarity_inverted:1; 906 + int lvds_ssc_freq; 907 + unsigned int bios_lvds_val; /* initial [PCH_]LVDS reg val in VBIOS */ 908 + 909 + /* eDP */ 910 + int edp_rate; 911 + int edp_lanes; 912 + int edp_preemphasis; 913 + int edp_vswing; 914 + bool edp_initialized; 915 + bool edp_support; 916 + int edp_bpp; 917 + struct edp_power_seq edp_pps; 918 + 919 + int crt_ddc_pin; 920 + 921 + int child_dev_num; 922 + struct child_device_config *child_dev; 923 + }; 924 + 894 925 typedef struct drm_i915_private { 895 926 struct drm_device *dev; 896 927 struct kmem_cache *slab; ··· 1001 970 struct intel_fbc_work *fbc_work; 1002 971 1003 972 struct intel_opregion opregion; 973 + struct intel_vbt_data vbt; 1004 974 1005 975 /* overlay */ 1006 976 struct intel_overlay *overlay; ··· 1018 986 /* LVDS info */ 1019 987 struct drm_display_mode *lfp_lvds_vbt_mode; /* if any */ 1020 988 struct drm_display_mode *sdvo_lvds_vbt_mode; /* if any */ 1021 - 1022 - /* Feature bits from the VBIOS */ 1023 - unsigned int int_tv_support:1; 1024 - unsigned int lvds_dither:1; 1025 - unsigned int lvds_vbt:1; 1026 - unsigned int int_crt_support:1; 1027 - unsigned int lvds_use_ssc:1; 1028 - unsigned int display_clock_mode:1; 1029 - unsigned int fdi_rx_polarity_inverted:1; 1030 - int lvds_ssc_freq; 1031 - unsigned int bios_lvds_val; /* initial [PCH_]LVDS reg val in VBIOS */ 1032 - struct { 1033 - int rate; 1034 - int lanes; 1035 - int preemphasis; 1036 - int vswing; 1037 - 1038 - bool initialized; 1039 - bool support; 1040 - int bpp; 1041 - struct edp_power_seq pps; 1042 - } edp; 1043 989 bool no_aux_handshake; 1044 990 1045 - int crt_ddc_pin; 1046 991 struct drm_i915_fence_reg fence_regs[I915_MAX_NUM_FENCES]; /* assume 965 */ 1047 992 int fence_reg_start; /* 4 if userland hasn't ioctl'd us yet */ 1048 993 int num_fence_regs; /* 8 on pre-965, 16 otherwise */ ··· 1061 1052 /* indicates the reduced downclock for LVDS*/ 1062 1053 int lvds_downclock; 1063 1054 u16 orig_clock; 1064 - int child_dev_num; 1065 - struct child_device_config *child_dev; 1066 1055 1067 1056 bool mchbar_need_disable; 1068 1057
+50 -50
drivers/gpu/drm/i915/intel_bios.c
··· 212 212 if (!lvds_options) 213 213 return; 214 214 215 - dev_priv->lvds_dither = lvds_options->pixel_dither; 215 + dev_priv->vbt.lvds_dither = lvds_options->pixel_dither; 216 216 if (lvds_options->panel_type == 0xff) 217 217 return; 218 218 ··· 226 226 if (!lvds_lfp_data_ptrs) 227 227 return; 228 228 229 - dev_priv->lvds_vbt = 1; 229 + dev_priv->vbt.lvds_vbt = 1; 230 230 231 231 panel_dvo_timing = get_lvds_dvo_timing(lvds_lfp_data, 232 232 lvds_lfp_data_ptrs, ··· 238 238 239 239 fill_detail_timing_data(panel_fixed_mode, panel_dvo_timing); 240 240 241 - dev_priv->lfp_lvds_vbt_mode = panel_fixed_mode; 241 + dev_priv->vbt.lfp_lvds_vbt_mode = panel_fixed_mode; 242 242 243 243 DRM_DEBUG_KMS("Found panel mode in BIOS VBT tables:\n"); 244 244 drm_mode_debug_printmodeline(panel_fixed_mode); ··· 274 274 /* check the resolution, just to be sure */ 275 275 if (fp_timing->x_res == panel_fixed_mode->hdisplay && 276 276 fp_timing->y_res == panel_fixed_mode->vdisplay) { 277 - dev_priv->bios_lvds_val = fp_timing->lvds_reg_val; 277 + dev_priv->vbt.bios_lvds_val = fp_timing->lvds_reg_val; 278 278 DRM_DEBUG_KMS("VBT initial LVDS value %x\n", 279 - dev_priv->bios_lvds_val); 279 + dev_priv->vbt.bios_lvds_val); 280 280 } 281 281 } 282 282 } ··· 316 316 317 317 fill_detail_timing_data(panel_fixed_mode, dvo_timing + index); 318 318 319 - dev_priv->sdvo_lvds_vbt_mode = panel_fixed_mode; 319 + dev_priv->vbt.sdvo_lvds_vbt_mode = panel_fixed_mode; 320 320 321 321 DRM_DEBUG_KMS("Found SDVO panel mode in BIOS VBT tables:\n"); 322 322 drm_mode_debug_printmodeline(panel_fixed_mode); ··· 345 345 346 346 general = find_section(bdb, BDB_GENERAL_FEATURES); 347 347 if (general) { 348 - dev_priv->int_tv_support = general->int_tv_support; 349 - dev_priv->int_crt_support = general->int_crt_support; 350 - dev_priv->lvds_use_ssc = general->enable_ssc; 351 - dev_priv->lvds_ssc_freq = 348 + dev_priv->vbt.int_tv_support = general->int_tv_support; 349 + dev_priv->vbt.int_crt_support = general->int_crt_support; 350 + dev_priv->vbt.lvds_use_ssc = general->enable_ssc; 351 + dev_priv->vbt.lvds_ssc_freq = 352 352 intel_bios_ssc_frequency(dev, general->ssc_freq); 353 - dev_priv->display_clock_mode = general->display_clock_mode; 354 - dev_priv->fdi_rx_polarity_inverted = general->fdi_rx_polarity_inverted; 353 + dev_priv->vbt.display_clock_mode = general->display_clock_mode; 354 + dev_priv->vbt.fdi_rx_polarity_inverted = general->fdi_rx_polarity_inverted; 355 355 DRM_DEBUG_KMS("BDB_GENERAL_FEATURES int_tv_support %d int_crt_support %d lvds_use_ssc %d lvds_ssc_freq %d display_clock_mode %d fdi_rx_polarity_inverted %d\n", 356 - dev_priv->int_tv_support, 357 - dev_priv->int_crt_support, 358 - dev_priv->lvds_use_ssc, 359 - dev_priv->lvds_ssc_freq, 360 - dev_priv->display_clock_mode, 361 - dev_priv->fdi_rx_polarity_inverted); 356 + dev_priv->vbt.int_tv_support, 357 + dev_priv->vbt.int_crt_support, 358 + dev_priv->vbt.lvds_use_ssc, 359 + dev_priv->vbt.lvds_ssc_freq, 360 + dev_priv->vbt.display_clock_mode, 361 + dev_priv->vbt.fdi_rx_polarity_inverted); 362 362 } 363 363 } 364 364 ··· 375 375 int bus_pin = general->crt_ddc_gmbus_pin; 376 376 DRM_DEBUG_KMS("crt_ddc_bus_pin: %d\n", bus_pin); 377 377 if (intel_gmbus_is_port_valid(bus_pin)) 378 - dev_priv->crt_ddc_pin = bus_pin; 378 + dev_priv->vbt.crt_ddc_pin = bus_pin; 379 379 } else { 380 380 DRM_DEBUG_KMS("BDB_GD too small (%d). Invalid.\n", 381 381 block_size); ··· 486 486 487 487 if (SUPPORTS_EDP(dev) && 488 488 driver->lvds_config == BDB_DRIVER_FEATURE_EDP) 489 - dev_priv->edp.support = 1; 489 + dev_priv->vbt.edp_support = 1; 490 490 491 491 if (driver->dual_frequency) 492 492 dev_priv->render_reclock_avail = true; ··· 501 501 502 502 edp = find_section(bdb, BDB_EDP); 503 503 if (!edp) { 504 - if (SUPPORTS_EDP(dev_priv->dev) && dev_priv->edp.support) 504 + if (SUPPORTS_EDP(dev_priv->dev) && dev_priv->vbt.edp_support) 505 505 DRM_DEBUG_KMS("No eDP BDB found but eDP panel supported.\n"); 506 506 return; 507 507 } 508 508 509 509 switch ((edp->color_depth >> (panel_type * 2)) & 3) { 510 510 case EDP_18BPP: 511 - dev_priv->edp.bpp = 18; 511 + dev_priv->vbt.edp_bpp = 18; 512 512 break; 513 513 case EDP_24BPP: 514 - dev_priv->edp.bpp = 24; 514 + dev_priv->vbt.edp_bpp = 24; 515 515 break; 516 516 case EDP_30BPP: 517 - dev_priv->edp.bpp = 30; 517 + dev_priv->vbt.edp_bpp = 30; 518 518 break; 519 519 } 520 520 ··· 522 522 edp_pps = &edp->power_seqs[panel_type]; 523 523 edp_link_params = &edp->link_params[panel_type]; 524 524 525 - dev_priv->edp.pps = *edp_pps; 525 + dev_priv->vbt.edp_pps = *edp_pps; 526 526 527 - dev_priv->edp.rate = edp_link_params->rate ? DP_LINK_BW_2_7 : 527 + dev_priv->vbt.edp_rate = edp_link_params->rate ? DP_LINK_BW_2_7 : 528 528 DP_LINK_BW_1_62; 529 529 switch (edp_link_params->lanes) { 530 530 case 0: 531 - dev_priv->edp.lanes = 1; 531 + dev_priv->vbt.edp_lanes = 1; 532 532 break; 533 533 case 1: 534 - dev_priv->edp.lanes = 2; 534 + dev_priv->vbt.edp_lanes = 2; 535 535 break; 536 536 case 3: 537 537 default: 538 - dev_priv->edp.lanes = 4; 538 + dev_priv->vbt.edp_lanes = 4; 539 539 break; 540 540 } 541 541 switch (edp_link_params->preemphasis) { 542 542 case 0: 543 - dev_priv->edp.preemphasis = DP_TRAIN_PRE_EMPHASIS_0; 543 + dev_priv->vbt.edp_preemphasis = DP_TRAIN_PRE_EMPHASIS_0; 544 544 break; 545 545 case 1: 546 - dev_priv->edp.preemphasis = DP_TRAIN_PRE_EMPHASIS_3_5; 546 + dev_priv->vbt.edp_preemphasis = DP_TRAIN_PRE_EMPHASIS_3_5; 547 547 break; 548 548 case 2: 549 - dev_priv->edp.preemphasis = DP_TRAIN_PRE_EMPHASIS_6; 549 + dev_priv->vbt.edp_preemphasis = DP_TRAIN_PRE_EMPHASIS_6; 550 550 break; 551 551 case 3: 552 - dev_priv->edp.preemphasis = DP_TRAIN_PRE_EMPHASIS_9_5; 552 + dev_priv->vbt.edp_preemphasis = DP_TRAIN_PRE_EMPHASIS_9_5; 553 553 break; 554 554 } 555 555 switch (edp_link_params->vswing) { 556 556 case 0: 557 - dev_priv->edp.vswing = DP_TRAIN_VOLTAGE_SWING_400; 557 + dev_priv->vbt.edp_vswing = DP_TRAIN_VOLTAGE_SWING_400; 558 558 break; 559 559 case 1: 560 - dev_priv->edp.vswing = DP_TRAIN_VOLTAGE_SWING_600; 560 + dev_priv->vbt.edp_vswing = DP_TRAIN_VOLTAGE_SWING_600; 561 561 break; 562 562 case 2: 563 - dev_priv->edp.vswing = DP_TRAIN_VOLTAGE_SWING_800; 563 + dev_priv->vbt.edp_vswing = DP_TRAIN_VOLTAGE_SWING_800; 564 564 break; 565 565 case 3: 566 - dev_priv->edp.vswing = DP_TRAIN_VOLTAGE_SWING_1200; 566 + dev_priv->vbt.edp_vswing = DP_TRAIN_VOLTAGE_SWING_1200; 567 567 break; 568 568 } 569 569 } ··· 611 611 DRM_DEBUG_KMS("no child dev is parsed from VBT\n"); 612 612 return; 613 613 } 614 - dev_priv->child_dev = kcalloc(count, sizeof(*p_child), GFP_KERNEL); 615 - if (!dev_priv->child_dev) { 614 + dev_priv->vbt.child_dev = kcalloc(count, sizeof(*p_child), GFP_KERNEL); 615 + if (!dev_priv->vbt.child_dev) { 616 616 DRM_DEBUG_KMS("No memory space for child device\n"); 617 617 return; 618 618 } 619 619 620 - dev_priv->child_dev_num = count; 620 + dev_priv->vbt.child_dev_num = count; 621 621 count = 0; 622 622 for (i = 0; i < child_device_num; i++) { 623 623 p_child = &(p_defs->devices[i]); ··· 625 625 /* skip the device block if device type is invalid */ 626 626 continue; 627 627 } 628 - child_dev_ptr = dev_priv->child_dev + count; 628 + child_dev_ptr = dev_priv->vbt.child_dev + count; 629 629 count++; 630 630 memcpy((void *)child_dev_ptr, (void *)p_child, 631 631 sizeof(*p_child)); ··· 638 638 { 639 639 struct drm_device *dev = dev_priv->dev; 640 640 641 - dev_priv->crt_ddc_pin = GMBUS_PORT_VGADDC; 641 + dev_priv->vbt.crt_ddc_pin = GMBUS_PORT_VGADDC; 642 642 643 643 /* LFP panel data */ 644 - dev_priv->lvds_dither = 1; 645 - dev_priv->lvds_vbt = 0; 644 + dev_priv->vbt.lvds_dither = 1; 645 + dev_priv->vbt.lvds_vbt = 0; 646 646 647 647 /* SDVO panel data */ 648 - dev_priv->sdvo_lvds_vbt_mode = NULL; 648 + dev_priv->vbt.sdvo_lvds_vbt_mode = NULL; 649 649 650 650 /* general features */ 651 - dev_priv->int_tv_support = 1; 652 - dev_priv->int_crt_support = 1; 651 + dev_priv->vbt.int_tv_support = 1; 652 + dev_priv->vbt.int_crt_support = 1; 653 653 654 654 /* Default to using SSC */ 655 - dev_priv->lvds_use_ssc = 1; 656 - dev_priv->lvds_ssc_freq = intel_bios_ssc_frequency(dev, 1); 657 - DRM_DEBUG_KMS("Set default to SSC at %dMHz\n", dev_priv->lvds_ssc_freq); 655 + dev_priv->vbt.lvds_use_ssc = 1; 656 + dev_priv->vbt.lvds_ssc_freq = intel_bios_ssc_frequency(dev, 1); 657 + DRM_DEBUG_KMS("Set default to SSC at %dMHz\n", dev_priv->vbt.lvds_ssc_freq); 658 658 } 659 659 660 660 static int __init intel_no_opregion_vbt_callback(const struct dmi_system_id *id)
+2 -2
drivers/gpu/drm/i915/intel_crt.c
··· 442 442 443 443 BUG_ON(crt->base.type != INTEL_OUTPUT_ANALOG); 444 444 445 - i2c = intel_gmbus_get_adapter(dev_priv, dev_priv->crt_ddc_pin); 445 + i2c = intel_gmbus_get_adapter(dev_priv, dev_priv->vbt.crt_ddc_pin); 446 446 edid = intel_crt_get_edid(connector, i2c); 447 447 448 448 if (edid) { ··· 648 648 int ret; 649 649 struct i2c_adapter *i2c; 650 650 651 - i2c = intel_gmbus_get_adapter(dev_priv, dev_priv->crt_ddc_pin); 651 + i2c = intel_gmbus_get_adapter(dev_priv, dev_priv->vbt.crt_ddc_pin); 652 652 ret = intel_crt_ddc_get_modes(connector, i2c); 653 653 if (ret || !IS_G4X(dev)) 654 654 return ret;
+6 -6
drivers/gpu/drm/i915/intel_display.c
··· 4242 4242 { 4243 4243 if (i915_panel_use_ssc >= 0) 4244 4244 return i915_panel_use_ssc != 0; 4245 - return dev_priv->lvds_use_ssc 4245 + return dev_priv->vbt.lvds_use_ssc 4246 4246 && !(dev_priv->quirks & QUIRK_LVDS_SSC_DISABLE); 4247 4247 } 4248 4248 ··· 4278 4278 refclk = vlv_get_refclk(crtc); 4279 4279 } else if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS) && 4280 4280 intel_panel_use_ssc(dev_priv) && num_connectors < 2) { 4281 - refclk = dev_priv->lvds_ssc_freq * 1000; 4281 + refclk = dev_priv->vbt.lvds_ssc_freq * 1000; 4282 4282 DRM_DEBUG_KMS("using SSC reference clock of %d MHz\n", 4283 4283 refclk / 1000); 4284 4284 } else if (!IS_GEN2(dev)) { ··· 5026 5026 } 5027 5027 5028 5028 if (HAS_PCH_IBX(dev)) { 5029 - has_ck505 = dev_priv->display_clock_mode; 5029 + has_ck505 = dev_priv->vbt.display_clock_mode; 5030 5030 can_ssc = has_ck505; 5031 5031 } else { 5032 5032 has_ck505 = false; ··· 5338 5338 5339 5339 if (is_lvds && intel_panel_use_ssc(dev_priv) && num_connectors < 2) { 5340 5340 DRM_DEBUG_KMS("using SSC reference clock of %d MHz\n", 5341 - dev_priv->lvds_ssc_freq); 5342 - return dev_priv->lvds_ssc_freq * 1000; 5341 + dev_priv->vbt.lvds_ssc_freq); 5342 + return dev_priv->vbt.lvds_ssc_freq * 1000; 5343 5343 } 5344 5344 5345 5345 return 120000; ··· 5618 5618 factor = 21; 5619 5619 if (is_lvds) { 5620 5620 if ((intel_panel_use_ssc(dev_priv) && 5621 - dev_priv->lvds_ssc_freq == 100) || 5621 + dev_priv->vbt.lvds_ssc_freq == 100) || 5622 5622 (HAS_PCH_IBX(dev) && intel_is_dual_link_lvds(dev))) 5623 5623 factor = 25; 5624 5624 } else if (intel_crtc->config.sdvo_tv_clock)
+9 -9
drivers/gpu/drm/i915/intel_dp.c
··· 727 727 * recomments. This means we'll up-dither 16bpp framebuffers on 728 728 * high-depth panels. 729 729 */ 730 - if (is_edp(intel_dp) && dev_priv->edp.bpp) { 730 + if (is_edp(intel_dp) && dev_priv->vbt.edp_bpp) { 731 731 DRM_DEBUG_KMS("forcing bpp for eDP panel to BIOS-provided %i\n", 732 - dev_priv->edp.bpp); 733 - bpp = dev_priv->edp.bpp; 732 + dev_priv->vbt.edp_bpp); 733 + bpp = dev_priv->vbt.edp_bpp; 734 734 } 735 735 736 736 for (; bpp >= 6*3; bpp -= 2*3) { ··· 2745 2745 struct child_device_config *p_child; 2746 2746 int i; 2747 2747 2748 - if (!dev_priv->child_dev_num) 2748 + if (!dev_priv->vbt.child_dev_num) 2749 2749 return false; 2750 2750 2751 - for (i = 0; i < dev_priv->child_dev_num; i++) { 2752 - p_child = dev_priv->child_dev + i; 2751 + for (i = 0; i < dev_priv->vbt.child_dev_num; i++) { 2752 + p_child = dev_priv->vbt.child_dev + i; 2753 2753 2754 2754 if (p_child->dvo_port == PORT_IDPD && 2755 2755 p_child->device_type == DEVICE_TYPE_eDP) ··· 2827 2827 DRM_DEBUG_KMS("cur t1_t3 %d t8 %d t9 %d t10 %d t11_t12 %d\n", 2828 2828 cur.t1_t3, cur.t8, cur.t9, cur.t10, cur.t11_t12); 2829 2829 2830 - vbt = dev_priv->edp.pps; 2830 + vbt = dev_priv->vbt.edp_pps; 2831 2831 2832 2832 /* Upper limits from eDP 1.3 spec. Note that we use the clunky units of 2833 2833 * our hw here, which are all in 100usec. */ ··· 3097 3097 } 3098 3098 3099 3099 /* fallback to VBT if available for eDP */ 3100 - if (!fixed_mode && dev_priv->lfp_lvds_vbt_mode) { 3101 - fixed_mode = drm_mode_duplicate(dev, dev_priv->lfp_lvds_vbt_mode); 3100 + if (!fixed_mode && dev_priv->vbt.lfp_lvds_vbt_mode) { 3101 + fixed_mode = drm_mode_duplicate(dev, dev_priv->vbt.lfp_lvds_vbt_mode); 3102 3102 if (fixed_mode) 3103 3103 fixed_mode->type |= DRM_MODE_TYPE_PREFERRED; 3104 3104 }
+8 -8
drivers/gpu/drm/i915/intel_lvds.c
··· 735 735 struct drm_i915_private *dev_priv = dev->dev_private; 736 736 int i; 737 737 738 - if (!dev_priv->child_dev_num) 738 + if (!dev_priv->vbt.child_dev_num) 739 739 return true; 740 740 741 - for (i = 0; i < dev_priv->child_dev_num; i++) { 742 - struct child_device_config *child = dev_priv->child_dev + i; 741 + for (i = 0; i < dev_priv->vbt.child_dev_num; i++) { 742 + struct child_device_config *child = dev_priv->vbt.child_dev + i; 743 743 744 744 /* If the device type is not LFP, continue. 745 745 * We have to check both the new identifiers as well as the ··· 827 827 */ 828 828 val = I915_READ(lvds_encoder->reg); 829 829 if (!(val & ~(LVDS_PIPE_MASK | LVDS_DETECTED))) 830 - val = dev_priv->bios_lvds_val; 830 + val = dev_priv->vbt.bios_lvds_val; 831 831 832 832 return (val & LVDS_CLKB_POWER_MASK) == LVDS_CLKB_POWER_UP; 833 833 } ··· 887 887 if (HAS_PCH_SPLIT(dev)) { 888 888 if ((I915_READ(PCH_LVDS) & LVDS_DETECTED) == 0) 889 889 return false; 890 - if (dev_priv->edp.support) { 890 + if (dev_priv->vbt.edp_support) { 891 891 DRM_DEBUG_KMS("disable LVDS for eDP support\n"); 892 892 return false; 893 893 } ··· 1005 1005 } 1006 1006 1007 1007 /* Failed to get EDID, what about VBT? */ 1008 - if (dev_priv->lfp_lvds_vbt_mode) { 1008 + if (dev_priv->vbt.lfp_lvds_vbt_mode) { 1009 1009 DRM_DEBUG_KMS("using mode from VBT: "); 1010 - drm_mode_debug_printmodeline(dev_priv->lfp_lvds_vbt_mode); 1010 + drm_mode_debug_printmodeline(dev_priv->vbt.lfp_lvds_vbt_mode); 1011 1011 1012 - fixed_mode = drm_mode_duplicate(dev, dev_priv->lfp_lvds_vbt_mode); 1012 + fixed_mode = drm_mode_duplicate(dev, dev_priv->vbt.lfp_lvds_vbt_mode); 1013 1013 if (fixed_mode) { 1014 1014 fixed_mode->type |= DRM_MODE_TYPE_PREFERRED; 1015 1015 goto out;
+1 -1
drivers/gpu/drm/i915/intel_pm.c
··· 3889 3889 val = I915_READ(TRANS_CHICKEN2(pipe)); 3890 3890 val |= TRANS_CHICKEN2_TIMING_OVERRIDE; 3891 3891 val &= ~TRANS_CHICKEN2_FDI_POLARITY_REVERSED; 3892 - if (dev_priv->fdi_rx_polarity_inverted) 3892 + if (dev_priv->vbt.fdi_rx_polarity_inverted) 3893 3893 val |= TRANS_CHICKEN2_FDI_POLARITY_REVERSED; 3894 3894 val &= ~TRANS_CHICKEN2_FRAME_START_DELAY_MASK; 3895 3895 val &= ~TRANS_CHICKEN2_DISABLE_DEEP_COLOR_COUNTER;
+3 -3
drivers/gpu/drm/i915/intel_sdvo.c
··· 1526 1526 1527 1527 return drm_get_edid(connector, 1528 1528 intel_gmbus_get_adapter(dev_priv, 1529 - dev_priv->crt_ddc_pin)); 1529 + dev_priv->vbt.crt_ddc_pin)); 1530 1530 } 1531 1531 1532 1532 static enum drm_connector_status ··· 1809 1809 goto end; 1810 1810 1811 1811 /* Fetch modes from VBT */ 1812 - if (dev_priv->sdvo_lvds_vbt_mode != NULL) { 1812 + if (dev_priv->vbt.sdvo_lvds_vbt_mode != NULL) { 1813 1813 newmode = drm_mode_duplicate(connector->dev, 1814 - dev_priv->sdvo_lvds_vbt_mode); 1814 + dev_priv->vbt.sdvo_lvds_vbt_mode); 1815 1815 if (newmode != NULL) { 1816 1816 /* Guarantee the mode is preferred */ 1817 1817 newmode->type = (DRM_MODE_TYPE_PREFERRED |
+4 -4
drivers/gpu/drm/i915/intel_tv.c
··· 1521 1521 struct child_device_config *p_child; 1522 1522 int i, ret; 1523 1523 1524 - if (!dev_priv->child_dev_num) 1524 + if (!dev_priv->vbt.child_dev_num) 1525 1525 return 1; 1526 1526 1527 1527 ret = 0; 1528 - for (i = 0; i < dev_priv->child_dev_num; i++) { 1529 - p_child = dev_priv->child_dev + i; 1528 + for (i = 0; i < dev_priv->vbt.child_dev_num; i++) { 1529 + p_child = dev_priv->vbt.child_dev + i; 1530 1530 /* 1531 1531 * If the device type is not TV, continue. 1532 1532 */ ··· 1564 1564 return; 1565 1565 } 1566 1566 /* Even if we have an encoder we may not have a connector */ 1567 - if (!dev_priv->int_tv_support) 1567 + if (!dev_priv->vbt.int_tv_support) 1568 1568 return; 1569 1569 1570 1570 /*