1. 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
  2. 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
  3. 20 5月, 2015 5 次提交
  4. 08 5月, 2015 1 次提交
  5. 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
  6. 01 4月, 2015 3 次提交
  7. 25 2月, 2015 1 次提交
  8. 07 1月, 2015 1 次提交
  9. 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
  10. 03 12月, 2014 1 次提交
  11. 03 9月, 2014 1 次提交
  12. 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
  13. 26 8月, 2014 1 次提交
  14. 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
  15. 23 7月, 2014 1 次提交
  16. 23 6月, 2014 1 次提交
  17. 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
  18. 07 5月, 2014 1 次提交
  19. 05 5月, 2014 2 次提交
  20. 16 4月, 2014 1 次提交
  21. 14 4月, 2014 1 次提交
  22. 11 4月, 2014 1 次提交
  23. 02 4月, 2014 1 次提交
    • P
      drm/i915: Adding VBT fields to support eDP DRRS feature · 83a7280e
      Pradeep Bhat 提交于
      This patch reads the DRRS support and Mode type from VBT fields.
      The read information will be stored in VBT struct during BIOS
      parsing. The above functionality is needed for decision making
      whether DRRS feature is supported in i915 driver for eDP panels.
      This information helps us decide if seamless DRRS can be done
      at runtime to support certain power saving features. This patch
      was tested by setting necessary bit in VBT struct and merging
      the new VBT with system BIOS so that we can read the value.
      
      v2: Incorporated review comments from Chris Wilson
      Removed "intel_" as a prefix for DRRS specific declarations.
      
      v3: Incorporated Jani's review comments
      Removed function which deducts drrs mode from panel_type. Modified some
      print statements. Made changes to use DRRS_NOT_SUPPORTED as 0 instead of -1.
      
      v4: Incorporated Jani's review comments.
      Modifications around setting vbt drrs_type.
      Signed-off-by: NPradeep Bhat <pradeep.bhat@intel.com>
      Signed-off-by: NVandana Kannan <vandana.kannan@intel.com>
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      [danvet: Drop the misleading/redundant comment about the added drrs
      field in the vbt struct as discussed with Jani on irc.]
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      83a7280e
  24. 06 3月, 2014 1 次提交
  25. 28 1月, 2014 1 次提交
    • J
      drm/i915: move module parameters into a struct, in a new file · d330a953
      Jani Nikula 提交于
      With 20+ module parameters, I think referring to them via a struct
      improves clarity over just having a bunch of globals. While at it, move
      the parameter initialization and definitions into a new file
      i915_params.c to reduce clutter in i915_drv.c.
      
      Apart from the ill-named i915_enable_rc6, i915_enable_fbc and
      i915_enable_ppgtt parameters, for which we lose the "i915_" prefix
      internally, the module parameters now look the same both on the kernel
      command line and in code. For example, "i915.modeset".
      
      The downsides of the change are losing static on a couple of variables
      and not having the initialization and module_param_named() right next to
      each other. On the other hand, all module parameters are now defined in
      one place at i915_params.c. Plus you can do this to find all module
      parameter references:
      
      $ git grep "i915\." -- drivers/gpu/drm/i915
      
      v2:
      - move the definitions into a new file
      - s/i915_params/i915/
      - make i915_try_reset i915.reset, for consistency
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d330a953
  26. 16 12月, 2013 1 次提交
  27. 12 12月, 2013 1 次提交
  28. 15 11月, 2013 1 次提交
  29. 05 11月, 2013 1 次提交
  30. 01 10月, 2013 3 次提交
    • D
      drm/i915: Rip out SUPPORTS_EDP · 6fca55b1
      Daniel Vetter 提交于
      It only controls the setting of the vbt.edp_support variable, which in
      turn only controls one debug output plus can also force-disable the
      lvds output.
      
      Since the value only restricted this logic to mobile ilk there's the
      slight risk that this will break lvds on desktop ilk or on snb/ivb
      platforms. But with the vbt it's better when we know what's going on
      here, so let's rip it out and see what happens.
      
      Cc: Ben Widawsky <benjamin.widawsky@intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6fca55b1
    • P
      drm/i915: don't init DP or HDMI when not supported by DDI port · 311a2094
      Paulo Zanoni 提交于
      There's no reason to init a DP connector if the encoder just supports
      HDMI: we'll just waste hundreds and hundreds of cycles trying to do DP
      AUX transactions to detect if there's something there. Same goes for a
      DP connector that doesn't support HDMI, but I'm not sure these
      actually exist.
      
      v2: - Use bit fields
          - Remove useless identation level
          - Replace DRM_ERROR with DRM_DEBUG_KMS
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> (v1)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      311a2094
    • P
      drm/i915: add some assertions about VBT DDI port types · 554d6af5
      Paulo Zanoni 提交于
      Our code makes a lot of assumptions regarding what each DDI port
      actually supports, and the VBT should tell us what is really happening
      in the hardware. So parse the information provided by the VBT and
      check if any of our assumptions is wrong.
      
      Our driver also has a history of not really trusting the VBT, so a
      WARN here could mean that:
       a) our coding assumptions are wrong
       b) the VBT is wrong
       c) we're incorrectly parsing the VBT
       d) the checks are wrong
      
      But I really hope we won't ever trigger any of those WARNs.
      
      v2: Don't check the redundant "Capabilities" field from byte 24 since
          it doesn't seem to be used.
      v3: Rebase
      v4: Replace WARN with DRM_DEBUG_KMS
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> (v2)
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      554d6af5