1. 10 Nov, 2011 1 commit
  2. 31 Oct, 2011 1 commit
  3. 09 Sep, 2011 1 commit
  4. 15 May, 2011 1 commit
    • Chris Wilson's avatar
      drm: Take lock around probes for drm_fb_helper_hotplug_event · 752d2635
      Chris Wilson authored
      
      
      We need to hold the dev->mode_config.mutex whilst detecting the output
      status. But we also need to drop it for the call into
      drm_fb_helper_single_fb_probe(), which indirectly acquires the lock when
      attaching the fbcon.
      
      Failure to do so exposes a race with normal output probing. Detected by
      adding some warnings that the mutex is held to the backend detect routines:
      
      [   17.772456] WARNING: at drivers/gpu/drm/i915/intel_crt.c:471 intel_crt_detect+0x3e/0x373 [i915]()
      [   17.772458] Hardware name: Latitude E6400
      [   17.772460] Modules linked in: ....
      [   17.772582] Pid: 11, comm: kworker/0:1 Tainted: G        W 2.6.38.4-custom.2 #8
      [   17.772584] Call Trace:
      [   17.772591]  [<ffffffff81046af5>] ? warn_slowpath_common+0x78/0x8c
      [   17.772603]  [<ffffffffa03f3e5c>] ? intel_crt_detect+0x3e/0x373 [i915]
      [   17.772612]  [<ffffffffa0355d49>] ?  drm_helper_probe_single_connector_modes+0xbf/0x2af [drm_kms_helper]
      [   17.772619]  [<ffffffffa03534d5>] ?  drm_fb_helper_probe_connector_modes+0x39/0x4d [drm_kms_helper]
      [   17.772625]  [<ffffffffa0354760>] ?  drm_fb_helper_hotplug_event+0xa5/0xc3 [drm_kms_helper]
      [   17.772633]  [<ffffffffa035577f>] ? output_poll_execute+0x146/0x17c [drm_kms_helper]
      [   17.772638]  [<ffffffff81193c01>] ? cfq_init_queue+0x247/0x345
      [   17.772644]  [<ffffffffa0355639>] ? output_poll_execute+0x0/0x17c [drm_kms_helper]
      [   17.772648]  [<ffffffff8105b540>] ? process_one_work+0x193/0x28e
      [   17.772652]  [<ffffffff8105c6bc>] ? worker_thread+0xef/0x172
      [   17.772655]  [<ffffffff8105c5cd>] ? worker_thread+0x0/0x172
      [   17.772658]  [<ffffffff8105c5cd>] ? worker_thread+0x0/0x172
      [   17.772663]  [<ffffffff8105f767>] ? kthread+0x7a/0x82
      [   17.772668]  [<ffffffff8100a724>] ? kernel_thread_helper+0x4/0x10
      [   17.772671]  [<ffffffff8105f6ed>] ? kthread+0x0/0x82
      [   17.772674]  [<ffffffff8100a720>] ? kernel_thread_helper+0x0/0x10
      
      Reported-by: default avatarFrederik Himpe <fhimpe@telenet.be>
      References: https://bugs.freedesktop.org/show_bug.cgi?id=36394
      
      
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      752d2635
  5. 27 Apr, 2011 3 commits
    • Chris Wilson's avatar
      drm: Export the command-line mode parser · 1794d257
      Chris Wilson authored
      
      
      In the absence of configuration data for providing the fixed mode for
      a panel, I would like to be able to pass such modes along a separate
      module paramenter. To do so, I then need to parse a modeline from a
      string, which drm is already capable of. Export that capability to the
      drivers.
      
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      1794d257
    • Chris Wilson's avatar
      drm: Take lock around probes for drm_fb_helper_hotplug_event · 7394371d
      Chris Wilson authored
      
      
      We need to hold the dev->mode_config.mutex whilst detecting the output
      status. But we also need to drop it for the call into
      drm_fb_helper_single_fb_probe(), which indirectly acquires the lock when
      attaching the fbcon.
      
      Failure to do so exposes a race with normal output probing. Detected by
      adding some warnings that the mutex is held to the backend detect routines:
      
      [   17.772456] WARNING: at drivers/gpu/drm/i915/intel_crt.c:471 intel_crt_detect+0x3e/0x373 [i915]()
      [   17.772458] Hardware name: Latitude E6400
      [   17.772460] Modules linked in: ....
      [   17.772582] Pid: 11, comm: kworker/0:1 Tainted: G        W 2.6.38.4-custom.2 #8
      [   17.772584] Call Trace:
      [   17.772591]  [<ffffffff81046af5>] ? warn_slowpath_common+0x78/0x8c
      [   17.772603]  [<ffffffffa03f3e5c>] ? intel_crt_detect+0x3e/0x373 [i915]
      [   17.772612]  [<ffffffffa0355d49>] ?  drm_helper_probe_single_connector_modes+0xbf/0x2af [drm_kms_helper]
      [   17.772619]  [<ffffffffa03534d5>] ?  drm_fb_helper_probe_connector_modes+0x39/0x4d [drm_kms_helper]
      [   17.772625]  [<ffffffffa0354760>] ?  drm_fb_helper_hotplug_event+0xa5/0xc3 [drm_kms_helper]
      [   17.772633]  [<ffffffffa035577f>] ? output_poll_execute+0x146/0x17c [drm_kms_helper]
      [   17.772638]  [<ffffffff81193c01>] ? cfq_init_queue+0x247/0x345
      [   17.772644]  [<ffffffffa0355639>] ? output_poll_execute+0x0/0x17c [drm_kms_helper]
      [   17.772648]  [<ffffffff8105b540>] ? process_one_work+0x193/0x28e
      [   17.772652]  [<ffffffff8105c6bc>] ? worker_thread+0xef/0x172
      [   17.772655]  [<ffffffff8105c5cd>] ? worker_thread+0x0/0x172
      [   17.772658]  [<ffffffff8105c5cd>] ? worker_thread+0x0/0x172
      [   17.772663]  [<ffffffff8105f767>] ? kthread+0x7a/0x82
      [   17.772668]  [<ffffffff8100a724>] ? kernel_thread_helper+0x4/0x10
      [   17.772671]  [<ffffffff8105f6ed>] ? kthread+0x0/0x82
      [   17.772674]  [<ffffffff8100a720>] ? kernel_thread_helper+0x0/0x10
      
      Reported-by: default avatarFrederik Himpe <fhimpe@telenet.be>
      References: https://bugs.freedesktop.org/show_bug.cgi?id=36394
      
      
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      7394371d
    • Dave Airlie's avatar
      drm/i915: restore only the mode of this driver on lastclose (v2) · e8e7a2b8
      Dave Airlie authored
      
      
      i915 calls the panic handler function on last close to reset the modes,
      however this is a really bad idea for multi-gpu machines, esp shareable
      gpus machines. So add a new entry point for the driver to just restore
      its own fbcon mode.
      
      v2: move code into fb helper, fix panic code to block mode change on
      powered off GPUs.
      
      [airlied: this hits drm core and I wrote it and it was reviewed on intel-gfx
       so really I signed it off twice ;-).]
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      e8e7a2b8
  6. 07 Mar, 2011 1 commit
  7. 22 Feb, 2011 1 commit
  8. 20 Jan, 2011 1 commit
    • David Rientjes's avatar
      kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT · 6a108a14
      David Rientjes authored
      
      
      The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option
      is used to configure any non-standard kernel with a much larger scope than
      only small devices.
      
      This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes
      references to the option throughout the kernel.  A new CONFIG_EMBEDDED
      option is added that automatically selects CONFIG_EXPERT when enabled and
      can be used in the future to isolate options that should only be
      considered for embedded systems (RISC architectures, SLOB, etc).
      
      Calling the option "EXPERT" more accurately represents its intention: only
      expert users who understand the impact of the configuration changes they
      are making should enable it.
      
      Reviewed-by: default avatarIngo Molnar <mingo@elte.hu>
      Acked-by: default avatarDavid Woodhouse <david.woodhouse@intel.com>
      Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
      Cc: Greg KH <gregkh@suse.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Robin Holt <holt@sgi.com>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6a108a14
  9. 14 Jan, 2011 1 commit
  10. 06 Jan, 2011 1 commit
  11. 20 Dec, 2010 2 commits
  12. 18 Oct, 2010 2 commits
  13. 05 Oct, 2010 1 commit
    • Jason Wessel's avatar
      drm, kdb, kms: Add an enter argument to mode_set_base_atomic() API · 413d45d3
      Jason Wessel authored
      
      
      Some devices such as the radeon chips receive information from user
      space which needs to be saved when executing an atomic mode set
      operation, else the user space would have to be queried again for the
      information.
      
      This patch extends the mode_set_base_atomic() call to pass an argument
      to indicate if this is an entry or an exit from an atomic kernel mode
      set change.  Individual drm drivers can properly save and restore
      state accordingly.
      
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      CC: Jesse Barnes <jbarnes@virtuousgeek.org>
      CC: David Airlie <airlied@linux.ie>
      CC: dri-devel@lists.freedesktop.org
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      413d45d3
  14. 19 Aug, 2010 2 commits
  15. 05 Aug, 2010 2 commits
  16. 06 Jul, 2010 1 commit
  17. 30 Jun, 2010 1 commit
  18. 07 Jun, 2010 1 commit
  19. 18 May, 2010 3 commits
    • Dave Airlie's avatar
      drm/fbdev: fix cloning on fbcon · 1d42bbc8
      Dave Airlie authored
      
      
      Simple cloning rules compared to server:
      (a) single crtc
      (b) > 1 connector active
      (c) check command line mode
      (d) try and find 1024x768 DMT mode if no command line.
      (e) fail to clone
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      1d42bbc8
    • Dave Airlie's avatar
      drm/fbdev: rework output polling to be back in the core. (v4) · eb1f8e4f
      Dave Airlie authored
      
      
      After thinking it over a lot it made more sense for the core to deal with
      the output polling especially so it can notify X.
      
      v2: drop plans for fake connector - per Michel's comments - fix X patch sent to xorg-devel, add intel polled/hpd setting, add initial nouveau polled/hpd settings.
      
      v3: add config lock take inside polling, add intel/nouveau poll init/fini calls
      
      v4: config lock was a bit agressive, only needed around connector list reading.
      otherwise it could re-enter.
      
      glisse: discard drm_helper_hpd_irq_event
      
      v3: Reviewed-by: Michel Dänzer <michel@daenzer.net>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      eb1f8e4f
    • Kirill Smelkov's avatar
      drm: Prefix info printk about registering panic notifier with 'drm' · 3da1f33e
      Kirill Smelkov authored
      
      
      Recently I've studied my system dmesg and seen this:
      
        <lots of stuff before>
      1 [    0.478416] ACPI: Battery Slot [C1B4] (battery present)
      2 [    0.478648] ACPI: Battery Slot [C1B3] (battery absent)
      3 [    0.906678] [drm] initialized overlay support
      4 [    1.762304] Console: switching to colour frame buffer device 128x48
      5 [    1.765211] fb0: inteldrmfb frame buffer device
      6 [    1.765242] registered panic notifier
      7 [    1.765272] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
      8 [    1.765372] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
        <lots of stuff after>
      
      and it was not evident who registered that panic notifier on line 6.
      
      I'd bought it as some low-level stuff needed by kernel itself, but the
      time was inappropriate -- too late for such things.
      
      So I had to study sources to see it was drm who was registering
      switch-to-fb on panic.
      
      Let's avoid possible confusion and mark this message as going from drm
      subsystem.
      
      (I'm a bit unsure whether to use '[drm]:' or 'drm:' -- the rest of the
       kernel just uses 'topic:', and even in drm_fb_helper.c we use 'fb%d:'
       without [] brackets. Either way is ok with me.)
      
      Signed-off-by: default avatarKirill Smelkov <kirr@landau.phys.spbu.ru>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      3da1f33e
  20. 07 Apr, 2010 1 commit
  21. 06 Apr, 2010 6 commits
    • Dave Airlie's avatar
      drm/kms/fb: use slow work mechanism for normal hotplug also. · 4abe3520
      Dave Airlie authored
      
      
      a) slow work is always used now for any fbcon hotplug, as its not
         a fast task and is more suited to being ran under slow work.
      
      b) attempt to not do any fbdev changes when X is running as we'll
         just mess it up. This hooks set_par to hopefully do the changes
         once X hands control to fbdev.
      
      This also adds the nouveau/intel hotplug support.
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      4abe3520
    • Dave Airlie's avatar
      drm/kms/fb: add polling support for when nothing is connected. · 5c4426a7
      Dave Airlie authored
      
      
      When we are running in a headless environment we have no idea what
      output the user might plug in later, we only have hotplug detect
      from the digital outputs. So if we detect no connected outputs at
      initialisation, start a slow work operation to poll every 5 seconds
      for an output.
      
      this is only hooked up for radeon so far, on hw where we have full
      hotplug detection there is no need for this.
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      5c4426a7
    • Dave Airlie's avatar
      drm/kms/fb: provide a 1024x768 fbcon if no outputs found. · 19b4b445
      Dave Airlie authored
      
      
      If we get no outputs setup provide a 1024x768 fbcon, with
      this + radeon hotplug stuff I can plug a monitor in after startup
      and get to see stuff.
      
      Last thing is to add some sort of timer for non-hpd outputs like
      VGA etc.
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      19b4b445
    • Dave Airlie's avatar
      drm/kms/fb: separate fbdev connector list from core drm connectors · 0b4c0f3f
      Dave Airlie authored
      
      
      This breaks the connection between the core drm connector list
      and the fbdev connector usage, and allows them to become disjoint
      in the future. It also removes the untype void* that was in the
      connector struct to support this.
      
      All connectors are added to the fbdev now but this could be
      changed in the future.
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      0b4c0f3f
    • Dave Airlie's avatar
      drm/kms/fb: move to using fb helper crtc grouping instead of core crtc list · 8be48d92
      Dave Airlie authored
      
      
      This move to using the list of crtcs in the fb helper and cleans up the
      whole picking code, now we store the crtc/connectors we want directly
      into the modeset and we use the modeset directly to set the mode.
      
      Fixes from James Simmons and Ben Skeggs.
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      8be48d92
    • Dave Airlie's avatar
      drm/fb: fix fbdev object model + cleanup properly. · 38651674
      Dave Airlie authored
      
      
      The fbdev layer in the kms code should act like a consumer of the kms services and avoid having relying on information being store in the kms core structures in order for it to work.
      
      This patch
      
      a) removes the info pointer/psuedo palette from the core drm_framebuffer structure and moves it to the fbdev helper layer, it also removes the core drm keeping a list of kernel kms fbdevs.
      b) migrated all the fb helper functions out of the crtc helper file into the fb helper file.
      c) pushed the fb probing/hotplug control into the driver
      d) makes the surface sizes into a structure for ease of passing
      This changes the intel/radeon/nouveau drivers to use the new helper.
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      38651674
  22. 30 Mar, 2010 2 commits
    • Randy Dunlap's avatar
      drm: fix build error when SYSRQ is disabled · b8c40d62
      Randy Dunlap authored
      
      
      Fix build error when CONFIG_MAGIC_SYSRQ is not enabled:
      
      drivers/gpu/drm/drm_fb_helper.c:915: error: 'sysrq_drm_fb_helper_restore_op' undeclared (first use in this function)
      drivers/gpu/drm/drm_fb_helper.c:929: error: 'sysrq_drm_fb_helper_restore_op' undeclared (first use in this function)
      
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      b8c40d62
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Guess-its-ok-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  23. 10 Feb, 2010 2 commits
  24. 05 Feb, 2010 1 commit
  25. 24 Jan, 2010 1 commit
    • Zhenyu Wang's avatar
      drm: fix regression in fb blank handling · 5fd4df4d
      Zhenyu Wang authored
      commit 731b5a15
      
      
      Author: James Simmons <jsimmons@infradead.org>
      Date:   Thu Oct 29 20:39:07 2009 +0000
      
          drm/kms: properly handle fbdev blanking
      
      uses DRM_MODE_DPMS_ON for FB_BLANK_NORMAL, but DRM_MODE_DPMS_ON
      is actually for turning output on instead of blank.
      
      This makes fb blank broken on my T61, it put LVDS on but leave
      pipe disabled which made screen totally white or caused some
      'burning' effect.
      
      [airlied: James objects to this but at this point in 2.6.33,
      I can't see a patch that will fix this properly like he wants coming
      in time and otherwise this is a regression - proper fix for 2.6.34
      hopefully.]
      
      Cc: James Simmons <jsimmons@infradead.org>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      5fd4df4d