1. 14 Feb, 2014 2 commits
    • Imre Deak's avatar
      drm/i915: dp: fix order of dp aux i2c device cleanup · 80f65de3
      Imre Deak authored
      Atm we set the parent of the dp i2c device to be the correspondig
      connector device. During driver cleanup we first remove the connector
      device through intel_modeset_cleanup()->drm_sysfs_connector_remove() and
      only after that the i2c device through the encoder's destroy callback.
      This order is not supported by the device core and we'll get a warning,
      see the below bugzilla ticket. The proper order is to remove first any
      child device and only then the parent device.
      
      The first part of the fix changes the i2c device's parent to be the drm
      device. Its logical owner is not the connector anyway, but the encoder.
      Since the encoder doesn't have a device object, the next best choice is
      the drm device. This is the same what we do in the case of the sdvo i2c
      device and what the nouveau driver does.
      
      The second part creates a symlink in the connector's sysfs directory
      pointing to the i2c device. This is so, that we keep the current ABI,
      which also makes sense in case someone wants to look up the i2c device
      belonging to a specific connector.
      
      Reference: http://lists.freedesktop.org/archives/intel-gfx/2014-January/038782.html
      Reference: http://lists.freedesktop.org/archives/intel-gfx/2014-February/039427.html
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70523Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Reviewed-by: default avatarAntti Koskipää <antti.koskipaa@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      80f65de3
    • Imre Deak's avatar
      drm/i915: add unregister callback to connector · 4932e2c3
      Imre Deak authored
      Since
      
      commit d9255d57
      Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Date:   Thu Sep 26 20:05:59 2013 -0300
      
      it became clear that we need to separate the unload sequence into two
      parts:
      
      1. remove all interfaces through which new operations on some object
         (crtc, encoder, connector) can be started and make sure all pending
         operations are completed
      2. do the actual tear down of the internal representation of the above
         objects
      
      The above commit achieved this separation for connectors by splitting
      out the sysfs removal part from the connector's destroy callback and
      doing this removal before calling drm_mode_config_cleanup() which does
      the actual tear-down of all the drm objects.
      
      Since we'll have to customize the interface removal part for different
      types of connectors in the upcoming patches, add a new unregister
      callback and move the interface removal part to it.
      
      No functional change.
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Reviewed-by: default avatarAntti Koskipää <antti.koskipaa@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      4932e2c3
  2. 13 Feb, 2014 5 commits
    • Paulo Zanoni's avatar
      drm/i915: don't reference null pointer at i915_sink_crc · b6ae3c7c
      Paulo Zanoni authored
      Reproducible by runtime suspending a Haswell machine with eDP + HDMI
      outputs connected.
      
      [  209.600086] [drm:i915_runtime_suspend], Suspending device
      [  209.688435] BUG: unable to handle kernel NULL pointer dereference at 0000000000000060
      [  209.688500] IP: [<ffffffffa0109d4e>] i915_sink_crc+0x6e/0xf0 [i915]
      [  209.688577] PGD 36aba067 PUD 35d7f067 PMD 0
      [  209.688613] Oops: 0000 [#1] SMP
      [  209.688641] Modules linked in: fuse ip6table_filter ip6_tables ebtable_nat ebtables iTCO_wdt iTCO_vendor_support x86_pkg_temp_thermal coretemp microcode serio_raw e1000e pcspkr i2c_i801 ptp mei_me mei lpc_ich mfd_core pps_core dm_crypt i915 i2c_algo_bit crc32_pclmul drm_kms_helper crc32c_intel drm ghash_clmulni_intel video
      [  209.688893] CPU: 1 PID: 1797 Comm: pm_pc8 Not tainted 3.13.0+ #118
      [  209.688937] Hardware name: Intel Corporation Shark Bay Client platform/WhiteTip Mountain 1, BIOS HSWLPTU1.86C.0133.R00.1309172123 09/17/2013
      [  209.689023] task: ffff88007fb4b690 ti: ffff88007d9d2000 task.ti: ffff88007d9d2000
      [  209.689074] RIP: 0010:[<ffffffffa0109d4e>]  [<ffffffffa0109d4e>] i915_sink_crc+0x6e/0xf0 [i915]
      [  209.689169] RSP: 0018:ffff88007d9d3e68  EFLAGS: 00010246
      [  209.689205] RAX: 0000000000000000 RBX: ffff880036a03478 RCX: ffff8800366c9770
      [  209.689252] RDX: ffff88014325cf38 RSI: ffff88007fb4bd08 RDI: ffff88007fb4b690
      [  209.689299] RBP: ffff88007d9d3e98 R08: 0000000000000000 R09: 0000000000000000
      [  209.689346] R10: 0000000000000001 R11: 0000000000000000 R12: ffff8800366c9148
      [  209.689393] R13: 00000000ffffffed R14: ffff88007d9d3f50 R15: ffff880036a03478
      [  209.689441] FS:  00007f5a74bc29c0(0000) GS:ffff88014f240000(0000) knlGS:0000000000000000
      [  209.689494] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  209.689533] CR2: 0000000000000060 CR3: 0000000079d7e000 CR4: 00000000001407e0
      [  209.689580] Stack:
      [  209.689594]  0000000000001000 ffff880146083980 ffff880146083980 0000000000000000
      [  209.689649]  ffff880146083980 0000000000000001 ffff88007d9d3f00 ffffffff811d0744
      [  209.689702]  0000000000000046 00007fff7949fe20 ffff880036a034b8 0000000000000080
      [  209.689756] Call Trace:
      [  209.689778]  [<ffffffff811d0744>] seq_read+0x164/0x3e0
      [  209.689816]  [<ffffffff811ab165>] vfs_read+0x95/0x160
      [  209.689851]  [<ffffffff811abc79>] SyS_read+0x49/0xa0
      [  209.689888]  [<ffffffff810ef64c>] ? __audit_syscall_entry+0x9c/0xf0
      [  209.689933]  [<ffffffff81659412>] system_call_fastpath+0x16/0x1b
      
      Testcase: igt/pm_pc8 (do a full run, it will fail at the debugfs-read subtest)
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      [danvet: Flip around NULL check for robustness.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      b6ae3c7c
    • Damien Lespiau's avatar
      drm/i915/lvds: Remove dead code from failing case · 7fb4a3a3
      Damien Lespiau authored
      Coverity points out that, if we end up in the 'failed' label, that's
      precisely because we couldn't retrieve a fixed mode (ie fixed_mode is
      NULL) and then "if (fixed_mode)" is always false.
      
      Remove that dead code.
      Signed-off-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      7fb4a3a3
    • Jesse Barnes's avatar
      drm/i915: don't preserve inherited configs with nothing on v2 · 02f5eebb
      Jesse Barnes authored
      It can be corrected later and may be what was actually desired, but
      generally isn't, so if we find nothing is enabled, let the core DRM fb
      helper figure something out.
      
      v2: free the array too (Jesse)
      
      Note that this also undoes any changes in case we bail out due to hw
      cloning.
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      02f5eebb
    • Ben Widawsky's avatar
      drm/i915/bdw: Split up PPGTT cleanup · b45a6715
      Ben Widawsky authored
      This will make the code more readable, and extensible which is needed
      for upcoming feature work. Eventually, we'll do the same for init.
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      b45a6715
    • Ville Syrjälä's avatar
      drm/i915: Convert DIP port switch cases to a simple macro · 822cdc52
      Ville Syrjälä authored
      We have a couple of switch cases to compute the port value for the
      VIDEO_DIP_CTL register. Replace them with a simple macro.
      
      We do lose a few BUG() calls, but many people may consider that
      an improvement.
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      822cdc52
  3. 12 Feb, 2014 33 commits