19 Dec, 2011

8 commits


17 Dec, 2011

11 commits

  • This reverts commit eb1711bb94991e93669c5a1b5f84f11be2d51ea1.

    It blows up the i915 seqno tracking, resulting in the

    BUG_ON(seqno == 0);

    in i915_wait_request() triggering, which will cause lock-ups.

    See for example
    https://bugs.launchpad.net/ubuntu/+source/linux/+bug/903010
    https://lkml.org/lkml/2011/12/14/395

    Reported-requested-and-tested-by: Dirk Hohndel
    Reported-by: Richard Eames
    Reported-by: Rocko Requin
    Acked-by: Daniel Vetter
    Cc: Dave Airlie
    Cc: Chris Wilson
    Cc: Keith Packard
    Cc: Eric Anholt
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * 'drm-intel-fixes' of git://people.freedesktop.org/~keithp/linux:
    drm/i915/dp: Dither down to 6bpc if it makes the mode fit
    drm/i915: enable semaphores on per-device defaults
    drm/i915: don't set unpin_work if vblank_get fails
    drm/i915: By default, enable RC6 on IVB and SNB when reasonable
    iommu: Export intel_iommu_enabled to signal when iommu is in use
    drm/i915/sdvo: Include LVDS panels for the IS_DIGITAL check
    drm/i915: prevent division by zero when asking for chipset power
    drm/i915: add PCH info to i915_capabilities
    drm/i915: set the right SDVO transcoder for CPT
    drm/i915: no-lvds quirk for ASUS AT5NM10T-I
    drm/i915: Treat pre-gen4 backlight duty cycle value consistently
    drm/i915: Hook up Ivybridge eDP
    drm/i915: add multi-threaded forcewake support

    Linus Torvalds
     
  • Some active adaptors (VGA usually) only have two lanes at 2.7GHz.
    That's a maximum pixel clock of 144MHz at 8bpc, but 192MHz at 6bpc.

    Fixes Asus UX31 panel being black at startup due to no valid modes since
    dc22ee6fc18ce0f15424e753e8473c306ece95c1.

    v2: Rebased to current code, resulting in the fix applying to EDP panels as
    well. Also changed from spatio-temporal to just spatial dithering on
    pre-ironlake, to be conssitent (and less visual flicker)

    Signed-off-by: Adam Jackson
    Signed-off-by: Eric Anholt
    Tested-by: Eric Anholt
    Tested-by: Dirk Hohndel
    Signed-off-by: Keith Packard

    Adam Jackson
     
  • This adds a default setting for semaphores parameter, and enables
    semaphores by default on IVB.

    For now, as semaphores interaction with VTd causes random issues on
    SNB, we do not enable them by default. But they can still be enabled
    via the semaphores=1 kernel parameter.

    v2: enables semaphores on SNB when IO remapping is disabled, with base
    on Keith Packard patch.

    CC: Daniel Vetter
    CC: Ben Widawsky
    CC: Keith Packard
    CC: Jesse Barnes
    CC: Chris Wilson
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42696
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40564
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41353
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38862
    Reviewed-by: Chris Wilson
    Reviewed-by: Daniel Vetter
    Signed-off-by: Eugeni Dodonov
    Signed-off-by: Keith Packard

    Eugeni Dodonov
     
  • This fixes a race where we may try to finish a page flip and decrement
    the refcount even if our vblank_get failed and we ended up with a
    spurious flip pending interrupt.

    Fixes https://bugs.freedesktop.org/show_bug.cgi?id=34211.

    Signed-off-by: Jesse Barnes
    Signed-off-by: Keith Packard

    Jesse Barnes
     
  • RC6 should always work on IVB, and should work on SNB whenever IO
    remapping is disabled. RC6 never works on Ironlake. Make the default
    value for the parameter follow these guidelines. Setting the value
    to either 0 or 1 will force the specified behavior.

    Signed-off-by: Keith Packard
    Reviewed-by: Kenneth Graunke
    Reviewed-by: Eugeni Dodonov
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38567
    Cc: Ted Phelps
    Cc: Peter
    Cc: Lukas Hejtmanek
    Cc: Andrew Lutomirski

    Keith Packard
     
  • We were checking whether the supplied edid matched the connector it was
    read from. We do this in case a DDC read returns an EDID for another
    device on a multifunction or otherwise interesting card. However, we
    failed to include LVDS as a digital device and so rejecting an otherwise
    valid EDID.

    Fixes the detection of the secondary SDVO LVDS panel on the Libretto
    W105.

    Signed-off-by: Chris Wilson
    Reviewed-by: Adam Jackson
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39216
    Signed-off-by: Keith Packard

    Chris Wilson
     
  • This prevents an in-kernel division by zero which happens when we are
    asking for i915_chipset_val too quickly, or within a race condition
    between the power monitoring thread and userspace accesses via debugfs.

    The issue can be reproduced easily via the following command:
    while ``; do cat /sys/kernel/debug/dri/0/i915_emon_status; done

    This is particularly dangerous because it can be triggered by
    a non-privileged user by just reading the debugfs entry.

    This issue was also found independently by Konstantin Belousov
    , who proposed a similar patch.

    Reported-by: Konstantin Belousov
    Acked-by: Jesse Barnes
    Acked-by: Keith Packard
    Reviewed-by: Chris Wilson
    Cc:
    Signed-off-by: Eugeni Dodonov
    Signed-off-by: Keith Packard

    Eugeni Dodonov
     
  • Signed-off-by: Chris Wilson
    Signed-off-by: Paulo Zanoni
    Signed-off-by: Keith Packard

    Paulo Zanoni
     
  • v2: add a CPT-specific macro, make code cleaner
    v3: fix commit message

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41272
    Cc: stable@kernel.org
    Signed-off-by: Paulo Zanoni
    Reviewed-by: Chris Wilson
    Signed-off-by: Keith Packard

    Paulo Zanoni
     
  • https://bugzilla.redhat.com/show_bug.cgi?id=750006

    Signed-off-by: Adam Jackson
    Signed-off-by: Keith Packard

    Adam Jackson
     

07 Dec, 2011

3 commits

  • The advantage of kcalloc is, that will prevent integer overflows which could
    result from the multiplication of number of elements and size and it is also
    a bit nicer to read.

    The semantic patch that makes this change is available
    in https://lkml.org/lkml/2011/11/25/107

    Signed-off-by: Thomas Meyer
    Reviewed-by: Jakob Bornecrantz
    Signed-off-by: Dave Airlie

    Thomas Meyer
     
  • The recursion loop goes retire_requests->unbind->gpu_idle->retire_reqeusts.

    Every time we go through this we need a
    - active object that can be retired
    - and there are no other references to that object than the one from
    the active list, so that it gets unbound and freed immediately.
    Otherwise the recursion stops. So the recursion is only limited by the
    number of objects that fit these requirements sitting in the active list
    any time retire_request is called.

    Issue exercised by tests/gem_unref_active_buffers from i-g-t.

    There's been a decent bikeshed discussion whether it wouldn't be
    better to pass around a flag, but imo this is o.k. for such a limited
    case that only supports a w/a.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42180

    Signed-Off-by: Daniel Vetter
    Reviewed-by: Chris Wilson
    [ickle- we built better bikesheds, but this keeps the rain off for now]
    Tested-by: Dave Airlie
    Signed-off-by: Dave Airlie

    Daniel Vetter
     
  • Seems like something got mis-merged here.

    Noticed by kallisti5 on IRC.

    Signed-off-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Alex Deucher
     

02 Dec, 2011

4 commits

  • There are two issues in vmw_kms_update_layout_ioctl(). First, the
    for loop forgets to index rects and only checks the first element.
    Second, there is a potential integer overflow if userspace passes
    in a large arg->num_outputs. The call to kzalloc() would allocate
    a small buffer, leading to out-of-bounds read.

    Reported-by: Haogang Chen
    Signed-off-by: Xi Wang
    Signed-off-by: Thomas Hellstrom
    Signed-off-by: Dave Airlie

    Xi Wang
     
  • Fixes:
    https://bugs.freedesktop.org/show_bug.cgi?id=43191

    Signed-off-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • Fixes:
    https://bugs.freedesktop.org/show_bug.cgi?id=43191

    Signed-off-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • 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: Chris Wilson
    Signed-off-by: Dave Airlie

    Chris Wilson
     

01 Dec, 2011

4 commits

  • I am under the impression that it only makes sense to call the ATIF
    method if the graphics device has an ACPI handle attached. So we could
    skip the call altogether if there is no such handle.

    Signed-off-by: Jean Delvare
    Reviewed-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Jean Delvare
     
  • Use the proper macro to issue the debugging message in
    radeon_atif_call(). Otherwise we spam the log of many systems with a
    message which looks like an error message of unknown origin, and could
    thus confuse the user. Commit dc77de12dde95c8da39e4c417eb70c7d445cf84b
    was a first step in this direction, but was not sufficient IMHO.

    Signed-off-by: Jean Delvare
    Reviewed-by: Alex Deucher
    Signed-off-by: Dave Airlie

    Jean Delvare
     
  • Avoid infinite loops waiting for surface updates if a GPU
    reset happens while waiting for a page flip.

    See:
    https://bugs.freedesktop.org/show_bug.cgi?id=43191

    Signed-off-by: Alex Deucher
    Cc: stable@kernel.org
    Reviewed-by: Mario Kleiner
    Tested-by: Simon Farnsworth
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • * 'drm-nouveau-fixes' of git://git.freedesktop.org/git/nouveau/linux-2.6:
    drm/nv50/disp: silence compiler warning
    drm/nouveau: fix oopses caused by clear being called on unpopulated ttms
    drm/nouveau: Keep RAMIN heap within the channel.
    drm/nvd0/disp: fix sor dpms typo, preventing dpms on in some situations
    drm/nvc0/gr: fix TP init for transform feedback offset queries
    drm/nouveau: add dumb ioctl support

    Dave Airlie
     

30 Nov, 2011

6 commits


28 Nov, 2011

1 commit

  • * 'exynos-drm' of git://git.infradead.org/users/kmpark/linux-samsung:
    drm/exynos: fixed wrong err ptr usage and destroy call in exeception
    drm/exynos: Add disable of manager
    drm/exynos: include linux/module.h
    drm/exynos: fix vblank bug.
    drm/exynos: changed buffer structure.
    drm/exynos: removed unnecessary variable.
    drm/exynos: use gem create function generically
    drm/exynos: checked for null pointer
    drm/exynos: added crtc dpms for disable crtc
    drm/exynos: removed meaningless parameter from fbdev update
    drm/exynos: restored kernel_fb_list when reiniting fb_helper
    drm/exynos: changed exynos_drm_display to exynos_drm_display_ops
    drm/exynos: added manager object to connector
    drm/exynos: fixed converting between display mode and timing
    drm/exynos: fixed connector flag with hpd and interlace scan for hdmi
    drm/exynos: added kms poll for handling hpd event

    Dave Airlie
     

24 Nov, 2011

3 commits

  • For i945 and earlier chips, the backlight frequency value had the low
    bit (of 16) fixed to zero. The Pineview code path handled this by just
    exposing the backlight range as 15 bits while other chips had the
    backlight range limited to 0 .. 0xfffe.

    This patch makes everyone take the pineview code path, providing 15
    bits of backlight duty cycle range which seems more than sufficient to
    me.

    Daniel Mack reported that writing 1 to bit 0 of the duty cycle
    register was causing problems on his Samsung X20 notebook, even when
    the duty cycle value was less than the maximum backlight value. (He
    tried a value of 29749 with max_brightness of 29750). This patch never
    writes a '1' to that bit.

    Signed-off-by: Keith Packard
    Reviewed-by: Takashi Iwai
    Reported-and-tested-by: Daniel Mack
    Cc: stable@kernel.org

    Keith Packard
     
  • The Ivybridge eDP control register looks like a cross between a
    Cougarpoint PCH DP control register and a Sandybridge eDP control
    register.

    Where things trivially match, share the code. Where there are any
    tricky bits, just split things out into two obviously separate code paths.

    Signed-off-by: Keith Packard
    Tested-by: Fang Xun
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41991

    Keith Packard
     
  • On IVB C0+ with newer BIOSes, the forcewake handshake has changed. There's
    now a bitfield for different driver components to keep the GT powered
    on. On Linux, we centralize forcewake handling in one place, so we
    still just need a single bit, but we need to use the new registers if MT
    forcewake is enabled.

    This needs testing on affected machines. Please reply with your
    tested-by if you had problems after a BIOS upgrade and this patch fixes
    them.

    v2: force MT mode. shift by 16
    v3: set MT force wake bits then check ECOBUS

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42923
    Tested-by: Manoj Iyer
    Tested-by: Robert Hooker
    Tested-by: Keith Packard
    Signed-off-by: Jesse Barnes
    Signed-off-by: Keith Packard

    Keith Packard