1. 16 12月, 2015 2 次提交
  2. 02 12月, 2015 1 次提交
    • V
      drm/i915: Check VBT for CRT port presence on HSW/BDW · e4abb733
      Ville Syrjälä 提交于
      Unfortunatey there appear to quite a few HSW/BDW machines (eg.
      NUCs, Brix Pro) in the wild with LPT/WPT-H that have no physical
      CRT connector and non-working FDI. FDI training fails every
      single time on these machines. Dunno, maybe they just didn't
      bother wiring it up or something?
      
      Unfortunately all the fuse bits and whatnot are telling us that
      the CRT connector is present. And so what we get from this is tons
      of false positives from the CI systems due to VGA connector forcing.
      
      I've not found any way to detect this purely from hardware, so we
      have to resort to looking at the VBT int_crt_support bit. We used
      to check this bit on all platforms, but that broke all the old
      machines, so the check was then restricted to VLV only in
      commit 84b4e042 ("drm/i915: only apply crt_present check on VLV")
      
      Considering HSW and VLV VBT probably got defined around the same time,
      it should be reasonably safe to assume that the bits is sane for
      HSW/BDW as well. At least I have one copy of some VBT spec here that
      says it's meant for both VLV and HSW, and it knows about the bit
      (lists it being valid from version 155 onwards). Also I have two
      desktop machines with actual CRT ports and both have
      int_crt_support==1 in their VBTs.
      
      Also we already trust VBT >= 155 to tell us various details about
      the DDI ports, so trusting it a bit more seems reasonable.
      
      As far as VLV goes, the added VBT version check should be fine. Even
      if someone has some weird VLV machine with a very old VBT version,
      it just means they'll end up with a shadow CRT connector. IIRC the
      reason for eliminating the shadow CRT connector on VLV was to speed
      up display probing rather than fixing something more serious.
      
      v2: Move the platform checks into the VBT parsing code
          Also check that the VBT version is at least 155
      v3: Improve commit message (Paulo)
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1449005493-15487-1-git-send-email-ville.syrjala@linux.intel.com
      e4abb733
  3. 13 10月, 2015 1 次提交
  4. 23 9月, 2015 1 次提交
    • J
      drm/i915/bios: handle MIPI Sequence Block v3+ gracefully · cd67d226
      Jani Nikula 提交于
      The VBT MIPI Sequence Block version 3 has forward incompatible changes:
      
      First, the block size in the header has been specified reserved, and the
      actual size is a separate 32-bit value within the block. The current
      find_section() function to will only look at the size in the block
      header, and, depending on what's in that now reserved size field,
      continue looking for other sections in the wrong place.
      
      Fix this by taking the new block size field into account. This will
      ensure that the lookups for other sections will work properly, as long
      as the new 32-bit size does not go beyond the opregion VBT mailbox size.
      
      Second, the contents of the block have been completely
      changed. Gracefully refuse parsing the yet unknown data version.
      
      Cc: Deepak M <m.deepak@intel.com>
      Cc: stable@vger.kernel.org
      Reviewed-by: NDeepak M <m.deepak@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      cd67d226
  5. 04 9月, 2015 1 次提交
  6. 31 8月, 2015 2 次提交
  7. 24 8月, 2015 2 次提交
    • D
      drm/i915: Allow parsing of variable size child device entries from VBT · e2d6cf7f
      David Weinehall 提交于
      VBT version 196 increased the size of common_child_dev_config. The
      parser code assumed that the size of this structure would not change.
      
      The modified code now copies the amount needed based on the VBT version,
      and emits a debug message if the VBT version is unknown (too new); since
      the struct config block won't shrink in newer versions it should be
      harmless to copy the maximum known size in such cases, so that's what we
      do, but emitting the warning is probably sensible anyway.
      
      In the longer run it might make sense to modify the parser code to use a
      version/feature mapping, rather than hardcoding things like this, but
      for now the variants are fairly manageable.
      
      This fixes a regression introduced in
      
      commit 75067dde
      Author: Antti Koskipaa <antti.koskipaa@linux.intel.com>
      Date:   Fri Jul 10 14:10:55 2015 +0300
      
          drm/i915: Per-DDI I_boost override
      
      since that commit changed the child device config size without updating
      the checks and memcpy.
      
      v2: Stricter size checks
      
      v3 by Jani:
      - Keep the checks strict, and warnigns verbose, but keep going anyway.
      - Take care to copy the max amount of child device config we can.
      - Fix the messages.
      Signed-off-by: NDavid Weinehall <david.weinehall@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      e2d6cf7f
    • J
      drm/i915: fix VBT parsing for SDVO child device mapping · 6cc38aca
      Jani Nikula 提交于
      commit 75067dde
      Author: Antti Koskipaa <antti.koskipaa@linux.intel.com>
      Date:   Fri Jul 10 14:10:55 2015 +0300
      
          drm/i915: Per-DDI I_boost override
      
      increased size of union child_device_config without taking into account
      the size check in parse_sdvo_device_mapping(). Switch the function over
      to using the legacy struct only.
      
      Fixes: 75067dde ("drm/i915: Per-DDI I_boost override")
      Cc: Antti Koskipaa <antti.koskipaa@linux.intel.com>
      Cc: David Weinehall <david.weinehall@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Tested-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      6cc38aca
  8. 19 8月, 2015 1 次提交
    • J
      Revert "drm/i915: Allow parsing of variable size child device entries from VBT" · bf1a5fd2
      Jani Nikula 提交于
      This reverts
      
      commit 047fe6e6
      Author: David Weinehall <david.weinehall@linux.intel.com>
      Date:   Tue Aug 4 16:55:52 2015 +0300
      
          drm/i915: Allow parsing of variable size child device entries from VBT
      
      That commit is not valid for v4.2, however it will be valid for v4.3. It
      was simply queued too early.
      
      The referenced regressing commit is just fine until the size of struct
      common_child_dev_config changes, and that won't happen until
      v4.3. Indeed, the expected size checks here rely on the increased size
      of the struct, breaking new platforms.
      
      Fixes: 047fe6e6 ("drm/i915: Allow parsing of variable size child device entries from VBT")
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: David Weinehall <david.weinehall@linux.intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      bf1a5fd2
  9. 15 8月, 2015 1 次提交
  10. 14 8月, 2015 1 次提交
  11. 06 8月, 2015 1 次提交
    • D
      drm/i915: Allow parsing of variable size child device entries from VBT · 047fe6e6
      David Weinehall 提交于
      VBT version 196 increased the size of common_child_dev_config. The parser
      code assumed that the size of this structure would not change.
      
      The modified code now copies the amount needed based on the VBT version,
      and emits a debug message if the VBT version is unknown (too new);
      since the struct config block won't shrink in newer versions it should
      be harmless to copy the maximum known size in such cases, so that's
      what we do, but emitting the warning is probably sensible anyway.
      
      In the longer run it might make sense to modify the parser code to
      use a version/feature mapping, rather than hardcoding things like this,
      but for now the variants are fairly managable.
      
      This fixes a regression introduced in
      
      commit 90e4f159
      Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Date:   Wed Mar 25 18:45:58 2015 +0200
      
          drm/i915: Fix the VBT child device parsing for BSW
      
      since we're hitting a DRM_ERROR on older platforms with this.
      
      v2: Stricter size checks
      Signed-off-by: NDavid Weinehall <david.weinehall@linux.intel.com>
      [danvet: Fixup format string.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      047fe6e6
  12. 24 6月, 2015 1 次提交
  13. 20 5月, 2015 5 次提交
  14. 08 5月, 2015 1 次提交
  15. 10 4月, 2015 1 次提交
    • V
      drm/i915: Fix the VBT child device parsing for BSW · 90e4f159
      Ville Syrjälä 提交于
      Recent BSW VBT has a VBT child device size 37 bytes instead of the 33
      bytes our code assumes. This means we fail to parse the VBT and thus
      fail to detect eDP ports properly and just register them as DP ports
      instead.
      
      Fix it up by using the reported child device size from the VBT instead
      of assuming it matches out struct defintions.
      
      The latest spec I have shows that the child device size should be 36
      bytes for rev >= 195, however on my BSW the size is actually 37 bytes.
      And our current struct definition is 33 bytes.
      
      Feels like the entire VBT parses would need to be rewritten to handle
      changes in the layout better, but for now I've decided to do just the
      bare minimum to get my eDP port back.
      
      Cc: Vijay Purushothaman <vijay.a.purushothaman@linux.intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      90e4f159
  16. 01 4月, 2015 3 次提交
  17. 25 2月, 2015 1 次提交
  18. 07 1月, 2015 1 次提交
  19. 15 12月, 2014 1 次提交
    • D
      drm/i915: Parsing LFP brightness control from VBT · 371abae8
      Deepak M 提交于
      LFP brighness control from the VBT block 43 indicates which
      controller is used for brightness.
      LFP1 brightness control method:
      Bit 7-4 = This field controller number of the brightnes controller.
      0 = Controller 0
      1 = Controller 1
      2 = Controller 2
      3 = Controller 3
      Others = Reserved
      Bits 3-0 = This field specifies the brightness control pin to be used on the
      platform.
      0 = PMIC pin is used for brightness control
      1 = LPSS PWM is used for brightness control
      2 = Display DDI is used for brightness control
      3 = CABC method to control brightness
      Others = Reserved
      
      Adding the above fields in dev_priv->vbt and corresponding changes in
      parse_backlight()
      
      v2: Jani's review comments addressed
      	- Move PWM definitions to intel_bios.h
      	- Moving vbt_version to intel_vbt_data
      	- Rename brightness to bl_ctrl_data
      	- Logging just control_pin instead of string
      	- Avoid adding vbt_version in dev_priv
      	- Since only DDI option is available as of now, let control pin DDI
      	affect dev_priv->vbt.backlight.present
      
      v3: Jani's review comments addressed
      	- Drop control_pin
      	- Use bdb->version
      	- set controller to 0 instead of using control pin define
      	- check controller bounds
      	- remove superfluous changes in intel_parse_bios
      Signed-off-by: NDeepak M <m.deepak@intel.com>
      Signed-off-by: NVandana Kannan <vandana.kannan@intel.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      371abae8
  20. 03 12月, 2014 1 次提交
  21. 03 9月, 2014 1 次提交
  22. 28 8月, 2014 1 次提交
    • M
      drm/i915: Remove bogus __init annotation from DMI callbacks · bbe1c274
      Mathias Krause 提交于
      The __init annotations for the DMI callback functions are wrong as this
      code can be called even after the module has been initialized, e.g. like
      this:
      
        # echo 1 > /sys/bus/pci/devices/0000:00:02.0/remove
        # modprobe i915
        # echo 1 > /sys/bus/pci/rescan
      
      The first command will remove the PCI device from the kernel's device
      list so the second command won't see it right away. But as it registers
      a PCI driver it'll see it on the third command. If the system happens to
      match one of the DMI table entries we'll try to call a function in long
      released memory and generate an Oops, at best.
      
      Fix this by removing the bogus annotation.
      
      Modpost should have caught that one but it ignores section reference
      mismatches from the .rodata section. :/
      
      Fixes: 25e341cf ("drm/i915: quirk away broken OpRegion VBT")
      Fixes: 8ca4013d ("CHROMIUM: i915: Add DMI override to skip CRT...")
      Fixes: 425d244c ("drm/i915: ignore LVDS on intel graphics systems...")
      Signed-off-by: NMathias Krause <minipli@googlemail.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Duncan Laurie <dlaurie@chromium.org>
      Cc: Jarod Wilson <jarod@redhat.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>	# Can modpost be fixed?
      Cc: stable@vger.kernel.org
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      bbe1c274
  23. 26 8月, 2014 1 次提交
  24. 08 8月, 2014 2 次提交
    • D
      drm/i915: Gather the HDMI level shifter logic into one place · ce4dd49e
      Damien Lespiau 提交于
      The knowledge about the HDMI/DVI DDI translation table was scattered
      around.
        - info->hdmi_level_shift was initialized with 6, the index of the 800
          mV, 0dB translation
        - A check on the VBT value was done to ensure it wasn't overflowing
          the translation table (< 0xC)
        - The actual programming was done in intel_ddi.c
      
      As we need to change that knowledge for Broadwell, let's gather
      everything into one place.
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ce4dd49e
    • R
      drm/i915: Fix crash when failing to parse MIPI VBT · ed3b6679
      Rafael Barbalho 提交于
      This particular nasty presented itself while trying to register the
      intelfb device (intel_fbdev.c). During the process of registering the device
      the driver will disable the crtc via i9xx_crtc_disable. These will
      also disable the panel using the generic mipi panel functions in
      dsi_mod_vbt_generic.c. The stale MIPI generic data sequence pointers would
      cause a crash within those functions. However, all of this is happening
      while console_lock is held from do_register_framebuffer inside fbcon.c. Which
      means that you got kernel log and just the device appearing to reboot/hang for
      no apparent reason.
      
      The fault started from the FB_EVENT_FB_REGISTERED event using the
      fb_notifier_call_chain call in fbcon.c.
      
      This regression has been introduced in
      
      commit d3b542fc
      Author: Shobhit Kumar <shobhit.kumar@intel.com>
      Date:   Mon Apr 14 11:00:34 2014 +0530
      
          drm/i915: Add parsing support for new MIPI blocks in VBT
      
      Cc: Shobhit Kumar <shobhit.kumar@intel.com>
      Signed-off-by: NRafael Barbalho <rafael.barbalho@intel.com>
      Reviewed-by: NShobhit Kumar <shobhit.kumar@intel.com>
      [danvet: Add regression citation.]
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ed3b6679
  25. 23 7月, 2014 1 次提交
  26. 23 6月, 2014 1 次提交
  27. 05 6月, 2014 1 次提交
    • S
      drm/i915: Detect if MIPI panel based on VBT and initialize only if present · 3e6bd011
      Shobhit Kumar 提交于
      It seems by default the VBT has MIPI configuration block as well. The
      Generic driver will assume always MIPI if MIPI configuration block is found.
      This is causing probelm when actually there is eDP. Fix this by looking
      into general definition block which will have device configurations. From here
      we can figure out what is the LFP type and initialize MIPI only if MIPI
      is found.
      
      v2: Addressed review comments by Damien
          - Moved PORT definitions to intel_bios.h and renamed as DVO_PORT_MIPIA
          - renamed is_mipi to has_mipi and moved definition as suggested
          - Check has_mipi inside parse_mipi and intel_dsi_init insted of outside
      
      v3: Make has_mipi as a bitfield as suggested
      Signed-off-by: NShobhit Kumar <shobhit.kumar@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      [danvet: fold in conditions to pack everything neatly below 80 chars.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3e6bd011
  28. 07 5月, 2014 1 次提交
  29. 05 5月, 2014 2 次提交