1. 09 1月, 2021 1 次提交
  2. 05 1月, 2021 1 次提交
  3. 31 12月, 2020 1 次提交
  4. 05 12月, 2020 1 次提交
  5. 10 11月, 2020 1 次提交
  6. 06 11月, 2020 1 次提交
    • D
      drm/<drivers>: Constify struct drm_driver · 70a59dd8
      Daniel Vetter 提交于
      Only the following drivers aren't converted:
      - amdgpu, because of the driver_feature mangling due to virt support.
        Subsequent patch will address this.
      - nouveau, because DRIVER_ATOMIC uapi is still not the default on the
        platforms where it's supported (i.e. again driver_feature mangling)
      - vc4, again because of driver_feature mangling
      - qxl, because the ioctl table is somewhere else and moving that is
        maybe a bit too much, hence the num_ioctls assignment prevents a
        const driver structure.
      - arcpgu, because that is stuck behind a pending tiny-fication series
        from me.
      - legacy drivers, because legacy requires non-const drm_driver.
      
      Note that for armada I also went ahead and made the ioctl array const.
      
      Only cc'ing the driver people who've not been converted (everyone else
      is way too much).
      
      v2: Fix one misplaced const static, should be static const (0day)
      
      v3:
      - Improve commit message (Sam)
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: kernel test robot <lkp@intel.com>
      Acked-by: NMaxime Ripard <mripard@kernel.org>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: virtualization@lists.linux-foundation.org
      Cc: Harry Wentland <harry.wentland@amd.com>
      Cc: Leo Li <sunpeng.li@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Maxime Ripard <mripard@kernel.org>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: nouveau@lists.freedesktop.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201104100425.1922351-5-daniel.vetter@ffwll.ch
      70a59dd8
  7. 28 10月, 2020 1 次提交
  8. 21 10月, 2020 1 次提交
    • V
      drm/i915: Reorder hpd init vs. display resume · 4c8d4651
      Ville Syrjälä 提交于
      Currently we call .hpd_irq_setup() directly just before display
      resume, and follow it with another call via intel_hpd_init()
      just afterwards. Assuming the hpd pins are marked as enabled
      during the open-coded call these two things do exactly the
      same thing (ie. enable HPD interrupts). Which even makes sense
      since we definitely need working HPD interrupts for MST sideband
      during the display resume.
      
      So let's nuke the open-coded call and move the intel_hpd_init()
      call earlier. However we need to leave the poll_init_work stuff
      behind after the display resume as that will trigger display
      detection while we're resuming. We don't want that trampling over
      the display resume process. To make this a bit more symmetric
      we turn this into a intel_hpd_poll_{enable,disable}() pair.
      So we end up with the following transformation:
      intel_hpd_poll_init() -> intel_hpd_poll_enable()
      lone intel_hpd_init() -> intel_hpd_init()+intel_hpd_poll_disable()
      .hpd_irq_setup()+resume+intel_hpd_init() -> intel_hpd_init()+resume+intel_hpd_poll_disable()
      
      If we really would like to prevent all *long* HPD processing during
      display resume we'd need some kind of software mechanism to simply
      ignore all long HPDs. Currently we appear to have that just for
      fbdev via ifbdev->hpd_suspended. Since we aren't exploding left and
      right all the time I guess that's mostly sufficient.
      
      For a bit of history on this, we first got a mechanism to block
      hotplug processing during suspend in commit 15239099 ("drm/i915:
      enable irqs earlier when resuming") on account of moving the irq enable
      earlier. This then got removed in commit 50c3dc97 ("drm/fb-helper:
      Fix hpd vs. initial config races") because the fdev initial config
      got pushed to a later point. The second ad-hoc hpd_irq_setup() for
      resume was added in commit 0e32b39c ("drm/i915: add DP 1.2 MST
      support (v0.7)") to be able to do MST sideband during the resume.
      And finally we got a partial resurrection of the hpd blocking
      mechanism in commit e8a8fedd ("drm/i915: Block fbdev HPD
      processing during suspend"), but this time it only prevent fbdev
      from handling hpd while resuming.
      
      v2: Leave the poll_init_work behind
      v3: Remove the extra intel_hpd_poll_disable() from display reset (Lyude)
          Add the missing intel_hpd_poll_disable() to display init (Imre)
      
      Cc: Lyude Paul <lyude@redhat.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201013181137.30560-1-ville.syrjala@linux.intel.comReviewed-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NLyude Paul <lyude@redhat.com>
      4c8d4651
  9. 10 10月, 2020 3 次提交
  10. 06 10月, 2020 2 次提交
  11. 25 9月, 2020 1 次提交
  12. 15 9月, 2020 1 次提交
  13. 11 9月, 2020 1 次提交
  14. 07 9月, 2020 2 次提交
  15. 04 9月, 2020 4 次提交
  16. 18 8月, 2020 2 次提交
  17. 09 7月, 2020 4 次提交
  18. 23 6月, 2020 1 次提交
    • J
      drm/i915/params: switch to device specific parameters · 8a25c4be
      Jani Nikula 提交于
      Start using device specific parameters instead of module parameters for
      most things. The module parameters become the immutable initial values
      for i915 parameters. The device specific parameters in i915->params
      start life as a copy of i915_modparams. Any later changes are only
      reflected in the debugfs.
      
      The stragglers are:
      
      * i915.force_probe and i915.modeset. Needed before dev_priv is
        available. This is fine because the parameters are read-only and never
        modified.
      
      * i915.verbose_state_checks. Passing dev_priv to I915_STATE_WARN and
        I915_STATE_WARN_ON would result in massive and ugly churn. This is
        handled by not exposing the parameter via debugfs, and leaving the
        parameter writable in sysfs. This may be fixed up in follow-up work.
      
      * i915.inject_probe_failure. Only makes sense in terms of the module,
        not the device. This is handled by not exposing the parameter via
        debugfs.
      
      v2: Fix uc i915 lookup code (Michał Winiarski)
      
      Cc: Juha-Pekka Heikkilä <juha-pekka.heikkila@intel.com>
      Cc: Venkata Sandeep Dhanalakota <venkata.s.dhanalakota@intel.com>
      Cc: Michał Winiarski <michal.winiarski@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Acked-by: NMichał Winiarski <michal.winiarski@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20200618150402.14022-1-jani.nikula@intel.com
      8a25c4be
  19. 29 4月, 2020 1 次提交
  20. 18 4月, 2020 2 次提交
    • M
      drm/i915: Refactor setting dma info to a common helper · 31a02eb7
      Michael J. Ruhl 提交于
      DMA_MASK bit values are different for different generations.
      
      This will become more difficult to manage over time with the open
      coded usage of different versions of the device.
      
      Fix by:
        disallow setting of dma mask in AGP path (< GEN(5) for i915,
        add dma_mask_size to the device info configuration,
        updating open code call sequence to the latest interface,
        refactoring into a common function for setting the dma segment
        and mask info
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NMichael J. Ruhl <michael.j.ruhl@intel.com>
      cc: Brian Welty <brian.welty@intel.com>
      cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200417195107.68732-1-michael.j.ruhl@intel.com
      31a02eb7
    • J
      drm/i915: Add missing deinitialization cases of load failure · c0ff9e5e
      José Roberto de Souza 提交于
      The intel_display_power_put_async() used in TC cold sequences made
      easy to hit the missing deinitialization of driver in case of load
      failure as seen in the stack trace bellow.
      
      intel_modeset_driver_remove_noirq() had to be removed from
      i915_driver_modeset_remove_noirq() as those are different
      initialialition steps with IRQ and GEM initialization in between then.
      
      [drm:__intel_engine_init_ctx_wa [i915]] Initialized 3 context workarounds on rcs'0
      [drm:__i915_inject_probe_error [i915]] Injecting failure -19 at checkpoint 36 [__uc_init:294]
      [drm:i915_hdcp_component_unbind [i915]] I915 HDCP comp unbind
      [drm:edp_panel_vdd_off_sync [i915]] Turning [ENCODER:275:DDI A] VDD off
      [drm:edp_panel_vdd_off_sync [i915]] PP_STATUS: 0x00000000 PP_CONTROL: 0x00000060
      [drm:intel_power_well_disable [i915]] disabling AUX A
      general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b6b6b: 0000 [#1] PREEMPT SMP NOPTI
      CPU: 3 PID: 1142 Comm: kworker/u16:20 Tainted: G     U            5.6.0-CI-Patchwork_17226+ #1
      Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.R00.2457.A16.1912270059 12/27/2019
      Workqueue: events_unbound intel_display_power_put_async_work [i915]
      RIP: 0010:__intel_display_power_put_domain+0xa5/0x180 [i915]
      Code: 48 85 c0 78 54 44 89 e1 41 bd 01 00 00 00 49 c7 c4 80 44 41 a0 49 d3 e5 eb 0d 48 83 eb 10 48 3b 9d 08 ad 00 00 78 32 48 8b 03 <4c> 85 68 10 74 ea 8b 53 08 85 d2 74 2d 83 ea 01 85 d2 89 53 08 75
      RSP: 0018:ffffc9000061fdb0 EFLAGS: 00010206
      RAX: 6b6b6b6b6b6b6b6b RBX: ffff8884948f5df0 RCX: 000000000000003d
      RDX: 0000000080000001 RSI: 0000000000000000 RDI: 0000000000000000
      RBP: ffff888479be0000 R08: ffff88849a180920 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa0414480
      R13: 2000000000000000 R14: ffff888479beb320 R15: 2000000000000000
      FS:  0000000000000000(0000) GS:ffff88849ff80000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00005634fa8ed670 CR3: 0000000005610004 CR4: 0000000000760ee0
      PKRU: 55555554
      Call Trace:
       release_async_put_domains+0x9b/0x110 [i915]
       intel_display_power_put_async_work+0x91/0xf0 [i915]
       process_one_work+0x260/0x600
       ? worker_thread+0xc9/0x380
       worker_thread+0x37/0x380
       ? process_one_work+0x600/0x600
       kthread+0x119/0x130
       ? kthread_park+0x80/0x80
       ret_from_fork+0x24/0x50
      Modules linked in: i915(+) vgem snd_hda_codec_hdmi mei_hdcp x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul cdc_ether usbnet mii snd_intel_dspcfg ghash_clmulni_intel snd_hda_codec snd_hwdep snd_hda_core e1000e ptp mei_me snd_pcm pps_core mei intel_lpss_pci prime_numbers [last unloaded: i915]
      ---[ end trace b402d1b4060f8b97 ]---
      BUG: sleeping function called from invalid context at kernel/sched/completion.c:99
      in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 1142, name: kworker/u16:20
      INFO: lockdep is turned off.
      Preemption disabled at:
      [<0000000000000000>] 0x0
      CPU: 3 PID: 1142 Comm: kworker/u16:20 Tainted: G     UD           5.6.0-CI-Patchwork_17226+ #1
      Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.R00.2457.A16.1912270059 12/27/2019
      Workqueue: events_unbound intel_display_power_put_async_work [i915]
      Call Trace:
       dump_stack+0x71/0x9b
       ___might_sleep+0x178/0x260
       wait_for_completion+0x37/0x1a0
       virt_efi_query_variable_info+0x161/0x1b0
       efi_query_variable_store+0xb3/0x1a0
       ? efivar_entry_set_safe+0x19c/0x220
       efivar_entry_set_safe+0x19c/0x220
       ? efi_pstore_write+0x10b/0x150
       ? efi_pstore_write+0xa0/0x150
       efi_pstore_write+0x10b/0x150
       pstore_dump+0x123/0x340
       kmsg_dump+0x87/0x1b0
       oops_end+0x3e/0x90
       do_general_protection+0x1c3/0x2f0
       general_protection+0x2d/0x40
      RIP: 0010:__intel_display_power_put_domain+0xa5/0x180 [i915]
      Code: 48 85 c0 78 54 44 89 e1 41 bd 01 00 00 00 49 c7 c4 80 44 41 a0 49 d3 e5 eb 0d 48 83 eb 10 48 3b 9d 08 ad 00 00 78 32 48 8b 03 <4c> 85 68 10 74 ea 8b 53 08 85 d2 74 2d 83 ea 01 85 d2 89 53 08 75
      RSP: 0018:ffffc9000061fdb0 EFLAGS: 00010206
      RAX: 6b6b6b6b6b6b6b6b RBX: ffff8884948f5df0 RCX: 000000000000003d
      RDX: 0000000080000001 RSI: 0000000000000000 RDI: 0000000000000000
      RBP: ffff888479be0000 R08: ffff88849a180920 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffa0414480
      R13: 2000000000000000 R14: ffff888479beb320 R15: 2000000000000000
       release_async_put_domains+0x9b/0x110 [i915]
       intel_display_power_put_async_work+0x91/0xf0 [i915]
       process_one_work+0x260/0x600
       ? worker_thread+0xc9/0x380
       worker_thread+0x37/0x380
       ? process_one_work+0x600/0x600
       kthread+0x119/0x130
       ? kthread_park+0x80/0x80
       ret_from_fork+0x24/0x50
      ------------[ cut here ]------------
      WARNING: CPU: 3 PID: 1142 at kernel/rcu/tree_plugin.h:293 rcu_note_context_switch+0x87/0x650
      Modules linked in: i915(+) vgem snd_hda_codec_hdmi mei_hdcp x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul cdc_ether usbnet mii snd_intel_dspcfg ghash_clmulni_intel snd_hda_codec snd_hwdep snd_hda_core e1000e ptp mei_me snd_pcm pps_core mei intel_lpss_pci prime_numbers [last unloaded: i915]
      
      v2:
      - fixed handling in case of failure in drm_vblank_init()
      - moved i915_gem_driver_remove() call to before
      i915_driver_modeset_remove_noirq() this match initialization order too
      
      v3:
      - reverting call swap between i915_reset_error_state() and i915_gem_driver_remove()
      call order
      - improved label naming in i915_driver_modeset_probe_noirq()
      
      Closes: https://gitlab.freedesktop.org/drm/intel/issues/1647
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200416185841.125686-1-jose.souza@intel.com
      c0ff9e5e
  21. 26 3月, 2020 3 次提交
    • D
      drm: Garbage collect drm_dev_fini · d33b58d0
      Daniel Vetter 提交于
      It has become empty. Given the few users I figured not much point
      splitting this up.
      
      v2: Rebase over i915 changes.
      
      v3: Rebase over patch split fix.
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200323144950.3018436-26-daniel.vetter@ffwll.ch
      d33b58d0
    • D
      drm/i915: Use drmm_add_final_kfree · 7fb81e9d
      Daniel Vetter 提交于
      With this we can drop the final kfree from the release function.
      
      The mock device in the selftests needed it's pci_device split
      up from the drm_device. In the future we could simplify this again
      by allocating the pci_device as a managed allocation too.
      
      v2: I overlooked that i915_driver_destroy is also called in the
      unwind code of the error path. There we need a drm_dev_put.
      Similar for the mock object.
      
      Now the problem with that is that the drm_driver->release callbacks
      for both the real driver and the mock one assume everything has been
      set up. Hence going through that path for a partially set up driver
      will result in issues. Quickest fix is to disable the ->release() hook
      until the driver is fully initialized, and keep the onion unwinding.
      Long term would be cleanest to move everything over to drmm_ release
      actions, but that's a lot of work for a big driver like i915. Plus
      more core work needed first anyway.
      
      v3: Fix i915_drm pointer wrangling in mock_gem_device. Also switch
      over to start using drm_dev_put() to clean up even on the error path.
      Aside I think the current error path is leaking the allocation.
      
      v4: more fixes for intel-gfx-ci, some if it damage from v3 :-/
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Matthew Auld <matthew.auld@intel.com>
      Cc: Andi Shyti <andi.shyti@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
      Cc: intel-gfx@lists.freedesktop.org
      Link: https://patchwork.freedesktop.org/patch/msgid/20200323144950.3018436-9-daniel.vetter@ffwll.ch
      7fb81e9d
    • D
      drm/i915: Don't clear drvdata in ->release · 0ce542f7
      Daniel Vetter 提交于
      For two reasons:
      
      - The driver core clears this already for us after we're unloaded in
        __device_release_driver().
      
      - It's way too late, the drm_device ->release callback might massively
        outlive the underlying physical device, since a drm_device can be
        kept alive by open drm_file or well really anything else userspace
        is still hanging onto. So if we clear this ourselves, we should
        clear it in the pci ->remove callback, not in the drm_device
        ->release callback.
      
      Looking at git history this was fixed in the driver core with
      
      commit 0998d063
      Author: Hans de Goede <hdegoede@redhat.com>
      Date:   Wed May 23 00:09:34 2012 +0200
      
          device-core: Ensure drvdata = NULL when no driver is bound
      
      v2: Cite the core fix in the commit message (Chris).
      
      v3: Fix commit message and unused variable warning (Jani).
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200323144950.3018436-3-daniel.vetter@ffwll.ch
      0ce542f7
  22. 17 3月, 2020 2 次提交
  23. 03 3月, 2020 2 次提交
  24. 02 3月, 2020 1 次提交