1. 24 11月, 2015 5 次提交
    • R
      drm/i915: Remove PSR Perf Counter for SKL+ · 05eec3c2
      Rodrigo Vivi 提交于
      Whenever DMC firmware put the HW into DC State a bunch
      of registers including this perf counter is reset to 0.
      
      Even with PSR active and working we could still read
      "Performance_Counter: 0" what will misslead people to believe
      PSR is broken. For instance on SKL we can only see PC10
      residency with screen on if PSR is working properly.
      However Performance_Counter was showing 0.
      
      Even if it restored properly on DC6 exit we don't want to
      give users the wrong impression that PSR is not working
      while we know for sure it is.
      
      So, it is better to remove this counter information while
      we don't have a better way to track PSR residency.
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      05eec3c2
    • R
      drm/i915: PSR: Mask LPSP hw tracking back again. · bb929cbc
      Rodrigo Vivi 提交于
      When we introduced PSR we let LPSP masked allowing us to get PSR
      independently from the audio runtime PM. However in one of the
      attempts to get PSR enabled by default one user reported one specific
      case where he would miss screen updates if scrolling the firefox in a
      Gnome environment when i915 runtime pm was enabled. So for
      this specific case that (I could never create an i-g-t test case)
      we decided to remove the LPSP mask and let HW tracking taking care of
      this case. The mask got removed later by my
      commit 09108b90 ("drm/i915: PSR: Remove Low Power HW tracking mask.")
      
      So we started depending on audio driver again, what is bad.
      
      With previous commit
      "drm/i915: PSR: Let's rely more on frontbuffer tracking."
      we transfered the PSR exit responsability totally to SW frontbuffer
      tracking. So now can safelly shut off a bit the HW tracking, or
      at least this case that makes us to depend on other drivers.
      
      v2: Update commit message since this patch by itself doesn't solve
          the bugzilla entries.
      
      v3: Another attempt to improve commit message.
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Tested-by: NBrian Norris <briannorris@chromium.org>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: Damien Lespiau damien.lespiau@intel.com
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bb929cbc
    • R
      drm/i915: PSR: Let's rely more on frontbuffer tracking. · 921ec285
      Rodrigo Vivi 提交于
      The ultimate goal here is to remove the dependency we
      currently have on audio driver power to get PSR working.
      Since with audio driver runtime PM disabled the Hardware tracking
      believes graphics is fully active and prevent PSR Entry, or
      in other words continuously exit PSR.
      
      So, the idea is to transfer the PSR exit responsability
      from the HW tracking to the SW tracking (frontbuffer tracking),
      who is really mature right now.
      
      However with LPSP masked out there might be cases where we could
      miss exit from HW tracking since it can be relying on this,
      like a specific case reported at our mailing list who
      user reported he would miss screen updates if scrolling firefox
      in a Gnome environment when i915 runtimepm was enabled.
      
      So before masking out LPSP again to make us independent from
      the audio driver we need to make sure that all our cases
      are coverred from the frontbuffer tracking perspective,
      where the flush means invalidate and flush.
      
      Without this patch for HSW, BDW and SKL we just do the
      invalidate part when the flush wasn't originated by a page flip
      because we were trusting the HW tracking for the flip case.
      
      So let's rely more on frontbuffer tracking and do the
      invalidation regardless the origin as expected for all platforms.
      
      v2: Improve commit message as suggested by Paulo.
      
      v3: Another attempt to let commit message more clear.
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: Damien Lespiau damien.lespiau@intel.com
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      921ec285
    • R
      drm/i915: Remove duplicated dpcd write on hsw_psr_enable_sink. · ca1a9533
      Rodrigo Vivi 提交于
      Commit (89251b17) intended to remove this line and let only one
      DP_PSR_EN_CFG set, but it was wrong and this call is now duplicated
      at the code.
      
      Also "& ~DP_PSR_MAIN_LINK_ACTIVE" doesn't do anything at all. It
      was like that since I introduced this call but probably the idea
      was to be informative and make clear statement that we were not using
      the link standby. So it is better to remove this one here and let
      the code a bit cleaner.
      
      v2: Improve commit message as requested by Paulo.
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Tested-by: NBrian Norris <briannorris@chromium.org>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: Damien Lespiau damien.lespiau@intel.com
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ca1a9533
    • T
      drm/i915: Remove incorrect warning in context cleanup · 408952d4
      Tvrtko Ursulin 提交于
      Commit e9f24d5f
      Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Date:   Mon Oct 5 13:26:36 2015 +0100
      
          drm/i915: Clean up associated VMAs on context destruction
      
      Added a warning based on an incorrect assumption that all VMAs
      in a VM will be on the inactive list at the point last reference
      to a context and VM is dropped.
      
      This is not true because i915_gem_object_retire__read will not
      put VMA on the inactive list until all activities on the object
      in question (in all VMs) have been retired.
      
      As a consequence, whether or not a context/VM will be destroyed
      with its VMAs still on the active list, can depend on completely
      unrelated activities using the same object from a different
      context or engine.
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92638
      Testcase: igt/gem_request_retire/retire-vma-not-inactive
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Michel Thierry <michel.thierry@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1448025816-25584-1-git-send-email-tvrtko.ursulin@linux.intel.comSigned-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      408952d4
  2. 23 11月, 2015 5 次提交
  3. 21 11月, 2015 9 次提交
  4. 20 11月, 2015 14 次提交
    • A
      i2c: i801: add Intel Lewisburg device IDs · cdc5a311
      Alexandra Yates 提交于
      Adding Intel codename Lewisburg platform device IDs for SMBus.
      Signed-off-by: NAlexandra Yates <alexandra.yates@linux.intel.com>
      Reviewed-by: NJean Delvare <jdelvare@suse.de>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      cdc5a311
    • G
      i2c: fix wakeup irq parsing · c18fba23
      Grygorii Strashko 提交于
      This patch fixes obvious copy-past error in wake up irq parsing
      code which leads to the fact that dev_pm_set_wake_irq() will
      be called with wrong IRQ number when "wakeup" IRQ is not
      defined in DT.
      
      Fixes: 3fffd128 ("i2c: allow specifying separate wakeup interrupt in device tree")
      Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      Cc: <stable@vger.kernel.org> # v4.3
      c18fba23
    • L
      i2c: xiic: Prevent concurrent running of the IRQ handler and __xiic_start_xfer() · d0fe5258
      Lars-Peter Clausen 提交于
      Prior to commit e6c9a037 ("i2c: xiic: Remove the disabling of
      interrupts") IRQs where disabled when the initial __xiic_start_xfer() was
      called. After the commit the interrupt is enabled while the function is
      running, this means it is possible for the interrupt to be triggered while
      the function is still running. When this happens the internal data
      structures get corrupted and undefined behavior can occur like the
      following crash:
      
      	Internal error: Oops: 17 [#1] PREEMPT SMP ARM
      	Modules linked in:
      	CPU: 0 PID: 2040 Comm: i2cdetect Not tainted 4.0.0-02856-g047a308 #10956
      	Hardware name: Xilinx Zynq Platform
      	task: ee0c9500 ti: e99a2000 task.ti: e99a2000
      	PC is at __xiic_start_xfer+0x6c4/0x7c8
      	LR is at __xiic_start_xfer+0x690/0x7c8
      	pc : [<c02bbffc>]    lr : [<c02bbfc8>]    psr: 800f0013
      	sp : e99a3da8  ip : 00000000  fp : 00000000
      	r10: 00000001  r9 : 600f0013  r8 : f0180000
      	r7 : f0180000  r6 : c064e444  r5 : 00000017  r4 : ee031010
      	r3 : 00000000  r2 : 00000000  r1 : 600f0013  r0 : 0000000f
      	Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
      	Control: 18c5387d  Table: 29a5404a  DAC: 00000015
      	Process i2cdetect (pid: 2040, stack limit = 0xe99a2210)
      	Stack: (0xe99a3da8 to 0xe99a4000)
      	3da0:                   ee031010 00000000 00000001 ee031020 ee031224 c02bc5ec
      	3dc0: ee34c604 00000000 ee0c9500 e99a3dcc e99a3dd0 e99a3dd0 e99a3dd8 c069f0e8
      	3de0: 00000000 ee031020 c064e100 ffff90bb e99a3e48 c02b6590 ee031020 00000001
      	3e00: e99a3e48 ee031020 00000000 e99a3e63 00000001 c02b6ec4 00000000 00000000
      	3e20: 00000000 c02b7320 e99a3ef0 00000000 00000000 e99e3df0 00000000 00000000
      	3e40: 00000103 2814575f 0000003e c00a0000 e99a3e85 0001003e ee0c0000 e99a3e63
      	3e60: eefd3578 c064e61c ee0c9500 c0041e04 0000056c e9a56db8 00006e5a b6f5c000
      	3e80: ee0c9548 eefd0040 00000001 eefd3540 ee0c9500 eefd39a0 c064b540 ee0c9500
      	3ea0: 00000000 ee92b000 00000000 bef4862c ee34c600 e99ecdc0 00000720 00000003
      	3ec0: e99a2000 00000000 00000000 c02b8b30 00000000 00000000 00000000 e99a3f24
      	3ee0: b6e80000 00000000 00000000 c04257e8 00000000 e99a3f24 c02b8f08 00000703
      	3f00: 00000003 c02116bc ee935300 00000000 bef4862c ee34c600 e99ecdc0 c02b91f0
      	3f20: e99ecdc0 00000720 bef4862c eeb725f8 e99ecdc0 c00c9e2c 00000003 00000003
      	3f40: ee248dc0 00000000 ee248dc8 00000002 eeb7c1a8 00000000 00000000 c00bb360
      	3f60: 00000000 00000000 00000003 ee248dc0 bef4862c e99ecdc0 e99ecdc0 00000720
      	3f80: 00000003 e99a2000 00000000 c00c9f68 00000000 00000000 b6f22000 00000036
      	3fa0: c000dfa4 c000de20 00000000 00000000 00000003 00000720 bef4862c bef4862c
      	3fc0: 00000000 00000000 b6f22000 00000036 00000000 00000000 b6f60000 00000000
      	3fe0: 00013040 bef48614 00008cab b6ecdbe6 400f0030 00000003 2f7fd821 2f7fdc21
      	[<c02bbffc>] (__xiic_start_xfer) from [<c02bc5ec>] (xiic_xfer+0x94/0x168)
      	[<c02bc5ec>] (xiic_xfer) from [<c02b6590>] (__i2c_transfer+0x4c/0x7c)
      	[<c02b6590>] (__i2c_transfer) from [<c02b6ec4>] (i2c_transfer+0x9c/0xc4)
      	[<c02b6ec4>] (i2c_transfer) from [<c02b7320>] (i2c_smbus_xfer+0x3a0/0x4ec)
      	[<c02b7320>] (i2c_smbus_xfer) from [<c02b8b30>] (i2cdev_ioctl_smbus+0xb0/0x214)
      	[<c02b8b30>] (i2cdev_ioctl_smbus) from [<c02b91f0>] (i2cdev_ioctl+0xa0/0x1d4)
      	[<c02b91f0>] (i2cdev_ioctl) from [<c00c9e2c>] (do_vfs_ioctl+0x4b0/0x5b8)
      	[<c00c9e2c>] (do_vfs_ioctl) from [<c00c9f68>] (SyS_ioctl+0x34/0x5c)
      	[<c00c9f68>] (SyS_ioctl) from [<c000de20>] (ret_fast_syscall+0x0/0x34)
      	Code: e283300c e5843210 eafffe64 e5943210 (e1d320b4)
      
      The issue can easily be reproduced by performing I2C access under high
      system load or IO load.
      
      To fix the issue protect the invocation to __xiic_start_xfer() form
      xiic_start_xfer() with the same lock that is used to protect the interrupt
      handler.
      
      Fixes: e6c9a037 ("i2c: xiic: Remove the disabling of interrupts")
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Reviewed-by: NShubhrajyoti Datta <shubhraj@xilinx.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      d0fe5258
    • L
      i2c: Revert "i2c: xiic: Do not reset controller before every transfer" · 9656eeeb
      Lars-Peter Clausen 提交于
      Commit d701667b ("i2c: xiic: Do not reset controller before every
      transfer") removed the reinitialization of the controller before the start
      of each transfer. Apparently this change is not safe to make and the commit
      results in random I2C bus failures.
      
      An easy way to trigger the issue is to run i2cdetect.
      
      Without the patch applied:
           0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
      	 00:          -- -- -- -- -- -- -- -- -- -- -- -- --
      	 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      	 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      	 30: -- -- -- -- -- -- -- -- UU UU -- UU 3c -- -- UU
      	 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      	 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      	 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      	 70: -- -- -- -- -- -- -- --
      
      With the patch applied every other or so invocation:
           0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
      	 00:          03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
      	 10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
      	 20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
      	 30: -- -- -- -- -- -- -- -- UU UU -- UU 3c -- -- UU
      	 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      	 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      	 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      	 70: -- -- -- -- -- -- -- --
      
      So revert the commit for now.
      
      Fixes: d701667b ("i2c: xiic: Do not reset controller before every transfer")
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Acked-by: NShubhrajyoti Datta <shubhraj@xilinx.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      9656eeeb
    • H
      i2c: imx: fix a compiling error · 8bb6fd58
      Hou Zhiqiang 提交于
      drivers/i2c/busses/i2c-imx.c:978:2: error: implicit declaration of
      function ‘pinctrl_select_state’ [-Werror=implicit-function-declaration]
        pinctrl_select_state(i2c_imx->pinctrl, i2c_imx->pinctrl_pins_gpio);
        ^
      Signed-off-by: NHou Zhiqiang <Zhiqiang.Hou@freescale.com>
      Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
      8bb6fd58
    • I
      drm/i915: take a power domain reference while checking the HDMI live status · 29bb94bb
      Imre Deak 提交于
      There are platforms that don't need the full GMBUS power domain (BXT)
      while others do (PCH, VLV/CHV). For optimizing this we would need to add
      a new power domain, but it's not clear how much we would benefit given
      the short time we hold the reference. So for now let's keep things
      simple.
      
      v2:
      - fix commit message, PCH won't take any redundant power resource after
      this change (Ville)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      [fix commit message in v2 (Imre)]
      Link: http://patchwork.freedesktop.org/patch/msgid/1447959301-1263-2-git-send-email-imre.deak@intel.com
      29bb94bb
    • I
    • J
      usblp: do not set TASK_INTERRUPTIBLE before lock · 19cd80a2
      Jiri Slaby 提交于
      It is not permitted to set task state before lock. usblp_wwait sets
      the state to TASK_INTERRUPTIBLE and calls mutex_lock_interruptible.
      Upon return from that function, the state will be TASK_RUNNING again.
      
      This is clearly a bug and a warning is generated with LOCKDEP too:
      WARNING: CPU: 1 PID: 5109 at kernel/sched/core.c:7404 __might_sleep+0x7d/0x90()
      do not call blocking ops when !TASK_RUNNING; state=1 set at [<ffffffffa0c588d0>] usblp_wwait+0xa0/0x310 [usblp]
      Modules linked in: ...
      CPU: 1 PID: 5109 Comm: captmon Tainted: G        W       4.2.5-0.gef2823b-default #1
      Hardware name: LENOVO 23252SG/23252SG, BIOS G2ET33WW (1.13 ) 07/24/2012
       ffffffff81a4edce ffff880236ec7ba8 ffffffff81716651 0000000000000000
       ffff880236ec7bf8 ffff880236ec7be8 ffffffff8106e146 0000000000000282
       ffffffff81a50119 000000000000028b 0000000000000000 ffff8802dab7c508
      Call Trace:
      ...
       [<ffffffff8106e1c6>] warn_slowpath_fmt+0x46/0x50
       [<ffffffff8109a8bd>] __might_sleep+0x7d/0x90
       [<ffffffff8171b20f>] mutex_lock_interruptible_nested+0x2f/0x4b0
       [<ffffffffa0c588fc>] usblp_wwait+0xcc/0x310 [usblp]
       [<ffffffffa0c58bb2>] usblp_write+0x72/0x350 [usblp]
       [<ffffffff8121ed98>] __vfs_write+0x28/0xf0
      ...
      
      Commit 7f477358 (usblp: Implement the
      ENOSPC convention) moved the set prior locking. So move it back after
      the lock.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Fixes: 7f477358 ("usblp: Implement the ENOSPC convention")
      Acked-By: NPete Zaitcev <zaitcev@yahoo.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      19cd80a2
    • P
      usb: kconfig: fix warning of select USB_OTG · c4f16130
      Peter Chen 提交于
      When choose randconfig for kernel build, it reports below warning:
      "warning: (USB_OTG_FSM && FSL_USB2_OTG && USB_MV_OTG) selects USB_OTG
      which has unmet direct dependencies (USB_SUPPORT && USB && PM)"
      
      In fact, USB_OTG is visible symbol and depends on PM, so the driver
      needs to depend on it to reduce dependency problem.
      Signed-off-by: NPeter Chen <peter.chen@freescale.com>
      Reported-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Felipe Balbi <balbi@ti.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c4f16130
    • B
      USB: option: add XS Stick W100-2 from 4G Systems · 638148e2
      Bjørn Mork 提交于
      Thomas reports
      "
      4gsystems sells two total different LTE-surfsticks under the same name.
      ..
      The newer version of XS Stick W100 is from "omega"
      ..
      Under windows the driver switches to the same ID, and uses MI03\6 for
      network and MI01\6 for modem.
      ..
      echo "1c9e 9b01" > /sys/bus/usb/drivers/qmi_wwan/new_id
      echo "1c9e 9b01" > /sys/bus/usb-serial/drivers/option1/new_id
      
      T:  Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=  4 Spd=480 MxCh= 0
      D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
      P:  Vendor=1c9e ProdID=9b01 Rev=02.32
      S:  Manufacturer=USB Modem
      S:  Product=USB Modem
      S:  SerialNumber=
      C:  #Ifs= 5 Cfg#= 1 Atr=80 MxPwr=500mA
      I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
      I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
      I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
      I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
      I:  If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
      
      Now all important things are there:
      
      wwp0s29f7u2i3 (net), ttyUSB2 (at), cdc-wdm0 (qmi), ttyUSB1 (at)
      
      There is also ttyUSB0, but it is not usable, at least not for at.
      
      The device works well with qmi and ModemManager-NetworkManager.
      "
      Reported-by: NThomas Schäfer <tschaefer@t-online.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      638148e2
    • S
      PCI: Fix OF logic in pci_dma_configure() · 768acd64
      Suravee Suthikulpanit 提交于
      This patch fixes a bug introduced by previous commit,
      which incorrectly checkes the of_node of the end-point device.
      Instead, it should check the of_node of the host bridge.
      
      Fixes: 50230713 ("PCI: OF: Move of_pci_dma_configure() to pci_dma_configure()")
      Reported-by: NRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: NSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      768acd64
    • L
      drm/i915: Tear down fbdev if initialization fails · 366e39b4
      Lukas Wunner 提交于
      Currently if intelfb_create() errors out, it unrefs the bo even though
      the fb now owns that reference. (Spotted by Ville Syrjälä.) We should
      unref the fb instead of the bo.
      
      However the fb was not necessarily allocated by intelfb_create(),
      it could be inherited from BIOS (the fb struct was then allocated by
      dev_priv->display.get_initial_plane_config()) and be in active use by
      a crtc. In this case we should call drm_framebuffer_remove() instead
      of _unreference() to also disable the crtc.
      
      Daniel Vetter suggested that "fbdev teardown code will take care of it.
      The correct approach is probably to not unref anything at all".
      
      But if fbdev initialization fails, the fbdev isn't torn down and
      occupies memory even though it's unusable. Therefore clobber it in
      intel_fbdev_initial_config(). (Currently we ignore a negative return
      value there.) The idea is that if fbdev initialization fails, the driver
      behaves as if CONFIG_DRM_FBDEV_EMULATION wasn't set. Should X11 manage
      to start up without errors, it will at least be able to use the memory
      that would otherwise be hogged by the unusable fbdev.
      
      Also, log errors in intelfb_create().
      
      Don't call async_synchronize_full() in intel_fbdev_fini() when called
      from intel_fbdev_initial_config() to avoid deadlock.
      
      v2: Instead of calling drm_framebuffer_unreference() (if fb was not
          inherited from BIOS), call intel_fbdev_fini().
      
      v3: Rebase on e00bf696 (drm/i915: Move the fbdev async_schedule()
          into intel_fbdev.c), call async_synchronize_full() conditionally
          instead of moving it into i915_driver_unload().
      
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Link: http://patchwork.freedesktop.org/patch/msgid/49ce5f0daead24b7598ec78591731046c333c18d.1447938059.git.lukas@wunner.deSigned-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      366e39b4
    • A
      Revert "drm/i915: Initialize HWS page address after GPU reset" · fb1a2111
      Arun Siluvery 提交于
      This reverts commit 2e5356da.
      
      It is now redundant as it is already covered in below commit which introduced
      the changes to reuse initialization of resources in resume/reset path.
      
      commit e84fe803
      Author: Nick Hoath <nicholas.hoath@intel.com>
      Date:   Fri Sep 11 12:53:46 2015 +0100
      
          drm/i915: Split alloc from init for lrc
      
      lrc_setup_hardware_status_page() in the same function gen8_init_common_ring()
      takes care of this.
      
      Cc: Nick Hoath <nicholas.hoath@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NArun Siluvery <arun.siluvery@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1447951664-9347-1-git-send-email-arun.siluvery@linux.intel.comSigned-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fb1a2111
    • L
      drm/i915: Fix oops caused by fbdev initialization failure · 54632abe
      Lukas Wunner 提交于
      intelfb_create() is called once on driver initialization. If it fails,
      ifbdev->helper.fbdev, ifbdev->fb or ifbdev->fb->obj may be NULL.
      
      Further up in the call stack, intel_fbdev_initial_config() calls
      intel_fbdev_fini() to tear down the ifbdev on failure. This calls
      intel_fbdev_destroy() which dereferences ifbdev->fb. Fix the ensuing
      oops.
      
      Also check in these functions if ifbdev is not NULL to avoid oops:
      
      i915_gem_framebuffer_info() is called on access to debugfs file
      "i915_gem_framebuffer" and dereferences ifbdev, ifbdev->helper.fb
      and ifbdev->helper.fb->obj.
      
      intel_connector_add_to_fbdev() / intel_connector_remove_from_fbdev()
      are called when registering / unregistering an mst connector and
      dereference ifbdev.
      
      v3: Drop additional null pointer checks in intel_fbdev_set_suspend(),
          intel_fbdev_output_poll_changed() and intel_fbdev_restore_mode()
          since they already check if ifbdev is not NULL, which is sufficient
          now that intel_fbdev_fini() is called on initialization failure.
          (Requested by Daniel Vetter <daniel.vetter@ffwll.ch>)
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Link: http://patchwork.freedesktop.org/patch/msgid/d05f0edf121264a9d0adb8ca713fd8cc4ae068bf.1447938059.git.lukas@wunner.deSigned-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      54632abe
  5. 19 11月, 2015 7 次提交