1. 10 Oct, 2016 9 commits
    • Paulo Zanoni's avatar
      drm/i915: don't forget to set intel_crtc->dspaddr_offset on SKL+ · 9700f8b2
      Paulo Zanoni authored
      We never remembered to set it (so it was zero), but this was not a
      problem in the past due to the way handled the hardware registers.
      Unfortunately we changed how we set the hardware and forgot to set
      intel_crtc->dspaddr_offset.
      
      This started to reflect on a few kms_frontbuffer_tracking subtests
      that relied on page flips with CRTCs that don't point to the x:0,y:0
      coordinates of the frontbuffer. After the page flip the CRTC was
      showing the x:0,y:0 coordinate of the frontbuffer instead of
      x:500,y:500. This problem is present even if we don't enable FBC or
      PSR.
      
      While trying to bisect it I realized that the first bad commit
      actually just gives me a black screen for the mentioned tests instead
      of showing the wrong x:0,y:0 offsets. A few commits later the black
      screen problem goes away and we get to the point where the code is
      today, but I'll consider the black screen as the first bad commit
      since it's the point where the IGT subtests start to fail.
      
      Fixes: 6687c906 ("drm/i915: Rewrite fb rotation GTT handling")
      Testcase: kms_frontbuffer_tracking/fbc-1p-primscrn-shrfb-pgflip-blt
      Testcase: kms_frontbuffer_tracking/fbc-1p-primscrn-shrfb-evflip-blt
      Testcase: kms_frontbuffer_tracking/fbc-1p-shrfb-fliptrack
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
      Cc: drm-intel-fixes@lists.freedesktop.org
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1471644203-23463-1-git-send-email-paulo.r.zanoni@intel.com
      (cherry picked from commit 4c0b8a8b)
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      9700f8b2
    • Chris Wilson's avatar
      drm/i915: Only shrink the unbound objects during freeze · ec7ce653
      Chris Wilson authored
      At the point of creating the hibernation image, the runtime power manage
      core is disabled - and using the rpm functions triggers a warn.
      i915_gem_shrink_all() tries to unbind objects, which requires device
      access and so tries to how an rpm reference triggering a warning:
      
      [   44.235420] ------------[ cut here ]------------
      [   44.235424] WARNING: CPU: 2 PID: 2199 at drivers/gpu/drm/i915/intel_runtime_pm.c:2688 intel_runtime_pm_get_if_in_use+0xe6/0xf0
      [   44.235426] WARN_ON_ONCE(ret < 0)
      [   44.235445] Modules linked in: ctr ccm arc4 rt2800usb rt2x00usb rt2800lib rt2x00lib crc_ccitt mac80211 cmac cfg80211 btusb rfcomm bnep btrtl btbcm btintel bluetooth dcdbas x86_pkg_temp_thermal intel_powerclamp coretemp snd_hda_codec_realtek crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec_generic aesni_intel snd_hda_codec_hdmi aes_x86_64 lrw gf128mul snd_hda_intel glue_helper ablk_helper cryptd snd_hda_codec hid_multitouch joydev snd_hda_core binfmt_misc i2c_hid serio_raw snd_pcm acpi_pad snd_timer snd i2c_designware_platform 8250_dw nls_iso8859_1 i2c_designware_core lpc_ich mfd_core soundcore usbhid hid psmouse ahci libahci
      [   44.235447] CPU: 2 PID: 2199 Comm: kworker/u8:8 Not tainted 4.8.0-rc5+ #130
      [   44.235447] Hardware name: Dell Inc. XPS 13 9343/0310JH, BIOS A07 11/11/2015
      [   44.235450] Workqueue: events_unbound async_run_entry_fn
      [   44.235453]  0000000000000000 ffff8801b2f7fb98 ffffffff81306c2f ffff8801b2f7fbe8
      [   44.235454]  0000000000000000 ffff8801b2f7fbd8 ffffffff81056c01 00000a801f50ecc0
      [   44.235456]  ffff88020ce50000 ffff88020ce59b60 ffffffff81a60b5c ffffffff81414840
      [   44.235456] Call Trace:
      [   44.235459]  [<ffffffff81306c2f>] dump_stack+0x4d/0x6e
      [   44.235461]  [<ffffffff81056c01>] __warn+0xd1/0xf0
      [   44.235464]  [<ffffffff81414840>] ? i915_pm_suspend_late+0x30/0x30
      [   44.235465]  [<ffffffff81056c6f>] warn_slowpath_fmt+0x4f/0x60
      [   44.235468]  [<ffffffff814e73ce>] ? pm_runtime_get_if_in_use+0x6e/0xa0
      [   44.235469]  [<ffffffff81433526>] intel_runtime_pm_get_if_in_use+0xe6/0xf0
      [   44.235471]  [<ffffffff81458a26>] i915_gem_shrink+0x306/0x360
      [   44.235473]  [<ffffffff81343fd4>] ? pci_platform_power_transition+0x24/0x90
      [   44.235475]  [<ffffffff81414840>] ? i915_pm_suspend_late+0x30/0x30
      [   44.235476]  [<ffffffff81458dfb>] i915_gem_shrink_all+0x1b/0x30
      [   44.235478]  [<ffffffff814560b3>] i915_gem_freeze_late+0x33/0x90
      [   44.235479]  [<ffffffff81414877>] i915_pm_freeze_late+0x37/0x40
      [   44.235481]  [<ffffffff814e9b8e>] dpm_run_callback+0x4e/0x130
      [   44.235483]  [<ffffffff814ea5db>] __device_suspend_late+0xdb/0x1f0
      [   44.235484]  [<ffffffff814ea70f>] async_suspend_late+0x1f/0xa0
      [   44.235486]  [<ffffffff81077557>] async_run_entry_fn+0x37/0x150
      [   44.235488]  [<ffffffff8106f518>] process_one_work+0x148/0x3f0
      [   44.235490]  [<ffffffff8106f8eb>] worker_thread+0x12b/0x490
      [   44.235491]  [<ffffffff8106f7c0>] ? process_one_work+0x3f0/0x3f0
      [   44.235492]  [<ffffffff81074d09>] kthread+0xc9/0xe0
      [   44.235495]  [<ffffffff816e257f>] ret_from_fork+0x1f/0x40
      [   44.235496]  [<ffffffff81074c40>] ? kthread_park+0x60/0x60
      [   44.235497] ---[ end trace e438706b97c7f132 ]---
      
      Alternatively, to actually shrink everything we have to do so slightly
      earlier in the hibernation process.
      
      To keep lockdep silent, we need to take struct_mutex for the shrinker
      even though we know that we are the only user during the freeze.
      
      Fixes: 7aab2d53 ("drm/i915: Shrink objects prior to hibernation")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20160921135108.29574-2-chris@chris-wilson.co.uk
      (cherry picked from commit 6a800eab)
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      ec7ce653
    • Chris Wilson's avatar
      drm/i915: Restore current RPS state after reset · ac756941
      Chris Wilson authored
      Following commit 821ed7df ("drm/i915: Update reset path to fix
      incomplete requests") we no longer mark the context as lost on reset as
      we keep the requests (and contexts) alive. However, RPS remains reset
      and we need to restore the current state to match the in-flight
      requests.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97824
      Fixes: 821ed7df ("drm/i915: Update reset path to fix incomplete requests")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Arun Siluvery <arun.siluvery@linux.intel.com>
      Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20160921135108.29574-1-chris@chris-wilson.co.uk
      (cherry picked from commit f2a91d1a)
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      ac756941
    • Imre Deak's avatar
      drm/i915: Unlock PPS registers after GPU reset · 11dec6a2
      Imre Deak authored
      Reapply the PPS register unlock workaround after GPU reset on platforms
      where the reset clobbers the display HW state. This at least gets rid of
      the related WARN during LVDS encoder enabling on PNV.
      
      Fixes: ed6143b8 ("drm/i915/lvds: Restore initial HW state during encoder enabling")
      Reported-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1473847453-4771-1-git-send-email-imre.deak@intel.comReviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      (cherry picked from commit 51f59205)
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      11dec6a2
    • Shawn Lee's avatar
      drm/i915/backlight: setup backlight pwm alternate increment on backlight enable · 915b4179
      Shawn Lee authored
      Backlight enable is supposed to do a full setup of the backlight. We
      were missing the PWM alternate increment bit in the south chicken
      registers on lpt+ pch. This potentially caused a PWM frequency change
      when the chicken register value was lost e.g. on suspend.
      
      v2 by Jani, rebase on the patch caching alt increment
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97486
      References: https://bugs.freedesktop.org/show_bug.cgi?id=67454
      Cc: Cooper Chiou <cooper.chiou@intel.com>
      Cc: Wei Shun Chen <wei.shun.chang@intel.com>
      Cc: Gary C Wang <gary.c.wang@intel.com>
      Cc: stable@vger.kernel.org # v4.4+ 16e1203d drm/i915/backlight: setup and cache...
      Cc: stable@vger.kernel.org # v4.4+
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarShawn Lee <shawn.c.lee@intel.com>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/8265f5935bd31c039ddfc82819d26c2ca1ae9cba.1474281249.git.jani.nikula@intel.com
      (cherry picked from commit e29aff05)
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      915b4179
    • Jani Nikula's avatar
      drm/i915/backlight: setup and cache pwm alternate increment value · 16e1203d
      Jani Nikula authored
      This will also be needed later on when setting up the alternate
      increment in backlight enable.
      
      Cc: Shawn Lee <shawn.c.lee@intel.com>
      Cc: <stable@vger.kernel.org>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/9984b20bc59aee90b83caf59ce91f3fb122c9627.1474281249.git.jani.nikula@intel.com
      (cherry picked from commit 32b421e7)
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      16e1203d
    • Dave Airlie's avatar
      Merge branch 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux into drm-next · b8985785
      Dave Airlie authored
      Just some misc bug fixes for 4.9.
      
      * 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux:
        drm/amdgpu: revert "use more than 64KB fragment size if possible"
        drm/amdgpu: warn if dp aux is still attached on free
        drm/amdgpu/dce11: add missing drm_mode_config_cleanup call
        drm/amdgpu: also track late init state
        drm/amdgpu/virtual_dce: adjust config ifdef
        drm/amdgpu/vce: add support for hw config packet (v2)
        drm/amdgpu: clean up to set fw_offset as 0 twice
        drm/amdgpu: remove DRM_AMD_POWERPLAY
        drm/radeon: Prevent races on pre DCE4 between flip submission and completion.
        drm/radeon: Slightly more robust flip completion handling for < DCE-4
      b8985785
    • Dave Airlie's avatar
      Merge tag 'topic/drm-misc-2016-10-05' of git://anongit.freedesktop.org/drm-intel into drm-next · 9c704d14
      Dave Airlie authored
      Another attempt, this time rebased and without the pipe crc patches:
      - display_info cleanups from Ville
      - make prime/gem lookups faster with rbtrees (Chris)
      - misc stuff all over
      
      * tag 'topic/drm-misc-2016-10-05' of git://anongit.freedesktop.org/drm-intel:
        drm/rockchip: analogix_dp: Refuse to enable PSR if panel doesn't support it
        drm/bridge: analogix_dp: Add analogix_dp_psr_supported
        drm/fb-helper: add DRM_FB_HELPER_DEFAULT_OPS for fb_ops
        drm: Document caveats around atomic event handling
        uapi: add missing install of sync_file.h
        drm: Simplify drm_printk to reduce object size quite a bit
        drm/i915: Account for sink max TMDS clock when checking the port clock
        drm/i915: Replace a bunch of connector->base.display_info with a local variable
        drm/edid: Move dvi_dual/max_tmds_clock parsing out from drm_edid_to_eld()
        drm/edid: Clear the old cea_rev when there's no CEA extension in the new EDID
        drm/edid: Reduce the number of times we parse the CEA extension block
        drm/edid: Don't pass around drm_display_info needlessly
        drm/edid: Move dvi_dual/max_tmds_clock to drm_display_info
        drm/edid: Make max_tmds_clock kHz instead of MHz
        drm/edid: Clear old dvi_dual/max_tmds_clock before parsing the new EDID
        drm/edid: Clear old audio latency values before parsing the new EDID
        drm: Convert prime dma-buf <-> handle to rbtree
        drm/mediatek: mark symbols static where possible
        drm/rockchip: mark symbols static where possible
        drm/rockchip: add missing header dependencies
      9c704d14
    • Dave Airlie's avatar
      Merge tag 'drm-vc4-next-2016-10-06' of https://github.com/anholt/linux into drm-next · a74feb65
      Dave Airlie authored
      This pull request brings in several fixes for drm-next, mostly for
      HDMI.
      
      * tag 'drm-vc4-next-2016-10-06' of https://github.com/anholt/linux:
        drm/vc4: Add support for double-clocked modes.
        drm/vc4: Set up the AVI and SPD infoframes.
        drm/vc4: Fix support for interlaced modes on HDMI.
        drm/vc4: Increase timeout for HDMI_SCHEDULER_CONTROL changes.
        drm/vc4: Fall back to using an EDID probe in the absence of a GPIO.
        drm/vc4: Enable limited range RGB output on HDMI with CEA modes.
        drm/vc4: Fix races when the CS reads from render targets.
        drm/vc4: cleanup with list_first_entry_or_null()
      a74feb65
  2. 06 Oct, 2016 12 commits
  3. 04 Oct, 2016 19 commits