1. 10 5月, 2013 1 次提交
  2. 22 4月, 2013 1 次提交
  3. 21 1月, 2013 2 次提交
    • D
      drm: don't hold crtc mutexes for connector ->detect callbacks · 7b24056b
      Daniel Vetter 提交于
      The coup de grace of the entire journey. No more dropped frames every
      10s on my testbox!
      
      I've tried to audit all ->detect and ->get_modes callbacks, but things
      became a bit fuzzy after trying to piece together the umpteenth
      implemenation. Afaict most drivers just have bog-standard output
      register frobbing with a notch of i2c edid reading, nothing which
      could potentially race with the newly concurrent pageflip/set_cursor
      code. The big exception is load-detection code which requires a
      running pipe, but radeon/nouveau seem to to this without touching any
      state which can be observed from page_flip (e.g. disabled crtcs
      temporarily getting enabled and so a pageflip succeeding).
      
      The only special case I could find is the i915 load detect code. That
      uses the normal modeset interface to enable the load-detect crtc, and
      so userspace could try to squeeze in a pageflip on the load-detect
      pipe. So we need to grab the relevant crtc mutex in there, to avoid
      the temporary crtc enabling to sneak out and be visible to userspace.
      
      Note that the sysfs files already stopped grabbing the per-crtc locks,
      since I didn't want to bother with doing a interruptible
      modeset_lock_all. But since there's very little in-between breakage
      (essentially just the ability for userspace to pageflip on load-detect
      crtcs when it shouldn't on the i915 driver) I figured I don't need to
      bother.
      Reviewed-by: NRob Clark <rob@ti.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7b24056b
    • D
      drm: add drm_modeset_lock|unlock_all · 84849903
      Daniel Vetter 提交于
      This is the first step towards introducing the new modeset locking
      scheme. The plan is to put helper functions into place at all the
      right places step-by-step, so that the final patch to switch on the
      new locking scheme doesn't need to touch every single driver.
      
      This helper here will serve as the shotgun solutions for all places
      where a more fine-grained locking isn't (yet) implemented.
      
      v2: Fixup kerneldoc for unlock_all.
      Reviewed-by: NRob Clark <rob@ti.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      84849903
  4. 28 11月, 2012 1 次提交
  5. 20 11月, 2012 7 次提交
  6. 12 11月, 2012 1 次提交
  7. 03 10月, 2012 1 次提交
  8. 21 8月, 2012 1 次提交
    • T
      workqueue: deprecate system_nrt[_freezable]_wq · 3b07e9ca
      Tejun Heo 提交于
      system_nrt[_freezable]_wq are now spurious.  Mark them deprecated and
      convert all users to system[_freezable]_wq.
      
      If you're cc'd and wondering what's going on: Now all workqueues are
      non-reentrant, so there's no reason to use system_nrt[_freezable]_wq.
      Please use system[_freezable]_wq instead.
      
      This patch doesn't make any functional difference.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-By: NLai Jiangshan <laijs@cn.fujitsu.com>
      
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Cc: David Howells <dhowells@redhat.com>
      3b07e9ca
  9. 22 5月, 2012 1 次提交
  10. 20 4月, 2012 1 次提交
  11. 20 3月, 2012 1 次提交
    • C
      drm: allow loading an EDID as firmware to override broken monitor · da0df92b
      Carsten Emde 提交于
      Broken monitors and/or broken graphic boards may send erroneous or no
      EDID data. This also applies to broken KVM devices that are unable to
      correctly forward the EDID data of the connected monitor but invent
      their own fantasy data.
      
      This patch allows to specify an EDID data set to be used instead of
      probing the monitor for it. It contains built-in data sets of frequently
      used screen resolutions. In addition, a particular EDID data set may be
      provided in the /lib/firmware directory and loaded via the firmware
      interface. The name is passed to the kernel as module parameter of the
      drm_kms_helper module either when loaded
        options drm_kms_helper edid_firmware=edid/1280x1024.bin
      or as kernel commandline parameter
        drm_kms_helper.edid_firmware=edid/1280x1024.bin
      
      It is also possible to restrict the usage of a specified EDID data set
      to a particular connector. This is done by prepending the name of the
      connector to the name of the EDID data set using the syntax
        edid_firmware=[<connector>:]<edid>
      such as, for example,
        edid_firmware=DVI-I-1:edid/1920x1080.bin
      in which case no other connector will be affected.
      
      The built-in data sets are
      Resolution    Name
      --------------------------------
      1024x768      edid/1024x768.bin
      1280x1024     edid/1280x1024.bin
      1680x1050     edid/1680x1050.bin
      1920x1080     edid/1920x1080.bin
      
      They are ignored, if a file with the same name is available in the
      /lib/firmware directory.
      
      The built-in EDID data sets are based on standard timings that may not
      apply to a particular monitor and even crash it. Ideally, EDID data of
      the connected monitor should be used. They may be obtained through the
      drm/cardX/cardX-<connector>/edid entry in the /sys/devices PCI directory
      of a correctly working graphics adapter.
      
      It is even possible to specify the name of an EDID data set on-the-fly
      via the /sys/module interface, e.g.
      echo edid/myedid.bin >/sys/module/drm_kms_helper/parameters/edid_firmware
      The new screen mode is considered when the related kernel function is
      called for the first time after the change. Such calls are made when the
      X server is started or when the display settings dialog is opened in an
      already running X server.
      Signed-off-by: NCarsten Emde <C.Emde@osadl.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      da0df92b
  12. 15 3月, 2012 1 次提交
  13. 03 2月, 2012 1 次提交
  14. 21 12月, 2011 2 次提交
  15. 20 12月, 2011 1 次提交
  16. 02 12月, 2011 1 次提交
    • C
      drm: Fix lack of CRTC disable for drm_crtc_helper_set_config(.fb=NULL) · 6eebd6bb
      Chris Wilson 提交于
      Disabling the CRTC by setting its framebuffer to NULL, as used by
      drm_framebuffer_cleanup(), was failing to pass the current framebuffer
      to the crtc_func->disable callback. This is because of the dance within
      drm_crtc_helper_set_config to pass the new_fb (NULL in this case) to the
      drm_crtc_helper_set_mode with the currently attached fb as a parameter.
      drm_crtc_helper_set_mode treats this as a no-op and the encoder is still
      enabled. And so the current fb is forgotten before the call to
      drm_helper_disable_unused_functions.
      
      This patch treats disabling the CRTC as a simple special case rather
      than adding further complexity into the configuration logic.
      
      This fixes a pin-leak of the fb bo on Xserver close.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      6eebd6bb
  17. 30 11月, 2011 1 次提交
  18. 16 11月, 2011 1 次提交
  19. 11 11月, 2011 1 次提交
  20. 01 11月, 2011 2 次提交
  21. 11 10月, 2011 1 次提交
  22. 08 7月, 2011 1 次提交
  23. 05 2月, 2011 1 次提交
  24. 31 1月, 2011 3 次提交
  25. 10 1月, 2011 1 次提交
    • C
      drm: Restore the old_fb upon modeset failure · 0ba41e44
      Chris Wilson 提交于
      ... or else we may end up disabling the wrong framebuffer, leading to an
      OOPS, e.g:
      
      [ 6033.229012] kernel BUG at drivers/gpu/drm/i915/i915_gem.c:3271!
      [ 6033.229012] invalid opcode: 0000 [#1] SMP
      [ 6033.229012] last sysfs file:
      /sys/devices/virtual/backlight/acpi_video0/uevent
      [ 6033.229012] Modules linked in: sunrpc cpufreq_ondemand acpi_cpufreq
      mperf snd_hda_codec_analog snd_hda_intel snd_hda_codec snd_hwdep snd_seq
      snd_seq_device snd_pcm snd_timer thinkpad_acpi ppdev snd r852 sm_common
      iTCO_wdt uvcvideo i2c_i801 iTCO_vendor_support microcode wmi nand
      videodev nand_ids nand_ecc snd_page_alloc parport_pc parport mtd
      soundcore joydev v4l1_compat pcspkr uinput ipv6 sdhci_pci sdhci mmc_core
      yenta_socket i915 drm_kms_helper drm i2c_algo_bit i2c_core video output
      [last unloaded: scsi_wait_scan]
      [ 6033.229012]
      [ 6033.229012] Pid: 4834, comm: Xorg Not tainted 2.6.37-rc8+ #25 7661BL5/7661BL5
      [ 6033.229012] EIP: 0060:[<f86fda5e>] EFLAGS: 00013246 CPU: 0
      [ 6033.229012] EIP is at i915_gem_object_unpin+0x23/0x76 [i915]
      [ 6033.229012] EAX: f68a4000 EBX: f6831f00 ECX: 000600fa EDX: f68a8000
      [ 6033.229012] ESI: f68a4014 EDI: f68a42b8 EBP: f2169c44 ESP: f2169c3c
      [ 6033.229012]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
      [ 6033.229012] Process Xorg (pid: 4834, ti=f2168000 task=f21c8000 task.ti=f2168000)
      [ 6033.229012] Stack:
      [ 6033.229012]  f3a84800 f68a4014 f2169c54 f87045d8 f3a84800 f872d9a8 f2169c68 f7fd8091
      [ 6033.229012]  f3b952a4 00000000 f68a414c f2169cf0 f7fd9377 00000000 00000000 f7fd98b0
      [ 6033.229012]  f7fd9f4e 0000000f f7f328a0 00000000 00000000 00000000 f2169ca4 f68a414c
      [ 6033.229012] Call Trace:
      [ 6033.229012]  [<f87045d8>] ? intel_crtc_disable+0x36/0x41 [i915]
      [ 6033.229012]  [<f7fd8091>] ?  drm_helper_disable_unused_functions+0xcd/0xf9 [drm_kms_helper]
      [ 6033.229012]  [<f7fd9377>] ? drm_crtc_helper_set_config+0x62a/0x7f7 [drm_kms_helper]
      [ 6033.229012]  [<c04daa10>] ? __slab_free+0x1b/0xa4
      [ 6033.229012]  [<f7fd7e62>] ? drm_fb_helper_initial_config+0x466/0x497 [drm_kms_helper]
      [ 6033.229012]  [<f7fd7ea3>] ? drm_fb_helper_restore+0x10/0x2a [drm_kms_helper]
      [ 6033.229012]  [<f86f2577>] ? i915_driver_lastclose+0x2a/0x57 [i915]
      [ 6033.229012]  [<f7f1989f>] ? drm_lastclose+0x45/0x23e [drm]
      [ 6033.229012]  [<f7f1a0b4>] ? drm_release+0x462/0x4d7 [drm]
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: stable@kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      0ba41e44
  26. 22 12月, 2010 1 次提交
  27. 21 12月, 2010 1 次提交
  28. 08 12月, 2010 1 次提交
  29. 29 11月, 2010 1 次提交