1. 14 2月, 2014 9 次提交
    • D
      drm/i915: Handle set_cache_level errors in the pipe control scratch setup · a9cc726c
      Daniel Vetter 提交于
      Split out from Chris vma-bind rework.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Ben Widawsky <benjamin.widawsky@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a9cc726c
    • D
      drm/i915: split PIN_GLOBAL out from PIN_MAPPABLE · bf3d149b
      Daniel Vetter 提交于
      With abitrary pin flags it makes sense to split out a "please bind
      this into global gtt" from the "please allocate in the mappable
      range".
      
      Use this unconditionally in our global gtt pin helper since this is
      what its callers want. Later patches will drop PIN_MAPPABLE where it's
      not strictly needed.
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bf3d149b
    • D
      drm/i915: Consolidate binding parameters into flags · 1ec9e26d
      Daniel Vetter 提交于
      Anything more than just one bool parameter is just a pain to read,
      symbolic constants are much better.
      
      Split out from Chris' vma-binding rework patch.
      
      v2: Undo the behaviour change in object_pin that Chris spotted.
      
      v3: Split out misplaced hunk to handle set_cache_level errors,
      spotted by Jani.
      
      v4: Keep the current over-zealous binding logic in the execbuffer code
      working with a quick hack while the overall binding code gets shuffled
      around.
      
      v5: Reorder the PIN_ flags for more natural patch splitup.
      
      v6: Pull out the PIN_GLOBAL split-up again.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Ben Widawsky <benjamin.widawsky@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1ec9e26d
    • I
      drm/i915: sdvo: add i2c sysfs symlink to the connector's directory · 931c1c26
      Imre Deak 提交于
      This is the same what we do for DP connectors, so make things more
      consistent.
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NAntti Koskipää <antti.koskipaa@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      931c1c26
    • I
    • I
      drm/i915: dp: fix order of dp aux i2c device cleanup · 80f65de3
      Imre Deak 提交于
      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: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NAntti Koskipää <antti.koskipaa@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      80f65de3
    • I
      drm/i915: add unregister callback to connector · 4932e2c3
      Imre Deak 提交于
      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: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NAntti Koskipää <antti.koskipaa@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4932e2c3
    • P
      drm/i915: don't reference null pointer at i915_sink_crc · b6ae3c7c
      Paulo Zanoni 提交于
      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: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      [danvet: Flip around NULL check for robustness.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b6ae3c7c
    • D
      drm/i915/lvds: Remove dead code from failing case · 7fb4a3a3
      Damien Lespiau 提交于
      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: NDamien Lespiau <damien.lespiau@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7fb4a3a3
  2. 13 2月, 2014 31 次提交