Skip to content
  1. Jan 15, 2019
  2. Jan 11, 2019
  3. Jan 10, 2019
  4. Jan 09, 2019
    • Hans de Goede's avatar
      drm/i915/intel_dsi_vbt: Add support for PMIC MIPI sequences · 4e8052af
      Hans de Goede authored
      
      
      Add support for PMIC MIPI sequences using the new
      intel_soc_pmic_exec_mipi_pmic_seq_element function.
      
      This fixes the DSI LCD panel not lighting up when not initialized by the
      GOP (because an external monitor was connected) on GPD win and GPD pocket
      devices.
      
      Specifically the LCD panel seems to need GPIO pin 9 on the PMIC to be
      driven high, which is done through a PMIC MIPI sequence. Before this commit
      if the sequence was not executed by the GOP the pin would stay low causing
      the LCD panel to not work. Having the MIPI sequences properly control this
      GPIO should also help save some power when the panel is off.
      
      Changes in v2, v3:
      -Only changes to other patches in this patch-set
      
      Changes in v4:
      -Move decoding of the raw 15 bytes PMIC MIPI sequence element into
       i2c-address, register-address, value and mask into the mipi_exec_pmic()
       function instead of passing the raw data to
       intel_soc_pmic_exec_mipi_pmic_seq_element()
      
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190107111556.4510-5-hdegoede@redhat.com
      4e8052af
    • Hans de Goede's avatar
      ACPI / PMIC: Add generic intel_soc_pmic_exec_mipi_pmic_seq_element handling · 429188f0
      Hans de Goede authored
      
      
      Most PMIC-s use only a single i2c-address, so after verifying the
      i2c-address matches, we can simply pass the call to regmap_update_bits.
      
      This commit adds support for this and hooks this up for the xpower AXP288
      PMIC by setting the new pmic_i2c_address field.
      
      This fixes the following errors on display on / off on a Jumper Ezpad
      mini 3 and an Onda V80 plus tablet, both of which use the AXP288:
      
      intel_soc_pmic_exec_mipi_pmic_seq_element: Not implemented
      intel_soc_pmic_exec_mipi_pmic_seq_element: i2c-addr: 0x34 reg-addr ...
      [drm:mipi_exec_pmic [i915]] *ERROR* mipi_exec_pmic failed, error: -95
      
      Instead of these errors on both devices we now correctly turn on / off
      DLDO3 (through direct register manipulation). On the Onda V80 plus this
      fixes an issue with the backlight being brighter around the borders after
      an off / on cycle. This should also help to save some power when the
      display is off.
      
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190107111556.4510-4-hdegoede@redhat.com
      429188f0
    • Hans de Goede's avatar
      ACPI / PMIC: Implement exec_mipi_pmic_seq_element for CHT Whiskey Cove PMIC · 4f601682
      Hans de Goede authored
      
      
      Implement the exec_mipi_pmic_seq_element callback for the CHT Whiskey Cove
      PMIC.
      
      On some CHT devices this fixes the LCD panel not lighting up when it was
      not initialized by the GOP, because an external monitor was plugged in and
      the GOP initialized only the external monitor.
      
      Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190107111556.4510-3-hdegoede@redhat.com
      4f601682
    • Hans de Goede's avatar
      ACPI / PMIC: Add support for executing PMIC MIPI sequence elements · 7b5618f4
      Hans de Goede authored
      
      
      DSI LCD panels describe an initialization sequence in the Video BIOS
      Tables using so called MIPI sequences. One possible element in these
      sequences is a PMIC specific element of 15 bytes.
      
      Although this is not really an ACPI opregion, the ACPI opregion code is the
      closest thing we have. We need to have support for these PMIC specific MIPI
      sequence elements somwhere. Since we already instantiate a special platform
      device for Intel PMICs for the ACPI PMIC OpRegion handler to bind to,
      with PMIC specific implementations of the OpRegion, the handling of MIPI
      sequence PMIC elements fits very well in the ACPI PMIC OpRegion code.
      
      This commit adds a new intel_soc_pmic_exec_mipi_pmic_seq_element()
      function, which is to be backed by a PMIC specific
      exec_mipi_pmic_seq_element callback. This function will be called by the
      i915 code to execture MIPI sequence PMIC elements.
      
      Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190107111556.4510-2-hdegoede@redhat.com
      7b5618f4
    • Jani Nikula's avatar
      drm/i915: drop all drmP.h includes · 2f80d7bd
      Jani Nikula authored
      
      
      Needs just a few additional includes here and there.
      
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190108082709.3748-1-jani.nikula@intel.com
      2f80d7bd
    • Chris Wilson's avatar
      drm/i915: Downgrade scare message for unknown HuC firmware · f2bb09b6
      Chris Wilson authored
      
      
      If we haven't shipped and enabled firmware for a particular platform,
      there is nothing the user can do about it. Don't scare the user with an
      unactionable, unidentifiable warning!
      
      <6> [310.769452] i915 0000:00:02.0: GuC: No firmware known for this platform!
      <4> [310.769458] [drm] HuC: No firmware known for this platform!
      
      Unify both GuC/HuC messages to include the device for which we lack the
      firmware, and provide the platform name as an aide-memoire.
      
      v2: Move and refine the message to common site of intel_uc_fw_fetch.
      
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      Reviewed-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190108150246.1471-1-chris@chris-wilson.co.uk
      f2bb09b6
  5. Jan 08, 2019
    • Jani Nikula's avatar
      Ndrm/i915/debugfs: store rotation string buffer on stack · 5852a15c
      Jani Nikula authored
      
      
      Minimal change to nuke the static buf.
      
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190107145149.10069-1-jani.nikula@intel.com
      5852a15c
    • Chris Wilson's avatar
      drm/i915: Return immediately if trylock fails for direct-reclaim · d25f71a1
      Chris Wilson authored
      
      
      Ignore trying to shrink from i915 if we fail to acquire the struct_mutex
      in the shrinker while performing direct-reclaim. The trade-off being
      (much) lower latency for non-i915 clients at an increased risk of being
      unable to obtain a page from direct-reclaim without hitting the
      oom-notifier. The proviso being that we still keep trying to hard
      obtain the lock for kswapd so that we can reap under heavy memory
      pressure.
      
      v2: Taint all mutexes taken within the shrinker with the struct_mutex
      subclass as an early warning system, and drop I915_SHRINK_ACTIVE from
      vmap to reduce the number of dangerous paths. We also have to drop
      I915_SHRINK_ACTIVE from oom-notifier to be able to make the same claim
      that ACTIVE is only used from outside context, which fits in with a
      longer strategy of avoiding stalls due to scanning active during
      shrinking.
      
      The danger in using the subclass struct_mutex is that we declare
      ourselves more knowledgable than lockdep and deprive ourselves of
      automatic coverage. Instead, we require ourselves to mark up any mutex
      taken inside the shrinker in order to detect lock-inversion, and if we
      miss any we are doomed to a deadlock at the worst possible moment.
      
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190107115509.12523-1-chris@chris-wilson.co.uk
      d25f71a1
    • Jani Nikula's avatar
      Merge drm/drm-next into drm-intel-next-queued · 3eb0930a
      Jani Nikula authored
      Generally catch up with 5.0-rc1, and specifically get the changes:
      
      96d4f267 ("Remove 'type' argument from access_ok() function")
      0b2c8f8b ("i915: fix missing user_access_end() in page fault exception case")
      594cc251
      
       ("make 'user_access_begin()' do 'access_ok()'")
      
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      3eb0930a
    • Jani Nikula's avatar
      Merge tag 'topic/drmp-cleanup-2019-01-02' of... · 481975ca
      Jani Nikula authored
      Merge tag 'topic/drmp-cleanup-2019-01-02' of git://anongit.freedesktop.org/drm/drm-intel into drm-intel-next-queued
      
      Make some drm headers self-contained with includes and forward
      declarations.
      
      This topic branch has already been merged to drm-misc-next as commit
      1c95f662
      
       ("Merge tag 'topic/drmp-cleanup-2019-01-02' of
      git://anongit.freedesktop.org/drm/drm-intel into drm-misc-next"). Now
      merge it to drm-intel-next-queued to unblock some further drmP.h cleanup
      without having to wait for a backmerge.
      
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      From: Jani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/87pntfl6pa.fsf@intel.com
      481975ca
    • Chris Wilson's avatar
      drm/i915/selftests: Mark the whole mock device as DMA capable · d58f0083
      Chris Wilson authored
      
      
      Being a mock device, we suffer no DMA restrictions, so set the coherent
      mask to 64b.
      
      v2: Fix up mock_huge_selftests
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109243
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190107181856.23789-1-chris@chris-wilson.co.uk
      d58f0083
  6. Jan 07, 2019
    • Chris Wilson's avatar
      drm/i915: Report the number of closed vma held by each context in debugfs · f6e8aa38
      Chris Wilson authored
      
      
      Include the total size of closed vma when reporting the per_ctx_stats of
      debugfs/i915_gem_objects.
      
      Whilst adjusting the context tracking, note that we can simply use our
      list of contexts in i915->contexts rather than circumlocute via
      dev->filelist and the per-file context idr, with the result that we can
      show objects allocated to different vm (i.e. contexts within a file).
      
      We change the output to show every context of each client, with its own
      unique set of objects (for full-ppgtt machines, i.e. gen7+, for older
      hardware all objects are in the global gtt and so can not be associated
      with a single context). That should result in no loss of information,
      and for gen7+, no duplication of active objects.
      
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190107115509.12523-2-chris@chris-wilson.co.uk
      f6e8aa38
    • Chris Wilson's avatar
      drm/i915/hsw: Flush RING_IMR changes before changing the global GT IMR (vecs) · e4fc69f2
      Chris Wilson authored
      Haswell also requires the RING_IMR flush for its unique vebox setup to
      avoid losing interrupts, as per 476af9c2 ("drm/i915/gen6: Flush
      RING_IMR changes before changing the global GT IMR"):
      
      On Baytail, notably, we can still detect missed interrupt syndrome
      (where we never spot a completed request). In this case, it can be
      alleviated by always keeping the interrupt unmasked, implying that the
      interrupt is being lost in the window after modifying the IMR. (This is
      the reason we still have the posting reads on enable_irq, if we remove
      them we miss interrupts!) Having narrowed the issue down to the IMR,
      rather than keeping it always enabled, applying the usual posting
      read/flush of the RING_IMR before unmasking the GT IMR also seems to
      prevent the missed interrupt. So be it.
      
      References: 476af9c2
      
       ("drm/i915/gen6: Flush RING_IMR changes before changing the global GT IMR")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190105115647.4970-1-chris@chris-wilson.co.uk
      e4fc69f2
    • Chris Wilson's avatar
      drm/i915: Fixup kerneldoc for intel_device_info_runtime_init · 963cc126
      Chris Wilson authored
      
      
      CC [M]  drivers/gpu/drm/i915/intel_device_info.o
      drivers/gpu/drm/i915/intel_device_info.c:727: warning: Function parameter or member 'dev_priv' not described in 'intel_device_info_runtime_init'
      drivers/gpu/drm/i915/intel_device_info.c:727: warning: Excess function parameter 'info' description in 'intel_device_info_runtime_init'
      
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190105014652.3472-1-chris@chris-wilson.co.uk
      963cc126
    • Linus Torvalds's avatar
      Linux 5.0-rc1 · bfeffd15
      Linus Torvalds authored
      bfeffd15