1. 07 1月, 2015 1 次提交
  2. 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
  3. 03 12月, 2014 1 次提交
  4. 03 9月, 2014 1 次提交
  5. 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
  6. 26 8月, 2014 1 次提交
  7. 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
  8. 23 7月, 2014 1 次提交
  9. 23 6月, 2014 1 次提交
  10. 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
  11. 07 5月, 2014 1 次提交
  12. 05 5月, 2014 2 次提交
  13. 16 4月, 2014 1 次提交
  14. 14 4月, 2014 1 次提交
  15. 11 4月, 2014 1 次提交
  16. 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
  17. 06 3月, 2014 1 次提交
  18. 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
  19. 16 12月, 2013 1 次提交
  20. 12 12月, 2013 1 次提交
  21. 15 11月, 2013 1 次提交
  22. 05 11月, 2013 1 次提交
  23. 01 10月, 2013 6 次提交
    • 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
    • P
      drm/i915: check the DDC and AUX bits of the VBT on DDI machines · 6bf19e7c
      Paulo Zanoni 提交于
      Our code currently assumes that port X will use the DP AUX channel X
      and the DDC pin X. The VBT should tell us how things are mapped, so
      add some WARNs in case we discover our assumptions are wrong (or in
      case the VBT is just wrong, which is also perfectly possible).
      
      Why would someone wire port B to AUX C and DDC D?
      
      v2: Rebase
      v3: Convert WARNs to 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>
      6bf19e7c
    • P
      drm/i915: use the HDMI DDI buffer translations from VBT · 6acab15a
      Paulo Zanoni 提交于
      We currently use the recommended values from BSpec, but the VBT
      specifies the correct value to use for the hardware we have, so use
      it. We also fall back to the recommended value in case we can't find
      the VBT.
      
      In addition, this code also provides some infrastructure to parse more
      information about the DDI ports. There's a lot more information we
      could extract and use in the future.
      
      v2: - Move some code to init_vbt_defaults.
      v3: - Rebase
          - Clarify the "DVO Port" matching code
      v4: - Use I915_MAX_PORTS
          - Change the HAS_DDI checks
          - Replace DRM_ERROR with DRM_DEBUG_KMS
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6acab15a
    • P
      drm/i915: VBT's child_device_config changes over time · 768f69c9
      Paulo Zanoni 提交于
      We currently treat the child_device_config as a simple struct, but
      this is not correct: new BDB versions change the meaning of some
      offsets, so the struct needs to be adjusted for each version.
      
      Since there are too many changes (today we're in version 170!), making
      a big versioned union would be too complicated, so child_device_config
      is now a union of 3 things: (i) a "raw" byte array that's safe to use
      anywhere; (ii)  an "old" structure that's the one we've been using and
      should be safe to keep in the SDVO and TV code; and (iii) a "common"
      structure that should contain only fields that are common for all the
      known VBT versions.
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      768f69c9
  24. 04 9月, 2013 1 次提交
  25. 11 5月, 2013 1 次提交
  26. 18 4月, 2013 1 次提交
  27. 09 4月, 2013 1 次提交
    • B
      drm/i915: Don't touch South Display when PCH_NOP · ab5c608b
      Ben Widawsky 提交于
      Interrupts, clock gating, LVDS, and GMBUS are all within the, "this will
      be bad for CPU" range when we have PCH_NOP.
      
      There is a bit of a hack in init clock gating. We want to do most of the
      clock gating, but the part we skip will hang the system. It could
      probably be abstracted a bit better, but I don't feel it's too
      unsightly.
      
      v2: Use inverse HAS_PCH_NOP check (Jani)
      
      v3: Actually do what I claimed in v2 (spotted by Daniel)
      Merge Ivybridge IRQ handler PCH check to decrease whitespace (Daniel)
      Move LVDS bail into this patch (Ben)
      
      v4: logical rebase conflict resolution with SDEIIR (Ben)
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      
      Brush up patch a bit and resolve conflicts:
      - Adjust PCH_NOP checks due to Egbert's hpd handling rework.
      - Addd a PCH_NOP check in the irq uninstall code.
      - Resolve conflicts with Paulo's SDE irq handling race fix.
      
      v5: Drop the added hunks in the ilk irq handler again, they're bogus.
      OOps.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ab5c608b
  28. 23 11月, 2012 1 次提交
    • J
      drm/i915: do not default to 18 bpp for eDP if missing from VBT · 9a30a61f
      Jani Nikula 提交于
      commit 500a8cc4
      Author: Zhenyu Wang <zhenyuw@linux.intel.com>
      Date:   Wed Jan 13 11:19:52 2010 +0800
      
          drm/i915: parse eDP panel color depth from VBT block
      
      originally introduced parsing bpp for eDP from VBT, with a default of 18
      bpp if the eDP BIOS data block is not present. Turns out that default seems
      to break the Macbook Pro with retina display, as noted in
      
      commit 4344b813
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Fri Aug 10 11:10:20 2012 +0200
      
          drm/i915: ignore eDP bpc settings from vbt
      
      Since we can't ignore bpc settings from VBT completely after all, get rid
      of the default. Do not clamp eDP to 18 bpp by default if the eDP BDB is
      missing from VBT.
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Tested-by: NHenrik Rydberg <rydberg@euromail.se>
      [danvet: paste in the updated commit message from irc.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9a30a61f
  29. 22 11月, 2012 1 次提交
  30. 03 10月, 2012 2 次提交
  31. 27 6月, 2012 1 次提交
  32. 01 4月, 2012 1 次提交