1. 31 10月, 2019 3 次提交
  2. 02 10月, 2019 1 次提交
  3. 24 8月, 2019 1 次提交
  4. 17 8月, 2019 1 次提交
  5. 07 8月, 2019 1 次提交
  6. 17 6月, 2019 1 次提交
  7. 03 5月, 2019 1 次提交
  8. 30 4月, 2019 1 次提交
  9. 08 4月, 2019 3 次提交
  10. 27 3月, 2019 1 次提交
  11. 23 3月, 2019 2 次提交
  12. 19 3月, 2019 2 次提交
  13. 18 3月, 2019 1 次提交
    • J
      drm/i915: deprecate _SHIFT in favor of _MASK passed to accessors · 78b36b10
      Jani Nikula 提交于
      bitfield.h defines FIELD_GET() and FIELD_PREP() macros to access
      bitfields using the mask alone, with no need for separate shift. Indeed,
      the shift is redundant.
      
      We define REG_FIELD_GET() and REG_FIELD_PREP() wrappers for the above,
      in part to force u32 and for consistency with REG_BIT() and
      REG_GENMASK(), but also as we'll need to redefine REG_FIELD_PREP() in
      follow-up work to make it produce integer constant expressions.
      
      For the most part, REG_FIELD_GET() is shorter than masking followed by
      shift, and arguably has more clarity.
      
      REG_FIELD_PREP() can get more verbose than simply shifting in place, but
      it does provide masking to ensure we don't overflow the mask, something
      we usually don't bother with currently.
      
      Convert power sequencer registers as an example.
      
      v3:
      - temp variable removal (Chris)
      - rebase
      
      v2:
      - Add the REG_FIELD_GET() and REG_FIELD_PREP() wrappers to use them
        consistently from the start.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Acked-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/ab68f52e55e3961bde9458c0d85a12d98ef471df.1552657998.git.jani.nikula@intel.com
      78b36b10
  14. 24 1月, 2019 2 次提交
  15. 16 1月, 2019 2 次提交
    • L
      drm/i915: Pass down rc in intel_encoder->compute_config() · 204474a6
      Lyude Paul 提交于
      Something that I completely missed when implementing the new MST VCPI
      atomic helpers is that with those helpers, there's technically a chance
      of us having to grab additional modeset locks in ->compute_config() and
      furthermore, that means we have the potential to hit a normal modeset
      deadlock. However, because ->compute_config() only returns a bool this
      means we can't return -EDEADLK when we need to drop locks and try again
      which means we end up just failing the atomic check permanently. Whoops.
      
      So, fix this by modifying ->compute_config() to pass down an actual
      error code instead of a bool so that the atomic check can be restarted
      on modeset deadlocks.
      
      Thanks to Ville Syrjälä for pointing this out!
      
      Changes since v1:
      * Add some newlines
      * Return only -EINVAL from hsw_crt_compute_config()
      * Propogate return code from intel_dp_compute_dsc_params()
      * Change all of the intel_dp_compute_link_config*() variants
      * Don't miss if (hdmi_port_clock_valid()) branch in
        intel_hdmi_compute_config()
      
      [Cherry-picked from drm-misc-next to drm-intel-next-queued to fix
       linux-next & drm-tip conflict, while waiting for proper propagation of
       the DP MST series that this commit fixes. In hindsight, a topic branch
       might have been a better approach for it.]
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Fixes: eceae147 ("drm/dp_mst: Start tracking per-port VCPI allocations")
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109320Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190115200800.3121-1-lyude@redhat.com
      (cherry picked from commit 96550555)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Acked-by: NDaniel Vetter <daniel@ffwll.ch>
      204474a6
    • L
      drm/i915: Pass down rc in intel_encoder->compute_config() · 96550555
      Lyude Paul 提交于
      Something that I completely missed when implementing the new MST VCPI
      atomic helpers is that with those helpers, there's technically a chance
      of us having to grab additional modeset locks in ->compute_config() and
      furthermore, that means we have the potential to hit a normal modeset
      deadlock. However, because ->compute_config() only returns a bool this
      means we can't return -EDEADLK when we need to drop locks and try again
      which means we end up just failing the atomic check permanently. Whoops.
      
      So, fix this by modifying ->compute_config() to pass down an actual
      error code instead of a bool so that the atomic check can be restarted
      on modeset deadlocks.
      
      Thanks to Ville Syrjälä for pointing this out!
      
      Changes since v1:
      * Add some newlines
      * Return only -EINVAL from hsw_crt_compute_config()
      * Propogate return code from intel_dp_compute_dsc_params()
      * Change all of the intel_dp_compute_link_config*() variants
      * Don't miss if (hdmi_port_clock_valid()) branch in
        intel_hdmi_compute_config()
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Fixes: eceae147 ("drm/dp_mst: Start tracking per-port VCPI allocations")
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109320Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190115200800.3121-1-lyude@redhat.com
      96550555
  16. 15 1月, 2019 1 次提交
  17. 09 1月, 2019 1 次提交
  18. 13 12月, 2018 1 次提交
  19. 15 10月, 2018 1 次提交
  20. 10 10月, 2018 2 次提交
  21. 19 7月, 2018 1 次提交
  22. 14 7月, 2018 1 次提交
  23. 19 6月, 2018 1 次提交
  24. 14 6月, 2018 1 次提交
  25. 31 5月, 2018 1 次提交
    • J
      Revert "drm/i915/edp: Allow alternate fixed mode for eDP if available." · 368b554d
      Jani Nikula 提交于
      This reverts commit dc911f5b.
      
      Per the report, no matter what display mode you select with xrandr, the
      i915 driver will always select the alternate fixed mode. For the
      reporter this means that the display will always run at 40Hz which is
      quite annoying. This may be due to the mode comparison.
      
      But there are some other potential issues. The choice of alt_fixed_mode
      seems dubious. It's the first non-preferred mode, but there are no
      guarantees that the only difference would be refresh rate. Similarly,
      there may be more than one preferred mode in the probed modes list, and
      the commit changes the preferred mode selection to choose the last one
      on the list instead of the first.
      
      (Note that the probed modes list is the raw, unfiltered, unsorted list
      of modes from drm_add_edid_modes(), not the pretty result after a
      drm_helper_probe_single_connector_modes() call.)
      
      Finally, we already have eerily similar code in place to find the
      downclock mode for DRRS that seems like could be reused here.
      
      Back to the drawing board.
      
      Note: This is a hand-crafted revert due to conflicts. If it fails to
      backport, please just try reverting the original commit directly.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105469Reported-by: NRune Petersen <rune@megahurts.dk>
      Reported-by: NMark Spencer <n7u4722r35@ynzlx.anonbox.net>
      Fixes: dc911f5b ("drm/i915/edp: Allow alternate fixed mode for eDP if available.")
      Cc: Clint Taylor <clinton.a.taylor@intel.com>
      Cc: David Weinehall <david.weinehall@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Jim Bride <jim.bride@linux.intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: intel-gfx@lists.freedesktop.org
      Cc: <stable@vger.kernel.org> # v4.14+
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Reviewed-by: NDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180516080110.22770-1-jani.nikula@intel.com
      (cherry picked from commit d93fa1b4)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      368b554d
  26. 28 5月, 2018 2 次提交
    • C
      drm/i915/lvds: Move acpi lid notification registration to registration phase · b9eb9c92
      Chris Wilson 提交于
      Delay registering ourselves with the acpi lid notification mechanism
      until we are registering the connectors after initialisation is
      complete. This prevents a possibility of trying to handle the lid
      notification before we are ready with the danger of chasing
      uninitialised function pointers.
      
       BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
       IP:           (null)
       PGD 0 P4D 0
       Oops: 0010 [#1] PREEMPT SMP PTI
       Modules linked in: arc4(+) iwldvm(+) i915(+) mac80211 i2c_algo_bit coretemp mei_wdt iwlwifi drm_kms_helper kvm_intel wmi_bmof iTCO_wdt iTCO_vendor_support kvm snd_hda_codec_conexant snd_hda_codec_generic drm psmouse cfg80211 irqbypass input_leds pcspkr i2c_i801 snd_hda_intel snd_hda_codec thinkpad_acpi snd_hda_core mei_me lpc_ich snd_hwdep e1000e wmi nvram snd_pcm mei snd_timer shpchp ptp pps_core rfkill syscopyarea snd intel_agp sysfillrect intel_gtt soundcore sysimgblt battery led_class fb_sys_fops ac rtc_cmos agpgart evdev mac_hid acpi_cpufreq ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 fscrypto crypto_simd glue_helper cryptd aes_x86_64 xts algif_skcipher af_alg dm_crypt dm_mod sd_mod uas usb_storage serio_raw atkbd libps2 ahci libahci uhci_hcd libata scsi_mod ehci_pci
        ehci_hcd usbcore usb_common i8042 serio
       CPU: 1 PID: 378 Comm: systemd-logind Not tainted 4.16.8-1-ARCH #1
       Hardware name: LENOVO 7454CTO/7454CTO, BIOS 6DET72WW (3.22 ) 10/25/2012
       RIP: 0010:          (null)
       RSP: 0018:ffffaf4580c33a18 EFLAGS: 00010287
       RAX: 0000000000000000 RBX: ffff947533558000 RCX: 000000000000003e
       RDX: ffffffffc0aa80c0 RSI: ffffaf4580c33a3c RDI: ffff947534e4c000
       RBP: ffff947533558338 R08: ffff947534598930 R09: ffffffffc0a928b1
       R10: ffffd8f181d5fd40 R11: 0000000000000000 R12: ffffffffc0a928b1
       R13: ffff947533558368 R14: ffffffffc0a928a9 R15: ffff947534e4c000
       FS:  00007f3dc4ddb940(0000) GS:ffff947539280000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: 0000000000000000 CR3: 000000006e214000 CR4: 00000000000406e0
       Call Trace:
        ?  intel_modeset_setup_hw_state+0x385/0xf60 [i915]
        ? __intel_display_resume+0x1e/0xc0 [i915]
        ? intel_display_resume+0xcc/0x120 [i915]
        ? intel_lid_notify+0xbc/0xc0 [i915]
        ? notifier_call_chain+0x47/0x70
        ? blocking_notifier_call_chain+0x3e/0x60
        ? acpi_lid_notify_state+0x8f/0x1d0
        ? acpi_lid_update_state+0x49/0x70
        ? acpi_lid_input_open+0x60/0x90
        ? input_open_device+0x5d/0xa0
        ? evdev_open+0x1ba/0x1e0 [evdev]
        ? chrdev_open+0xa3/0x1b0
        ? cdev_put.part.0+0x20/0x20
        ? do_dentry_open+0x14c/0x300
        ? path_openat+0x30c/0x1240
        ? current_time+0x16/0x60
        ? do_filp_open+0x93/0x100
        ? __check_object_size+0xfb/0x180
        ? do_sys_open+0x186/0x210
        ? do_syscall_64+0x74/0x190
        ?  entry_SYSCALL_64_after_hwframe+0x3d/0xa2
       Code:  Bad RIP value.
       RIP:           (null) RSP: ffffaf4580c33a18
       CR2: 0000000000000000
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106559
      Fixes: c1c7af60 ("drm/i915: force mode set at lid open time")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180518074840.16194-1-chris@chris-wilson.co.uk
      Cc: stable@vger.kernel.org
      (cherry picked from commit e578a570)
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      b9eb9c92
    • O
      b3fb2273
  27. 25 5月, 2018 1 次提交
    • V
      drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present · ca3b3fa3
      Ville Syrjälä 提交于
      VBT seems to have some bits to tell us whether the internal LVDS port
      has something hooked up. In theory one might expect the VBT to not have
      a child device for the LVDS port if there's no panel hooked up, but
      in practice many VBTs still add the child device. The "LVDS config" bits
      seem more reliable though, so let's check those.
      
      So far we've used the "LVDS config" bits to check for eDP support on
      ILK+, and disable the internal LVDS when the value is 3. That value
      is actually documented as "Both internal LVDS and SDVO LVDS", but in
      practice it looks to mean "eDP" on all the ilk+ VBTs I've seen. So let's
      keep that interpretation, but for pre-ILK we will consider the value
      3 to also indicate the presence of the internal LVDS.
      
      Currently we have 25 DMI matches for the "no internal LVDS" quirk. In an
      effort to reduce that let's toss in a WARN when the DMI match and VBT
      both tell us that the internal LVDS is not present. The hope is that
      people will report a bug, and then we can just nuke the corresponding
      entry from the DMI quirk list. Credits to Jani for this idea.
      
      v2: Split the basic int_lvds_support thing to a separate patch (Jani)
      v3: Rebase
      v4: Limit this to VBT version >= 134
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Ondrej Zary <linux@rainbow-software.org>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180518150138.18361-1-ville.syrjala@linux.intel.comReviewed-by: NJani Nikula <jani.nikula@intel.com>
      ca3b3fa3
  28. 22 5月, 2018 2 次提交
  29. 19 5月, 2018 1 次提交
    • C
      drm/i915/lvds: Move acpi lid notification registration to registration phase · e578a570
      Chris Wilson 提交于
      Delay registering ourselves with the acpi lid notification mechanism
      until we are registering the connectors after initialisation is
      complete. This prevents a possibility of trying to handle the lid
      notification before we are ready with the danger of chasing
      uninitialised function pointers.
      
       BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
       IP:           (null)
       PGD 0 P4D 0
       Oops: 0010 [#1] PREEMPT SMP PTI
       Modules linked in: arc4(+) iwldvm(+) i915(+) mac80211 i2c_algo_bit coretemp mei_wdt iwlwifi drm_kms_helper kvm_intel wmi_bmof iTCO_wdt iTCO_vendor_support kvm snd_hda_codec_conexant snd_hda_codec_generic drm psmouse cfg80211 irqbypass input_leds pcspkr i2c_i801 snd_hda_intel snd_hda_codec thinkpad_acpi snd_hda_core mei_me lpc_ich snd_hwdep e1000e wmi nvram snd_pcm mei snd_timer shpchp ptp pps_core rfkill syscopyarea snd intel_agp sysfillrect intel_gtt soundcore sysimgblt battery led_class fb_sys_fops ac rtc_cmos agpgart evdev mac_hid acpi_cpufreq ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 fscrypto crypto_simd glue_helper cryptd aes_x86_64 xts algif_skcipher af_alg dm_crypt dm_mod sd_mod uas usb_storage serio_raw atkbd libps2 ahci libahci uhci_hcd libata scsi_mod ehci_pci
        ehci_hcd usbcore usb_common i8042 serio
       CPU: 1 PID: 378 Comm: systemd-logind Not tainted 4.16.8-1-ARCH #1
       Hardware name: LENOVO 7454CTO/7454CTO, BIOS 6DET72WW (3.22 ) 10/25/2012
       RIP: 0010:          (null)
       RSP: 0018:ffffaf4580c33a18 EFLAGS: 00010287
       RAX: 0000000000000000 RBX: ffff947533558000 RCX: 000000000000003e
       RDX: ffffffffc0aa80c0 RSI: ffffaf4580c33a3c RDI: ffff947534e4c000
       RBP: ffff947533558338 R08: ffff947534598930 R09: ffffffffc0a928b1
       R10: ffffd8f181d5fd40 R11: 0000000000000000 R12: ffffffffc0a928b1
       R13: ffff947533558368 R14: ffffffffc0a928a9 R15: ffff947534e4c000
       FS:  00007f3dc4ddb940(0000) GS:ffff947539280000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: 0000000000000000 CR3: 000000006e214000 CR4: 00000000000406e0
       Call Trace:
        ?  intel_modeset_setup_hw_state+0x385/0xf60 [i915]
        ? __intel_display_resume+0x1e/0xc0 [i915]
        ? intel_display_resume+0xcc/0x120 [i915]
        ? intel_lid_notify+0xbc/0xc0 [i915]
        ? notifier_call_chain+0x47/0x70
        ? blocking_notifier_call_chain+0x3e/0x60
        ? acpi_lid_notify_state+0x8f/0x1d0
        ? acpi_lid_update_state+0x49/0x70
        ? acpi_lid_input_open+0x60/0x90
        ? input_open_device+0x5d/0xa0
        ? evdev_open+0x1ba/0x1e0 [evdev]
        ? chrdev_open+0xa3/0x1b0
        ? cdev_put.part.0+0x20/0x20
        ? do_dentry_open+0x14c/0x300
        ? path_openat+0x30c/0x1240
        ? current_time+0x16/0x60
        ? do_filp_open+0x93/0x100
        ? __check_object_size+0xfb/0x180
        ? do_sys_open+0x186/0x210
        ? do_syscall_64+0x74/0x190
        ?  entry_SYSCALL_64_after_hwframe+0x3d/0xa2
       Code:  Bad RIP value.
       RIP:           (null) RSP: ffffaf4580c33a18
       CR2: 0000000000000000
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106559
      Fixes: c1c7af60 ("drm/i915: force mode set at lid open time")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180518074840.16194-1-chris@chris-wilson.co.uk
      Cc: stable@vger.kernel.org
      e578a570