05 Mar, 2015

1 commit

  • We need to store device offsets in 64 bit as the device
    address space may be larger than the CPU's.

    Fixes GPU init failures on radeons with 4GB or more of
    vram on 32 bit kernels. We put vram at the start of the
    GPU's address space so the gart aperture starts at 4 GB
    causing all GPU addresses in the gart aperture to get
    truncated.

    bug:
    https://bugs.freedesktop.org/show_bug.cgi?id=89072

    [airlied: fix warning on nouveau build]

    Signed-off-by: Alex Deucher
    Cc: thellstrom@vmware.com
    Acked-by: Thomas Hellstrom
    Signed-off-by: Dave Airlie

    Alex Deucher
     

27 Jan, 2015

1 commit

  • Just flushing out my drm-misc branch, nothing major. Well too old patches
    I've dug out from years since a patch from Rob look eerily familiar ;-)

    * tag 'topic/core-stuff-2015-01-23' of git://anongit.freedesktop.org/drm-intel:
    drm/probe-helper: clamp unknown connector status in the poll work
    drm/probe-helper: don't lose hotplug event
    next: drm/atomic: Use copy_from_user to copy 64 bit data from user space
    drm: Make drm_read() more robust against multithreaded races
    drm/fb-helper: Propagate errors from initial config failure
    drm: Drop superfluous "select VT_HW_CONSOLE_BINDING"

    Dave Airlie
     

22 Jan, 2015

1 commit


21 Jan, 2015

1 commit

  • Make drm_fb_helper_initial_config() return an int rather than a bool so
    that the error can be properly propagated. While at it, update drivers
    to propagate errors further rather than just ignore them.

    v2:
    - cirrus: No cleanup is required, the top-level cirrus_driver_load()
    will do it as part of cirrus_driver_unload() in its cleanup path.
    Reported-by: Fengguang Wu

    Cc: David Airlie
    Cc: Daniel Vetter
    Cc: Patrik Jakobsson
    Cc: Rob Clark
    Cc: Tomi Valkeinen
    Cc: Alex Deucher
    Cc: Christian König
    Cc: Ben Skeggs
    Signed-off-by: Thierry Reding
    Reviewed-by: Alex Deucher
    Reviewed-by: Patrik Jakobsson
    Reviewed-by: Christian König
    [danvet: Squash in simplification patch from kbuild.]
    Signed-off-by: Daniel Vetter

    Thierry Reding
     

02 Dec, 2014

2 commits


14 Oct, 2014

1 commit

  • Pull drm updates from Dave Airlie:
    "This is the main git pull for the drm,

    I pretty much froze major pulls at -rc5/6 time, and haven't had much
    fallout, so will probably continue doing that.

    Lots of changes all over, big internal header cleanup to make it clear
    drm features are legacy things and what are things that modern KMS
    drivers should be using. Also big move to use the new generic fences
    in all the TTM drivers.

    core:
    atomic prep work,
    vblank rework changes, allows immediate vblank disables
    major header reworking and cleanups to better delinate legacy
    interfaces from what KMS drivers should be using.
    cursor planes locking fixes

    ttm:
    move to generic fences (affects all TTM drivers)
    ppc64 caching fixes

    radeon:
    userptr support,
    uvd for old asics,
    reset rework for fence changes
    better buffer placement changes,
    dpm feature enablement
    hdmi audio support fixes

    intel:
    Cherryview work,
    180 degree rotation,
    skylake prep work,
    execlist command submission
    full ppgtt prep work
    cursor improvements
    edid caching,
    vdd handling improvements

    nouveau:
    fence reworking
    kepler memory clock work
    gt21x clock work
    fan control improvements
    hdmi infoframe fixes
    DP audio

    ast:
    ppc64 fixes
    caching fix

    rcar:
    rcar-du DT support

    ipuv3:
    prep work for capture support

    msm:
    LVDS support for mdp4, new panel, gpu refactoring

    exynos:
    exynos3250 SoC support, drop bad mmap interface,
    mipi dsi changes, and component match support"

    * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (640 commits)
    drm/mst: rework payload table allocation to conform better.
    drm/ast: Fix HW cursor image
    drm/radeon/kv: add uvd/vce info to dpm debugfs output
    drm/radeon/ci: add uvd/vce info to dpm debugfs output
    drm/radeon: export reservation_object from dmabuf to ttm
    drm/radeon: cope with foreign fences inside the reservation object
    drm/radeon: cope with foreign fences inside display
    drm/core: use helper to check driver features
    drm/radeon/cik: write gfx ucode version to ucode addr reg
    drm/radeon/si: print full CS when we hit a packet 0
    drm/radeon: remove unecessary includes
    drm/radeon/combios: declare legacy_connector_convert as static
    drm/radeon/atombios: declare connector convert tables as static
    drm/radeon: drop btc_get_max_clock_from_voltage_dependency_table
    drm/radeon/dpm: drop clk/voltage dependency filters for BTC
    drm/radeon/dpm: drop clk/voltage dependency filters for CI
    drm/radeon/dpm: drop clk/voltage dependency filters for SI
    drm/radeon/dpm: drop clk/voltage dependency filters for NI
    drm/radeon: disable audio when we disable hdmi (v2)
    drm/radeon: split audio enable between eg and r600 (v2)
    ...

    Linus Torvalds
     

02 Oct, 2014

1 commit

  • Preparation for some runtime pm fixes. Currently we skip over fbcon
    suspend/resume in the runtime path, which causes issues on resume if
    fbcon tries to write to the framebuffer before the BAR subdev has
    been resumed to restore the BAR1 VM setup.

    As we might be woken up via a sysfs connector, we are unable to call
    fb_set_suspend() in the resume path as it could make its way down to
    a modeset and cause all sorts of locking hilarity.

    To solve this, we'll just delay the fbcon resume to a workqueue.

    Signed-off-by: Ben Skeggs

    Ben Skeggs
     

24 Sep, 2014

1 commit


15 Sep, 2014

1 commit


15 Aug, 2014

1 commit


10 Aug, 2014

6 commits


05 Aug, 2014

1 commit


08 Jul, 2014

3 commits

  • Under some complicated circumstances (boot, suspend, resume, attach
    second display, suspend, resume, suspend, detach second display,
    resume, suspend, attach second display, resume), the fb_set_suspend()
    call can somehow result in a modeset being attempted before we're
    ready for it and things blow up in fun ways.

    Running display init first fixes the issue.

    Signed-off-by: Ben Skeggs

    Ben Skeggs
     
  • To implement hotplug detection in a race-free manner, drivers must call
    drm_kms_helper_poll_init() before hotplug events can be triggered. Such
    events can be triggered right after any of the encoders or connectors
    are initialized. At the same time, if the drm_fb_helper_hotplug_event()
    helper is used by a driver, then the poll helper requires some parts of
    the FB helper to be initialized to prevent a crash.

    At the same time, drm_fb_helper_init() requires information that is not
    necessarily available at such an early stage (number of CRTCs and
    connectors), so it cannot be used yet.

    Add a new helper, drm_fb_helper_prepare(), that initializes the bare
    minimum needed to allow drm_kms_helper_poll_init() to execute and any
    subsequent hotplug events to be processed properly.

    Reviewed-by: Daniel Vetter
    Signed-off-by: Thierry Reding
    Signed-off-by: Dave Airlie

    Thierry Reding
     
  • There's no need for this to be modifiable. Make it const so that it can
    be put into the .rodata section.

    Reviewed-by: Daniel Vetter
    Signed-off-by: Thierry Reding
    Acked-by: Russell King
    Signed-off-by: Dave Airlie

    Thierry Reding
     

26 Mar, 2014

1 commit

  • This does *not* (and is not intended to) fix the issue reported by
    Christoph Rudorff on the nouveau mailinglist.

    The patch proposed (which is similar to this one, but also reorders
    whether we disable accel or call fb_set_suspend first), papers over
    another problem entirely by avoiding touching the framebuffer.

    Signed-off-by: Ben Skeggs

    Ben Skeggs
     

08 Nov, 2013

1 commit


09 Oct, 2013

1 commit

  • There is no reason to keep the gem object separately allocated. nouveau is
    the last user of gem_obj->driver_private, so if we embed it, we can get
    rid of 8bytes per gem-object.

    The implementation follows the radeon driver. bo->gem is only valid, iff
    the bo was created via the gem helpers _and_ iff the user holds a valid
    gem reference. That is, as the gem object holds a reference to the
    nouveau_bo. If you use nouveau_ref() to gain a bo reference, you are not
    guaranteed to also hold a gem reference. The gem object might get
    destroyed after the last user drops the gem-ref via
    drm_gem_object_unreference(). Use drm_gem_object_reference() to gain a
    gem-reference.

    For debugging, we can use bo->gem.filp != NULL to test whether a gem-bo is
    valid. However, this shouldn't be used for real functionality to avoid
    gem-internal dependencies.

    Note that the implementation follows the previous style. However, we no
    longer can check for bo->gem != NULL to test for a valid gem object. This
    wasn't done before, so we should be safe now.

    Signed-off-by: David Herrmann
    Acked-by: Maarten Lankhorst
    Reviewed-by: Ben Skeggs
    Signed-off-by: Dave Airlie

    David Herrmann
     

17 Sep, 2013

1 commit


30 Jul, 2013

1 commit


10 Jul, 2013

1 commit


01 Jul, 2013

2 commits

  • - Various fixes that make surviving concurrent piglit more possible.
    - Buffer object deletion no longer synchronous
    - Context/register initialisation updates that have been reported to
    solve some stability issues (particularly on some problematic GF119
    chips)
    - Kernel side support for VP2 video decoding engines

    * 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (44 commits)
    drm/nvd0-/disp: handle case where display engine is missing/disabled
    drm/gr/nvc0-: merge nvc0/nve0 ucode, and use cpp instead of m4
    drm/nouveau/bsp/nv84: initial vp2 engine implementation
    drm/nouveau/vp/nv84: initial vp2 engine implementation
    drm/nouveau/core: xtensa engine base class implementation
    drm/nouveau/vdec: fork vp3 implementations from vp2
    drm/nouveau/core: move falcon class to engine/
    drm/nouveau/kms: don't fail if there's no dcb table entries
    drm/nouveau: remove limit on gart
    drm/nouveau/vm: perform a bar flush when flushing vm
    drm/nvc0/gr: cleanup register lists, and add nvce/nvcf to switches
    drm/nvc8/gr: update initial register/context values
    drm/nvc4/gr: update initial register/context values
    drm/nvc1/gr: update initial register/context values
    drm/nvc3/gr: update initial register/context values
    drm/nvc0/gr: update initial register/context values
    drm/nvd9/gr: update initial register/context values
    drm/nve4/gr: update initial register/context values
    drm/nvc0-/gr: bump maximum gpc/tpc limits
    drm/nvf0/gr: initial register/context setup
    ...

    Dave Airlie
     
  • Signed-off-by: Ben Skeggs

    Ben Skeggs
     

28 Jun, 2013

1 commit


14 Feb, 2013

2 commits

  • The fb helper lost its support for reallocating an fb completely, so
    no need to return special success values any more.

    Reviewed-by: Rob Clark
    Signed-off-by: Daniel Vetter

    Daniel Vetter
     
  • This should be done in the drivers for two reasons:
    - it gets in the way of fastboot efforts
    - it links the fb helpers with the crtc helpers instead of going
    through the real interface vfuncs, forcing i915 to fake all the
    ->disable callbacks used by the crtc helper to avoid ugly Oopsen

    v2: Resolve conflicts since drivers still call
    drm_fb_helper_single_add_all_connectors.

    Reviewed-by: Rob Clark
    Signed-off-by: Daniel Vetter

    Daniel Vetter
     

21 Jan, 2013

1 commit

  • We have two classes of framebuffer
    - Created by the driver (atm only for fbdev), and the driver holds
    onto the last reference count until destruction.
    - Created by userspace and associated with a given fd. These
    framebuffers will be reaped when their assoiciated fb is closed.

    Now these two cases are set up differently, the framebuffers are on
    different lists and hence destruction needs to clean up different
    things. Also, for userspace framebuffers we remove them from any
    current usage, whereas for internal framebuffers it is assumed that
    the driver has done this already.

    Long story short, we need two different ways to cleanup such drivers.
    Three functions are involved in total:
    - drm_framebuffer_remove: Convenience function which removes the fb
    from all active usage and then drops the passed-in reference.
    - drm_framebuffer_unregister_private: Will remove driver-private
    framebuffers from relevant lists and drop the corresponding
    references. Should be called for driver-private framebuffers before
    dropping the last reference (or like for a lot of the drivers where
    the fbdev is embedded someplace else, before doing the cleanup
    manually).
    - drm_framebuffer_cleanup: Final cleanup for both classes of fbs,
    should be called by the driver's ->destroy callback once the last
    reference is gone.

    This patch just rolls out the new interfaces and updates all drivers
    (by adding calls to drm_framebuffer_unregister_private at all the
    right places)- no functional changes yet. Follow-on patches will move
    drm core code around and update the lifetime management for
    framebuffers, so that we are no longer required to keep framebuffers
    alive by locking mode_config.mutex.

    I've also updated the kerneldoc already.

    vmwgfx seems to again be a bit special, at least I haven't figured out
    how the fbdev support in that driver works. It smells like it's
    external though.

    v2: The i915 driver creates another private framebuffer in the
    load-detect code. Adjust its cleanup code, too.

    Reviewed-by: Rob Clark
    Signed-off-by: Daniel Vetter

    Daniel Vetter
     

04 Oct, 2012

1 commit

  • Pull drm merge (part 1) from Dave Airlie:
    "So first of all my tree and uapi stuff has a conflict mess, its my
    fault as the nouveau stuff didn't hit -next as were trying to rebase
    regressions out of it before we merged.

    Highlights:
    - SH mobile modesetting driver and associated helpers
    - some DRM core documentation
    - i915 modesetting rework, haswell hdmi, haswell and vlv fixes, write
    combined pte writing, ilk rc6 support,
    - nouveau: major driver rework into a hw core driver, makes features
    like SLI a lot saner to implement,
    - psb: add eDP/DP support for Cedarview
    - radeon: 2 layer page tables, async VM pte updates, better PLL
    selection for > 2 screens, better ACPI interactions

    The rest is general grab bag of fixes.

    So why part 1? well I have the exynos pull req which came in a bit
    late but was waiting for me to do something they shouldn't have and it
    looks fairly safe, and David Howells has some more header cleanups
    he'd like me to pull, that seem like a good idea, but I'd like to get
    this merge out of the way so -next dosen't get blocked."

    Tons of conflicts mostly due to silly include line changes, but mostly
    mindless. A few other small semantic conflicts too, noted from Dave's
    pre-merged branch.

    * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (447 commits)
    drm/nv98/crypt: fix fuc build with latest envyas
    drm/nouveau/devinit: fixup various issues with subdev ctor/init ordering
    drm/nv41/vm: fix and enable use of "real" pciegart
    drm/nv44/vm: fix and enable use of "real" pciegart
    drm/nv04/dmaobj: fixup vm target handling in preparation for nv4x pcie
    drm/nouveau: store supported dma mask in vmmgr
    drm/nvc0/ibus: initial implementation of subdev
    drm/nouveau/therm: add support for fan-control modes
    drm/nouveau/hwmon: rename pwm0* to pmw1* to follow hwmon's rules
    drm/nouveau/therm: calculate the pwm divisor on nv50+
    drm/nouveau/fan: rewrite the fan tachometer driver to get more precision, faster
    drm/nouveau/therm: move thermal-related functions to the therm subdev
    drm/nouveau/bios: parse the pwm divisor from the perf table
    drm/nouveau/therm: use the EXTDEV table to detect i2c monitoring devices
    drm/nouveau/therm: rework thermal table parsing
    drm/nouveau/gpio: expose the PWM/TOGGLE parameter found in the gpio vbios table
    drm/nouveau: fix pm initialization order
    drm/nouveau/bios: check that fixed tvdac gpio data is valid before using it
    drm/nouveau: log channel debug/error messages from client object rather than drm client
    drm/nouveau: have drm debugging macros build on top of core macros
    ...

    Linus Torvalds
     

03 Oct, 2012

6 commits

  • v2: Ben Skeggs
    - fill in nouveau_pm.dev to prevent oops
    - fix ppc issues (build + OF shadow)

    Signed-off-by: Ben Skeggs

    Ben Skeggs
     
  • This is a HUGE commit, but it's not nearly as bad as it looks - any problems
    can be isolated to a particular chipset and engine combination. It was
    simply too difficult to port each one at a time, the compat layers are
    *already* ridiculous.

    Most of the changes here are simply to the glue, the process for each of the
    engine modules was to start with a standard skeleton and copy+paste the old
    code into the appropriate places, fixing up variable names etc as needed.

    v2: Marcin Slusarz
    - fix find/replace bug in license header

    v3: Ben Skeggs
    - bump indirect pushbuf size to 8KiB, 4KiB barely enough for userspace and
    left no space for kernel's requirements during GEM pushbuf submission.
    - fix duplicate assignments noticed by clang

    v4: Marcin Slusarz
    - add sparse annotations to nv04_fifo_pause/nv04_fifo_start
    - use ioread32_native/iowrite32_native for fifo control registers

    v5: Ben Skeggs
    - rebase on v3.6-rc4, modified to keep copy engine fix intact
    - nv10/fence: unmap fence bo before destroying
    - fixed fermi regression when using nvidia gr fuc
    - fixed typo in supported dma_mask checking

    Signed-off-by: Ben Skeggs

    Ben Skeggs
     
  • Signed-off-by: Ben Skeggs

    Ben Skeggs
     
  • These currently just call the existing ones in nouveau_drv.c, but will be
    extended in upcoming commits. This needed to be separated from the current
    code as there will be some header clashes until things are ported.

    Signed-off-by: Ben Skeggs

    Ben Skeggs
     
  • Convert #include "..." to #include in drivers/gpu/.

    Signed-off-by: David Howells
    Acked-by: Dave Airlie
    Acked-by: Arnd Bergmann
    Acked-by: Thomas Gleixner
    Acked-by: Paul E. McKenney
    Acked-by: Dave Jones

    David Howells
     
  • Remove redundant DRM UAPI header #inclusions from drivers/gpu/.

    Remove redundant #inclusions of core DRM UAPI headers (drm.h, drm_mode.h and
    drm_sarea.h). They are now #included via drmP.h and drm_crtc.h via a preceding
    patch.

    Without this patch and the patch to make include the UAPI headers from the core
    headers, after the UAPI split, the DRM C sources cannot find these UAPI headers
    because the DRM code relies on specific -I flags to make #include "..." work
    on headers in include/drm/ - but that does not work after the UAPI split without
    adding more -I flags.

    Signed-off-by: David Howells
    Acked-by: Dave Airlie
    Acked-by: Arnd Bergmann
    Acked-by: Thomas Gleixner
    Acked-by: Paul E. McKenney
    Acked-by: Dave Jones

    David Howells