1. 20 2月, 2013 13 次提交
  2. 15 2月, 2013 8 次提交
  3. 14 2月, 2013 2 次提交
    • Z
      i915: ignore lid open event when resuming · b8efb17b
      Zhang Rui 提交于
      i915 driver needs to do modeset when
      1. system resumes from sleep
      2. lid is opened
      
      In PM_SUSPEND_MEM state, all the GPEs are cleared when system resumes,
      thus it is the i915_resume code does the modeset rather than intel_lid_notify().
      
      But in PM_SUSPEND_FREEZE state, this will be broken because
      system is still responsive to the lid events.
      1. When we close the lid in Freeze state, intel_lid_notify() sets modeset_on_lid.
      2. When we reopen the lid, intel_lid_notify() will do a modeset,
         before the system is resumed.
      here is the error log,
      
      [92146.548074] WARNING: at drivers/gpu/drm/i915/intel_display.c:1028 intel_wait_for_pipe_off+0x184/0x190 [i915]()
      [92146.548076] Hardware name: VGN-Z540N
      [92146.548078] pipe_off wait timed out
      [92146.548167] Modules linked in: hid_generic usbhid hid snd_hda_codec_realtek snd_hda_intel snd_hda_codec parport_pc snd_hwdep ppdev snd_pcm_oss i915 snd_mixer_oss snd_pcm arc4 iwldvm snd_seq_dummy mac80211 snd_seq_oss snd_seq_midi fbcon tileblit font bitblit softcursor drm_kms_helper snd_rawmidi snd_seq_midi_event coretemp drm snd_seq kvm btusb bluetooth snd_timer iwlwifi pcmcia tpm_infineon i2c_algo_bit joydev snd_seq_device intel_agp cfg80211 snd intel_gtt yenta_socket pcmcia_rsrc sony_laptop agpgart microcode psmouse tpm_tis serio_raw mxm_wmi soundcore snd_page_alloc tpm acpi_cpufreq lpc_ich pcmcia_core tpm_bios mperf processor lp parport firewire_ohci firewire_core crc_itu_t sdhci_pci sdhci thermal e1000e
      [92146.548173] Pid: 4304, comm: kworker/0:0 Tainted: G        W    3.8.0-rc3-s0i3-v3-test+ #9
      [92146.548175] Call Trace:
      [92146.548189]  [<c10378e2>] warn_slowpath_common+0x72/0xa0
      [92146.548227]  [<f86398b4>] ? intel_wait_for_pipe_off+0x184/0x190 [i915]
      [92146.548263]  [<f86398b4>] ? intel_wait_for_pipe_off+0x184/0x190 [i915]
      [92146.548270]  [<c10379b3>] warn_slowpath_fmt+0x33/0x40
      [92146.548307]  [<f86398b4>] intel_wait_for_pipe_off+0x184/0x190 [i915]
      [92146.548344]  [<f86399c2>] intel_disable_pipe+0x102/0x190 [i915]
      [92146.548380]  [<f8639ea4>] ? intel_disable_plane+0x64/0x80 [i915]
      [92146.548417]  [<f8639f7c>] i9xx_crtc_disable+0xbc/0x150 [i915]
      [92146.548456]  [<f863ebee>] intel_crtc_update_dpms+0x5e/0x90 [i915]
      [92146.548493]  [<f86437cf>] intel_modeset_setup_hw_state+0x42f/0x8f0 [i915]
      [92146.548535]  [<f8645b0b>] intel_lid_notify+0x9b/0xc0 [i915]
      [92146.548543]  [<c15610d3>] notifier_call_chain+0x43/0x60
      [92146.548550]  [<c105d1e1>] __blocking_notifier_call_chain+0x41/0x80
      [92146.548556]  [<c105d23f>] blocking_notifier_call_chain+0x1f/0x30
      [92146.548563]  [<c131a684>] acpi_lid_send_state+0x78/0xa4
      [92146.548569]  [<c131aa9e>] acpi_button_notify+0x3b/0xf1
      [92146.548577]  [<c12df56a>] ? acpi_os_execute+0x17/0x19
      [92146.548582]  [<c12e591a>] ? acpi_ec_sync_query+0xa5/0xbc
      [92146.548589]  [<c12e2b82>] acpi_device_notify+0x16/0x18
      [92146.548595]  [<c12f4904>] acpi_ev_notify_dispatch+0x38/0x4f
      [92146.548600]  [<c12df0e8>] acpi_os_execute_deferred+0x20/0x2b
      [92146.548607]  [<c1051208>] process_one_work+0x128/0x3f0
      [92146.548613]  [<c1564f73>] ? common_interrupt+0x33/0x38
      [92146.548618]  [<c104f8c0>] ? wake_up_worker+0x30/0x30
      [92146.548624]  [<c12df0c8>] ? acpi_os_wait_events_complete+0x1e/0x1e
      [92146.548629]  [<c10524f9>] worker_thread+0x119/0x3b0
      [92146.548634]  [<c10523e0>] ? manage_workers+0x240/0x240
      [92146.548640]  [<c1056e84>] kthread+0x94/0xa0
      [92146.548647]  [<c1060000>] ? ftrace_raw_output_sched_stat_runtime+0x70/0xf0
      [92146.548652]  [<c15649b7>] ret_from_kernel_thread+0x1b/0x28
      [92146.548658]  [<c1056df0>] ? kthread_create_on_node+0xc0/0xc0
      
      three different modeset flags are introduced in this patch
      MODESET_ON_LID_OPEN: do modeset on next lid open event
      MODESET_DONE:  modeset already done
      MODESET_SUSPENDED:  suspended, only do modeset when system is resumed
      
      In this way,
      1. when lid is closed, MODESET_ON_LID_OPEN is set so that
         we'll do modeset on next lid open event.
      2. when lid is opened, MODESET_DONE is set
         so that duplicate lid open events will be ignored.
      3. when system suspends, MODESET_SUSPENDED is set.
         In this case, we will not do modeset on any lid events.
      
      Plus, locking mechanism is also introduced to avoid racing.
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b8efb17b
    • B
      drm/i915: Fix RC6VIDS encode/decode · 7083e050
      Ben Widawsky 提交于
      The RC6 VIDS has a linear ramp starting at 250mv, which means any values
      below 250 are invalid. The old buggy macros tried to adjust for this to
      be more flexible, but there is no need. As Dan pointed out the ENCODE
      only ever has one value. The only invalid value for decode is an input
      of 0 which means something is really wonky, and the cases where DECODE
      are used either don't matter (debug values), or would be implicitly
      correct (the check for less than 450).
      
      This patch makes simpler, easier to read macros which are actually
      correct. Maybe this patch can actually fix some bugs now.
      
      Thanks to Dan for catching this. /me hides
      
      Cc: stable@kernel.org
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7083e050
  4. 13 2月, 2013 1 次提交
  5. 08 2月, 2013 16 次提交
    • D
      Merge branch 'for-airlied' of git://people.freedesktop.org/~mlankhorst/linux into drm-next · b9e50713
      Dave Airlie 提交于
      TTM reservations changes, preparing for new reservation mutex system.
      
      * 'for-airlied' of git://people.freedesktop.org/~mlankhorst/linux:
        drm/ttm: unexport ttm_bo_wait_unreserved
        drm/nouveau: use ttm_bo_reserve_slowpath in validate_init, v2
        drm/ttm: use ttm_bo_reserve_slowpath_nolru in ttm_eu_reserve_buffers, v2
        drm/ttm: add ttm_bo_reserve_slowpath
        drm/ttm: cleanup ttm_eu_reserve_buffers handling
        drm/ttm: remove lru_lock around ttm_bo_reserve
        drm/nouveau: increase reservation sequence every retry
        drm/vmwgfx: always use ttm_bo_is_reserved
      b9e50713
    • D
      drm: make frame duration time calculation more precise · 85a7ce67
      Daniel Kurtz 提交于
      It is a bit more precise to compute the total number of pixels first and
      then divide, rather than multiplying the line pixel count by the
      already-rounded line duration.
      Signed-off-by: NDaniel Kurtz <djkurtz@chromium.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      85a7ce67
    • B
      drm/pci: Use PCI Express Capability accessors · dd66cc2e
      Bjorn Helgaas 提交于
      Use PCI Express Capability access functions to simplify this code a bit.
      For non-PCIe devices or pre-PCIe 3.0 devices that don't implement the Link
      Capabilities 2 register, pcie_capability_read_dword() reads a zero.
      
      Since we're only testing whether the bits we care about are set, there's no
      need to mask out the other bits we *don't* care about.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      dd66cc2e
    • B
      drm/pci: Set all supported speeds in speed cap mask for pre-3.0 devices · f8acf6f4
      Bjorn Helgaas 提交于
      For devices that conform to PCIe r3.0 and have a Link Capabilities 2
      register, we test and report every bit in the Supported Link Speeds Vector
      field.  For a device that supports both 2.5GT/s and 5.0GT/s, we set both
      DRM_PCIE_SPEED_25 and DRM_PCIE_SPEED_50 in the returned mask.
      
      For pre-r3.0 devices, the Link Capabilities 0010b encoding
      (PCI_EXP_LNKCAP_SLS_5_0GB) means that both 5.0GT/s and 2.5GT/s are
      supported, so set both DRM_PCIE_SPEED_25 and DRM_PCIE_SPEED_50 in this
      case as well.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      f8acf6f4
    • B
      drm/pci: Use the standard #defines for PCIe Link Capability bits · 9fe0423e
      Bjorn Helgaas 提交于
      Use the standard #defines rather than bare numbers for the PCIe Link
      Capabilities speed bits.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      9fe0423e
    • T
      drm: Allow vblank support without DRIVER_HAVE_IRQ · 03f6509d
      Thierry Reding 提交于
      Drivers that register interrupt handlers without the DRM core helpers
      don't initialize the .irq_enabled field and drm_dev_to_irq() may fail
      when called on them. This shouldn't preclude them from implementing
      the vblank IOCTL.
      Signed-off-by: NThierry Reding <thierry.reding@avionic-design.de>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      03f6509d
    • A
      drm/radeon: use prime helpers · 1e6d17a5
      Aaron Plattner 提交于
      Simplify the Radeon prime implementation by using the default behavior provided
      by drm_gem_prime_import and drm_gem_prime_export.
      
      v2:
      - Rename functions to radeon_gem_prime_get_sg_table and
        radeon_gem_prime_import_sg_table.
      - Delete the now-unused vmapping_count variable.
      Signed-off-by: NAaron Plattner <aplattner@nvidia.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: David Airlie <airlied@linux.ie>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      1e6d17a5
    • A
      drm/nouveau: use prime helpers · ab9ccb96
      Aaron Plattner 提交于
      Simplify the Nouveau prime implementation by using the default behavior provided
      by drm_gem_prime_import and drm_gem_prime_export.
      
      v2: Rename functions to nouveau_gem_prime_get_sg_table and
      nouveau_gem_prime_import_sg_table.
      Signed-off-by: NAaron Plattner <aplattner@nvidia.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: David Airlie <airlied@linux.ie>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      ab9ccb96
    • A
      drm: add prime helpers · 89177644
      Aaron Plattner 提交于
      Instead of reimplementing all of the dma_buf functionality in every driver,
      create helpers drm_prime_import and drm_prime_export that implement them in
      terms of new, lower-level hook functions:
      
        gem_prime_pin: callback when a buffer is created, used to pin buffers into GTT
        gem_prime_get_sg_table: convert a drm_gem_object to an sg_table for export
        gem_prime_import_sg_table: convert an sg_table into a drm_gem_object
        gem_prime_vmap, gem_prime_vunmap: map and unmap an object
      
      These hooks are optional; drivers can opt in by using drm_gem_prime_import and
      drm_gem_prime_export as the .gem_prime_import and .gem_prime_export fields of
      struct drm_driver.
      
      v2:
      - Drop .begin_cpu_access.  None of the drivers this code replaces implemented
        it.  Having it here was a leftover from when I was trying to include i915 in
        this rework.
      - Use mutex_lock instead of mutex_lock_interruptible, as these three drivers
        did.  This patch series shouldn't change that behavior.
      - Rename helpers to gem_prime_get_sg_table and gem_prime_import_sg_table.
        Rename struct sg_table* variables to 'sgt' for clarity.
      - Update drm.tmpl for these new hooks.
      
      v3:
      - Pass the vaddr down to the driver.  This lets drivers that just call vunmap on
        the pointer avoid having to store the pointer in their GEM private structures.
      - Move documentation into a /** DOC */ comment in drm_prime.c and include it in
        drm.tmpl with a !P line.  I tried to use !F lines to include documentation of
        the individual functions from drmP.h, but the docproc / kernel-doc scripts
        barf on that file, so hopefully this is good enough for now.
      - apply refcount fix from commit be8a42ae
        ("drm/prime: drop reference on imported dma-buf come from gem")
      Signed-off-by: NAaron Plattner <aplattner@nvidia.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: David Airlie <airlied@linux.ie>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      89177644
    • R
      drm/i2c: give i2c it's own Kconfig · 6504d0d9
      Rob Clark 提交于
      Move this out of nouveau directory.  As we start to add more encoder
      slaves used by other drivers, it makes sense to put the Kconfig bits in
      one place.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      6504d0d9
    • D
      Merge branch 'drm-next-3.9' of git://people.freedesktop.org/~agd5f/linux into drm-next · 73ccd696
      Dave Airlie 提交于
      Alex writes:
      - CS ioctl cleanup and unification.  Unification of a lot of functionality
      that was duplicated across multiple generates of hardware.
      - Add support for Oland GPUs
      - Deprecate UMS support.  Mesa and the ddx dropped support for UMS and
      apparently very few people still use it since the UMS CS ioctl was broken
      for several kernels and no one reported it.  It was fixed in 3.8/stable.
      - Rework GPU reset.  Use the status registers to determine what blocks
      to reset.  This better matches the recommended reset programming model.
      This also allows us to properly reset blocks besides GFX and DMA.
      - Switch the VM set page code to use an IB rather than the ring.  This
      fixes overflow issues when doing large page table updates using a small
      ring like DMA.
      - Several small cleanups and bug fixes.
      
      * 'drm-next-3.9' of git://people.freedesktop.org/~agd5f/linux: (38 commits)
        drm/radeon/dce6: fix display powergating
        drm/radeon: add Oland pci ids
        drm/radeon: radeon-asic updates for Oland
        drm/radeon: add ucode loading support for Oland
        drm/radeon: fill in gpu init for Oland
        drm/radeon: add Oland chip family
        drm/radeon: switch back to using the DMA ring for VM PT updates
        drm/radeon: use IBs for VM page table updates v2
        drm/radeon: don't reset the MC on IGPs/APUs
        drm/radeon: use the reset mask to determine if rings are hung
        drm/radeon: halt engines before disabling MC (si)
        drm/radeon: halt engines before disabling MC (cayman/TN)
        drm/radeon: halt engines before disabling MC (evergreen)
        drm/radeon: halt engines before disabling MC (6xx/7xx)
        drm/radeon: use status regs to determine what to reset (si)
        drm/radeon: use status regs to determine what to reset (cayman)
        drm/radeon: use status regs to determine what to reset (evergreen)
        drm/radeon: use status regs to determine what to reset (6xx/7xx)
        drm/radeon: rework GPU reset on cayman/TN
        drm/radeon: rework GPU reset on cayman/TN
        ...
      73ccd696
    • D
      Merge tag 'of_videomode_helper' of git://git.pengutronix.de/git/str/linux into drm-next · ed914f69
      Dave Airlie 提交于
      videomode helpers for of + devicetree stuff, required for new kms drivers
      
      (not the fbdev maintainer).
      
      * tag 'of_videomode_helper' of git://git.pengutronix.de/git/str/linux:
        drm_modes: add of_videomode helpers
        drm_modes: add videomode helpers
        fbmon: add of_videomode helpers
        fbmon: add videomode helpers
        video: add of helper for display timings/videomode
        video: add display_timing and videomode
        viafb: rename display_timing to via_display_timing
      ed914f69
    • D
      Merge branch 'udl-fixes' into drm-next · bb0f78dd
      Dave Airlie 提交于
      Fixes for usb/udl devices
      * udl-fixes:
        drm/udl: disable fb_defio by default
        drm/udl: Inline memcmp() for RLE compression of xfer
        drm/udl: make usage as a console safer
        drm/usb: bind driver to correct device
      bb0f78dd
    • D
      Merge branch 'console-fixes' into drm-next · 62cd2fa8
      Dave Airlie 提交于
      (not the fbcon maintainer pull 2)
      
      fix bug in vgacon on bootup and fbcon losing fonts on startup.
      
      * console-fixes: (50 commits)
        fbcon: don't lose the console font across generic->chip driver switch
        vgacon/vt: clear buffer attributes when we load a 512 character font (v2)
      62cd2fa8
    • D
      Merge branch 'fbcon-locking-fixes' of ssh://people.freedesktop.org/~airlied/linux into drm-next · 6dc1c49d
      Dave Airlie 提交于
      This pulls in most of Linus tree up to -rc6, this fixes the worst lockdep
      reported issues and re-enables fbcon lockdep.
      
      (not the fbcon maintainer)
      * 'fbcon-locking-fixes' of ssh://people.freedesktop.org/~airlied/linux: (529 commits)
        Revert "Revert "console: implement lockdep support for console_lock""
        fbcon: fix locking harder
        fb: Yet another band-aid for fixing lockdep mess
        fb: rework locking to fix lock ordering on takeover
      6dc1c49d
    • D
      Revert "Revert "console: implement lockdep support for console_lock"" · 5845b81b
      Dave Airlie 提交于
      This reverts commit ff0d05bf.
      
      Now that we have all the locking fixes in place, we can revert the
      revert. This re-enables lockdep tracking for the console lock,
      daee7797.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      5845b81b