1. 14 2月, 2013 5 次提交
  2. 21 1月, 2013 2 次提交
    • D
      drm/fb_helper: check whether fbcon is bound · 20c60c35
      Daniel Vetter 提交于
      We need to make sure that the fbcon is still bound when touching the
      hw, since otherwise we might corrupt the modeset state of kms clients.
      X mostly works around that with VT switching and setting the VT into
      raw mode, which disables most fbcon events.
      
      Raw kms test programs though don't do that dance, and in the future
      we might want to aim to abolish CONFIG_VT anyway. So improve preventive
      measures a bit. To do so, extract the existing logic for handling hotplug
      events (which X can't block with the current set of tricks) and reuse
      it for the fbdev blanking helper.
      
      Long-term we really need to either scrap this all and only have a OOPS
      console, or come up with a saner model for device ownership sharing
      between fbdev/fbcon and kms userspace.
      Reviewed-by: NRob Clark <rob@ti.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      20c60c35
    • 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
  3. 20 1月, 2013 1 次提交
  4. 01 12月, 2012 1 次提交
    • R
      drm: remove legacy drm_connector_property fxns · 58495563
      Rob Clark 提交于
      Replace references to and remove the connector property fxns, which
      have been superseded with the more general object property fxns:
      
        + drm_connector_attach_property -> drm_object_attach_property
        + drm_connector_property_set_value -> drm_object_property_set_value
        + drm_connector_property_get_value -> drm_object_property_get_value
      Signed-off-by: NRob Clark <rob@ti.com>
      58495563
  5. 28 11月, 2012 1 次提交
  6. 20 11月, 2012 4 次提交
  7. 03 10月, 2012 1 次提交
  8. 08 9月, 2012 1 次提交
  9. 24 8月, 2012 1 次提交
  10. 17 8月, 2012 1 次提交
    • D
      drm/fb-helper: don't clobber output routing in setup_crtcs · 33faad19
      Daniel Vetter 提交于
      Yet again the too close relationship between the fb helper and the
      crtc helper code strikes. This time around the fb helper resets all
      encoder->crtc pointers to NULL before starting to set up it's own
      mode. Which is total bullocks, because this will clobber the existing
      output routing, which the new drm/i915 code depends upon to be
      absolutely correct.
      
      The crtc helper itself doesn't really care about that, since it
      disables unused encoders in a rather roundabout way anyway.
      
      Two places call drm_setup_crts:
      
      - For the initial fb config. I've auditted all current drivers, and
        they all allocate their encoders with kzalloc. So there's no need to
        clear encoder->crtc once more.
      
      - When processing hotplug events while showing the fb console. This
        one is a bit more tricky, but both the crtc helper code and the new
        drm/i915 modeset code disable encoders if their crtc is changed and
        that encoder isn't part of the new config. Also, both disable any
        disconnected outputs, too.
      
        Which only leaves encoders that are on, connected, but for some odd
        reason the fb helper code doesn't want to use. That would be a bug
        in the fb configuration selector, since it tries to light up as many
        outputs as possible.
      
      v2: Kill the now unused encoders variable.
      Acked-by: NDave Airlie <airlied@gmail.com>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      33faad19
  11. 20 7月, 2012 2 次提交
    • D
      drm/fb helper: don't call drm_crtc_helper_set_config · d3904754
      Daniel Vetter 提交于
      Go through the interface vtable instead, because not everyone might be
      using the crtc helper code.
      
      Cc: dri-devel@lists.freedesktop.org
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      d3904754
    • D
      drm/fb-helper: delay hotplug handling when partially bound · 343065a6
      Daniel Vetter 提交于
      Ok, this requires quite a dance to actually hit:
      1) We plug in a 2nd screen, enable it in both X and (by vt-switching)
      in the fbcon.
      2) We disable that screen again in with xrandr.
      3) We vt-switch again, so that fbcon displays on the 2nd screen, but X
      on the first screen. This obviously needs a driver that doesn't switch
      off unused functions when regaining the VT.
      3) When X controls the vt, we unplug that screen.
      
      Now drm_fb_helper_hotplug_event we noticed that that some crtcs are
      bound, but because we still have the fbcon on the 2nd screeen we also
      have bound set. Which means the fbcon wrongly assumes it's in control
      of everything an happily disables the output on the 2nd screen, but
      enables its fb on the first screen.
      
      Work around this issue by counting how many crtcs are bound and how
      many are bound to fbcon and assuming that when fbcon isn't bound to
      all of them, it better not touch the output configuration.
      
      Conceptually this is the same as only restoring the fbcon output
      configuration on the driver's ->lastclose, when we're sure that no one
      else is using kms. So this should be consistent with existing kms
      drivers.
      
      Chris has created a separate patch for the intel ddx, but I think we
      should fix this issue here regardless - the fbcon messing with the
      output config while it's not fully in control simply isn't a too
      polite behaviour.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50772Tested-by: NMaxim A. Nikulin <M.A.Nikulin@gmail.com>
      Signed-Off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      343065a6
  12. 22 5月, 2012 2 次提交
  13. 20 4月, 2012 1 次提交
  14. 03 4月, 2012 1 次提交
  15. 03 2月, 2012 4 次提交
  16. 11 11月, 2011 1 次提交
  17. 01 11月, 2011 1 次提交
  18. 09 9月, 2011 1 次提交
  19. 16 5月, 2011 1 次提交
    • C
      drm: Take lock around probes for drm_fb_helper_hotplug_event · 752d2635
      Chris Wilson 提交于
      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: NFrederik Himpe <fhimpe@telenet.be>
      References: https://bugs.freedesktop.org/show_bug.cgi?id=36394Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      752d2635
  20. 28 4月, 2011 2 次提交
    • C
      drm: Export the command-line mode parser · 1794d257
      Chris Wilson 提交于
      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: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      1794d257
    • C
      drm: Take lock around probes for drm_fb_helper_hotplug_event · 7394371d
      Chris Wilson 提交于
      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: NFrederik Himpe <fhimpe@telenet.be>
      References: https://bugs.freedesktop.org/show_bug.cgi?id=36394Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      7394371d
  21. 27 4月, 2011 1 次提交
  22. 08 3月, 2011 1 次提交
  23. 23 2月, 2011 1 次提交
  24. 21 1月, 2011 1 次提交
    • D
      kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT · 6a108a14
      David Rientjes 提交于
      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: NIngo Molnar <mingo@elte.hu>
      Acked-by: NDavid Woodhouse <david.woodhouse@intel.com>
      Signed-off-by: NDavid 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: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6a108a14
  25. 15 1月, 2011 1 次提交
  26. 07 1月, 2011 1 次提交